From c980b5feb06f76a1966c9d26c26f37793930b173 Mon Sep 17 00:00:00 2001 From: Adyen Automation Date: Wed, 3 Jul 2024 09:08:15 +0000 Subject: [PATCH 1/2] [reformat][adyen-sdk-automation] automated change --- src/Adyen/Model/AcsWebhooks/Amount.php | 6 - .../Model/AcsWebhooks/AuthenticationInfo.php | 43 -- .../AuthenticationNotificationData.php | 18 - .../AuthenticationNotificationRequest.php | 9 - .../BalancePlatformNotificationResponse.php | 3 - src/Adyen/Model/AcsWebhooks/ChallengeInfo.php | 14 - .../Model/AcsWebhooks/ObjectSerializer.php | 9 +- src/Adyen/Model/AcsWebhooks/PurchaseInfo.php | 9 - src/Adyen/Model/AcsWebhooks/Resource.php | 9 - src/Adyen/Model/BalanceControl/Amount.php | 6 - .../BalanceControl/BalanceTransferRequest.php | 18 - .../BalanceTransferResponse.php | 27 - .../Model/BalanceControl/ObjectSerializer.php | 9 +- .../AULocalAccountIdentification.php | 9 - .../Model/BalancePlatform/AccountHolder.php | 41 +- .../AccountHolderCapability.php | 30 - .../BalancePlatform/AccountHolderInfo.php | 29 +- .../AccountHolderUpdateRequest.php | 35 +- .../AccountSupportingEntityCapability.php | 21 - .../ActiveNetworkTokensRestriction.php | 4 - .../AdditionalBankIdentification.php | 6 - src/Adyen/Model/BalancePlatform/Address.php | 18 - .../BalancePlatform/AddressRequirement.php | 9 - src/Adyen/Model/BalancePlatform/Amount.php | 6 - .../AmountMinMaxRequirement.php | 12 - .../Model/BalancePlatform/Authentication.php | 9 - .../BRLocalAccountIdentification.php | 15 - src/Adyen/Model/BalancePlatform/Balance.php | 15 - .../Model/BalancePlatform/BalanceAccount.php | 33 - .../BalancePlatform/BalanceAccountBase.php | 30 - .../BalancePlatform/BalanceAccountInfo.php | 24 - .../BalanceAccountUpdateRequest.php | 21 - .../Model/BalancePlatform/BalancePlatform.php | 9 - .../BalanceSweepConfigurationsResponse.php | 9 - .../Model/BalancePlatform/BankAccount.php | 3 - .../BankAccountAccountIdentification.php | 48 -- .../BalancePlatform/BankAccountDetails.php | 21 - ...nkAccountIdentificationTypeRequirement.php | 9 - ...AccountIdentificationValidationRequest.php | 3 - ...ValidationRequestAccountIdentification.php | 48 -- .../BalancePlatform/BankIdentification.php | 9 - .../BrandVariantsRestriction.php | 6 - .../Model/BalancePlatform/BulkAddress.php | 27 - .../CALocalAccountIdentification.php | 15 - .../CZLocalAccountIdentification.php | 9 - .../BalancePlatform/CapabilityProblem.php | 6 - .../CapabilityProblemEntity.php | 12 - .../CapabilityProblemEntityRecursive.php | 9 - .../BalancePlatform/CapabilitySettings.php | 23 +- .../Model/BalancePlatform/CapitalBalance.php | 12 - .../BalancePlatform/CapitalGrantAccount.php | 12 - src/Adyen/Model/BalancePlatform/Card.php | 39 -- .../BalancePlatform/CardConfiguration.php | 42 -- src/Adyen/Model/BalancePlatform/CardInfo.php | 24 - src/Adyen/Model/BalancePlatform/CardOrder.php | 24 - .../Model/BalancePlatform/CardOrderItem.php | 24 - .../CardOrderItemDeliveryStatus.php | 9 - .../Model/BalancePlatform/ContactDetails.php | 12 - .../Model/BalancePlatform/Counterparty.php | 6 - .../CounterpartyBankRestriction.php | 6 - .../BalancePlatform/CountriesRestriction.php | 6 - .../CreateSweepConfigurationV2.php | 46 +- .../DKLocalAccountIdentification.php | 9 - .../BalancePlatform/DayOfWeekRestriction.php | 6 - .../DelegatedAuthenticationData.php | 3 - .../Model/BalancePlatform/DeliveryAddress.php | 21 - .../Model/BalancePlatform/DeliveryContact.php | 21 - src/Adyen/Model/BalancePlatform/Device.php | 12 - .../Model/BalancePlatform/DeviceInfo.php | 33 - .../DifferentCurrenciesRestriction.php | 6 - src/Adyen/Model/BalancePlatform/Duration.php | 4 - .../BalancePlatform/EntryModesRestriction.php | 6 - src/Adyen/Model/BalancePlatform/Expiry.php | 6 - src/Adyen/Model/BalancePlatform/Fee.php | 3 - .../GetNetworkTokenResponse.php | 3 - .../BalancePlatform/GetTaxFormResponse.php | 6 - .../Model/BalancePlatform/GrantLimit.php | 3 - .../Model/BalancePlatform/GrantOffer.php | 24 - .../Model/BalancePlatform/GrantOffers.php | 3 - .../HKLocalAccountIdentification.php | 9 - .../HULocalAccountIdentification.php | 6 - src/Adyen/Model/BalancePlatform/Href.php | 3 - .../IbanAccountIdentification.php | 6 - .../InternationalTransactionRestriction.php | 6 - .../Model/BalancePlatform/InvalidField.php | 9 - src/Adyen/Model/BalancePlatform/Link.php | 15 - .../ListNetworkTokensResponse.php | 3 - .../MatchingTransactionsRestriction.php | 4 - .../MatchingValuesRestriction.php | 470 ++++++++++++++ .../Model/BalancePlatform/MccsRestriction.php | 6 - .../BalancePlatform/MerchantAcquirerPair.php | 6 - .../MerchantNamesRestriction.php | 6 - .../BalancePlatform/MerchantsRestriction.php | 6 - .../NOLocalAccountIdentification.php | 6 - .../NZLocalAccountIdentification.php | 6 - src/Adyen/Model/BalancePlatform/Name.php | 6 - .../Model/BalancePlatform/NetworkToken.php | 24 - .../NumberAndBicAccountIdentification.php | 12 - .../BalancePlatform/ObjectSerializer.php | 9 +- .../PLLocalAccountIdentification.php | 6 - .../PaginatedAccountHoldersResponse.php | 9 - .../PaginatedBalanceAccountsResponse.php | 9 - .../PaginatedGetCardOrderItemResponse.php | 9 - .../PaginatedGetCardOrderResponse.php | 9 - .../PaginatedPaymentInstrumentsResponse.php | 9 - .../BalancePlatform/PaymentInstrument.php | 67 +- ...itionalBankAccountIdentificationsInner.php | 6 - .../PaymentInstrumentGroup.php | 18 - .../PaymentInstrumentGroupInfo.php | 15 - .../BalancePlatform/PaymentInstrumentInfo.php | 61 +- .../PaymentInstrumentRequirement.php | 18 - .../PaymentInstrumentRevealInfo.php | 9 - .../PaymentInstrumentRevealRequest.php | 6 - .../PaymentInstrumentRevealResponse.php | 3 - .../PaymentInstrumentUpdateRequest.php | 15 - src/Adyen/Model/BalancePlatform/Phone.php | 6 - .../Model/BalancePlatform/PhoneNumber.php | 9 - .../BalancePlatform/PinChangeRequest.php | 12 - .../BalancePlatform/PinChangeResponse.php | 3 - .../PlatformPaymentConfiguration.php | 4 - .../ProcessingTypesRestriction.php | 6 - .../BalancePlatform/PublicKeyResponse.php | 6 - .../RegisterSCAFinalResponse.php | 3 - .../BalancePlatform/RegisterSCARequest.php | 6 - .../BalancePlatform/RegisterSCAResponse.php | 12 - .../BalancePlatform/RemediatingAction.php | 6 - src/Adyen/Model/BalancePlatform/Repayment.php | 7 - .../Model/BalancePlatform/RepaymentTerm.php | 2 - .../BalancePlatform/RestServiceError.php | 25 - .../BalancePlatform/RevealPinRequest.php | 6 - .../BalancePlatform/RevealPinResponse.php | 6 - .../Model/BalancePlatform/RiskScores.php | 2 - .../BalancePlatform/RiskScoresRestriction.php | 6 - .../SELocalAccountIdentification.php | 9 - .../SGLocalAccountIdentification.php | 9 - .../BalancePlatform/SameAmountRestriction.php | 6 - .../SameCounterpartyRestriction.php | 6 - .../SearchRegisteredDevicesResponse.php | 8 - .../Model/BalancePlatform/StringMatch.php | 6 - .../BalancePlatform/SweepConfigurationV2.php | 49 +- .../BalancePlatform/SweepCounterparty.php | 15 +- .../Model/BalancePlatform/SweepSchedule.php | 8 +- .../BalancePlatform/ThresholdRepayment.php | 3 - src/Adyen/Model/BalancePlatform/TimeOfDay.php | 6 - .../BalancePlatform/TimeOfDayRestriction.php | 6 - .../TotalAmountRestriction.php | 6 - .../Model/BalancePlatform/TransactionRule.php | 40 -- .../TransactionRuleEntityKey.php | 6 - .../BalancePlatform/TransactionRuleInfo.php | 37 -- .../TransactionRuleInterval.php | 16 - .../TransactionRuleResponse.php | 3 - .../TransactionRuleRestrictions.php | 85 +-- .../TransactionRulesResponse.php | 3 - .../Model/BalancePlatform/TransferRoute.php | 17 +- .../BalancePlatform/TransferRouteRequest.php | 23 +- .../TransferRouteRequirementsInner.php | 30 - .../BalancePlatform/TransferRouteResponse.php | 3 - .../UKLocalAccountIdentification.php | 9 - .../USLocalAccountIdentification.php | 12 - .../UpdateNetworkTokenRequest.php | 3 - .../UpdatePaymentInstrument.php | 39 -- .../UpdateSweepConfigurationV2.php | 49 +- .../BalancePlatform/VerificationDeadline.php | 9 - .../BalancePlatform/VerificationError.php | 18 - .../VerificationErrorRecursive.php | 15 - src/Adyen/Model/BinLookup/Amount.php | 6 - src/Adyen/Model/BinLookup/BinDetail.php | 3 - src/Adyen/Model/BinLookup/CardBin.php | 33 - .../BinLookup/CostEstimateAssumptions.php | 7 - .../Model/BinLookup/CostEstimateRequest.php | 30 - .../Model/BinLookup/CostEstimateResponse.php | 15 - .../Model/BinLookup/DSPublicKeyDetail.php | 15 - src/Adyen/Model/BinLookup/MerchantDetails.php | 9 - .../Model/BinLookup/ObjectSerializer.php | 9 +- src/Adyen/Model/BinLookup/Recurring.php | 15 - src/Adyen/Model/BinLookup/ServiceError.php | 16 - .../BinLookup/ThreeDS2CardRangeDetail.php | 18 - .../BinLookup/ThreeDSAvailabilityRequest.php | 18 - .../BinLookup/ThreeDSAvailabilityResponse.php | 15 - .../Model/Checkout/CheckoutPaymentMethod.php | 4 +- src/Adyen/Model/Checkout/MbwayDetails.php | 4 +- src/Adyen/Model/Checkout/ObjectSerializer.php | 9 +- src/Adyen/Model/Checkout/VippsDetails.php | 2 +- .../ConfigurationWebhooks/AccountHolder.php | 41 +- .../AccountHolderCapability.php | 30 - .../AccountHolderNotificationData.php | 6 - .../AccountHolderNotificationRequest.php | 9 - .../AccountSupportingEntityCapability.php | 21 - .../Model/ConfigurationWebhooks/Address.php | 18 - .../Model/ConfigurationWebhooks/Amount.php | 6 - .../ConfigurationWebhooks/Authentication.php | 9 - .../Model/ConfigurationWebhooks/Balance.php | 15 - .../ConfigurationWebhooks/BalanceAccount.php | 33 - .../BalanceAccountNotificationData.php | 6 - .../BalanceAccountNotificationRequest.php | 9 - .../BalancePlatformNotificationResponse.php | 5 +- .../BankAccountDetails.php | 21 - .../ConfigurationWebhooks/BulkAddress.php | 27 - .../CapabilityProblem.php | 6 - .../CapabilityProblemEntity.php | 12 - .../CapabilityProblemEntityRecursive.php | 9 - .../CapabilitySettings.php | 23 +- .../Model/ConfigurationWebhooks/Card.php | 39 -- .../CardConfiguration.php | 42 -- .../ConfigurationWebhooks/CardOrderItem.php | 24 - .../CardOrderItemDeliveryStatus.php | 9 - .../CardOrderNotificationRequest.php | 9 - .../ConfigurationWebhooks/ContactDetails.php | 12 - .../ConfigurationWebhooks/DeliveryAddress.php | 21 - .../ConfigurationWebhooks/DeliveryContact.php | 21 - .../Model/ConfigurationWebhooks/Expiry.php | 6 - .../IbanAccountIdentification.php | 6 - .../Model/ConfigurationWebhooks/Name.php | 6 - .../ObjectSerializer.php | 9 +- .../PaymentInstrument.php | 67 +- ...itionalBankAccountIdentificationsInner.php | 6 - .../PaymentInstrumentNotificationData.php | 6 - .../PaymentNotificationRequest.php | 9 - .../Model/ConfigurationWebhooks/Phone.php | 6 - .../ConfigurationWebhooks/PhoneNumber.php | 9 - .../PlatformPaymentConfiguration.php | 4 - .../RemediatingAction.php | 6 - .../Model/ConfigurationWebhooks/Resource.php | 9 - .../SweepConfigurationNotificationData.php | 9 - .../SweepConfigurationNotificationRequest.php | 9 - .../SweepConfigurationV2.php | 49 +- .../SweepCounterparty.php | 15 +- .../ConfigurationWebhooks/SweepSchedule.php | 8 +- .../VerificationDeadline.php | 9 - .../VerificationError.php | 18 - .../VerificationErrorRecursive.php | 15 - .../Model/DataProtection/ObjectSerializer.php | 9 +- .../Model/DataProtection/ServiceError.php | 13 - .../SubjectErasureByPspReferenceRequest.php | 9 - .../DataProtection/SubjectErasureResponse.php | 3 - .../Model/Disputes/AcceptDisputeRequest.php | 6 - .../Model/Disputes/AcceptDisputeResponse.php | 3 - .../Model/Disputes/DefendDisputeRequest.php | 9 - .../Model/Disputes/DefendDisputeResponse.php | 3 - src/Adyen/Model/Disputes/DefenseDocument.php | 9 - .../Model/Disputes/DefenseDocumentType.php | 9 - src/Adyen/Model/Disputes/DefenseReason.php | 9 - .../Model/Disputes/DefenseReasonsRequest.php | 6 - .../Model/Disputes/DefenseReasonsResponse.php | 6 - .../Disputes/DeleteDefenseDocumentRequest.php | 9 - .../DeleteDefenseDocumentResponse.php | 3 - .../Model/Disputes/DisputeServiceResult.php | 6 - src/Adyen/Model/Disputes/ObjectSerializer.php | 9 +- src/Adyen/Model/Disputes/ServiceError.php | 13 - .../Disputes/SupplyDefenseDocumentRequest.php | 9 - .../SupplyDefenseDocumentResponse.php | 3 - .../AULocalAccountIdentification.php | 9 - .../AcceptTermsOfServiceRequest.php | 6 - .../AcceptTermsOfServiceResponse.php | 18 - .../AdditionalBankIdentification.php | 6 - .../Model/LegalEntityManagement/Address.php | 18 - .../Model/LegalEntityManagement/Amount.php | 6 - .../LegalEntityManagement/Attachment.php | 15 - .../LegalEntityManagement/BankAccountInfo.php | 15 - .../BankAccountInfoAccountIdentification.php | 42 -- .../Model/LegalEntityManagement/BirthData.php | 3 - .../LegalEntityManagement/BusinessLine.php | 30 - .../BusinessLineInfo.php | 24 - .../BusinessLineInfoUpdate.php | 24 - .../LegalEntityManagement/BusinessLines.php | 3 - .../CALocalAccountIdentification.php | 15 - .../CZLocalAccountIdentification.php | 9 - .../CalculateTermsOfServiceStatusResponse.php | 3 - .../CapabilityProblem.php | 6 - .../CapabilityProblemEntity.php | 12 - .../CapabilityProblemEntityRecursive.php | 9 - .../CapabilitySettings.php | 15 - .../DKLocalAccountIdentification.php | 9 - .../DataReviewConfirmationResponse.php | 3 - .../Model/LegalEntityManagement/Document.php | 39 -- .../LegalEntityManagement/DocumentPage.php | 7 - .../DocumentReference.php | 21 - .../LegalEntityManagement/EntityReference.php | 3 - .../GeneratePciDescriptionRequest.php | 6 - .../GeneratePciDescriptionResponse.php | 9 - .../GetPciQuestionnaireInfosResponse.php | 3 - .../GetPciQuestionnaireResponse.php | 12 - ...tTermsOfServiceAcceptanceInfosResponse.php | 3 - .../GetTermsOfServiceDocumentRequest.php | 6 - .../GetTermsOfServiceDocumentResponse.php | 15 - .../HKLocalAccountIdentification.php | 9 - .../HULocalAccountIdentification.php | 6 - .../IbanAccountIdentification.php | 6 - .../IdentificationData.php | 21 - .../LegalEntityManagement/Individual.php | 27 - .../LegalEntityManagement/LegalEntity.php | 45 -- .../LegalEntityAssociation.php | 21 - .../LegalEntityCapability.php | 24 - .../LegalEntityManagement/LegalEntityInfo.php | 27 - .../LegalEntityInfoRequiredType.php | 27 - .../NOLocalAccountIdentification.php | 6 - .../NZLocalAccountIdentification.php | 6 - .../Model/LegalEntityManagement/Name.php | 9 - .../NumberAndBicAccountIdentification.php | 12 - .../ObjectSerializer.php | 9 +- .../LegalEntityManagement/OnboardingLink.php | 3 - .../OnboardingLinkInfo.php | 12 - .../OnboardingLinkSettings.php | 43 -- .../LegalEntityManagement/OnboardingTheme.php | 15 - .../OnboardingThemes.php | 9 - .../LegalEntityManagement/Organization.php | 48 -- .../LegalEntityManagement/OwnerEntity.php | 6 - .../PLLocalAccountIdentification.php | 6 - .../LegalEntityManagement/PciDocumentInfo.php | 9 - .../PciSigningRequest.php | 6 - .../PciSigningResponse.php | 6 - .../LegalEntityManagement/PhoneNumber.php | 6 - .../RemediatingAction.php | 6 - .../SELocalAccountIdentification.php | 9 - .../SGLocalAccountIdentification.php | 9 - .../LegalEntityManagement/ServiceError.php | 13 - .../SoleProprietorship.php | 30 - .../LegalEntityManagement/SourceOfFunds.php | 12 - .../Model/LegalEntityManagement/StockData.php | 9 - .../SupportingEntityCapability.php | 12 - .../LegalEntityManagement/TaxInformation.php | 9 - .../TaxReportingClassification.php | 12 - .../TermsOfServiceAcceptanceInfo.php | 15 - .../TransferInstrument.php | 21 - .../TransferInstrumentInfo.php | 9 - .../TransferInstrumentReference.php | 12 - .../Model/LegalEntityManagement/Trust.php | 36 -- .../UKLocalAccountIdentification.php | 9 - .../USLocalAccountIdentification.php | 12 - .../UndefinedBeneficiary.php | 6 - .../VerificationDeadline.php | 9 - .../VerificationError.php | 18 - .../VerificationErrorRecursive.php | 15 - .../VerificationErrors.php | 3 - .../Model/LegalEntityManagement/WebData.php | 6 - .../WebDataExemption.php | 3 - .../Model/Management/AdditionalCommission.php | 9 - .../Model/Management/AdditionalSettings.php | 6 - .../Management/AdditionalSettingsResponse.php | 9 - src/Adyen/Model/Management/Address.php | 21 - .../Model/Management/AfterpayTouchInfo.php | 3 - src/Adyen/Model/Management/AllowedOrigin.php | 9 - .../Management/AllowedOriginsResponse.php | 3 - src/Adyen/Model/Management/AmexInfo.php | 9 - src/Adyen/Model/Management/Amount.php | 6 - src/Adyen/Model/Management/AndroidApp.php | 25 - .../Model/Management/AndroidAppError.php | 6 - .../Model/Management/AndroidAppsResponse.php | 3 - .../Model/Management/AndroidCertificate.php | 21 - .../AndroidCertificatesResponse.php | 3 - src/Adyen/Model/Management/ApiCredential.php | 27 - .../Model/Management/ApiCredentialLinks.php | 18 - src/Adyen/Model/Management/ApplePayInfo.php | 3 - src/Adyen/Model/Management/BcmcInfo.php | 3 - .../Management/BillingEntitiesResponse.php | 3 - src/Adyen/Model/Management/BillingEntity.php | 15 - .../Model/Management/CardholderReceipt.php | 3 - .../Model/Management/CartesBancairesInfo.php | 6 - src/Adyen/Model/Management/ClearpayInfo.php | 3 - src/Adyen/Model/Management/Commission.php | 6 - src/Adyen/Model/Management/Company.php | 21 - .../Model/Management/CompanyApiCredential.php | 30 - src/Adyen/Model/Management/CompanyLinks.php | 12 - src/Adyen/Model/Management/CompanyUser.php | 33 - src/Adyen/Model/Management/Configuration.php | 12 - src/Adyen/Model/Management/Connectivity.php | 3 - src/Adyen/Model/Management/Contact.php | 15 - .../Management/CreateAllowedOriginRequest.php | 9 - .../CreateApiCredentialResponse.php | 33 - .../CreateCompanyApiCredentialRequest.php | 12 - .../CreateCompanyApiCredentialResponse.php | 36 -- .../Management/CreateCompanyUserRequest.php | 21 - .../Management/CreateCompanyUserResponse.php | 33 - .../CreateCompanyWebhookRequest.php | 48 -- .../CreateMerchantApiCredentialRequest.php | 9 - .../Management/CreateMerchantRequest.php | 21 - .../Management/CreateMerchantResponse.php | 21 - .../Management/CreateMerchantUserRequest.php | 18 - .../CreateMerchantWebhookRequest.php | 42 -- .../Model/Management/CreateUserResponse.php | 30 - src/Adyen/Model/Management/Currency.php | 7 - .../Model/Management/CustomNotification.php | 21 - src/Adyen/Model/Management/DataCenter.php | 6 - src/Adyen/Model/Management/EventUrl.php | 6 - .../Management/ExternalTerminalAction.php | 24 - src/Adyen/Model/Management/File.php | 6 - .../Management/GenerateApiKeyResponse.php | 3 - .../Management/GenerateClientKeyResponse.php | 3 - .../Management/GenerateHmacKeyResponse.php | 3 - .../Model/Management/GenericPmWithTdiInfo.php | 3 - src/Adyen/Model/Management/GiroPayInfo.php | 3 - src/Adyen/Model/Management/GooglePayInfo.php | 6 - src/Adyen/Model/Management/Gratuity.php | 12 - src/Adyen/Model/Management/Hardware.php | 3 - src/Adyen/Model/Management/IdName.php | 6 - .../Management/InstallAndroidAppDetails.php | 6 - .../InstallAndroidCertificateDetails.php | 6 - src/Adyen/Model/Management/InvalidField.php | 9 - src/Adyen/Model/Management/Key.php | 7 - src/Adyen/Model/Management/KlarnaInfo.php | 12 - src/Adyen/Model/Management/Links.php | 3 - src/Adyen/Model/Management/LinksElement.php | 3 - .../ListCompanyApiCredentialsResponse.php | 8 - .../Model/Management/ListCompanyResponse.php | 8 - .../Management/ListCompanyUsersResponse.php | 8 - .../ListExternalTerminalActionsResponse.php | 3 - .../ListMerchantApiCredentialsResponse.php | 8 - .../Model/Management/ListMerchantResponse.php | 8 - .../Management/ListMerchantUsersResponse.php | 8 - .../Model/Management/ListStoresResponse.php | 8 - .../Management/ListTerminalsResponse.php | 8 - .../Model/Management/ListWebhooksResponse.php | 11 - src/Adyen/Model/Management/Localization.php | 9 - src/Adyen/Model/Management/Logo.php | 3 - .../Model/Management/MeApiCredential.php | 33 - .../Model/Management/MealVoucherFRInfo.php | 9 - src/Adyen/Model/Management/Merchant.php | 42 -- src/Adyen/Model/Management/MerchantLinks.php | 12 - .../Management/MinorUnitsMonetaryValue.php | 4 - src/Adyen/Model/Management/Name.php | 6 - src/Adyen/Model/Management/Name2.php | 6 - src/Adyen/Model/Management/Nexo.php | 15 - src/Adyen/Model/Management/Notification.php | 15 - .../Model/Management/NotificationUrl.php | 6 - .../Model/Management/ObjectSerializer.php | 9 +- .../Model/Management/OfflineProcessing.php | 4 - src/Adyen/Model/Management/Opi.php | 9 - src/Adyen/Model/Management/OrderItem.php | 10 - .../Model/Management/PaginationLinks.php | 15 - src/Adyen/Model/Management/Passcodes.php | 12 - src/Adyen/Model/Management/PayAtTable.php | 6 - src/Adyen/Model/Management/PayPalInfo.php | 9 - src/Adyen/Model/Management/Payment.php | 6 - src/Adyen/Model/Management/PaymentMethod.php | 120 ---- .../Management/PaymentMethodResponse.php | 11 - .../Management/PaymentMethodSetupInfo.php | 108 ---- src/Adyen/Model/Management/PayoutSettings.php | 21 - .../Management/PayoutSettingsRequest.php | 9 - .../Management/PayoutSettingsResponse.php | 3 - src/Adyen/Model/Management/Profile.php | 52 -- src/Adyen/Model/Management/ReceiptOptions.php | 9 - .../Model/Management/ReceiptPrinting.php | 48 -- src/Adyen/Model/Management/Referenced.php | 3 - src/Adyen/Model/Management/Refunds.php | 3 - .../Model/Management/ReleaseUpdateDetails.php | 6 - .../ReprocessAndroidAppResponse.php | 3 - .../Management/RequestActivationResponse.php | 6 - .../Model/Management/RestServiceError.php | 25 - .../ScheduleTerminalActionsRequest.php | 12 - ...uleTerminalActionsRequestActionDetails.php | 12 - .../ScheduleTerminalActionsResponse.php | 17 - src/Adyen/Model/Management/Settings.php | 7 - .../Model/Management/ShippingLocation.php | 12 - .../Management/ShippingLocationsResponse.php | 3 - src/Adyen/Model/Management/Signature.php | 12 - src/Adyen/Model/Management/SofortInfo.php | 6 - .../Model/Management/SplitConfiguration.php | 12 - .../Management/SplitConfigurationList.php | 3 - .../Management/SplitConfigurationLogic.php | 51 -- .../Management/SplitConfigurationRule.php | 18 - src/Adyen/Model/Management/Standalone.php | 6 - src/Adyen/Model/Management/Store.php | 36 -- .../Model/Management/StoreAndForward.php | 7 - .../Model/Management/StoreCreationRequest.php | 24 - .../StoreCreationWithMerchantCodeRequest.php | 27 - src/Adyen/Model/Management/StoreLocation.php | 21 - .../Management/StoreSplitConfiguration.php | 6 - .../Model/Management/SupportedCardTypes.php | 15 - src/Adyen/Model/Management/Surcharge.php | 6 - src/Adyen/Model/Management/SwishInfo.php | 3 - src/Adyen/Model/Management/TapToPay.php | 3 - src/Adyen/Model/Management/Terminal.php | 27 - .../TerminalActionScheduleDetail.php | 6 - .../Model/Management/TerminalAssignment.php | 15 - .../Model/Management/TerminalConnectivity.php | 12 - .../TerminalConnectivityBluetooth.php | 6 - .../TerminalConnectivityCellular.php | 6 - .../TerminalConnectivityEthernet.php | 9 - .../Management/TerminalConnectivityWifi.php | 9 - .../Model/Management/TerminalInstructions.php | 3 - .../Management/TerminalModelsResponse.php | 3 - src/Adyen/Model/Management/TerminalOrder.php | 24 - .../Model/Management/TerminalOrderRequest.php | 18 - .../Management/TerminalOrdersResponse.php | 3 - .../Model/Management/TerminalProduct.php | 15 - .../Model/Management/TerminalProductPrice.php | 6 - .../Management/TerminalProductsResponse.php | 3 - .../TerminalReassignmentRequest.php | 12 - .../Management/TerminalReassignmentTarget.php | 12 - .../Model/Management/TerminalSettings.php | 63 -- .../Management/TestCompanyWebhookRequest.php | 9 - src/Adyen/Model/Management/TestOutput.php | 18 - .../Model/Management/TestWebhookRequest.php | 6 - .../Model/Management/TestWebhookResponse.php | 3 - src/Adyen/Model/Management/Timeouts.php | 1 - .../Management/TransactionDescriptionInfo.php | 6 - src/Adyen/Model/Management/TwintInfo.php | 3 - .../Management/UninstallAndroidAppDetails.php | 6 - .../UninstallAndroidCertificateDetails.php | 6 - .../Model/Management/UpdatableAddress.php | 18 - .../UpdateCompanyApiCredentialRequest.php | 15 - .../Management/UpdateCompanyUserRequest.php | 21 - .../UpdateCompanyWebhookRequest.php | 45 -- .../UpdateMerchantApiCredentialRequest.php | 12 - .../Management/UpdateMerchantUserRequest.php | 18 - .../UpdateMerchantWebhookRequest.php | 39 -- .../Management/UpdatePaymentMethodInfo.php | 54 -- .../UpdatePayoutSettingsRequest.php | 3 - .../UpdateSplitConfigurationLogicRequest.php | 51 -- .../UpdateSplitConfigurationRequest.php | 3 - .../UpdateSplitConfigurationRuleRequest.php | 12 - .../Model/Management/UpdateStoreRequest.php | 21 - .../Management/UploadAndroidAppResponse.php | 3 - .../UploadAndroidCertificateResponse.php | 3 - src/Adyen/Model/Management/Url.php | 12 - src/Adyen/Model/Management/User.php | 30 - src/Adyen/Model/Management/VippsInfo.php | 6 - src/Adyen/Model/Management/WeChatPayInfo.php | 6 - .../Model/Management/WeChatPayPosInfo.php | 6 - src/Adyen/Model/Management/Webhook.php | 66 -- src/Adyen/Model/Management/WebhookLinks.php | 15 - src/Adyen/Model/Management/WifiProfiles.php | 6 - .../AccountCapabilityData.php | 24 - .../AccountCreateNotificationData.php | 15 - .../AccountNotificationResponse.php | 3 - .../AccountUpdateNotificationData.php | 12 - .../ManagementWebhooks/CapabilityProblem.php | 6 - .../CapabilityProblemEntity.php | 12 - .../CapabilityProblemEntityRecursive.php | 9 - .../MerchantCreatedNotificationRequest.php | 12 - .../MerchantUpdatedNotificationRequest.php | 12 - .../MidServiceNotificationData.php | 27 - .../ManagementWebhooks/ObjectSerializer.php | 9 +- ...aymentMethodCreatedNotificationRequest.php | 12 - .../PaymentMethodNotificationResponse.php | 3 - ...ethodRequestRemovedNotificationRequest.php | 12 - ...ScheduledForRemovalNotificationRequest.php | 12 - .../ManagementWebhooks/RemediatingAction.php | 6 - .../TerminalSettingsData.php | 18 - .../TerminalSettingsNotificationRequest.php | 12 - .../TerminalSettingsNotificationResponse.php | 3 - .../ManagementWebhooks/VerificationError.php | 15 - .../VerificationErrorRecursive.php | 12 - .../Model/POSTerminalManagement/Address.php | 18 - .../AssignTerminalsRequest.php | 15 - .../AssignTerminalsResponse.php | 3 - .../FindTerminalRequest.php | 3 - .../FindTerminalResponse.php | 15 - .../GetStoresUnderAccountRequest.php | 6 - .../GetStoresUnderAccountResponse.php | 3 - .../GetTerminalDetailsRequest.php | 3 - .../GetTerminalDetailsResponse.php | 75 --- .../GetTerminalsUnderAccountRequest.php | 9 - .../GetTerminalsUnderAccountResponse.php | 9 - .../POSTerminalManagement/MerchantAccount.php | 12 - .../ObjectSerializer.php | 9 +- .../POSTerminalManagement/ServiceError.php | 13 - .../Model/POSTerminalManagement/Store.php | 18 - src/Adyen/Model/Payments/AccountInfo.php | 49 -- src/Adyen/Model/Payments/AcctInfo.php | 48 -- .../Model/Payments/AdditionalData3DSecure.php | 18 - .../Model/Payments/AdditionalDataAirline.php | 115 +--- .../Payments/AdditionalDataCarRental.php | 69 -- .../Model/Payments/AdditionalDataCommon.php | 48 -- .../Model/Payments/AdditionalDataLevel23.php | 51 -- .../Model/Payments/AdditionalDataLodging.php | 79 +-- .../Payments/AdditionalDataModifications.php | 3 - .../Payments/AdditionalDataOpenInvoice.php | 54 -- .../Model/Payments/AdditionalDataOpi.php | 3 - .../Model/Payments/AdditionalDataRatepay.php | 24 - .../Model/Payments/AdditionalDataRetry.php | 9 - .../Model/Payments/AdditionalDataRisk.php | 63 -- .../Payments/AdditionalDataRiskStandalone.php | 47 +- .../Payments/AdditionalDataSubMerchant.php | 30 - .../AdditionalDataTemporaryServices.php | 27 - .../Model/Payments/AdditionalDataWallets.php | 18 - src/Adyen/Model/Payments/Address.php | 18 - .../Payments/AdjustAuthorisationRequest.php | 33 - src/Adyen/Model/Payments/Amount.php | 6 - src/Adyen/Model/Payments/ApplicationInfo.php | 18 - .../Payments/AuthenticationResultRequest.php | 6 - .../Payments/AuthenticationResultResponse.php | 6 - src/Adyen/Model/Payments/BankAccount.php | 27 - src/Adyen/Model/Payments/BrowserInfo.php | 19 - .../Model/Payments/CancelOrRefundRequest.php | 27 - src/Adyen/Model/Payments/CancelRequest.php | 30 - src/Adyen/Model/Payments/CaptureRequest.php | 33 - src/Adyen/Model/Payments/Card.php | 24 - src/Adyen/Model/Payments/CommonField.php | 6 - .../Model/Payments/DeviceRenderOptions.php | 6 - src/Adyen/Model/Payments/DonationRequest.php | 18 - src/Adyen/Model/Payments/ExternalPlatform.php | 9 - src/Adyen/Model/Payments/ForexQuote.php | 34 - src/Adyen/Model/Payments/FraudCheckResult.php | 5 - .../Payments/FraudCheckResultWrapper.php | 3 - src/Adyen/Model/Payments/FraudResult.php | 4 - src/Adyen/Model/Payments/FundDestination.php | 30 - src/Adyen/Model/Payments/FundSource.php | 18 - src/Adyen/Model/Payments/Installments.php | 5 - src/Adyen/Model/Payments/Mandate.php | 24 - src/Adyen/Model/Payments/MerchantDevice.php | 9 - .../Model/Payments/MerchantRiskIndicator.php | 40 -- .../Model/Payments/ModificationResult.php | 9 - src/Adyen/Model/Payments/Name.php | 6 - src/Adyen/Model/Payments/ObjectSerializer.php | 9 +- src/Adyen/Model/Payments/PaymentRequest.php | 186 +----- src/Adyen/Model/Payments/PaymentRequest3d.php | 131 ---- .../Model/Payments/PaymentRequest3ds2.php | 131 ---- src/Adyen/Model/Payments/PaymentResult.php | 33 - src/Adyen/Model/Payments/Phone.php | 6 - .../Payments/PlatformChargebackLogic.php | 9 - src/Adyen/Model/Payments/Recurring.php | 15 - src/Adyen/Model/Payments/RefundRequest.php | 33 - .../ResponseAdditionalData3DSecure.php | 15 - .../ResponseAdditionalDataBillingAddress.php | 18 - .../Payments/ResponseAdditionalDataCard.php | 24 - .../Payments/ResponseAdditionalDataCommon.php | 177 ------ .../ResponseAdditionalDataDomesticError.php | 6 - .../ResponseAdditionalDataInstallments.php | 36 -- .../ResponseAdditionalDataNetworkTokens.php | 9 - .../Payments/ResponseAdditionalDataOpi.php | 3 - .../Payments/ResponseAdditionalDataSepa.php | 9 - src/Adyen/Model/Payments/SDKEphemPubKey.php | 12 - .../SecureRemoteCommerceCheckoutData.php | 595 ++++++++++++++++++ src/Adyen/Model/Payments/ServiceError.php | 16 - .../Payments/ShopperInteractionDevice.php | 9 - src/Adyen/Model/Payments/Split.php | 15 - src/Adyen/Model/Payments/SplitAmount.php | 6 - src/Adyen/Model/Payments/SubMerchant.php | 15 - .../Model/Payments/TechnicalCancelRequest.php | 30 - src/Adyen/Model/Payments/ThreeDS1Result.php | 18 - .../Model/Payments/ThreeDS2RequestData.php | 115 ---- src/Adyen/Model/Payments/ThreeDS2Result.php | 42 -- .../Model/Payments/ThreeDS2ResultRequest.php | 6 - .../Model/Payments/ThreeDS2ResultResponse.php | 3 - .../ThreeDSRequestorAuthenticationInfo.php | 9 - ...hreeDSRequestorPriorAuthenticationInfo.php | 12 - src/Adyen/Model/Payments/ThreeDSecureData.php | 36 -- .../Payments/VoidPendingRefundRequest.php | 33 - src/Adyen/Model/Payout/Address.php | 18 - src/Adyen/Model/Payout/Amount.php | 6 - src/Adyen/Model/Payout/BankAccount.php | 27 - src/Adyen/Model/Payout/Card.php | 24 - src/Adyen/Model/Payout/FraudCheckResult.php | 5 - .../Model/Payout/FraudCheckResultWrapper.php | 3 - src/Adyen/Model/Payout/FraudResult.php | 4 - src/Adyen/Model/Payout/FundSource.php | 18 - src/Adyen/Model/Payout/ModifyRequest.php | 9 - src/Adyen/Model/Payout/ModifyResponse.php | 9 - src/Adyen/Model/Payout/Name.php | 6 - src/Adyen/Model/Payout/ObjectSerializer.php | 9 +- src/Adyen/Model/Payout/PayoutRequest.php | 40 -- src/Adyen/Model/Payout/PayoutResponse.php | 33 - src/Adyen/Model/Payout/Recurring.php | 15 - .../Payout/ResponseAdditionalData3DSecure.php | 15 - .../ResponseAdditionalDataBillingAddress.php | 18 - .../Payout/ResponseAdditionalDataCard.php | 24 - .../Payout/ResponseAdditionalDataCommon.php | 177 ------ .../ResponseAdditionalDataDomesticError.php | 6 - .../ResponseAdditionalDataInstallments.php | 36 -- .../ResponseAdditionalDataNetworkTokens.php | 9 - .../Payout/ResponseAdditionalDataOpi.php | 3 - .../Payout/ResponseAdditionalDataSepa.php | 9 - src/Adyen/Model/Payout/ServiceError.php | 16 - .../Payout/StoreDetailAndSubmitRequest.php | 55 -- .../Payout/StoreDetailAndSubmitResponse.php | 12 - src/Adyen/Model/Payout/StoreDetailRequest.php | 46 -- .../Model/Payout/StoreDetailResponse.php | 12 - src/Adyen/Model/Payout/SubmitRequest.php | 43 -- src/Adyen/Model/Payout/SubmitResponse.php | 12 - .../Model/PosMobile/CreateSessionRequest.php | 9 - .../Model/PosMobile/CreateSessionResponse.php | 15 - .../Model/PosMobile/ObjectSerializer.php | 9 +- src/Adyen/Model/Recurring/Address.php | 18 - src/Adyen/Model/Recurring/Amount.php | 6 - src/Adyen/Model/Recurring/BankAccount.php | 27 - src/Adyen/Model/Recurring/Card.php | 24 - .../Model/Recurring/CreatePermitRequest.php | 12 - .../Model/Recurring/CreatePermitResult.php | 6 - .../Model/Recurring/DisablePermitRequest.php | 6 - .../Model/Recurring/DisablePermitResult.php | 6 - src/Adyen/Model/Recurring/DisableRequest.php | 12 - src/Adyen/Model/Recurring/DisableResult.php | 3 - src/Adyen/Model/Recurring/Name.php | 6 - .../Model/Recurring/NotifyShopperRequest.php | 27 - .../Model/Recurring/NotifyShopperResult.php | 21 - .../Model/Recurring/ObjectSerializer.php | 9 +- src/Adyen/Model/Recurring/Permit.php | 15 - .../Model/Recurring/PermitRestriction.php | 9 - src/Adyen/Model/Recurring/PermitResult.php | 6 - src/Adyen/Model/Recurring/Recurring.php | 15 - src/Adyen/Model/Recurring/RecurringDetail.php | 51 -- .../Recurring/RecurringDetailWrapper.php | 3 - .../Recurring/RecurringDetailsRequest.php | 9 - .../Recurring/RecurringDetailsResult.php | 12 - .../ScheduleAccountUpdaterRequest.php | 18 - .../ScheduleAccountUpdaterResult.php | 6 - src/Adyen/Model/Recurring/ServiceError.php | 16 - src/Adyen/Model/Recurring/TokenDetails.php | 6 - .../BalancePlatformNotificationResponse.php | 5 +- .../Model/ReportWebhooks/ObjectSerializer.php | 9 +- .../ReportWebhooks/ReportNotificationData.php | 21 - .../ReportNotificationRequest.php | 9 - src/Adyen/Model/ReportWebhooks/Resource.php | 9 - .../ReportWebhooks/ResourceReference.php | 9 - src/Adyen/Model/StoredValue/Amount.php | 6 - .../Model/StoredValue/ObjectSerializer.php | 9 +- src/Adyen/Model/StoredValue/ServiceError.php | 16 - .../StoredValueBalanceCheckRequest.php | 24 - .../StoredValueBalanceCheckResponse.php | 15 - .../StoredValueBalanceMergeRequest.php | 27 - .../StoredValueBalanceMergeResponse.php | 18 - .../StoredValue/StoredValueIssueRequest.php | 24 - .../StoredValue/StoredValueIssueResponse.php | 21 - .../StoredValue/StoredValueLoadRequest.php | 27 - .../StoredValue/StoredValueLoadResponse.php | 18 - .../StoredValueStatusChangeRequest.php | 27 - .../StoredValueStatusChangeResponse.php | 18 - .../StoredValue/StoredValueVoidRequest.php | 18 - .../StoredValue/StoredValueVoidResponse.php | 15 - .../Model/TransactionWebhooks/Amount.php | 6 - .../BalancePlatformNotificationResponse.php | 3 - .../TransactionWebhooks/ObjectSerializer.php | 9 +- .../Model/TransactionWebhooks/Resource.php | 9 - .../TransactionWebhooks/ResourceReference.php | 9 - .../Model/TransactionWebhooks/Transaction.php | 30 - .../TransactionNotificationRequestV4.php | 9 - .../TransactionWebhooks/TransferData.php | 6 - .../AULocalAccountIdentification.php | 9 - .../AdditionalBankIdentification.php | 6 - src/Adyen/Model/TransferWebhooks/Address.php | 18 - src/Adyen/Model/TransferWebhooks/Amount.php | 6 - .../TransferWebhooks/AmountAdjustment.php | 7 - .../BRLocalAccountIdentification.php | 15 - .../TransferWebhooks/BalanceMutation.php | 12 - .../BalancePlatformNotificationResponse.php | 3 - .../Model/TransferWebhooks/BankAccountV3.php | 6 - .../BankAccountV3AccountIdentification.php | 48 -- .../TransferWebhooks/BankCategoryData.php | 6 - .../CALocalAccountIdentification.php | 15 - .../CZLocalAccountIdentification.php | 9 - .../ConfirmationTrackingData.php | 6 - .../Model/TransferWebhooks/CounterpartyV3.php | 12 - .../DKLocalAccountIdentification.php | 9 - .../EstimationTrackingData.php | 6 - .../Model/TransferWebhooks/ExternalReason.php | 9 - .../HKLocalAccountIdentification.php | 9 - .../HULocalAccountIdentification.php | 6 - .../IbanAccountIdentification.php | 6 - .../TransferWebhooks/InternalCategoryData.php | 9 - .../InternalReviewTrackingData.php | 9 - .../Model/TransferWebhooks/IssuedCard.php | 24 - .../Model/TransferWebhooks/MerchantData.php | 15 - .../Model/TransferWebhooks/Modification.php | 15 - .../NOLocalAccountIdentification.php | 6 - .../NZLocalAccountIdentification.php | 6 - .../Model/TransferWebhooks/NameLocation.php | 18 - .../NumberAndBicAccountIdentification.php | 12 - .../TransferWebhooks/ObjectSerializer.php | 9 +- .../PLLocalAccountIdentification.php | 6 - .../TransferWebhooks/PartyIdentification.php | 21 - .../TransferWebhooks/PaymentInstrument.php | 12 - .../TransferWebhooks/PlatformPayment.php | 18 - .../RelayedAuthorisationData.php | 6 - src/Adyen/Model/TransferWebhooks/Resource.php | 9 - .../TransferWebhooks/ResourceReference.php | 9 - .../SELocalAccountIdentification.php | 9 - .../SGLocalAccountIdentification.php | 9 - .../TransactionEventViolation.php | 9 - .../TransactionRuleReference.php | 13 - .../TransactionRuleSource.php | 6 - .../TransactionRulesResult.php | 10 - .../Model/TransferWebhooks/TransferData.php | 66 +- .../TransferDataCategoryData.php | 42 -- .../TransferWebhooks/TransferDataTracking.php | 12 - .../Model/TransferWebhooks/TransferEvent.php | 81 +-- .../TransferEventTrackingData.php | 12 - .../TransferNotificationCounterParty.php | 12 - .../TransferNotificationMerchantData.php | 21 - .../TransferNotificationRequest.php | 9 - .../TransferNotificationValidationFact.php | 6 - .../UKLocalAccountIdentification.php | 9 - .../USLocalAccountIdentification.php | 12 - .../AULocalAccountIdentification.php | 9 - .../AdditionalBankIdentification.php | 6 - src/Adyen/Model/Transfers/Address.php | 18 - src/Adyen/Model/Transfers/Amount.php | 6 - .../Model/Transfers/AmountAdjustment.php | 7 - .../BRLocalAccountIdentification.php | 15 - src/Adyen/Model/Transfers/BalanceMutation.php | 12 - src/Adyen/Model/Transfers/BankAccountV3.php | 6 - .../BankAccountV3AccountIdentification.php | 48 -- .../Model/Transfers/BankCategoryData.php | 6 - .../CALocalAccountIdentification.php | 15 - .../CZLocalAccountIdentification.php | 9 - src/Adyen/Model/Transfers/CapitalBalance.php | 12 - src/Adyen/Model/Transfers/CapitalGrant.php | 27 - .../Model/Transfers/CapitalGrantInfo.php | 9 - src/Adyen/Model/Transfers/CapitalGrants.php | 3 - .../Transfers/ConfirmationTrackingData.php | 6 - src/Adyen/Model/Transfers/Counterparty.php | 9 - .../Model/Transfers/CounterpartyInfoV3.php | 9 - src/Adyen/Model/Transfers/CounterpartyV3.php | 12 - .../DKLocalAccountIdentification.php | 9 - .../Transfers/EstimationTrackingData.php | 6 - src/Adyen/Model/Transfers/ExternalReason.php | 9 - src/Adyen/Model/Transfers/Fee.php | 3 - .../Model/Transfers/FindTransfersResponse.php | 6 - .../HKLocalAccountIdentification.php | 9 - .../HULocalAccountIdentification.php | 6 - .../Transfers/IbanAccountIdentification.php | 6 - .../Model/Transfers/InternalCategoryData.php | 9 - .../Transfers/InternalReviewTrackingData.php | 9 - src/Adyen/Model/Transfers/InvalidField.php | 9 - src/Adyen/Model/Transfers/IssuedCard.php | 24 - src/Adyen/Model/Transfers/Link.php | 3 - src/Adyen/Model/Transfers/Links.php | 6 - src/Adyen/Model/Transfers/MerchantData.php | 15 - src/Adyen/Model/Transfers/Modification.php | 15 - .../NOLocalAccountIdentification.php | 6 - .../NZLocalAccountIdentification.php | 6 - src/Adyen/Model/Transfers/NameLocation.php | 18 - .../NumberAndBicAccountIdentification.php | 12 - .../Model/Transfers/ObjectSerializer.php | 9 +- .../PLLocalAccountIdentification.php | 6 - .../Model/Transfers/PartyIdentification.php | 21 - .../Model/Transfers/PaymentInstrument.php | 12 - src/Adyen/Model/Transfers/PlatformPayment.php | 18 - .../Transfers/RelayedAuthorisationData.php | 6 - src/Adyen/Model/Transfers/Repayment.php | 7 - src/Adyen/Model/Transfers/RepaymentTerm.php | 2 - .../Model/Transfers/ResourceReference.php | 9 - .../Model/Transfers/RestServiceError.php | 25 - .../Model/Transfers/ReturnTransferRequest.php | 6 - .../Transfers/ReturnTransferResponse.php | 12 - src/Adyen/Model/Transfers/RoutingDetails.php | 12 - .../SELocalAccountIdentification.php | 9 - .../SGLocalAccountIdentification.php | 9 - src/Adyen/Model/Transfers/ServiceError.php | 13 - .../Model/Transfers/ThresholdRepayment.php | 3 - src/Adyen/Model/Transfers/Transaction.php | 39 -- .../Transfers/TransactionEventViolation.php | 9 - .../Transfers/TransactionRuleReference.php | 13 - .../Model/Transfers/TransactionRuleSource.php | 6 - .../Transfers/TransactionRulesResult.php | 10 - .../Transfers/TransactionSearchResponse.php | 6 - src/Adyen/Model/Transfers/Transfer.php | 50 +- .../Model/Transfers/TransferCategoryData.php | 42 -- src/Adyen/Model/Transfers/TransferData.php | 66 +- .../Model/Transfers/TransferDataTracking.php | 12 - src/Adyen/Model/Transfers/TransferEvent.php | 81 +-- .../Transfers/TransferEventTrackingData.php | 12 - src/Adyen/Model/Transfers/TransferInfo.php | 100 ++- .../TransferNotificationCounterParty.php | 12 - .../TransferNotificationMerchantData.php | 21 - .../TransferNotificationValidationFact.php | 6 - .../TransferServiceRestServiceError.php | 28 - src/Adyen/Model/Transfers/TransferView.php | 9 - .../UKLocalAccountIdentification.php | 9 - .../USLocalAccountIdentification.php | 12 - .../Transfers/UltimatePartyIdentification.php | 21 - .../BalancePlatform/BalanceAccountsApi.php | 3 +- .../BankAccountValidationApi.php | 3 +- .../BalancePlatform/ManageSCADevicesApi.php | 3 +- .../BalancePlatform/NetworkTokensApi.php | 3 +- .../Service/Checkout/ModificationsApi.php | 32 +- src/Adyen/Service/Checkout/OrdersApi.php | 30 +- .../Service/Checkout/PaymentLinksApi.php | 22 +- src/Adyen/Service/Checkout/PaymentsApi.php | 30 +- src/Adyen/Service/Checkout/RecurringApi.php | 3 +- .../BusinessLinesApi.php | 3 +- .../LegalEntityManagement/DocumentsApi.php | 3 +- .../TransferInstrumentsApi.php | 3 +- .../AllowedOriginsCompanyLevelApi.php | 3 +- .../AllowedOriginsMerchantLevelApi.php | 3 +- .../Service/Management/MyAPICredentialApi.php | 3 +- .../PaymentMethodsMerchantLevelApi.php | 3 +- .../PayoutSettingsMerchantLevelApi.php | 3 +- .../Management/TerminalsTerminalLevelApi.php | 3 +- .../Management/WebhooksCompanyLevelApi.php | 3 +- .../Management/WebhooksMerchantLevelApi.php | 3 +- 881 files changed, 1641 insertions(+), 13262 deletions(-) create mode 100644 src/Adyen/Model/BalancePlatform/MatchingValuesRestriction.php create mode 100644 src/Adyen/Model/Payments/SecureRemoteCommerceCheckoutData.php diff --git a/src/Adyen/Model/AcsWebhooks/Amount.php b/src/Adyen/Model/AcsWebhooks/Amount.php index e12296bd7..ef0eef5a5 100644 --- a/src/Adyen/Model/AcsWebhooks/Amount.php +++ b/src/Adyen/Model/AcsWebhooks/Amount.php @@ -308,9 +308,6 @@ public function getCurrency() */ public function setCurrency($currency) { - if (is_null($currency)) { - throw new \InvalidArgumentException('non-nullable currency cannot be null'); - } $this->container['currency'] = $currency; return $this; @@ -335,9 +332,6 @@ public function getValue() */ public function setValue($value) { - if (is_null($value)) { - throw new \InvalidArgumentException('non-nullable value cannot be null'); - } $this->container['value'] = $value; return $this; diff --git a/src/Adyen/Model/AcsWebhooks/AuthenticationInfo.php b/src/Adyen/Model/AcsWebhooks/AuthenticationInfo.php index c5c68a38e..1283bde43 100644 --- a/src/Adyen/Model/AcsWebhooks/AuthenticationInfo.php +++ b/src/Adyen/Model/AcsWebhooks/AuthenticationInfo.php @@ -687,9 +687,6 @@ public function getAcsTransId() */ public function setAcsTransId($acsTransId) { - if (is_null($acsTransId)) { - throw new \InvalidArgumentException('non-nullable acsTransId cannot be null'); - } $this->container['acsTransId'] = $acsTransId; return $this; @@ -714,9 +711,6 @@ public function getChallenge() */ public function setChallenge($challenge) { - if (is_null($challenge)) { - throw new \InvalidArgumentException('non-nullable challenge cannot be null'); - } $this->container['challenge'] = $challenge; return $this; @@ -741,9 +735,6 @@ public function getChallengeIndicator() */ 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( @@ -778,9 +769,6 @@ public function getCreatedAt() */ public function setCreatedAt($createdAt) { - if (is_null($createdAt)) { - throw new \InvalidArgumentException('non-nullable createdAt cannot be null'); - } $this->container['createdAt'] = $createdAt; return $this; @@ -805,9 +793,6 @@ public function getDeviceChannel() */ 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( @@ -842,9 +827,6 @@ public function getDsTransID() */ public function setDsTransID($dsTransID) { - if (is_null($dsTransID)) { - throw new \InvalidArgumentException('non-nullable dsTransID cannot be null'); - } $this->container['dsTransID'] = $dsTransID; return $this; @@ -869,9 +851,6 @@ public function getExemptionIndicator() */ 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( @@ -906,9 +885,6 @@ public function getInPSD2Scope() */ public function setInPSD2Scope($inPSD2Scope) { - if (is_null($inPSD2Scope)) { - throw new \InvalidArgumentException('non-nullable inPSD2Scope cannot be null'); - } $this->container['inPSD2Scope'] = $inPSD2Scope; return $this; @@ -933,9 +909,6 @@ public function getMessageCategory() */ 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( @@ -970,9 +943,6 @@ public function getMessageVersion() */ public function setMessageVersion($messageVersion) { - if (is_null($messageVersion)) { - throw new \InvalidArgumentException('non-nullable messageVersion cannot be null'); - } $this->container['messageVersion'] = $messageVersion; return $this; @@ -997,7 +967,6 @@ public function getRiskScore() */ public function setRiskScore($riskScore) { - // Do nothing for nullable integers $this->container['riskScore'] = $riskScore; return $this; @@ -1022,9 +991,6 @@ public function getThreeDSServerTransID() */ public function setThreeDSServerTransID($threeDSServerTransID) { - if (is_null($threeDSServerTransID)) { - throw new \InvalidArgumentException('non-nullable threeDSServerTransID cannot be null'); - } $this->container['threeDSServerTransID'] = $threeDSServerTransID; return $this; @@ -1049,9 +1015,6 @@ public function getTransStatus() */ 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( @@ -1086,9 +1049,6 @@ public function getTransStatusReason() */ 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( @@ -1123,9 +1083,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/AcsWebhooks/AuthenticationNotificationData.php b/src/Adyen/Model/AcsWebhooks/AuthenticationNotificationData.php index 969d296f6..cff5960e9 100644 --- a/src/Adyen/Model/AcsWebhooks/AuthenticationNotificationData.php +++ b/src/Adyen/Model/AcsWebhooks/AuthenticationNotificationData.php @@ -370,9 +370,6 @@ public function getAuthentication() */ public function setAuthentication($authentication) { - if (is_null($authentication)) { - throw new \InvalidArgumentException('non-nullable authentication cannot be null'); - } $this->container['authentication'] = $authentication; return $this; @@ -397,9 +394,6 @@ public function getBalancePlatform() */ public function setBalancePlatform($balancePlatform) { - if (is_null($balancePlatform)) { - throw new \InvalidArgumentException('non-nullable balancePlatform cannot be null'); - } $this->container['balancePlatform'] = $balancePlatform; return $this; @@ -424,9 +418,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -451,9 +442,6 @@ public function getPaymentInstrumentId() */ public function setPaymentInstrumentId($paymentInstrumentId) { - if (is_null($paymentInstrumentId)) { - throw new \InvalidArgumentException('non-nullable paymentInstrumentId cannot be null'); - } $this->container['paymentInstrumentId'] = $paymentInstrumentId; return $this; @@ -478,9 +466,6 @@ public function getPurchase() */ public function setPurchase($purchase) { - if (is_null($purchase)) { - throw new \InvalidArgumentException('non-nullable purchase cannot be null'); - } $this->container['purchase'] = $purchase; return $this; @@ -505,9 +490,6 @@ public function getStatus() */ 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( diff --git a/src/Adyen/Model/AcsWebhooks/AuthenticationNotificationRequest.php b/src/Adyen/Model/AcsWebhooks/AuthenticationNotificationRequest.php index a8debe217..84be4d642 100644 --- a/src/Adyen/Model/AcsWebhooks/AuthenticationNotificationRequest.php +++ b/src/Adyen/Model/AcsWebhooks/AuthenticationNotificationRequest.php @@ -339,9 +339,6 @@ public function getData() */ public function setData($data) { - if (is_null($data)) { - throw new \InvalidArgumentException('non-nullable data cannot be null'); - } $this->container['data'] = $data; return $this; @@ -366,9 +363,6 @@ public function getEnvironment() */ public function setEnvironment($environment) { - if (is_null($environment)) { - throw new \InvalidArgumentException('non-nullable environment cannot be null'); - } $this->container['environment'] = $environment; return $this; @@ -393,9 +387,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/AcsWebhooks/BalancePlatformNotificationResponse.php b/src/Adyen/Model/AcsWebhooks/BalancePlatformNotificationResponse.php index a7c82cbac..79807e1f2 100644 --- a/src/Adyen/Model/AcsWebhooks/BalancePlatformNotificationResponse.php +++ b/src/Adyen/Model/AcsWebhooks/BalancePlatformNotificationResponse.php @@ -295,9 +295,6 @@ public function getNotificationResponse() */ public function setNotificationResponse($notificationResponse) { - if (is_null($notificationResponse)) { - throw new \InvalidArgumentException('non-nullable notificationResponse cannot be null'); - } $this->container['notificationResponse'] = $notificationResponse; return $this; diff --git a/src/Adyen/Model/AcsWebhooks/ChallengeInfo.php b/src/Adyen/Model/AcsWebhooks/ChallengeInfo.php index 9d0bec437..f65103eb3 100644 --- a/src/Adyen/Model/AcsWebhooks/ChallengeInfo.php +++ b/src/Adyen/Model/AcsWebhooks/ChallengeInfo.php @@ -392,9 +392,6 @@ public function getChallengeCancel() */ 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( @@ -429,9 +426,6 @@ public function getFlow() */ 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( @@ -466,9 +460,6 @@ public function getLastInteraction() */ public function setLastInteraction($lastInteraction) { - if (is_null($lastInteraction)) { - throw new \InvalidArgumentException('non-nullable lastInteraction cannot be null'); - } $this->container['lastInteraction'] = $lastInteraction; return $this; @@ -493,9 +484,6 @@ public function getPhoneNumber() */ public function setPhoneNumber($phoneNumber) { - if (is_null($phoneNumber)) { - throw new \InvalidArgumentException('non-nullable phoneNumber cannot be null'); - } $this->container['phoneNumber'] = $phoneNumber; return $this; @@ -520,7 +508,6 @@ public function getResends() */ public function setResends($resends) { - // Do nothing for nullable integers $this->container['resends'] = $resends; return $this; @@ -545,7 +532,6 @@ public function getRetries() */ public function setRetries($retries) { - // Do nothing for nullable integers $this->container['retries'] = $retries; return $this; diff --git a/src/Adyen/Model/AcsWebhooks/ObjectSerializer.php b/src/Adyen/Model/AcsWebhooks/ObjectSerializer.php index 755ed1ce8..e14421342 100644 --- a/src/Adyen/Model/AcsWebhooks/ObjectSerializer.php +++ b/src/Adyen/Model/AcsWebhooks/ObjectSerializer.php @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach ($data as $property => $value) { + foreach($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) { - return $timestamp; - } + if (!is_string($timestamp)) return $timestamp; return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/AcsWebhooks/PurchaseInfo.php b/src/Adyen/Model/AcsWebhooks/PurchaseInfo.php index 529529cd1..cb719b397 100644 --- a/src/Adyen/Model/AcsWebhooks/PurchaseInfo.php +++ b/src/Adyen/Model/AcsWebhooks/PurchaseInfo.php @@ -318,9 +318,6 @@ public function getDate() */ public function setDate($date) { - if (is_null($date)) { - throw new \InvalidArgumentException('non-nullable date cannot be null'); - } $this->container['date'] = $date; return $this; @@ -345,9 +342,6 @@ public function getMerchantName() */ public function setMerchantName($merchantName) { - if (is_null($merchantName)) { - throw new \InvalidArgumentException('non-nullable merchantName cannot be null'); - } $this->container['merchantName'] = $merchantName; return $this; @@ -372,9 +366,6 @@ public function getOriginalAmount() */ public function setOriginalAmount($originalAmount) { - if (is_null($originalAmount)) { - throw new \InvalidArgumentException('non-nullable originalAmount cannot be null'); - } $this->container['originalAmount'] = $originalAmount; return $this; diff --git a/src/Adyen/Model/AcsWebhooks/Resource.php b/src/Adyen/Model/AcsWebhooks/Resource.php index a8124707d..135a335e0 100644 --- a/src/Adyen/Model/AcsWebhooks/Resource.php +++ b/src/Adyen/Model/AcsWebhooks/Resource.php @@ -309,9 +309,6 @@ public function getBalancePlatform() */ public function setBalancePlatform($balancePlatform) { - if (is_null($balancePlatform)) { - throw new \InvalidArgumentException('non-nullable balancePlatform cannot be null'); - } $this->container['balancePlatform'] = $balancePlatform; return $this; @@ -336,9 +333,6 @@ public function getCreationDate() */ public function setCreationDate($creationDate) { - if (is_null($creationDate)) { - throw new \InvalidArgumentException('non-nullable creationDate cannot be null'); - } $this->container['creationDate'] = $creationDate; return $this; @@ -363,9 +357,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; diff --git a/src/Adyen/Model/BalanceControl/Amount.php b/src/Adyen/Model/BalanceControl/Amount.php index c2e1abec5..be630f40d 100644 --- a/src/Adyen/Model/BalanceControl/Amount.php +++ b/src/Adyen/Model/BalanceControl/Amount.php @@ -308,9 +308,6 @@ public function getCurrency() */ public function setCurrency($currency) { - if (is_null($currency)) { - throw new \InvalidArgumentException('non-nullable currency cannot be null'); - } $this->container['currency'] = $currency; return $this; @@ -335,9 +332,6 @@ public function getValue() */ public function setValue($value) { - if (is_null($value)) { - throw new \InvalidArgumentException('non-nullable value cannot be null'); - } $this->container['value'] = $value; return $this; diff --git a/src/Adyen/Model/BalanceControl/BalanceTransferRequest.php b/src/Adyen/Model/BalanceControl/BalanceTransferRequest.php index b6813a764..cc327c552 100644 --- a/src/Adyen/Model/BalanceControl/BalanceTransferRequest.php +++ b/src/Adyen/Model/BalanceControl/BalanceTransferRequest.php @@ -373,9 +373,6 @@ public function getAmount() */ public function setAmount($amount) { - if (is_null($amount)) { - throw new \InvalidArgumentException('non-nullable amount cannot be null'); - } $this->container['amount'] = $amount; return $this; @@ -400,9 +397,6 @@ public function getDescription() */ public function setDescription($description) { - if (is_null($description)) { - throw new \InvalidArgumentException('non-nullable description cannot be null'); - } $this->container['description'] = $description; return $this; @@ -427,9 +421,6 @@ public function getFromMerchant() */ public function setFromMerchant($fromMerchant) { - if (is_null($fromMerchant)) { - throw new \InvalidArgumentException('non-nullable fromMerchant cannot be null'); - } $this->container['fromMerchant'] = $fromMerchant; return $this; @@ -454,9 +445,6 @@ public function getReference() */ public function setReference($reference) { - if (is_null($reference)) { - throw new \InvalidArgumentException('non-nullable reference cannot be null'); - } $this->container['reference'] = $reference; return $this; @@ -481,9 +469,6 @@ public function getToMerchant() */ public function setToMerchant($toMerchant) { - if (is_null($toMerchant)) { - throw new \InvalidArgumentException('non-nullable toMerchant cannot be null'); - } $this->container['toMerchant'] = $toMerchant; return $this; @@ -508,9 +493,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/BalanceControl/BalanceTransferResponse.php b/src/Adyen/Model/BalanceControl/BalanceTransferResponse.php index c4fee3b83..63f438b80 100644 --- a/src/Adyen/Model/BalanceControl/BalanceTransferResponse.php +++ b/src/Adyen/Model/BalanceControl/BalanceTransferResponse.php @@ -430,9 +430,6 @@ public function getAmount() */ public function setAmount($amount) { - if (is_null($amount)) { - throw new \InvalidArgumentException('non-nullable amount cannot be null'); - } $this->container['amount'] = $amount; return $this; @@ -457,9 +454,6 @@ public function getCreatedAt() */ public function setCreatedAt($createdAt) { - if (is_null($createdAt)) { - throw new \InvalidArgumentException('non-nullable createdAt cannot be null'); - } $this->container['createdAt'] = $createdAt; return $this; @@ -484,9 +478,6 @@ public function getDescription() */ public function setDescription($description) { - if (is_null($description)) { - throw new \InvalidArgumentException('non-nullable description cannot be null'); - } $this->container['description'] = $description; return $this; @@ -511,9 +502,6 @@ public function getFromMerchant() */ public function setFromMerchant($fromMerchant) { - if (is_null($fromMerchant)) { - throw new \InvalidArgumentException('non-nullable fromMerchant cannot be null'); - } $this->container['fromMerchant'] = $fromMerchant; return $this; @@ -538,9 +526,6 @@ public function getPspReference() */ public function setPspReference($pspReference) { - if (is_null($pspReference)) { - throw new \InvalidArgumentException('non-nullable pspReference cannot be null'); - } $this->container['pspReference'] = $pspReference; return $this; @@ -565,9 +550,6 @@ public function getReference() */ public function setReference($reference) { - if (is_null($reference)) { - throw new \InvalidArgumentException('non-nullable reference cannot be null'); - } $this->container['reference'] = $reference; return $this; @@ -592,9 +574,6 @@ public function getStatus() */ 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( @@ -629,9 +608,6 @@ public function getToMerchant() */ public function setToMerchant($toMerchant) { - if (is_null($toMerchant)) { - throw new \InvalidArgumentException('non-nullable toMerchant cannot be null'); - } $this->container['toMerchant'] = $toMerchant; return $this; @@ -656,9 +632,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/BalanceControl/ObjectSerializer.php b/src/Adyen/Model/BalanceControl/ObjectSerializer.php index b5ae3313d..2ed0eb3a0 100644 --- a/src/Adyen/Model/BalanceControl/ObjectSerializer.php +++ b/src/Adyen/Model/BalanceControl/ObjectSerializer.php @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach ($data as $property => $value) { + foreach($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) { - return $timestamp; - } + if (!is_string($timestamp)) return $timestamp; return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/BalancePlatform/AULocalAccountIdentification.php b/src/Adyen/Model/BalancePlatform/AULocalAccountIdentification.php index 7551f02ce..634359aa4 100644 --- a/src/Adyen/Model/BalancePlatform/AULocalAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/AULocalAccountIdentification.php @@ -339,9 +339,6 @@ public function getAccountNumber() */ public function setAccountNumber($accountNumber) { - if (is_null($accountNumber)) { - throw new \InvalidArgumentException('non-nullable accountNumber cannot be null'); - } $this->container['accountNumber'] = $accountNumber; return $this; @@ -366,9 +363,6 @@ public function getBsbCode() */ public function setBsbCode($bsbCode) { - if (is_null($bsbCode)) { - throw new \InvalidArgumentException('non-nullable bsbCode cannot be null'); - } $this->container['bsbCode'] = $bsbCode; return $this; @@ -393,9 +387,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/BalancePlatform/AccountHolder.php b/src/Adyen/Model/BalancePlatform/AccountHolder.php index 344d0582c..aa990b8da 100644 --- a/src/Adyen/Model/BalancePlatform/AccountHolder.php +++ b/src/Adyen/Model/BalancePlatform/AccountHolder.php @@ -410,9 +410,6 @@ public function getBalancePlatform() */ public function setBalancePlatform($balancePlatform) { - if (is_null($balancePlatform)) { - throw new \InvalidArgumentException('non-nullable balancePlatform cannot be null'); - } $this->container['balancePlatform'] = $balancePlatform; return $this; @@ -437,9 +434,6 @@ public function getCapabilities() */ public function setCapabilities($capabilities) { - if (is_null($capabilities)) { - throw new \InvalidArgumentException('non-nullable capabilities cannot be null'); - } $this->container['capabilities'] = $capabilities; return $this; @@ -449,6 +443,7 @@ public function setCapabilities($capabilities) * Gets contactDetails * * @return \Adyen\Model\BalancePlatform\ContactDetails|null + * @deprecated */ public function getContactDetails() { @@ -461,12 +456,10 @@ public function getContactDetails() * @param \Adyen\Model\BalancePlatform\ContactDetails|null $contactDetails contactDetails * * @return self + * @deprecated */ public function setContactDetails($contactDetails) { - if (is_null($contactDetails)) { - throw new \InvalidArgumentException('non-nullable contactDetails cannot be null'); - } $this->container['contactDetails'] = $contactDetails; return $this; @@ -491,9 +484,6 @@ public function getDescription() */ public function setDescription($description) { - if (is_null($description)) { - throw new \InvalidArgumentException('non-nullable description cannot be null'); - } $this->container['description'] = $description; return $this; @@ -518,9 +508,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -545,9 +532,6 @@ public function getLegalEntityId() */ public function setLegalEntityId($legalEntityId) { - if (is_null($legalEntityId)) { - throw new \InvalidArgumentException('non-nullable legalEntityId cannot be null'); - } $this->container['legalEntityId'] = $legalEntityId; return $this; @@ -572,9 +556,6 @@ public function getMetadata() */ public function setMetadata($metadata) { - if (is_null($metadata)) { - throw new \InvalidArgumentException('non-nullable metadata cannot be null'); - } $this->container['metadata'] = $metadata; return $this; @@ -599,9 +580,6 @@ public function getMigratedAccountHolderCode() */ public function setMigratedAccountHolderCode($migratedAccountHolderCode) { - if (is_null($migratedAccountHolderCode)) { - throw new \InvalidArgumentException('non-nullable migratedAccountHolderCode cannot be null'); - } $this->container['migratedAccountHolderCode'] = $migratedAccountHolderCode; return $this; @@ -626,9 +604,6 @@ public function getPrimaryBalanceAccount() */ public function setPrimaryBalanceAccount($primaryBalanceAccount) { - if (is_null($primaryBalanceAccount)) { - throw new \InvalidArgumentException('non-nullable primaryBalanceAccount cannot be null'); - } $this->container['primaryBalanceAccount'] = $primaryBalanceAccount; return $this; @@ -653,9 +628,6 @@ public function getReference() */ public function setReference($reference) { - if (is_null($reference)) { - throw new \InvalidArgumentException('non-nullable reference cannot be null'); - } $this->container['reference'] = $reference; return $this; @@ -680,9 +652,6 @@ public function getStatus() */ 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( @@ -717,9 +686,6 @@ public function getTimeZone() */ public function setTimeZone($timeZone) { - if (is_null($timeZone)) { - throw new \InvalidArgumentException('non-nullable timeZone cannot be null'); - } $this->container['timeZone'] = $timeZone; return $this; @@ -744,9 +710,6 @@ public function getVerificationDeadlines() */ public function setVerificationDeadlines($verificationDeadlines) { - if (is_null($verificationDeadlines)) { - throw new \InvalidArgumentException('non-nullable verificationDeadlines cannot be null'); - } $this->container['verificationDeadlines'] = $verificationDeadlines; return $this; diff --git a/src/Adyen/Model/BalancePlatform/AccountHolderCapability.php b/src/Adyen/Model/BalancePlatform/AccountHolderCapability.php index 92661ef46..f8202f7fa 100644 --- a/src/Adyen/Model/BalancePlatform/AccountHolderCapability.php +++ b/src/Adyen/Model/BalancePlatform/AccountHolderCapability.php @@ -439,9 +439,6 @@ public function getAllowed() */ public function setAllowed($allowed) { - if (is_null($allowed)) { - throw new \InvalidArgumentException('non-nullable allowed cannot be null'); - } $this->container['allowed'] = $allowed; return $this; @@ -466,9 +463,6 @@ public function getAllowedLevel() */ 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( @@ -503,9 +497,6 @@ public function getAllowedSettings() */ public function setAllowedSettings($allowedSettings) { - if (is_null($allowedSettings)) { - throw new \InvalidArgumentException('non-nullable allowedSettings cannot be null'); - } $this->container['allowedSettings'] = $allowedSettings; return $this; @@ -530,9 +521,6 @@ public function getEnabled() */ public function setEnabled($enabled) { - if (is_null($enabled)) { - throw new \InvalidArgumentException('non-nullable enabled cannot be null'); - } $this->container['enabled'] = $enabled; return $this; @@ -557,9 +545,6 @@ public function getProblems() */ public function setProblems($problems) { - if (is_null($problems)) { - throw new \InvalidArgumentException('non-nullable problems cannot be null'); - } $this->container['problems'] = $problems; return $this; @@ -584,9 +569,6 @@ public function getRequested() */ public function setRequested($requested) { - if (is_null($requested)) { - throw new \InvalidArgumentException('non-nullable requested cannot be null'); - } $this->container['requested'] = $requested; return $this; @@ -611,9 +593,6 @@ public function getRequestedLevel() */ 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( @@ -648,9 +627,6 @@ public function getRequestedSettings() */ public function setRequestedSettings($requestedSettings) { - if (is_null($requestedSettings)) { - throw new \InvalidArgumentException('non-nullable requestedSettings cannot be null'); - } $this->container['requestedSettings'] = $requestedSettings; return $this; @@ -675,9 +651,6 @@ public function getTransferInstruments() */ public function setTransferInstruments($transferInstruments) { - if (is_null($transferInstruments)) { - throw new \InvalidArgumentException('non-nullable transferInstruments cannot be null'); - } $this->container['transferInstruments'] = $transferInstruments; return $this; @@ -702,9 +675,6 @@ public function getVerificationStatus() */ 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( diff --git a/src/Adyen/Model/BalancePlatform/AccountHolderInfo.php b/src/Adyen/Model/BalancePlatform/AccountHolderInfo.php index e8b2a6f0a..03ff71bf6 100644 --- a/src/Adyen/Model/BalancePlatform/AccountHolderInfo.php +++ b/src/Adyen/Model/BalancePlatform/AccountHolderInfo.php @@ -354,9 +354,6 @@ public function getBalancePlatform() */ public function setBalancePlatform($balancePlatform) { - if (is_null($balancePlatform)) { - throw new \InvalidArgumentException('non-nullable balancePlatform cannot be null'); - } $this->container['balancePlatform'] = $balancePlatform; return $this; @@ -381,9 +378,6 @@ public function getCapabilities() */ public function setCapabilities($capabilities) { - if (is_null($capabilities)) { - throw new \InvalidArgumentException('non-nullable capabilities cannot be null'); - } $this->container['capabilities'] = $capabilities; return $this; @@ -393,6 +387,7 @@ public function setCapabilities($capabilities) * Gets contactDetails * * @return \Adyen\Model\BalancePlatform\ContactDetails|null + * @deprecated */ public function getContactDetails() { @@ -405,12 +400,10 @@ public function getContactDetails() * @param \Adyen\Model\BalancePlatform\ContactDetails|null $contactDetails contactDetails * * @return self + * @deprecated */ public function setContactDetails($contactDetails) { - if (is_null($contactDetails)) { - throw new \InvalidArgumentException('non-nullable contactDetails cannot be null'); - } $this->container['contactDetails'] = $contactDetails; return $this; @@ -435,9 +428,6 @@ public function getDescription() */ public function setDescription($description) { - if (is_null($description)) { - throw new \InvalidArgumentException('non-nullable description cannot be null'); - } $this->container['description'] = $description; return $this; @@ -462,9 +452,6 @@ public function getLegalEntityId() */ public function setLegalEntityId($legalEntityId) { - if (is_null($legalEntityId)) { - throw new \InvalidArgumentException('non-nullable legalEntityId cannot be null'); - } $this->container['legalEntityId'] = $legalEntityId; return $this; @@ -489,9 +476,6 @@ public function getMetadata() */ public function setMetadata($metadata) { - if (is_null($metadata)) { - throw new \InvalidArgumentException('non-nullable metadata cannot be null'); - } $this->container['metadata'] = $metadata; return $this; @@ -516,9 +500,6 @@ public function getMigratedAccountHolderCode() */ public function setMigratedAccountHolderCode($migratedAccountHolderCode) { - if (is_null($migratedAccountHolderCode)) { - throw new \InvalidArgumentException('non-nullable migratedAccountHolderCode cannot be null'); - } $this->container['migratedAccountHolderCode'] = $migratedAccountHolderCode; return $this; @@ -543,9 +524,6 @@ public function getReference() */ public function setReference($reference) { - if (is_null($reference)) { - throw new \InvalidArgumentException('non-nullable reference cannot be null'); - } $this->container['reference'] = $reference; return $this; @@ -570,9 +548,6 @@ public function getTimeZone() */ public function setTimeZone($timeZone) { - if (is_null($timeZone)) { - throw new \InvalidArgumentException('non-nullable timeZone cannot be null'); - } $this->container['timeZone'] = $timeZone; return $this; diff --git a/src/Adyen/Model/BalancePlatform/AccountHolderUpdateRequest.php b/src/Adyen/Model/BalancePlatform/AccountHolderUpdateRequest.php index c65d306d5..6f306b283 100644 --- a/src/Adyen/Model/BalancePlatform/AccountHolderUpdateRequest.php +++ b/src/Adyen/Model/BalancePlatform/AccountHolderUpdateRequest.php @@ -390,9 +390,6 @@ public function getBalancePlatform() */ public function setBalancePlatform($balancePlatform) { - if (is_null($balancePlatform)) { - throw new \InvalidArgumentException('non-nullable balancePlatform cannot be null'); - } $this->container['balancePlatform'] = $balancePlatform; return $this; @@ -417,9 +414,6 @@ public function getCapabilities() */ public function setCapabilities($capabilities) { - if (is_null($capabilities)) { - throw new \InvalidArgumentException('non-nullable capabilities cannot be null'); - } $this->container['capabilities'] = $capabilities; return $this; @@ -429,6 +423,7 @@ public function setCapabilities($capabilities) * Gets contactDetails * * @return \Adyen\Model\BalancePlatform\ContactDetails|null + * @deprecated */ public function getContactDetails() { @@ -441,12 +436,10 @@ public function getContactDetails() * @param \Adyen\Model\BalancePlatform\ContactDetails|null $contactDetails contactDetails * * @return self + * @deprecated */ public function setContactDetails($contactDetails) { - if (is_null($contactDetails)) { - throw new \InvalidArgumentException('non-nullable contactDetails cannot be null'); - } $this->container['contactDetails'] = $contactDetails; return $this; @@ -471,9 +464,6 @@ public function getDescription() */ public function setDescription($description) { - if (is_null($description)) { - throw new \InvalidArgumentException('non-nullable description cannot be null'); - } $this->container['description'] = $description; return $this; @@ -498,9 +488,6 @@ public function getMetadata() */ public function setMetadata($metadata) { - if (is_null($metadata)) { - throw new \InvalidArgumentException('non-nullable metadata cannot be null'); - } $this->container['metadata'] = $metadata; return $this; @@ -525,9 +512,6 @@ public function getMigratedAccountHolderCode() */ public function setMigratedAccountHolderCode($migratedAccountHolderCode) { - if (is_null($migratedAccountHolderCode)) { - throw new \InvalidArgumentException('non-nullable migratedAccountHolderCode cannot be null'); - } $this->container['migratedAccountHolderCode'] = $migratedAccountHolderCode; return $this; @@ -552,9 +536,6 @@ public function getPrimaryBalanceAccount() */ public function setPrimaryBalanceAccount($primaryBalanceAccount) { - if (is_null($primaryBalanceAccount)) { - throw new \InvalidArgumentException('non-nullable primaryBalanceAccount cannot be null'); - } $this->container['primaryBalanceAccount'] = $primaryBalanceAccount; return $this; @@ -579,9 +560,6 @@ public function getReference() */ public function setReference($reference) { - if (is_null($reference)) { - throw new \InvalidArgumentException('non-nullable reference cannot be null'); - } $this->container['reference'] = $reference; return $this; @@ -606,9 +584,6 @@ public function getStatus() */ 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( @@ -643,9 +618,6 @@ public function getTimeZone() */ public function setTimeZone($timeZone) { - if (is_null($timeZone)) { - throw new \InvalidArgumentException('non-nullable timeZone cannot be null'); - } $this->container['timeZone'] = $timeZone; return $this; @@ -670,9 +642,6 @@ public function getVerificationDeadlines() */ public function setVerificationDeadlines($verificationDeadlines) { - if (is_null($verificationDeadlines)) { - throw new \InvalidArgumentException('non-nullable verificationDeadlines cannot be null'); - } $this->container['verificationDeadlines'] = $verificationDeadlines; return $this; diff --git a/src/Adyen/Model/BalancePlatform/AccountSupportingEntityCapability.php b/src/Adyen/Model/BalancePlatform/AccountSupportingEntityCapability.php index a5d5a405e..3042f9751 100644 --- a/src/Adyen/Model/BalancePlatform/AccountSupportingEntityCapability.php +++ b/src/Adyen/Model/BalancePlatform/AccountSupportingEntityCapability.php @@ -418,9 +418,6 @@ public function getAllowed() */ public function setAllowed($allowed) { - if (is_null($allowed)) { - throw new \InvalidArgumentException('non-nullable allowed cannot be null'); - } $this->container['allowed'] = $allowed; return $this; @@ -445,9 +442,6 @@ public function getAllowedLevel() */ 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( @@ -482,9 +476,6 @@ public function getEnabled() */ public function setEnabled($enabled) { - if (is_null($enabled)) { - throw new \InvalidArgumentException('non-nullable enabled cannot be null'); - } $this->container['enabled'] = $enabled; return $this; @@ -509,9 +500,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -536,9 +524,6 @@ public function getRequested() */ public function setRequested($requested) { - if (is_null($requested)) { - throw new \InvalidArgumentException('non-nullable requested cannot be null'); - } $this->container['requested'] = $requested; return $this; @@ -563,9 +548,6 @@ public function getRequestedLevel() */ 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( @@ -600,9 +582,6 @@ public function getVerificationStatus() */ 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( diff --git a/src/Adyen/Model/BalancePlatform/ActiveNetworkTokensRestriction.php b/src/Adyen/Model/BalancePlatform/ActiveNetworkTokensRestriction.php index 600f95997..e9f52cbb6 100644 --- a/src/Adyen/Model/BalancePlatform/ActiveNetworkTokensRestriction.php +++ b/src/Adyen/Model/BalancePlatform/ActiveNetworkTokensRestriction.php @@ -305,9 +305,6 @@ public function getOperation() */ public function setOperation($operation) { - if (is_null($operation)) { - throw new \InvalidArgumentException('non-nullable operation cannot be null'); - } $this->container['operation'] = $operation; return $this; @@ -332,7 +329,6 @@ public function getValue() */ public function setValue($value) { - // Do nothing for nullable integers $this->container['value'] = $value; return $this; diff --git a/src/Adyen/Model/BalancePlatform/AdditionalBankIdentification.php b/src/Adyen/Model/BalancePlatform/AdditionalBankIdentification.php index fd0fa490c..3aaf08268 100644 --- a/src/Adyen/Model/BalancePlatform/AdditionalBankIdentification.php +++ b/src/Adyen/Model/BalancePlatform/AdditionalBankIdentification.php @@ -325,9 +325,6 @@ public function getCode() */ public function setCode($code) { - if (is_null($code)) { - throw new \InvalidArgumentException('non-nullable code cannot be null'); - } $this->container['code'] = $code; return $this; @@ -352,9 +349,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/BalancePlatform/Address.php b/src/Adyen/Model/BalancePlatform/Address.php index 6311d2f53..128c5fc1d 100644 --- a/src/Adyen/Model/BalancePlatform/Address.php +++ b/src/Adyen/Model/BalancePlatform/Address.php @@ -345,9 +345,6 @@ public function getCity() */ public function setCity($city) { - if (is_null($city)) { - throw new \InvalidArgumentException('non-nullable city cannot be null'); - } $this->container['city'] = $city; return $this; @@ -372,9 +369,6 @@ public function getCountry() */ public function setCountry($country) { - if (is_null($country)) { - throw new \InvalidArgumentException('non-nullable country cannot be null'); - } $this->container['country'] = $country; return $this; @@ -399,9 +393,6 @@ public function getHouseNumberOrName() */ public function setHouseNumberOrName($houseNumberOrName) { - if (is_null($houseNumberOrName)) { - throw new \InvalidArgumentException('non-nullable houseNumberOrName cannot be null'); - } $this->container['houseNumberOrName'] = $houseNumberOrName; return $this; @@ -426,9 +417,6 @@ public function getPostalCode() */ public function setPostalCode($postalCode) { - if (is_null($postalCode)) { - throw new \InvalidArgumentException('non-nullable postalCode cannot be null'); - } $this->container['postalCode'] = $postalCode; return $this; @@ -453,9 +441,6 @@ public function getStateOrProvince() */ public function setStateOrProvince($stateOrProvince) { - if (is_null($stateOrProvince)) { - throw new \InvalidArgumentException('non-nullable stateOrProvince cannot be null'); - } $this->container['stateOrProvince'] = $stateOrProvince; return $this; @@ -480,9 +465,6 @@ public function getStreet() */ public function setStreet($street) { - if (is_null($street)) { - throw new \InvalidArgumentException('non-nullable street cannot be null'); - } $this->container['street'] = $street; return $this; diff --git a/src/Adyen/Model/BalancePlatform/AddressRequirement.php b/src/Adyen/Model/BalancePlatform/AddressRequirement.php index 979ea493f..c178c15d4 100644 --- a/src/Adyen/Model/BalancePlatform/AddressRequirement.php +++ b/src/Adyen/Model/BalancePlatform/AddressRequirement.php @@ -353,9 +353,6 @@ public function getDescription() */ public function setDescription($description) { - if (is_null($description)) { - throw new \InvalidArgumentException('non-nullable description cannot be null'); - } $this->container['description'] = $description; return $this; @@ -380,9 +377,6 @@ public function getRequiredAddressFields() */ public function setRequiredAddressFields($requiredAddressFields) { - if (is_null($requiredAddressFields)) { - throw new \InvalidArgumentException('non-nullable requiredAddressFields cannot be null'); - } $allowedValues = $this->getRequiredAddressFieldsAllowableValues(); if (array_diff($requiredAddressFields, $allowedValues)) { throw new \InvalidArgumentException( @@ -416,9 +410,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/BalancePlatform/Amount.php b/src/Adyen/Model/BalancePlatform/Amount.php index 16d8934f7..522b8c6ff 100644 --- a/src/Adyen/Model/BalancePlatform/Amount.php +++ b/src/Adyen/Model/BalancePlatform/Amount.php @@ -308,9 +308,6 @@ public function getCurrency() */ public function setCurrency($currency) { - if (is_null($currency)) { - throw new \InvalidArgumentException('non-nullable currency cannot be null'); - } $this->container['currency'] = $currency; return $this; @@ -335,9 +332,6 @@ public function getValue() */ public function setValue($value) { - if (is_null($value)) { - throw new \InvalidArgumentException('non-nullable value cannot be null'); - } $this->container['value'] = $value; return $this; diff --git a/src/Adyen/Model/BalancePlatform/AmountMinMaxRequirement.php b/src/Adyen/Model/BalancePlatform/AmountMinMaxRequirement.php index 87b4d61ce..6dde3c965 100644 --- a/src/Adyen/Model/BalancePlatform/AmountMinMaxRequirement.php +++ b/src/Adyen/Model/BalancePlatform/AmountMinMaxRequirement.php @@ -340,9 +340,6 @@ public function getDescription() */ public function setDescription($description) { - if (is_null($description)) { - throw new \InvalidArgumentException('non-nullable description cannot be null'); - } $this->container['description'] = $description; return $this; @@ -367,9 +364,6 @@ public function getMax() */ public function setMax($max) { - if (is_null($max)) { - throw new \InvalidArgumentException('non-nullable max cannot be null'); - } $this->container['max'] = $max; return $this; @@ -394,9 +388,6 @@ public function getMin() */ public function setMin($min) { - if (is_null($min)) { - throw new \InvalidArgumentException('non-nullable min cannot be null'); - } $this->container['min'] = $min; return $this; @@ -421,9 +412,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/BalancePlatform/Authentication.php b/src/Adyen/Model/BalancePlatform/Authentication.php index 909a7fdb6..ea1a9e2e5 100644 --- a/src/Adyen/Model/BalancePlatform/Authentication.php +++ b/src/Adyen/Model/BalancePlatform/Authentication.php @@ -309,9 +309,6 @@ public function getEmail() */ public function setEmail($email) { - if (is_null($email)) { - throw new \InvalidArgumentException('non-nullable email cannot be null'); - } $this->container['email'] = $email; return $this; @@ -336,9 +333,6 @@ public function getPassword() */ public function setPassword($password) { - if (is_null($password)) { - throw new \InvalidArgumentException('non-nullable password cannot be null'); - } $this->container['password'] = $password; return $this; @@ -363,9 +357,6 @@ public function getPhone() */ public function setPhone($phone) { - if (is_null($phone)) { - throw new \InvalidArgumentException('non-nullable phone cannot be null'); - } $this->container['phone'] = $phone; return $this; diff --git a/src/Adyen/Model/BalancePlatform/BRLocalAccountIdentification.php b/src/Adyen/Model/BalancePlatform/BRLocalAccountIdentification.php index 6150e14c1..5342f8b64 100644 --- a/src/Adyen/Model/BalancePlatform/BRLocalAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/BRLocalAccountIdentification.php @@ -356,9 +356,6 @@ public function getAccountNumber() */ public function setAccountNumber($accountNumber) { - if (is_null($accountNumber)) { - throw new \InvalidArgumentException('non-nullable accountNumber cannot be null'); - } $this->container['accountNumber'] = $accountNumber; return $this; @@ -383,9 +380,6 @@ public function getBankCode() */ public function setBankCode($bankCode) { - if (is_null($bankCode)) { - throw new \InvalidArgumentException('non-nullable bankCode cannot be null'); - } $this->container['bankCode'] = $bankCode; return $this; @@ -410,9 +404,6 @@ public function getBranchNumber() */ public function setBranchNumber($branchNumber) { - if (is_null($branchNumber)) { - throw new \InvalidArgumentException('non-nullable branchNumber cannot be null'); - } $this->container['branchNumber'] = $branchNumber; return $this; @@ -437,9 +428,6 @@ public function getIspb() */ public function setIspb($ispb) { - if (is_null($ispb)) { - throw new \InvalidArgumentException('non-nullable ispb cannot be null'); - } $this->container['ispb'] = $ispb; return $this; @@ -464,9 +452,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/BalancePlatform/Balance.php b/src/Adyen/Model/BalancePlatform/Balance.php index c9493008f..471d77106 100644 --- a/src/Adyen/Model/BalancePlatform/Balance.php +++ b/src/Adyen/Model/BalancePlatform/Balance.php @@ -335,9 +335,6 @@ public function getAvailable() */ public function setAvailable($available) { - if (is_null($available)) { - throw new \InvalidArgumentException('non-nullable available cannot be null'); - } $this->container['available'] = $available; return $this; @@ -362,9 +359,6 @@ public function getBalance() */ public function setBalance($balance) { - if (is_null($balance)) { - throw new \InvalidArgumentException('non-nullable balance cannot be null'); - } $this->container['balance'] = $balance; return $this; @@ -389,9 +383,6 @@ public function getCurrency() */ public function setCurrency($currency) { - if (is_null($currency)) { - throw new \InvalidArgumentException('non-nullable currency cannot be null'); - } $this->container['currency'] = $currency; return $this; @@ -416,9 +407,6 @@ public function getPending() */ public function setPending($pending) { - if (is_null($pending)) { - throw new \InvalidArgumentException('non-nullable pending cannot be null'); - } $this->container['pending'] = $pending; return $this; @@ -443,9 +431,6 @@ public function getReserved() */ public function setReserved($reserved) { - if (is_null($reserved)) { - throw new \InvalidArgumentException('non-nullable reserved cannot be null'); - } $this->container['reserved'] = $reserved; return $this; diff --git a/src/Adyen/Model/BalancePlatform/BalanceAccount.php b/src/Adyen/Model/BalancePlatform/BalanceAccount.php index d8497394c..cb83c6364 100644 --- a/src/Adyen/Model/BalancePlatform/BalanceAccount.php +++ b/src/Adyen/Model/BalancePlatform/BalanceAccount.php @@ -398,9 +398,6 @@ public function getAccountHolderId() */ public function setAccountHolderId($accountHolderId) { - if (is_null($accountHolderId)) { - throw new \InvalidArgumentException('non-nullable accountHolderId cannot be null'); - } $this->container['accountHolderId'] = $accountHolderId; return $this; @@ -425,9 +422,6 @@ public function getBalances() */ public function setBalances($balances) { - if (is_null($balances)) { - throw new \InvalidArgumentException('non-nullable balances cannot be null'); - } $this->container['balances'] = $balances; return $this; @@ -452,9 +446,6 @@ public function getDefaultCurrencyCode() */ public function setDefaultCurrencyCode($defaultCurrencyCode) { - if (is_null($defaultCurrencyCode)) { - throw new \InvalidArgumentException('non-nullable defaultCurrencyCode cannot be null'); - } $this->container['defaultCurrencyCode'] = $defaultCurrencyCode; return $this; @@ -479,9 +470,6 @@ public function getDescription() */ public function setDescription($description) { - if (is_null($description)) { - throw new \InvalidArgumentException('non-nullable description cannot be null'); - } $this->container['description'] = $description; return $this; @@ -506,9 +494,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -533,9 +518,6 @@ public function getMetadata() */ public function setMetadata($metadata) { - if (is_null($metadata)) { - throw new \InvalidArgumentException('non-nullable metadata cannot be null'); - } $this->container['metadata'] = $metadata; return $this; @@ -560,9 +542,6 @@ public function getMigratedAccountCode() */ public function setMigratedAccountCode($migratedAccountCode) { - if (is_null($migratedAccountCode)) { - throw new \InvalidArgumentException('non-nullable migratedAccountCode cannot be null'); - } $this->container['migratedAccountCode'] = $migratedAccountCode; return $this; @@ -587,9 +566,6 @@ public function getPlatformPaymentConfiguration() */ public function setPlatformPaymentConfiguration($platformPaymentConfiguration) { - if (is_null($platformPaymentConfiguration)) { - throw new \InvalidArgumentException('non-nullable platformPaymentConfiguration cannot be null'); - } $this->container['platformPaymentConfiguration'] = $platformPaymentConfiguration; return $this; @@ -614,9 +590,6 @@ public function getReference() */ public function setReference($reference) { - if (is_null($reference)) { - throw new \InvalidArgumentException('non-nullable reference cannot be null'); - } $this->container['reference'] = $reference; return $this; @@ -641,9 +614,6 @@ public function getStatus() */ 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( @@ -678,9 +648,6 @@ public function getTimeZone() */ public function setTimeZone($timeZone) { - if (is_null($timeZone)) { - throw new \InvalidArgumentException('non-nullable timeZone cannot be null'); - } $this->container['timeZone'] = $timeZone; return $this; diff --git a/src/Adyen/Model/BalancePlatform/BalanceAccountBase.php b/src/Adyen/Model/BalancePlatform/BalanceAccountBase.php index 01f937c81..e98ac4a13 100644 --- a/src/Adyen/Model/BalancePlatform/BalanceAccountBase.php +++ b/src/Adyen/Model/BalancePlatform/BalanceAccountBase.php @@ -391,9 +391,6 @@ public function getAccountHolderId() */ public function setAccountHolderId($accountHolderId) { - if (is_null($accountHolderId)) { - throw new \InvalidArgumentException('non-nullable accountHolderId cannot be null'); - } $this->container['accountHolderId'] = $accountHolderId; return $this; @@ -418,9 +415,6 @@ public function getDefaultCurrencyCode() */ public function setDefaultCurrencyCode($defaultCurrencyCode) { - if (is_null($defaultCurrencyCode)) { - throw new \InvalidArgumentException('non-nullable defaultCurrencyCode cannot be null'); - } $this->container['defaultCurrencyCode'] = $defaultCurrencyCode; return $this; @@ -445,9 +439,6 @@ public function getDescription() */ public function setDescription($description) { - if (is_null($description)) { - throw new \InvalidArgumentException('non-nullable description cannot be null'); - } $this->container['description'] = $description; return $this; @@ -472,9 +463,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -499,9 +487,6 @@ public function getMetadata() */ public function setMetadata($metadata) { - if (is_null($metadata)) { - throw new \InvalidArgumentException('non-nullable metadata cannot be null'); - } $this->container['metadata'] = $metadata; return $this; @@ -526,9 +511,6 @@ public function getMigratedAccountCode() */ public function setMigratedAccountCode($migratedAccountCode) { - if (is_null($migratedAccountCode)) { - throw new \InvalidArgumentException('non-nullable migratedAccountCode cannot be null'); - } $this->container['migratedAccountCode'] = $migratedAccountCode; return $this; @@ -553,9 +535,6 @@ public function getPlatformPaymentConfiguration() */ public function setPlatformPaymentConfiguration($platformPaymentConfiguration) { - if (is_null($platformPaymentConfiguration)) { - throw new \InvalidArgumentException('non-nullable platformPaymentConfiguration cannot be null'); - } $this->container['platformPaymentConfiguration'] = $platformPaymentConfiguration; return $this; @@ -580,9 +559,6 @@ public function getReference() */ public function setReference($reference) { - if (is_null($reference)) { - throw new \InvalidArgumentException('non-nullable reference cannot be null'); - } $this->container['reference'] = $reference; return $this; @@ -607,9 +583,6 @@ public function getStatus() */ 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( @@ -644,9 +617,6 @@ public function getTimeZone() */ public function setTimeZone($timeZone) { - if (is_null($timeZone)) { - throw new \InvalidArgumentException('non-nullable timeZone cannot be null'); - } $this->container['timeZone'] = $timeZone; return $this; diff --git a/src/Adyen/Model/BalancePlatform/BalanceAccountInfo.php b/src/Adyen/Model/BalancePlatform/BalanceAccountInfo.php index 37d90c13c..02eb29eee 100644 --- a/src/Adyen/Model/BalancePlatform/BalanceAccountInfo.php +++ b/src/Adyen/Model/BalancePlatform/BalanceAccountInfo.php @@ -347,9 +347,6 @@ public function getAccountHolderId() */ public function setAccountHolderId($accountHolderId) { - if (is_null($accountHolderId)) { - throw new \InvalidArgumentException('non-nullable accountHolderId cannot be null'); - } $this->container['accountHolderId'] = $accountHolderId; return $this; @@ -374,9 +371,6 @@ public function getDefaultCurrencyCode() */ public function setDefaultCurrencyCode($defaultCurrencyCode) { - if (is_null($defaultCurrencyCode)) { - throw new \InvalidArgumentException('non-nullable defaultCurrencyCode cannot be null'); - } $this->container['defaultCurrencyCode'] = $defaultCurrencyCode; return $this; @@ -401,9 +395,6 @@ public function getDescription() */ public function setDescription($description) { - if (is_null($description)) { - throw new \InvalidArgumentException('non-nullable description cannot be null'); - } $this->container['description'] = $description; return $this; @@ -428,9 +419,6 @@ public function getMetadata() */ public function setMetadata($metadata) { - if (is_null($metadata)) { - throw new \InvalidArgumentException('non-nullable metadata cannot be null'); - } $this->container['metadata'] = $metadata; return $this; @@ -455,9 +443,6 @@ public function getMigratedAccountCode() */ public function setMigratedAccountCode($migratedAccountCode) { - if (is_null($migratedAccountCode)) { - throw new \InvalidArgumentException('non-nullable migratedAccountCode cannot be null'); - } $this->container['migratedAccountCode'] = $migratedAccountCode; return $this; @@ -482,9 +467,6 @@ public function getPlatformPaymentConfiguration() */ public function setPlatformPaymentConfiguration($platformPaymentConfiguration) { - if (is_null($platformPaymentConfiguration)) { - throw new \InvalidArgumentException('non-nullable platformPaymentConfiguration cannot be null'); - } $this->container['platformPaymentConfiguration'] = $platformPaymentConfiguration; return $this; @@ -509,9 +491,6 @@ public function getReference() */ public function setReference($reference) { - if (is_null($reference)) { - throw new \InvalidArgumentException('non-nullable reference cannot be null'); - } $this->container['reference'] = $reference; return $this; @@ -536,9 +515,6 @@ public function getTimeZone() */ public function setTimeZone($timeZone) { - if (is_null($timeZone)) { - throw new \InvalidArgumentException('non-nullable timeZone cannot be null'); - } $this->container['timeZone'] = $timeZone; return $this; diff --git a/src/Adyen/Model/BalancePlatform/BalanceAccountUpdateRequest.php b/src/Adyen/Model/BalancePlatform/BalanceAccountUpdateRequest.php index 6ab92cae5..def9556ba 100644 --- a/src/Adyen/Model/BalancePlatform/BalanceAccountUpdateRequest.php +++ b/src/Adyen/Model/BalancePlatform/BalanceAccountUpdateRequest.php @@ -364,9 +364,6 @@ public function getAccountHolderId() */ public function setAccountHolderId($accountHolderId) { - if (is_null($accountHolderId)) { - throw new \InvalidArgumentException('non-nullable accountHolderId cannot be null'); - } $this->container['accountHolderId'] = $accountHolderId; return $this; @@ -391,9 +388,6 @@ public function getDescription() */ public function setDescription($description) { - if (is_null($description)) { - throw new \InvalidArgumentException('non-nullable description cannot be null'); - } $this->container['description'] = $description; return $this; @@ -418,9 +412,6 @@ public function getMetadata() */ public function setMetadata($metadata) { - if (is_null($metadata)) { - throw new \InvalidArgumentException('non-nullable metadata cannot be null'); - } $this->container['metadata'] = $metadata; return $this; @@ -445,9 +436,6 @@ public function getPlatformPaymentConfiguration() */ public function setPlatformPaymentConfiguration($platformPaymentConfiguration) { - if (is_null($platformPaymentConfiguration)) { - throw new \InvalidArgumentException('non-nullable platformPaymentConfiguration cannot be null'); - } $this->container['platformPaymentConfiguration'] = $platformPaymentConfiguration; return $this; @@ -472,9 +460,6 @@ public function getReference() */ public function setReference($reference) { - if (is_null($reference)) { - throw new \InvalidArgumentException('non-nullable reference cannot be null'); - } $this->container['reference'] = $reference; return $this; @@ -499,9 +484,6 @@ public function getStatus() */ 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( @@ -536,9 +518,6 @@ public function getTimeZone() */ public function setTimeZone($timeZone) { - if (is_null($timeZone)) { - throw new \InvalidArgumentException('non-nullable timeZone cannot be null'); - } $this->container['timeZone'] = $timeZone; return $this; diff --git a/src/Adyen/Model/BalancePlatform/BalancePlatform.php b/src/Adyen/Model/BalancePlatform/BalancePlatform.php index c04fcd7a4..c07558fd8 100644 --- a/src/Adyen/Model/BalancePlatform/BalancePlatform.php +++ b/src/Adyen/Model/BalancePlatform/BalancePlatform.php @@ -312,9 +312,6 @@ public function getDescription() */ public function setDescription($description) { - if (is_null($description)) { - throw new \InvalidArgumentException('non-nullable description cannot be null'); - } $this->container['description'] = $description; return $this; @@ -339,9 +336,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -366,9 +360,6 @@ public function getStatus() */ public function setStatus($status) { - if (is_null($status)) { - throw new \InvalidArgumentException('non-nullable status cannot be null'); - } $this->container['status'] = $status; return $this; diff --git a/src/Adyen/Model/BalancePlatform/BalanceSweepConfigurationsResponse.php b/src/Adyen/Model/BalancePlatform/BalanceSweepConfigurationsResponse.php index dbebbbd99..c7c96d80b 100644 --- a/src/Adyen/Model/BalancePlatform/BalanceSweepConfigurationsResponse.php +++ b/src/Adyen/Model/BalancePlatform/BalanceSweepConfigurationsResponse.php @@ -318,9 +318,6 @@ public function getHasNext() */ public function setHasNext($hasNext) { - if (is_null($hasNext)) { - throw new \InvalidArgumentException('non-nullable hasNext cannot be null'); - } $this->container['hasNext'] = $hasNext; return $this; @@ -345,9 +342,6 @@ public function getHasPrevious() */ public function setHasPrevious($hasPrevious) { - if (is_null($hasPrevious)) { - throw new \InvalidArgumentException('non-nullable hasPrevious cannot be null'); - } $this->container['hasPrevious'] = $hasPrevious; return $this; @@ -372,9 +366,6 @@ public function getSweeps() */ public function setSweeps($sweeps) { - if (is_null($sweeps)) { - throw new \InvalidArgumentException('non-nullable sweeps cannot be null'); - } $this->container['sweeps'] = $sweeps; return $this; diff --git a/src/Adyen/Model/BalancePlatform/BankAccount.php b/src/Adyen/Model/BalancePlatform/BankAccount.php index c7c28d1b7..895f64de5 100644 --- a/src/Adyen/Model/BalancePlatform/BankAccount.php +++ b/src/Adyen/Model/BalancePlatform/BankAccount.php @@ -298,9 +298,6 @@ public function getAccountIdentification() */ public function setAccountIdentification($accountIdentification) { - if (is_null($accountIdentification)) { - throw new \InvalidArgumentException('non-nullable accountIdentification cannot be null'); - } $this->container['accountIdentification'] = $accountIdentification; return $this; diff --git a/src/Adyen/Model/BalancePlatform/BankAccountAccountIdentification.php b/src/Adyen/Model/BalancePlatform/BankAccountAccountIdentification.php index 7a41e6dec..d778eba7b 100644 --- a/src/Adyen/Model/BalancePlatform/BankAccountAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/BankAccountAccountIdentification.php @@ -441,9 +441,6 @@ public function getAccountNumber() */ public function setAccountNumber($accountNumber) { - if (is_null($accountNumber)) { - throw new \InvalidArgumentException('non-nullable accountNumber cannot be null'); - } $this->container['accountNumber'] = $accountNumber; return $this; @@ -468,9 +465,6 @@ public function getBsbCode() */ public function setBsbCode($bsbCode) { - if (is_null($bsbCode)) { - throw new \InvalidArgumentException('non-nullable bsbCode cannot be null'); - } $this->container['bsbCode'] = $bsbCode; return $this; @@ -495,9 +489,6 @@ public function getType() */ public function setType($type) { - if (is_null($type)) { - throw new \InvalidArgumentException('non-nullable type cannot be null'); - } $this->container['type'] = $type; return $this; @@ -522,9 +513,6 @@ public function getBankCode() */ public function setBankCode($bankCode) { - if (is_null($bankCode)) { - throw new \InvalidArgumentException('non-nullable bankCode cannot be null'); - } $this->container['bankCode'] = $bankCode; return $this; @@ -549,9 +537,6 @@ public function getBranchNumber() */ public function setBranchNumber($branchNumber) { - if (is_null($branchNumber)) { - throw new \InvalidArgumentException('non-nullable branchNumber cannot be null'); - } $this->container['branchNumber'] = $branchNumber; return $this; @@ -576,9 +561,6 @@ public function getIspb() */ public function setIspb($ispb) { - if (is_null($ispb)) { - throw new \InvalidArgumentException('non-nullable ispb cannot be null'); - } $this->container['ispb'] = $ispb; return $this; @@ -603,9 +585,6 @@ public function getAccountType() */ public function setAccountType($accountType) { - if (is_null($accountType)) { - throw new \InvalidArgumentException('non-nullable accountType cannot be null'); - } $this->container['accountType'] = $accountType; return $this; @@ -630,9 +609,6 @@ public function getInstitutionNumber() */ public function setInstitutionNumber($institutionNumber) { - if (is_null($institutionNumber)) { - throw new \InvalidArgumentException('non-nullable institutionNumber cannot be null'); - } $this->container['institutionNumber'] = $institutionNumber; return $this; @@ -657,9 +633,6 @@ public function getTransitNumber() */ public function setTransitNumber($transitNumber) { - if (is_null($transitNumber)) { - throw new \InvalidArgumentException('non-nullable transitNumber cannot be null'); - } $this->container['transitNumber'] = $transitNumber; return $this; @@ -684,9 +657,6 @@ public function getClearingCode() */ public function setClearingCode($clearingCode) { - if (is_null($clearingCode)) { - throw new \InvalidArgumentException('non-nullable clearingCode cannot be null'); - } $this->container['clearingCode'] = $clearingCode; return $this; @@ -711,9 +681,6 @@ public function getIban() */ public function setIban($iban) { - if (is_null($iban)) { - throw new \InvalidArgumentException('non-nullable iban cannot be null'); - } $this->container['iban'] = $iban; return $this; @@ -738,9 +705,6 @@ public function getAdditionalBankIdentification() */ public function setAdditionalBankIdentification($additionalBankIdentification) { - if (is_null($additionalBankIdentification)) { - throw new \InvalidArgumentException('non-nullable additionalBankIdentification cannot be null'); - } $this->container['additionalBankIdentification'] = $additionalBankIdentification; return $this; @@ -765,9 +729,6 @@ public function getBic() */ public function setBic($bic) { - if (is_null($bic)) { - throw new \InvalidArgumentException('non-nullable bic cannot be null'); - } $this->container['bic'] = $bic; return $this; @@ -792,9 +753,6 @@ public function getClearingNumber() */ public function setClearingNumber($clearingNumber) { - if (is_null($clearingNumber)) { - throw new \InvalidArgumentException('non-nullable clearingNumber cannot be null'); - } $this->container['clearingNumber'] = $clearingNumber; return $this; @@ -819,9 +777,6 @@ public function getSortCode() */ public function setSortCode($sortCode) { - if (is_null($sortCode)) { - throw new \InvalidArgumentException('non-nullable sortCode cannot be null'); - } $this->container['sortCode'] = $sortCode; return $this; @@ -846,9 +801,6 @@ public function getRoutingNumber() */ public function setRoutingNumber($routingNumber) { - if (is_null($routingNumber)) { - throw new \InvalidArgumentException('non-nullable routingNumber cannot be null'); - } $this->container['routingNumber'] = $routingNumber; return $this; diff --git a/src/Adyen/Model/BalancePlatform/BankAccountDetails.php b/src/Adyen/Model/BalancePlatform/BankAccountDetails.php index e093d166c..355ea1d5a 100644 --- a/src/Adyen/Model/BalancePlatform/BankAccountDetails.php +++ b/src/Adyen/Model/BalancePlatform/BankAccountDetails.php @@ -340,9 +340,6 @@ public function getAccountNumber() */ public function setAccountNumber($accountNumber) { - if (is_null($accountNumber)) { - throw new \InvalidArgumentException('non-nullable accountNumber cannot be null'); - } $this->container['accountNumber'] = $accountNumber; return $this; @@ -367,9 +364,6 @@ public function getAccountType() */ public function setAccountType($accountType) { - if (is_null($accountType)) { - throw new \InvalidArgumentException('non-nullable accountType cannot be null'); - } $this->container['accountType'] = $accountType; return $this; @@ -394,9 +388,6 @@ public function getFormFactor() */ public function setFormFactor($formFactor) { - if (is_null($formFactor)) { - throw new \InvalidArgumentException('non-nullable formFactor cannot be null'); - } $this->container['formFactor'] = $formFactor; return $this; @@ -421,9 +412,6 @@ public function getIban() */ public function setIban($iban) { - if (is_null($iban)) { - throw new \InvalidArgumentException('non-nullable iban cannot be null'); - } $this->container['iban'] = $iban; return $this; @@ -448,9 +436,6 @@ public function getRoutingNumber() */ public function setRoutingNumber($routingNumber) { - if (is_null($routingNumber)) { - throw new \InvalidArgumentException('non-nullable routingNumber cannot be null'); - } $this->container['routingNumber'] = $routingNumber; return $this; @@ -475,9 +460,6 @@ public function getSortCode() */ public function setSortCode($sortCode) { - if (is_null($sortCode)) { - throw new \InvalidArgumentException('non-nullable sortCode cannot be null'); - } $this->container['sortCode'] = $sortCode; return $this; @@ -502,9 +484,6 @@ public function getType() */ public function setType($type) { - if (is_null($type)) { - throw new \InvalidArgumentException('non-nullable type cannot be null'); - } $this->container['type'] = $type; return $this; diff --git a/src/Adyen/Model/BalancePlatform/BankAccountIdentificationTypeRequirement.php b/src/Adyen/Model/BalancePlatform/BankAccountIdentificationTypeRequirement.php index 5f8d8de3f..94ec38a78 100644 --- a/src/Adyen/Model/BalancePlatform/BankAccountIdentificationTypeRequirement.php +++ b/src/Adyen/Model/BalancePlatform/BankAccountIdentificationTypeRequirement.php @@ -377,9 +377,6 @@ public function getBankAccountIdentificationTypes() */ public function setBankAccountIdentificationTypes($bankAccountIdentificationTypes) { - if (is_null($bankAccountIdentificationTypes)) { - throw new \InvalidArgumentException('non-nullable bankAccountIdentificationTypes cannot be null'); - } $allowedValues = $this->getBankAccountIdentificationTypesAllowableValues(); if (array_diff($bankAccountIdentificationTypes, $allowedValues)) { throw new \InvalidArgumentException( @@ -413,9 +410,6 @@ public function getDescription() */ public function setDescription($description) { - if (is_null($description)) { - throw new \InvalidArgumentException('non-nullable description cannot be null'); - } $this->container['description'] = $description; return $this; @@ -440,9 +434,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/BalancePlatform/BankAccountIdentificationValidationRequest.php b/src/Adyen/Model/BalancePlatform/BankAccountIdentificationValidationRequest.php index 8aa73d6cc..2ee895226 100644 --- a/src/Adyen/Model/BalancePlatform/BankAccountIdentificationValidationRequest.php +++ b/src/Adyen/Model/BalancePlatform/BankAccountIdentificationValidationRequest.php @@ -298,9 +298,6 @@ public function getAccountIdentification() */ public function setAccountIdentification($accountIdentification) { - if (is_null($accountIdentification)) { - throw new \InvalidArgumentException('non-nullable accountIdentification cannot be null'); - } $this->container['accountIdentification'] = $accountIdentification; return $this; diff --git a/src/Adyen/Model/BalancePlatform/BankAccountIdentificationValidationRequestAccountIdentification.php b/src/Adyen/Model/BalancePlatform/BankAccountIdentificationValidationRequestAccountIdentification.php index 3bf08f379..b668052c8 100644 --- a/src/Adyen/Model/BalancePlatform/BankAccountIdentificationValidationRequestAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/BankAccountIdentificationValidationRequestAccountIdentification.php @@ -441,9 +441,6 @@ public function getAccountNumber() */ public function setAccountNumber($accountNumber) { - if (is_null($accountNumber)) { - throw new \InvalidArgumentException('non-nullable accountNumber cannot be null'); - } $this->container['accountNumber'] = $accountNumber; return $this; @@ -468,9 +465,6 @@ public function getBsbCode() */ public function setBsbCode($bsbCode) { - if (is_null($bsbCode)) { - throw new \InvalidArgumentException('non-nullable bsbCode cannot be null'); - } $this->container['bsbCode'] = $bsbCode; return $this; @@ -495,9 +489,6 @@ public function getType() */ public function setType($type) { - if (is_null($type)) { - throw new \InvalidArgumentException('non-nullable type cannot be null'); - } $this->container['type'] = $type; return $this; @@ -522,9 +513,6 @@ public function getBankCode() */ public function setBankCode($bankCode) { - if (is_null($bankCode)) { - throw new \InvalidArgumentException('non-nullable bankCode cannot be null'); - } $this->container['bankCode'] = $bankCode; return $this; @@ -549,9 +537,6 @@ public function getBranchNumber() */ public function setBranchNumber($branchNumber) { - if (is_null($branchNumber)) { - throw new \InvalidArgumentException('non-nullable branchNumber cannot be null'); - } $this->container['branchNumber'] = $branchNumber; return $this; @@ -576,9 +561,6 @@ public function getIspb() */ public function setIspb($ispb) { - if (is_null($ispb)) { - throw new \InvalidArgumentException('non-nullable ispb cannot be null'); - } $this->container['ispb'] = $ispb; return $this; @@ -603,9 +585,6 @@ public function getAccountType() */ public function setAccountType($accountType) { - if (is_null($accountType)) { - throw new \InvalidArgumentException('non-nullable accountType cannot be null'); - } $this->container['accountType'] = $accountType; return $this; @@ -630,9 +609,6 @@ public function getInstitutionNumber() */ public function setInstitutionNumber($institutionNumber) { - if (is_null($institutionNumber)) { - throw new \InvalidArgumentException('non-nullable institutionNumber cannot be null'); - } $this->container['institutionNumber'] = $institutionNumber; return $this; @@ -657,9 +633,6 @@ public function getTransitNumber() */ public function setTransitNumber($transitNumber) { - if (is_null($transitNumber)) { - throw new \InvalidArgumentException('non-nullable transitNumber cannot be null'); - } $this->container['transitNumber'] = $transitNumber; return $this; @@ -684,9 +657,6 @@ public function getClearingCode() */ public function setClearingCode($clearingCode) { - if (is_null($clearingCode)) { - throw new \InvalidArgumentException('non-nullable clearingCode cannot be null'); - } $this->container['clearingCode'] = $clearingCode; return $this; @@ -711,9 +681,6 @@ public function getIban() */ public function setIban($iban) { - if (is_null($iban)) { - throw new \InvalidArgumentException('non-nullable iban cannot be null'); - } $this->container['iban'] = $iban; return $this; @@ -738,9 +705,6 @@ public function getAdditionalBankIdentification() */ public function setAdditionalBankIdentification($additionalBankIdentification) { - if (is_null($additionalBankIdentification)) { - throw new \InvalidArgumentException('non-nullable additionalBankIdentification cannot be null'); - } $this->container['additionalBankIdentification'] = $additionalBankIdentification; return $this; @@ -765,9 +729,6 @@ public function getBic() */ public function setBic($bic) { - if (is_null($bic)) { - throw new \InvalidArgumentException('non-nullable bic cannot be null'); - } $this->container['bic'] = $bic; return $this; @@ -792,9 +753,6 @@ public function getClearingNumber() */ public function setClearingNumber($clearingNumber) { - if (is_null($clearingNumber)) { - throw new \InvalidArgumentException('non-nullable clearingNumber cannot be null'); - } $this->container['clearingNumber'] = $clearingNumber; return $this; @@ -819,9 +777,6 @@ public function getSortCode() */ public function setSortCode($sortCode) { - if (is_null($sortCode)) { - throw new \InvalidArgumentException('non-nullable sortCode cannot be null'); - } $this->container['sortCode'] = $sortCode; return $this; @@ -846,9 +801,6 @@ public function getRoutingNumber() */ public function setRoutingNumber($routingNumber) { - if (is_null($routingNumber)) { - throw new \InvalidArgumentException('non-nullable routingNumber cannot be null'); - } $this->container['routingNumber'] = $routingNumber; return $this; diff --git a/src/Adyen/Model/BalancePlatform/BankIdentification.php b/src/Adyen/Model/BalancePlatform/BankIdentification.php index af881ba76..f439886cd 100644 --- a/src/Adyen/Model/BalancePlatform/BankIdentification.php +++ b/src/Adyen/Model/BalancePlatform/BankIdentification.php @@ -334,9 +334,6 @@ public function getCountry() */ public function setCountry($country) { - if (is_null($country)) { - throw new \InvalidArgumentException('non-nullable country cannot be null'); - } $this->container['country'] = $country; return $this; @@ -361,9 +358,6 @@ public function getIdentification() */ public function setIdentification($identification) { - if (is_null($identification)) { - throw new \InvalidArgumentException('non-nullable identification cannot be null'); - } $this->container['identification'] = $identification; return $this; @@ -388,9 +382,6 @@ public function getIdentificationType() */ public function setIdentificationType($identificationType) { - if (is_null($identificationType)) { - throw new \InvalidArgumentException('non-nullable identificationType cannot be null'); - } $allowedValues = $this->getIdentificationTypeAllowableValues(); if (!in_array($identificationType, $allowedValues, true)) { throw new \InvalidArgumentException( diff --git a/src/Adyen/Model/BalancePlatform/BrandVariantsRestriction.php b/src/Adyen/Model/BalancePlatform/BrandVariantsRestriction.php index 9d7faa690..b32b78e17 100644 --- a/src/Adyen/Model/BalancePlatform/BrandVariantsRestriction.php +++ b/src/Adyen/Model/BalancePlatform/BrandVariantsRestriction.php @@ -305,9 +305,6 @@ public function getOperation() */ public function setOperation($operation) { - if (is_null($operation)) { - throw new \InvalidArgumentException('non-nullable operation cannot be null'); - } $this->container['operation'] = $operation; return $this; @@ -332,9 +329,6 @@ public function getValue() */ public function setValue($value) { - if (is_null($value)) { - throw new \InvalidArgumentException('non-nullable value cannot be null'); - } $this->container['value'] = $value; return $this; diff --git a/src/Adyen/Model/BalancePlatform/BulkAddress.php b/src/Adyen/Model/BalancePlatform/BulkAddress.php index 965a1cbab..78ec8f9a5 100644 --- a/src/Adyen/Model/BalancePlatform/BulkAddress.php +++ b/src/Adyen/Model/BalancePlatform/BulkAddress.php @@ -354,9 +354,6 @@ public function getCity() */ public function setCity($city) { - if (is_null($city)) { - throw new \InvalidArgumentException('non-nullable city cannot be null'); - } $this->container['city'] = $city; return $this; @@ -381,9 +378,6 @@ public function getCompany() */ public function setCompany($company) { - if (is_null($company)) { - throw new \InvalidArgumentException('non-nullable company cannot be null'); - } $this->container['company'] = $company; return $this; @@ -408,9 +402,6 @@ public function getCountry() */ public function setCountry($country) { - if (is_null($country)) { - throw new \InvalidArgumentException('non-nullable country cannot be null'); - } $this->container['country'] = $country; return $this; @@ -435,9 +426,6 @@ public function getEmail() */ public function setEmail($email) { - if (is_null($email)) { - throw new \InvalidArgumentException('non-nullable email cannot be null'); - } $this->container['email'] = $email; return $this; @@ -462,9 +450,6 @@ public function getHouseNumberOrName() */ public function setHouseNumberOrName($houseNumberOrName) { - if (is_null($houseNumberOrName)) { - throw new \InvalidArgumentException('non-nullable houseNumberOrName cannot be null'); - } $this->container['houseNumberOrName'] = $houseNumberOrName; return $this; @@ -489,9 +474,6 @@ public function getMobile() */ public function setMobile($mobile) { - if (is_null($mobile)) { - throw new \InvalidArgumentException('non-nullable mobile cannot be null'); - } $this->container['mobile'] = $mobile; return $this; @@ -516,9 +498,6 @@ public function getPostalCode() */ public function setPostalCode($postalCode) { - if (is_null($postalCode)) { - throw new \InvalidArgumentException('non-nullable postalCode cannot be null'); - } $this->container['postalCode'] = $postalCode; return $this; @@ -543,9 +522,6 @@ public function getStateOrProvince() */ public function setStateOrProvince($stateOrProvince) { - if (is_null($stateOrProvince)) { - throw new \InvalidArgumentException('non-nullable stateOrProvince cannot be null'); - } $this->container['stateOrProvince'] = $stateOrProvince; return $this; @@ -570,9 +546,6 @@ public function getStreet() */ public function setStreet($street) { - if (is_null($street)) { - throw new \InvalidArgumentException('non-nullable street cannot be null'); - } $this->container['street'] = $street; return $this; diff --git a/src/Adyen/Model/BalancePlatform/CALocalAccountIdentification.php b/src/Adyen/Model/BalancePlatform/CALocalAccountIdentification.php index 5a8f98c81..cedac053c 100644 --- a/src/Adyen/Model/BalancePlatform/CALocalAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/CALocalAccountIdentification.php @@ -379,9 +379,6 @@ public function getAccountNumber() */ public function setAccountNumber($accountNumber) { - if (is_null($accountNumber)) { - throw new \InvalidArgumentException('non-nullable accountNumber cannot be null'); - } $this->container['accountNumber'] = $accountNumber; return $this; @@ -406,9 +403,6 @@ public function getAccountType() */ 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( @@ -443,9 +437,6 @@ public function getInstitutionNumber() */ public function setInstitutionNumber($institutionNumber) { - if (is_null($institutionNumber)) { - throw new \InvalidArgumentException('non-nullable institutionNumber cannot be null'); - } $this->container['institutionNumber'] = $institutionNumber; return $this; @@ -470,9 +461,6 @@ public function getTransitNumber() */ public function setTransitNumber($transitNumber) { - if (is_null($transitNumber)) { - throw new \InvalidArgumentException('non-nullable transitNumber cannot be null'); - } $this->container['transitNumber'] = $transitNumber; return $this; @@ -497,9 +485,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/BalancePlatform/CZLocalAccountIdentification.php b/src/Adyen/Model/BalancePlatform/CZLocalAccountIdentification.php index 1eed20082..070b0aea1 100644 --- a/src/Adyen/Model/BalancePlatform/CZLocalAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/CZLocalAccountIdentification.php @@ -339,9 +339,6 @@ public function getAccountNumber() */ public function setAccountNumber($accountNumber) { - if (is_null($accountNumber)) { - throw new \InvalidArgumentException('non-nullable accountNumber cannot be null'); - } $this->container['accountNumber'] = $accountNumber; return $this; @@ -366,9 +363,6 @@ public function getBankCode() */ public function setBankCode($bankCode) { - if (is_null($bankCode)) { - throw new \InvalidArgumentException('non-nullable bankCode cannot be null'); - } $this->container['bankCode'] = $bankCode; return $this; @@ -393,9 +387,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/BalancePlatform/CapabilityProblem.php b/src/Adyen/Model/BalancePlatform/CapabilityProblem.php index 1845ebf5e..d0b6b1550 100644 --- a/src/Adyen/Model/BalancePlatform/CapabilityProblem.php +++ b/src/Adyen/Model/BalancePlatform/CapabilityProblem.php @@ -302,9 +302,6 @@ public function getEntity() */ public function setEntity($entity) { - if (is_null($entity)) { - throw new \InvalidArgumentException('non-nullable entity cannot be null'); - } $this->container['entity'] = $entity; return $this; @@ -329,9 +326,6 @@ public function getVerificationErrors() */ public function setVerificationErrors($verificationErrors) { - if (is_null($verificationErrors)) { - throw new \InvalidArgumentException('non-nullable verificationErrors cannot be null'); - } $this->container['verificationErrors'] = $verificationErrors; return $this; diff --git a/src/Adyen/Model/BalancePlatform/CapabilityProblemEntity.php b/src/Adyen/Model/BalancePlatform/CapabilityProblemEntity.php index 304af3724..eb5bef06a 100644 --- a/src/Adyen/Model/BalancePlatform/CapabilityProblemEntity.php +++ b/src/Adyen/Model/BalancePlatform/CapabilityProblemEntity.php @@ -341,9 +341,6 @@ public function getDocuments() */ public function setDocuments($documents) { - if (is_null($documents)) { - throw new \InvalidArgumentException('non-nullable documents cannot be null'); - } $this->container['documents'] = $documents; return $this; @@ -368,9 +365,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -395,9 +389,6 @@ public function getOwner() */ public function setOwner($owner) { - if (is_null($owner)) { - throw new \InvalidArgumentException('non-nullable owner cannot be null'); - } $this->container['owner'] = $owner; return $this; @@ -422,9 +413,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/BalancePlatform/CapabilityProblemEntityRecursive.php b/src/Adyen/Model/BalancePlatform/CapabilityProblemEntityRecursive.php index 8575c4857..d133ff0b5 100644 --- a/src/Adyen/Model/BalancePlatform/CapabilityProblemEntityRecursive.php +++ b/src/Adyen/Model/BalancePlatform/CapabilityProblemEntityRecursive.php @@ -334,9 +334,6 @@ public function getDocuments() */ public function setDocuments($documents) { - if (is_null($documents)) { - throw new \InvalidArgumentException('non-nullable documents cannot be null'); - } $this->container['documents'] = $documents; return $this; @@ -361,9 +358,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -388,9 +382,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/BalancePlatform/CapabilitySettings.php b/src/Adyen/Model/BalancePlatform/CapabilitySettings.php index 95ce38222..ada0db0b3 100644 --- a/src/Adyen/Model/BalancePlatform/CapabilitySettings.php +++ b/src/Adyen/Model/BalancePlatform/CapabilitySettings.php @@ -358,15 +358,12 @@ public function getAmountPerIndustry() /** * Sets amountPerIndustry * - * @param array|null $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; @@ -385,15 +382,12 @@ public function getAuthorizedCardUsers() /** * Sets authorizedCardUsers * - * @param bool|null $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; @@ -412,15 +406,12 @@ public function getFundingSource() /** * Sets fundingSource * - * @param string[]|null $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( @@ -448,15 +439,12 @@ public function getInterval() /** * Sets interval * - * @param string|null $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( @@ -491,9 +479,6 @@ public function getMaxAmount() */ public function setMaxAmount($maxAmount) { - if (is_null($maxAmount)) { - throw new \InvalidArgumentException('non-nullable maxAmount cannot be null'); - } $this->container['maxAmount'] = $maxAmount; return $this; diff --git a/src/Adyen/Model/BalancePlatform/CapitalBalance.php b/src/Adyen/Model/BalancePlatform/CapitalBalance.php index eae456ceb..e0b661983 100644 --- a/src/Adyen/Model/BalancePlatform/CapitalBalance.php +++ b/src/Adyen/Model/BalancePlatform/CapitalBalance.php @@ -328,9 +328,6 @@ public function getCurrency() */ public function setCurrency($currency) { - if (is_null($currency)) { - throw new \InvalidArgumentException('non-nullable currency cannot be null'); - } $this->container['currency'] = $currency; return $this; @@ -355,9 +352,6 @@ public function getFee() */ public function setFee($fee) { - if (is_null($fee)) { - throw new \InvalidArgumentException('non-nullable fee cannot be null'); - } $this->container['fee'] = $fee; return $this; @@ -382,9 +376,6 @@ public function getPrincipal() */ public function setPrincipal($principal) { - if (is_null($principal)) { - throw new \InvalidArgumentException('non-nullable principal cannot be null'); - } $this->container['principal'] = $principal; return $this; @@ -409,9 +400,6 @@ public function getTotal() */ public function setTotal($total) { - if (is_null($total)) { - throw new \InvalidArgumentException('non-nullable total cannot be null'); - } $this->container['total'] = $total; return $this; diff --git a/src/Adyen/Model/BalancePlatform/CapitalGrantAccount.php b/src/Adyen/Model/BalancePlatform/CapitalGrantAccount.php index 6085bf81f..fc3db200e 100644 --- a/src/Adyen/Model/BalancePlatform/CapitalGrantAccount.php +++ b/src/Adyen/Model/BalancePlatform/CapitalGrantAccount.php @@ -316,9 +316,6 @@ public function getBalances() */ public function setBalances($balances) { - if (is_null($balances)) { - throw new \InvalidArgumentException('non-nullable balances cannot be null'); - } $this->container['balances'] = $balances; return $this; @@ -343,9 +340,6 @@ public function getFundingBalanceAccountId() */ public function setFundingBalanceAccountId($fundingBalanceAccountId) { - if (is_null($fundingBalanceAccountId)) { - throw new \InvalidArgumentException('non-nullable fundingBalanceAccountId cannot be null'); - } $this->container['fundingBalanceAccountId'] = $fundingBalanceAccountId; return $this; @@ -370,9 +364,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -397,9 +388,6 @@ public function getLimits() */ public function setLimits($limits) { - if (is_null($limits)) { - throw new \InvalidArgumentException('non-nullable limits cannot be null'); - } $this->container['limits'] = $limits; return $this; diff --git a/src/Adyen/Model/BalancePlatform/Card.php b/src/Adyen/Model/BalancePlatform/Card.php index f88693092..5b672c508 100644 --- a/src/Adyen/Model/BalancePlatform/Card.php +++ b/src/Adyen/Model/BalancePlatform/Card.php @@ -419,9 +419,6 @@ public function getAuthentication() */ public function setAuthentication($authentication) { - if (is_null($authentication)) { - throw new \InvalidArgumentException('non-nullable authentication cannot be null'); - } $this->container['authentication'] = $authentication; return $this; @@ -446,9 +443,6 @@ public function getBin() */ public function setBin($bin) { - if (is_null($bin)) { - throw new \InvalidArgumentException('non-nullable bin cannot be null'); - } $this->container['bin'] = $bin; return $this; @@ -473,9 +467,6 @@ public function getBrand() */ public function setBrand($brand) { - if (is_null($brand)) { - throw new \InvalidArgumentException('non-nullable brand cannot be null'); - } $this->container['brand'] = $brand; return $this; @@ -500,9 +491,6 @@ public function getBrandVariant() */ public function setBrandVariant($brandVariant) { - if (is_null($brandVariant)) { - throw new \InvalidArgumentException('non-nullable brandVariant cannot be null'); - } $this->container['brandVariant'] = $brandVariant; return $this; @@ -527,9 +515,6 @@ public function getCardholderName() */ public function setCardholderName($cardholderName) { - if (is_null($cardholderName)) { - throw new \InvalidArgumentException('non-nullable cardholderName cannot be null'); - } $this->container['cardholderName'] = $cardholderName; return $this; @@ -554,9 +539,6 @@ public function getConfiguration() */ public function setConfiguration($configuration) { - if (is_null($configuration)) { - throw new \InvalidArgumentException('non-nullable configuration cannot be null'); - } $this->container['configuration'] = $configuration; return $this; @@ -581,9 +563,6 @@ public function getCvc() */ public function setCvc($cvc) { - if (is_null($cvc)) { - throw new \InvalidArgumentException('non-nullable cvc cannot be null'); - } $this->container['cvc'] = $cvc; return $this; @@ -608,9 +587,6 @@ public function getDeliveryContact() */ public function setDeliveryContact($deliveryContact) { - if (is_null($deliveryContact)) { - throw new \InvalidArgumentException('non-nullable deliveryContact cannot be null'); - } $this->container['deliveryContact'] = $deliveryContact; return $this; @@ -635,9 +611,6 @@ public function getExpiration() */ public function setExpiration($expiration) { - if (is_null($expiration)) { - throw new \InvalidArgumentException('non-nullable expiration cannot be null'); - } $this->container['expiration'] = $expiration; return $this; @@ -662,9 +635,6 @@ public function getFormFactor() */ 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( @@ -699,9 +669,6 @@ public function getLastFour() */ public function setLastFour($lastFour) { - if (is_null($lastFour)) { - throw new \InvalidArgumentException('non-nullable lastFour cannot be null'); - } $this->container['lastFour'] = $lastFour; return $this; @@ -726,9 +693,6 @@ public function getNumber() */ public function setNumber($number) { - if (is_null($number)) { - throw new \InvalidArgumentException('non-nullable number cannot be null'); - } $this->container['number'] = $number; return $this; @@ -753,9 +717,6 @@ public function getThreeDSecure() */ public function setThreeDSecure($threeDSecure) { - if (is_null($threeDSecure)) { - throw new \InvalidArgumentException('non-nullable threeDSecure cannot be null'); - } $this->container['threeDSecure'] = $threeDSecure; return $this; diff --git a/src/Adyen/Model/BalancePlatform/CardConfiguration.php b/src/Adyen/Model/BalancePlatform/CardConfiguration.php index 5f42d660e..806f58589 100644 --- a/src/Adyen/Model/BalancePlatform/CardConfiguration.php +++ b/src/Adyen/Model/BalancePlatform/CardConfiguration.php @@ -389,9 +389,6 @@ public function getActivation() */ public function setActivation($activation) { - if (is_null($activation)) { - throw new \InvalidArgumentException('non-nullable activation cannot be null'); - } $this->container['activation'] = $activation; return $this; @@ -416,9 +413,6 @@ public function getActivationUrl() */ public function setActivationUrl($activationUrl) { - if (is_null($activationUrl)) { - throw new \InvalidArgumentException('non-nullable activationUrl cannot be null'); - } $this->container['activationUrl'] = $activationUrl; return $this; @@ -443,9 +437,6 @@ public function getBulkAddress() */ public function setBulkAddress($bulkAddress) { - if (is_null($bulkAddress)) { - throw new \InvalidArgumentException('non-nullable bulkAddress cannot be null'); - } $this->container['bulkAddress'] = $bulkAddress; return $this; @@ -470,9 +461,6 @@ public function getCardImageId() */ public function setCardImageId($cardImageId) { - if (is_null($cardImageId)) { - throw new \InvalidArgumentException('non-nullable cardImageId cannot be null'); - } $this->container['cardImageId'] = $cardImageId; return $this; @@ -497,9 +485,6 @@ public function getCarrier() */ public function setCarrier($carrier) { - if (is_null($carrier)) { - throw new \InvalidArgumentException('non-nullable carrier cannot be null'); - } $this->container['carrier'] = $carrier; return $this; @@ -524,9 +509,6 @@ public function getCarrierImageId() */ public function setCarrierImageId($carrierImageId) { - if (is_null($carrierImageId)) { - throw new \InvalidArgumentException('non-nullable carrierImageId cannot be null'); - } $this->container['carrierImageId'] = $carrierImageId; return $this; @@ -551,9 +533,6 @@ public function getConfigurationProfileId() */ public function setConfigurationProfileId($configurationProfileId) { - if (is_null($configurationProfileId)) { - throw new \InvalidArgumentException('non-nullable configurationProfileId cannot be null'); - } $this->container['configurationProfileId'] = $configurationProfileId; return $this; @@ -578,9 +557,6 @@ public function getCurrency() */ public function setCurrency($currency) { - if (is_null($currency)) { - throw new \InvalidArgumentException('non-nullable currency cannot be null'); - } $this->container['currency'] = $currency; return $this; @@ -605,9 +581,6 @@ public function getEnvelope() */ public function setEnvelope($envelope) { - if (is_null($envelope)) { - throw new \InvalidArgumentException('non-nullable envelope cannot be null'); - } $this->container['envelope'] = $envelope; return $this; @@ -632,9 +605,6 @@ public function getInsert() */ public function setInsert($insert) { - if (is_null($insert)) { - throw new \InvalidArgumentException('non-nullable insert cannot be null'); - } $this->container['insert'] = $insert; return $this; @@ -659,9 +629,6 @@ public function getLanguage() */ public function setLanguage($language) { - if (is_null($language)) { - throw new \InvalidArgumentException('non-nullable language cannot be null'); - } $this->container['language'] = $language; return $this; @@ -686,9 +653,6 @@ public function getLogoImageId() */ public function setLogoImageId($logoImageId) { - if (is_null($logoImageId)) { - throw new \InvalidArgumentException('non-nullable logoImageId cannot be null'); - } $this->container['logoImageId'] = $logoImageId; return $this; @@ -713,9 +677,6 @@ public function getPinMailer() */ public function setPinMailer($pinMailer) { - if (is_null($pinMailer)) { - throw new \InvalidArgumentException('non-nullable pinMailer cannot be null'); - } $this->container['pinMailer'] = $pinMailer; return $this; @@ -740,9 +701,6 @@ public function getShipmentMethod() */ public function setShipmentMethod($shipmentMethod) { - if (is_null($shipmentMethod)) { - throw new \InvalidArgumentException('non-nullable shipmentMethod cannot be null'); - } $this->container['shipmentMethod'] = $shipmentMethod; return $this; diff --git a/src/Adyen/Model/BalancePlatform/CardInfo.php b/src/Adyen/Model/BalancePlatform/CardInfo.php index 44425df9b..87148bee7 100644 --- a/src/Adyen/Model/BalancePlatform/CardInfo.php +++ b/src/Adyen/Model/BalancePlatform/CardInfo.php @@ -381,9 +381,6 @@ public function getAuthentication() */ public function setAuthentication($authentication) { - if (is_null($authentication)) { - throw new \InvalidArgumentException('non-nullable authentication cannot be null'); - } $this->container['authentication'] = $authentication; return $this; @@ -408,9 +405,6 @@ public function getBrand() */ public function setBrand($brand) { - if (is_null($brand)) { - throw new \InvalidArgumentException('non-nullable brand cannot be null'); - } $this->container['brand'] = $brand; return $this; @@ -435,9 +429,6 @@ public function getBrandVariant() */ public function setBrandVariant($brandVariant) { - if (is_null($brandVariant)) { - throw new \InvalidArgumentException('non-nullable brandVariant cannot be null'); - } $this->container['brandVariant'] = $brandVariant; return $this; @@ -462,9 +453,6 @@ public function getCardholderName() */ public function setCardholderName($cardholderName) { - if (is_null($cardholderName)) { - throw new \InvalidArgumentException('non-nullable cardholderName cannot be null'); - } $this->container['cardholderName'] = $cardholderName; return $this; @@ -489,9 +477,6 @@ public function getConfiguration() */ public function setConfiguration($configuration) { - if (is_null($configuration)) { - throw new \InvalidArgumentException('non-nullable configuration cannot be null'); - } $this->container['configuration'] = $configuration; return $this; @@ -516,9 +501,6 @@ public function getDeliveryContact() */ public function setDeliveryContact($deliveryContact) { - if (is_null($deliveryContact)) { - throw new \InvalidArgumentException('non-nullable deliveryContact cannot be null'); - } $this->container['deliveryContact'] = $deliveryContact; return $this; @@ -543,9 +525,6 @@ public function getFormFactor() */ 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( @@ -580,9 +559,6 @@ public function getThreeDSecure() */ public function setThreeDSecure($threeDSecure) { - if (is_null($threeDSecure)) { - throw new \InvalidArgumentException('non-nullable threeDSecure cannot be null'); - } $this->container['threeDSecure'] = $threeDSecure; return $this; diff --git a/src/Adyen/Model/BalancePlatform/CardOrder.php b/src/Adyen/Model/BalancePlatform/CardOrder.php index 65a64da8f..8329e0ee9 100644 --- a/src/Adyen/Model/BalancePlatform/CardOrder.php +++ b/src/Adyen/Model/BalancePlatform/CardOrder.php @@ -367,9 +367,6 @@ public function getBeginDate() */ public function setBeginDate($beginDate) { - if (is_null($beginDate)) { - throw new \InvalidArgumentException('non-nullable beginDate cannot be null'); - } $this->container['beginDate'] = $beginDate; return $this; @@ -394,9 +391,6 @@ public function getCardManufacturingProfileId() */ public function setCardManufacturingProfileId($cardManufacturingProfileId) { - if (is_null($cardManufacturingProfileId)) { - throw new \InvalidArgumentException('non-nullable cardManufacturingProfileId cannot be null'); - } $this->container['cardManufacturingProfileId'] = $cardManufacturingProfileId; return $this; @@ -421,9 +415,6 @@ public function getClosedDate() */ public function setClosedDate($closedDate) { - if (is_null($closedDate)) { - throw new \InvalidArgumentException('non-nullable closedDate cannot be null'); - } $this->container['closedDate'] = $closedDate; return $this; @@ -448,9 +439,6 @@ public function getEndDate() */ public function setEndDate($endDate) { - if (is_null($endDate)) { - throw new \InvalidArgumentException('non-nullable endDate cannot be null'); - } $this->container['endDate'] = $endDate; return $this; @@ -475,9 +463,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -502,9 +487,6 @@ public function getLockDate() */ public function setLockDate($lockDate) { - if (is_null($lockDate)) { - throw new \InvalidArgumentException('non-nullable lockDate cannot be null'); - } $this->container['lockDate'] = $lockDate; return $this; @@ -529,9 +511,6 @@ public function getServiceCenter() */ public function setServiceCenter($serviceCenter) { - if (is_null($serviceCenter)) { - throw new \InvalidArgumentException('non-nullable serviceCenter cannot be null'); - } $this->container['serviceCenter'] = $serviceCenter; return $this; @@ -556,9 +535,6 @@ public function getStatus() */ 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( diff --git a/src/Adyen/Model/BalancePlatform/CardOrderItem.php b/src/Adyen/Model/BalancePlatform/CardOrderItem.php index aaecdd0ab..9daff57e3 100644 --- a/src/Adyen/Model/BalancePlatform/CardOrderItem.php +++ b/src/Adyen/Model/BalancePlatform/CardOrderItem.php @@ -344,9 +344,6 @@ public function getBalancePlatform() */ public function setBalancePlatform($balancePlatform) { - if (is_null($balancePlatform)) { - throw new \InvalidArgumentException('non-nullable balancePlatform cannot be null'); - } $this->container['balancePlatform'] = $balancePlatform; return $this; @@ -371,9 +368,6 @@ public function getCard() */ public function setCard($card) { - if (is_null($card)) { - throw new \InvalidArgumentException('non-nullable card cannot be null'); - } $this->container['card'] = $card; return $this; @@ -398,9 +392,6 @@ public function getCardOrderItemId() */ public function setCardOrderItemId($cardOrderItemId) { - if (is_null($cardOrderItemId)) { - throw new \InvalidArgumentException('non-nullable cardOrderItemId cannot be null'); - } $this->container['cardOrderItemId'] = $cardOrderItemId; return $this; @@ -425,9 +416,6 @@ public function getCreationDate() */ public function setCreationDate($creationDate) { - if (is_null($creationDate)) { - throw new \InvalidArgumentException('non-nullable creationDate cannot be null'); - } $this->container['creationDate'] = $creationDate; return $this; @@ -452,9 +440,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -479,9 +464,6 @@ public function getPaymentInstrumentId() */ public function setPaymentInstrumentId($paymentInstrumentId) { - if (is_null($paymentInstrumentId)) { - throw new \InvalidArgumentException('non-nullable paymentInstrumentId cannot be null'); - } $this->container['paymentInstrumentId'] = $paymentInstrumentId; return $this; @@ -506,9 +488,6 @@ public function getPin() */ public function setPin($pin) { - if (is_null($pin)) { - throw new \InvalidArgumentException('non-nullable pin cannot be null'); - } $this->container['pin'] = $pin; return $this; @@ -533,9 +512,6 @@ public function getShippingMethod() */ public function setShippingMethod($shippingMethod) { - if (is_null($shippingMethod)) { - throw new \InvalidArgumentException('non-nullable shippingMethod cannot be null'); - } $this->container['shippingMethod'] = $shippingMethod; return $this; diff --git a/src/Adyen/Model/BalancePlatform/CardOrderItemDeliveryStatus.php b/src/Adyen/Model/BalancePlatform/CardOrderItemDeliveryStatus.php index f13e8dc27..d2ed135a2 100644 --- a/src/Adyen/Model/BalancePlatform/CardOrderItemDeliveryStatus.php +++ b/src/Adyen/Model/BalancePlatform/CardOrderItemDeliveryStatus.php @@ -344,9 +344,6 @@ public function getErrorMessage() */ public function setErrorMessage($errorMessage) { - if (is_null($errorMessage)) { - throw new \InvalidArgumentException('non-nullable errorMessage cannot be null'); - } $this->container['errorMessage'] = $errorMessage; return $this; @@ -371,9 +368,6 @@ public function getStatus() */ 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( @@ -408,9 +402,6 @@ public function getTrackingNumber() */ public function setTrackingNumber($trackingNumber) { - if (is_null($trackingNumber)) { - throw new \InvalidArgumentException('non-nullable trackingNumber cannot be null'); - } $this->container['trackingNumber'] = $trackingNumber; return $this; diff --git a/src/Adyen/Model/BalancePlatform/ContactDetails.php b/src/Adyen/Model/BalancePlatform/ContactDetails.php index 26fd8e5e5..627f1df57 100644 --- a/src/Adyen/Model/BalancePlatform/ContactDetails.php +++ b/src/Adyen/Model/BalancePlatform/ContactDetails.php @@ -325,9 +325,6 @@ public function getAddress() */ public function setAddress($address) { - if (is_null($address)) { - throw new \InvalidArgumentException('non-nullable address cannot be null'); - } $this->container['address'] = $address; return $this; @@ -352,9 +349,6 @@ public function getEmail() */ public function setEmail($email) { - if (is_null($email)) { - throw new \InvalidArgumentException('non-nullable email cannot be null'); - } $this->container['email'] = $email; return $this; @@ -379,9 +373,6 @@ public function getPhone() */ public function setPhone($phone) { - if (is_null($phone)) { - throw new \InvalidArgumentException('non-nullable phone cannot be null'); - } $this->container['phone'] = $phone; return $this; @@ -406,9 +397,6 @@ public function getWebAddress() */ public function setWebAddress($webAddress) { - if (is_null($webAddress)) { - throw new \InvalidArgumentException('non-nullable webAddress cannot be null'); - } $this->container['webAddress'] = $webAddress; return $this; diff --git a/src/Adyen/Model/BalancePlatform/Counterparty.php b/src/Adyen/Model/BalancePlatform/Counterparty.php index 60fe49302..13d5df5f9 100644 --- a/src/Adyen/Model/BalancePlatform/Counterparty.php +++ b/src/Adyen/Model/BalancePlatform/Counterparty.php @@ -302,9 +302,6 @@ public function getBankAccount() */ public function setBankAccount($bankAccount) { - if (is_null($bankAccount)) { - throw new \InvalidArgumentException('non-nullable bankAccount cannot be null'); - } $this->container['bankAccount'] = $bankAccount; return $this; @@ -329,9 +326,6 @@ public function getTransferInstrumentId() */ public function setTransferInstrumentId($transferInstrumentId) { - if (is_null($transferInstrumentId)) { - throw new \InvalidArgumentException('non-nullable transferInstrumentId cannot be null'); - } $this->container['transferInstrumentId'] = $transferInstrumentId; return $this; diff --git a/src/Adyen/Model/BalancePlatform/CounterpartyBankRestriction.php b/src/Adyen/Model/BalancePlatform/CounterpartyBankRestriction.php index 49c33966a..bace924a4 100644 --- a/src/Adyen/Model/BalancePlatform/CounterpartyBankRestriction.php +++ b/src/Adyen/Model/BalancePlatform/CounterpartyBankRestriction.php @@ -305,9 +305,6 @@ public function getOperation() */ public function setOperation($operation) { - if (is_null($operation)) { - throw new \InvalidArgumentException('non-nullable operation cannot be null'); - } $this->container['operation'] = $operation; return $this; @@ -332,9 +329,6 @@ public function getValue() */ public function setValue($value) { - if (is_null($value)) { - throw new \InvalidArgumentException('non-nullable value cannot be null'); - } $this->container['value'] = $value; return $this; diff --git a/src/Adyen/Model/BalancePlatform/CountriesRestriction.php b/src/Adyen/Model/BalancePlatform/CountriesRestriction.php index a2b177943..4158caca3 100644 --- a/src/Adyen/Model/BalancePlatform/CountriesRestriction.php +++ b/src/Adyen/Model/BalancePlatform/CountriesRestriction.php @@ -305,9 +305,6 @@ public function getOperation() */ public function setOperation($operation) { - if (is_null($operation)) { - throw new \InvalidArgumentException('non-nullable operation cannot be null'); - } $this->container['operation'] = $operation; return $this; @@ -332,9 +329,6 @@ public function getValue() */ public function setValue($value) { - if (is_null($value)) { - throw new \InvalidArgumentException('non-nullable value cannot be null'); - } $this->container['value'] = $value; return $this; diff --git a/src/Adyen/Model/BalancePlatform/CreateSweepConfigurationV2.php b/src/Adyen/Model/BalancePlatform/CreateSweepConfigurationV2.php index 8a4750982..4e763381d 100644 --- a/src/Adyen/Model/BalancePlatform/CreateSweepConfigurationV2.php +++ b/src/Adyen/Model/BalancePlatform/CreateSweepConfigurationV2.php @@ -311,6 +311,7 @@ public function getModelName() 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 = 'declined'; public const REASON_DECLINED_BY_TRANSACTION_RULE = 'declinedByTransactionRule'; public const REASON_ERROR = 'error'; public const REASON_NOT_ENOUGH_BALANCE = 'notEnoughBalance'; @@ -370,6 +371,7 @@ public function getReasonAllowableValues() self::REASON_COUNTERPARTY_ADDRESS_REQUIRED, self::REASON_COUNTERPARTY_BANK_TIMED_OUT, self::REASON_COUNTERPARTY_BANK_UNAVAILABLE, + self::REASON_DECLINED, self::REASON_DECLINED_BY_TRANSACTION_RULE, self::REASON_ERROR, self::REASON_NOT_ENOUGH_BALANCE, @@ -541,9 +543,6 @@ public function getCategory() */ 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( @@ -578,9 +577,6 @@ public function getCounterparty() */ public function setCounterparty($counterparty) { - if (is_null($counterparty)) { - throw new \InvalidArgumentException('non-nullable counterparty cannot be null'); - } $this->container['counterparty'] = $counterparty; return $this; @@ -605,9 +601,6 @@ public function getCurrency() */ public function setCurrency($currency) { - if (is_null($currency)) { - throw new \InvalidArgumentException('non-nullable currency cannot be null'); - } $this->container['currency'] = $currency; return $this; @@ -632,9 +625,6 @@ public function getDescription() */ public function setDescription($description) { - if (is_null($description)) { - throw new \InvalidArgumentException('non-nullable description cannot be null'); - } $this->container['description'] = $description; return $this; @@ -653,15 +643,12 @@ public function getPriorities() /** * Sets priorities * - * @param string[]|null $priorities The list of priorities for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. You can provide multiple priorities. Adyen will try to pay out using the priority you list first. If that's not possible, it moves on to the next option in the order of your provided priorities. 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). Set `category` to **bank**. For more details, see optional priorities setup for [marketplaces](https://docs.adyen.com/marketplaces/payout-to-users/scheduled-payouts#optional-priorities-setup) or [platforms](https://docs.adyen.com/platforms/payout-to-users/scheduled-payouts#optional-priorities-setup). + * @param string[]|null $priorities The list of priorities for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. You can provide multiple priorities. Adyen will try to pay out using the priority you list first. If that's not possible, it moves on to the next option in the order of your provided priorities. Possible values: * **regular**: for normal, low-value transactions. * **fast**: a faster way to transfer funds, but the fees are higher. Recommended for high-priority, low-value transactions. * **wire**: the fastest way to transfer funds, but this has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: for instant funds transfers in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: for high-value transfers to a recipient in a different country. * **internal**: for transfers to an Adyen-issued business bank account (by bank account number/IBAN). Set `category` to **bank**. For more details, see optional priorities setup for [marketplaces](https://docs.adyen.com/marketplaces/payout-to-users/scheduled-payouts#optional-priorities-setup) or [platforms](https://docs.adyen.com/platforms/payout-to-users/scheduled-payouts#optional-priorities-setup). * * @return self */ public function setPriorities($priorities) { - if (is_null($priorities)) { - throw new \InvalidArgumentException('non-nullable priorities cannot be null'); - } $allowedValues = $this->getPrioritiesAllowableValues(); if (array_diff($priorities, $allowedValues)) { throw new \InvalidArgumentException( @@ -695,9 +682,6 @@ public function getReason() */ 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( @@ -732,9 +716,6 @@ public function getReference() */ public function setReference($reference) { - if (is_null($reference)) { - throw new \InvalidArgumentException('non-nullable reference cannot be null'); - } $this->container['reference'] = $reference; return $this; @@ -759,9 +740,6 @@ public function getReferenceForBeneficiary() */ public function setReferenceForBeneficiary($referenceForBeneficiary) { - if (is_null($referenceForBeneficiary)) { - throw new \InvalidArgumentException('non-nullable referenceForBeneficiary cannot be null'); - } $this->container['referenceForBeneficiary'] = $referenceForBeneficiary; return $this; @@ -786,9 +764,6 @@ public function getSchedule() */ public function setSchedule($schedule) { - if (is_null($schedule)) { - throw new \InvalidArgumentException('non-nullable schedule cannot be null'); - } $this->container['schedule'] = $schedule; return $this; @@ -813,9 +788,6 @@ public function getStatus() */ 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( @@ -850,9 +822,6 @@ public function getSweepAmount() */ public function setSweepAmount($sweepAmount) { - if (is_null($sweepAmount)) { - throw new \InvalidArgumentException('non-nullable sweepAmount cannot be null'); - } $this->container['sweepAmount'] = $sweepAmount; return $this; @@ -877,9 +846,6 @@ public function getTargetAmount() */ public function setTargetAmount($targetAmount) { - if (is_null($targetAmount)) { - throw new \InvalidArgumentException('non-nullable targetAmount cannot be null'); - } $this->container['targetAmount'] = $targetAmount; return $this; @@ -904,9 +870,6 @@ public function getTriggerAmount() */ public function setTriggerAmount($triggerAmount) { - if (is_null($triggerAmount)) { - throw new \InvalidArgumentException('non-nullable triggerAmount cannot be null'); - } $this->container['triggerAmount'] = $triggerAmount; return $this; @@ -931,9 +894,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/BalancePlatform/DKLocalAccountIdentification.php b/src/Adyen/Model/BalancePlatform/DKLocalAccountIdentification.php index 43f7ceb03..68b30b8bd 100644 --- a/src/Adyen/Model/BalancePlatform/DKLocalAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/DKLocalAccountIdentification.php @@ -339,9 +339,6 @@ public function getAccountNumber() */ public function setAccountNumber($accountNumber) { - if (is_null($accountNumber)) { - throw new \InvalidArgumentException('non-nullable accountNumber cannot be null'); - } $this->container['accountNumber'] = $accountNumber; return $this; @@ -366,9 +363,6 @@ public function getBankCode() */ public function setBankCode($bankCode) { - if (is_null($bankCode)) { - throw new \InvalidArgumentException('non-nullable bankCode cannot be null'); - } $this->container['bankCode'] = $bankCode; return $this; @@ -393,9 +387,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/BalancePlatform/DayOfWeekRestriction.php b/src/Adyen/Model/BalancePlatform/DayOfWeekRestriction.php index d28cc823e..3ef38b89e 100644 --- a/src/Adyen/Model/BalancePlatform/DayOfWeekRestriction.php +++ b/src/Adyen/Model/BalancePlatform/DayOfWeekRestriction.php @@ -329,9 +329,6 @@ public function getOperation() */ public function setOperation($operation) { - if (is_null($operation)) { - throw new \InvalidArgumentException('non-nullable operation cannot be null'); - } $this->container['operation'] = $operation; return $this; @@ -356,9 +353,6 @@ public function getValue() */ public function setValue($value) { - if (is_null($value)) { - throw new \InvalidArgumentException('non-nullable value cannot be null'); - } $allowedValues = $this->getValueAllowableValues(); if (array_diff($value, $allowedValues)) { throw new \InvalidArgumentException( diff --git a/src/Adyen/Model/BalancePlatform/DelegatedAuthenticationData.php b/src/Adyen/Model/BalancePlatform/DelegatedAuthenticationData.php index b4467f53e..97dfd8ec8 100644 --- a/src/Adyen/Model/BalancePlatform/DelegatedAuthenticationData.php +++ b/src/Adyen/Model/BalancePlatform/DelegatedAuthenticationData.php @@ -298,9 +298,6 @@ public function getSdkOutput() */ public function setSdkOutput($sdkOutput) { - if (is_null($sdkOutput)) { - throw new \InvalidArgumentException('non-nullable sdkOutput cannot be null'); - } $this->container['sdkOutput'] = $sdkOutput; return $this; diff --git a/src/Adyen/Model/BalancePlatform/DeliveryAddress.php b/src/Adyen/Model/BalancePlatform/DeliveryAddress.php index 30b110386..bfaedf867 100644 --- a/src/Adyen/Model/BalancePlatform/DeliveryAddress.php +++ b/src/Adyen/Model/BalancePlatform/DeliveryAddress.php @@ -340,9 +340,6 @@ public function getCity() */ public function setCity($city) { - if (is_null($city)) { - throw new \InvalidArgumentException('non-nullable city cannot be null'); - } $this->container['city'] = $city; return $this; @@ -367,9 +364,6 @@ public function getCountry() */ public function setCountry($country) { - if (is_null($country)) { - throw new \InvalidArgumentException('non-nullable country cannot be null'); - } $this->container['country'] = $country; return $this; @@ -394,9 +388,6 @@ public function getLine1() */ public function setLine1($line1) { - if (is_null($line1)) { - throw new \InvalidArgumentException('non-nullable line1 cannot be null'); - } $this->container['line1'] = $line1; return $this; @@ -421,9 +412,6 @@ public function getLine2() */ public function setLine2($line2) { - if (is_null($line2)) { - throw new \InvalidArgumentException('non-nullable line2 cannot be null'); - } $this->container['line2'] = $line2; return $this; @@ -448,9 +436,6 @@ public function getLine3() */ public function setLine3($line3) { - if (is_null($line3)) { - throw new \InvalidArgumentException('non-nullable line3 cannot be null'); - } $this->container['line3'] = $line3; return $this; @@ -475,9 +460,6 @@ public function getPostalCode() */ public function setPostalCode($postalCode) { - if (is_null($postalCode)) { - throw new \InvalidArgumentException('non-nullable postalCode cannot be null'); - } $this->container['postalCode'] = $postalCode; return $this; @@ -502,9 +484,6 @@ public function getStateOrProvince() */ public function setStateOrProvince($stateOrProvince) { - if (is_null($stateOrProvince)) { - throw new \InvalidArgumentException('non-nullable stateOrProvince cannot be null'); - } $this->container['stateOrProvince'] = $stateOrProvince; return $this; diff --git a/src/Adyen/Model/BalancePlatform/DeliveryContact.php b/src/Adyen/Model/BalancePlatform/DeliveryContact.php index aaab6800f..f39a04bbb 100644 --- a/src/Adyen/Model/BalancePlatform/DeliveryContact.php +++ b/src/Adyen/Model/BalancePlatform/DeliveryContact.php @@ -343,9 +343,6 @@ public function getAddress() */ public function setAddress($address) { - if (is_null($address)) { - throw new \InvalidArgumentException('non-nullable address cannot be null'); - } $this->container['address'] = $address; return $this; @@ -370,9 +367,6 @@ public function getCompany() */ public function setCompany($company) { - if (is_null($company)) { - throw new \InvalidArgumentException('non-nullable company cannot be null'); - } $this->container['company'] = $company; return $this; @@ -397,9 +391,6 @@ public function getEmail() */ public function setEmail($email) { - if (is_null($email)) { - throw new \InvalidArgumentException('non-nullable email cannot be null'); - } $this->container['email'] = $email; return $this; @@ -424,9 +415,6 @@ public function getFullPhoneNumber() */ public function setFullPhoneNumber($fullPhoneNumber) { - if (is_null($fullPhoneNumber)) { - throw new \InvalidArgumentException('non-nullable fullPhoneNumber cannot be null'); - } $this->container['fullPhoneNumber'] = $fullPhoneNumber; return $this; @@ -451,9 +439,6 @@ public function getName() */ public function setName($name) { - if (is_null($name)) { - throw new \InvalidArgumentException('non-nullable name cannot be null'); - } $this->container['name'] = $name; return $this; @@ -478,9 +463,6 @@ public function getPhoneNumber() */ public function setPhoneNumber($phoneNumber) { - if (is_null($phoneNumber)) { - throw new \InvalidArgumentException('non-nullable phoneNumber cannot be null'); - } $this->container['phoneNumber'] = $phoneNumber; return $this; @@ -505,9 +487,6 @@ public function getWebAddress() */ public function setWebAddress($webAddress) { - if (is_null($webAddress)) { - throw new \InvalidArgumentException('non-nullable webAddress cannot be null'); - } $this->container['webAddress'] = $webAddress; return $this; diff --git a/src/Adyen/Model/BalancePlatform/Device.php b/src/Adyen/Model/BalancePlatform/Device.php index d3714bf37..bee2ed1a2 100644 --- a/src/Adyen/Model/BalancePlatform/Device.php +++ b/src/Adyen/Model/BalancePlatform/Device.php @@ -341,9 +341,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -368,9 +365,6 @@ public function getName() */ public function setName($name) { - if (is_null($name)) { - throw new \InvalidArgumentException('non-nullable name cannot be null'); - } $this->container['name'] = $name; return $this; @@ -395,9 +389,6 @@ public function getPaymentInstrumentId() */ public function setPaymentInstrumentId($paymentInstrumentId) { - if (is_null($paymentInstrumentId)) { - throw new \InvalidArgumentException('non-nullable paymentInstrumentId cannot be null'); - } $this->container['paymentInstrumentId'] = $paymentInstrumentId; return $this; @@ -422,9 +413,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/BalancePlatform/DeviceInfo.php b/src/Adyen/Model/BalancePlatform/DeviceInfo.php index ea6368a4c..63d63864a 100644 --- a/src/Adyen/Model/BalancePlatform/DeviceInfo.php +++ b/src/Adyen/Model/BalancePlatform/DeviceInfo.php @@ -365,9 +365,6 @@ public function getCardCaptureTechnology() */ public function setCardCaptureTechnology($cardCaptureTechnology) { - if (is_null($cardCaptureTechnology)) { - throw new \InvalidArgumentException('non-nullable cardCaptureTechnology cannot be null'); - } $this->container['cardCaptureTechnology'] = $cardCaptureTechnology; return $this; @@ -392,9 +389,6 @@ public function getDeviceName() */ public function setDeviceName($deviceName) { - if (is_null($deviceName)) { - throw new \InvalidArgumentException('non-nullable deviceName cannot be null'); - } $this->container['deviceName'] = $deviceName; return $this; @@ -419,9 +413,6 @@ public function getFormFactor() */ public function setFormFactor($formFactor) { - if (is_null($formFactor)) { - throw new \InvalidArgumentException('non-nullable formFactor cannot be null'); - } $this->container['formFactor'] = $formFactor; return $this; @@ -446,9 +437,6 @@ public function getImei() */ public function setImei($imei) { - if (is_null($imei)) { - throw new \InvalidArgumentException('non-nullable imei cannot be null'); - } $this->container['imei'] = $imei; return $this; @@ -473,9 +461,6 @@ public function getIsoDeviceType() */ public function setIsoDeviceType($isoDeviceType) { - if (is_null($isoDeviceType)) { - throw new \InvalidArgumentException('non-nullable isoDeviceType cannot be null'); - } $this->container['isoDeviceType'] = $isoDeviceType; return $this; @@ -500,9 +485,6 @@ public function getMsisdn() */ public function setMsisdn($msisdn) { - if (is_null($msisdn)) { - throw new \InvalidArgumentException('non-nullable msisdn cannot be null'); - } $this->container['msisdn'] = $msisdn; return $this; @@ -527,9 +509,6 @@ public function getOsName() */ public function setOsName($osName) { - if (is_null($osName)) { - throw new \InvalidArgumentException('non-nullable osName cannot be null'); - } $this->container['osName'] = $osName; return $this; @@ -554,9 +533,6 @@ public function getOsVersion() */ public function setOsVersion($osVersion) { - if (is_null($osVersion)) { - throw new \InvalidArgumentException('non-nullable osVersion cannot be null'); - } $this->container['osVersion'] = $osVersion; return $this; @@ -581,9 +557,6 @@ public function getPaymentTypes() */ public function setPaymentTypes($paymentTypes) { - if (is_null($paymentTypes)) { - throw new \InvalidArgumentException('non-nullable paymentTypes cannot be null'); - } $this->container['paymentTypes'] = $paymentTypes; return $this; @@ -608,9 +581,6 @@ public function getSerialNumber() */ public function setSerialNumber($serialNumber) { - if (is_null($serialNumber)) { - throw new \InvalidArgumentException('non-nullable serialNumber cannot be null'); - } $this->container['serialNumber'] = $serialNumber; return $this; @@ -635,9 +605,6 @@ public function getStorageTechnology() */ public function setStorageTechnology($storageTechnology) { - if (is_null($storageTechnology)) { - throw new \InvalidArgumentException('non-nullable storageTechnology cannot be null'); - } $this->container['storageTechnology'] = $storageTechnology; return $this; diff --git a/src/Adyen/Model/BalancePlatform/DifferentCurrenciesRestriction.php b/src/Adyen/Model/BalancePlatform/DifferentCurrenciesRestriction.php index 5e17ff237..4861c5338 100644 --- a/src/Adyen/Model/BalancePlatform/DifferentCurrenciesRestriction.php +++ b/src/Adyen/Model/BalancePlatform/DifferentCurrenciesRestriction.php @@ -305,9 +305,6 @@ public function getOperation() */ public function setOperation($operation) { - if (is_null($operation)) { - throw new \InvalidArgumentException('non-nullable operation cannot be null'); - } $this->container['operation'] = $operation; return $this; @@ -332,9 +329,6 @@ public function getValue() */ public function setValue($value) { - if (is_null($value)) { - throw new \InvalidArgumentException('non-nullable value cannot be null'); - } $this->container['value'] = $value; return $this; diff --git a/src/Adyen/Model/BalancePlatform/Duration.php b/src/Adyen/Model/BalancePlatform/Duration.php index 59d7e03ff..326c06e9c 100644 --- a/src/Adyen/Model/BalancePlatform/Duration.php +++ b/src/Adyen/Model/BalancePlatform/Duration.php @@ -331,9 +331,6 @@ public function getUnit() */ public function setUnit($unit) { - if (is_null($unit)) { - throw new \InvalidArgumentException('non-nullable unit cannot be null'); - } $allowedValues = $this->getUnitAllowableValues(); if (!in_array($unit, $allowedValues, true)) { throw new \InvalidArgumentException( @@ -368,7 +365,6 @@ public function getValue() */ public function setValue($value) { - // Do nothing for nullable integers $this->container['value'] = $value; return $this; diff --git a/src/Adyen/Model/BalancePlatform/EntryModesRestriction.php b/src/Adyen/Model/BalancePlatform/EntryModesRestriction.php index a59c1b215..db23e1ae1 100644 --- a/src/Adyen/Model/BalancePlatform/EntryModesRestriction.php +++ b/src/Adyen/Model/BalancePlatform/EntryModesRestriction.php @@ -333,9 +333,6 @@ public function getOperation() */ public function setOperation($operation) { - if (is_null($operation)) { - throw new \InvalidArgumentException('non-nullable operation cannot be null'); - } $this->container['operation'] = $operation; return $this; @@ -360,9 +357,6 @@ public function getValue() */ public function setValue($value) { - if (is_null($value)) { - throw new \InvalidArgumentException('non-nullable value cannot be null'); - } $allowedValues = $this->getValueAllowableValues(); if (array_diff($value, $allowedValues)) { throw new \InvalidArgumentException( diff --git a/src/Adyen/Model/BalancePlatform/Expiry.php b/src/Adyen/Model/BalancePlatform/Expiry.php index 5de0f43ab..17669449e 100644 --- a/src/Adyen/Model/BalancePlatform/Expiry.php +++ b/src/Adyen/Model/BalancePlatform/Expiry.php @@ -302,9 +302,6 @@ public function getMonth() */ public function setMonth($month) { - if (is_null($month)) { - throw new \InvalidArgumentException('non-nullable month cannot be null'); - } $this->container['month'] = $month; return $this; @@ -329,9 +326,6 @@ public function getYear() */ public function setYear($year) { - if (is_null($year)) { - throw new \InvalidArgumentException('non-nullable year cannot be null'); - } $this->container['year'] = $year; return $this; diff --git a/src/Adyen/Model/BalancePlatform/Fee.php b/src/Adyen/Model/BalancePlatform/Fee.php index 85f60ec38..42081c8f3 100644 --- a/src/Adyen/Model/BalancePlatform/Fee.php +++ b/src/Adyen/Model/BalancePlatform/Fee.php @@ -298,9 +298,6 @@ public function getAmount() */ public function setAmount($amount) { - if (is_null($amount)) { - throw new \InvalidArgumentException('non-nullable amount cannot be null'); - } $this->container['amount'] = $amount; return $this; diff --git a/src/Adyen/Model/BalancePlatform/GetNetworkTokenResponse.php b/src/Adyen/Model/BalancePlatform/GetNetworkTokenResponse.php index 8905d17cb..0438127b5 100644 --- a/src/Adyen/Model/BalancePlatform/GetNetworkTokenResponse.php +++ b/src/Adyen/Model/BalancePlatform/GetNetworkTokenResponse.php @@ -298,9 +298,6 @@ public function getToken() */ public function setToken($token) { - if (is_null($token)) { - throw new \InvalidArgumentException('non-nullable token cannot be null'); - } $this->container['token'] = $token; return $this; diff --git a/src/Adyen/Model/BalancePlatform/GetTaxFormResponse.php b/src/Adyen/Model/BalancePlatform/GetTaxFormResponse.php index a6442a397..b76bce02e 100644 --- a/src/Adyen/Model/BalancePlatform/GetTaxFormResponse.php +++ b/src/Adyen/Model/BalancePlatform/GetTaxFormResponse.php @@ -326,9 +326,6 @@ public function getContent() */ public function setContent($content) { - if (is_null($content)) { - throw new \InvalidArgumentException('non-nullable content cannot be null'); - } $this->container['content'] = $content; return $this; @@ -353,9 +350,6 @@ public function getContentType() */ public function setContentType($contentType) { - if (is_null($contentType)) { - throw new \InvalidArgumentException('non-nullable contentType cannot be null'); - } $allowedValues = $this->getContentTypeAllowableValues(); if (!in_array($contentType, $allowedValues, true)) { throw new \InvalidArgumentException( diff --git a/src/Adyen/Model/BalancePlatform/GrantLimit.php b/src/Adyen/Model/BalancePlatform/GrantLimit.php index 08da0b479..da92f155c 100644 --- a/src/Adyen/Model/BalancePlatform/GrantLimit.php +++ b/src/Adyen/Model/BalancePlatform/GrantLimit.php @@ -295,9 +295,6 @@ public function getAmount() */ public function setAmount($amount) { - if (is_null($amount)) { - throw new \InvalidArgumentException('non-nullable amount cannot be null'); - } $this->container['amount'] = $amount; return $this; diff --git a/src/Adyen/Model/BalancePlatform/GrantOffer.php b/src/Adyen/Model/BalancePlatform/GrantOffer.php index deb388751..9d8cc6f99 100644 --- a/src/Adyen/Model/BalancePlatform/GrantOffer.php +++ b/src/Adyen/Model/BalancePlatform/GrantOffer.php @@ -370,9 +370,6 @@ public function getAccountHolderId() */ public function setAccountHolderId($accountHolderId) { - if (is_null($accountHolderId)) { - throw new \InvalidArgumentException('non-nullable accountHolderId cannot be null'); - } $this->container['accountHolderId'] = $accountHolderId; return $this; @@ -397,9 +394,6 @@ public function getAmount() */ public function setAmount($amount) { - if (is_null($amount)) { - throw new \InvalidArgumentException('non-nullable amount cannot be null'); - } $this->container['amount'] = $amount; return $this; @@ -424,9 +418,6 @@ public function getContractType() */ public function setContractType($contractType) { - if (is_null($contractType)) { - throw new \InvalidArgumentException('non-nullable contractType cannot be null'); - } $allowedValues = $this->getContractTypeAllowableValues(); if (!in_array($contractType, $allowedValues, true)) { throw new \InvalidArgumentException( @@ -461,9 +452,6 @@ public function getExpiresAt() */ public function setExpiresAt($expiresAt) { - if (is_null($expiresAt)) { - throw new \InvalidArgumentException('non-nullable expiresAt cannot be null'); - } $this->container['expiresAt'] = $expiresAt; return $this; @@ -488,9 +476,6 @@ public function getFee() */ public function setFee($fee) { - if (is_null($fee)) { - throw new \InvalidArgumentException('non-nullable fee cannot be null'); - } $this->container['fee'] = $fee; return $this; @@ -515,9 +500,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -542,9 +524,6 @@ public function getRepayment() */ public function setRepayment($repayment) { - if (is_null($repayment)) { - throw new \InvalidArgumentException('non-nullable repayment cannot be null'); - } $this->container['repayment'] = $repayment; return $this; @@ -569,9 +548,6 @@ public function getStartsAt() */ public function setStartsAt($startsAt) { - if (is_null($startsAt)) { - throw new \InvalidArgumentException('non-nullable startsAt cannot be null'); - } $this->container['startsAt'] = $startsAt; return $this; diff --git a/src/Adyen/Model/BalancePlatform/GrantOffers.php b/src/Adyen/Model/BalancePlatform/GrantOffers.php index 304874aa2..d70d8e861 100644 --- a/src/Adyen/Model/BalancePlatform/GrantOffers.php +++ b/src/Adyen/Model/BalancePlatform/GrantOffers.php @@ -298,9 +298,6 @@ public function getGrantOffers() */ public function setGrantOffers($grantOffers) { - if (is_null($grantOffers)) { - throw new \InvalidArgumentException('non-nullable grantOffers cannot be null'); - } $this->container['grantOffers'] = $grantOffers; return $this; diff --git a/src/Adyen/Model/BalancePlatform/HKLocalAccountIdentification.php b/src/Adyen/Model/BalancePlatform/HKLocalAccountIdentification.php index cd6e32741..a4da763b7 100644 --- a/src/Adyen/Model/BalancePlatform/HKLocalAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/HKLocalAccountIdentification.php @@ -339,9 +339,6 @@ public function getAccountNumber() */ public function setAccountNumber($accountNumber) { - if (is_null($accountNumber)) { - throw new \InvalidArgumentException('non-nullable accountNumber cannot be null'); - } $this->container['accountNumber'] = $accountNumber; return $this; @@ -366,9 +363,6 @@ public function getClearingCode() */ public function setClearingCode($clearingCode) { - if (is_null($clearingCode)) { - throw new \InvalidArgumentException('non-nullable clearingCode cannot be null'); - } $this->container['clearingCode'] = $clearingCode; return $this; @@ -393,9 +387,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/BalancePlatform/HULocalAccountIdentification.php b/src/Adyen/Model/BalancePlatform/HULocalAccountIdentification.php index cd58523f4..3c7f514b3 100644 --- a/src/Adyen/Model/BalancePlatform/HULocalAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/HULocalAccountIdentification.php @@ -329,9 +329,6 @@ public function getAccountNumber() */ public function setAccountNumber($accountNumber) { - if (is_null($accountNumber)) { - throw new \InvalidArgumentException('non-nullable accountNumber cannot be null'); - } $this->container['accountNumber'] = $accountNumber; return $this; @@ -356,9 +353,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/BalancePlatform/Href.php b/src/Adyen/Model/BalancePlatform/Href.php index 8d05b2804..dbd354e8d 100644 --- a/src/Adyen/Model/BalancePlatform/Href.php +++ b/src/Adyen/Model/BalancePlatform/Href.php @@ -295,9 +295,6 @@ public function getHref() */ public function setHref($href) { - if (is_null($href)) { - throw new \InvalidArgumentException('non-nullable href cannot be null'); - } $this->container['href'] = $href; return $this; diff --git a/src/Adyen/Model/BalancePlatform/IbanAccountIdentification.php b/src/Adyen/Model/BalancePlatform/IbanAccountIdentification.php index 275b8a04b..6ba78ccaa 100644 --- a/src/Adyen/Model/BalancePlatform/IbanAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/IbanAccountIdentification.php @@ -329,9 +329,6 @@ public function getIban() */ public function setIban($iban) { - if (is_null($iban)) { - throw new \InvalidArgumentException('non-nullable iban cannot be null'); - } $this->container['iban'] = $iban; return $this; @@ -356,9 +353,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/BalancePlatform/InternationalTransactionRestriction.php b/src/Adyen/Model/BalancePlatform/InternationalTransactionRestriction.php index ca1250f56..f9418ea64 100644 --- a/src/Adyen/Model/BalancePlatform/InternationalTransactionRestriction.php +++ b/src/Adyen/Model/BalancePlatform/InternationalTransactionRestriction.php @@ -305,9 +305,6 @@ public function getOperation() */ public function setOperation($operation) { - if (is_null($operation)) { - throw new \InvalidArgumentException('non-nullable operation cannot be null'); - } $this->container['operation'] = $operation; return $this; @@ -332,9 +329,6 @@ public function getValue() */ public function setValue($value) { - if (is_null($value)) { - throw new \InvalidArgumentException('non-nullable value cannot be null'); - } $this->container['value'] = $value; return $this; diff --git a/src/Adyen/Model/BalancePlatform/InvalidField.php b/src/Adyen/Model/BalancePlatform/InvalidField.php index e0d0fd0eb..d8339efca 100644 --- a/src/Adyen/Model/BalancePlatform/InvalidField.php +++ b/src/Adyen/Model/BalancePlatform/InvalidField.php @@ -318,9 +318,6 @@ public function getMessage() */ public function setMessage($message) { - if (is_null($message)) { - throw new \InvalidArgumentException('non-nullable message cannot be null'); - } $this->container['message'] = $message; return $this; @@ -345,9 +342,6 @@ public function getName() */ public function setName($name) { - if (is_null($name)) { - throw new \InvalidArgumentException('non-nullable name cannot be null'); - } $this->container['name'] = $name; return $this; @@ -372,9 +366,6 @@ public function getValue() */ public function setValue($value) { - if (is_null($value)) { - throw new \InvalidArgumentException('non-nullable value cannot be null'); - } $this->container['value'] = $value; return $this; diff --git a/src/Adyen/Model/BalancePlatform/Link.php b/src/Adyen/Model/BalancePlatform/Link.php index 6789475a6..2e93737e3 100644 --- a/src/Adyen/Model/BalancePlatform/Link.php +++ b/src/Adyen/Model/BalancePlatform/Link.php @@ -323,9 +323,6 @@ public function getFirst() */ public function setFirst($first) { - if (is_null($first)) { - throw new \InvalidArgumentException('non-nullable first cannot be null'); - } $this->container['first'] = $first; return $this; @@ -350,9 +347,6 @@ public function getLast() */ public function setLast($last) { - if (is_null($last)) { - throw new \InvalidArgumentException('non-nullable last cannot be null'); - } $this->container['last'] = $last; return $this; @@ -377,9 +371,6 @@ public function getNext() */ public function setNext($next) { - if (is_null($next)) { - throw new \InvalidArgumentException('non-nullable next cannot be null'); - } $this->container['next'] = $next; return $this; @@ -404,9 +395,6 @@ public function getPrevious() */ public function setPrevious($previous) { - if (is_null($previous)) { - throw new \InvalidArgumentException('non-nullable previous cannot be null'); - } $this->container['previous'] = $previous; return $this; @@ -431,9 +419,6 @@ public function getSelf() */ public function setSelf($self) { - if (is_null($self)) { - throw new \InvalidArgumentException('non-nullable self cannot be null'); - } $this->container['self'] = $self; return $this; diff --git a/src/Adyen/Model/BalancePlatform/ListNetworkTokensResponse.php b/src/Adyen/Model/BalancePlatform/ListNetworkTokensResponse.php index 7cb3d9161..bbc922130 100644 --- a/src/Adyen/Model/BalancePlatform/ListNetworkTokensResponse.php +++ b/src/Adyen/Model/BalancePlatform/ListNetworkTokensResponse.php @@ -295,9 +295,6 @@ public function getNetworkTokens() */ public function setNetworkTokens($networkTokens) { - if (is_null($networkTokens)) { - throw new \InvalidArgumentException('non-nullable networkTokens cannot be null'); - } $this->container['networkTokens'] = $networkTokens; return $this; diff --git a/src/Adyen/Model/BalancePlatform/MatchingTransactionsRestriction.php b/src/Adyen/Model/BalancePlatform/MatchingTransactionsRestriction.php index 60a2d69b7..68812e705 100644 --- a/src/Adyen/Model/BalancePlatform/MatchingTransactionsRestriction.php +++ b/src/Adyen/Model/BalancePlatform/MatchingTransactionsRestriction.php @@ -305,9 +305,6 @@ public function getOperation() */ public function setOperation($operation) { - if (is_null($operation)) { - throw new \InvalidArgumentException('non-nullable operation cannot be null'); - } $this->container['operation'] = $operation; return $this; @@ -332,7 +329,6 @@ public function getValue() */ public function setValue($value) { - // Do nothing for nullable integers $this->container['value'] = $value; return $this; diff --git a/src/Adyen/Model/BalancePlatform/MatchingValuesRestriction.php b/src/Adyen/Model/BalancePlatform/MatchingValuesRestriction.php new file mode 100644 index 000000000..e8c63ad97 --- /dev/null +++ b/src/Adyen/Model/BalancePlatform/MatchingValuesRestriction.php @@ -0,0 +1,470 @@ + + */ +class MatchingValuesRestriction implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'MatchingValuesRestriction'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'operation' => 'string', + 'value' => 'string[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'operation' => null, + 'value' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'operation' => 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 = [ + 'operation' => 'operation', + 'value' => 'value' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'operation' => 'setOperation', + 'value' => 'setValue' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'operation' => 'getOperation', + '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 VALUE_ACQUIRER_ID = 'acquirerId'; + public const VALUE_AMOUNT = 'amount'; + public const VALUE_CURRENCY = 'currency'; + public const VALUE_MERCHANT_ID = 'merchantId'; + public const VALUE_MERCHANT_NAME = 'merchantName'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getValueAllowableValues() + { + return [ + self::VALUE_ACQUIRER_ID, + self::VALUE_AMOUNT, + self::VALUE_CURRENCY, + self::VALUE_MERCHANT_ID, + self::VALUE_MERCHANT_NAME, + ]; + } + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('operation', $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['operation'] === null) { + $invalidProperties[] = "'operation' 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 operation + * + * @return string + */ + public function getOperation() + { + return $this->container['operation']; + } + + /** + * Sets operation + * + * @param string $operation Defines how the condition must be evaluated. + * + * @return self + */ + public function setOperation($operation) + { + $this->container['operation'] = $operation; + + return $this; + } + + /** + * Gets value + * + * @return string[]|null + */ + public function getValue() + { + return $this->container['value']; + } + + /** + * Sets value + * + * @param string[]|null $value value + * + * @return self + */ + public function setValue($value) + { + $allowedValues = $this->getValueAllowableValues(); + if (array_diff($value, $allowedValues)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'value', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $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); + } + + public function toArray(): array + { + $array = []; + foreach (self::$openAPITypes as $propertyName => $propertyType) { + $propertyValue = $this[$propertyName]; + if ($propertyValue !== null) { + // Check if the property value is an object and has a toArray() method + if (is_object($propertyValue) && method_exists($propertyValue, 'toArray')) { + $array[$propertyName] = $propertyValue->toArray(); + // Check if it's type datetime + } elseif ($propertyValue instanceof \DateTime) { + $array[$propertyName] = $propertyValue->format(DATE_ATOM); + // If it's an array type we should check whether it contains objects and if so call toArray method + } elseif (is_array($propertyValue)) { + $array[$propertyName] = array_map(function ($item) { + return $item instanceof ModelInterface ? $item->toArray() : $item; + }, $propertyValue); + } else { + // Otherwise, directly assign the property value to the array + $array[$propertyName] = $propertyValue; + } + } + } + return $array; + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} diff --git a/src/Adyen/Model/BalancePlatform/MccsRestriction.php b/src/Adyen/Model/BalancePlatform/MccsRestriction.php index aff461ad1..d01d8ad58 100644 --- a/src/Adyen/Model/BalancePlatform/MccsRestriction.php +++ b/src/Adyen/Model/BalancePlatform/MccsRestriction.php @@ -305,9 +305,6 @@ public function getOperation() */ public function setOperation($operation) { - if (is_null($operation)) { - throw new \InvalidArgumentException('non-nullable operation cannot be null'); - } $this->container['operation'] = $operation; return $this; @@ -332,9 +329,6 @@ public function getValue() */ public function setValue($value) { - if (is_null($value)) { - throw new \InvalidArgumentException('non-nullable value cannot be null'); - } $this->container['value'] = $value; return $this; diff --git a/src/Adyen/Model/BalancePlatform/MerchantAcquirerPair.php b/src/Adyen/Model/BalancePlatform/MerchantAcquirerPair.php index f4aadc71a..a6349f731 100644 --- a/src/Adyen/Model/BalancePlatform/MerchantAcquirerPair.php +++ b/src/Adyen/Model/BalancePlatform/MerchantAcquirerPair.php @@ -302,9 +302,6 @@ public function getAcquirerId() */ public function setAcquirerId($acquirerId) { - if (is_null($acquirerId)) { - throw new \InvalidArgumentException('non-nullable acquirerId cannot be null'); - } $this->container['acquirerId'] = $acquirerId; return $this; @@ -329,9 +326,6 @@ public function getMerchantId() */ public function setMerchantId($merchantId) { - if (is_null($merchantId)) { - throw new \InvalidArgumentException('non-nullable merchantId cannot be null'); - } $this->container['merchantId'] = $merchantId; return $this; diff --git a/src/Adyen/Model/BalancePlatform/MerchantNamesRestriction.php b/src/Adyen/Model/BalancePlatform/MerchantNamesRestriction.php index 3a9499ed0..89a07a376 100644 --- a/src/Adyen/Model/BalancePlatform/MerchantNamesRestriction.php +++ b/src/Adyen/Model/BalancePlatform/MerchantNamesRestriction.php @@ -305,9 +305,6 @@ public function getOperation() */ public function setOperation($operation) { - if (is_null($operation)) { - throw new \InvalidArgumentException('non-nullable operation cannot be null'); - } $this->container['operation'] = $operation; return $this; @@ -332,9 +329,6 @@ public function getValue() */ public function setValue($value) { - if (is_null($value)) { - throw new \InvalidArgumentException('non-nullable value cannot be null'); - } $this->container['value'] = $value; return $this; diff --git a/src/Adyen/Model/BalancePlatform/MerchantsRestriction.php b/src/Adyen/Model/BalancePlatform/MerchantsRestriction.php index de4e505d4..e12a90711 100644 --- a/src/Adyen/Model/BalancePlatform/MerchantsRestriction.php +++ b/src/Adyen/Model/BalancePlatform/MerchantsRestriction.php @@ -305,9 +305,6 @@ public function getOperation() */ public function setOperation($operation) { - if (is_null($operation)) { - throw new \InvalidArgumentException('non-nullable operation cannot be null'); - } $this->container['operation'] = $operation; return $this; @@ -332,9 +329,6 @@ public function getValue() */ public function setValue($value) { - if (is_null($value)) { - throw new \InvalidArgumentException('non-nullable value cannot be null'); - } $this->container['value'] = $value; return $this; diff --git a/src/Adyen/Model/BalancePlatform/NOLocalAccountIdentification.php b/src/Adyen/Model/BalancePlatform/NOLocalAccountIdentification.php index 6d54a683e..af820b526 100644 --- a/src/Adyen/Model/BalancePlatform/NOLocalAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/NOLocalAccountIdentification.php @@ -329,9 +329,6 @@ public function getAccountNumber() */ public function setAccountNumber($accountNumber) { - if (is_null($accountNumber)) { - throw new \InvalidArgumentException('non-nullable accountNumber cannot be null'); - } $this->container['accountNumber'] = $accountNumber; return $this; @@ -356,9 +353,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/BalancePlatform/NZLocalAccountIdentification.php b/src/Adyen/Model/BalancePlatform/NZLocalAccountIdentification.php index 82c72cf18..4881b4bd4 100644 --- a/src/Adyen/Model/BalancePlatform/NZLocalAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/NZLocalAccountIdentification.php @@ -329,9 +329,6 @@ public function getAccountNumber() */ public function setAccountNumber($accountNumber) { - if (is_null($accountNumber)) { - throw new \InvalidArgumentException('non-nullable accountNumber cannot be null'); - } $this->container['accountNumber'] = $accountNumber; return $this; @@ -356,9 +353,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/BalancePlatform/Name.php b/src/Adyen/Model/BalancePlatform/Name.php index 83ea2671f..fb1b05295 100644 --- a/src/Adyen/Model/BalancePlatform/Name.php +++ b/src/Adyen/Model/BalancePlatform/Name.php @@ -308,9 +308,6 @@ public function getFirstName() */ public function setFirstName($firstName) { - if (is_null($firstName)) { - throw new \InvalidArgumentException('non-nullable firstName cannot be null'); - } $this->container['firstName'] = $firstName; return $this; @@ -335,9 +332,6 @@ public function getLastName() */ public function setLastName($lastName) { - if (is_null($lastName)) { - throw new \InvalidArgumentException('non-nullable lastName cannot be null'); - } $this->container['lastName'] = $lastName; return $this; diff --git a/src/Adyen/Model/BalancePlatform/NetworkToken.php b/src/Adyen/Model/BalancePlatform/NetworkToken.php index dbb57552b..40088296e 100644 --- a/src/Adyen/Model/BalancePlatform/NetworkToken.php +++ b/src/Adyen/Model/BalancePlatform/NetworkToken.php @@ -371,9 +371,6 @@ public function getBrandVariant() */ public function setBrandVariant($brandVariant) { - if (is_null($brandVariant)) { - throw new \InvalidArgumentException('non-nullable brandVariant cannot be null'); - } $this->container['brandVariant'] = $brandVariant; return $this; @@ -398,9 +395,6 @@ public function getCreationDate() */ public function setCreationDate($creationDate) { - if (is_null($creationDate)) { - throw new \InvalidArgumentException('non-nullable creationDate cannot be null'); - } $this->container['creationDate'] = $creationDate; return $this; @@ -425,9 +419,6 @@ public function getDevice() */ public function setDevice($device) { - if (is_null($device)) { - throw new \InvalidArgumentException('non-nullable device cannot be null'); - } $this->container['device'] = $device; return $this; @@ -452,9 +443,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -479,9 +467,6 @@ public function getPaymentInstrumentId() */ public function setPaymentInstrumentId($paymentInstrumentId) { - if (is_null($paymentInstrumentId)) { - throw new \InvalidArgumentException('non-nullable paymentInstrumentId cannot be null'); - } $this->container['paymentInstrumentId'] = $paymentInstrumentId; return $this; @@ -506,9 +491,6 @@ public function getStatus() */ 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( @@ -543,9 +525,6 @@ public function getTokenLastFour() */ public function setTokenLastFour($tokenLastFour) { - if (is_null($tokenLastFour)) { - throw new \InvalidArgumentException('non-nullable tokenLastFour cannot be null'); - } $this->container['tokenLastFour'] = $tokenLastFour; return $this; @@ -570,9 +549,6 @@ public function getType() */ public function setType($type) { - if (is_null($type)) { - throw new \InvalidArgumentException('non-nullable type cannot be null'); - } $this->container['type'] = $type; return $this; diff --git a/src/Adyen/Model/BalancePlatform/NumberAndBicAccountIdentification.php b/src/Adyen/Model/BalancePlatform/NumberAndBicAccountIdentification.php index 8c36b4d24..7e4e59919 100644 --- a/src/Adyen/Model/BalancePlatform/NumberAndBicAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/NumberAndBicAccountIdentification.php @@ -346,9 +346,6 @@ public function getAccountNumber() */ public function setAccountNumber($accountNumber) { - if (is_null($accountNumber)) { - throw new \InvalidArgumentException('non-nullable accountNumber cannot be null'); - } $this->container['accountNumber'] = $accountNumber; return $this; @@ -373,9 +370,6 @@ public function getAdditionalBankIdentification() */ public function setAdditionalBankIdentification($additionalBankIdentification) { - if (is_null($additionalBankIdentification)) { - throw new \InvalidArgumentException('non-nullable additionalBankIdentification cannot be null'); - } $this->container['additionalBankIdentification'] = $additionalBankIdentification; return $this; @@ -400,9 +394,6 @@ public function getBic() */ public function setBic($bic) { - if (is_null($bic)) { - throw new \InvalidArgumentException('non-nullable bic cannot be null'); - } $this->container['bic'] = $bic; return $this; @@ -427,9 +418,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/BalancePlatform/ObjectSerializer.php b/src/Adyen/Model/BalancePlatform/ObjectSerializer.php index 141ec623e..fa9af7e82 100644 --- a/src/Adyen/Model/BalancePlatform/ObjectSerializer.php +++ b/src/Adyen/Model/BalancePlatform/ObjectSerializer.php @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach ($data as $property => $value) { + foreach($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) { - return $timestamp; - } + if (!is_string($timestamp)) return $timestamp; return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/BalancePlatform/PLLocalAccountIdentification.php b/src/Adyen/Model/BalancePlatform/PLLocalAccountIdentification.php index 0911e2e43..2073d4c2f 100644 --- a/src/Adyen/Model/BalancePlatform/PLLocalAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/PLLocalAccountIdentification.php @@ -329,9 +329,6 @@ public function getAccountNumber() */ public function setAccountNumber($accountNumber) { - if (is_null($accountNumber)) { - throw new \InvalidArgumentException('non-nullable accountNumber cannot be null'); - } $this->container['accountNumber'] = $accountNumber; return $this; @@ -356,9 +353,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/BalancePlatform/PaginatedAccountHoldersResponse.php b/src/Adyen/Model/BalancePlatform/PaginatedAccountHoldersResponse.php index 74fe6bde9..5693749ea 100644 --- a/src/Adyen/Model/BalancePlatform/PaginatedAccountHoldersResponse.php +++ b/src/Adyen/Model/BalancePlatform/PaginatedAccountHoldersResponse.php @@ -318,9 +318,6 @@ public function getAccountHolders() */ public function setAccountHolders($accountHolders) { - if (is_null($accountHolders)) { - throw new \InvalidArgumentException('non-nullable accountHolders cannot be null'); - } $this->container['accountHolders'] = $accountHolders; return $this; @@ -345,9 +342,6 @@ public function getHasNext() */ public function setHasNext($hasNext) { - if (is_null($hasNext)) { - throw new \InvalidArgumentException('non-nullable hasNext cannot be null'); - } $this->container['hasNext'] = $hasNext; return $this; @@ -372,9 +366,6 @@ public function getHasPrevious() */ public function setHasPrevious($hasPrevious) { - if (is_null($hasPrevious)) { - throw new \InvalidArgumentException('non-nullable hasPrevious cannot be null'); - } $this->container['hasPrevious'] = $hasPrevious; return $this; diff --git a/src/Adyen/Model/BalancePlatform/PaginatedBalanceAccountsResponse.php b/src/Adyen/Model/BalancePlatform/PaginatedBalanceAccountsResponse.php index b8ad482c3..9c90fc26a 100644 --- a/src/Adyen/Model/BalancePlatform/PaginatedBalanceAccountsResponse.php +++ b/src/Adyen/Model/BalancePlatform/PaginatedBalanceAccountsResponse.php @@ -318,9 +318,6 @@ public function getBalanceAccounts() */ public function setBalanceAccounts($balanceAccounts) { - if (is_null($balanceAccounts)) { - throw new \InvalidArgumentException('non-nullable balanceAccounts cannot be null'); - } $this->container['balanceAccounts'] = $balanceAccounts; return $this; @@ -345,9 +342,6 @@ public function getHasNext() */ public function setHasNext($hasNext) { - if (is_null($hasNext)) { - throw new \InvalidArgumentException('non-nullable hasNext cannot be null'); - } $this->container['hasNext'] = $hasNext; return $this; @@ -372,9 +366,6 @@ public function getHasPrevious() */ public function setHasPrevious($hasPrevious) { - if (is_null($hasPrevious)) { - throw new \InvalidArgumentException('non-nullable hasPrevious cannot be null'); - } $this->container['hasPrevious'] = $hasPrevious; return $this; diff --git a/src/Adyen/Model/BalancePlatform/PaginatedGetCardOrderItemResponse.php b/src/Adyen/Model/BalancePlatform/PaginatedGetCardOrderItemResponse.php index 8aa08c59c..c7563dd19 100644 --- a/src/Adyen/Model/BalancePlatform/PaginatedGetCardOrderItemResponse.php +++ b/src/Adyen/Model/BalancePlatform/PaginatedGetCardOrderItemResponse.php @@ -318,9 +318,6 @@ public function getData() */ public function setData($data) { - if (is_null($data)) { - throw new \InvalidArgumentException('non-nullable data cannot be null'); - } $this->container['data'] = $data; return $this; @@ -345,9 +342,6 @@ public function getHasNext() */ public function setHasNext($hasNext) { - if (is_null($hasNext)) { - throw new \InvalidArgumentException('non-nullable hasNext cannot be null'); - } $this->container['hasNext'] = $hasNext; return $this; @@ -372,9 +366,6 @@ public function getHasPrevious() */ public function setHasPrevious($hasPrevious) { - if (is_null($hasPrevious)) { - throw new \InvalidArgumentException('non-nullable hasPrevious cannot be null'); - } $this->container['hasPrevious'] = $hasPrevious; return $this; diff --git a/src/Adyen/Model/BalancePlatform/PaginatedGetCardOrderResponse.php b/src/Adyen/Model/BalancePlatform/PaginatedGetCardOrderResponse.php index 8063c9733..218fff35c 100644 --- a/src/Adyen/Model/BalancePlatform/PaginatedGetCardOrderResponse.php +++ b/src/Adyen/Model/BalancePlatform/PaginatedGetCardOrderResponse.php @@ -315,9 +315,6 @@ public function getCardOrders() */ public function setCardOrders($cardOrders) { - if (is_null($cardOrders)) { - throw new \InvalidArgumentException('non-nullable cardOrders cannot be null'); - } $this->container['cardOrders'] = $cardOrders; return $this; @@ -342,9 +339,6 @@ public function getHasNext() */ public function setHasNext($hasNext) { - if (is_null($hasNext)) { - throw new \InvalidArgumentException('non-nullable hasNext cannot be null'); - } $this->container['hasNext'] = $hasNext; return $this; @@ -369,9 +363,6 @@ public function getHasPrevious() */ public function setHasPrevious($hasPrevious) { - if (is_null($hasPrevious)) { - throw new \InvalidArgumentException('non-nullable hasPrevious cannot be null'); - } $this->container['hasPrevious'] = $hasPrevious; return $this; diff --git a/src/Adyen/Model/BalancePlatform/PaginatedPaymentInstrumentsResponse.php b/src/Adyen/Model/BalancePlatform/PaginatedPaymentInstrumentsResponse.php index 572f43483..ef3c1a513 100644 --- a/src/Adyen/Model/BalancePlatform/PaginatedPaymentInstrumentsResponse.php +++ b/src/Adyen/Model/BalancePlatform/PaginatedPaymentInstrumentsResponse.php @@ -318,9 +318,6 @@ public function getHasNext() */ public function setHasNext($hasNext) { - if (is_null($hasNext)) { - throw new \InvalidArgumentException('non-nullable hasNext cannot be null'); - } $this->container['hasNext'] = $hasNext; return $this; @@ -345,9 +342,6 @@ public function getHasPrevious() */ public function setHasPrevious($hasPrevious) { - if (is_null($hasPrevious)) { - throw new \InvalidArgumentException('non-nullable hasPrevious cannot be null'); - } $this->container['hasPrevious'] = $hasPrevious; return $this; @@ -372,9 +366,6 @@ public function getPaymentInstruments() */ public function setPaymentInstruments($paymentInstruments) { - if (is_null($paymentInstruments)) { - throw new \InvalidArgumentException('non-nullable paymentInstruments cannot be null'); - } $this->container['paymentInstruments'] = $paymentInstruments; return $this; diff --git a/src/Adyen/Model/BalancePlatform/PaymentInstrument.php b/src/Adyen/Model/BalancePlatform/PaymentInstrument.php index a5eace728..3c45f22b9 100644 --- a/src/Adyen/Model/BalancePlatform/PaymentInstrument.php +++ b/src/Adyen/Model/BalancePlatform/PaymentInstrument.php @@ -54,6 +54,7 @@ class PaymentInstrument implements ModelInterface, ArrayAccess, \JsonSerializabl 'paymentInstrumentGroupId' => 'string', 'reference' => 'string', 'status' => 'string', + 'statusComment' => 'string', 'statusReason' => 'string', 'type' => 'string' ]; @@ -76,6 +77,7 @@ class PaymentInstrument implements ModelInterface, ArrayAccess, \JsonSerializabl 'paymentInstrumentGroupId' => null, 'reference' => null, 'status' => null, + 'statusComment' => null, 'statusReason' => null, 'type' => null ]; @@ -96,6 +98,7 @@ class PaymentInstrument implements ModelInterface, ArrayAccess, \JsonSerializabl 'paymentInstrumentGroupId' => false, 'reference' => false, 'status' => false, + 'statusComment' => false, 'statusReason' => false, 'type' => false ]; @@ -196,6 +199,7 @@ public function isNullableSetToNull(string $property): bool 'paymentInstrumentGroupId' => 'paymentInstrumentGroupId', 'reference' => 'reference', 'status' => 'status', + 'statusComment' => 'statusComment', 'statusReason' => 'statusReason', 'type' => 'type' ]; @@ -216,6 +220,7 @@ public function isNullableSetToNull(string $property): bool 'paymentInstrumentGroupId' => 'setPaymentInstrumentGroupId', 'reference' => 'setReference', 'status' => 'setStatus', + 'statusComment' => 'setStatusComment', 'statusReason' => 'setStatusReason', 'type' => 'setType' ]; @@ -236,6 +241,7 @@ public function isNullableSetToNull(string $property): bool 'paymentInstrumentGroupId' => 'getPaymentInstrumentGroupId', 'reference' => 'getReference', 'status' => 'getStatus', + 'statusComment' => 'getStatusComment', 'statusReason' => 'getStatusReason', 'type' => 'getType' ]; @@ -367,6 +373,7 @@ public function __construct(array $data = null) $this->setIfExists('paymentInstrumentGroupId', $data ?? [], null); $this->setIfExists('reference', $data ?? [], null); $this->setIfExists('status', $data ?? [], null); + $this->setIfExists('statusComment', $data ?? [], null); $this->setIfExists('statusReason', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); } @@ -473,9 +480,6 @@ public function getAdditionalBankAccountIdentifications() */ public function setAdditionalBankAccountIdentifications($additionalBankAccountIdentifications) { - if (is_null($additionalBankAccountIdentifications)) { - throw new \InvalidArgumentException('non-nullable additionalBankAccountIdentifications cannot be null'); - } $this->container['additionalBankAccountIdentifications'] = $additionalBankAccountIdentifications; return $this; @@ -500,9 +504,6 @@ public function getBalanceAccountId() */ public function setBalanceAccountId($balanceAccountId) { - if (is_null($balanceAccountId)) { - throw new \InvalidArgumentException('non-nullable balanceAccountId cannot be null'); - } $this->container['balanceAccountId'] = $balanceAccountId; return $this; @@ -527,9 +528,6 @@ public function getBankAccount() */ public function setBankAccount($bankAccount) { - if (is_null($bankAccount)) { - throw new \InvalidArgumentException('non-nullable bankAccount cannot be null'); - } $this->container['bankAccount'] = $bankAccount; return $this; @@ -554,9 +552,6 @@ public function getCard() */ public function setCard($card) { - if (is_null($card)) { - throw new \InvalidArgumentException('non-nullable card cannot be null'); - } $this->container['card'] = $card; return $this; @@ -581,9 +576,6 @@ public function getDescription() */ public function setDescription($description) { - if (is_null($description)) { - throw new \InvalidArgumentException('non-nullable description cannot be null'); - } $this->container['description'] = $description; return $this; @@ -608,9 +600,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -635,9 +624,6 @@ public function getIssuingCountryCode() */ public function setIssuingCountryCode($issuingCountryCode) { - if (is_null($issuingCountryCode)) { - throw new \InvalidArgumentException('non-nullable issuingCountryCode cannot be null'); - } $this->container['issuingCountryCode'] = $issuingCountryCode; return $this; @@ -662,9 +648,6 @@ public function getPaymentInstrumentGroupId() */ public function setPaymentInstrumentGroupId($paymentInstrumentGroupId) { - if (is_null($paymentInstrumentGroupId)) { - throw new \InvalidArgumentException('non-nullable paymentInstrumentGroupId cannot be null'); - } $this->container['paymentInstrumentGroupId'] = $paymentInstrumentGroupId; return $this; @@ -689,9 +672,6 @@ public function getReference() */ public function setReference($reference) { - if (is_null($reference)) { - throw new \InvalidArgumentException('non-nullable reference cannot be null'); - } $this->container['reference'] = $reference; return $this; @@ -716,9 +696,6 @@ public function getStatus() */ 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( @@ -734,6 +711,30 @@ public function setStatus($status) return $this; } + /** + * Gets statusComment + * + * @return string|null + */ + public function getStatusComment() + { + return $this->container['statusComment']; + } + + /** + * Sets statusComment + * + * @param string|null $statusComment The status comment provides additional information for the statusReason of the payment instrument. + * + * @return self + */ + public function setStatusComment($statusComment) + { + $this->container['statusComment'] = $statusComment; + + return $this; + } + /** * Gets statusReason * @@ -753,9 +754,6 @@ public function getStatusReason() */ public function setStatusReason($statusReason) { - if (is_null($statusReason)) { - throw new \InvalidArgumentException('non-nullable statusReason cannot be null'); - } $allowedValues = $this->getStatusReasonAllowableValues(); if (!in_array($statusReason, $allowedValues, true)) { throw new \InvalidArgumentException( @@ -790,9 +788,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/BalancePlatform/PaymentInstrumentAdditionalBankAccountIdentificationsInner.php b/src/Adyen/Model/BalancePlatform/PaymentInstrumentAdditionalBankAccountIdentificationsInner.php index 5a5e4f96c..c7e710ae7 100644 --- a/src/Adyen/Model/BalancePlatform/PaymentInstrumentAdditionalBankAccountIdentificationsInner.php +++ b/src/Adyen/Model/BalancePlatform/PaymentInstrumentAdditionalBankAccountIdentificationsInner.php @@ -308,9 +308,6 @@ public function getIban() */ public function setIban($iban) { - if (is_null($iban)) { - throw new \InvalidArgumentException('non-nullable iban cannot be null'); - } $this->container['iban'] = $iban; return $this; @@ -335,9 +332,6 @@ public function getType() */ public function setType($type) { - if (is_null($type)) { - throw new \InvalidArgumentException('non-nullable type cannot be null'); - } $this->container['type'] = $type; return $this; diff --git a/src/Adyen/Model/BalancePlatform/PaymentInstrumentGroup.php b/src/Adyen/Model/BalancePlatform/PaymentInstrumentGroup.php index 5b8cc36b3..cbf263b7a 100644 --- a/src/Adyen/Model/BalancePlatform/PaymentInstrumentGroup.php +++ b/src/Adyen/Model/BalancePlatform/PaymentInstrumentGroup.php @@ -336,9 +336,6 @@ public function getBalancePlatform() */ public function setBalancePlatform($balancePlatform) { - if (is_null($balancePlatform)) { - throw new \InvalidArgumentException('non-nullable balancePlatform cannot be null'); - } $this->container['balancePlatform'] = $balancePlatform; return $this; @@ -363,9 +360,6 @@ public function getDescription() */ public function setDescription($description) { - if (is_null($description)) { - throw new \InvalidArgumentException('non-nullable description cannot be null'); - } $this->container['description'] = $description; return $this; @@ -390,9 +384,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -417,9 +408,6 @@ public function getProperties() */ public function setProperties($properties) { - if (is_null($properties)) { - throw new \InvalidArgumentException('non-nullable properties cannot be null'); - } $this->container['properties'] = $properties; return $this; @@ -444,9 +432,6 @@ public function getReference() */ public function setReference($reference) { - if (is_null($reference)) { - throw new \InvalidArgumentException('non-nullable reference cannot be null'); - } $this->container['reference'] = $reference; return $this; @@ -471,9 +456,6 @@ public function getTxVariant() */ public function setTxVariant($txVariant) { - if (is_null($txVariant)) { - throw new \InvalidArgumentException('non-nullable txVariant cannot be null'); - } $this->container['txVariant'] = $txVariant; return $this; diff --git a/src/Adyen/Model/BalancePlatform/PaymentInstrumentGroupInfo.php b/src/Adyen/Model/BalancePlatform/PaymentInstrumentGroupInfo.php index 641fddcc4..f8aaec37c 100644 --- a/src/Adyen/Model/BalancePlatform/PaymentInstrumentGroupInfo.php +++ b/src/Adyen/Model/BalancePlatform/PaymentInstrumentGroupInfo.php @@ -329,9 +329,6 @@ public function getBalancePlatform() */ public function setBalancePlatform($balancePlatform) { - if (is_null($balancePlatform)) { - throw new \InvalidArgumentException('non-nullable balancePlatform cannot be null'); - } $this->container['balancePlatform'] = $balancePlatform; return $this; @@ -356,9 +353,6 @@ public function getDescription() */ public function setDescription($description) { - if (is_null($description)) { - throw new \InvalidArgumentException('non-nullable description cannot be null'); - } $this->container['description'] = $description; return $this; @@ -383,9 +377,6 @@ public function getProperties() */ public function setProperties($properties) { - if (is_null($properties)) { - throw new \InvalidArgumentException('non-nullable properties cannot be null'); - } $this->container['properties'] = $properties; return $this; @@ -410,9 +401,6 @@ public function getReference() */ public function setReference($reference) { - if (is_null($reference)) { - throw new \InvalidArgumentException('non-nullable reference cannot be null'); - } $this->container['reference'] = $reference; return $this; @@ -437,9 +425,6 @@ public function getTxVariant() */ public function setTxVariant($txVariant) { - if (is_null($txVariant)) { - throw new \InvalidArgumentException('non-nullable txVariant cannot be null'); - } $this->container['txVariant'] = $txVariant; return $this; diff --git a/src/Adyen/Model/BalancePlatform/PaymentInstrumentInfo.php b/src/Adyen/Model/BalancePlatform/PaymentInstrumentInfo.php index b5639ad03..661be4b7c 100644 --- a/src/Adyen/Model/BalancePlatform/PaymentInstrumentInfo.php +++ b/src/Adyen/Model/BalancePlatform/PaymentInstrumentInfo.php @@ -52,6 +52,7 @@ class PaymentInstrumentInfo implements ModelInterface, ArrayAccess, \JsonSeriali 'paymentInstrumentGroupId' => 'string', 'reference' => 'string', 'status' => 'string', + 'statusComment' => 'string', 'statusReason' => 'string', 'type' => 'string' ]; @@ -72,6 +73,7 @@ class PaymentInstrumentInfo implements ModelInterface, ArrayAccess, \JsonSeriali 'paymentInstrumentGroupId' => null, 'reference' => null, 'status' => null, + 'statusComment' => null, 'statusReason' => null, 'type' => null ]; @@ -90,6 +92,7 @@ class PaymentInstrumentInfo implements ModelInterface, ArrayAccess, \JsonSeriali 'paymentInstrumentGroupId' => false, 'reference' => false, 'status' => false, + 'statusComment' => false, 'statusReason' => false, 'type' => false ]; @@ -188,6 +191,7 @@ public function isNullableSetToNull(string $property): bool 'paymentInstrumentGroupId' => 'paymentInstrumentGroupId', 'reference' => 'reference', 'status' => 'status', + 'statusComment' => 'statusComment', 'statusReason' => 'statusReason', 'type' => 'type' ]; @@ -206,6 +210,7 @@ public function isNullableSetToNull(string $property): bool 'paymentInstrumentGroupId' => 'setPaymentInstrumentGroupId', 'reference' => 'setReference', 'status' => 'setStatus', + 'statusComment' => 'setStatusComment', 'statusReason' => 'setStatusReason', 'type' => 'setType' ]; @@ -224,6 +229,7 @@ public function isNullableSetToNull(string $property): bool 'paymentInstrumentGroupId' => 'getPaymentInstrumentGroupId', 'reference' => 'getReference', 'status' => 'getStatus', + 'statusComment' => 'getStatusComment', 'statusReason' => 'getStatusReason', 'type' => 'getType' ]; @@ -353,6 +359,7 @@ public function __construct(array $data = null) $this->setIfExists('paymentInstrumentGroupId', $data ?? [], null); $this->setIfExists('reference', $data ?? [], null); $this->setIfExists('status', $data ?? [], null); + $this->setIfExists('statusComment', $data ?? [], null); $this->setIfExists('statusReason', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); } @@ -454,9 +461,6 @@ public function getBalanceAccountId() */ public function setBalanceAccountId($balanceAccountId) { - if (is_null($balanceAccountId)) { - throw new \InvalidArgumentException('non-nullable balanceAccountId cannot be null'); - } $this->container['balanceAccountId'] = $balanceAccountId; return $this; @@ -481,9 +485,6 @@ public function getBankAccount() */ public function setBankAccount($bankAccount) { - if (is_null($bankAccount)) { - throw new \InvalidArgumentException('non-nullable bankAccount cannot be null'); - } $this->container['bankAccount'] = $bankAccount; return $this; @@ -508,9 +509,6 @@ public function getCard() */ public function setCard($card) { - if (is_null($card)) { - throw new \InvalidArgumentException('non-nullable card cannot be null'); - } $this->container['card'] = $card; return $this; @@ -535,9 +533,6 @@ public function getDescription() */ public function setDescription($description) { - if (is_null($description)) { - throw new \InvalidArgumentException('non-nullable description cannot be null'); - } $this->container['description'] = $description; return $this; @@ -562,9 +557,6 @@ public function getIssuingCountryCode() */ public function setIssuingCountryCode($issuingCountryCode) { - if (is_null($issuingCountryCode)) { - throw new \InvalidArgumentException('non-nullable issuingCountryCode cannot be null'); - } $this->container['issuingCountryCode'] = $issuingCountryCode; return $this; @@ -589,9 +581,6 @@ public function getPaymentInstrumentGroupId() */ public function setPaymentInstrumentGroupId($paymentInstrumentGroupId) { - if (is_null($paymentInstrumentGroupId)) { - throw new \InvalidArgumentException('non-nullable paymentInstrumentGroupId cannot be null'); - } $this->container['paymentInstrumentGroupId'] = $paymentInstrumentGroupId; return $this; @@ -616,9 +605,6 @@ public function getReference() */ public function setReference($reference) { - if (is_null($reference)) { - throw new \InvalidArgumentException('non-nullable reference cannot be null'); - } $this->container['reference'] = $reference; return $this; @@ -643,9 +629,6 @@ public function getStatus() */ 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( @@ -661,6 +644,30 @@ public function setStatus($status) return $this; } + /** + * Gets statusComment + * + * @return string|null + */ + public function getStatusComment() + { + return $this->container['statusComment']; + } + + /** + * Sets statusComment + * + * @param string|null $statusComment The status comment provides additional information for the statusReason of the payment instrument. + * + * @return self + */ + public function setStatusComment($statusComment) + { + $this->container['statusComment'] = $statusComment; + + return $this; + } + /** * Gets statusReason * @@ -680,9 +687,6 @@ public function getStatusReason() */ public function setStatusReason($statusReason) { - if (is_null($statusReason)) { - throw new \InvalidArgumentException('non-nullable statusReason cannot be null'); - } $allowedValues = $this->getStatusReasonAllowableValues(); if (!in_array($statusReason, $allowedValues, true)) { throw new \InvalidArgumentException( @@ -717,9 +721,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/BalancePlatform/PaymentInstrumentRequirement.php b/src/Adyen/Model/BalancePlatform/PaymentInstrumentRequirement.php index 98152499d..47783d146 100644 --- a/src/Adyen/Model/BalancePlatform/PaymentInstrumentRequirement.php +++ b/src/Adyen/Model/BalancePlatform/PaymentInstrumentRequirement.php @@ -377,9 +377,6 @@ public function getDescription() */ public function setDescription($description) { - if (is_null($description)) { - throw new \InvalidArgumentException('non-nullable description cannot be null'); - } $this->container['description'] = $description; return $this; @@ -404,9 +401,6 @@ public function getIssuingCountryCode() */ public function setIssuingCountryCode($issuingCountryCode) { - if (is_null($issuingCountryCode)) { - throw new \InvalidArgumentException('non-nullable issuingCountryCode cannot be null'); - } $this->container['issuingCountryCode'] = $issuingCountryCode; return $this; @@ -431,9 +425,6 @@ public function getIssuingCountryCodes() */ public function setIssuingCountryCodes($issuingCountryCodes) { - if (is_null($issuingCountryCodes)) { - throw new \InvalidArgumentException('non-nullable issuingCountryCodes cannot be null'); - } $this->container['issuingCountryCodes'] = $issuingCountryCodes; return $this; @@ -458,9 +449,6 @@ public function getOnlyForCrossBalancePlatform() */ public function setOnlyForCrossBalancePlatform($onlyForCrossBalancePlatform) { - if (is_null($onlyForCrossBalancePlatform)) { - throw new \InvalidArgumentException('non-nullable onlyForCrossBalancePlatform cannot be null'); - } $this->container['onlyForCrossBalancePlatform'] = $onlyForCrossBalancePlatform; return $this; @@ -485,9 +473,6 @@ public function getPaymentInstrumentType() */ public function setPaymentInstrumentType($paymentInstrumentType) { - if (is_null($paymentInstrumentType)) { - throw new \InvalidArgumentException('non-nullable paymentInstrumentType cannot be null'); - } $allowedValues = $this->getPaymentInstrumentTypeAllowableValues(); if (!in_array($paymentInstrumentType, $allowedValues, true)) { throw new \InvalidArgumentException( @@ -522,9 +507,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/BalancePlatform/PaymentInstrumentRevealInfo.php b/src/Adyen/Model/BalancePlatform/PaymentInstrumentRevealInfo.php index 434f67078..c25d92e71 100644 --- a/src/Adyen/Model/BalancePlatform/PaymentInstrumentRevealInfo.php +++ b/src/Adyen/Model/BalancePlatform/PaymentInstrumentRevealInfo.php @@ -318,9 +318,6 @@ public function getCvc() */ public function setCvc($cvc) { - if (is_null($cvc)) { - throw new \InvalidArgumentException('non-nullable cvc cannot be null'); - } $this->container['cvc'] = $cvc; return $this; @@ -345,9 +342,6 @@ public function getExpiration() */ public function setExpiration($expiration) { - if (is_null($expiration)) { - throw new \InvalidArgumentException('non-nullable expiration cannot be null'); - } $this->container['expiration'] = $expiration; return $this; @@ -372,9 +366,6 @@ public function getPan() */ public function setPan($pan) { - if (is_null($pan)) { - throw new \InvalidArgumentException('non-nullable pan cannot be null'); - } $this->container['pan'] = $pan; return $this; diff --git a/src/Adyen/Model/BalancePlatform/PaymentInstrumentRevealRequest.php b/src/Adyen/Model/BalancePlatform/PaymentInstrumentRevealRequest.php index 5c4b56e7c..831cf63bb 100644 --- a/src/Adyen/Model/BalancePlatform/PaymentInstrumentRevealRequest.php +++ b/src/Adyen/Model/BalancePlatform/PaymentInstrumentRevealRequest.php @@ -308,9 +308,6 @@ public function getEncryptedKey() */ public function setEncryptedKey($encryptedKey) { - if (is_null($encryptedKey)) { - throw new \InvalidArgumentException('non-nullable encryptedKey cannot be null'); - } $this->container['encryptedKey'] = $encryptedKey; return $this; @@ -335,9 +332,6 @@ public function getPaymentInstrumentId() */ public function setPaymentInstrumentId($paymentInstrumentId) { - if (is_null($paymentInstrumentId)) { - throw new \InvalidArgumentException('non-nullable paymentInstrumentId cannot be null'); - } $this->container['paymentInstrumentId'] = $paymentInstrumentId; return $this; diff --git a/src/Adyen/Model/BalancePlatform/PaymentInstrumentRevealResponse.php b/src/Adyen/Model/BalancePlatform/PaymentInstrumentRevealResponse.php index 4d09d52af..52d1165f0 100644 --- a/src/Adyen/Model/BalancePlatform/PaymentInstrumentRevealResponse.php +++ b/src/Adyen/Model/BalancePlatform/PaymentInstrumentRevealResponse.php @@ -298,9 +298,6 @@ public function getEncryptedData() */ public function setEncryptedData($encryptedData) { - if (is_null($encryptedData)) { - throw new \InvalidArgumentException('non-nullable encryptedData cannot be null'); - } $this->container['encryptedData'] = $encryptedData; return $this; diff --git a/src/Adyen/Model/BalancePlatform/PaymentInstrumentUpdateRequest.php b/src/Adyen/Model/BalancePlatform/PaymentInstrumentUpdateRequest.php index ddff64a4b..85db4dfe8 100644 --- a/src/Adyen/Model/BalancePlatform/PaymentInstrumentUpdateRequest.php +++ b/src/Adyen/Model/BalancePlatform/PaymentInstrumentUpdateRequest.php @@ -387,9 +387,6 @@ public function getBalanceAccountId() */ public function setBalanceAccountId($balanceAccountId) { - if (is_null($balanceAccountId)) { - throw new \InvalidArgumentException('non-nullable balanceAccountId cannot be null'); - } $this->container['balanceAccountId'] = $balanceAccountId; return $this; @@ -414,9 +411,6 @@ public function getCard() */ public function setCard($card) { - if (is_null($card)) { - throw new \InvalidArgumentException('non-nullable card cannot be null'); - } $this->container['card'] = $card; return $this; @@ -441,9 +435,6 @@ public function getStatus() */ 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( @@ -478,9 +469,6 @@ public function getStatusComment() */ public function setStatusComment($statusComment) { - if (is_null($statusComment)) { - throw new \InvalidArgumentException('non-nullable statusComment cannot be null'); - } $this->container['statusComment'] = $statusComment; return $this; @@ -505,9 +493,6 @@ public function getStatusReason() */ public function setStatusReason($statusReason) { - if (is_null($statusReason)) { - throw new \InvalidArgumentException('non-nullable statusReason cannot be null'); - } $allowedValues = $this->getStatusReasonAllowableValues(); if (!in_array($statusReason, $allowedValues, true)) { throw new \InvalidArgumentException( diff --git a/src/Adyen/Model/BalancePlatform/Phone.php b/src/Adyen/Model/BalancePlatform/Phone.php index 80b29281c..0803709fa 100644 --- a/src/Adyen/Model/BalancePlatform/Phone.php +++ b/src/Adyen/Model/BalancePlatform/Phone.php @@ -331,9 +331,6 @@ public function getNumber() */ public function setNumber($number) { - if (is_null($number)) { - throw new \InvalidArgumentException('non-nullable number cannot be null'); - } $this->container['number'] = $number; return $this; @@ -358,9 +355,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/BalancePlatform/PhoneNumber.php b/src/Adyen/Model/BalancePlatform/PhoneNumber.php index 298cefdb5..7f5cab2ff 100644 --- a/src/Adyen/Model/BalancePlatform/PhoneNumber.php +++ b/src/Adyen/Model/BalancePlatform/PhoneNumber.php @@ -336,9 +336,6 @@ public function getPhoneCountryCode() */ public function setPhoneCountryCode($phoneCountryCode) { - if (is_null($phoneCountryCode)) { - throw new \InvalidArgumentException('non-nullable phoneCountryCode cannot be null'); - } $this->container['phoneCountryCode'] = $phoneCountryCode; return $this; @@ -363,9 +360,6 @@ public function getPhoneNumber() */ public function setPhoneNumber($phoneNumber) { - if (is_null($phoneNumber)) { - throw new \InvalidArgumentException('non-nullable phoneNumber cannot be null'); - } $this->container['phoneNumber'] = $phoneNumber; return $this; @@ -390,9 +384,6 @@ public function getPhoneType() */ 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( diff --git a/src/Adyen/Model/BalancePlatform/PinChangeRequest.php b/src/Adyen/Model/BalancePlatform/PinChangeRequest.php index 25f8bb148..9ae79aed1 100644 --- a/src/Adyen/Model/BalancePlatform/PinChangeRequest.php +++ b/src/Adyen/Model/BalancePlatform/PinChangeRequest.php @@ -328,9 +328,6 @@ public function getEncryptedKey() */ public function setEncryptedKey($encryptedKey) { - if (is_null($encryptedKey)) { - throw new \InvalidArgumentException('non-nullable encryptedKey cannot be null'); - } $this->container['encryptedKey'] = $encryptedKey; return $this; @@ -355,9 +352,6 @@ public function getEncryptedPinBlock() */ public function setEncryptedPinBlock($encryptedPinBlock) { - if (is_null($encryptedPinBlock)) { - throw new \InvalidArgumentException('non-nullable encryptedPinBlock cannot be null'); - } $this->container['encryptedPinBlock'] = $encryptedPinBlock; return $this; @@ -382,9 +376,6 @@ public function getPaymentInstrumentId() */ public function setPaymentInstrumentId($paymentInstrumentId) { - if (is_null($paymentInstrumentId)) { - throw new \InvalidArgumentException('non-nullable paymentInstrumentId cannot be null'); - } $this->container['paymentInstrumentId'] = $paymentInstrumentId; return $this; @@ -409,9 +400,6 @@ public function getToken() */ public function setToken($token) { - if (is_null($token)) { - throw new \InvalidArgumentException('non-nullable token cannot be null'); - } $this->container['token'] = $token; return $this; diff --git a/src/Adyen/Model/BalancePlatform/PinChangeResponse.php b/src/Adyen/Model/BalancePlatform/PinChangeResponse.php index f90a17f62..d866087c8 100644 --- a/src/Adyen/Model/BalancePlatform/PinChangeResponse.php +++ b/src/Adyen/Model/BalancePlatform/PinChangeResponse.php @@ -323,9 +323,6 @@ public function getStatus() */ 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( diff --git a/src/Adyen/Model/BalancePlatform/PlatformPaymentConfiguration.php b/src/Adyen/Model/BalancePlatform/PlatformPaymentConfiguration.php index 2c63854f1..91c1665d8 100644 --- a/src/Adyen/Model/BalancePlatform/PlatformPaymentConfiguration.php +++ b/src/Adyen/Model/BalancePlatform/PlatformPaymentConfiguration.php @@ -302,9 +302,6 @@ public function getSalesDayClosingTime() */ public function setSalesDayClosingTime($salesDayClosingTime) { - if (is_null($salesDayClosingTime)) { - throw new \InvalidArgumentException('non-nullable salesDayClosingTime cannot be null'); - } $this->container['salesDayClosingTime'] = $salesDayClosingTime; return $this; @@ -329,7 +326,6 @@ public function getSettlementDelayDays() */ public function setSettlementDelayDays($settlementDelayDays) { - // Do nothing for nullable integers $this->container['settlementDelayDays'] = $settlementDelayDays; return $this; diff --git a/src/Adyen/Model/BalancePlatform/ProcessingTypesRestriction.php b/src/Adyen/Model/BalancePlatform/ProcessingTypesRestriction.php index 908371bdb..0f831a2a9 100644 --- a/src/Adyen/Model/BalancePlatform/ProcessingTypesRestriction.php +++ b/src/Adyen/Model/BalancePlatform/ProcessingTypesRestriction.php @@ -331,9 +331,6 @@ public function getOperation() */ public function setOperation($operation) { - if (is_null($operation)) { - throw new \InvalidArgumentException('non-nullable operation cannot be null'); - } $this->container['operation'] = $operation; return $this; @@ -358,9 +355,6 @@ public function getValue() */ public function setValue($value) { - if (is_null($value)) { - throw new \InvalidArgumentException('non-nullable value cannot be null'); - } $allowedValues = $this->getValueAllowableValues(); if (array_diff($value, $allowedValues)) { throw new \InvalidArgumentException( diff --git a/src/Adyen/Model/BalancePlatform/PublicKeyResponse.php b/src/Adyen/Model/BalancePlatform/PublicKeyResponse.php index 6dfb370ef..66f5ef5f0 100644 --- a/src/Adyen/Model/BalancePlatform/PublicKeyResponse.php +++ b/src/Adyen/Model/BalancePlatform/PublicKeyResponse.php @@ -308,9 +308,6 @@ public function getPublicKey() */ public function setPublicKey($publicKey) { - if (is_null($publicKey)) { - throw new \InvalidArgumentException('non-nullable publicKey cannot be null'); - } $this->container['publicKey'] = $publicKey; return $this; @@ -335,9 +332,6 @@ public function getPublicKeyExpiryDate() */ public function setPublicKeyExpiryDate($publicKeyExpiryDate) { - if (is_null($publicKeyExpiryDate)) { - throw new \InvalidArgumentException('non-nullable publicKeyExpiryDate cannot be null'); - } $this->container['publicKeyExpiryDate'] = $publicKeyExpiryDate; return $this; diff --git a/src/Adyen/Model/BalancePlatform/RegisterSCAFinalResponse.php b/src/Adyen/Model/BalancePlatform/RegisterSCAFinalResponse.php index 369522c67..10323ae04 100644 --- a/src/Adyen/Model/BalancePlatform/RegisterSCAFinalResponse.php +++ b/src/Adyen/Model/BalancePlatform/RegisterSCAFinalResponse.php @@ -295,9 +295,6 @@ public function getSuccess() */ public function setSuccess($success) { - if (is_null($success)) { - throw new \InvalidArgumentException('non-nullable success cannot be null'); - } $this->container['success'] = $success; return $this; diff --git a/src/Adyen/Model/BalancePlatform/RegisterSCARequest.php b/src/Adyen/Model/BalancePlatform/RegisterSCARequest.php index 96682ddde..0dd69e72e 100644 --- a/src/Adyen/Model/BalancePlatform/RegisterSCARequest.php +++ b/src/Adyen/Model/BalancePlatform/RegisterSCARequest.php @@ -308,9 +308,6 @@ public function getPaymentInstrumentId() */ public function setPaymentInstrumentId($paymentInstrumentId) { - if (is_null($paymentInstrumentId)) { - throw new \InvalidArgumentException('non-nullable paymentInstrumentId cannot be null'); - } $this->container['paymentInstrumentId'] = $paymentInstrumentId; return $this; @@ -335,9 +332,6 @@ public function getStrongCustomerAuthentication() */ public function setStrongCustomerAuthentication($strongCustomerAuthentication) { - if (is_null($strongCustomerAuthentication)) { - throw new \InvalidArgumentException('non-nullable strongCustomerAuthentication cannot be null'); - } $this->container['strongCustomerAuthentication'] = $strongCustomerAuthentication; return $this; diff --git a/src/Adyen/Model/BalancePlatform/RegisterSCAResponse.php b/src/Adyen/Model/BalancePlatform/RegisterSCAResponse.php index 2a2e4f158..8231553ef 100644 --- a/src/Adyen/Model/BalancePlatform/RegisterSCAResponse.php +++ b/src/Adyen/Model/BalancePlatform/RegisterSCAResponse.php @@ -316,9 +316,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -343,9 +340,6 @@ public function getPaymentInstrumentId() */ public function setPaymentInstrumentId($paymentInstrumentId) { - if (is_null($paymentInstrumentId)) { - throw new \InvalidArgumentException('non-nullable paymentInstrumentId cannot be null'); - } $this->container['paymentInstrumentId'] = $paymentInstrumentId; return $this; @@ -370,9 +364,6 @@ public function getSdkInput() */ public function setSdkInput($sdkInput) { - if (is_null($sdkInput)) { - throw new \InvalidArgumentException('non-nullable sdkInput cannot be null'); - } $this->container['sdkInput'] = $sdkInput; return $this; @@ -397,9 +388,6 @@ public function getSuccess() */ public function setSuccess($success) { - if (is_null($success)) { - throw new \InvalidArgumentException('non-nullable success cannot be null'); - } $this->container['success'] = $success; return $this; diff --git a/src/Adyen/Model/BalancePlatform/RemediatingAction.php b/src/Adyen/Model/BalancePlatform/RemediatingAction.php index 49989d445..ca0176b37 100644 --- a/src/Adyen/Model/BalancePlatform/RemediatingAction.php +++ b/src/Adyen/Model/BalancePlatform/RemediatingAction.php @@ -302,9 +302,6 @@ public function getCode() */ public function setCode($code) { - if (is_null($code)) { - throw new \InvalidArgumentException('non-nullable code cannot be null'); - } $this->container['code'] = $code; return $this; @@ -329,9 +326,6 @@ public function getMessage() */ public function setMessage($message) { - if (is_null($message)) { - throw new \InvalidArgumentException('non-nullable message cannot be null'); - } $this->container['message'] = $message; return $this; diff --git a/src/Adyen/Model/BalancePlatform/Repayment.php b/src/Adyen/Model/BalancePlatform/Repayment.php index ac30d9fba..b1fc3671d 100644 --- a/src/Adyen/Model/BalancePlatform/Repayment.php +++ b/src/Adyen/Model/BalancePlatform/Repayment.php @@ -312,7 +312,6 @@ public function getBasisPoints() */ public function setBasisPoints($basisPoints) { - // Do nothing for nullable integers $this->container['basisPoints'] = $basisPoints; return $this; @@ -337,9 +336,6 @@ public function getTerm() */ public function setTerm($term) { - if (is_null($term)) { - throw new \InvalidArgumentException('non-nullable term cannot be null'); - } $this->container['term'] = $term; return $this; @@ -364,9 +360,6 @@ public function getThreshold() */ public function setThreshold($threshold) { - if (is_null($threshold)) { - throw new \InvalidArgumentException('non-nullable threshold cannot be null'); - } $this->container['threshold'] = $threshold; return $this; diff --git a/src/Adyen/Model/BalancePlatform/RepaymentTerm.php b/src/Adyen/Model/BalancePlatform/RepaymentTerm.php index c48559573..0c1a3ecb2 100644 --- a/src/Adyen/Model/BalancePlatform/RepaymentTerm.php +++ b/src/Adyen/Model/BalancePlatform/RepaymentTerm.php @@ -305,7 +305,6 @@ public function getEstimatedDays() */ public function setEstimatedDays($estimatedDays) { - // Do nothing for nullable integers $this->container['estimatedDays'] = $estimatedDays; return $this; @@ -330,7 +329,6 @@ public function getMaximumDays() */ public function setMaximumDays($maximumDays) { - // Do nothing for nullable integers $this->container['maximumDays'] = $maximumDays; return $this; diff --git a/src/Adyen/Model/BalancePlatform/RestServiceError.php b/src/Adyen/Model/BalancePlatform/RestServiceError.php index cd7ff34b3..c6c0aeda9 100644 --- a/src/Adyen/Model/BalancePlatform/RestServiceError.php +++ b/src/Adyen/Model/BalancePlatform/RestServiceError.php @@ -366,9 +366,6 @@ public function getDetail() */ public function setDetail($detail) { - if (is_null($detail)) { - throw new \InvalidArgumentException('non-nullable detail cannot be null'); - } $this->container['detail'] = $detail; return $this; @@ -393,9 +390,6 @@ public function getErrorCode() */ public function setErrorCode($errorCode) { - if (is_null($errorCode)) { - throw new \InvalidArgumentException('non-nullable errorCode cannot be null'); - } $this->container['errorCode'] = $errorCode; return $this; @@ -420,9 +414,6 @@ public function getInstance() */ public function setInstance($instance) { - if (is_null($instance)) { - throw new \InvalidArgumentException('non-nullable instance cannot be null'); - } $this->container['instance'] = $instance; return $this; @@ -447,9 +438,6 @@ public function getInvalidFields() */ public function setInvalidFields($invalidFields) { - if (is_null($invalidFields)) { - throw new \InvalidArgumentException('non-nullable invalidFields cannot be null'); - } $this->container['invalidFields'] = $invalidFields; return $this; @@ -474,9 +462,6 @@ public function getRequestId() */ public function setRequestId($requestId) { - if (is_null($requestId)) { - throw new \InvalidArgumentException('non-nullable requestId cannot be null'); - } $this->container['requestId'] = $requestId; return $this; @@ -501,9 +486,6 @@ public function getResponse() */ public function setResponse($response) { - if (is_null($response)) { - throw new \InvalidArgumentException('non-nullable response cannot be null'); - } $this->container['response'] = $response; return $this; @@ -528,7 +510,6 @@ public function getStatus() */ public function setStatus($status) { - // Do nothing for nullable integers $this->container['status'] = $status; return $this; @@ -553,9 +534,6 @@ public function getTitle() */ public function setTitle($title) { - if (is_null($title)) { - throw new \InvalidArgumentException('non-nullable title cannot be null'); - } $this->container['title'] = $title; return $this; @@ -580,9 +558,6 @@ public function getType() */ public function setType($type) { - if (is_null($type)) { - throw new \InvalidArgumentException('non-nullable type cannot be null'); - } $this->container['type'] = $type; return $this; diff --git a/src/Adyen/Model/BalancePlatform/RevealPinRequest.php b/src/Adyen/Model/BalancePlatform/RevealPinRequest.php index d38bb10e1..00ad07070 100644 --- a/src/Adyen/Model/BalancePlatform/RevealPinRequest.php +++ b/src/Adyen/Model/BalancePlatform/RevealPinRequest.php @@ -308,9 +308,6 @@ public function getEncryptedKey() */ public function setEncryptedKey($encryptedKey) { - if (is_null($encryptedKey)) { - throw new \InvalidArgumentException('non-nullable encryptedKey cannot be null'); - } $this->container['encryptedKey'] = $encryptedKey; return $this; @@ -335,9 +332,6 @@ public function getPaymentInstrumentId() */ public function setPaymentInstrumentId($paymentInstrumentId) { - if (is_null($paymentInstrumentId)) { - throw new \InvalidArgumentException('non-nullable paymentInstrumentId cannot be null'); - } $this->container['paymentInstrumentId'] = $paymentInstrumentId; return $this; diff --git a/src/Adyen/Model/BalancePlatform/RevealPinResponse.php b/src/Adyen/Model/BalancePlatform/RevealPinResponse.php index 317224e91..d3190f21a 100644 --- a/src/Adyen/Model/BalancePlatform/RevealPinResponse.php +++ b/src/Adyen/Model/BalancePlatform/RevealPinResponse.php @@ -308,9 +308,6 @@ public function getEncryptedPinBlock() */ public function setEncryptedPinBlock($encryptedPinBlock) { - if (is_null($encryptedPinBlock)) { - throw new \InvalidArgumentException('non-nullable encryptedPinBlock cannot be null'); - } $this->container['encryptedPinBlock'] = $encryptedPinBlock; return $this; @@ -335,9 +332,6 @@ public function getToken() */ public function setToken($token) { - if (is_null($token)) { - throw new \InvalidArgumentException('non-nullable token cannot be null'); - } $this->container['token'] = $token; return $this; diff --git a/src/Adyen/Model/BalancePlatform/RiskScores.php b/src/Adyen/Model/BalancePlatform/RiskScores.php index 660829ddc..899d0495a 100644 --- a/src/Adyen/Model/BalancePlatform/RiskScores.php +++ b/src/Adyen/Model/BalancePlatform/RiskScores.php @@ -302,7 +302,6 @@ public function getMastercard() */ public function setMastercard($mastercard) { - // Do nothing for nullable integers $this->container['mastercard'] = $mastercard; return $this; @@ -327,7 +326,6 @@ public function getVisa() */ public function setVisa($visa) { - // Do nothing for nullable integers $this->container['visa'] = $visa; return $this; diff --git a/src/Adyen/Model/BalancePlatform/RiskScoresRestriction.php b/src/Adyen/Model/BalancePlatform/RiskScoresRestriction.php index bc9360d9a..24ae79cf0 100644 --- a/src/Adyen/Model/BalancePlatform/RiskScoresRestriction.php +++ b/src/Adyen/Model/BalancePlatform/RiskScoresRestriction.php @@ -305,9 +305,6 @@ public function getOperation() */ public function setOperation($operation) { - if (is_null($operation)) { - throw new \InvalidArgumentException('non-nullable operation cannot be null'); - } $this->container['operation'] = $operation; return $this; @@ -332,9 +329,6 @@ public function getValue() */ public function setValue($value) { - if (is_null($value)) { - throw new \InvalidArgumentException('non-nullable value cannot be null'); - } $this->container['value'] = $value; return $this; diff --git a/src/Adyen/Model/BalancePlatform/SELocalAccountIdentification.php b/src/Adyen/Model/BalancePlatform/SELocalAccountIdentification.php index fe021841d..0793ea1f7 100644 --- a/src/Adyen/Model/BalancePlatform/SELocalAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/SELocalAccountIdentification.php @@ -339,9 +339,6 @@ public function getAccountNumber() */ public function setAccountNumber($accountNumber) { - if (is_null($accountNumber)) { - throw new \InvalidArgumentException('non-nullable accountNumber cannot be null'); - } $this->container['accountNumber'] = $accountNumber; return $this; @@ -366,9 +363,6 @@ public function getClearingNumber() */ public function setClearingNumber($clearingNumber) { - if (is_null($clearingNumber)) { - throw new \InvalidArgumentException('non-nullable clearingNumber cannot be null'); - } $this->container['clearingNumber'] = $clearingNumber; return $this; @@ -393,9 +387,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/BalancePlatform/SGLocalAccountIdentification.php b/src/Adyen/Model/BalancePlatform/SGLocalAccountIdentification.php index 0530cd31e..458a11d79 100644 --- a/src/Adyen/Model/BalancePlatform/SGLocalAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/SGLocalAccountIdentification.php @@ -336,9 +336,6 @@ public function getAccountNumber() */ public function setAccountNumber($accountNumber) { - if (is_null($accountNumber)) { - throw new \InvalidArgumentException('non-nullable accountNumber cannot be null'); - } $this->container['accountNumber'] = $accountNumber; return $this; @@ -363,9 +360,6 @@ public function getBic() */ public function setBic($bic) { - if (is_null($bic)) { - throw new \InvalidArgumentException('non-nullable bic cannot be null'); - } $this->container['bic'] = $bic; return $this; @@ -390,9 +384,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/BalancePlatform/SameAmountRestriction.php b/src/Adyen/Model/BalancePlatform/SameAmountRestriction.php index 31e9267f9..b4b2a3afd 100644 --- a/src/Adyen/Model/BalancePlatform/SameAmountRestriction.php +++ b/src/Adyen/Model/BalancePlatform/SameAmountRestriction.php @@ -305,9 +305,6 @@ public function getOperation() */ public function setOperation($operation) { - if (is_null($operation)) { - throw new \InvalidArgumentException('non-nullable operation cannot be null'); - } $this->container['operation'] = $operation; return $this; @@ -332,9 +329,6 @@ public function getValue() */ public function setValue($value) { - if (is_null($value)) { - throw new \InvalidArgumentException('non-nullable value cannot be null'); - } $this->container['value'] = $value; return $this; diff --git a/src/Adyen/Model/BalancePlatform/SameCounterpartyRestriction.php b/src/Adyen/Model/BalancePlatform/SameCounterpartyRestriction.php index 256d98acc..203e0c7c6 100644 --- a/src/Adyen/Model/BalancePlatform/SameCounterpartyRestriction.php +++ b/src/Adyen/Model/BalancePlatform/SameCounterpartyRestriction.php @@ -305,9 +305,6 @@ public function getOperation() */ public function setOperation($operation) { - if (is_null($operation)) { - throw new \InvalidArgumentException('non-nullable operation cannot be null'); - } $this->container['operation'] = $operation; return $this; @@ -332,9 +329,6 @@ public function getValue() */ public function setValue($value) { - if (is_null($value)) { - throw new \InvalidArgumentException('non-nullable value cannot be null'); - } $this->container['value'] = $value; return $this; diff --git a/src/Adyen/Model/BalancePlatform/SearchRegisteredDevicesResponse.php b/src/Adyen/Model/BalancePlatform/SearchRegisteredDevicesResponse.php index 121d4379e..adf04df60 100644 --- a/src/Adyen/Model/BalancePlatform/SearchRegisteredDevicesResponse.php +++ b/src/Adyen/Model/BalancePlatform/SearchRegisteredDevicesResponse.php @@ -316,9 +316,6 @@ public function getData() */ public function setData($data) { - if (is_null($data)) { - throw new \InvalidArgumentException('non-nullable data cannot be null'); - } $this->container['data'] = $data; return $this; @@ -343,7 +340,6 @@ public function getItemsTotal() */ public function setItemsTotal($itemsTotal) { - // Do nothing for nullable integers $this->container['itemsTotal'] = $itemsTotal; return $this; @@ -368,9 +364,6 @@ public function getLink() */ public function setLink($link) { - if (is_null($link)) { - throw new \InvalidArgumentException('non-nullable link cannot be null'); - } $this->container['link'] = $link; return $this; @@ -395,7 +388,6 @@ public function getPagesTotal() */ public function setPagesTotal($pagesTotal) { - // Do nothing for nullable integers $this->container['pagesTotal'] = $pagesTotal; return $this; diff --git a/src/Adyen/Model/BalancePlatform/StringMatch.php b/src/Adyen/Model/BalancePlatform/StringMatch.php index 215a9c6a3..dc1992902 100644 --- a/src/Adyen/Model/BalancePlatform/StringMatch.php +++ b/src/Adyen/Model/BalancePlatform/StringMatch.php @@ -329,9 +329,6 @@ public function getOperation() */ public function setOperation($operation) { - if (is_null($operation)) { - throw new \InvalidArgumentException('non-nullable operation cannot be null'); - } $allowedValues = $this->getOperationAllowableValues(); if (!in_array($operation, $allowedValues, true)) { throw new \InvalidArgumentException( @@ -366,9 +363,6 @@ public function getValue() */ public function setValue($value) { - if (is_null($value)) { - throw new \InvalidArgumentException('non-nullable value cannot be null'); - } $this->container['value'] = $value; return $this; diff --git a/src/Adyen/Model/BalancePlatform/SweepConfigurationV2.php b/src/Adyen/Model/BalancePlatform/SweepConfigurationV2.php index 97f124aa3..694a97516 100644 --- a/src/Adyen/Model/BalancePlatform/SweepConfigurationV2.php +++ b/src/Adyen/Model/BalancePlatform/SweepConfigurationV2.php @@ -317,6 +317,7 @@ public function getModelName() 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 = 'declined'; public const REASON_DECLINED_BY_TRANSACTION_RULE = 'declinedByTransactionRule'; public const REASON_ERROR = 'error'; public const REASON_NOT_ENOUGH_BALANCE = 'notEnoughBalance'; @@ -376,6 +377,7 @@ public function getReasonAllowableValues() self::REASON_COUNTERPARTY_ADDRESS_REQUIRED, self::REASON_COUNTERPARTY_BANK_TIMED_OUT, self::REASON_COUNTERPARTY_BANK_UNAVAILABLE, + self::REASON_DECLINED, self::REASON_DECLINED_BY_TRANSACTION_RULE, self::REASON_ERROR, self::REASON_NOT_ENOUGH_BALANCE, @@ -551,9 +553,6 @@ public function getCategory() */ 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( @@ -588,9 +587,6 @@ public function getCounterparty() */ public function setCounterparty($counterparty) { - if (is_null($counterparty)) { - throw new \InvalidArgumentException('non-nullable counterparty cannot be null'); - } $this->container['counterparty'] = $counterparty; return $this; @@ -615,9 +611,6 @@ public function getCurrency() */ public function setCurrency($currency) { - if (is_null($currency)) { - throw new \InvalidArgumentException('non-nullable currency cannot be null'); - } $this->container['currency'] = $currency; return $this; @@ -642,9 +635,6 @@ public function getDescription() */ public function setDescription($description) { - if (is_null($description)) { - throw new \InvalidArgumentException('non-nullable description cannot be null'); - } $this->container['description'] = $description; return $this; @@ -669,9 +659,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -690,15 +677,12 @@ public function getPriorities() /** * Sets priorities * - * @param string[]|null $priorities The list of priorities for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. You can provide multiple priorities. Adyen will try to pay out using the priority you list first. If that's not possible, it moves on to the next option in the order of your provided priorities. 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). Set `category` to **bank**. For more details, see optional priorities setup for [marketplaces](https://docs.adyen.com/marketplaces/payout-to-users/scheduled-payouts#optional-priorities-setup) or [platforms](https://docs.adyen.com/platforms/payout-to-users/scheduled-payouts#optional-priorities-setup). + * @param string[]|null $priorities The list of priorities for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. You can provide multiple priorities. Adyen will try to pay out using the priority you list first. If that's not possible, it moves on to the next option in the order of your provided priorities. Possible values: * **regular**: for normal, low-value transactions. * **fast**: a faster way to transfer funds, but the fees are higher. Recommended for high-priority, low-value transactions. * **wire**: the fastest way to transfer funds, but this has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: for instant funds transfers in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: for high-value transfers to a recipient in a different country. * **internal**: for transfers to an Adyen-issued business bank account (by bank account number/IBAN). Set `category` to **bank**. For more details, see optional priorities setup for [marketplaces](https://docs.adyen.com/marketplaces/payout-to-users/scheduled-payouts#optional-priorities-setup) or [platforms](https://docs.adyen.com/platforms/payout-to-users/scheduled-payouts#optional-priorities-setup). * * @return self */ public function setPriorities($priorities) { - if (is_null($priorities)) { - throw new \InvalidArgumentException('non-nullable priorities cannot be null'); - } $allowedValues = $this->getPrioritiesAllowableValues(); if (array_diff($priorities, $allowedValues)) { throw new \InvalidArgumentException( @@ -732,9 +716,6 @@ public function getReason() */ 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( @@ -769,9 +750,6 @@ public function getReference() */ public function setReference($reference) { - if (is_null($reference)) { - throw new \InvalidArgumentException('non-nullable reference cannot be null'); - } $this->container['reference'] = $reference; return $this; @@ -796,9 +774,6 @@ public function getReferenceForBeneficiary() */ public function setReferenceForBeneficiary($referenceForBeneficiary) { - if (is_null($referenceForBeneficiary)) { - throw new \InvalidArgumentException('non-nullable referenceForBeneficiary cannot be null'); - } $this->container['referenceForBeneficiary'] = $referenceForBeneficiary; return $this; @@ -823,9 +798,6 @@ public function getSchedule() */ public function setSchedule($schedule) { - if (is_null($schedule)) { - throw new \InvalidArgumentException('non-nullable schedule cannot be null'); - } $this->container['schedule'] = $schedule; return $this; @@ -850,9 +822,6 @@ public function getStatus() */ 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( @@ -887,9 +856,6 @@ public function getSweepAmount() */ public function setSweepAmount($sweepAmount) { - if (is_null($sweepAmount)) { - throw new \InvalidArgumentException('non-nullable sweepAmount cannot be null'); - } $this->container['sweepAmount'] = $sweepAmount; return $this; @@ -914,9 +880,6 @@ public function getTargetAmount() */ public function setTargetAmount($targetAmount) { - if (is_null($targetAmount)) { - throw new \InvalidArgumentException('non-nullable targetAmount cannot be null'); - } $this->container['targetAmount'] = $targetAmount; return $this; @@ -941,9 +904,6 @@ public function getTriggerAmount() */ public function setTriggerAmount($triggerAmount) { - if (is_null($triggerAmount)) { - throw new \InvalidArgumentException('non-nullable triggerAmount cannot be null'); - } $this->container['triggerAmount'] = $triggerAmount; return $this; @@ -968,9 +928,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/BalancePlatform/SweepCounterparty.php b/src/Adyen/Model/BalancePlatform/SweepCounterparty.php index ea27d1a01..ada7a05f6 100644 --- a/src/Adyen/Model/BalancePlatform/SweepCounterparty.php +++ b/src/Adyen/Model/BalancePlatform/SweepCounterparty.php @@ -303,15 +303,12 @@ public function getBalanceAccountId() /** * 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**. + * @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). > If you are updating the counterparty from a transfer instrument to a balance account, set `transferInstrumentId` to **null**. * * @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; @@ -330,15 +327,12 @@ public function getMerchantAccount() /** * 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. + * @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 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; @@ -357,15 +351,12 @@ public function getTransferInstrumentId() /** * 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 in your [marketplace](https://docs.adyen.com/marketplaces/top-up-balance-account/#before-you-begin) or [platform](https://docs.adyen.com/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. + * @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 in your [marketplace](https://docs.adyen.com/marketplaces/top-up-balance-account/#before-you-begin) or [platform](https://docs.adyen.com/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.> If you are updating the counterparty from a balance account to a transfer instrument, set `balanceAccountId` to **null**. * * @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; diff --git a/src/Adyen/Model/BalancePlatform/SweepSchedule.php b/src/Adyen/Model/BalancePlatform/SweepSchedule.php index 6189c4318..fc819c640 100644 --- a/src/Adyen/Model/BalancePlatform/SweepSchedule.php +++ b/src/Adyen/Model/BalancePlatform/SweepSchedule.php @@ -334,9 +334,6 @@ public function getCronExpression() */ public function setCronExpression($cronExpression) { - if (is_null($cronExpression)) { - throw new \InvalidArgumentException('non-nullable cronExpression cannot be null'); - } $this->container['cronExpression'] = $cronExpression; return $this; @@ -355,15 +352,12 @@ public function getType() /** * 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. + * @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**: execute the sweep instantly if the `triggerAmount` is reached. * * @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( diff --git a/src/Adyen/Model/BalancePlatform/ThresholdRepayment.php b/src/Adyen/Model/BalancePlatform/ThresholdRepayment.php index 2f0daedc0..ac75404a7 100644 --- a/src/Adyen/Model/BalancePlatform/ThresholdRepayment.php +++ b/src/Adyen/Model/BalancePlatform/ThresholdRepayment.php @@ -298,9 +298,6 @@ public function getAmount() */ public function setAmount($amount) { - if (is_null($amount)) { - throw new \InvalidArgumentException('non-nullable amount cannot be null'); - } $this->container['amount'] = $amount; return $this; diff --git a/src/Adyen/Model/BalancePlatform/TimeOfDay.php b/src/Adyen/Model/BalancePlatform/TimeOfDay.php index 0b75bb181..8d6900ff2 100644 --- a/src/Adyen/Model/BalancePlatform/TimeOfDay.php +++ b/src/Adyen/Model/BalancePlatform/TimeOfDay.php @@ -302,9 +302,6 @@ public function getEndTime() */ public function setEndTime($endTime) { - if (is_null($endTime)) { - throw new \InvalidArgumentException('non-nullable endTime cannot be null'); - } $this->container['endTime'] = $endTime; return $this; @@ -329,9 +326,6 @@ public function getStartTime() */ public function setStartTime($startTime) { - if (is_null($startTime)) { - throw new \InvalidArgumentException('non-nullable startTime cannot be null'); - } $this->container['startTime'] = $startTime; return $this; diff --git a/src/Adyen/Model/BalancePlatform/TimeOfDayRestriction.php b/src/Adyen/Model/BalancePlatform/TimeOfDayRestriction.php index 78efb34b5..21cb6d627 100644 --- a/src/Adyen/Model/BalancePlatform/TimeOfDayRestriction.php +++ b/src/Adyen/Model/BalancePlatform/TimeOfDayRestriction.php @@ -305,9 +305,6 @@ public function getOperation() */ public function setOperation($operation) { - if (is_null($operation)) { - throw new \InvalidArgumentException('non-nullable operation cannot be null'); - } $this->container['operation'] = $operation; return $this; @@ -332,9 +329,6 @@ public function getValue() */ public function setValue($value) { - if (is_null($value)) { - throw new \InvalidArgumentException('non-nullable value cannot be null'); - } $this->container['value'] = $value; return $this; diff --git a/src/Adyen/Model/BalancePlatform/TotalAmountRestriction.php b/src/Adyen/Model/BalancePlatform/TotalAmountRestriction.php index 5e216281d..81503ae6c 100644 --- a/src/Adyen/Model/BalancePlatform/TotalAmountRestriction.php +++ b/src/Adyen/Model/BalancePlatform/TotalAmountRestriction.php @@ -305,9 +305,6 @@ public function getOperation() */ public function setOperation($operation) { - if (is_null($operation)) { - throw new \InvalidArgumentException('non-nullable operation cannot be null'); - } $this->container['operation'] = $operation; return $this; @@ -332,9 +329,6 @@ public function getValue() */ public function setValue($value) { - if (is_null($value)) { - throw new \InvalidArgumentException('non-nullable value cannot be null'); - } $this->container['value'] = $value; return $this; diff --git a/src/Adyen/Model/BalancePlatform/TransactionRule.php b/src/Adyen/Model/BalancePlatform/TransactionRule.php index 90959dc7b..480359969 100644 --- a/src/Adyen/Model/BalancePlatform/TransactionRule.php +++ b/src/Adyen/Model/BalancePlatform/TransactionRule.php @@ -508,9 +508,6 @@ public function getAggregationLevel() */ public function setAggregationLevel($aggregationLevel) { - if (is_null($aggregationLevel)) { - throw new \InvalidArgumentException('non-nullable aggregationLevel cannot be null'); - } $this->container['aggregationLevel'] = $aggregationLevel; return $this; @@ -535,9 +532,6 @@ public function getDescription() */ public function setDescription($description) { - if (is_null($description)) { - throw new \InvalidArgumentException('non-nullable description cannot be null'); - } $this->container['description'] = $description; return $this; @@ -562,9 +556,6 @@ public function getEndDate() */ public function setEndDate($endDate) { - if (is_null($endDate)) { - throw new \InvalidArgumentException('non-nullable endDate cannot be null'); - } $this->container['endDate'] = $endDate; return $this; @@ -589,9 +580,6 @@ public function getEntityKey() */ public function setEntityKey($entityKey) { - if (is_null($entityKey)) { - throw new \InvalidArgumentException('non-nullable entityKey cannot be null'); - } $this->container['entityKey'] = $entityKey; return $this; @@ -616,9 +604,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -643,9 +628,6 @@ public function getInterval() */ public function setInterval($interval) { - if (is_null($interval)) { - throw new \InvalidArgumentException('non-nullable interval cannot be null'); - } $this->container['interval'] = $interval; return $this; @@ -670,9 +652,6 @@ public function getOutcomeType() */ public function setOutcomeType($outcomeType) { - if (is_null($outcomeType)) { - throw new \InvalidArgumentException('non-nullable outcomeType cannot be null'); - } $allowedValues = $this->getOutcomeTypeAllowableValues(); if (!in_array($outcomeType, $allowedValues, true)) { throw new \InvalidArgumentException( @@ -707,9 +686,6 @@ public function getReference() */ public function setReference($reference) { - if (is_null($reference)) { - throw new \InvalidArgumentException('non-nullable reference cannot be null'); - } $this->container['reference'] = $reference; return $this; @@ -734,9 +710,6 @@ public function getRequestType() */ public function setRequestType($requestType) { - if (is_null($requestType)) { - throw new \InvalidArgumentException('non-nullable requestType cannot be null'); - } $allowedValues = $this->getRequestTypeAllowableValues(); if (!in_array($requestType, $allowedValues, true)) { throw new \InvalidArgumentException( @@ -771,9 +744,6 @@ public function getRuleRestrictions() */ public function setRuleRestrictions($ruleRestrictions) { - if (is_null($ruleRestrictions)) { - throw new \InvalidArgumentException('non-nullable ruleRestrictions cannot be null'); - } $this->container['ruleRestrictions'] = $ruleRestrictions; return $this; @@ -798,7 +768,6 @@ public function getScore() */ public function setScore($score) { - // Do nothing for nullable integers $this->container['score'] = $score; return $this; @@ -823,9 +792,6 @@ public function getStartDate() */ public function setStartDate($startDate) { - if (is_null($startDate)) { - throw new \InvalidArgumentException('non-nullable startDate cannot be null'); - } $this->container['startDate'] = $startDate; return $this; @@ -850,9 +816,6 @@ public function getStatus() */ 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( @@ -887,9 +850,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/BalancePlatform/TransactionRuleEntityKey.php b/src/Adyen/Model/BalancePlatform/TransactionRuleEntityKey.php index 7db4dd966..39402c0b7 100644 --- a/src/Adyen/Model/BalancePlatform/TransactionRuleEntityKey.php +++ b/src/Adyen/Model/BalancePlatform/TransactionRuleEntityKey.php @@ -302,9 +302,6 @@ public function getEntityReference() */ public function setEntityReference($entityReference) { - if (is_null($entityReference)) { - throw new \InvalidArgumentException('non-nullable entityReference cannot be null'); - } $this->container['entityReference'] = $entityReference; return $this; @@ -329,9 +326,6 @@ public function getEntityType() */ public function setEntityType($entityType) { - if (is_null($entityType)) { - throw new \InvalidArgumentException('non-nullable entityType cannot be null'); - } $this->container['entityType'] = $entityType; return $this; diff --git a/src/Adyen/Model/BalancePlatform/TransactionRuleInfo.php b/src/Adyen/Model/BalancePlatform/TransactionRuleInfo.php index 571794acd..d2c0087ee 100644 --- a/src/Adyen/Model/BalancePlatform/TransactionRuleInfo.php +++ b/src/Adyen/Model/BalancePlatform/TransactionRuleInfo.php @@ -501,9 +501,6 @@ public function getAggregationLevel() */ public function setAggregationLevel($aggregationLevel) { - if (is_null($aggregationLevel)) { - throw new \InvalidArgumentException('non-nullable aggregationLevel cannot be null'); - } $this->container['aggregationLevel'] = $aggregationLevel; return $this; @@ -528,9 +525,6 @@ public function getDescription() */ public function setDescription($description) { - if (is_null($description)) { - throw new \InvalidArgumentException('non-nullable description cannot be null'); - } $this->container['description'] = $description; return $this; @@ -555,9 +549,6 @@ public function getEndDate() */ public function setEndDate($endDate) { - if (is_null($endDate)) { - throw new \InvalidArgumentException('non-nullable endDate cannot be null'); - } $this->container['endDate'] = $endDate; return $this; @@ -582,9 +573,6 @@ public function getEntityKey() */ public function setEntityKey($entityKey) { - if (is_null($entityKey)) { - throw new \InvalidArgumentException('non-nullable entityKey cannot be null'); - } $this->container['entityKey'] = $entityKey; return $this; @@ -609,9 +597,6 @@ public function getInterval() */ public function setInterval($interval) { - if (is_null($interval)) { - throw new \InvalidArgumentException('non-nullable interval cannot be null'); - } $this->container['interval'] = $interval; return $this; @@ -636,9 +621,6 @@ public function getOutcomeType() */ public function setOutcomeType($outcomeType) { - if (is_null($outcomeType)) { - throw new \InvalidArgumentException('non-nullable outcomeType cannot be null'); - } $allowedValues = $this->getOutcomeTypeAllowableValues(); if (!in_array($outcomeType, $allowedValues, true)) { throw new \InvalidArgumentException( @@ -673,9 +655,6 @@ public function getReference() */ public function setReference($reference) { - if (is_null($reference)) { - throw new \InvalidArgumentException('non-nullable reference cannot be null'); - } $this->container['reference'] = $reference; return $this; @@ -700,9 +679,6 @@ public function getRequestType() */ public function setRequestType($requestType) { - if (is_null($requestType)) { - throw new \InvalidArgumentException('non-nullable requestType cannot be null'); - } $allowedValues = $this->getRequestTypeAllowableValues(); if (!in_array($requestType, $allowedValues, true)) { throw new \InvalidArgumentException( @@ -737,9 +713,6 @@ public function getRuleRestrictions() */ public function setRuleRestrictions($ruleRestrictions) { - if (is_null($ruleRestrictions)) { - throw new \InvalidArgumentException('non-nullable ruleRestrictions cannot be null'); - } $this->container['ruleRestrictions'] = $ruleRestrictions; return $this; @@ -764,7 +737,6 @@ public function getScore() */ public function setScore($score) { - // Do nothing for nullable integers $this->container['score'] = $score; return $this; @@ -789,9 +761,6 @@ public function getStartDate() */ public function setStartDate($startDate) { - if (is_null($startDate)) { - throw new \InvalidArgumentException('non-nullable startDate cannot be null'); - } $this->container['startDate'] = $startDate; return $this; @@ -816,9 +785,6 @@ public function getStatus() */ 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( @@ -853,9 +819,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/BalancePlatform/TransactionRuleInterval.php b/src/Adyen/Model/BalancePlatform/TransactionRuleInterval.php index 4ae7096bc..3b02d7633 100644 --- a/src/Adyen/Model/BalancePlatform/TransactionRuleInterval.php +++ b/src/Adyen/Model/BalancePlatform/TransactionRuleInterval.php @@ -399,7 +399,6 @@ public function getDayOfMonth() */ public function setDayOfMonth($dayOfMonth) { - // Do nothing for nullable integers $this->container['dayOfMonth'] = $dayOfMonth; return $this; @@ -424,9 +423,6 @@ public function getDayOfWeek() */ public function setDayOfWeek($dayOfWeek) { - if (is_null($dayOfWeek)) { - throw new \InvalidArgumentException('non-nullable dayOfWeek cannot be null'); - } $allowedValues = $this->getDayOfWeekAllowableValues(); if (!in_array($dayOfWeek, $allowedValues, true)) { throw new \InvalidArgumentException( @@ -461,9 +457,6 @@ public function getDuration() */ public function setDuration($duration) { - if (is_null($duration)) { - throw new \InvalidArgumentException('non-nullable duration cannot be null'); - } $this->container['duration'] = $duration; return $this; @@ -488,9 +481,6 @@ public function getTimeOfDay() */ public function setTimeOfDay($timeOfDay) { - if (is_null($timeOfDay)) { - throw new \InvalidArgumentException('non-nullable timeOfDay cannot be null'); - } $this->container['timeOfDay'] = $timeOfDay; return $this; @@ -515,9 +505,6 @@ public function getTimeZone() */ public function setTimeZone($timeZone) { - if (is_null($timeZone)) { - throw new \InvalidArgumentException('non-nullable timeZone cannot be null'); - } $this->container['timeZone'] = $timeZone; return $this; @@ -542,9 +529,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/BalancePlatform/TransactionRuleResponse.php b/src/Adyen/Model/BalancePlatform/TransactionRuleResponse.php index 3f1cfaa55..ed9bfe38f 100644 --- a/src/Adyen/Model/BalancePlatform/TransactionRuleResponse.php +++ b/src/Adyen/Model/BalancePlatform/TransactionRuleResponse.php @@ -295,9 +295,6 @@ public function getTransactionRule() */ public function setTransactionRule($transactionRule) { - if (is_null($transactionRule)) { - throw new \InvalidArgumentException('non-nullable transactionRule cannot be null'); - } $this->container['transactionRule'] = $transactionRule; return $this; diff --git a/src/Adyen/Model/BalancePlatform/TransactionRuleRestrictions.php b/src/Adyen/Model/BalancePlatform/TransactionRuleRestrictions.php index 10ac56d07..1bc139f92 100644 --- a/src/Adyen/Model/BalancePlatform/TransactionRuleRestrictions.php +++ b/src/Adyen/Model/BalancePlatform/TransactionRuleRestrictions.php @@ -53,6 +53,7 @@ class TransactionRuleRestrictions implements ModelInterface, ArrayAccess, \JsonS 'entryModes' => '\Adyen\Model\BalancePlatform\EntryModesRestriction', 'internationalTransaction' => '\Adyen\Model\BalancePlatform\InternationalTransactionRestriction', 'matchingTransactions' => '\Adyen\Model\BalancePlatform\MatchingTransactionsRestriction', + 'matchingValues' => '\Adyen\Model\BalancePlatform\MatchingValuesRestriction', 'mccs' => '\Adyen\Model\BalancePlatform\MccsRestriction', 'merchantNames' => '\Adyen\Model\BalancePlatform\MerchantNamesRestriction', 'merchants' => '\Adyen\Model\BalancePlatform\MerchantsRestriction', @@ -81,6 +82,7 @@ class TransactionRuleRestrictions implements ModelInterface, ArrayAccess, \JsonS 'entryModes' => null, 'internationalTransaction' => null, 'matchingTransactions' => null, + 'matchingValues' => null, 'mccs' => null, 'merchantNames' => null, 'merchants' => null, @@ -107,6 +109,7 @@ class TransactionRuleRestrictions implements ModelInterface, ArrayAccess, \JsonS 'entryModes' => false, 'internationalTransaction' => false, 'matchingTransactions' => false, + 'matchingValues' => false, 'mccs' => false, 'merchantNames' => false, 'merchants' => false, @@ -213,6 +216,7 @@ public function isNullableSetToNull(string $property): bool 'entryModes' => 'entryModes', 'internationalTransaction' => 'internationalTransaction', 'matchingTransactions' => 'matchingTransactions', + 'matchingValues' => 'matchingValues', 'mccs' => 'mccs', 'merchantNames' => 'merchantNames', 'merchants' => 'merchants', @@ -239,6 +243,7 @@ public function isNullableSetToNull(string $property): bool 'entryModes' => 'setEntryModes', 'internationalTransaction' => 'setInternationalTransaction', 'matchingTransactions' => 'setMatchingTransactions', + 'matchingValues' => 'setMatchingValues', 'mccs' => 'setMccs', 'merchantNames' => 'setMerchantNames', 'merchants' => 'setMerchants', @@ -265,6 +270,7 @@ public function isNullableSetToNull(string $property): bool 'entryModes' => 'getEntryModes', 'internationalTransaction' => 'getInternationalTransaction', 'matchingTransactions' => 'getMatchingTransactions', + 'matchingValues' => 'getMatchingValues', 'mccs' => 'getMccs', 'merchantNames' => 'getMerchantNames', 'merchants' => 'getMerchants', @@ -342,6 +348,7 @@ public function __construct(array $data = null) $this->setIfExists('entryModes', $data ?? [], null); $this->setIfExists('internationalTransaction', $data ?? [], null); $this->setIfExists('matchingTransactions', $data ?? [], null); + $this->setIfExists('matchingValues', $data ?? [], null); $this->setIfExists('mccs', $data ?? [], null); $this->setIfExists('merchantNames', $data ?? [], null); $this->setIfExists('merchants', $data ?? [], null); @@ -414,9 +421,6 @@ public function getActiveNetworkTokens() */ public function setActiveNetworkTokens($activeNetworkTokens) { - if (is_null($activeNetworkTokens)) { - throw new \InvalidArgumentException('non-nullable activeNetworkTokens cannot be null'); - } $this->container['activeNetworkTokens'] = $activeNetworkTokens; return $this; @@ -441,9 +445,6 @@ public function getBrandVariants() */ public function setBrandVariants($brandVariants) { - if (is_null($brandVariants)) { - throw new \InvalidArgumentException('non-nullable brandVariants cannot be null'); - } $this->container['brandVariants'] = $brandVariants; return $this; @@ -468,9 +469,6 @@ public function getCounterpartyBank() */ public function setCounterpartyBank($counterpartyBank) { - if (is_null($counterpartyBank)) { - throw new \InvalidArgumentException('non-nullable counterpartyBank cannot be null'); - } $this->container['counterpartyBank'] = $counterpartyBank; return $this; @@ -495,9 +493,6 @@ public function getCountries() */ public function setCountries($countries) { - if (is_null($countries)) { - throw new \InvalidArgumentException('non-nullable countries cannot be null'); - } $this->container['countries'] = $countries; return $this; @@ -522,9 +517,6 @@ public function getDayOfWeek() */ public function setDayOfWeek($dayOfWeek) { - if (is_null($dayOfWeek)) { - throw new \InvalidArgumentException('non-nullable dayOfWeek cannot be null'); - } $this->container['dayOfWeek'] = $dayOfWeek; return $this; @@ -549,9 +541,6 @@ public function getDifferentCurrencies() */ public function setDifferentCurrencies($differentCurrencies) { - if (is_null($differentCurrencies)) { - throw new \InvalidArgumentException('non-nullable differentCurrencies cannot be null'); - } $this->container['differentCurrencies'] = $differentCurrencies; return $this; @@ -576,9 +565,6 @@ public function getEntryModes() */ public function setEntryModes($entryModes) { - if (is_null($entryModes)) { - throw new \InvalidArgumentException('non-nullable entryModes cannot be null'); - } $this->container['entryModes'] = $entryModes; return $this; @@ -603,9 +589,6 @@ public function getInternationalTransaction() */ public function setInternationalTransaction($internationalTransaction) { - if (is_null($internationalTransaction)) { - throw new \InvalidArgumentException('non-nullable internationalTransaction cannot be null'); - } $this->container['internationalTransaction'] = $internationalTransaction; return $this; @@ -630,14 +613,35 @@ public function getMatchingTransactions() */ public function setMatchingTransactions($matchingTransactions) { - if (is_null($matchingTransactions)) { - throw new \InvalidArgumentException('non-nullable matchingTransactions cannot be null'); - } $this->container['matchingTransactions'] = $matchingTransactions; return $this; } + /** + * Gets matchingValues + * + * @return \Adyen\Model\BalancePlatform\MatchingValuesRestriction|null + */ + public function getMatchingValues() + { + return $this->container['matchingValues']; + } + + /** + * Sets matchingValues + * + * @param \Adyen\Model\BalancePlatform\MatchingValuesRestriction|null $matchingValues matchingValues + * + * @return self + */ + public function setMatchingValues($matchingValues) + { + $this->container['matchingValues'] = $matchingValues; + + return $this; + } + /** * Gets mccs * @@ -657,9 +661,6 @@ public function getMccs() */ public function setMccs($mccs) { - if (is_null($mccs)) { - throw new \InvalidArgumentException('non-nullable mccs cannot be null'); - } $this->container['mccs'] = $mccs; return $this; @@ -684,9 +685,6 @@ public function getMerchantNames() */ public function setMerchantNames($merchantNames) { - if (is_null($merchantNames)) { - throw new \InvalidArgumentException('non-nullable merchantNames cannot be null'); - } $this->container['merchantNames'] = $merchantNames; return $this; @@ -711,9 +709,6 @@ public function getMerchants() */ public function setMerchants($merchants) { - if (is_null($merchants)) { - throw new \InvalidArgumentException('non-nullable merchants cannot be null'); - } $this->container['merchants'] = $merchants; return $this; @@ -738,9 +733,6 @@ public function getProcessingTypes() */ public function setProcessingTypes($processingTypes) { - if (is_null($processingTypes)) { - throw new \InvalidArgumentException('non-nullable processingTypes cannot be null'); - } $this->container['processingTypes'] = $processingTypes; return $this; @@ -765,9 +757,6 @@ public function getRiskScores() */ public function setRiskScores($riskScores) { - if (is_null($riskScores)) { - throw new \InvalidArgumentException('non-nullable riskScores cannot be null'); - } $this->container['riskScores'] = $riskScores; return $this; @@ -792,9 +781,6 @@ public function getSameAmountRestriction() */ public function setSameAmountRestriction($sameAmountRestriction) { - if (is_null($sameAmountRestriction)) { - throw new \InvalidArgumentException('non-nullable sameAmountRestriction cannot be null'); - } $this->container['sameAmountRestriction'] = $sameAmountRestriction; return $this; @@ -819,9 +805,6 @@ public function getSameCounterpartyRestriction() */ public function setSameCounterpartyRestriction($sameCounterpartyRestriction) { - if (is_null($sameCounterpartyRestriction)) { - throw new \InvalidArgumentException('non-nullable sameCounterpartyRestriction cannot be null'); - } $this->container['sameCounterpartyRestriction'] = $sameCounterpartyRestriction; return $this; @@ -846,9 +829,6 @@ public function getTimeOfDay() */ public function setTimeOfDay($timeOfDay) { - if (is_null($timeOfDay)) { - throw new \InvalidArgumentException('non-nullable timeOfDay cannot be null'); - } $this->container['timeOfDay'] = $timeOfDay; return $this; @@ -873,9 +853,6 @@ public function getTotalAmount() */ public function setTotalAmount($totalAmount) { - if (is_null($totalAmount)) { - throw new \InvalidArgumentException('non-nullable totalAmount cannot be null'); - } $this->container['totalAmount'] = $totalAmount; return $this; diff --git a/src/Adyen/Model/BalancePlatform/TransactionRulesResponse.php b/src/Adyen/Model/BalancePlatform/TransactionRulesResponse.php index b79d68f9a..08f6156c3 100644 --- a/src/Adyen/Model/BalancePlatform/TransactionRulesResponse.php +++ b/src/Adyen/Model/BalancePlatform/TransactionRulesResponse.php @@ -295,9 +295,6 @@ public function getTransactionRules() */ public function setTransactionRules($transactionRules) { - if (is_null($transactionRules)) { - throw new \InvalidArgumentException('non-nullable transactionRules cannot be null'); - } $this->container['transactionRules'] = $transactionRules; return $this; diff --git a/src/Adyen/Model/BalancePlatform/TransferRoute.php b/src/Adyen/Model/BalancePlatform/TransferRoute.php index abbd5dce3..fdab0a463 100644 --- a/src/Adyen/Model/BalancePlatform/TransferRoute.php +++ b/src/Adyen/Model/BalancePlatform/TransferRoute.php @@ -391,9 +391,6 @@ public function getCategory() */ 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( @@ -428,9 +425,6 @@ public function getCountry() */ public function setCountry($country) { - if (is_null($country)) { - throw new \InvalidArgumentException('non-nullable country cannot be null'); - } $this->container['country'] = $country; return $this; @@ -455,9 +449,6 @@ public function getCurrency() */ public function setCurrency($currency) { - if (is_null($currency)) { - throw new \InvalidArgumentException('non-nullable currency cannot be null'); - } $this->container['currency'] = $currency; return $this; @@ -476,15 +467,12 @@ public function getPriority() /** * 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. 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). + * @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. Possible values: * **regular**: for normal, low-value transactions. * **fast**: a faster way to transfer funds, but the fees are higher. Recommended for high-priority, low-value transactions. * **wire**: the fastest way to transfer funds, but this has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: for instant funds transfers in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: for high-value transfers to a recipient in a different country. * **internal**: for transfers 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( @@ -519,9 +507,6 @@ public function getRequirements() */ public function setRequirements($requirements) { - if (is_null($requirements)) { - throw new \InvalidArgumentException('non-nullable requirements cannot be null'); - } $this->container['requirements'] = $requirements; return $this; diff --git a/src/Adyen/Model/BalancePlatform/TransferRouteRequest.php b/src/Adyen/Model/BalancePlatform/TransferRouteRequest.php index 2377fccc7..1c11667f5 100644 --- a/src/Adyen/Model/BalancePlatform/TransferRouteRequest.php +++ b/src/Adyen/Model/BalancePlatform/TransferRouteRequest.php @@ -389,9 +389,6 @@ public function getBalanceAccountId() */ public function setBalanceAccountId($balanceAccountId) { - if (is_null($balanceAccountId)) { - throw new \InvalidArgumentException('non-nullable balanceAccountId cannot be null'); - } $this->container['balanceAccountId'] = $balanceAccountId; return $this; @@ -416,9 +413,6 @@ public function getBalancePlatform() */ public function setBalancePlatform($balancePlatform) { - if (is_null($balancePlatform)) { - throw new \InvalidArgumentException('non-nullable balancePlatform cannot be null'); - } $this->container['balancePlatform'] = $balancePlatform; return $this; @@ -443,9 +437,6 @@ public function getCategory() */ 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( @@ -480,9 +471,6 @@ public function getCounterparty() */ public function setCounterparty($counterparty) { - if (is_null($counterparty)) { - throw new \InvalidArgumentException('non-nullable counterparty cannot be null'); - } $this->container['counterparty'] = $counterparty; return $this; @@ -507,9 +495,6 @@ public function getCountry() */ public function setCountry($country) { - if (is_null($country)) { - throw new \InvalidArgumentException('non-nullable country cannot be null'); - } $this->container['country'] = $country; return $this; @@ -534,9 +519,6 @@ public function getCurrency() */ public function setCurrency($currency) { - if (is_null($currency)) { - throw new \InvalidArgumentException('non-nullable currency cannot be null'); - } $this->container['currency'] = $currency; return $this; @@ -555,15 +537,12 @@ public function getPriorities() /** * Sets priorities * - * @param string[]|null $priorities The list of priorities for the bank transfer. Priorities set the speed at which the transfer is sent and the fees that you have to pay. Multiple values can be provided. 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). + * @param string[]|null $priorities The list of priorities for the bank transfer. Priorities set the speed at which the transfer is sent and the fees that you have to pay. Multiple values can be provided. Possible values: * **regular**: for normal, low-value transactions. * **fast**: a faster way to transfer funds, but the fees are higher. Recommended for high-priority, low-value transactions. * **wire**: the fastest way to transfer funds, but this has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: for instant funds transfers in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: for high-value transfers to a recipient in a different country. * **internal**: for transfers to an Adyen-issued business bank account (by bank account number/IBAN). * * @return self */ public function setPriorities($priorities) { - if (is_null($priorities)) { - throw new \InvalidArgumentException('non-nullable priorities cannot be null'); - } $allowedValues = $this->getPrioritiesAllowableValues(); if (array_diff($priorities, $allowedValues)) { throw new \InvalidArgumentException( diff --git a/src/Adyen/Model/BalancePlatform/TransferRouteRequirementsInner.php b/src/Adyen/Model/BalancePlatform/TransferRouteRequirementsInner.php index f947d28c7..2f4e825dc 100644 --- a/src/Adyen/Model/BalancePlatform/TransferRouteRequirementsInner.php +++ b/src/Adyen/Model/BalancePlatform/TransferRouteRequirementsInner.php @@ -362,9 +362,6 @@ public function getDescription() */ public function setDescription($description) { - if (is_null($description)) { - throw new \InvalidArgumentException('non-nullable description cannot be null'); - } $this->container['description'] = $description; return $this; @@ -389,9 +386,6 @@ public function getRequiredAddressFields() */ public function setRequiredAddressFields($requiredAddressFields) { - if (is_null($requiredAddressFields)) { - throw new \InvalidArgumentException('non-nullable requiredAddressFields cannot be null'); - } $this->container['requiredAddressFields'] = $requiredAddressFields; return $this; @@ -416,9 +410,6 @@ public function getType() */ public function setType($type) { - if (is_null($type)) { - throw new \InvalidArgumentException('non-nullable type cannot be null'); - } $this->container['type'] = $type; return $this; @@ -443,9 +434,6 @@ public function getMax() */ public function setMax($max) { - if (is_null($max)) { - throw new \InvalidArgumentException('non-nullable max cannot be null'); - } $this->container['max'] = $max; return $this; @@ -470,9 +458,6 @@ public function getMin() */ public function setMin($min) { - if (is_null($min)) { - throw new \InvalidArgumentException('non-nullable min cannot be null'); - } $this->container['min'] = $min; return $this; @@ -497,9 +482,6 @@ public function getBankAccountIdentificationTypes() */ public function setBankAccountIdentificationTypes($bankAccountIdentificationTypes) { - if (is_null($bankAccountIdentificationTypes)) { - throw new \InvalidArgumentException('non-nullable bankAccountIdentificationTypes cannot be null'); - } $this->container['bankAccountIdentificationTypes'] = $bankAccountIdentificationTypes; return $this; @@ -524,9 +506,6 @@ public function getIssuingCountryCode() */ public function setIssuingCountryCode($issuingCountryCode) { - if (is_null($issuingCountryCode)) { - throw new \InvalidArgumentException('non-nullable issuingCountryCode cannot be null'); - } $this->container['issuingCountryCode'] = $issuingCountryCode; return $this; @@ -551,9 +530,6 @@ public function getIssuingCountryCodes() */ public function setIssuingCountryCodes($issuingCountryCodes) { - if (is_null($issuingCountryCodes)) { - throw new \InvalidArgumentException('non-nullable issuingCountryCodes cannot be null'); - } $this->container['issuingCountryCodes'] = $issuingCountryCodes; return $this; @@ -578,9 +554,6 @@ public function getOnlyForCrossBalancePlatform() */ public function setOnlyForCrossBalancePlatform($onlyForCrossBalancePlatform) { - if (is_null($onlyForCrossBalancePlatform)) { - throw new \InvalidArgumentException('non-nullable onlyForCrossBalancePlatform cannot be null'); - } $this->container['onlyForCrossBalancePlatform'] = $onlyForCrossBalancePlatform; return $this; @@ -605,9 +578,6 @@ public function getPaymentInstrumentType() */ public function setPaymentInstrumentType($paymentInstrumentType) { - if (is_null($paymentInstrumentType)) { - throw new \InvalidArgumentException('non-nullable paymentInstrumentType cannot be null'); - } $this->container['paymentInstrumentType'] = $paymentInstrumentType; return $this; diff --git a/src/Adyen/Model/BalancePlatform/TransferRouteResponse.php b/src/Adyen/Model/BalancePlatform/TransferRouteResponse.php index 0932d90d9..419c5dc04 100644 --- a/src/Adyen/Model/BalancePlatform/TransferRouteResponse.php +++ b/src/Adyen/Model/BalancePlatform/TransferRouteResponse.php @@ -295,9 +295,6 @@ public function getTransferRoutes() */ public function setTransferRoutes($transferRoutes) { - if (is_null($transferRoutes)) { - throw new \InvalidArgumentException('non-nullable transferRoutes cannot be null'); - } $this->container['transferRoutes'] = $transferRoutes; return $this; diff --git a/src/Adyen/Model/BalancePlatform/UKLocalAccountIdentification.php b/src/Adyen/Model/BalancePlatform/UKLocalAccountIdentification.php index 27cea03bb..05a57bf13 100644 --- a/src/Adyen/Model/BalancePlatform/UKLocalAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/UKLocalAccountIdentification.php @@ -339,9 +339,6 @@ public function getAccountNumber() */ public function setAccountNumber($accountNumber) { - if (is_null($accountNumber)) { - throw new \InvalidArgumentException('non-nullable accountNumber cannot be null'); - } $this->container['accountNumber'] = $accountNumber; return $this; @@ -366,9 +363,6 @@ public function getSortCode() */ public function setSortCode($sortCode) { - if (is_null($sortCode)) { - throw new \InvalidArgumentException('non-nullable sortCode cannot be null'); - } $this->container['sortCode'] = $sortCode; return $this; @@ -393,9 +387,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/BalancePlatform/USLocalAccountIdentification.php b/src/Adyen/Model/BalancePlatform/USLocalAccountIdentification.php index efe9efe37..e40c3d377 100644 --- a/src/Adyen/Model/BalancePlatform/USLocalAccountIdentification.php +++ b/src/Adyen/Model/BalancePlatform/USLocalAccountIdentification.php @@ -369,9 +369,6 @@ public function getAccountNumber() */ public function setAccountNumber($accountNumber) { - if (is_null($accountNumber)) { - throw new \InvalidArgumentException('non-nullable accountNumber cannot be null'); - } $this->container['accountNumber'] = $accountNumber; return $this; @@ -396,9 +393,6 @@ public function getAccountType() */ 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( @@ -433,9 +427,6 @@ public function getRoutingNumber() */ public function setRoutingNumber($routingNumber) { - if (is_null($routingNumber)) { - throw new \InvalidArgumentException('non-nullable routingNumber cannot be null'); - } $this->container['routingNumber'] = $routingNumber; return $this; @@ -460,9 +451,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/BalancePlatform/UpdateNetworkTokenRequest.php b/src/Adyen/Model/BalancePlatform/UpdateNetworkTokenRequest.php index 88ac7d00e..d8f34ecc4 100644 --- a/src/Adyen/Model/BalancePlatform/UpdateNetworkTokenRequest.php +++ b/src/Adyen/Model/BalancePlatform/UpdateNetworkTokenRequest.php @@ -320,9 +320,6 @@ public function getStatus() */ 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( diff --git a/src/Adyen/Model/BalancePlatform/UpdatePaymentInstrument.php b/src/Adyen/Model/BalancePlatform/UpdatePaymentInstrument.php index 58b3b60e3..4a2dfd11e 100644 --- a/src/Adyen/Model/BalancePlatform/UpdatePaymentInstrument.php +++ b/src/Adyen/Model/BalancePlatform/UpdatePaymentInstrument.php @@ -480,9 +480,6 @@ public function getAdditionalBankAccountIdentifications() */ public function setAdditionalBankAccountIdentifications($additionalBankAccountIdentifications) { - if (is_null($additionalBankAccountIdentifications)) { - throw new \InvalidArgumentException('non-nullable additionalBankAccountIdentifications cannot be null'); - } $this->container['additionalBankAccountIdentifications'] = $additionalBankAccountIdentifications; return $this; @@ -507,9 +504,6 @@ public function getBalanceAccountId() */ public function setBalanceAccountId($balanceAccountId) { - if (is_null($balanceAccountId)) { - throw new \InvalidArgumentException('non-nullable balanceAccountId cannot be null'); - } $this->container['balanceAccountId'] = $balanceAccountId; return $this; @@ -534,9 +528,6 @@ public function getBankAccount() */ public function setBankAccount($bankAccount) { - if (is_null($bankAccount)) { - throw new \InvalidArgumentException('non-nullable bankAccount cannot be null'); - } $this->container['bankAccount'] = $bankAccount; return $this; @@ -561,9 +552,6 @@ public function getCard() */ public function setCard($card) { - if (is_null($card)) { - throw new \InvalidArgumentException('non-nullable card cannot be null'); - } $this->container['card'] = $card; return $this; @@ -588,9 +576,6 @@ public function getDescription() */ public function setDescription($description) { - if (is_null($description)) { - throw new \InvalidArgumentException('non-nullable description cannot be null'); - } $this->container['description'] = $description; return $this; @@ -615,9 +600,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -642,9 +624,6 @@ public function getIssuingCountryCode() */ public function setIssuingCountryCode($issuingCountryCode) { - if (is_null($issuingCountryCode)) { - throw new \InvalidArgumentException('non-nullable issuingCountryCode cannot be null'); - } $this->container['issuingCountryCode'] = $issuingCountryCode; return $this; @@ -669,9 +648,6 @@ public function getPaymentInstrumentGroupId() */ public function setPaymentInstrumentGroupId($paymentInstrumentGroupId) { - if (is_null($paymentInstrumentGroupId)) { - throw new \InvalidArgumentException('non-nullable paymentInstrumentGroupId cannot be null'); - } $this->container['paymentInstrumentGroupId'] = $paymentInstrumentGroupId; return $this; @@ -696,9 +672,6 @@ public function getReference() */ public function setReference($reference) { - if (is_null($reference)) { - throw new \InvalidArgumentException('non-nullable reference cannot be null'); - } $this->container['reference'] = $reference; return $this; @@ -723,9 +696,6 @@ public function getStatus() */ 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( @@ -760,9 +730,6 @@ public function getStatusComment() */ public function setStatusComment($statusComment) { - if (is_null($statusComment)) { - throw new \InvalidArgumentException('non-nullable statusComment cannot be null'); - } $this->container['statusComment'] = $statusComment; return $this; @@ -787,9 +754,6 @@ public function getStatusReason() */ public function setStatusReason($statusReason) { - if (is_null($statusReason)) { - throw new \InvalidArgumentException('non-nullable statusReason cannot be null'); - } $allowedValues = $this->getStatusReasonAllowableValues(); if (!in_array($statusReason, $allowedValues, true)) { throw new \InvalidArgumentException( @@ -824,9 +788,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/BalancePlatform/UpdateSweepConfigurationV2.php b/src/Adyen/Model/BalancePlatform/UpdateSweepConfigurationV2.php index 4afa62b0c..0b13837b9 100644 --- a/src/Adyen/Model/BalancePlatform/UpdateSweepConfigurationV2.php +++ b/src/Adyen/Model/BalancePlatform/UpdateSweepConfigurationV2.php @@ -317,6 +317,7 @@ public function getModelName() 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 = 'declined'; public const REASON_DECLINED_BY_TRANSACTION_RULE = 'declinedByTransactionRule'; public const REASON_ERROR = 'error'; public const REASON_NOT_ENOUGH_BALANCE = 'notEnoughBalance'; @@ -376,6 +377,7 @@ public function getReasonAllowableValues() self::REASON_COUNTERPARTY_ADDRESS_REQUIRED, self::REASON_COUNTERPARTY_BANK_TIMED_OUT, self::REASON_COUNTERPARTY_BANK_UNAVAILABLE, + self::REASON_DECLINED, self::REASON_DECLINED_BY_TRANSACTION_RULE, self::REASON_ERROR, self::REASON_NOT_ENOUGH_BALANCE, @@ -539,9 +541,6 @@ public function getCategory() */ 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( @@ -576,9 +575,6 @@ public function getCounterparty() */ public function setCounterparty($counterparty) { - if (is_null($counterparty)) { - throw new \InvalidArgumentException('non-nullable counterparty cannot be null'); - } $this->container['counterparty'] = $counterparty; return $this; @@ -603,9 +599,6 @@ public function getCurrency() */ public function setCurrency($currency) { - if (is_null($currency)) { - throw new \InvalidArgumentException('non-nullable currency cannot be null'); - } $this->container['currency'] = $currency; return $this; @@ -630,9 +623,6 @@ public function getDescription() */ public function setDescription($description) { - if (is_null($description)) { - throw new \InvalidArgumentException('non-nullable description cannot be null'); - } $this->container['description'] = $description; return $this; @@ -657,9 +647,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -678,15 +665,12 @@ public function getPriorities() /** * Sets priorities * - * @param string[]|null $priorities The list of priorities for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. You can provide multiple priorities. Adyen will try to pay out using the priority you list first. If that's not possible, it moves on to the next option in the order of your provided priorities. 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). Set `category` to **bank**. For more details, see optional priorities setup for [marketplaces](https://docs.adyen.com/marketplaces/payout-to-users/scheduled-payouts#optional-priorities-setup) or [platforms](https://docs.adyen.com/platforms/payout-to-users/scheduled-payouts#optional-priorities-setup). + * @param string[]|null $priorities The list of priorities for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. You can provide multiple priorities. Adyen will try to pay out using the priority you list first. If that's not possible, it moves on to the next option in the order of your provided priorities. Possible values: * **regular**: for normal, low-value transactions. * **fast**: a faster way to transfer funds, but the fees are higher. Recommended for high-priority, low-value transactions. * **wire**: the fastest way to transfer funds, but this has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: for instant funds transfers in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: for high-value transfers to a recipient in a different country. * **internal**: for transfers to an Adyen-issued business bank account (by bank account number/IBAN). Set `category` to **bank**. For more details, see optional priorities setup for [marketplaces](https://docs.adyen.com/marketplaces/payout-to-users/scheduled-payouts#optional-priorities-setup) or [platforms](https://docs.adyen.com/platforms/payout-to-users/scheduled-payouts#optional-priorities-setup). * * @return self */ public function setPriorities($priorities) { - if (is_null($priorities)) { - throw new \InvalidArgumentException('non-nullable priorities cannot be null'); - } $allowedValues = $this->getPrioritiesAllowableValues(); if (array_diff($priorities, $allowedValues)) { throw new \InvalidArgumentException( @@ -720,9 +704,6 @@ public function getReason() */ 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( @@ -757,9 +738,6 @@ public function getReference() */ public function setReference($reference) { - if (is_null($reference)) { - throw new \InvalidArgumentException('non-nullable reference cannot be null'); - } $this->container['reference'] = $reference; return $this; @@ -784,9 +762,6 @@ public function getReferenceForBeneficiary() */ public function setReferenceForBeneficiary($referenceForBeneficiary) { - if (is_null($referenceForBeneficiary)) { - throw new \InvalidArgumentException('non-nullable referenceForBeneficiary cannot be null'); - } $this->container['referenceForBeneficiary'] = $referenceForBeneficiary; return $this; @@ -811,9 +786,6 @@ public function getSchedule() */ public function setSchedule($schedule) { - if (is_null($schedule)) { - throw new \InvalidArgumentException('non-nullable schedule cannot be null'); - } $this->container['schedule'] = $schedule; return $this; @@ -838,9 +810,6 @@ public function getStatus() */ 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( @@ -875,9 +844,6 @@ public function getSweepAmount() */ public function setSweepAmount($sweepAmount) { - if (is_null($sweepAmount)) { - throw new \InvalidArgumentException('non-nullable sweepAmount cannot be null'); - } $this->container['sweepAmount'] = $sweepAmount; return $this; @@ -902,9 +868,6 @@ public function getTargetAmount() */ public function setTargetAmount($targetAmount) { - if (is_null($targetAmount)) { - throw new \InvalidArgumentException('non-nullable targetAmount cannot be null'); - } $this->container['targetAmount'] = $targetAmount; return $this; @@ -929,9 +892,6 @@ public function getTriggerAmount() */ public function setTriggerAmount($triggerAmount) { - if (is_null($triggerAmount)) { - throw new \InvalidArgumentException('non-nullable triggerAmount cannot be null'); - } $this->container['triggerAmount'] = $triggerAmount; return $this; @@ -956,9 +916,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/BalancePlatform/VerificationDeadline.php b/src/Adyen/Model/BalancePlatform/VerificationDeadline.php index ed619605a..04926e2e9 100644 --- a/src/Adyen/Model/BalancePlatform/VerificationDeadline.php +++ b/src/Adyen/Model/BalancePlatform/VerificationDeadline.php @@ -425,9 +425,6 @@ public function getCapabilities() */ 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( @@ -461,9 +458,6 @@ public function getEntityIds() */ public function setEntityIds($entityIds) { - if (is_null($entityIds)) { - throw new \InvalidArgumentException('non-nullable entityIds cannot be null'); - } $this->container['entityIds'] = $entityIds; return $this; @@ -488,9 +482,6 @@ public function getExpiresAt() */ public function setExpiresAt($expiresAt) { - if (is_null($expiresAt)) { - throw new \InvalidArgumentException('non-nullable expiresAt cannot be null'); - } $this->container['expiresAt'] = $expiresAt; return $this; diff --git a/src/Adyen/Model/BalancePlatform/VerificationError.php b/src/Adyen/Model/BalancePlatform/VerificationError.php index 7bec25145..ac30758cb 100644 --- a/src/Adyen/Model/BalancePlatform/VerificationError.php +++ b/src/Adyen/Model/BalancePlatform/VerificationError.php @@ -465,9 +465,6 @@ public function getCapabilities() */ 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( @@ -501,9 +498,6 @@ public function getCode() */ public function setCode($code) { - if (is_null($code)) { - throw new \InvalidArgumentException('non-nullable code cannot be null'); - } $this->container['code'] = $code; return $this; @@ -528,9 +522,6 @@ public function getMessage() */ public function setMessage($message) { - if (is_null($message)) { - throw new \InvalidArgumentException('non-nullable message cannot be null'); - } $this->container['message'] = $message; return $this; @@ -555,9 +546,6 @@ public function getRemediatingActions() */ public function setRemediatingActions($remediatingActions) { - if (is_null($remediatingActions)) { - throw new \InvalidArgumentException('non-nullable remediatingActions cannot be null'); - } $this->container['remediatingActions'] = $remediatingActions; return $this; @@ -582,9 +570,6 @@ public function getSubErrors() */ public function setSubErrors($subErrors) { - if (is_null($subErrors)) { - throw new \InvalidArgumentException('non-nullable subErrors cannot be null'); - } $this->container['subErrors'] = $subErrors; return $this; @@ -609,9 +594,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/BalancePlatform/VerificationErrorRecursive.php b/src/Adyen/Model/BalancePlatform/VerificationErrorRecursive.php index 5b9218ba6..d64fc74ca 100644 --- a/src/Adyen/Model/BalancePlatform/VerificationErrorRecursive.php +++ b/src/Adyen/Model/BalancePlatform/VerificationErrorRecursive.php @@ -458,9 +458,6 @@ public function getCapabilities() */ 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( @@ -494,9 +491,6 @@ public function getCode() */ public function setCode($code) { - if (is_null($code)) { - throw new \InvalidArgumentException('non-nullable code cannot be null'); - } $this->container['code'] = $code; return $this; @@ -521,9 +515,6 @@ public function getMessage() */ public function setMessage($message) { - if (is_null($message)) { - throw new \InvalidArgumentException('non-nullable message cannot be null'); - } $this->container['message'] = $message; return $this; @@ -548,9 +539,6 @@ public function getType() */ 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( @@ -585,9 +573,6 @@ public function getRemediatingActions() */ public function setRemediatingActions($remediatingActions) { - if (is_null($remediatingActions)) { - throw new \InvalidArgumentException('non-nullable remediatingActions cannot be null'); - } $this->container['remediatingActions'] = $remediatingActions; return $this; diff --git a/src/Adyen/Model/BinLookup/Amount.php b/src/Adyen/Model/BinLookup/Amount.php index 4acfe6943..be2784802 100644 --- a/src/Adyen/Model/BinLookup/Amount.php +++ b/src/Adyen/Model/BinLookup/Amount.php @@ -308,9 +308,6 @@ public function getCurrency() */ public function setCurrency($currency) { - if (is_null($currency)) { - throw new \InvalidArgumentException('non-nullable currency cannot be null'); - } $this->container['currency'] = $currency; return $this; @@ -335,9 +332,6 @@ public function getValue() */ public function setValue($value) { - if (is_null($value)) { - throw new \InvalidArgumentException('non-nullable value cannot be null'); - } $this->container['value'] = $value; return $this; diff --git a/src/Adyen/Model/BinLookup/BinDetail.php b/src/Adyen/Model/BinLookup/BinDetail.php index 3abec2024..cbf1b695d 100644 --- a/src/Adyen/Model/BinLookup/BinDetail.php +++ b/src/Adyen/Model/BinLookup/BinDetail.php @@ -295,9 +295,6 @@ public function getIssuerCountry() */ public function setIssuerCountry($issuerCountry) { - if (is_null($issuerCountry)) { - throw new \InvalidArgumentException('non-nullable issuerCountry cannot be null'); - } $this->container['issuerCountry'] = $issuerCountry; return $this; diff --git a/src/Adyen/Model/BinLookup/CardBin.php b/src/Adyen/Model/BinLookup/CardBin.php index f0f616e5e..3c59ac824 100644 --- a/src/Adyen/Model/BinLookup/CardBin.php +++ b/src/Adyen/Model/BinLookup/CardBin.php @@ -365,9 +365,6 @@ public function getBin() */ public function setBin($bin) { - if (is_null($bin)) { - throw new \InvalidArgumentException('non-nullable bin cannot be null'); - } $this->container['bin'] = $bin; return $this; @@ -392,9 +389,6 @@ public function getCommercial() */ public function setCommercial($commercial) { - if (is_null($commercial)) { - throw new \InvalidArgumentException('non-nullable commercial cannot be null'); - } $this->container['commercial'] = $commercial; return $this; @@ -419,9 +413,6 @@ public function getFundingSource() */ public function setFundingSource($fundingSource) { - if (is_null($fundingSource)) { - throw new \InvalidArgumentException('non-nullable fundingSource cannot be null'); - } $this->container['fundingSource'] = $fundingSource; return $this; @@ -446,9 +437,6 @@ public function getFundsAvailability() */ public function setFundsAvailability($fundsAvailability) { - if (is_null($fundsAvailability)) { - throw new \InvalidArgumentException('non-nullable fundsAvailability cannot be null'); - } $this->container['fundsAvailability'] = $fundsAvailability; return $this; @@ -473,9 +461,6 @@ public function getIssuerBin() */ public function setIssuerBin($issuerBin) { - if (is_null($issuerBin)) { - throw new \InvalidArgumentException('non-nullable issuerBin cannot be null'); - } $this->container['issuerBin'] = $issuerBin; return $this; @@ -500,9 +485,6 @@ public function getIssuingBank() */ public function setIssuingBank($issuingBank) { - if (is_null($issuingBank)) { - throw new \InvalidArgumentException('non-nullable issuingBank cannot be null'); - } $this->container['issuingBank'] = $issuingBank; return $this; @@ -527,9 +509,6 @@ public function getIssuingCountry() */ public function setIssuingCountry($issuingCountry) { - if (is_null($issuingCountry)) { - throw new \InvalidArgumentException('non-nullable issuingCountry cannot be null'); - } $this->container['issuingCountry'] = $issuingCountry; return $this; @@ -554,9 +533,6 @@ public function getIssuingCurrency() */ public function setIssuingCurrency($issuingCurrency) { - if (is_null($issuingCurrency)) { - throw new \InvalidArgumentException('non-nullable issuingCurrency cannot be null'); - } $this->container['issuingCurrency'] = $issuingCurrency; return $this; @@ -581,9 +557,6 @@ public function getPaymentMethod() */ public function setPaymentMethod($paymentMethod) { - if (is_null($paymentMethod)) { - throw new \InvalidArgumentException('non-nullable paymentMethod cannot be null'); - } $this->container['paymentMethod'] = $paymentMethod; return $this; @@ -608,9 +581,6 @@ public function getPayoutEligible() */ public function setPayoutEligible($payoutEligible) { - if (is_null($payoutEligible)) { - throw new \InvalidArgumentException('non-nullable payoutEligible cannot be null'); - } $this->container['payoutEligible'] = $payoutEligible; return $this; @@ -635,9 +605,6 @@ public function getSummary() */ public function setSummary($summary) { - if (is_null($summary)) { - throw new \InvalidArgumentException('non-nullable summary cannot be null'); - } $this->container['summary'] = $summary; return $this; diff --git a/src/Adyen/Model/BinLookup/CostEstimateAssumptions.php b/src/Adyen/Model/BinLookup/CostEstimateAssumptions.php index 8023cc7e7..452609ef5 100644 --- a/src/Adyen/Model/BinLookup/CostEstimateAssumptions.php +++ b/src/Adyen/Model/BinLookup/CostEstimateAssumptions.php @@ -309,9 +309,6 @@ public function getAssume3DSecureAuthenticated() */ public function setAssume3DSecureAuthenticated($assume3DSecureAuthenticated) { - if (is_null($assume3DSecureAuthenticated)) { - throw new \InvalidArgumentException('non-nullable assume3DSecureAuthenticated cannot be null'); - } $this->container['assume3DSecureAuthenticated'] = $assume3DSecureAuthenticated; return $this; @@ -336,9 +333,6 @@ public function getAssumeLevel3Data() */ public function setAssumeLevel3Data($assumeLevel3Data) { - if (is_null($assumeLevel3Data)) { - throw new \InvalidArgumentException('non-nullable assumeLevel3Data cannot be null'); - } $this->container['assumeLevel3Data'] = $assumeLevel3Data; return $this; @@ -363,7 +357,6 @@ public function getInstallments() */ public function setInstallments($installments) { - // Do nothing for nullable integers $this->container['installments'] = $installments; return $this; diff --git a/src/Adyen/Model/BinLookup/CostEstimateRequest.php b/src/Adyen/Model/BinLookup/CostEstimateRequest.php index 2296e5334..b3b0d40dd 100644 --- a/src/Adyen/Model/BinLookup/CostEstimateRequest.php +++ b/src/Adyen/Model/BinLookup/CostEstimateRequest.php @@ -391,9 +391,6 @@ public function getAmount() */ public function setAmount($amount) { - if (is_null($amount)) { - throw new \InvalidArgumentException('non-nullable amount cannot be null'); - } $this->container['amount'] = $amount; return $this; @@ -418,9 +415,6 @@ public function getAssumptions() */ public function setAssumptions($assumptions) { - if (is_null($assumptions)) { - throw new \InvalidArgumentException('non-nullable assumptions cannot be null'); - } $this->container['assumptions'] = $assumptions; return $this; @@ -445,9 +439,6 @@ public function getCardNumber() */ public function setCardNumber($cardNumber) { - if (is_null($cardNumber)) { - throw new \InvalidArgumentException('non-nullable cardNumber cannot be null'); - } $this->container['cardNumber'] = $cardNumber; return $this; @@ -472,9 +463,6 @@ public function getEncryptedCardNumber() */ public function setEncryptedCardNumber($encryptedCardNumber) { - if (is_null($encryptedCardNumber)) { - throw new \InvalidArgumentException('non-nullable encryptedCardNumber cannot be null'); - } $this->container['encryptedCardNumber'] = $encryptedCardNumber; return $this; @@ -499,9 +487,6 @@ public function getMerchantAccount() */ public function setMerchantAccount($merchantAccount) { - if (is_null($merchantAccount)) { - throw new \InvalidArgumentException('non-nullable merchantAccount cannot be null'); - } $this->container['merchantAccount'] = $merchantAccount; return $this; @@ -526,9 +511,6 @@ public function getMerchantDetails() */ public function setMerchantDetails($merchantDetails) { - if (is_null($merchantDetails)) { - throw new \InvalidArgumentException('non-nullable merchantDetails cannot be null'); - } $this->container['merchantDetails'] = $merchantDetails; return $this; @@ -553,9 +535,6 @@ public function getRecurring() */ public function setRecurring($recurring) { - if (is_null($recurring)) { - throw new \InvalidArgumentException('non-nullable recurring cannot be null'); - } $this->container['recurring'] = $recurring; return $this; @@ -580,9 +559,6 @@ public function getSelectedRecurringDetailReference() */ public function setSelectedRecurringDetailReference($selectedRecurringDetailReference) { - if (is_null($selectedRecurringDetailReference)) { - throw new \InvalidArgumentException('non-nullable selectedRecurringDetailReference cannot be null'); - } $this->container['selectedRecurringDetailReference'] = $selectedRecurringDetailReference; return $this; @@ -607,9 +583,6 @@ public function getShopperInteraction() */ 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( @@ -644,9 +617,6 @@ public function getShopperReference() */ public function setShopperReference($shopperReference) { - if (is_null($shopperReference)) { - throw new \InvalidArgumentException('non-nullable shopperReference cannot be null'); - } $this->container['shopperReference'] = $shopperReference; return $this; diff --git a/src/Adyen/Model/BinLookup/CostEstimateResponse.php b/src/Adyen/Model/BinLookup/CostEstimateResponse.php index 9ab90fb9d..a658d059f 100644 --- a/src/Adyen/Model/BinLookup/CostEstimateResponse.php +++ b/src/Adyen/Model/BinLookup/CostEstimateResponse.php @@ -323,9 +323,6 @@ public function getCardBin() */ public function setCardBin($cardBin) { - if (is_null($cardBin)) { - throw new \InvalidArgumentException('non-nullable cardBin cannot be null'); - } $this->container['cardBin'] = $cardBin; return $this; @@ -350,9 +347,6 @@ public function getCostEstimateAmount() */ public function setCostEstimateAmount($costEstimateAmount) { - if (is_null($costEstimateAmount)) { - throw new \InvalidArgumentException('non-nullable costEstimateAmount cannot be null'); - } $this->container['costEstimateAmount'] = $costEstimateAmount; return $this; @@ -377,9 +371,6 @@ public function getCostEstimateReference() */ public function setCostEstimateReference($costEstimateReference) { - if (is_null($costEstimateReference)) { - throw new \InvalidArgumentException('non-nullable costEstimateReference cannot be null'); - } $this->container['costEstimateReference'] = $costEstimateReference; return $this; @@ -404,9 +395,6 @@ public function getResultCode() */ public function setResultCode($resultCode) { - if (is_null($resultCode)) { - throw new \InvalidArgumentException('non-nullable resultCode cannot be null'); - } $this->container['resultCode'] = $resultCode; return $this; @@ -431,9 +419,6 @@ public function getSurchargeType() */ public function setSurchargeType($surchargeType) { - if (is_null($surchargeType)) { - throw new \InvalidArgumentException('non-nullable surchargeType cannot be null'); - } $this->container['surchargeType'] = $surchargeType; return $this; diff --git a/src/Adyen/Model/BinLookup/DSPublicKeyDetail.php b/src/Adyen/Model/BinLookup/DSPublicKeyDetail.php index 277d4ede4..9d0f5251f 100644 --- a/src/Adyen/Model/BinLookup/DSPublicKeyDetail.php +++ b/src/Adyen/Model/BinLookup/DSPublicKeyDetail.php @@ -323,9 +323,6 @@ public function getBrand() */ public function setBrand($brand) { - if (is_null($brand)) { - throw new \InvalidArgumentException('non-nullable brand cannot be null'); - } $this->container['brand'] = $brand; return $this; @@ -350,9 +347,6 @@ public function getDirectoryServerId() */ public function setDirectoryServerId($directoryServerId) { - if (is_null($directoryServerId)) { - throw new \InvalidArgumentException('non-nullable directoryServerId cannot be null'); - } $this->container['directoryServerId'] = $directoryServerId; return $this; @@ -377,9 +371,6 @@ public function getFromSDKVersion() */ public function setFromSDKVersion($fromSDKVersion) { - if (is_null($fromSDKVersion)) { - throw new \InvalidArgumentException('non-nullable fromSDKVersion cannot be null'); - } $this->container['fromSDKVersion'] = $fromSDKVersion; return $this; @@ -404,9 +395,6 @@ public function getPublicKey() */ public function setPublicKey($publicKey) { - if (is_null($publicKey)) { - throw new \InvalidArgumentException('non-nullable publicKey cannot be null'); - } $this->container['publicKey'] = $publicKey; return $this; @@ -431,9 +419,6 @@ public function getRootCertificates() */ public function setRootCertificates($rootCertificates) { - if (is_null($rootCertificates)) { - throw new \InvalidArgumentException('non-nullable rootCertificates cannot be null'); - } $this->container['rootCertificates'] = $rootCertificates; return $this; diff --git a/src/Adyen/Model/BinLookup/MerchantDetails.php b/src/Adyen/Model/BinLookup/MerchantDetails.php index 2c5fed256..e5bc2482b 100644 --- a/src/Adyen/Model/BinLookup/MerchantDetails.php +++ b/src/Adyen/Model/BinLookup/MerchantDetails.php @@ -309,9 +309,6 @@ public function getCountryCode() */ public function setCountryCode($countryCode) { - if (is_null($countryCode)) { - throw new \InvalidArgumentException('non-nullable countryCode cannot be null'); - } $this->container['countryCode'] = $countryCode; return $this; @@ -336,9 +333,6 @@ public function getEnrolledIn3DSecure() */ public function setEnrolledIn3DSecure($enrolledIn3DSecure) { - if (is_null($enrolledIn3DSecure)) { - throw new \InvalidArgumentException('non-nullable enrolledIn3DSecure cannot be null'); - } $this->container['enrolledIn3DSecure'] = $enrolledIn3DSecure; return $this; @@ -363,9 +357,6 @@ public function getMcc() */ public function setMcc($mcc) { - if (is_null($mcc)) { - throw new \InvalidArgumentException('non-nullable mcc cannot be null'); - } $this->container['mcc'] = $mcc; return $this; diff --git a/src/Adyen/Model/BinLookup/ObjectSerializer.php b/src/Adyen/Model/BinLookup/ObjectSerializer.php index 4bdfceeda..09437b7d8 100644 --- a/src/Adyen/Model/BinLookup/ObjectSerializer.php +++ b/src/Adyen/Model/BinLookup/ObjectSerializer.php @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach ($data as $property => $value) { + foreach($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) { - return $timestamp; - } + if (!is_string($timestamp)) return $timestamp; return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/BinLookup/Recurring.php b/src/Adyen/Model/BinLookup/Recurring.php index af968f01a..1f2505d2d 100644 --- a/src/Adyen/Model/BinLookup/Recurring.php +++ b/src/Adyen/Model/BinLookup/Recurring.php @@ -375,9 +375,6 @@ public function getContract() */ 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( @@ -412,9 +409,6 @@ public function getRecurringDetailName() */ public function setRecurringDetailName($recurringDetailName) { - if (is_null($recurringDetailName)) { - throw new \InvalidArgumentException('non-nullable recurringDetailName cannot be null'); - } $this->container['recurringDetailName'] = $recurringDetailName; return $this; @@ -439,9 +433,6 @@ public function getRecurringExpiry() */ public function setRecurringExpiry($recurringExpiry) { - if (is_null($recurringExpiry)) { - throw new \InvalidArgumentException('non-nullable recurringExpiry cannot be null'); - } $this->container['recurringExpiry'] = $recurringExpiry; return $this; @@ -466,9 +457,6 @@ public function getRecurringFrequency() */ public function setRecurringFrequency($recurringFrequency) { - if (is_null($recurringFrequency)) { - throw new \InvalidArgumentException('non-nullable recurringFrequency cannot be null'); - } $this->container['recurringFrequency'] = $recurringFrequency; return $this; @@ -493,9 +481,6 @@ public function getTokenService() */ 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( diff --git a/src/Adyen/Model/BinLookup/ServiceError.php b/src/Adyen/Model/BinLookup/ServiceError.php index f3289e1af..200b22ac2 100644 --- a/src/Adyen/Model/BinLookup/ServiceError.php +++ b/src/Adyen/Model/BinLookup/ServiceError.php @@ -330,9 +330,6 @@ public function getAdditionalData() */ public function setAdditionalData($additionalData) { - if (is_null($additionalData)) { - throw new \InvalidArgumentException('non-nullable additionalData cannot be null'); - } $this->container['additionalData'] = $additionalData; return $this; @@ -357,9 +354,6 @@ public function getErrorCode() */ public function setErrorCode($errorCode) { - if (is_null($errorCode)) { - throw new \InvalidArgumentException('non-nullable errorCode cannot be null'); - } $this->container['errorCode'] = $errorCode; return $this; @@ -384,9 +378,6 @@ public function getErrorType() */ public function setErrorType($errorType) { - if (is_null($errorType)) { - throw new \InvalidArgumentException('non-nullable errorType cannot be null'); - } $this->container['errorType'] = $errorType; return $this; @@ -411,9 +402,6 @@ public function getMessage() */ public function setMessage($message) { - if (is_null($message)) { - throw new \InvalidArgumentException('non-nullable message cannot be null'); - } $this->container['message'] = $message; return $this; @@ -438,9 +426,6 @@ public function getPspReference() */ public function setPspReference($pspReference) { - if (is_null($pspReference)) { - throw new \InvalidArgumentException('non-nullable pspReference cannot be null'); - } $this->container['pspReference'] = $pspReference; return $this; @@ -465,7 +450,6 @@ public function getStatus() */ public function setStatus($status) { - // Do nothing for nullable integers $this->container['status'] = $status; return $this; diff --git a/src/Adyen/Model/BinLookup/ThreeDS2CardRangeDetail.php b/src/Adyen/Model/BinLookup/ThreeDS2CardRangeDetail.php index 96ba2bf13..9d66d225f 100644 --- a/src/Adyen/Model/BinLookup/ThreeDS2CardRangeDetail.php +++ b/src/Adyen/Model/BinLookup/ThreeDS2CardRangeDetail.php @@ -330,9 +330,6 @@ public function getAcsInfoInd() */ public function setAcsInfoInd($acsInfoInd) { - if (is_null($acsInfoInd)) { - throw new \InvalidArgumentException('non-nullable acsInfoInd cannot be null'); - } $this->container['acsInfoInd'] = $acsInfoInd; return $this; @@ -357,9 +354,6 @@ public function getBrandCode() */ public function setBrandCode($brandCode) { - if (is_null($brandCode)) { - throw new \InvalidArgumentException('non-nullable brandCode cannot be null'); - } $this->container['brandCode'] = $brandCode; return $this; @@ -384,9 +378,6 @@ public function getEndRange() */ public function setEndRange($endRange) { - if (is_null($endRange)) { - throw new \InvalidArgumentException('non-nullable endRange cannot be null'); - } $this->container['endRange'] = $endRange; return $this; @@ -411,9 +402,6 @@ public function getStartRange() */ public function setStartRange($startRange) { - if (is_null($startRange)) { - throw new \InvalidArgumentException('non-nullable startRange cannot be null'); - } $this->container['startRange'] = $startRange; return $this; @@ -438,9 +426,6 @@ public function getThreeDS2Versions() */ public function setThreeDS2Versions($threeDS2Versions) { - if (is_null($threeDS2Versions)) { - throw new \InvalidArgumentException('non-nullable threeDS2Versions cannot be null'); - } $this->container['threeDS2Versions'] = $threeDS2Versions; return $this; @@ -465,9 +450,6 @@ public function getThreeDSMethodURL() */ public function setThreeDSMethodURL($threeDSMethodURL) { - if (is_null($threeDSMethodURL)) { - throw new \InvalidArgumentException('non-nullable threeDSMethodURL cannot be null'); - } $this->container['threeDSMethodURL'] = $threeDSMethodURL; return $this; diff --git a/src/Adyen/Model/BinLookup/ThreeDSAvailabilityRequest.php b/src/Adyen/Model/BinLookup/ThreeDSAvailabilityRequest.php index b59cd6aa0..3fcabd2a7 100644 --- a/src/Adyen/Model/BinLookup/ThreeDSAvailabilityRequest.php +++ b/src/Adyen/Model/BinLookup/ThreeDSAvailabilityRequest.php @@ -333,9 +333,6 @@ public function getAdditionalData() */ public function setAdditionalData($additionalData) { - if (is_null($additionalData)) { - throw new \InvalidArgumentException('non-nullable additionalData cannot be null'); - } $this->container['additionalData'] = $additionalData; return $this; @@ -360,9 +357,6 @@ public function getBrands() */ public function setBrands($brands) { - if (is_null($brands)) { - throw new \InvalidArgumentException('non-nullable brands cannot be null'); - } $this->container['brands'] = $brands; return $this; @@ -387,9 +381,6 @@ public function getCardNumber() */ public function setCardNumber($cardNumber) { - if (is_null($cardNumber)) { - throw new \InvalidArgumentException('non-nullable cardNumber cannot be null'); - } $this->container['cardNumber'] = $cardNumber; return $this; @@ -414,9 +405,6 @@ public function getMerchantAccount() */ public function setMerchantAccount($merchantAccount) { - if (is_null($merchantAccount)) { - throw new \InvalidArgumentException('non-nullable merchantAccount cannot be null'); - } $this->container['merchantAccount'] = $merchantAccount; return $this; @@ -441,9 +429,6 @@ public function getRecurringDetailReference() */ public function setRecurringDetailReference($recurringDetailReference) { - if (is_null($recurringDetailReference)) { - throw new \InvalidArgumentException('non-nullable recurringDetailReference cannot be null'); - } $this->container['recurringDetailReference'] = $recurringDetailReference; return $this; @@ -468,9 +453,6 @@ public function getShopperReference() */ public function setShopperReference($shopperReference) { - if (is_null($shopperReference)) { - throw new \InvalidArgumentException('non-nullable shopperReference cannot be null'); - } $this->container['shopperReference'] = $shopperReference; return $this; diff --git a/src/Adyen/Model/BinLookup/ThreeDSAvailabilityResponse.php b/src/Adyen/Model/BinLookup/ThreeDSAvailabilityResponse.php index 2376fe6dc..4fb1a8127 100644 --- a/src/Adyen/Model/BinLookup/ThreeDSAvailabilityResponse.php +++ b/src/Adyen/Model/BinLookup/ThreeDSAvailabilityResponse.php @@ -323,9 +323,6 @@ public function getBinDetails() */ public function setBinDetails($binDetails) { - if (is_null($binDetails)) { - throw new \InvalidArgumentException('non-nullable binDetails cannot be null'); - } $this->container['binDetails'] = $binDetails; return $this; @@ -350,9 +347,6 @@ public function getDsPublicKeys() */ public function setDsPublicKeys($dsPublicKeys) { - if (is_null($dsPublicKeys)) { - throw new \InvalidArgumentException('non-nullable dsPublicKeys cannot be null'); - } $this->container['dsPublicKeys'] = $dsPublicKeys; return $this; @@ -377,9 +371,6 @@ public function getThreeDS1Supported() */ public function setThreeDS1Supported($threeDS1Supported) { - if (is_null($threeDS1Supported)) { - throw new \InvalidArgumentException('non-nullable threeDS1Supported cannot be null'); - } $this->container['threeDS1Supported'] = $threeDS1Supported; return $this; @@ -404,9 +395,6 @@ public function getThreeDS2CardRangeDetails() */ public function setThreeDS2CardRangeDetails($threeDS2CardRangeDetails) { - if (is_null($threeDS2CardRangeDetails)) { - throw new \InvalidArgumentException('non-nullable threeDS2CardRangeDetails cannot be null'); - } $this->container['threeDS2CardRangeDetails'] = $threeDS2CardRangeDetails; return $this; @@ -431,9 +419,6 @@ public function getThreeDS2supported() */ public function setThreeDS2supported($threeDS2supported) { - if (is_null($threeDS2supported)) { - throw new \InvalidArgumentException('non-nullable threeDS2supported cannot be null'); - } $this->container['threeDS2supported'] = $threeDS2supported; return $this; diff --git a/src/Adyen/Model/Checkout/CheckoutPaymentMethod.php b/src/Adyen/Model/Checkout/CheckoutPaymentMethod.php index 8bfe4064d..2162d249e 100644 --- a/src/Adyen/Model/Checkout/CheckoutPaymentMethod.php +++ b/src/Adyen/Model/Checkout/CheckoutPaymentMethod.php @@ -1846,7 +1846,7 @@ public function getShopperEmail() /** * Sets shopperEmail * - * @param string $shopperEmail + * @param string $shopperEmail * * @return self */ @@ -1870,7 +1870,7 @@ public function getTelephoneNumber() /** * Sets telephoneNumber * - * @param string $telephoneNumber + * @param string $telephoneNumber * * @return self */ diff --git a/src/Adyen/Model/Checkout/MbwayDetails.php b/src/Adyen/Model/Checkout/MbwayDetails.php index dc73d3c30..becc716f0 100644 --- a/src/Adyen/Model/Checkout/MbwayDetails.php +++ b/src/Adyen/Model/Checkout/MbwayDetails.php @@ -361,7 +361,7 @@ public function getShopperEmail() /** * Sets shopperEmail * - * @param string $shopperEmail + * @param string $shopperEmail * * @return self */ @@ -385,7 +385,7 @@ public function getTelephoneNumber() /** * Sets telephoneNumber * - * @param string $telephoneNumber + * @param string $telephoneNumber * * @return self */ diff --git a/src/Adyen/Model/Checkout/ObjectSerializer.php b/src/Adyen/Model/Checkout/ObjectSerializer.php index 2b682c18f..628f63adc 100644 --- a/src/Adyen/Model/Checkout/ObjectSerializer.php +++ b/src/Adyen/Model/Checkout/ObjectSerializer.php @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach ($data as $property => $value) { + foreach($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) { - return $timestamp; - } + if (!is_string($timestamp)) return $timestamp; return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/Checkout/VippsDetails.php b/src/Adyen/Model/Checkout/VippsDetails.php index 6787fd034..a5087a929 100644 --- a/src/Adyen/Model/Checkout/VippsDetails.php +++ b/src/Adyen/Model/Checkout/VippsDetails.php @@ -415,7 +415,7 @@ public function getTelephoneNumber() /** * Sets telephoneNumber * - * @param string $telephoneNumber + * @param string $telephoneNumber * * @return self */ diff --git a/src/Adyen/Model/ConfigurationWebhooks/AccountHolder.php b/src/Adyen/Model/ConfigurationWebhooks/AccountHolder.php index a34bc424b..6dd33f19c 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/AccountHolder.php +++ b/src/Adyen/Model/ConfigurationWebhooks/AccountHolder.php @@ -410,9 +410,6 @@ public function getBalancePlatform() */ public function setBalancePlatform($balancePlatform) { - if (is_null($balancePlatform)) { - throw new \InvalidArgumentException('non-nullable balancePlatform cannot be null'); - } $this->container['balancePlatform'] = $balancePlatform; return $this; @@ -437,9 +434,6 @@ public function getCapabilities() */ public function setCapabilities($capabilities) { - if (is_null($capabilities)) { - throw new \InvalidArgumentException('non-nullable capabilities cannot be null'); - } $this->container['capabilities'] = $capabilities; return $this; @@ -449,6 +443,7 @@ public function setCapabilities($capabilities) * Gets contactDetails * * @return \Adyen\Model\ConfigurationWebhooks\ContactDetails|null + * @deprecated */ public function getContactDetails() { @@ -461,12 +456,10 @@ public function getContactDetails() * @param \Adyen\Model\ConfigurationWebhooks\ContactDetails|null $contactDetails contactDetails * * @return self + * @deprecated */ public function setContactDetails($contactDetails) { - if (is_null($contactDetails)) { - throw new \InvalidArgumentException('non-nullable contactDetails cannot be null'); - } $this->container['contactDetails'] = $contactDetails; return $this; @@ -491,9 +484,6 @@ public function getDescription() */ public function setDescription($description) { - if (is_null($description)) { - throw new \InvalidArgumentException('non-nullable description cannot be null'); - } $this->container['description'] = $description; return $this; @@ -518,9 +508,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -545,9 +532,6 @@ public function getLegalEntityId() */ public function setLegalEntityId($legalEntityId) { - if (is_null($legalEntityId)) { - throw new \InvalidArgumentException('non-nullable legalEntityId cannot be null'); - } $this->container['legalEntityId'] = $legalEntityId; return $this; @@ -572,9 +556,6 @@ public function getMetadata() */ public function setMetadata($metadata) { - if (is_null($metadata)) { - throw new \InvalidArgumentException('non-nullable metadata cannot be null'); - } $this->container['metadata'] = $metadata; return $this; @@ -599,9 +580,6 @@ public function getMigratedAccountHolderCode() */ public function setMigratedAccountHolderCode($migratedAccountHolderCode) { - if (is_null($migratedAccountHolderCode)) { - throw new \InvalidArgumentException('non-nullable migratedAccountHolderCode cannot be null'); - } $this->container['migratedAccountHolderCode'] = $migratedAccountHolderCode; return $this; @@ -626,9 +604,6 @@ public function getPrimaryBalanceAccount() */ public function setPrimaryBalanceAccount($primaryBalanceAccount) { - if (is_null($primaryBalanceAccount)) { - throw new \InvalidArgumentException('non-nullable primaryBalanceAccount cannot be null'); - } $this->container['primaryBalanceAccount'] = $primaryBalanceAccount; return $this; @@ -653,9 +628,6 @@ public function getReference() */ public function setReference($reference) { - if (is_null($reference)) { - throw new \InvalidArgumentException('non-nullable reference cannot be null'); - } $this->container['reference'] = $reference; return $this; @@ -680,9 +652,6 @@ public function getStatus() */ 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( @@ -717,9 +686,6 @@ public function getTimeZone() */ public function setTimeZone($timeZone) { - if (is_null($timeZone)) { - throw new \InvalidArgumentException('non-nullable timeZone cannot be null'); - } $this->container['timeZone'] = $timeZone; return $this; @@ -744,9 +710,6 @@ public function getVerificationDeadlines() */ public function setVerificationDeadlines($verificationDeadlines) { - if (is_null($verificationDeadlines)) { - throw new \InvalidArgumentException('non-nullable verificationDeadlines cannot be null'); - } $this->container['verificationDeadlines'] = $verificationDeadlines; return $this; diff --git a/src/Adyen/Model/ConfigurationWebhooks/AccountHolderCapability.php b/src/Adyen/Model/ConfigurationWebhooks/AccountHolderCapability.php index aa9a2a151..1cbba9f9d 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/AccountHolderCapability.php +++ b/src/Adyen/Model/ConfigurationWebhooks/AccountHolderCapability.php @@ -439,9 +439,6 @@ public function getAllowed() */ public function setAllowed($allowed) { - if (is_null($allowed)) { - throw new \InvalidArgumentException('non-nullable allowed cannot be null'); - } $this->container['allowed'] = $allowed; return $this; @@ -466,9 +463,6 @@ public function getAllowedLevel() */ 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( @@ -503,9 +497,6 @@ public function getAllowedSettings() */ public function setAllowedSettings($allowedSettings) { - if (is_null($allowedSettings)) { - throw new \InvalidArgumentException('non-nullable allowedSettings cannot be null'); - } $this->container['allowedSettings'] = $allowedSettings; return $this; @@ -530,9 +521,6 @@ public function getEnabled() */ public function setEnabled($enabled) { - if (is_null($enabled)) { - throw new \InvalidArgumentException('non-nullable enabled cannot be null'); - } $this->container['enabled'] = $enabled; return $this; @@ -557,9 +545,6 @@ public function getProblems() */ public function setProblems($problems) { - if (is_null($problems)) { - throw new \InvalidArgumentException('non-nullable problems cannot be null'); - } $this->container['problems'] = $problems; return $this; @@ -584,9 +569,6 @@ public function getRequested() */ public function setRequested($requested) { - if (is_null($requested)) { - throw new \InvalidArgumentException('non-nullable requested cannot be null'); - } $this->container['requested'] = $requested; return $this; @@ -611,9 +593,6 @@ public function getRequestedLevel() */ 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( @@ -648,9 +627,6 @@ public function getRequestedSettings() */ public function setRequestedSettings($requestedSettings) { - if (is_null($requestedSettings)) { - throw new \InvalidArgumentException('non-nullable requestedSettings cannot be null'); - } $this->container['requestedSettings'] = $requestedSettings; return $this; @@ -675,9 +651,6 @@ public function getTransferInstruments() */ public function setTransferInstruments($transferInstruments) { - if (is_null($transferInstruments)) { - throw new \InvalidArgumentException('non-nullable transferInstruments cannot be null'); - } $this->container['transferInstruments'] = $transferInstruments; return $this; @@ -702,9 +675,6 @@ public function getVerificationStatus() */ 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( diff --git a/src/Adyen/Model/ConfigurationWebhooks/AccountHolderNotificationData.php b/src/Adyen/Model/ConfigurationWebhooks/AccountHolderNotificationData.php index a155f42bb..225950ab8 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/AccountHolderNotificationData.php +++ b/src/Adyen/Model/ConfigurationWebhooks/AccountHolderNotificationData.php @@ -302,9 +302,6 @@ public function getAccountHolder() */ public function setAccountHolder($accountHolder) { - if (is_null($accountHolder)) { - throw new \InvalidArgumentException('non-nullable accountHolder cannot be null'); - } $this->container['accountHolder'] = $accountHolder; return $this; @@ -329,9 +326,6 @@ public function getBalancePlatform() */ public function setBalancePlatform($balancePlatform) { - if (is_null($balancePlatform)) { - throw new \InvalidArgumentException('non-nullable balancePlatform cannot be null'); - } $this->container['balancePlatform'] = $balancePlatform; return $this; diff --git a/src/Adyen/Model/ConfigurationWebhooks/AccountHolderNotificationRequest.php b/src/Adyen/Model/ConfigurationWebhooks/AccountHolderNotificationRequest.php index 14a0ccb52..5bba61b27 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/AccountHolderNotificationRequest.php +++ b/src/Adyen/Model/ConfigurationWebhooks/AccountHolderNotificationRequest.php @@ -341,9 +341,6 @@ public function getData() */ public function setData($data) { - if (is_null($data)) { - throw new \InvalidArgumentException('non-nullable data cannot be null'); - } $this->container['data'] = $data; return $this; @@ -368,9 +365,6 @@ public function getEnvironment() */ public function setEnvironment($environment) { - if (is_null($environment)) { - throw new \InvalidArgumentException('non-nullable environment cannot be null'); - } $this->container['environment'] = $environment; return $this; @@ -395,9 +389,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/ConfigurationWebhooks/AccountSupportingEntityCapability.php b/src/Adyen/Model/ConfigurationWebhooks/AccountSupportingEntityCapability.php index 9fcbfb883..b17bc5d02 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/AccountSupportingEntityCapability.php +++ b/src/Adyen/Model/ConfigurationWebhooks/AccountSupportingEntityCapability.php @@ -418,9 +418,6 @@ public function getAllowed() */ public function setAllowed($allowed) { - if (is_null($allowed)) { - throw new \InvalidArgumentException('non-nullable allowed cannot be null'); - } $this->container['allowed'] = $allowed; return $this; @@ -445,9 +442,6 @@ public function getAllowedLevel() */ 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( @@ -482,9 +476,6 @@ public function getEnabled() */ public function setEnabled($enabled) { - if (is_null($enabled)) { - throw new \InvalidArgumentException('non-nullable enabled cannot be null'); - } $this->container['enabled'] = $enabled; return $this; @@ -509,9 +500,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -536,9 +524,6 @@ public function getRequested() */ public function setRequested($requested) { - if (is_null($requested)) { - throw new \InvalidArgumentException('non-nullable requested cannot be null'); - } $this->container['requested'] = $requested; return $this; @@ -563,9 +548,6 @@ public function getRequestedLevel() */ 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( @@ -600,9 +582,6 @@ public function getVerificationStatus() */ 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( diff --git a/src/Adyen/Model/ConfigurationWebhooks/Address.php b/src/Adyen/Model/ConfigurationWebhooks/Address.php index 1f1668736..a9edd01e1 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/Address.php +++ b/src/Adyen/Model/ConfigurationWebhooks/Address.php @@ -345,9 +345,6 @@ public function getCity() */ public function setCity($city) { - if (is_null($city)) { - throw new \InvalidArgumentException('non-nullable city cannot be null'); - } $this->container['city'] = $city; return $this; @@ -372,9 +369,6 @@ public function getCountry() */ public function setCountry($country) { - if (is_null($country)) { - throw new \InvalidArgumentException('non-nullable country cannot be null'); - } $this->container['country'] = $country; return $this; @@ -399,9 +393,6 @@ public function getHouseNumberOrName() */ public function setHouseNumberOrName($houseNumberOrName) { - if (is_null($houseNumberOrName)) { - throw new \InvalidArgumentException('non-nullable houseNumberOrName cannot be null'); - } $this->container['houseNumberOrName'] = $houseNumberOrName; return $this; @@ -426,9 +417,6 @@ public function getPostalCode() */ public function setPostalCode($postalCode) { - if (is_null($postalCode)) { - throw new \InvalidArgumentException('non-nullable postalCode cannot be null'); - } $this->container['postalCode'] = $postalCode; return $this; @@ -453,9 +441,6 @@ public function getStateOrProvince() */ public function setStateOrProvince($stateOrProvince) { - if (is_null($stateOrProvince)) { - throw new \InvalidArgumentException('non-nullable stateOrProvince cannot be null'); - } $this->container['stateOrProvince'] = $stateOrProvince; return $this; @@ -480,9 +465,6 @@ public function getStreet() */ public function setStreet($street) { - if (is_null($street)) { - throw new \InvalidArgumentException('non-nullable street cannot be null'); - } $this->container['street'] = $street; return $this; diff --git a/src/Adyen/Model/ConfigurationWebhooks/Amount.php b/src/Adyen/Model/ConfigurationWebhooks/Amount.php index cc5836be4..0c734a3bd 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/Amount.php +++ b/src/Adyen/Model/ConfigurationWebhooks/Amount.php @@ -308,9 +308,6 @@ public function getCurrency() */ public function setCurrency($currency) { - if (is_null($currency)) { - throw new \InvalidArgumentException('non-nullable currency cannot be null'); - } $this->container['currency'] = $currency; return $this; @@ -335,9 +332,6 @@ public function getValue() */ public function setValue($value) { - if (is_null($value)) { - throw new \InvalidArgumentException('non-nullable value cannot be null'); - } $this->container['value'] = $value; return $this; diff --git a/src/Adyen/Model/ConfigurationWebhooks/Authentication.php b/src/Adyen/Model/ConfigurationWebhooks/Authentication.php index 53025685e..9d428e644 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/Authentication.php +++ b/src/Adyen/Model/ConfigurationWebhooks/Authentication.php @@ -309,9 +309,6 @@ public function getEmail() */ public function setEmail($email) { - if (is_null($email)) { - throw new \InvalidArgumentException('non-nullable email cannot be null'); - } $this->container['email'] = $email; return $this; @@ -336,9 +333,6 @@ public function getPassword() */ public function setPassword($password) { - if (is_null($password)) { - throw new \InvalidArgumentException('non-nullable password cannot be null'); - } $this->container['password'] = $password; return $this; @@ -363,9 +357,6 @@ public function getPhone() */ public function setPhone($phone) { - if (is_null($phone)) { - throw new \InvalidArgumentException('non-nullable phone cannot be null'); - } $this->container['phone'] = $phone; return $this; diff --git a/src/Adyen/Model/ConfigurationWebhooks/Balance.php b/src/Adyen/Model/ConfigurationWebhooks/Balance.php index f422c37d2..34c9371f2 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/Balance.php +++ b/src/Adyen/Model/ConfigurationWebhooks/Balance.php @@ -335,9 +335,6 @@ public function getAvailable() */ public function setAvailable($available) { - if (is_null($available)) { - throw new \InvalidArgumentException('non-nullable available cannot be null'); - } $this->container['available'] = $available; return $this; @@ -362,9 +359,6 @@ public function getBalance() */ public function setBalance($balance) { - if (is_null($balance)) { - throw new \InvalidArgumentException('non-nullable balance cannot be null'); - } $this->container['balance'] = $balance; return $this; @@ -389,9 +383,6 @@ public function getCurrency() */ public function setCurrency($currency) { - if (is_null($currency)) { - throw new \InvalidArgumentException('non-nullable currency cannot be null'); - } $this->container['currency'] = $currency; return $this; @@ -416,9 +407,6 @@ public function getPending() */ public function setPending($pending) { - if (is_null($pending)) { - throw new \InvalidArgumentException('non-nullable pending cannot be null'); - } $this->container['pending'] = $pending; return $this; @@ -443,9 +431,6 @@ public function getReserved() */ public function setReserved($reserved) { - if (is_null($reserved)) { - throw new \InvalidArgumentException('non-nullable reserved cannot be null'); - } $this->container['reserved'] = $reserved; return $this; diff --git a/src/Adyen/Model/ConfigurationWebhooks/BalanceAccount.php b/src/Adyen/Model/ConfigurationWebhooks/BalanceAccount.php index cb49ddfaa..02b943df1 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/BalanceAccount.php +++ b/src/Adyen/Model/ConfigurationWebhooks/BalanceAccount.php @@ -398,9 +398,6 @@ public function getAccountHolderId() */ public function setAccountHolderId($accountHolderId) { - if (is_null($accountHolderId)) { - throw new \InvalidArgumentException('non-nullable accountHolderId cannot be null'); - } $this->container['accountHolderId'] = $accountHolderId; return $this; @@ -425,9 +422,6 @@ public function getBalances() */ public function setBalances($balances) { - if (is_null($balances)) { - throw new \InvalidArgumentException('non-nullable balances cannot be null'); - } $this->container['balances'] = $balances; return $this; @@ -452,9 +446,6 @@ public function getDefaultCurrencyCode() */ public function setDefaultCurrencyCode($defaultCurrencyCode) { - if (is_null($defaultCurrencyCode)) { - throw new \InvalidArgumentException('non-nullable defaultCurrencyCode cannot be null'); - } $this->container['defaultCurrencyCode'] = $defaultCurrencyCode; return $this; @@ -479,9 +470,6 @@ public function getDescription() */ public function setDescription($description) { - if (is_null($description)) { - throw new \InvalidArgumentException('non-nullable description cannot be null'); - } $this->container['description'] = $description; return $this; @@ -506,9 +494,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -533,9 +518,6 @@ public function getMetadata() */ public function setMetadata($metadata) { - if (is_null($metadata)) { - throw new \InvalidArgumentException('non-nullable metadata cannot be null'); - } $this->container['metadata'] = $metadata; return $this; @@ -560,9 +542,6 @@ public function getMigratedAccountCode() */ public function setMigratedAccountCode($migratedAccountCode) { - if (is_null($migratedAccountCode)) { - throw new \InvalidArgumentException('non-nullable migratedAccountCode cannot be null'); - } $this->container['migratedAccountCode'] = $migratedAccountCode; return $this; @@ -587,9 +566,6 @@ public function getPlatformPaymentConfiguration() */ public function setPlatformPaymentConfiguration($platformPaymentConfiguration) { - if (is_null($platformPaymentConfiguration)) { - throw new \InvalidArgumentException('non-nullable platformPaymentConfiguration cannot be null'); - } $this->container['platformPaymentConfiguration'] = $platformPaymentConfiguration; return $this; @@ -614,9 +590,6 @@ public function getReference() */ public function setReference($reference) { - if (is_null($reference)) { - throw new \InvalidArgumentException('non-nullable reference cannot be null'); - } $this->container['reference'] = $reference; return $this; @@ -641,9 +614,6 @@ public function getStatus() */ 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( @@ -678,9 +648,6 @@ public function getTimeZone() */ public function setTimeZone($timeZone) { - if (is_null($timeZone)) { - throw new \InvalidArgumentException('non-nullable timeZone cannot be null'); - } $this->container['timeZone'] = $timeZone; return $this; diff --git a/src/Adyen/Model/ConfigurationWebhooks/BalanceAccountNotificationData.php b/src/Adyen/Model/ConfigurationWebhooks/BalanceAccountNotificationData.php index 8cb2b6a83..4c50a6bfb 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/BalanceAccountNotificationData.php +++ b/src/Adyen/Model/ConfigurationWebhooks/BalanceAccountNotificationData.php @@ -302,9 +302,6 @@ public function getBalanceAccount() */ public function setBalanceAccount($balanceAccount) { - if (is_null($balanceAccount)) { - throw new \InvalidArgumentException('non-nullable balanceAccount cannot be null'); - } $this->container['balanceAccount'] = $balanceAccount; return $this; @@ -329,9 +326,6 @@ public function getBalancePlatform() */ public function setBalancePlatform($balancePlatform) { - if (is_null($balancePlatform)) { - throw new \InvalidArgumentException('non-nullable balancePlatform cannot be null'); - } $this->container['balancePlatform'] = $balancePlatform; return $this; diff --git a/src/Adyen/Model/ConfigurationWebhooks/BalanceAccountNotificationRequest.php b/src/Adyen/Model/ConfigurationWebhooks/BalanceAccountNotificationRequest.php index 81e29f7e8..07bffc106 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/BalanceAccountNotificationRequest.php +++ b/src/Adyen/Model/ConfigurationWebhooks/BalanceAccountNotificationRequest.php @@ -341,9 +341,6 @@ public function getData() */ public function setData($data) { - if (is_null($data)) { - throw new \InvalidArgumentException('non-nullable data cannot be null'); - } $this->container['data'] = $data; return $this; @@ -368,9 +365,6 @@ public function getEnvironment() */ public function setEnvironment($environment) { - if (is_null($environment)) { - throw new \InvalidArgumentException('non-nullable environment cannot be null'); - } $this->container['environment'] = $environment; return $this; @@ -395,9 +389,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/ConfigurationWebhooks/BalancePlatformNotificationResponse.php b/src/Adyen/Model/ConfigurationWebhooks/BalancePlatformNotificationResponse.php index bca6faa1a..08c2529f8 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/BalancePlatformNotificationResponse.php +++ b/src/Adyen/Model/ConfigurationWebhooks/BalancePlatformNotificationResponse.php @@ -289,15 +289,12 @@ public function getNotificationResponse() /** * 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). + * @param string|null $notificationResponse Respond with any **2xx** HTTP status code 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; diff --git a/src/Adyen/Model/ConfigurationWebhooks/BankAccountDetails.php b/src/Adyen/Model/ConfigurationWebhooks/BankAccountDetails.php index bf6fc5257..cd2a501b2 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/BankAccountDetails.php +++ b/src/Adyen/Model/ConfigurationWebhooks/BankAccountDetails.php @@ -340,9 +340,6 @@ public function getAccountNumber() */ public function setAccountNumber($accountNumber) { - if (is_null($accountNumber)) { - throw new \InvalidArgumentException('non-nullable accountNumber cannot be null'); - } $this->container['accountNumber'] = $accountNumber; return $this; @@ -367,9 +364,6 @@ public function getAccountType() */ public function setAccountType($accountType) { - if (is_null($accountType)) { - throw new \InvalidArgumentException('non-nullable accountType cannot be null'); - } $this->container['accountType'] = $accountType; return $this; @@ -394,9 +388,6 @@ public function getFormFactor() */ public function setFormFactor($formFactor) { - if (is_null($formFactor)) { - throw new \InvalidArgumentException('non-nullable formFactor cannot be null'); - } $this->container['formFactor'] = $formFactor; return $this; @@ -421,9 +412,6 @@ public function getIban() */ public function setIban($iban) { - if (is_null($iban)) { - throw new \InvalidArgumentException('non-nullable iban cannot be null'); - } $this->container['iban'] = $iban; return $this; @@ -448,9 +436,6 @@ public function getRoutingNumber() */ public function setRoutingNumber($routingNumber) { - if (is_null($routingNumber)) { - throw new \InvalidArgumentException('non-nullable routingNumber cannot be null'); - } $this->container['routingNumber'] = $routingNumber; return $this; @@ -475,9 +460,6 @@ public function getSortCode() */ public function setSortCode($sortCode) { - if (is_null($sortCode)) { - throw new \InvalidArgumentException('non-nullable sortCode cannot be null'); - } $this->container['sortCode'] = $sortCode; return $this; @@ -502,9 +484,6 @@ public function getType() */ public function setType($type) { - if (is_null($type)) { - throw new \InvalidArgumentException('non-nullable type cannot be null'); - } $this->container['type'] = $type; return $this; diff --git a/src/Adyen/Model/ConfigurationWebhooks/BulkAddress.php b/src/Adyen/Model/ConfigurationWebhooks/BulkAddress.php index f0a9e41c9..b42808aeb 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/BulkAddress.php +++ b/src/Adyen/Model/ConfigurationWebhooks/BulkAddress.php @@ -354,9 +354,6 @@ public function getCity() */ public function setCity($city) { - if (is_null($city)) { - throw new \InvalidArgumentException('non-nullable city cannot be null'); - } $this->container['city'] = $city; return $this; @@ -381,9 +378,6 @@ public function getCompany() */ public function setCompany($company) { - if (is_null($company)) { - throw new \InvalidArgumentException('non-nullable company cannot be null'); - } $this->container['company'] = $company; return $this; @@ -408,9 +402,6 @@ public function getCountry() */ public function setCountry($country) { - if (is_null($country)) { - throw new \InvalidArgumentException('non-nullable country cannot be null'); - } $this->container['country'] = $country; return $this; @@ -435,9 +426,6 @@ public function getEmail() */ public function setEmail($email) { - if (is_null($email)) { - throw new \InvalidArgumentException('non-nullable email cannot be null'); - } $this->container['email'] = $email; return $this; @@ -462,9 +450,6 @@ public function getHouseNumberOrName() */ public function setHouseNumberOrName($houseNumberOrName) { - if (is_null($houseNumberOrName)) { - throw new \InvalidArgumentException('non-nullable houseNumberOrName cannot be null'); - } $this->container['houseNumberOrName'] = $houseNumberOrName; return $this; @@ -489,9 +474,6 @@ public function getMobile() */ public function setMobile($mobile) { - if (is_null($mobile)) { - throw new \InvalidArgumentException('non-nullable mobile cannot be null'); - } $this->container['mobile'] = $mobile; return $this; @@ -516,9 +498,6 @@ public function getPostalCode() */ public function setPostalCode($postalCode) { - if (is_null($postalCode)) { - throw new \InvalidArgumentException('non-nullable postalCode cannot be null'); - } $this->container['postalCode'] = $postalCode; return $this; @@ -543,9 +522,6 @@ public function getStateOrProvince() */ public function setStateOrProvince($stateOrProvince) { - if (is_null($stateOrProvince)) { - throw new \InvalidArgumentException('non-nullable stateOrProvince cannot be null'); - } $this->container['stateOrProvince'] = $stateOrProvince; return $this; @@ -570,9 +546,6 @@ public function getStreet() */ public function setStreet($street) { - if (is_null($street)) { - throw new \InvalidArgumentException('non-nullable street cannot be null'); - } $this->container['street'] = $street; return $this; diff --git a/src/Adyen/Model/ConfigurationWebhooks/CapabilityProblem.php b/src/Adyen/Model/ConfigurationWebhooks/CapabilityProblem.php index 80baffb47..b88047fec 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/CapabilityProblem.php +++ b/src/Adyen/Model/ConfigurationWebhooks/CapabilityProblem.php @@ -302,9 +302,6 @@ public function getEntity() */ public function setEntity($entity) { - if (is_null($entity)) { - throw new \InvalidArgumentException('non-nullable entity cannot be null'); - } $this->container['entity'] = $entity; return $this; @@ -329,9 +326,6 @@ public function getVerificationErrors() */ public function setVerificationErrors($verificationErrors) { - if (is_null($verificationErrors)) { - throw new \InvalidArgumentException('non-nullable verificationErrors cannot be null'); - } $this->container['verificationErrors'] = $verificationErrors; return $this; diff --git a/src/Adyen/Model/ConfigurationWebhooks/CapabilityProblemEntity.php b/src/Adyen/Model/ConfigurationWebhooks/CapabilityProblemEntity.php index 00b9f84c6..ecc55832a 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/CapabilityProblemEntity.php +++ b/src/Adyen/Model/ConfigurationWebhooks/CapabilityProblemEntity.php @@ -341,9 +341,6 @@ public function getDocuments() */ public function setDocuments($documents) { - if (is_null($documents)) { - throw new \InvalidArgumentException('non-nullable documents cannot be null'); - } $this->container['documents'] = $documents; return $this; @@ -368,9 +365,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -395,9 +389,6 @@ public function getOwner() */ public function setOwner($owner) { - if (is_null($owner)) { - throw new \InvalidArgumentException('non-nullable owner cannot be null'); - } $this->container['owner'] = $owner; return $this; @@ -422,9 +413,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/ConfigurationWebhooks/CapabilityProblemEntityRecursive.php b/src/Adyen/Model/ConfigurationWebhooks/CapabilityProblemEntityRecursive.php index 666b0f038..4b450fada 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/CapabilityProblemEntityRecursive.php +++ b/src/Adyen/Model/ConfigurationWebhooks/CapabilityProblemEntityRecursive.php @@ -334,9 +334,6 @@ public function getDocuments() */ public function setDocuments($documents) { - if (is_null($documents)) { - throw new \InvalidArgumentException('non-nullable documents cannot be null'); - } $this->container['documents'] = $documents; return $this; @@ -361,9 +358,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -388,9 +382,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/ConfigurationWebhooks/CapabilitySettings.php b/src/Adyen/Model/ConfigurationWebhooks/CapabilitySettings.php index f8fd8bc67..478ff8914 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/CapabilitySettings.php +++ b/src/Adyen/Model/ConfigurationWebhooks/CapabilitySettings.php @@ -358,15 +358,12 @@ public function getAmountPerIndustry() /** * Sets amountPerIndustry * - * @param array|null $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; @@ -385,15 +382,12 @@ public function getAuthorizedCardUsers() /** * Sets authorizedCardUsers * - * @param bool|null $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; @@ -412,15 +406,12 @@ public function getFundingSource() /** * Sets fundingSource * - * @param string[]|null $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( @@ -448,15 +439,12 @@ public function getInterval() /** * Sets interval * - * @param string|null $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( @@ -491,9 +479,6 @@ public function getMaxAmount() */ public function setMaxAmount($maxAmount) { - if (is_null($maxAmount)) { - throw new \InvalidArgumentException('non-nullable maxAmount cannot be null'); - } $this->container['maxAmount'] = $maxAmount; return $this; diff --git a/src/Adyen/Model/ConfigurationWebhooks/Card.php b/src/Adyen/Model/ConfigurationWebhooks/Card.php index 08240150b..9d78c5d11 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/Card.php +++ b/src/Adyen/Model/ConfigurationWebhooks/Card.php @@ -419,9 +419,6 @@ public function getAuthentication() */ public function setAuthentication($authentication) { - if (is_null($authentication)) { - throw new \InvalidArgumentException('non-nullable authentication cannot be null'); - } $this->container['authentication'] = $authentication; return $this; @@ -446,9 +443,6 @@ public function getBin() */ public function setBin($bin) { - if (is_null($bin)) { - throw new \InvalidArgumentException('non-nullable bin cannot be null'); - } $this->container['bin'] = $bin; return $this; @@ -473,9 +467,6 @@ public function getBrand() */ public function setBrand($brand) { - if (is_null($brand)) { - throw new \InvalidArgumentException('non-nullable brand cannot be null'); - } $this->container['brand'] = $brand; return $this; @@ -500,9 +491,6 @@ public function getBrandVariant() */ public function setBrandVariant($brandVariant) { - if (is_null($brandVariant)) { - throw new \InvalidArgumentException('non-nullable brandVariant cannot be null'); - } $this->container['brandVariant'] = $brandVariant; return $this; @@ -527,9 +515,6 @@ public function getCardholderName() */ public function setCardholderName($cardholderName) { - if (is_null($cardholderName)) { - throw new \InvalidArgumentException('non-nullable cardholderName cannot be null'); - } $this->container['cardholderName'] = $cardholderName; return $this; @@ -554,9 +539,6 @@ public function getConfiguration() */ public function setConfiguration($configuration) { - if (is_null($configuration)) { - throw new \InvalidArgumentException('non-nullable configuration cannot be null'); - } $this->container['configuration'] = $configuration; return $this; @@ -581,9 +563,6 @@ public function getCvc() */ public function setCvc($cvc) { - if (is_null($cvc)) { - throw new \InvalidArgumentException('non-nullable cvc cannot be null'); - } $this->container['cvc'] = $cvc; return $this; @@ -608,9 +587,6 @@ public function getDeliveryContact() */ public function setDeliveryContact($deliveryContact) { - if (is_null($deliveryContact)) { - throw new \InvalidArgumentException('non-nullable deliveryContact cannot be null'); - } $this->container['deliveryContact'] = $deliveryContact; return $this; @@ -635,9 +611,6 @@ public function getExpiration() */ public function setExpiration($expiration) { - if (is_null($expiration)) { - throw new \InvalidArgumentException('non-nullable expiration cannot be null'); - } $this->container['expiration'] = $expiration; return $this; @@ -662,9 +635,6 @@ public function getFormFactor() */ 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( @@ -699,9 +669,6 @@ public function getLastFour() */ public function setLastFour($lastFour) { - if (is_null($lastFour)) { - throw new \InvalidArgumentException('non-nullable lastFour cannot be null'); - } $this->container['lastFour'] = $lastFour; return $this; @@ -726,9 +693,6 @@ public function getNumber() */ public function setNumber($number) { - if (is_null($number)) { - throw new \InvalidArgumentException('non-nullable number cannot be null'); - } $this->container['number'] = $number; return $this; @@ -753,9 +717,6 @@ public function getThreeDSecure() */ public function setThreeDSecure($threeDSecure) { - if (is_null($threeDSecure)) { - throw new \InvalidArgumentException('non-nullable threeDSecure cannot be null'); - } $this->container['threeDSecure'] = $threeDSecure; return $this; diff --git a/src/Adyen/Model/ConfigurationWebhooks/CardConfiguration.php b/src/Adyen/Model/ConfigurationWebhooks/CardConfiguration.php index 364ef9ef8..3792d417f 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/CardConfiguration.php +++ b/src/Adyen/Model/ConfigurationWebhooks/CardConfiguration.php @@ -389,9 +389,6 @@ public function getActivation() */ public function setActivation($activation) { - if (is_null($activation)) { - throw new \InvalidArgumentException('non-nullable activation cannot be null'); - } $this->container['activation'] = $activation; return $this; @@ -416,9 +413,6 @@ public function getActivationUrl() */ public function setActivationUrl($activationUrl) { - if (is_null($activationUrl)) { - throw new \InvalidArgumentException('non-nullable activationUrl cannot be null'); - } $this->container['activationUrl'] = $activationUrl; return $this; @@ -443,9 +437,6 @@ public function getBulkAddress() */ public function setBulkAddress($bulkAddress) { - if (is_null($bulkAddress)) { - throw new \InvalidArgumentException('non-nullable bulkAddress cannot be null'); - } $this->container['bulkAddress'] = $bulkAddress; return $this; @@ -470,9 +461,6 @@ public function getCardImageId() */ public function setCardImageId($cardImageId) { - if (is_null($cardImageId)) { - throw new \InvalidArgumentException('non-nullable cardImageId cannot be null'); - } $this->container['cardImageId'] = $cardImageId; return $this; @@ -497,9 +485,6 @@ public function getCarrier() */ public function setCarrier($carrier) { - if (is_null($carrier)) { - throw new \InvalidArgumentException('non-nullable carrier cannot be null'); - } $this->container['carrier'] = $carrier; return $this; @@ -524,9 +509,6 @@ public function getCarrierImageId() */ public function setCarrierImageId($carrierImageId) { - if (is_null($carrierImageId)) { - throw new \InvalidArgumentException('non-nullable carrierImageId cannot be null'); - } $this->container['carrierImageId'] = $carrierImageId; return $this; @@ -551,9 +533,6 @@ public function getConfigurationProfileId() */ public function setConfigurationProfileId($configurationProfileId) { - if (is_null($configurationProfileId)) { - throw new \InvalidArgumentException('non-nullable configurationProfileId cannot be null'); - } $this->container['configurationProfileId'] = $configurationProfileId; return $this; @@ -578,9 +557,6 @@ public function getCurrency() */ public function setCurrency($currency) { - if (is_null($currency)) { - throw new \InvalidArgumentException('non-nullable currency cannot be null'); - } $this->container['currency'] = $currency; return $this; @@ -605,9 +581,6 @@ public function getEnvelope() */ public function setEnvelope($envelope) { - if (is_null($envelope)) { - throw new \InvalidArgumentException('non-nullable envelope cannot be null'); - } $this->container['envelope'] = $envelope; return $this; @@ -632,9 +605,6 @@ public function getInsert() */ public function setInsert($insert) { - if (is_null($insert)) { - throw new \InvalidArgumentException('non-nullable insert cannot be null'); - } $this->container['insert'] = $insert; return $this; @@ -659,9 +629,6 @@ public function getLanguage() */ public function setLanguage($language) { - if (is_null($language)) { - throw new \InvalidArgumentException('non-nullable language cannot be null'); - } $this->container['language'] = $language; return $this; @@ -686,9 +653,6 @@ public function getLogoImageId() */ public function setLogoImageId($logoImageId) { - if (is_null($logoImageId)) { - throw new \InvalidArgumentException('non-nullable logoImageId cannot be null'); - } $this->container['logoImageId'] = $logoImageId; return $this; @@ -713,9 +677,6 @@ public function getPinMailer() */ public function setPinMailer($pinMailer) { - if (is_null($pinMailer)) { - throw new \InvalidArgumentException('non-nullable pinMailer cannot be null'); - } $this->container['pinMailer'] = $pinMailer; return $this; @@ -740,9 +701,6 @@ public function getShipmentMethod() */ public function setShipmentMethod($shipmentMethod) { - if (is_null($shipmentMethod)) { - throw new \InvalidArgumentException('non-nullable shipmentMethod cannot be null'); - } $this->container['shipmentMethod'] = $shipmentMethod; return $this; diff --git a/src/Adyen/Model/ConfigurationWebhooks/CardOrderItem.php b/src/Adyen/Model/ConfigurationWebhooks/CardOrderItem.php index 8133963c6..34ded6323 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/CardOrderItem.php +++ b/src/Adyen/Model/ConfigurationWebhooks/CardOrderItem.php @@ -344,9 +344,6 @@ public function getBalancePlatform() */ public function setBalancePlatform($balancePlatform) { - if (is_null($balancePlatform)) { - throw new \InvalidArgumentException('non-nullable balancePlatform cannot be null'); - } $this->container['balancePlatform'] = $balancePlatform; return $this; @@ -371,9 +368,6 @@ public function getCard() */ public function setCard($card) { - if (is_null($card)) { - throw new \InvalidArgumentException('non-nullable card cannot be null'); - } $this->container['card'] = $card; return $this; @@ -398,9 +392,6 @@ public function getCardOrderItemId() */ public function setCardOrderItemId($cardOrderItemId) { - if (is_null($cardOrderItemId)) { - throw new \InvalidArgumentException('non-nullable cardOrderItemId cannot be null'); - } $this->container['cardOrderItemId'] = $cardOrderItemId; return $this; @@ -425,9 +416,6 @@ public function getCreationDate() */ public function setCreationDate($creationDate) { - if (is_null($creationDate)) { - throw new \InvalidArgumentException('non-nullable creationDate cannot be null'); - } $this->container['creationDate'] = $creationDate; return $this; @@ -452,9 +440,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -479,9 +464,6 @@ public function getPaymentInstrumentId() */ public function setPaymentInstrumentId($paymentInstrumentId) { - if (is_null($paymentInstrumentId)) { - throw new \InvalidArgumentException('non-nullable paymentInstrumentId cannot be null'); - } $this->container['paymentInstrumentId'] = $paymentInstrumentId; return $this; @@ -506,9 +488,6 @@ public function getPin() */ public function setPin($pin) { - if (is_null($pin)) { - throw new \InvalidArgumentException('non-nullable pin cannot be null'); - } $this->container['pin'] = $pin; return $this; @@ -533,9 +512,6 @@ public function getShippingMethod() */ public function setShippingMethod($shippingMethod) { - if (is_null($shippingMethod)) { - throw new \InvalidArgumentException('non-nullable shippingMethod cannot be null'); - } $this->container['shippingMethod'] = $shippingMethod; return $this; diff --git a/src/Adyen/Model/ConfigurationWebhooks/CardOrderItemDeliveryStatus.php b/src/Adyen/Model/ConfigurationWebhooks/CardOrderItemDeliveryStatus.php index 24a9c5320..5c1679f02 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/CardOrderItemDeliveryStatus.php +++ b/src/Adyen/Model/ConfigurationWebhooks/CardOrderItemDeliveryStatus.php @@ -344,9 +344,6 @@ public function getErrorMessage() */ public function setErrorMessage($errorMessage) { - if (is_null($errorMessage)) { - throw new \InvalidArgumentException('non-nullable errorMessage cannot be null'); - } $this->container['errorMessage'] = $errorMessage; return $this; @@ -371,9 +368,6 @@ public function getStatus() */ 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( @@ -408,9 +402,6 @@ public function getTrackingNumber() */ public function setTrackingNumber($trackingNumber) { - if (is_null($trackingNumber)) { - throw new \InvalidArgumentException('non-nullable trackingNumber cannot be null'); - } $this->container['trackingNumber'] = $trackingNumber; return $this; diff --git a/src/Adyen/Model/ConfigurationWebhooks/CardOrderNotificationRequest.php b/src/Adyen/Model/ConfigurationWebhooks/CardOrderNotificationRequest.php index a649c8956..b7202ac5e 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/CardOrderNotificationRequest.php +++ b/src/Adyen/Model/ConfigurationWebhooks/CardOrderNotificationRequest.php @@ -341,9 +341,6 @@ public function getData() */ public function setData($data) { - if (is_null($data)) { - throw new \InvalidArgumentException('non-nullable data cannot be null'); - } $this->container['data'] = $data; return $this; @@ -368,9 +365,6 @@ public function getEnvironment() */ public function setEnvironment($environment) { - if (is_null($environment)) { - throw new \InvalidArgumentException('non-nullable environment cannot be null'); - } $this->container['environment'] = $environment; return $this; @@ -395,9 +389,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/ConfigurationWebhooks/ContactDetails.php b/src/Adyen/Model/ConfigurationWebhooks/ContactDetails.php index 619301438..5a4f38ac9 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/ContactDetails.php +++ b/src/Adyen/Model/ConfigurationWebhooks/ContactDetails.php @@ -325,9 +325,6 @@ public function getAddress() */ public function setAddress($address) { - if (is_null($address)) { - throw new \InvalidArgumentException('non-nullable address cannot be null'); - } $this->container['address'] = $address; return $this; @@ -352,9 +349,6 @@ public function getEmail() */ public function setEmail($email) { - if (is_null($email)) { - throw new \InvalidArgumentException('non-nullable email cannot be null'); - } $this->container['email'] = $email; return $this; @@ -379,9 +373,6 @@ public function getPhone() */ public function setPhone($phone) { - if (is_null($phone)) { - throw new \InvalidArgumentException('non-nullable phone cannot be null'); - } $this->container['phone'] = $phone; return $this; @@ -406,9 +397,6 @@ public function getWebAddress() */ public function setWebAddress($webAddress) { - if (is_null($webAddress)) { - throw new \InvalidArgumentException('non-nullable webAddress cannot be null'); - } $this->container['webAddress'] = $webAddress; return $this; diff --git a/src/Adyen/Model/ConfigurationWebhooks/DeliveryAddress.php b/src/Adyen/Model/ConfigurationWebhooks/DeliveryAddress.php index 89c9ea763..0e5db8355 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/DeliveryAddress.php +++ b/src/Adyen/Model/ConfigurationWebhooks/DeliveryAddress.php @@ -340,9 +340,6 @@ public function getCity() */ public function setCity($city) { - if (is_null($city)) { - throw new \InvalidArgumentException('non-nullable city cannot be null'); - } $this->container['city'] = $city; return $this; @@ -367,9 +364,6 @@ public function getCountry() */ public function setCountry($country) { - if (is_null($country)) { - throw new \InvalidArgumentException('non-nullable country cannot be null'); - } $this->container['country'] = $country; return $this; @@ -394,9 +388,6 @@ public function getLine1() */ public function setLine1($line1) { - if (is_null($line1)) { - throw new \InvalidArgumentException('non-nullable line1 cannot be null'); - } $this->container['line1'] = $line1; return $this; @@ -421,9 +412,6 @@ public function getLine2() */ public function setLine2($line2) { - if (is_null($line2)) { - throw new \InvalidArgumentException('non-nullable line2 cannot be null'); - } $this->container['line2'] = $line2; return $this; @@ -448,9 +436,6 @@ public function getLine3() */ public function setLine3($line3) { - if (is_null($line3)) { - throw new \InvalidArgumentException('non-nullable line3 cannot be null'); - } $this->container['line3'] = $line3; return $this; @@ -475,9 +460,6 @@ public function getPostalCode() */ public function setPostalCode($postalCode) { - if (is_null($postalCode)) { - throw new \InvalidArgumentException('non-nullable postalCode cannot be null'); - } $this->container['postalCode'] = $postalCode; return $this; @@ -502,9 +484,6 @@ public function getStateOrProvince() */ public function setStateOrProvince($stateOrProvince) { - if (is_null($stateOrProvince)) { - throw new \InvalidArgumentException('non-nullable stateOrProvince cannot be null'); - } $this->container['stateOrProvince'] = $stateOrProvince; return $this; diff --git a/src/Adyen/Model/ConfigurationWebhooks/DeliveryContact.php b/src/Adyen/Model/ConfigurationWebhooks/DeliveryContact.php index e300bd18a..fba6d10aa 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/DeliveryContact.php +++ b/src/Adyen/Model/ConfigurationWebhooks/DeliveryContact.php @@ -343,9 +343,6 @@ public function getAddress() */ public function setAddress($address) { - if (is_null($address)) { - throw new \InvalidArgumentException('non-nullable address cannot be null'); - } $this->container['address'] = $address; return $this; @@ -370,9 +367,6 @@ public function getCompany() */ public function setCompany($company) { - if (is_null($company)) { - throw new \InvalidArgumentException('non-nullable company cannot be null'); - } $this->container['company'] = $company; return $this; @@ -397,9 +391,6 @@ public function getEmail() */ public function setEmail($email) { - if (is_null($email)) { - throw new \InvalidArgumentException('non-nullable email cannot be null'); - } $this->container['email'] = $email; return $this; @@ -424,9 +415,6 @@ public function getFullPhoneNumber() */ public function setFullPhoneNumber($fullPhoneNumber) { - if (is_null($fullPhoneNumber)) { - throw new \InvalidArgumentException('non-nullable fullPhoneNumber cannot be null'); - } $this->container['fullPhoneNumber'] = $fullPhoneNumber; return $this; @@ -451,9 +439,6 @@ public function getName() */ public function setName($name) { - if (is_null($name)) { - throw new \InvalidArgumentException('non-nullable name cannot be null'); - } $this->container['name'] = $name; return $this; @@ -478,9 +463,6 @@ public function getPhoneNumber() */ public function setPhoneNumber($phoneNumber) { - if (is_null($phoneNumber)) { - throw new \InvalidArgumentException('non-nullable phoneNumber cannot be null'); - } $this->container['phoneNumber'] = $phoneNumber; return $this; @@ -505,9 +487,6 @@ public function getWebAddress() */ public function setWebAddress($webAddress) { - if (is_null($webAddress)) { - throw new \InvalidArgumentException('non-nullable webAddress cannot be null'); - } $this->container['webAddress'] = $webAddress; return $this; diff --git a/src/Adyen/Model/ConfigurationWebhooks/Expiry.php b/src/Adyen/Model/ConfigurationWebhooks/Expiry.php index cbfef0832..72b9765df 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/Expiry.php +++ b/src/Adyen/Model/ConfigurationWebhooks/Expiry.php @@ -302,9 +302,6 @@ public function getMonth() */ public function setMonth($month) { - if (is_null($month)) { - throw new \InvalidArgumentException('non-nullable month cannot be null'); - } $this->container['month'] = $month; return $this; @@ -329,9 +326,6 @@ public function getYear() */ public function setYear($year) { - if (is_null($year)) { - throw new \InvalidArgumentException('non-nullable year cannot be null'); - } $this->container['year'] = $year; return $this; diff --git a/src/Adyen/Model/ConfigurationWebhooks/IbanAccountIdentification.php b/src/Adyen/Model/ConfigurationWebhooks/IbanAccountIdentification.php index b8ad9086d..3f7f41181 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/IbanAccountIdentification.php +++ b/src/Adyen/Model/ConfigurationWebhooks/IbanAccountIdentification.php @@ -329,9 +329,6 @@ public function getIban() */ public function setIban($iban) { - if (is_null($iban)) { - throw new \InvalidArgumentException('non-nullable iban cannot be null'); - } $this->container['iban'] = $iban; return $this; @@ -356,9 +353,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/ConfigurationWebhooks/Name.php b/src/Adyen/Model/ConfigurationWebhooks/Name.php index dca3bd365..378c1867d 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/Name.php +++ b/src/Adyen/Model/ConfigurationWebhooks/Name.php @@ -308,9 +308,6 @@ public function getFirstName() */ public function setFirstName($firstName) { - if (is_null($firstName)) { - throw new \InvalidArgumentException('non-nullable firstName cannot be null'); - } $this->container['firstName'] = $firstName; return $this; @@ -335,9 +332,6 @@ public function getLastName() */ public function setLastName($lastName) { - if (is_null($lastName)) { - throw new \InvalidArgumentException('non-nullable lastName cannot be null'); - } $this->container['lastName'] = $lastName; return $this; diff --git a/src/Adyen/Model/ConfigurationWebhooks/ObjectSerializer.php b/src/Adyen/Model/ConfigurationWebhooks/ObjectSerializer.php index 6629bee4b..2d912cd58 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/ObjectSerializer.php +++ b/src/Adyen/Model/ConfigurationWebhooks/ObjectSerializer.php @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach ($data as $property => $value) { + foreach($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) { - return $timestamp; - } + if (!is_string($timestamp)) return $timestamp; return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/ConfigurationWebhooks/PaymentInstrument.php b/src/Adyen/Model/ConfigurationWebhooks/PaymentInstrument.php index bde9ae854..5d4dd6bd8 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/PaymentInstrument.php +++ b/src/Adyen/Model/ConfigurationWebhooks/PaymentInstrument.php @@ -54,6 +54,7 @@ class PaymentInstrument implements ModelInterface, ArrayAccess, \JsonSerializabl 'paymentInstrumentGroupId' => 'string', 'reference' => 'string', 'status' => 'string', + 'statusComment' => 'string', 'statusReason' => 'string', 'type' => 'string' ]; @@ -76,6 +77,7 @@ class PaymentInstrument implements ModelInterface, ArrayAccess, \JsonSerializabl 'paymentInstrumentGroupId' => null, 'reference' => null, 'status' => null, + 'statusComment' => null, 'statusReason' => null, 'type' => null ]; @@ -96,6 +98,7 @@ class PaymentInstrument implements ModelInterface, ArrayAccess, \JsonSerializabl 'paymentInstrumentGroupId' => false, 'reference' => false, 'status' => false, + 'statusComment' => false, 'statusReason' => false, 'type' => false ]; @@ -196,6 +199,7 @@ public function isNullableSetToNull(string $property): bool 'paymentInstrumentGroupId' => 'paymentInstrumentGroupId', 'reference' => 'reference', 'status' => 'status', + 'statusComment' => 'statusComment', 'statusReason' => 'statusReason', 'type' => 'type' ]; @@ -216,6 +220,7 @@ public function isNullableSetToNull(string $property): bool 'paymentInstrumentGroupId' => 'setPaymentInstrumentGroupId', 'reference' => 'setReference', 'status' => 'setStatus', + 'statusComment' => 'setStatusComment', 'statusReason' => 'setStatusReason', 'type' => 'setType' ]; @@ -236,6 +241,7 @@ public function isNullableSetToNull(string $property): bool 'paymentInstrumentGroupId' => 'getPaymentInstrumentGroupId', 'reference' => 'getReference', 'status' => 'getStatus', + 'statusComment' => 'getStatusComment', 'statusReason' => 'getStatusReason', 'type' => 'getType' ]; @@ -367,6 +373,7 @@ public function __construct(array $data = null) $this->setIfExists('paymentInstrumentGroupId', $data ?? [], null); $this->setIfExists('reference', $data ?? [], null); $this->setIfExists('status', $data ?? [], null); + $this->setIfExists('statusComment', $data ?? [], null); $this->setIfExists('statusReason', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); } @@ -473,9 +480,6 @@ public function getAdditionalBankAccountIdentifications() */ public function setAdditionalBankAccountIdentifications($additionalBankAccountIdentifications) { - if (is_null($additionalBankAccountIdentifications)) { - throw new \InvalidArgumentException('non-nullable additionalBankAccountIdentifications cannot be null'); - } $this->container['additionalBankAccountIdentifications'] = $additionalBankAccountIdentifications; return $this; @@ -500,9 +504,6 @@ public function getBalanceAccountId() */ public function setBalanceAccountId($balanceAccountId) { - if (is_null($balanceAccountId)) { - throw new \InvalidArgumentException('non-nullable balanceAccountId cannot be null'); - } $this->container['balanceAccountId'] = $balanceAccountId; return $this; @@ -527,9 +528,6 @@ public function getBankAccount() */ public function setBankAccount($bankAccount) { - if (is_null($bankAccount)) { - throw new \InvalidArgumentException('non-nullable bankAccount cannot be null'); - } $this->container['bankAccount'] = $bankAccount; return $this; @@ -554,9 +552,6 @@ public function getCard() */ public function setCard($card) { - if (is_null($card)) { - throw new \InvalidArgumentException('non-nullable card cannot be null'); - } $this->container['card'] = $card; return $this; @@ -581,9 +576,6 @@ public function getDescription() */ public function setDescription($description) { - if (is_null($description)) { - throw new \InvalidArgumentException('non-nullable description cannot be null'); - } $this->container['description'] = $description; return $this; @@ -608,9 +600,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -635,9 +624,6 @@ public function getIssuingCountryCode() */ public function setIssuingCountryCode($issuingCountryCode) { - if (is_null($issuingCountryCode)) { - throw new \InvalidArgumentException('non-nullable issuingCountryCode cannot be null'); - } $this->container['issuingCountryCode'] = $issuingCountryCode; return $this; @@ -662,9 +648,6 @@ public function getPaymentInstrumentGroupId() */ public function setPaymentInstrumentGroupId($paymentInstrumentGroupId) { - if (is_null($paymentInstrumentGroupId)) { - throw new \InvalidArgumentException('non-nullable paymentInstrumentGroupId cannot be null'); - } $this->container['paymentInstrumentGroupId'] = $paymentInstrumentGroupId; return $this; @@ -689,9 +672,6 @@ public function getReference() */ public function setReference($reference) { - if (is_null($reference)) { - throw new \InvalidArgumentException('non-nullable reference cannot be null'); - } $this->container['reference'] = $reference; return $this; @@ -716,9 +696,6 @@ public function getStatus() */ 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( @@ -734,6 +711,30 @@ public function setStatus($status) return $this; } + /** + * Gets statusComment + * + * @return string|null + */ + public function getStatusComment() + { + return $this->container['statusComment']; + } + + /** + * Sets statusComment + * + * @param string|null $statusComment The status comment provides additional information for the statusReason of the payment instrument. + * + * @return self + */ + public function setStatusComment($statusComment) + { + $this->container['statusComment'] = $statusComment; + + return $this; + } + /** * Gets statusReason * @@ -753,9 +754,6 @@ public function getStatusReason() */ public function setStatusReason($statusReason) { - if (is_null($statusReason)) { - throw new \InvalidArgumentException('non-nullable statusReason cannot be null'); - } $allowedValues = $this->getStatusReasonAllowableValues(); if (!in_array($statusReason, $allowedValues, true)) { throw new \InvalidArgumentException( @@ -790,9 +788,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/ConfigurationWebhooks/PaymentInstrumentAdditionalBankAccountIdentificationsInner.php b/src/Adyen/Model/ConfigurationWebhooks/PaymentInstrumentAdditionalBankAccountIdentificationsInner.php index 0ab0217b3..4711acdf5 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/PaymentInstrumentAdditionalBankAccountIdentificationsInner.php +++ b/src/Adyen/Model/ConfigurationWebhooks/PaymentInstrumentAdditionalBankAccountIdentificationsInner.php @@ -308,9 +308,6 @@ public function getIban() */ public function setIban($iban) { - if (is_null($iban)) { - throw new \InvalidArgumentException('non-nullable iban cannot be null'); - } $this->container['iban'] = $iban; return $this; @@ -335,9 +332,6 @@ public function getType() */ public function setType($type) { - if (is_null($type)) { - throw new \InvalidArgumentException('non-nullable type cannot be null'); - } $this->container['type'] = $type; return $this; diff --git a/src/Adyen/Model/ConfigurationWebhooks/PaymentInstrumentNotificationData.php b/src/Adyen/Model/ConfigurationWebhooks/PaymentInstrumentNotificationData.php index 64bb9dc7f..dfc624cf2 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/PaymentInstrumentNotificationData.php +++ b/src/Adyen/Model/ConfigurationWebhooks/PaymentInstrumentNotificationData.php @@ -302,9 +302,6 @@ public function getBalancePlatform() */ public function setBalancePlatform($balancePlatform) { - if (is_null($balancePlatform)) { - throw new \InvalidArgumentException('non-nullable balancePlatform cannot be null'); - } $this->container['balancePlatform'] = $balancePlatform; return $this; @@ -329,9 +326,6 @@ public function getPaymentInstrument() */ public function setPaymentInstrument($paymentInstrument) { - if (is_null($paymentInstrument)) { - throw new \InvalidArgumentException('non-nullable paymentInstrument cannot be null'); - } $this->container['paymentInstrument'] = $paymentInstrument; return $this; diff --git a/src/Adyen/Model/ConfigurationWebhooks/PaymentNotificationRequest.php b/src/Adyen/Model/ConfigurationWebhooks/PaymentNotificationRequest.php index 591c64af6..6d30a341f 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/PaymentNotificationRequest.php +++ b/src/Adyen/Model/ConfigurationWebhooks/PaymentNotificationRequest.php @@ -341,9 +341,6 @@ public function getData() */ public function setData($data) { - if (is_null($data)) { - throw new \InvalidArgumentException('non-nullable data cannot be null'); - } $this->container['data'] = $data; return $this; @@ -368,9 +365,6 @@ public function getEnvironment() */ public function setEnvironment($environment) { - if (is_null($environment)) { - throw new \InvalidArgumentException('non-nullable environment cannot be null'); - } $this->container['environment'] = $environment; return $this; @@ -395,9 +389,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/ConfigurationWebhooks/Phone.php b/src/Adyen/Model/ConfigurationWebhooks/Phone.php index fedf9be5c..977cd6b52 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/Phone.php +++ b/src/Adyen/Model/ConfigurationWebhooks/Phone.php @@ -331,9 +331,6 @@ public function getNumber() */ public function setNumber($number) { - if (is_null($number)) { - throw new \InvalidArgumentException('non-nullable number cannot be null'); - } $this->container['number'] = $number; return $this; @@ -358,9 +355,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/ConfigurationWebhooks/PhoneNumber.php b/src/Adyen/Model/ConfigurationWebhooks/PhoneNumber.php index b251cbcf4..ac138169c 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/PhoneNumber.php +++ b/src/Adyen/Model/ConfigurationWebhooks/PhoneNumber.php @@ -336,9 +336,6 @@ public function getPhoneCountryCode() */ public function setPhoneCountryCode($phoneCountryCode) { - if (is_null($phoneCountryCode)) { - throw new \InvalidArgumentException('non-nullable phoneCountryCode cannot be null'); - } $this->container['phoneCountryCode'] = $phoneCountryCode; return $this; @@ -363,9 +360,6 @@ public function getPhoneNumber() */ public function setPhoneNumber($phoneNumber) { - if (is_null($phoneNumber)) { - throw new \InvalidArgumentException('non-nullable phoneNumber cannot be null'); - } $this->container['phoneNumber'] = $phoneNumber; return $this; @@ -390,9 +384,6 @@ public function getPhoneType() */ 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( diff --git a/src/Adyen/Model/ConfigurationWebhooks/PlatformPaymentConfiguration.php b/src/Adyen/Model/ConfigurationWebhooks/PlatformPaymentConfiguration.php index 6c964f755..7c7a9b8c4 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/PlatformPaymentConfiguration.php +++ b/src/Adyen/Model/ConfigurationWebhooks/PlatformPaymentConfiguration.php @@ -302,9 +302,6 @@ public function getSalesDayClosingTime() */ public function setSalesDayClosingTime($salesDayClosingTime) { - if (is_null($salesDayClosingTime)) { - throw new \InvalidArgumentException('non-nullable salesDayClosingTime cannot be null'); - } $this->container['salesDayClosingTime'] = $salesDayClosingTime; return $this; @@ -329,7 +326,6 @@ public function getSettlementDelayDays() */ public function setSettlementDelayDays($settlementDelayDays) { - // Do nothing for nullable integers $this->container['settlementDelayDays'] = $settlementDelayDays; return $this; diff --git a/src/Adyen/Model/ConfigurationWebhooks/RemediatingAction.php b/src/Adyen/Model/ConfigurationWebhooks/RemediatingAction.php index f597c4290..2e89b8ce7 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/RemediatingAction.php +++ b/src/Adyen/Model/ConfigurationWebhooks/RemediatingAction.php @@ -302,9 +302,6 @@ public function getCode() */ public function setCode($code) { - if (is_null($code)) { - throw new \InvalidArgumentException('non-nullable code cannot be null'); - } $this->container['code'] = $code; return $this; @@ -329,9 +326,6 @@ public function getMessage() */ public function setMessage($message) { - if (is_null($message)) { - throw new \InvalidArgumentException('non-nullable message cannot be null'); - } $this->container['message'] = $message; return $this; diff --git a/src/Adyen/Model/ConfigurationWebhooks/Resource.php b/src/Adyen/Model/ConfigurationWebhooks/Resource.php index 727429ba1..5ecd1c84a 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/Resource.php +++ b/src/Adyen/Model/ConfigurationWebhooks/Resource.php @@ -309,9 +309,6 @@ public function getBalancePlatform() */ public function setBalancePlatform($balancePlatform) { - if (is_null($balancePlatform)) { - throw new \InvalidArgumentException('non-nullable balancePlatform cannot be null'); - } $this->container['balancePlatform'] = $balancePlatform; return $this; @@ -336,9 +333,6 @@ public function getCreationDate() */ public function setCreationDate($creationDate) { - if (is_null($creationDate)) { - throw new \InvalidArgumentException('non-nullable creationDate cannot be null'); - } $this->container['creationDate'] = $creationDate; return $this; @@ -363,9 +357,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; diff --git a/src/Adyen/Model/ConfigurationWebhooks/SweepConfigurationNotificationData.php b/src/Adyen/Model/ConfigurationWebhooks/SweepConfigurationNotificationData.php index e93a5113e..859c46545 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/SweepConfigurationNotificationData.php +++ b/src/Adyen/Model/ConfigurationWebhooks/SweepConfigurationNotificationData.php @@ -309,9 +309,6 @@ public function getAccountId() */ public function setAccountId($accountId) { - if (is_null($accountId)) { - throw new \InvalidArgumentException('non-nullable accountId cannot be null'); - } $this->container['accountId'] = $accountId; return $this; @@ -336,9 +333,6 @@ public function getBalancePlatform() */ public function setBalancePlatform($balancePlatform) { - if (is_null($balancePlatform)) { - throw new \InvalidArgumentException('non-nullable balancePlatform cannot be null'); - } $this->container['balancePlatform'] = $balancePlatform; return $this; @@ -363,9 +357,6 @@ public function getSweep() */ public function setSweep($sweep) { - if (is_null($sweep)) { - throw new \InvalidArgumentException('non-nullable sweep cannot be null'); - } $this->container['sweep'] = $sweep; return $this; diff --git a/src/Adyen/Model/ConfigurationWebhooks/SweepConfigurationNotificationRequest.php b/src/Adyen/Model/ConfigurationWebhooks/SweepConfigurationNotificationRequest.php index f34b4ad7f..09b0e5274 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/SweepConfigurationNotificationRequest.php +++ b/src/Adyen/Model/ConfigurationWebhooks/SweepConfigurationNotificationRequest.php @@ -343,9 +343,6 @@ public function getData() */ public function setData($data) { - if (is_null($data)) { - throw new \InvalidArgumentException('non-nullable data cannot be null'); - } $this->container['data'] = $data; return $this; @@ -370,9 +367,6 @@ public function getEnvironment() */ public function setEnvironment($environment) { - if (is_null($environment)) { - throw new \InvalidArgumentException('non-nullable environment cannot be null'); - } $this->container['environment'] = $environment; return $this; @@ -397,9 +391,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/ConfigurationWebhooks/SweepConfigurationV2.php b/src/Adyen/Model/ConfigurationWebhooks/SweepConfigurationV2.php index 63b89c7ad..0ed91b9b5 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/SweepConfigurationV2.php +++ b/src/Adyen/Model/ConfigurationWebhooks/SweepConfigurationV2.php @@ -317,6 +317,7 @@ public function getModelName() 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 = 'declined'; public const REASON_DECLINED_BY_TRANSACTION_RULE = 'declinedByTransactionRule'; public const REASON_ERROR = 'error'; public const REASON_NOT_ENOUGH_BALANCE = 'notEnoughBalance'; @@ -376,6 +377,7 @@ public function getReasonAllowableValues() self::REASON_COUNTERPARTY_ADDRESS_REQUIRED, self::REASON_COUNTERPARTY_BANK_TIMED_OUT, self::REASON_COUNTERPARTY_BANK_UNAVAILABLE, + self::REASON_DECLINED, self::REASON_DECLINED_BY_TRANSACTION_RULE, self::REASON_ERROR, self::REASON_NOT_ENOUGH_BALANCE, @@ -551,9 +553,6 @@ public function getCategory() */ 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( @@ -588,9 +587,6 @@ public function getCounterparty() */ public function setCounterparty($counterparty) { - if (is_null($counterparty)) { - throw new \InvalidArgumentException('non-nullable counterparty cannot be null'); - } $this->container['counterparty'] = $counterparty; return $this; @@ -615,9 +611,6 @@ public function getCurrency() */ public function setCurrency($currency) { - if (is_null($currency)) { - throw new \InvalidArgumentException('non-nullable currency cannot be null'); - } $this->container['currency'] = $currency; return $this; @@ -642,9 +635,6 @@ public function getDescription() */ public function setDescription($description) { - if (is_null($description)) { - throw new \InvalidArgumentException('non-nullable description cannot be null'); - } $this->container['description'] = $description; return $this; @@ -669,9 +659,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -690,15 +677,12 @@ public function getPriorities() /** * Sets priorities * - * @param string[]|null $priorities The list of priorities for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. You can provide multiple priorities. Adyen will try to pay out using the priority you list first. If that's not possible, it moves on to the next option in the order of your provided priorities. 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). Set `category` to **bank**. For more details, see optional priorities setup for [marketplaces](https://docs.adyen.com/marketplaces/payout-to-users/scheduled-payouts#optional-priorities-setup) or [platforms](https://docs.adyen.com/platforms/payout-to-users/scheduled-payouts#optional-priorities-setup). + * @param string[]|null $priorities The list of priorities for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. You can provide multiple priorities. Adyen will try to pay out using the priority you list first. If that's not possible, it moves on to the next option in the order of your provided priorities. Possible values: * **regular**: for normal, low-value transactions. * **fast**: a faster way to transfer funds, but the fees are higher. Recommended for high-priority, low-value transactions. * **wire**: the fastest way to transfer funds, but this has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: for instant funds transfers in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: for high-value transfers to a recipient in a different country. * **internal**: for transfers to an Adyen-issued business bank account (by bank account number/IBAN). Set `category` to **bank**. For more details, see optional priorities setup for [marketplaces](https://docs.adyen.com/marketplaces/payout-to-users/scheduled-payouts#optional-priorities-setup) or [platforms](https://docs.adyen.com/platforms/payout-to-users/scheduled-payouts#optional-priorities-setup). * * @return self */ public function setPriorities($priorities) { - if (is_null($priorities)) { - throw new \InvalidArgumentException('non-nullable priorities cannot be null'); - } $allowedValues = $this->getPrioritiesAllowableValues(); if (array_diff($priorities, $allowedValues)) { throw new \InvalidArgumentException( @@ -732,9 +716,6 @@ public function getReason() */ 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( @@ -769,9 +750,6 @@ public function getReference() */ public function setReference($reference) { - if (is_null($reference)) { - throw new \InvalidArgumentException('non-nullable reference cannot be null'); - } $this->container['reference'] = $reference; return $this; @@ -796,9 +774,6 @@ public function getReferenceForBeneficiary() */ public function setReferenceForBeneficiary($referenceForBeneficiary) { - if (is_null($referenceForBeneficiary)) { - throw new \InvalidArgumentException('non-nullable referenceForBeneficiary cannot be null'); - } $this->container['referenceForBeneficiary'] = $referenceForBeneficiary; return $this; @@ -823,9 +798,6 @@ public function getSchedule() */ public function setSchedule($schedule) { - if (is_null($schedule)) { - throw new \InvalidArgumentException('non-nullable schedule cannot be null'); - } $this->container['schedule'] = $schedule; return $this; @@ -850,9 +822,6 @@ public function getStatus() */ 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( @@ -887,9 +856,6 @@ public function getSweepAmount() */ public function setSweepAmount($sweepAmount) { - if (is_null($sweepAmount)) { - throw new \InvalidArgumentException('non-nullable sweepAmount cannot be null'); - } $this->container['sweepAmount'] = $sweepAmount; return $this; @@ -914,9 +880,6 @@ public function getTargetAmount() */ public function setTargetAmount($targetAmount) { - if (is_null($targetAmount)) { - throw new \InvalidArgumentException('non-nullable targetAmount cannot be null'); - } $this->container['targetAmount'] = $targetAmount; return $this; @@ -941,9 +904,6 @@ public function getTriggerAmount() */ public function setTriggerAmount($triggerAmount) { - if (is_null($triggerAmount)) { - throw new \InvalidArgumentException('non-nullable triggerAmount cannot be null'); - } $this->container['triggerAmount'] = $triggerAmount; return $this; @@ -968,9 +928,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/ConfigurationWebhooks/SweepCounterparty.php b/src/Adyen/Model/ConfigurationWebhooks/SweepCounterparty.php index 25b65dc27..1ea4efc1f 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/SweepCounterparty.php +++ b/src/Adyen/Model/ConfigurationWebhooks/SweepCounterparty.php @@ -303,15 +303,12 @@ public function getBalanceAccountId() /** * 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**. + * @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). > If you are updating the counterparty from a transfer instrument to a balance account, set `transferInstrumentId` to **null**. * * @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; @@ -330,15 +327,12 @@ public function getMerchantAccount() /** * 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. + * @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 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; @@ -357,15 +351,12 @@ public function getTransferInstrumentId() /** * 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 in your [marketplace](https://docs.adyen.com/marketplaces/top-up-balance-account/#before-you-begin) or [platform](https://docs.adyen.com/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. + * @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 in your [marketplace](https://docs.adyen.com/marketplaces/top-up-balance-account/#before-you-begin) or [platform](https://docs.adyen.com/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.> If you are updating the counterparty from a balance account to a transfer instrument, set `balanceAccountId` to **null**. * * @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; diff --git a/src/Adyen/Model/ConfigurationWebhooks/SweepSchedule.php b/src/Adyen/Model/ConfigurationWebhooks/SweepSchedule.php index 1b8bd2fa1..cbeadcf39 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/SweepSchedule.php +++ b/src/Adyen/Model/ConfigurationWebhooks/SweepSchedule.php @@ -334,9 +334,6 @@ public function getCronExpression() */ public function setCronExpression($cronExpression) { - if (is_null($cronExpression)) { - throw new \InvalidArgumentException('non-nullable cronExpression cannot be null'); - } $this->container['cronExpression'] = $cronExpression; return $this; @@ -355,15 +352,12 @@ public function getType() /** * 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. + * @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**: execute the sweep instantly if the `triggerAmount` is reached. * * @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( diff --git a/src/Adyen/Model/ConfigurationWebhooks/VerificationDeadline.php b/src/Adyen/Model/ConfigurationWebhooks/VerificationDeadline.php index 8d875353a..2a1bbe660 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/VerificationDeadline.php +++ b/src/Adyen/Model/ConfigurationWebhooks/VerificationDeadline.php @@ -425,9 +425,6 @@ public function getCapabilities() */ 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( @@ -461,9 +458,6 @@ public function getEntityIds() */ public function setEntityIds($entityIds) { - if (is_null($entityIds)) { - throw new \InvalidArgumentException('non-nullable entityIds cannot be null'); - } $this->container['entityIds'] = $entityIds; return $this; @@ -488,9 +482,6 @@ public function getExpiresAt() */ public function setExpiresAt($expiresAt) { - if (is_null($expiresAt)) { - throw new \InvalidArgumentException('non-nullable expiresAt cannot be null'); - } $this->container['expiresAt'] = $expiresAt; return $this; diff --git a/src/Adyen/Model/ConfigurationWebhooks/VerificationError.php b/src/Adyen/Model/ConfigurationWebhooks/VerificationError.php index 782ebb497..ab1e03e77 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/VerificationError.php +++ b/src/Adyen/Model/ConfigurationWebhooks/VerificationError.php @@ -465,9 +465,6 @@ public function getCapabilities() */ 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( @@ -501,9 +498,6 @@ public function getCode() */ public function setCode($code) { - if (is_null($code)) { - throw new \InvalidArgumentException('non-nullable code cannot be null'); - } $this->container['code'] = $code; return $this; @@ -528,9 +522,6 @@ public function getMessage() */ public function setMessage($message) { - if (is_null($message)) { - throw new \InvalidArgumentException('non-nullable message cannot be null'); - } $this->container['message'] = $message; return $this; @@ -555,9 +546,6 @@ public function getRemediatingActions() */ public function setRemediatingActions($remediatingActions) { - if (is_null($remediatingActions)) { - throw new \InvalidArgumentException('non-nullable remediatingActions cannot be null'); - } $this->container['remediatingActions'] = $remediatingActions; return $this; @@ -582,9 +570,6 @@ public function getSubErrors() */ public function setSubErrors($subErrors) { - if (is_null($subErrors)) { - throw new \InvalidArgumentException('non-nullable subErrors cannot be null'); - } $this->container['subErrors'] = $subErrors; return $this; @@ -609,9 +594,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/ConfigurationWebhooks/VerificationErrorRecursive.php b/src/Adyen/Model/ConfigurationWebhooks/VerificationErrorRecursive.php index 6993029c6..1bed524ec 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/VerificationErrorRecursive.php +++ b/src/Adyen/Model/ConfigurationWebhooks/VerificationErrorRecursive.php @@ -458,9 +458,6 @@ public function getCapabilities() */ 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( @@ -494,9 +491,6 @@ public function getCode() */ public function setCode($code) { - if (is_null($code)) { - throw new \InvalidArgumentException('non-nullable code cannot be null'); - } $this->container['code'] = $code; return $this; @@ -521,9 +515,6 @@ public function getMessage() */ public function setMessage($message) { - if (is_null($message)) { - throw new \InvalidArgumentException('non-nullable message cannot be null'); - } $this->container['message'] = $message; return $this; @@ -548,9 +539,6 @@ public function getType() */ 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( @@ -585,9 +573,6 @@ public function getRemediatingActions() */ public function setRemediatingActions($remediatingActions) { - if (is_null($remediatingActions)) { - throw new \InvalidArgumentException('non-nullable remediatingActions cannot be null'); - } $this->container['remediatingActions'] = $remediatingActions; return $this; diff --git a/src/Adyen/Model/DataProtection/ObjectSerializer.php b/src/Adyen/Model/DataProtection/ObjectSerializer.php index 1b86733ae..fe8491817 100644 --- a/src/Adyen/Model/DataProtection/ObjectSerializer.php +++ b/src/Adyen/Model/DataProtection/ObjectSerializer.php @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach ($data as $property => $value) { + foreach($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) { - return $timestamp; - } + if (!is_string($timestamp)) return $timestamp; return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/DataProtection/ServiceError.php b/src/Adyen/Model/DataProtection/ServiceError.php index f214ee555..cc419f0ca 100644 --- a/src/Adyen/Model/DataProtection/ServiceError.php +++ b/src/Adyen/Model/DataProtection/ServiceError.php @@ -323,9 +323,6 @@ public function getErrorCode() */ public function setErrorCode($errorCode) { - if (is_null($errorCode)) { - throw new \InvalidArgumentException('non-nullable errorCode cannot be null'); - } $this->container['errorCode'] = $errorCode; return $this; @@ -350,9 +347,6 @@ public function getErrorType() */ public function setErrorType($errorType) { - if (is_null($errorType)) { - throw new \InvalidArgumentException('non-nullable errorType cannot be null'); - } $this->container['errorType'] = $errorType; return $this; @@ -377,9 +371,6 @@ public function getMessage() */ public function setMessage($message) { - if (is_null($message)) { - throw new \InvalidArgumentException('non-nullable message cannot be null'); - } $this->container['message'] = $message; return $this; @@ -404,9 +395,6 @@ public function getPspReference() */ public function setPspReference($pspReference) { - if (is_null($pspReference)) { - throw new \InvalidArgumentException('non-nullable pspReference cannot be null'); - } $this->container['pspReference'] = $pspReference; return $this; @@ -431,7 +419,6 @@ public function getStatus() */ public function setStatus($status) { - // Do nothing for nullable integers $this->container['status'] = $status; return $this; diff --git a/src/Adyen/Model/DataProtection/SubjectErasureByPspReferenceRequest.php b/src/Adyen/Model/DataProtection/SubjectErasureByPspReferenceRequest.php index eb4446c35..b7c695d6b 100644 --- a/src/Adyen/Model/DataProtection/SubjectErasureByPspReferenceRequest.php +++ b/src/Adyen/Model/DataProtection/SubjectErasureByPspReferenceRequest.php @@ -309,9 +309,6 @@ public function getForceErasure() */ public function setForceErasure($forceErasure) { - if (is_null($forceErasure)) { - throw new \InvalidArgumentException('non-nullable forceErasure cannot be null'); - } $this->container['forceErasure'] = $forceErasure; return $this; @@ -336,9 +333,6 @@ public function getMerchantAccount() */ public function setMerchantAccount($merchantAccount) { - if (is_null($merchantAccount)) { - throw new \InvalidArgumentException('non-nullable merchantAccount cannot be null'); - } $this->container['merchantAccount'] = $merchantAccount; return $this; @@ -363,9 +357,6 @@ public function getPspReference() */ public function setPspReference($pspReference) { - if (is_null($pspReference)) { - throw new \InvalidArgumentException('non-nullable pspReference cannot be null'); - } $this->container['pspReference'] = $pspReference; return $this; diff --git a/src/Adyen/Model/DataProtection/SubjectErasureResponse.php b/src/Adyen/Model/DataProtection/SubjectErasureResponse.php index 79c486df1..4c2da8367 100644 --- a/src/Adyen/Model/DataProtection/SubjectErasureResponse.php +++ b/src/Adyen/Model/DataProtection/SubjectErasureResponse.php @@ -322,9 +322,6 @@ public function getResult() */ public function setResult($result) { - if (is_null($result)) { - throw new \InvalidArgumentException('non-nullable result cannot be null'); - } $allowedValues = $this->getResultAllowableValues(); if (!in_array($result, $allowedValues, true)) { throw new \InvalidArgumentException( diff --git a/src/Adyen/Model/Disputes/AcceptDisputeRequest.php b/src/Adyen/Model/Disputes/AcceptDisputeRequest.php index bcacbc2bd..9c9cf9df2 100644 --- a/src/Adyen/Model/Disputes/AcceptDisputeRequest.php +++ b/src/Adyen/Model/Disputes/AcceptDisputeRequest.php @@ -308,9 +308,6 @@ public function getDisputePspReference() */ public function setDisputePspReference($disputePspReference) { - if (is_null($disputePspReference)) { - throw new \InvalidArgumentException('non-nullable disputePspReference cannot be null'); - } $this->container['disputePspReference'] = $disputePspReference; return $this; @@ -335,9 +332,6 @@ public function getMerchantAccountCode() */ public function setMerchantAccountCode($merchantAccountCode) { - if (is_null($merchantAccountCode)) { - throw new \InvalidArgumentException('non-nullable merchantAccountCode cannot be null'); - } $this->container['merchantAccountCode'] = $merchantAccountCode; return $this; diff --git a/src/Adyen/Model/Disputes/AcceptDisputeResponse.php b/src/Adyen/Model/Disputes/AcceptDisputeResponse.php index 0bbeebbb6..9121cbd25 100644 --- a/src/Adyen/Model/Disputes/AcceptDisputeResponse.php +++ b/src/Adyen/Model/Disputes/AcceptDisputeResponse.php @@ -298,9 +298,6 @@ public function getDisputeServiceResult() */ public function setDisputeServiceResult($disputeServiceResult) { - if (is_null($disputeServiceResult)) { - throw new \InvalidArgumentException('non-nullable disputeServiceResult cannot be null'); - } $this->container['disputeServiceResult'] = $disputeServiceResult; return $this; diff --git a/src/Adyen/Model/Disputes/DefendDisputeRequest.php b/src/Adyen/Model/Disputes/DefendDisputeRequest.php index 51f562014..5ac59a704 100644 --- a/src/Adyen/Model/Disputes/DefendDisputeRequest.php +++ b/src/Adyen/Model/Disputes/DefendDisputeRequest.php @@ -318,9 +318,6 @@ public function getDefenseReasonCode() */ public function setDefenseReasonCode($defenseReasonCode) { - if (is_null($defenseReasonCode)) { - throw new \InvalidArgumentException('non-nullable defenseReasonCode cannot be null'); - } $this->container['defenseReasonCode'] = $defenseReasonCode; return $this; @@ -345,9 +342,6 @@ public function getDisputePspReference() */ public function setDisputePspReference($disputePspReference) { - if (is_null($disputePspReference)) { - throw new \InvalidArgumentException('non-nullable disputePspReference cannot be null'); - } $this->container['disputePspReference'] = $disputePspReference; return $this; @@ -372,9 +366,6 @@ public function getMerchantAccountCode() */ public function setMerchantAccountCode($merchantAccountCode) { - if (is_null($merchantAccountCode)) { - throw new \InvalidArgumentException('non-nullable merchantAccountCode cannot be null'); - } $this->container['merchantAccountCode'] = $merchantAccountCode; return $this; diff --git a/src/Adyen/Model/Disputes/DefendDisputeResponse.php b/src/Adyen/Model/Disputes/DefendDisputeResponse.php index d3fd5a4ee..9be301f64 100644 --- a/src/Adyen/Model/Disputes/DefendDisputeResponse.php +++ b/src/Adyen/Model/Disputes/DefendDisputeResponse.php @@ -298,9 +298,6 @@ public function getDisputeServiceResult() */ public function setDisputeServiceResult($disputeServiceResult) { - if (is_null($disputeServiceResult)) { - throw new \InvalidArgumentException('non-nullable disputeServiceResult cannot be null'); - } $this->container['disputeServiceResult'] = $disputeServiceResult; return $this; diff --git a/src/Adyen/Model/Disputes/DefenseDocument.php b/src/Adyen/Model/Disputes/DefenseDocument.php index 0355f258b..5e30abbee 100644 --- a/src/Adyen/Model/Disputes/DefenseDocument.php +++ b/src/Adyen/Model/Disputes/DefenseDocument.php @@ -318,9 +318,6 @@ public function getContent() */ public function setContent($content) { - if (is_null($content)) { - throw new \InvalidArgumentException('non-nullable content cannot be null'); - } $this->container['content'] = $content; return $this; @@ -345,9 +342,6 @@ public function getContentType() */ public function setContentType($contentType) { - if (is_null($contentType)) { - throw new \InvalidArgumentException('non-nullable contentType cannot be null'); - } $this->container['contentType'] = $contentType; return $this; @@ -372,9 +366,6 @@ public function getDefenseDocumentTypeCode() */ public function setDefenseDocumentTypeCode($defenseDocumentTypeCode) { - if (is_null($defenseDocumentTypeCode)) { - throw new \InvalidArgumentException('non-nullable defenseDocumentTypeCode cannot be null'); - } $this->container['defenseDocumentTypeCode'] = $defenseDocumentTypeCode; return $this; diff --git a/src/Adyen/Model/Disputes/DefenseDocumentType.php b/src/Adyen/Model/Disputes/DefenseDocumentType.php index 71a56a253..750bf63c2 100644 --- a/src/Adyen/Model/Disputes/DefenseDocumentType.php +++ b/src/Adyen/Model/Disputes/DefenseDocumentType.php @@ -318,9 +318,6 @@ public function getAvailable() */ public function setAvailable($available) { - if (is_null($available)) { - throw new \InvalidArgumentException('non-nullable available cannot be null'); - } $this->container['available'] = $available; return $this; @@ -345,9 +342,6 @@ public function getDefenseDocumentTypeCode() */ public function setDefenseDocumentTypeCode($defenseDocumentTypeCode) { - if (is_null($defenseDocumentTypeCode)) { - throw new \InvalidArgumentException('non-nullable defenseDocumentTypeCode cannot be null'); - } $this->container['defenseDocumentTypeCode'] = $defenseDocumentTypeCode; return $this; @@ -372,9 +366,6 @@ public function getRequirementLevel() */ public function setRequirementLevel($requirementLevel) { - if (is_null($requirementLevel)) { - throw new \InvalidArgumentException('non-nullable requirementLevel cannot be null'); - } $this->container['requirementLevel'] = $requirementLevel; return $this; diff --git a/src/Adyen/Model/Disputes/DefenseReason.php b/src/Adyen/Model/Disputes/DefenseReason.php index 011835b31..73e411d4e 100644 --- a/src/Adyen/Model/Disputes/DefenseReason.php +++ b/src/Adyen/Model/Disputes/DefenseReason.php @@ -315,9 +315,6 @@ public function getDefenseDocumentTypes() */ public function setDefenseDocumentTypes($defenseDocumentTypes) { - if (is_null($defenseDocumentTypes)) { - throw new \InvalidArgumentException('non-nullable defenseDocumentTypes cannot be null'); - } $this->container['defenseDocumentTypes'] = $defenseDocumentTypes; return $this; @@ -342,9 +339,6 @@ public function getDefenseReasonCode() */ public function setDefenseReasonCode($defenseReasonCode) { - if (is_null($defenseReasonCode)) { - throw new \InvalidArgumentException('non-nullable defenseReasonCode cannot be null'); - } $this->container['defenseReasonCode'] = $defenseReasonCode; return $this; @@ -369,9 +363,6 @@ public function getSatisfied() */ public function setSatisfied($satisfied) { - if (is_null($satisfied)) { - throw new \InvalidArgumentException('non-nullable satisfied cannot be null'); - } $this->container['satisfied'] = $satisfied; return $this; diff --git a/src/Adyen/Model/Disputes/DefenseReasonsRequest.php b/src/Adyen/Model/Disputes/DefenseReasonsRequest.php index 92edfae60..5bb9589e1 100644 --- a/src/Adyen/Model/Disputes/DefenseReasonsRequest.php +++ b/src/Adyen/Model/Disputes/DefenseReasonsRequest.php @@ -308,9 +308,6 @@ public function getDisputePspReference() */ public function setDisputePspReference($disputePspReference) { - if (is_null($disputePspReference)) { - throw new \InvalidArgumentException('non-nullable disputePspReference cannot be null'); - } $this->container['disputePspReference'] = $disputePspReference; return $this; @@ -335,9 +332,6 @@ public function getMerchantAccountCode() */ public function setMerchantAccountCode($merchantAccountCode) { - if (is_null($merchantAccountCode)) { - throw new \InvalidArgumentException('non-nullable merchantAccountCode cannot be null'); - } $this->container['merchantAccountCode'] = $merchantAccountCode; return $this; diff --git a/src/Adyen/Model/Disputes/DefenseReasonsResponse.php b/src/Adyen/Model/Disputes/DefenseReasonsResponse.php index 9b2e7243e..316b03a77 100644 --- a/src/Adyen/Model/Disputes/DefenseReasonsResponse.php +++ b/src/Adyen/Model/Disputes/DefenseReasonsResponse.php @@ -305,9 +305,6 @@ public function getDefenseReasons() */ public function setDefenseReasons($defenseReasons) { - if (is_null($defenseReasons)) { - throw new \InvalidArgumentException('non-nullable defenseReasons cannot be null'); - } $this->container['defenseReasons'] = $defenseReasons; return $this; @@ -332,9 +329,6 @@ public function getDisputeServiceResult() */ public function setDisputeServiceResult($disputeServiceResult) { - if (is_null($disputeServiceResult)) { - throw new \InvalidArgumentException('non-nullable disputeServiceResult cannot be null'); - } $this->container['disputeServiceResult'] = $disputeServiceResult; return $this; diff --git a/src/Adyen/Model/Disputes/DeleteDefenseDocumentRequest.php b/src/Adyen/Model/Disputes/DeleteDefenseDocumentRequest.php index d4c21d8a4..11de0472e 100644 --- a/src/Adyen/Model/Disputes/DeleteDefenseDocumentRequest.php +++ b/src/Adyen/Model/Disputes/DeleteDefenseDocumentRequest.php @@ -318,9 +318,6 @@ public function getDefenseDocumentType() */ public function setDefenseDocumentType($defenseDocumentType) { - if (is_null($defenseDocumentType)) { - throw new \InvalidArgumentException('non-nullable defenseDocumentType cannot be null'); - } $this->container['defenseDocumentType'] = $defenseDocumentType; return $this; @@ -345,9 +342,6 @@ public function getDisputePspReference() */ public function setDisputePspReference($disputePspReference) { - if (is_null($disputePspReference)) { - throw new \InvalidArgumentException('non-nullable disputePspReference cannot be null'); - } $this->container['disputePspReference'] = $disputePspReference; return $this; @@ -372,9 +366,6 @@ public function getMerchantAccountCode() */ public function setMerchantAccountCode($merchantAccountCode) { - if (is_null($merchantAccountCode)) { - throw new \InvalidArgumentException('non-nullable merchantAccountCode cannot be null'); - } $this->container['merchantAccountCode'] = $merchantAccountCode; return $this; diff --git a/src/Adyen/Model/Disputes/DeleteDefenseDocumentResponse.php b/src/Adyen/Model/Disputes/DeleteDefenseDocumentResponse.php index 42e9eb4d0..bc042b3e7 100644 --- a/src/Adyen/Model/Disputes/DeleteDefenseDocumentResponse.php +++ b/src/Adyen/Model/Disputes/DeleteDefenseDocumentResponse.php @@ -298,9 +298,6 @@ public function getDisputeServiceResult() */ public function setDisputeServiceResult($disputeServiceResult) { - if (is_null($disputeServiceResult)) { - throw new \InvalidArgumentException('non-nullable disputeServiceResult cannot be null'); - } $this->container['disputeServiceResult'] = $disputeServiceResult; return $this; diff --git a/src/Adyen/Model/Disputes/DisputeServiceResult.php b/src/Adyen/Model/Disputes/DisputeServiceResult.php index 6d21cc453..8a028ded1 100644 --- a/src/Adyen/Model/Disputes/DisputeServiceResult.php +++ b/src/Adyen/Model/Disputes/DisputeServiceResult.php @@ -305,9 +305,6 @@ public function getErrorMessage() */ public function setErrorMessage($errorMessage) { - if (is_null($errorMessage)) { - throw new \InvalidArgumentException('non-nullable errorMessage cannot be null'); - } $this->container['errorMessage'] = $errorMessage; return $this; @@ -332,9 +329,6 @@ public function getSuccess() */ public function setSuccess($success) { - if (is_null($success)) { - throw new \InvalidArgumentException('non-nullable success cannot be null'); - } $this->container['success'] = $success; return $this; diff --git a/src/Adyen/Model/Disputes/ObjectSerializer.php b/src/Adyen/Model/Disputes/ObjectSerializer.php index 5ef9f66af..d363f9e2a 100644 --- a/src/Adyen/Model/Disputes/ObjectSerializer.php +++ b/src/Adyen/Model/Disputes/ObjectSerializer.php @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach ($data as $property => $value) { + foreach($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) { - return $timestamp; - } + if (!is_string($timestamp)) return $timestamp; return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/Disputes/ServiceError.php b/src/Adyen/Model/Disputes/ServiceError.php index 42312758c..4d75067cb 100644 --- a/src/Adyen/Model/Disputes/ServiceError.php +++ b/src/Adyen/Model/Disputes/ServiceError.php @@ -323,9 +323,6 @@ public function getErrorCode() */ public function setErrorCode($errorCode) { - if (is_null($errorCode)) { - throw new \InvalidArgumentException('non-nullable errorCode cannot be null'); - } $this->container['errorCode'] = $errorCode; return $this; @@ -350,9 +347,6 @@ public function getErrorType() */ public function setErrorType($errorType) { - if (is_null($errorType)) { - throw new \InvalidArgumentException('non-nullable errorType cannot be null'); - } $this->container['errorType'] = $errorType; return $this; @@ -377,9 +371,6 @@ public function getMessage() */ public function setMessage($message) { - if (is_null($message)) { - throw new \InvalidArgumentException('non-nullable message cannot be null'); - } $this->container['message'] = $message; return $this; @@ -404,9 +395,6 @@ public function getPspReference() */ public function setPspReference($pspReference) { - if (is_null($pspReference)) { - throw new \InvalidArgumentException('non-nullable pspReference cannot be null'); - } $this->container['pspReference'] = $pspReference; return $this; @@ -431,7 +419,6 @@ public function getStatus() */ public function setStatus($status) { - // Do nothing for nullable integers $this->container['status'] = $status; return $this; diff --git a/src/Adyen/Model/Disputes/SupplyDefenseDocumentRequest.php b/src/Adyen/Model/Disputes/SupplyDefenseDocumentRequest.php index 57b7c7a57..1d3692de8 100644 --- a/src/Adyen/Model/Disputes/SupplyDefenseDocumentRequest.php +++ b/src/Adyen/Model/Disputes/SupplyDefenseDocumentRequest.php @@ -318,9 +318,6 @@ public function getDefenseDocuments() */ public function setDefenseDocuments($defenseDocuments) { - if (is_null($defenseDocuments)) { - throw new \InvalidArgumentException('non-nullable defenseDocuments cannot be null'); - } $this->container['defenseDocuments'] = $defenseDocuments; return $this; @@ -345,9 +342,6 @@ public function getDisputePspReference() */ public function setDisputePspReference($disputePspReference) { - if (is_null($disputePspReference)) { - throw new \InvalidArgumentException('non-nullable disputePspReference cannot be null'); - } $this->container['disputePspReference'] = $disputePspReference; return $this; @@ -372,9 +366,6 @@ public function getMerchantAccountCode() */ public function setMerchantAccountCode($merchantAccountCode) { - if (is_null($merchantAccountCode)) { - throw new \InvalidArgumentException('non-nullable merchantAccountCode cannot be null'); - } $this->container['merchantAccountCode'] = $merchantAccountCode; return $this; diff --git a/src/Adyen/Model/Disputes/SupplyDefenseDocumentResponse.php b/src/Adyen/Model/Disputes/SupplyDefenseDocumentResponse.php index 46f5c521a..c7a08e784 100644 --- a/src/Adyen/Model/Disputes/SupplyDefenseDocumentResponse.php +++ b/src/Adyen/Model/Disputes/SupplyDefenseDocumentResponse.php @@ -298,9 +298,6 @@ public function getDisputeServiceResult() */ public function setDisputeServiceResult($disputeServiceResult) { - if (is_null($disputeServiceResult)) { - throw new \InvalidArgumentException('non-nullable disputeServiceResult cannot be null'); - } $this->container['disputeServiceResult'] = $disputeServiceResult; return $this; diff --git a/src/Adyen/Model/LegalEntityManagement/AULocalAccountIdentification.php b/src/Adyen/Model/LegalEntityManagement/AULocalAccountIdentification.php index bfffb3d05..5a0731b13 100644 --- a/src/Adyen/Model/LegalEntityManagement/AULocalAccountIdentification.php +++ b/src/Adyen/Model/LegalEntityManagement/AULocalAccountIdentification.php @@ -339,9 +339,6 @@ public function getAccountNumber() */ public function setAccountNumber($accountNumber) { - if (is_null($accountNumber)) { - throw new \InvalidArgumentException('non-nullable accountNumber cannot be null'); - } $this->container['accountNumber'] = $accountNumber; return $this; @@ -366,9 +363,6 @@ public function getBsbCode() */ public function setBsbCode($bsbCode) { - if (is_null($bsbCode)) { - throw new \InvalidArgumentException('non-nullable bsbCode cannot be null'); - } $this->container['bsbCode'] = $bsbCode; return $this; @@ -393,9 +387,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/LegalEntityManagement/AcceptTermsOfServiceRequest.php b/src/Adyen/Model/LegalEntityManagement/AcceptTermsOfServiceRequest.php index cf2b705eb..ce6f306e0 100644 --- a/src/Adyen/Model/LegalEntityManagement/AcceptTermsOfServiceRequest.php +++ b/src/Adyen/Model/LegalEntityManagement/AcceptTermsOfServiceRequest.php @@ -305,9 +305,6 @@ public function getAcceptedBy() */ public function setAcceptedBy($acceptedBy) { - if (is_null($acceptedBy)) { - throw new \InvalidArgumentException('non-nullable acceptedBy cannot be null'); - } $this->container['acceptedBy'] = $acceptedBy; return $this; @@ -332,9 +329,6 @@ public function getIpAddress() */ public function setIpAddress($ipAddress) { - if (is_null($ipAddress)) { - throw new \InvalidArgumentException('non-nullable ipAddress cannot be null'); - } $this->container['ipAddress'] = $ipAddress; return $this; diff --git a/src/Adyen/Model/LegalEntityManagement/AcceptTermsOfServiceResponse.php b/src/Adyen/Model/LegalEntityManagement/AcceptTermsOfServiceResponse.php index 4dc6b4f16..e8b62d043 100644 --- a/src/Adyen/Model/LegalEntityManagement/AcceptTermsOfServiceResponse.php +++ b/src/Adyen/Model/LegalEntityManagement/AcceptTermsOfServiceResponse.php @@ -365,9 +365,6 @@ public function getAcceptedBy() */ public function setAcceptedBy($acceptedBy) { - if (is_null($acceptedBy)) { - throw new \InvalidArgumentException('non-nullable acceptedBy cannot be null'); - } $this->container['acceptedBy'] = $acceptedBy; return $this; @@ -392,9 +389,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -419,9 +413,6 @@ public function getIpAddress() */ public function setIpAddress($ipAddress) { - if (is_null($ipAddress)) { - throw new \InvalidArgumentException('non-nullable ipAddress cannot be null'); - } $this->container['ipAddress'] = $ipAddress; return $this; @@ -446,9 +437,6 @@ public function getLanguage() */ public function setLanguage($language) { - if (is_null($language)) { - throw new \InvalidArgumentException('non-nullable language cannot be null'); - } $this->container['language'] = $language; return $this; @@ -473,9 +461,6 @@ public function getTermsOfServiceDocumentId() */ public function setTermsOfServiceDocumentId($termsOfServiceDocumentId) { - if (is_null($termsOfServiceDocumentId)) { - throw new \InvalidArgumentException('non-nullable termsOfServiceDocumentId cannot be null'); - } $this->container['termsOfServiceDocumentId'] = $termsOfServiceDocumentId; return $this; @@ -500,9 +485,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/LegalEntityManagement/AdditionalBankIdentification.php b/src/Adyen/Model/LegalEntityManagement/AdditionalBankIdentification.php index 28ffd6d90..bdc076d71 100644 --- a/src/Adyen/Model/LegalEntityManagement/AdditionalBankIdentification.php +++ b/src/Adyen/Model/LegalEntityManagement/AdditionalBankIdentification.php @@ -325,9 +325,6 @@ public function getCode() */ public function setCode($code) { - if (is_null($code)) { - throw new \InvalidArgumentException('non-nullable code cannot be null'); - } $this->container['code'] = $code; return $this; @@ -352,9 +349,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/LegalEntityManagement/Address.php b/src/Adyen/Model/LegalEntityManagement/Address.php index 5e3225e9b..dec774364 100644 --- a/src/Adyen/Model/LegalEntityManagement/Address.php +++ b/src/Adyen/Model/LegalEntityManagement/Address.php @@ -333,9 +333,6 @@ public function getCity() */ public function setCity($city) { - if (is_null($city)) { - throw new \InvalidArgumentException('non-nullable city cannot be null'); - } $this->container['city'] = $city; return $this; @@ -360,9 +357,6 @@ public function getCountry() */ public function setCountry($country) { - if (is_null($country)) { - throw new \InvalidArgumentException('non-nullable country cannot be null'); - } $this->container['country'] = $country; return $this; @@ -387,9 +381,6 @@ public function getPostalCode() */ public function setPostalCode($postalCode) { - if (is_null($postalCode)) { - throw new \InvalidArgumentException('non-nullable postalCode cannot be null'); - } $this->container['postalCode'] = $postalCode; return $this; @@ -414,9 +405,6 @@ public function getStateOrProvince() */ public function setStateOrProvince($stateOrProvince) { - if (is_null($stateOrProvince)) { - throw new \InvalidArgumentException('non-nullable stateOrProvince cannot be null'); - } $this->container['stateOrProvince'] = $stateOrProvince; return $this; @@ -441,9 +429,6 @@ public function getStreet() */ public function setStreet($street) { - if (is_null($street)) { - throw new \InvalidArgumentException('non-nullable street cannot be null'); - } $this->container['street'] = $street; return $this; @@ -468,9 +453,6 @@ public function getStreet2() */ public function setStreet2($street2) { - if (is_null($street2)) { - throw new \InvalidArgumentException('non-nullable street2 cannot be null'); - } $this->container['street2'] = $street2; return $this; diff --git a/src/Adyen/Model/LegalEntityManagement/Amount.php b/src/Adyen/Model/LegalEntityManagement/Amount.php index 9dc680928..186c4b832 100644 --- a/src/Adyen/Model/LegalEntityManagement/Amount.php +++ b/src/Adyen/Model/LegalEntityManagement/Amount.php @@ -302,9 +302,6 @@ public function getCurrency() */ public function setCurrency($currency) { - if (is_null($currency)) { - throw new \InvalidArgumentException('non-nullable currency cannot be null'); - } $this->container['currency'] = $currency; return $this; @@ -329,9 +326,6 @@ public function getValue() */ public function setValue($value) { - if (is_null($value)) { - throw new \InvalidArgumentException('non-nullable value cannot be null'); - } $this->container['value'] = $value; return $this; diff --git a/src/Adyen/Model/LegalEntityManagement/Attachment.php b/src/Adyen/Model/LegalEntityManagement/Attachment.php index 32d8a1db8..798fddff8 100644 --- a/src/Adyen/Model/LegalEntityManagement/Attachment.php +++ b/src/Adyen/Model/LegalEntityManagement/Attachment.php @@ -326,9 +326,6 @@ public function getContent() */ public function setContent($content) { - if (is_null($content)) { - throw new \InvalidArgumentException('non-nullable content cannot be null'); - } $this->container['content'] = $content; return $this; @@ -355,9 +352,6 @@ public function getContentType() */ public function setContentType($contentType) { - if (is_null($contentType)) { - throw new \InvalidArgumentException('non-nullable contentType cannot be null'); - } $this->container['contentType'] = $contentType; return $this; @@ -384,9 +378,6 @@ public function getFilename() */ public function setFilename($filename) { - if (is_null($filename)) { - throw new \InvalidArgumentException('non-nullable filename cannot be null'); - } $this->container['filename'] = $filename; return $this; @@ -411,9 +402,6 @@ public function getPageName() */ public function setPageName($pageName) { - if (is_null($pageName)) { - throw new \InvalidArgumentException('non-nullable pageName cannot be null'); - } $this->container['pageName'] = $pageName; return $this; @@ -438,9 +426,6 @@ public function getPageType() */ public function setPageType($pageType) { - if (is_null($pageType)) { - throw new \InvalidArgumentException('non-nullable pageType cannot be null'); - } $this->container['pageType'] = $pageType; return $this; diff --git a/src/Adyen/Model/LegalEntityManagement/BankAccountInfo.php b/src/Adyen/Model/LegalEntityManagement/BankAccountInfo.php index c7aaf2285..f5a727d32 100644 --- a/src/Adyen/Model/LegalEntityManagement/BankAccountInfo.php +++ b/src/Adyen/Model/LegalEntityManagement/BankAccountInfo.php @@ -323,9 +323,6 @@ public function getAccountIdentification() */ public function setAccountIdentification($accountIdentification) { - if (is_null($accountIdentification)) { - throw new \InvalidArgumentException('non-nullable accountIdentification cannot be null'); - } $this->container['accountIdentification'] = $accountIdentification; return $this; @@ -352,9 +349,6 @@ public function getAccountType() */ public function setAccountType($accountType) { - if (is_null($accountType)) { - throw new \InvalidArgumentException('non-nullable accountType cannot be null'); - } $this->container['accountType'] = $accountType; return $this; @@ -379,9 +373,6 @@ public function getBankName() */ public function setBankName($bankName) { - if (is_null($bankName)) { - throw new \InvalidArgumentException('non-nullable bankName cannot be null'); - } $this->container['bankName'] = $bankName; return $this; @@ -406,9 +397,6 @@ public function getCountryCode() */ public function setCountryCode($countryCode) { - if (is_null($countryCode)) { - throw new \InvalidArgumentException('non-nullable countryCode cannot be null'); - } $this->container['countryCode'] = $countryCode; return $this; @@ -433,9 +421,6 @@ public function getTrustedSource() */ public function setTrustedSource($trustedSource) { - if (is_null($trustedSource)) { - throw new \InvalidArgumentException('non-nullable trustedSource cannot be null'); - } $this->container['trustedSource'] = $trustedSource; return $this; diff --git a/src/Adyen/Model/LegalEntityManagement/BankAccountInfoAccountIdentification.php b/src/Adyen/Model/LegalEntityManagement/BankAccountInfoAccountIdentification.php index 5970b4547..f2a476fb3 100644 --- a/src/Adyen/Model/LegalEntityManagement/BankAccountInfoAccountIdentification.php +++ b/src/Adyen/Model/LegalEntityManagement/BankAccountInfoAccountIdentification.php @@ -424,9 +424,6 @@ public function getAccountNumber() */ public function setAccountNumber($accountNumber) { - if (is_null($accountNumber)) { - throw new \InvalidArgumentException('non-nullable accountNumber cannot be null'); - } $this->container['accountNumber'] = $accountNumber; return $this; @@ -451,9 +448,6 @@ public function getBsbCode() */ public function setBsbCode($bsbCode) { - if (is_null($bsbCode)) { - throw new \InvalidArgumentException('non-nullable bsbCode cannot be null'); - } $this->container['bsbCode'] = $bsbCode; return $this; @@ -478,9 +472,6 @@ public function getType() */ public function setType($type) { - if (is_null($type)) { - throw new \InvalidArgumentException('non-nullable type cannot be null'); - } $this->container['type'] = $type; return $this; @@ -505,9 +496,6 @@ public function getAccountType() */ public function setAccountType($accountType) { - if (is_null($accountType)) { - throw new \InvalidArgumentException('non-nullable accountType cannot be null'); - } $this->container['accountType'] = $accountType; return $this; @@ -532,9 +520,6 @@ public function getInstitutionNumber() */ public function setInstitutionNumber($institutionNumber) { - if (is_null($institutionNumber)) { - throw new \InvalidArgumentException('non-nullable institutionNumber cannot be null'); - } $this->container['institutionNumber'] = $institutionNumber; return $this; @@ -559,9 +544,6 @@ public function getTransitNumber() */ public function setTransitNumber($transitNumber) { - if (is_null($transitNumber)) { - throw new \InvalidArgumentException('non-nullable transitNumber cannot be null'); - } $this->container['transitNumber'] = $transitNumber; return $this; @@ -586,9 +568,6 @@ public function getBankCode() */ public function setBankCode($bankCode) { - if (is_null($bankCode)) { - throw new \InvalidArgumentException('non-nullable bankCode cannot be null'); - } $this->container['bankCode'] = $bankCode; return $this; @@ -613,9 +592,6 @@ public function getClearingCode() */ public function setClearingCode($clearingCode) { - if (is_null($clearingCode)) { - throw new \InvalidArgumentException('non-nullable clearingCode cannot be null'); - } $this->container['clearingCode'] = $clearingCode; return $this; @@ -640,9 +616,6 @@ public function getIban() */ public function setIban($iban) { - if (is_null($iban)) { - throw new \InvalidArgumentException('non-nullable iban cannot be null'); - } $this->container['iban'] = $iban; return $this; @@ -667,9 +640,6 @@ public function getAdditionalBankIdentification() */ public function setAdditionalBankIdentification($additionalBankIdentification) { - if (is_null($additionalBankIdentification)) { - throw new \InvalidArgumentException('non-nullable additionalBankIdentification cannot be null'); - } $this->container['additionalBankIdentification'] = $additionalBankIdentification; return $this; @@ -694,9 +664,6 @@ public function getBic() */ public function setBic($bic) { - if (is_null($bic)) { - throw new \InvalidArgumentException('non-nullable bic cannot be null'); - } $this->container['bic'] = $bic; return $this; @@ -721,9 +688,6 @@ public function getClearingNumber() */ public function setClearingNumber($clearingNumber) { - if (is_null($clearingNumber)) { - throw new \InvalidArgumentException('non-nullable clearingNumber cannot be null'); - } $this->container['clearingNumber'] = $clearingNumber; return $this; @@ -748,9 +712,6 @@ public function getSortCode() */ public function setSortCode($sortCode) { - if (is_null($sortCode)) { - throw new \InvalidArgumentException('non-nullable sortCode cannot be null'); - } $this->container['sortCode'] = $sortCode; return $this; @@ -775,9 +736,6 @@ public function getRoutingNumber() */ public function setRoutingNumber($routingNumber) { - if (is_null($routingNumber)) { - throw new \InvalidArgumentException('non-nullable routingNumber cannot be null'); - } $this->container['routingNumber'] = $routingNumber; return $this; diff --git a/src/Adyen/Model/LegalEntityManagement/BirthData.php b/src/Adyen/Model/LegalEntityManagement/BirthData.php index 2ea36e674..68834e828 100644 --- a/src/Adyen/Model/LegalEntityManagement/BirthData.php +++ b/src/Adyen/Model/LegalEntityManagement/BirthData.php @@ -295,9 +295,6 @@ public function getDateOfBirth() */ public function setDateOfBirth($dateOfBirth) { - if (is_null($dateOfBirth)) { - throw new \InvalidArgumentException('non-nullable dateOfBirth cannot be null'); - } $this->container['dateOfBirth'] = $dateOfBirth; return $this; diff --git a/src/Adyen/Model/LegalEntityManagement/BusinessLine.php b/src/Adyen/Model/LegalEntityManagement/BusinessLine.php index aa8b741ca..8491b4d79 100644 --- a/src/Adyen/Model/LegalEntityManagement/BusinessLine.php +++ b/src/Adyen/Model/LegalEntityManagement/BusinessLine.php @@ -420,9 +420,6 @@ public function getCapability() */ public function setCapability($capability) { - if (is_null($capability)) { - throw new \InvalidArgumentException('non-nullable capability cannot be null'); - } $allowedValues = $this->getCapabilityAllowableValues(); if (!in_array($capability, $allowedValues, true)) { throw new \InvalidArgumentException( @@ -457,9 +454,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -484,9 +478,6 @@ public function getIndustryCode() */ public function setIndustryCode($industryCode) { - if (is_null($industryCode)) { - throw new \InvalidArgumentException('non-nullable industryCode cannot be null'); - } $this->container['industryCode'] = $industryCode; return $this; @@ -511,9 +502,6 @@ public function getLegalEntityId() */ public function setLegalEntityId($legalEntityId) { - if (is_null($legalEntityId)) { - throw new \InvalidArgumentException('non-nullable legalEntityId cannot be null'); - } $this->container['legalEntityId'] = $legalEntityId; return $this; @@ -538,9 +526,6 @@ public function getProblems() */ public function setProblems($problems) { - if (is_null($problems)) { - throw new \InvalidArgumentException('non-nullable problems cannot be null'); - } $this->container['problems'] = $problems; return $this; @@ -565,9 +550,6 @@ public function getSalesChannels() */ public function setSalesChannels($salesChannels) { - if (is_null($salesChannels)) { - throw new \InvalidArgumentException('non-nullable salesChannels cannot be null'); - } $this->container['salesChannels'] = $salesChannels; return $this; @@ -592,9 +574,6 @@ public function getService() */ public function setService($service) { - if (is_null($service)) { - throw new \InvalidArgumentException('non-nullable service cannot be null'); - } $allowedValues = $this->getServiceAllowableValues(); if (!in_array($service, $allowedValues, true)) { throw new \InvalidArgumentException( @@ -629,9 +608,6 @@ public function getSourceOfFunds() */ public function setSourceOfFunds($sourceOfFunds) { - if (is_null($sourceOfFunds)) { - throw new \InvalidArgumentException('non-nullable sourceOfFunds cannot be null'); - } $this->container['sourceOfFunds'] = $sourceOfFunds; return $this; @@ -656,9 +632,6 @@ public function getWebData() */ public function setWebData($webData) { - if (is_null($webData)) { - throw new \InvalidArgumentException('non-nullable webData cannot be null'); - } $this->container['webData'] = $webData; return $this; @@ -683,9 +656,6 @@ public function getWebDataExemption() */ public function setWebDataExemption($webDataExemption) { - if (is_null($webDataExemption)) { - throw new \InvalidArgumentException('non-nullable webDataExemption cannot be null'); - } $this->container['webDataExemption'] = $webDataExemption; return $this; diff --git a/src/Adyen/Model/LegalEntityManagement/BusinessLineInfo.php b/src/Adyen/Model/LegalEntityManagement/BusinessLineInfo.php index d009b3bf1..6334b3ec5 100644 --- a/src/Adyen/Model/LegalEntityManagement/BusinessLineInfo.php +++ b/src/Adyen/Model/LegalEntityManagement/BusinessLineInfo.php @@ -403,9 +403,6 @@ public function getCapability() */ public function setCapability($capability) { - if (is_null($capability)) { - throw new \InvalidArgumentException('non-nullable capability cannot be null'); - } $allowedValues = $this->getCapabilityAllowableValues(); if (!in_array($capability, $allowedValues, true)) { throw new \InvalidArgumentException( @@ -440,9 +437,6 @@ public function getIndustryCode() */ public function setIndustryCode($industryCode) { - if (is_null($industryCode)) { - throw new \InvalidArgumentException('non-nullable industryCode cannot be null'); - } $this->container['industryCode'] = $industryCode; return $this; @@ -467,9 +461,6 @@ public function getLegalEntityId() */ public function setLegalEntityId($legalEntityId) { - if (is_null($legalEntityId)) { - throw new \InvalidArgumentException('non-nullable legalEntityId cannot be null'); - } $this->container['legalEntityId'] = $legalEntityId; return $this; @@ -494,9 +485,6 @@ public function getSalesChannels() */ public function setSalesChannels($salesChannels) { - if (is_null($salesChannels)) { - throw new \InvalidArgumentException('non-nullable salesChannels cannot be null'); - } $this->container['salesChannels'] = $salesChannels; return $this; @@ -521,9 +509,6 @@ public function getService() */ public function setService($service) { - if (is_null($service)) { - throw new \InvalidArgumentException('non-nullable service cannot be null'); - } $allowedValues = $this->getServiceAllowableValues(); if (!in_array($service, $allowedValues, true)) { throw new \InvalidArgumentException( @@ -558,9 +543,6 @@ public function getSourceOfFunds() */ public function setSourceOfFunds($sourceOfFunds) { - if (is_null($sourceOfFunds)) { - throw new \InvalidArgumentException('non-nullable sourceOfFunds cannot be null'); - } $this->container['sourceOfFunds'] = $sourceOfFunds; return $this; @@ -585,9 +567,6 @@ public function getWebData() */ public function setWebData($webData) { - if (is_null($webData)) { - throw new \InvalidArgumentException('non-nullable webData cannot be null'); - } $this->container['webData'] = $webData; return $this; @@ -612,9 +591,6 @@ public function getWebDataExemption() */ public function setWebDataExemption($webDataExemption) { - if (is_null($webDataExemption)) { - throw new \InvalidArgumentException('non-nullable webDataExemption cannot be null'); - } $this->container['webDataExemption'] = $webDataExemption; return $this; diff --git a/src/Adyen/Model/LegalEntityManagement/BusinessLineInfoUpdate.php b/src/Adyen/Model/LegalEntityManagement/BusinessLineInfoUpdate.php index 9229f0aae..9f0d83fe1 100644 --- a/src/Adyen/Model/LegalEntityManagement/BusinessLineInfoUpdate.php +++ b/src/Adyen/Model/LegalEntityManagement/BusinessLineInfoUpdate.php @@ -394,9 +394,6 @@ public function getCapability() */ public function setCapability($capability) { - if (is_null($capability)) { - throw new \InvalidArgumentException('non-nullable capability cannot be null'); - } $allowedValues = $this->getCapabilityAllowableValues(); if (!in_array($capability, $allowedValues, true)) { throw new \InvalidArgumentException( @@ -431,9 +428,6 @@ public function getIndustryCode() */ public function setIndustryCode($industryCode) { - if (is_null($industryCode)) { - throw new \InvalidArgumentException('non-nullable industryCode cannot be null'); - } $this->container['industryCode'] = $industryCode; return $this; @@ -458,9 +452,6 @@ public function getLegalEntityId() */ public function setLegalEntityId($legalEntityId) { - if (is_null($legalEntityId)) { - throw new \InvalidArgumentException('non-nullable legalEntityId cannot be null'); - } $this->container['legalEntityId'] = $legalEntityId; return $this; @@ -485,9 +476,6 @@ public function getSalesChannels() */ public function setSalesChannels($salesChannels) { - if (is_null($salesChannels)) { - throw new \InvalidArgumentException('non-nullable salesChannels cannot be null'); - } $this->container['salesChannels'] = $salesChannels; return $this; @@ -512,9 +500,6 @@ public function getService() */ public function setService($service) { - if (is_null($service)) { - throw new \InvalidArgumentException('non-nullable service cannot be null'); - } $allowedValues = $this->getServiceAllowableValues(); if (!in_array($service, $allowedValues, true)) { throw new \InvalidArgumentException( @@ -549,9 +534,6 @@ public function getSourceOfFunds() */ public function setSourceOfFunds($sourceOfFunds) { - if (is_null($sourceOfFunds)) { - throw new \InvalidArgumentException('non-nullable sourceOfFunds cannot be null'); - } $this->container['sourceOfFunds'] = $sourceOfFunds; return $this; @@ -576,9 +558,6 @@ public function getWebData() */ public function setWebData($webData) { - if (is_null($webData)) { - throw new \InvalidArgumentException('non-nullable webData cannot be null'); - } $this->container['webData'] = $webData; return $this; @@ -603,9 +582,6 @@ public function getWebDataExemption() */ public function setWebDataExemption($webDataExemption) { - if (is_null($webDataExemption)) { - throw new \InvalidArgumentException('non-nullable webDataExemption cannot be null'); - } $this->container['webDataExemption'] = $webDataExemption; return $this; diff --git a/src/Adyen/Model/LegalEntityManagement/BusinessLines.php b/src/Adyen/Model/LegalEntityManagement/BusinessLines.php index c01988ce2..350759364 100644 --- a/src/Adyen/Model/LegalEntityManagement/BusinessLines.php +++ b/src/Adyen/Model/LegalEntityManagement/BusinessLines.php @@ -298,9 +298,6 @@ public function getBusinessLines() */ public function setBusinessLines($businessLines) { - if (is_null($businessLines)) { - throw new \InvalidArgumentException('non-nullable businessLines cannot be null'); - } $this->container['businessLines'] = $businessLines; return $this; diff --git a/src/Adyen/Model/LegalEntityManagement/CALocalAccountIdentification.php b/src/Adyen/Model/LegalEntityManagement/CALocalAccountIdentification.php index 25e0be251..da4101fec 100644 --- a/src/Adyen/Model/LegalEntityManagement/CALocalAccountIdentification.php +++ b/src/Adyen/Model/LegalEntityManagement/CALocalAccountIdentification.php @@ -379,9 +379,6 @@ public function getAccountNumber() */ public function setAccountNumber($accountNumber) { - if (is_null($accountNumber)) { - throw new \InvalidArgumentException('non-nullable accountNumber cannot be null'); - } $this->container['accountNumber'] = $accountNumber; return $this; @@ -406,9 +403,6 @@ public function getAccountType() */ 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( @@ -443,9 +437,6 @@ public function getInstitutionNumber() */ public function setInstitutionNumber($institutionNumber) { - if (is_null($institutionNumber)) { - throw new \InvalidArgumentException('non-nullable institutionNumber cannot be null'); - } $this->container['institutionNumber'] = $institutionNumber; return $this; @@ -470,9 +461,6 @@ public function getTransitNumber() */ public function setTransitNumber($transitNumber) { - if (is_null($transitNumber)) { - throw new \InvalidArgumentException('non-nullable transitNumber cannot be null'); - } $this->container['transitNumber'] = $transitNumber; return $this; @@ -497,9 +485,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/LegalEntityManagement/CZLocalAccountIdentification.php b/src/Adyen/Model/LegalEntityManagement/CZLocalAccountIdentification.php index 2557e462f..a1df6f894 100644 --- a/src/Adyen/Model/LegalEntityManagement/CZLocalAccountIdentification.php +++ b/src/Adyen/Model/LegalEntityManagement/CZLocalAccountIdentification.php @@ -339,9 +339,6 @@ public function getAccountNumber() */ public function setAccountNumber($accountNumber) { - if (is_null($accountNumber)) { - throw new \InvalidArgumentException('non-nullable accountNumber cannot be null'); - } $this->container['accountNumber'] = $accountNumber; return $this; @@ -366,9 +363,6 @@ public function getBankCode() */ public function setBankCode($bankCode) { - if (is_null($bankCode)) { - throw new \InvalidArgumentException('non-nullable bankCode cannot be null'); - } $this->container['bankCode'] = $bankCode; return $this; @@ -393,9 +387,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/LegalEntityManagement/CalculateTermsOfServiceStatusResponse.php b/src/Adyen/Model/LegalEntityManagement/CalculateTermsOfServiceStatusResponse.php index 560f324df..58430085f 100644 --- a/src/Adyen/Model/LegalEntityManagement/CalculateTermsOfServiceStatusResponse.php +++ b/src/Adyen/Model/LegalEntityManagement/CalculateTermsOfServiceStatusResponse.php @@ -321,9 +321,6 @@ public function getTermsOfServiceTypes() */ public function setTermsOfServiceTypes($termsOfServiceTypes) { - if (is_null($termsOfServiceTypes)) { - throw new \InvalidArgumentException('non-nullable termsOfServiceTypes cannot be null'); - } $allowedValues = $this->getTermsOfServiceTypesAllowableValues(); if (array_diff($termsOfServiceTypes, $allowedValues)) { throw new \InvalidArgumentException( diff --git a/src/Adyen/Model/LegalEntityManagement/CapabilityProblem.php b/src/Adyen/Model/LegalEntityManagement/CapabilityProblem.php index 6e08ff224..e2c30cf2f 100644 --- a/src/Adyen/Model/LegalEntityManagement/CapabilityProblem.php +++ b/src/Adyen/Model/LegalEntityManagement/CapabilityProblem.php @@ -302,9 +302,6 @@ public function getEntity() */ public function setEntity($entity) { - if (is_null($entity)) { - throw new \InvalidArgumentException('non-nullable entity cannot be null'); - } $this->container['entity'] = $entity; return $this; @@ -329,9 +326,6 @@ public function getVerificationErrors() */ public function setVerificationErrors($verificationErrors) { - if (is_null($verificationErrors)) { - throw new \InvalidArgumentException('non-nullable verificationErrors cannot be null'); - } $this->container['verificationErrors'] = $verificationErrors; return $this; diff --git a/src/Adyen/Model/LegalEntityManagement/CapabilityProblemEntity.php b/src/Adyen/Model/LegalEntityManagement/CapabilityProblemEntity.php index fb072cfc4..9182a4a10 100644 --- a/src/Adyen/Model/LegalEntityManagement/CapabilityProblemEntity.php +++ b/src/Adyen/Model/LegalEntityManagement/CapabilityProblemEntity.php @@ -343,9 +343,6 @@ public function getDocuments() */ public function setDocuments($documents) { - if (is_null($documents)) { - throw new \InvalidArgumentException('non-nullable documents cannot be null'); - } $this->container['documents'] = $documents; return $this; @@ -370,9 +367,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -397,9 +391,6 @@ public function getOwner() */ public function setOwner($owner) { - if (is_null($owner)) { - throw new \InvalidArgumentException('non-nullable owner cannot be null'); - } $this->container['owner'] = $owner; return $this; @@ -424,9 +415,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/LegalEntityManagement/CapabilityProblemEntityRecursive.php b/src/Adyen/Model/LegalEntityManagement/CapabilityProblemEntityRecursive.php index d312109a0..1e74b01d1 100644 --- a/src/Adyen/Model/LegalEntityManagement/CapabilityProblemEntityRecursive.php +++ b/src/Adyen/Model/LegalEntityManagement/CapabilityProblemEntityRecursive.php @@ -336,9 +336,6 @@ public function getDocuments() */ public function setDocuments($documents) { - if (is_null($documents)) { - throw new \InvalidArgumentException('non-nullable documents cannot be null'); - } $this->container['documents'] = $documents; return $this; @@ -363,9 +360,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -390,9 +384,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/LegalEntityManagement/CapabilitySettings.php b/src/Adyen/Model/LegalEntityManagement/CapabilitySettings.php index a4b601ae7..673ee6109 100644 --- a/src/Adyen/Model/LegalEntityManagement/CapabilitySettings.php +++ b/src/Adyen/Model/LegalEntityManagement/CapabilitySettings.php @@ -364,9 +364,6 @@ public function getAmountPerIndustry() */ public function setAmountPerIndustry($amountPerIndustry) { - if (is_null($amountPerIndustry)) { - throw new \InvalidArgumentException('non-nullable amountPerIndustry cannot be null'); - } $this->container['amountPerIndustry'] = $amountPerIndustry; return $this; @@ -391,9 +388,6 @@ public function getAuthorizedCardUsers() */ public function setAuthorizedCardUsers($authorizedCardUsers) { - if (is_null($authorizedCardUsers)) { - throw new \InvalidArgumentException('non-nullable authorizedCardUsers cannot be null'); - } $this->container['authorizedCardUsers'] = $authorizedCardUsers; return $this; @@ -418,9 +412,6 @@ public function getFundingSource() */ 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( @@ -454,9 +445,6 @@ public function getInterval() */ 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( @@ -491,9 +479,6 @@ public function getMaxAmount() */ public function setMaxAmount($maxAmount) { - if (is_null($maxAmount)) { - throw new \InvalidArgumentException('non-nullable maxAmount cannot be null'); - } $this->container['maxAmount'] = $maxAmount; return $this; diff --git a/src/Adyen/Model/LegalEntityManagement/DKLocalAccountIdentification.php b/src/Adyen/Model/LegalEntityManagement/DKLocalAccountIdentification.php index cb9af917c..79049e88a 100644 --- a/src/Adyen/Model/LegalEntityManagement/DKLocalAccountIdentification.php +++ b/src/Adyen/Model/LegalEntityManagement/DKLocalAccountIdentification.php @@ -339,9 +339,6 @@ public function getAccountNumber() */ public function setAccountNumber($accountNumber) { - if (is_null($accountNumber)) { - throw new \InvalidArgumentException('non-nullable accountNumber cannot be null'); - } $this->container['accountNumber'] = $accountNumber; return $this; @@ -366,9 +363,6 @@ public function getBankCode() */ public function setBankCode($bankCode) { - if (is_null($bankCode)) { - throw new \InvalidArgumentException('non-nullable bankCode cannot be null'); - } $this->container['bankCode'] = $bankCode; return $this; @@ -393,9 +387,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/LegalEntityManagement/DataReviewConfirmationResponse.php b/src/Adyen/Model/LegalEntityManagement/DataReviewConfirmationResponse.php index 56e2daf46..acef3aacd 100644 --- a/src/Adyen/Model/LegalEntityManagement/DataReviewConfirmationResponse.php +++ b/src/Adyen/Model/LegalEntityManagement/DataReviewConfirmationResponse.php @@ -295,9 +295,6 @@ public function getDataReviewedAt() */ public function setDataReviewedAt($dataReviewedAt) { - if (is_null($dataReviewedAt)) { - throw new \InvalidArgumentException('non-nullable dataReviewedAt cannot be null'); - } $this->container['dataReviewedAt'] = $dataReviewedAt; return $this; diff --git a/src/Adyen/Model/LegalEntityManagement/Document.php b/src/Adyen/Model/LegalEntityManagement/Document.php index 982c53960..3de4d3b27 100644 --- a/src/Adyen/Model/LegalEntityManagement/Document.php +++ b/src/Adyen/Model/LegalEntityManagement/Document.php @@ -440,9 +440,6 @@ public function getAttachment() */ public function setAttachment($attachment) { - if (is_null($attachment)) { - throw new \InvalidArgumentException('non-nullable attachment cannot be null'); - } $this->container['attachment'] = $attachment; return $this; @@ -467,9 +464,6 @@ public function getAttachments() */ public function setAttachments($attachments) { - if (is_null($attachments)) { - throw new \InvalidArgumentException('non-nullable attachments cannot be null'); - } $this->container['attachments'] = $attachments; return $this; @@ -494,9 +488,6 @@ public function getCreationDate() */ public function setCreationDate($creationDate) { - if (is_null($creationDate)) { - throw new \InvalidArgumentException('non-nullable creationDate cannot be null'); - } $this->container['creationDate'] = $creationDate; return $this; @@ -521,9 +512,6 @@ public function getDescription() */ public function setDescription($description) { - if (is_null($description)) { - throw new \InvalidArgumentException('non-nullable description cannot be null'); - } $this->container['description'] = $description; return $this; @@ -550,9 +538,6 @@ public function getExpiryDate() */ public function setExpiryDate($expiryDate) { - if (is_null($expiryDate)) { - throw new \InvalidArgumentException('non-nullable expiryDate cannot be null'); - } $this->container['expiryDate'] = $expiryDate; return $this; @@ -577,9 +562,6 @@ public function getFileName() */ public function setFileName($fileName) { - if (is_null($fileName)) { - throw new \InvalidArgumentException('non-nullable fileName cannot be null'); - } $this->container['fileName'] = $fileName; return $this; @@ -604,9 +586,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -633,9 +612,6 @@ public function getIssuerCountry() */ public function setIssuerCountry($issuerCountry) { - if (is_null($issuerCountry)) { - throw new \InvalidArgumentException('non-nullable issuerCountry cannot be null'); - } $this->container['issuerCountry'] = $issuerCountry; return $this; @@ -662,9 +638,6 @@ public function getIssuerState() */ public function setIssuerState($issuerState) { - if (is_null($issuerState)) { - throw new \InvalidArgumentException('non-nullable issuerState cannot be null'); - } $this->container['issuerState'] = $issuerState; return $this; @@ -689,9 +662,6 @@ public function getModificationDate() */ public function setModificationDate($modificationDate) { - if (is_null($modificationDate)) { - throw new \InvalidArgumentException('non-nullable modificationDate cannot be null'); - } $this->container['modificationDate'] = $modificationDate; return $this; @@ -716,9 +686,6 @@ public function getNumber() */ public function setNumber($number) { - if (is_null($number)) { - throw new \InvalidArgumentException('non-nullable number cannot be null'); - } $this->container['number'] = $number; return $this; @@ -743,9 +710,6 @@ public function getOwner() */ public function setOwner($owner) { - if (is_null($owner)) { - throw new \InvalidArgumentException('non-nullable owner cannot be null'); - } $this->container['owner'] = $owner; return $this; @@ -770,9 +734,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/LegalEntityManagement/DocumentPage.php b/src/Adyen/Model/LegalEntityManagement/DocumentPage.php index c4cf5ea97..508f9dca6 100644 --- a/src/Adyen/Model/LegalEntityManagement/DocumentPage.php +++ b/src/Adyen/Model/LegalEntityManagement/DocumentPage.php @@ -334,9 +334,6 @@ public function getPageName() */ public function setPageName($pageName) { - if (is_null($pageName)) { - throw new \InvalidArgumentException('non-nullable pageName cannot be null'); - } $this->container['pageName'] = $pageName; return $this; @@ -361,7 +358,6 @@ public function getPageNumber() */ public function setPageNumber($pageNumber) { - // Do nothing for nullable integers $this->container['pageNumber'] = $pageNumber; return $this; @@ -386,9 +382,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/LegalEntityManagement/DocumentReference.php b/src/Adyen/Model/LegalEntityManagement/DocumentReference.php index aa723279c..d8a0af9f2 100644 --- a/src/Adyen/Model/LegalEntityManagement/DocumentReference.php +++ b/src/Adyen/Model/LegalEntityManagement/DocumentReference.php @@ -337,9 +337,6 @@ public function getActive() */ public function setActive($active) { - if (is_null($active)) { - throw new \InvalidArgumentException('non-nullable active cannot be null'); - } $this->container['active'] = $active; return $this; @@ -364,9 +361,6 @@ public function getDescription() */ public function setDescription($description) { - if (is_null($description)) { - throw new \InvalidArgumentException('non-nullable description cannot be null'); - } $this->container['description'] = $description; return $this; @@ -391,9 +385,6 @@ public function getFileName() */ public function setFileName($fileName) { - if (is_null($fileName)) { - throw new \InvalidArgumentException('non-nullable fileName cannot be null'); - } $this->container['fileName'] = $fileName; return $this; @@ -418,9 +409,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -445,9 +433,6 @@ public function getModificationDate() */ public function setModificationDate($modificationDate) { - if (is_null($modificationDate)) { - throw new \InvalidArgumentException('non-nullable modificationDate cannot be null'); - } $this->container['modificationDate'] = $modificationDate; return $this; @@ -472,9 +457,6 @@ public function getPages() */ public function setPages($pages) { - if (is_null($pages)) { - throw new \InvalidArgumentException('non-nullable pages cannot be null'); - } $this->container['pages'] = $pages; return $this; @@ -499,9 +481,6 @@ public function getType() */ public function setType($type) { - if (is_null($type)) { - throw new \InvalidArgumentException('non-nullable type cannot be null'); - } $this->container['type'] = $type; return $this; diff --git a/src/Adyen/Model/LegalEntityManagement/EntityReference.php b/src/Adyen/Model/LegalEntityManagement/EntityReference.php index 10c7f659d..a5bc4cefa 100644 --- a/src/Adyen/Model/LegalEntityManagement/EntityReference.php +++ b/src/Adyen/Model/LegalEntityManagement/EntityReference.php @@ -295,9 +295,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; diff --git a/src/Adyen/Model/LegalEntityManagement/GeneratePciDescriptionRequest.php b/src/Adyen/Model/LegalEntityManagement/GeneratePciDescriptionRequest.php index c02cc4a4e..e55d97a34 100644 --- a/src/Adyen/Model/LegalEntityManagement/GeneratePciDescriptionRequest.php +++ b/src/Adyen/Model/LegalEntityManagement/GeneratePciDescriptionRequest.php @@ -320,9 +320,6 @@ public function getAdditionalSalesChannels() */ public function setAdditionalSalesChannels($additionalSalesChannels) { - if (is_null($additionalSalesChannels)) { - throw new \InvalidArgumentException('non-nullable additionalSalesChannels cannot be null'); - } $allowedValues = $this->getAdditionalSalesChannelsAllowableValues(); if (array_diff($additionalSalesChannels, $allowedValues)) { throw new \InvalidArgumentException( @@ -356,9 +353,6 @@ public function getLanguage() */ public function setLanguage($language) { - if (is_null($language)) { - throw new \InvalidArgumentException('non-nullable language cannot be null'); - } $this->container['language'] = $language; return $this; diff --git a/src/Adyen/Model/LegalEntityManagement/GeneratePciDescriptionResponse.php b/src/Adyen/Model/LegalEntityManagement/GeneratePciDescriptionResponse.php index 8ffcd2f67..c17a519ba 100644 --- a/src/Adyen/Model/LegalEntityManagement/GeneratePciDescriptionResponse.php +++ b/src/Adyen/Model/LegalEntityManagement/GeneratePciDescriptionResponse.php @@ -309,9 +309,6 @@ public function getContent() */ public function setContent($content) { - if (is_null($content)) { - throw new \InvalidArgumentException('non-nullable content cannot be null'); - } $this->container['content'] = $content; return $this; @@ -336,9 +333,6 @@ public function getLanguage() */ public function setLanguage($language) { - if (is_null($language)) { - throw new \InvalidArgumentException('non-nullable language cannot be null'); - } $this->container['language'] = $language; return $this; @@ -363,9 +357,6 @@ public function getPciTemplateReferences() */ public function setPciTemplateReferences($pciTemplateReferences) { - if (is_null($pciTemplateReferences)) { - throw new \InvalidArgumentException('non-nullable pciTemplateReferences cannot be null'); - } $this->container['pciTemplateReferences'] = $pciTemplateReferences; return $this; diff --git a/src/Adyen/Model/LegalEntityManagement/GetPciQuestionnaireInfosResponse.php b/src/Adyen/Model/LegalEntityManagement/GetPciQuestionnaireInfosResponse.php index d04331515..2875d01f8 100644 --- a/src/Adyen/Model/LegalEntityManagement/GetPciQuestionnaireInfosResponse.php +++ b/src/Adyen/Model/LegalEntityManagement/GetPciQuestionnaireInfosResponse.php @@ -295,9 +295,6 @@ public function getData() */ public function setData($data) { - if (is_null($data)) { - throw new \InvalidArgumentException('non-nullable data cannot be null'); - } $this->container['data'] = $data; return $this; diff --git a/src/Adyen/Model/LegalEntityManagement/GetPciQuestionnaireResponse.php b/src/Adyen/Model/LegalEntityManagement/GetPciQuestionnaireResponse.php index 7b85e1cff..10e979157 100644 --- a/src/Adyen/Model/LegalEntityManagement/GetPciQuestionnaireResponse.php +++ b/src/Adyen/Model/LegalEntityManagement/GetPciQuestionnaireResponse.php @@ -316,9 +316,6 @@ public function getContent() */ public function setContent($content) { - if (is_null($content)) { - throw new \InvalidArgumentException('non-nullable content cannot be null'); - } $this->container['content'] = $content; return $this; @@ -343,9 +340,6 @@ public function getCreatedAt() */ public function setCreatedAt($createdAt) { - if (is_null($createdAt)) { - throw new \InvalidArgumentException('non-nullable createdAt cannot be null'); - } $this->container['createdAt'] = $createdAt; return $this; @@ -370,9 +364,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -397,9 +388,6 @@ public function getValidUntil() */ public function setValidUntil($validUntil) { - if (is_null($validUntil)) { - throw new \InvalidArgumentException('non-nullable validUntil cannot be null'); - } $this->container['validUntil'] = $validUntil; return $this; diff --git a/src/Adyen/Model/LegalEntityManagement/GetTermsOfServiceAcceptanceInfosResponse.php b/src/Adyen/Model/LegalEntityManagement/GetTermsOfServiceAcceptanceInfosResponse.php index bd773de3d..48aec665a 100644 --- a/src/Adyen/Model/LegalEntityManagement/GetTermsOfServiceAcceptanceInfosResponse.php +++ b/src/Adyen/Model/LegalEntityManagement/GetTermsOfServiceAcceptanceInfosResponse.php @@ -295,9 +295,6 @@ public function getData() */ public function setData($data) { - if (is_null($data)) { - throw new \InvalidArgumentException('non-nullable data cannot be null'); - } $this->container['data'] = $data; return $this; diff --git a/src/Adyen/Model/LegalEntityManagement/GetTermsOfServiceDocumentRequest.php b/src/Adyen/Model/LegalEntityManagement/GetTermsOfServiceDocumentRequest.php index 2b6585786..9cf9151fd 100644 --- a/src/Adyen/Model/LegalEntityManagement/GetTermsOfServiceDocumentRequest.php +++ b/src/Adyen/Model/LegalEntityManagement/GetTermsOfServiceDocumentRequest.php @@ -343,9 +343,6 @@ public function getLanguage() */ public function setLanguage($language) { - if (is_null($language)) { - throw new \InvalidArgumentException('non-nullable language cannot be null'); - } $this->container['language'] = $language; return $this; @@ -370,9 +367,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/LegalEntityManagement/GetTermsOfServiceDocumentResponse.php b/src/Adyen/Model/LegalEntityManagement/GetTermsOfServiceDocumentResponse.php index 2f6ede910..504e3a725 100644 --- a/src/Adyen/Model/LegalEntityManagement/GetTermsOfServiceDocumentResponse.php +++ b/src/Adyen/Model/LegalEntityManagement/GetTermsOfServiceDocumentResponse.php @@ -358,9 +358,6 @@ public function getDocument() */ public function setDocument($document) { - if (is_null($document)) { - throw new \InvalidArgumentException('non-nullable document cannot be null'); - } $this->container['document'] = $document; return $this; @@ -385,9 +382,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -412,9 +406,6 @@ public function getLanguage() */ public function setLanguage($language) { - if (is_null($language)) { - throw new \InvalidArgumentException('non-nullable language cannot be null'); - } $this->container['language'] = $language; return $this; @@ -439,9 +430,6 @@ public function getTermsOfServiceDocumentId() */ public function setTermsOfServiceDocumentId($termsOfServiceDocumentId) { - if (is_null($termsOfServiceDocumentId)) { - throw new \InvalidArgumentException('non-nullable termsOfServiceDocumentId cannot be null'); - } $this->container['termsOfServiceDocumentId'] = $termsOfServiceDocumentId; return $this; @@ -466,9 +454,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/LegalEntityManagement/HKLocalAccountIdentification.php b/src/Adyen/Model/LegalEntityManagement/HKLocalAccountIdentification.php index e3e770710..7be36c68b 100644 --- a/src/Adyen/Model/LegalEntityManagement/HKLocalAccountIdentification.php +++ b/src/Adyen/Model/LegalEntityManagement/HKLocalAccountIdentification.php @@ -339,9 +339,6 @@ public function getAccountNumber() */ public function setAccountNumber($accountNumber) { - if (is_null($accountNumber)) { - throw new \InvalidArgumentException('non-nullable accountNumber cannot be null'); - } $this->container['accountNumber'] = $accountNumber; return $this; @@ -366,9 +363,6 @@ public function getClearingCode() */ public function setClearingCode($clearingCode) { - if (is_null($clearingCode)) { - throw new \InvalidArgumentException('non-nullable clearingCode cannot be null'); - } $this->container['clearingCode'] = $clearingCode; return $this; @@ -393,9 +387,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/LegalEntityManagement/HULocalAccountIdentification.php b/src/Adyen/Model/LegalEntityManagement/HULocalAccountIdentification.php index 6212e3566..916bb722a 100644 --- a/src/Adyen/Model/LegalEntityManagement/HULocalAccountIdentification.php +++ b/src/Adyen/Model/LegalEntityManagement/HULocalAccountIdentification.php @@ -329,9 +329,6 @@ public function getAccountNumber() */ public function setAccountNumber($accountNumber) { - if (is_null($accountNumber)) { - throw new \InvalidArgumentException('non-nullable accountNumber cannot be null'); - } $this->container['accountNumber'] = $accountNumber; return $this; @@ -356,9 +353,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/LegalEntityManagement/IbanAccountIdentification.php b/src/Adyen/Model/LegalEntityManagement/IbanAccountIdentification.php index 368779a23..b1f4e50a5 100644 --- a/src/Adyen/Model/LegalEntityManagement/IbanAccountIdentification.php +++ b/src/Adyen/Model/LegalEntityManagement/IbanAccountIdentification.php @@ -329,9 +329,6 @@ public function getIban() */ public function setIban($iban) { - if (is_null($iban)) { - throw new \InvalidArgumentException('non-nullable iban cannot be null'); - } $this->container['iban'] = $iban; return $this; @@ -356,9 +353,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/LegalEntityManagement/IdentificationData.php b/src/Adyen/Model/LegalEntityManagement/IdentificationData.php index 8ae919fde..70d0c298f 100644 --- a/src/Adyen/Model/LegalEntityManagement/IdentificationData.php +++ b/src/Adyen/Model/LegalEntityManagement/IdentificationData.php @@ -367,9 +367,6 @@ public function getCardNumber() */ public function setCardNumber($cardNumber) { - if (is_null($cardNumber)) { - throw new \InvalidArgumentException('non-nullable cardNumber cannot be null'); - } $this->container['cardNumber'] = $cardNumber; return $this; @@ -394,9 +391,6 @@ public function getExpiryDate() */ public function setExpiryDate($expiryDate) { - if (is_null($expiryDate)) { - throw new \InvalidArgumentException('non-nullable expiryDate cannot be null'); - } $this->container['expiryDate'] = $expiryDate; return $this; @@ -423,9 +417,6 @@ public function getIssuerCountry() */ public function setIssuerCountry($issuerCountry) { - if (is_null($issuerCountry)) { - throw new \InvalidArgumentException('non-nullable issuerCountry cannot be null'); - } $this->container['issuerCountry'] = $issuerCountry; return $this; @@ -450,9 +441,6 @@ public function getIssuerState() */ public function setIssuerState($issuerState) { - if (is_null($issuerState)) { - throw new \InvalidArgumentException('non-nullable issuerState cannot be null'); - } $this->container['issuerState'] = $issuerState; return $this; @@ -477,9 +465,6 @@ public function getNationalIdExempt() */ public function setNationalIdExempt($nationalIdExempt) { - if (is_null($nationalIdExempt)) { - throw new \InvalidArgumentException('non-nullable nationalIdExempt cannot be null'); - } $this->container['nationalIdExempt'] = $nationalIdExempt; return $this; @@ -504,9 +489,6 @@ public function getNumber() */ public function setNumber($number) { - if (is_null($number)) { - throw new \InvalidArgumentException('non-nullable number cannot be null'); - } $this->container['number'] = $number; return $this; @@ -531,9 +513,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/LegalEntityManagement/Individual.php b/src/Adyen/Model/LegalEntityManagement/Individual.php index 219960f33..6a80a3d1c 100644 --- a/src/Adyen/Model/LegalEntityManagement/Individual.php +++ b/src/Adyen/Model/LegalEntityManagement/Individual.php @@ -357,9 +357,6 @@ public function getBirthData() */ public function setBirthData($birthData) { - if (is_null($birthData)) { - throw new \InvalidArgumentException('non-nullable birthData cannot be null'); - } $this->container['birthData'] = $birthData; return $this; @@ -384,9 +381,6 @@ public function getEmail() */ public function setEmail($email) { - if (is_null($email)) { - throw new \InvalidArgumentException('non-nullable email cannot be null'); - } $this->container['email'] = $email; return $this; @@ -411,9 +405,6 @@ public function getIdentificationData() */ public function setIdentificationData($identificationData) { - if (is_null($identificationData)) { - throw new \InvalidArgumentException('non-nullable identificationData cannot be null'); - } $this->container['identificationData'] = $identificationData; return $this; @@ -438,9 +429,6 @@ public function getName() */ public function setName($name) { - if (is_null($name)) { - throw new \InvalidArgumentException('non-nullable name cannot be null'); - } $this->container['name'] = $name; return $this; @@ -465,9 +453,6 @@ public function getNationality() */ public function setNationality($nationality) { - if (is_null($nationality)) { - throw new \InvalidArgumentException('non-nullable nationality cannot be null'); - } $this->container['nationality'] = $nationality; return $this; @@ -492,9 +477,6 @@ public function getPhone() */ public function setPhone($phone) { - if (is_null($phone)) { - throw new \InvalidArgumentException('non-nullable phone cannot be null'); - } $this->container['phone'] = $phone; return $this; @@ -519,9 +501,6 @@ public function getResidentialAddress() */ public function setResidentialAddress($residentialAddress) { - if (is_null($residentialAddress)) { - throw new \InvalidArgumentException('non-nullable residentialAddress cannot be null'); - } $this->container['residentialAddress'] = $residentialAddress; return $this; @@ -546,9 +525,6 @@ public function getTaxInformation() */ public function setTaxInformation($taxInformation) { - if (is_null($taxInformation)) { - throw new \InvalidArgumentException('non-nullable taxInformation cannot be null'); - } $this->container['taxInformation'] = $taxInformation; return $this; @@ -573,9 +549,6 @@ public function getWebData() */ public function setWebData($webData) { - if (is_null($webData)) { - throw new \InvalidArgumentException('non-nullable webData cannot be null'); - } $this->container['webData'] = $webData; return $this; diff --git a/src/Adyen/Model/LegalEntityManagement/LegalEntity.php b/src/Adyen/Model/LegalEntityManagement/LegalEntity.php index fbf06ad43..ccd961301 100644 --- a/src/Adyen/Model/LegalEntityManagement/LegalEntity.php +++ b/src/Adyen/Model/LegalEntityManagement/LegalEntity.php @@ -425,9 +425,6 @@ public function getCapabilities() */ public function setCapabilities($capabilities) { - if (is_null($capabilities)) { - throw new \InvalidArgumentException('non-nullable capabilities cannot be null'); - } $this->container['capabilities'] = $capabilities; return $this; @@ -452,9 +449,6 @@ public function getDocumentDetails() */ public function setDocumentDetails($documentDetails) { - if (is_null($documentDetails)) { - throw new \InvalidArgumentException('non-nullable documentDetails cannot be null'); - } $this->container['documentDetails'] = $documentDetails; return $this; @@ -481,9 +475,6 @@ public function getDocuments() */ public function setDocuments($documents) { - if (is_null($documents)) { - throw new \InvalidArgumentException('non-nullable documents cannot be null'); - } $this->container['documents'] = $documents; return $this; @@ -508,9 +499,6 @@ public function getEntityAssociations() */ public function setEntityAssociations($entityAssociations) { - if (is_null($entityAssociations)) { - throw new \InvalidArgumentException('non-nullable entityAssociations cannot be null'); - } $this->container['entityAssociations'] = $entityAssociations; return $this; @@ -535,9 +523,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -562,9 +547,6 @@ public function getIndividual() */ public function setIndividual($individual) { - if (is_null($individual)) { - throw new \InvalidArgumentException('non-nullable individual cannot be null'); - } $this->container['individual'] = $individual; return $this; @@ -589,9 +571,6 @@ public function getOrganization() */ public function setOrganization($organization) { - if (is_null($organization)) { - throw new \InvalidArgumentException('non-nullable organization cannot be null'); - } $this->container['organization'] = $organization; return $this; @@ -616,9 +595,6 @@ public function getProblems() */ public function setProblems($problems) { - if (is_null($problems)) { - throw new \InvalidArgumentException('non-nullable problems cannot be null'); - } $this->container['problems'] = $problems; return $this; @@ -643,9 +619,6 @@ public function getReference() */ public function setReference($reference) { - if (is_null($reference)) { - throw new \InvalidArgumentException('non-nullable reference cannot be null'); - } $this->container['reference'] = $reference; return $this; @@ -670,9 +643,6 @@ public function getSoleProprietorship() */ public function setSoleProprietorship($soleProprietorship) { - if (is_null($soleProprietorship)) { - throw new \InvalidArgumentException('non-nullable soleProprietorship cannot be null'); - } $this->container['soleProprietorship'] = $soleProprietorship; return $this; @@ -697,9 +667,6 @@ public function getTransferInstruments() */ public function setTransferInstruments($transferInstruments) { - if (is_null($transferInstruments)) { - throw new \InvalidArgumentException('non-nullable transferInstruments cannot be null'); - } $this->container['transferInstruments'] = $transferInstruments; return $this; @@ -724,9 +691,6 @@ public function getTrust() */ public function setTrust($trust) { - if (is_null($trust)) { - throw new \InvalidArgumentException('non-nullable trust cannot be null'); - } $this->container['trust'] = $trust; return $this; @@ -751,9 +715,6 @@ public function getType() */ 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( @@ -788,9 +749,6 @@ public function getVerificationDeadlines() */ public function setVerificationDeadlines($verificationDeadlines) { - if (is_null($verificationDeadlines)) { - throw new \InvalidArgumentException('non-nullable verificationDeadlines cannot be null'); - } $this->container['verificationDeadlines'] = $verificationDeadlines; return $this; @@ -815,9 +773,6 @@ public function getVerificationPlan() */ public function setVerificationPlan($verificationPlan) { - if (is_null($verificationPlan)) { - throw new \InvalidArgumentException('non-nullable verificationPlan cannot be null'); - } $this->container['verificationPlan'] = $verificationPlan; return $this; diff --git a/src/Adyen/Model/LegalEntityManagement/LegalEntityAssociation.php b/src/Adyen/Model/LegalEntityManagement/LegalEntityAssociation.php index cb1bf1e8a..a74414730 100644 --- a/src/Adyen/Model/LegalEntityManagement/LegalEntityAssociation.php +++ b/src/Adyen/Model/LegalEntityManagement/LegalEntityAssociation.php @@ -392,9 +392,6 @@ public function getAssociatorId() */ public function setAssociatorId($associatorId) { - if (is_null($associatorId)) { - throw new \InvalidArgumentException('non-nullable associatorId cannot be null'); - } $this->container['associatorId'] = $associatorId; return $this; @@ -419,9 +416,6 @@ public function getEntityType() */ public function setEntityType($entityType) { - if (is_null($entityType)) { - throw new \InvalidArgumentException('non-nullable entityType cannot be null'); - } $this->container['entityType'] = $entityType; return $this; @@ -446,9 +440,6 @@ public function getJobTitle() */ public function setJobTitle($jobTitle) { - if (is_null($jobTitle)) { - throw new \InvalidArgumentException('non-nullable jobTitle cannot be null'); - } $this->container['jobTitle'] = $jobTitle; return $this; @@ -473,9 +464,6 @@ public function getLegalEntityId() */ public function setLegalEntityId($legalEntityId) { - if (is_null($legalEntityId)) { - throw new \InvalidArgumentException('non-nullable legalEntityId cannot be null'); - } $this->container['legalEntityId'] = $legalEntityId; return $this; @@ -500,9 +488,6 @@ public function getName() */ public function setName($name) { - if (is_null($name)) { - throw new \InvalidArgumentException('non-nullable name cannot be null'); - } $this->container['name'] = $name; return $this; @@ -527,9 +512,6 @@ public function getSettlorExemptionReason() */ public function setSettlorExemptionReason($settlorExemptionReason) { - if (is_null($settlorExemptionReason)) { - throw new \InvalidArgumentException('non-nullable settlorExemptionReason cannot be null'); - } $this->container['settlorExemptionReason'] = $settlorExemptionReason; return $this; @@ -554,9 +536,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/LegalEntityManagement/LegalEntityCapability.php b/src/Adyen/Model/LegalEntityManagement/LegalEntityCapability.php index 446a56dff..b0aca4f19 100644 --- a/src/Adyen/Model/LegalEntityManagement/LegalEntityCapability.php +++ b/src/Adyen/Model/LegalEntityManagement/LegalEntityCapability.php @@ -398,9 +398,6 @@ public function getAllowed() */ public function setAllowed($allowed) { - if (is_null($allowed)) { - throw new \InvalidArgumentException('non-nullable allowed cannot be null'); - } $this->container['allowed'] = $allowed; return $this; @@ -425,9 +422,6 @@ public function getAllowedLevel() */ 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( @@ -462,9 +456,6 @@ public function getAllowedSettings() */ public function setAllowedSettings($allowedSettings) { - if (is_null($allowedSettings)) { - throw new \InvalidArgumentException('non-nullable allowedSettings cannot be null'); - } $this->container['allowedSettings'] = $allowedSettings; return $this; @@ -489,9 +480,6 @@ public function getRequested() */ public function setRequested($requested) { - if (is_null($requested)) { - throw new \InvalidArgumentException('non-nullable requested cannot be null'); - } $this->container['requested'] = $requested; return $this; @@ -516,9 +504,6 @@ public function getRequestedLevel() */ 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( @@ -553,9 +538,6 @@ public function getRequestedSettings() */ public function setRequestedSettings($requestedSettings) { - if (is_null($requestedSettings)) { - throw new \InvalidArgumentException('non-nullable requestedSettings cannot be null'); - } $this->container['requestedSettings'] = $requestedSettings; return $this; @@ -580,9 +562,6 @@ public function getTransferInstruments() */ public function setTransferInstruments($transferInstruments) { - if (is_null($transferInstruments)) { - throw new \InvalidArgumentException('non-nullable transferInstruments cannot be null'); - } $this->container['transferInstruments'] = $transferInstruments; return $this; @@ -607,9 +586,6 @@ public function getVerificationStatus() */ public function setVerificationStatus($verificationStatus) { - if (is_null($verificationStatus)) { - throw new \InvalidArgumentException('non-nullable verificationStatus cannot be null'); - } $this->container['verificationStatus'] = $verificationStatus; return $this; diff --git a/src/Adyen/Model/LegalEntityManagement/LegalEntityInfo.php b/src/Adyen/Model/LegalEntityManagement/LegalEntityInfo.php index 6bc826e6e..618224dbd 100644 --- a/src/Adyen/Model/LegalEntityManagement/LegalEntityInfo.php +++ b/src/Adyen/Model/LegalEntityManagement/LegalEntityInfo.php @@ -380,9 +380,6 @@ public function getCapabilities() */ public function setCapabilities($capabilities) { - if (is_null($capabilities)) { - throw new \InvalidArgumentException('non-nullable capabilities cannot be null'); - } $this->container['capabilities'] = $capabilities; return $this; @@ -407,9 +404,6 @@ public function getEntityAssociations() */ public function setEntityAssociations($entityAssociations) { - if (is_null($entityAssociations)) { - throw new \InvalidArgumentException('non-nullable entityAssociations cannot be null'); - } $this->container['entityAssociations'] = $entityAssociations; return $this; @@ -434,9 +428,6 @@ public function getIndividual() */ public function setIndividual($individual) { - if (is_null($individual)) { - throw new \InvalidArgumentException('non-nullable individual cannot be null'); - } $this->container['individual'] = $individual; return $this; @@ -461,9 +452,6 @@ public function getOrganization() */ public function setOrganization($organization) { - if (is_null($organization)) { - throw new \InvalidArgumentException('non-nullable organization cannot be null'); - } $this->container['organization'] = $organization; return $this; @@ -488,9 +476,6 @@ public function getReference() */ public function setReference($reference) { - if (is_null($reference)) { - throw new \InvalidArgumentException('non-nullable reference cannot be null'); - } $this->container['reference'] = $reference; return $this; @@ -515,9 +500,6 @@ public function getSoleProprietorship() */ public function setSoleProprietorship($soleProprietorship) { - if (is_null($soleProprietorship)) { - throw new \InvalidArgumentException('non-nullable soleProprietorship cannot be null'); - } $this->container['soleProprietorship'] = $soleProprietorship; return $this; @@ -542,9 +524,6 @@ public function getTrust() */ public function setTrust($trust) { - if (is_null($trust)) { - throw new \InvalidArgumentException('non-nullable trust cannot be null'); - } $this->container['trust'] = $trust; return $this; @@ -569,9 +548,6 @@ public function getType() */ 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( @@ -606,9 +582,6 @@ public function getVerificationPlan() */ public function setVerificationPlan($verificationPlan) { - if (is_null($verificationPlan)) { - throw new \InvalidArgumentException('non-nullable verificationPlan cannot be null'); - } $this->container['verificationPlan'] = $verificationPlan; return $this; diff --git a/src/Adyen/Model/LegalEntityManagement/LegalEntityInfoRequiredType.php b/src/Adyen/Model/LegalEntityManagement/LegalEntityInfoRequiredType.php index 0c953db30..1991f61ed 100644 --- a/src/Adyen/Model/LegalEntityManagement/LegalEntityInfoRequiredType.php +++ b/src/Adyen/Model/LegalEntityManagement/LegalEntityInfoRequiredType.php @@ -383,9 +383,6 @@ public function getCapabilities() */ public function setCapabilities($capabilities) { - if (is_null($capabilities)) { - throw new \InvalidArgumentException('non-nullable capabilities cannot be null'); - } $this->container['capabilities'] = $capabilities; return $this; @@ -410,9 +407,6 @@ public function getEntityAssociations() */ public function setEntityAssociations($entityAssociations) { - if (is_null($entityAssociations)) { - throw new \InvalidArgumentException('non-nullable entityAssociations cannot be null'); - } $this->container['entityAssociations'] = $entityAssociations; return $this; @@ -437,9 +431,6 @@ public function getIndividual() */ public function setIndividual($individual) { - if (is_null($individual)) { - throw new \InvalidArgumentException('non-nullable individual cannot be null'); - } $this->container['individual'] = $individual; return $this; @@ -464,9 +455,6 @@ public function getOrganization() */ public function setOrganization($organization) { - if (is_null($organization)) { - throw new \InvalidArgumentException('non-nullable organization cannot be null'); - } $this->container['organization'] = $organization; return $this; @@ -491,9 +479,6 @@ public function getReference() */ public function setReference($reference) { - if (is_null($reference)) { - throw new \InvalidArgumentException('non-nullable reference cannot be null'); - } $this->container['reference'] = $reference; return $this; @@ -518,9 +503,6 @@ public function getSoleProprietorship() */ public function setSoleProprietorship($soleProprietorship) { - if (is_null($soleProprietorship)) { - throw new \InvalidArgumentException('non-nullable soleProprietorship cannot be null'); - } $this->container['soleProprietorship'] = $soleProprietorship; return $this; @@ -545,9 +527,6 @@ public function getTrust() */ public function setTrust($trust) { - if (is_null($trust)) { - throw new \InvalidArgumentException('non-nullable trust cannot be null'); - } $this->container['trust'] = $trust; return $this; @@ -572,9 +551,6 @@ public function getType() */ 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( @@ -609,9 +585,6 @@ public function getVerificationPlan() */ public function setVerificationPlan($verificationPlan) { - if (is_null($verificationPlan)) { - throw new \InvalidArgumentException('non-nullable verificationPlan cannot be null'); - } $this->container['verificationPlan'] = $verificationPlan; return $this; diff --git a/src/Adyen/Model/LegalEntityManagement/NOLocalAccountIdentification.php b/src/Adyen/Model/LegalEntityManagement/NOLocalAccountIdentification.php index 92df37778..fdbb27b05 100644 --- a/src/Adyen/Model/LegalEntityManagement/NOLocalAccountIdentification.php +++ b/src/Adyen/Model/LegalEntityManagement/NOLocalAccountIdentification.php @@ -329,9 +329,6 @@ public function getAccountNumber() */ public function setAccountNumber($accountNumber) { - if (is_null($accountNumber)) { - throw new \InvalidArgumentException('non-nullable accountNumber cannot be null'); - } $this->container['accountNumber'] = $accountNumber; return $this; @@ -356,9 +353,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/LegalEntityManagement/NZLocalAccountIdentification.php b/src/Adyen/Model/LegalEntityManagement/NZLocalAccountIdentification.php index a643325f2..223fd84ac 100644 --- a/src/Adyen/Model/LegalEntityManagement/NZLocalAccountIdentification.php +++ b/src/Adyen/Model/LegalEntityManagement/NZLocalAccountIdentification.php @@ -329,9 +329,6 @@ public function getAccountNumber() */ public function setAccountNumber($accountNumber) { - if (is_null($accountNumber)) { - throw new \InvalidArgumentException('non-nullable accountNumber cannot be null'); - } $this->container['accountNumber'] = $accountNumber; return $this; @@ -356,9 +353,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/LegalEntityManagement/Name.php b/src/Adyen/Model/LegalEntityManagement/Name.php index 0b6555c20..675fa6447 100644 --- a/src/Adyen/Model/LegalEntityManagement/Name.php +++ b/src/Adyen/Model/LegalEntityManagement/Name.php @@ -315,9 +315,6 @@ public function getFirstName() */ public function setFirstName($firstName) { - if (is_null($firstName)) { - throw new \InvalidArgumentException('non-nullable firstName cannot be null'); - } $this->container['firstName'] = $firstName; return $this; @@ -342,9 +339,6 @@ public function getInfix() */ public function setInfix($infix) { - if (is_null($infix)) { - throw new \InvalidArgumentException('non-nullable infix cannot be null'); - } $this->container['infix'] = $infix; return $this; @@ -369,9 +363,6 @@ public function getLastName() */ public function setLastName($lastName) { - if (is_null($lastName)) { - throw new \InvalidArgumentException('non-nullable lastName cannot be null'); - } $this->container['lastName'] = $lastName; return $this; diff --git a/src/Adyen/Model/LegalEntityManagement/NumberAndBicAccountIdentification.php b/src/Adyen/Model/LegalEntityManagement/NumberAndBicAccountIdentification.php index 6ff8ea1bf..9f0f1dbe1 100644 --- a/src/Adyen/Model/LegalEntityManagement/NumberAndBicAccountIdentification.php +++ b/src/Adyen/Model/LegalEntityManagement/NumberAndBicAccountIdentification.php @@ -346,9 +346,6 @@ public function getAccountNumber() */ public function setAccountNumber($accountNumber) { - if (is_null($accountNumber)) { - throw new \InvalidArgumentException('non-nullable accountNumber cannot be null'); - } $this->container['accountNumber'] = $accountNumber; return $this; @@ -373,9 +370,6 @@ public function getAdditionalBankIdentification() */ public function setAdditionalBankIdentification($additionalBankIdentification) { - if (is_null($additionalBankIdentification)) { - throw new \InvalidArgumentException('non-nullable additionalBankIdentification cannot be null'); - } $this->container['additionalBankIdentification'] = $additionalBankIdentification; return $this; @@ -400,9 +394,6 @@ public function getBic() */ public function setBic($bic) { - if (is_null($bic)) { - throw new \InvalidArgumentException('non-nullable bic cannot be null'); - } $this->container['bic'] = $bic; return $this; @@ -427,9 +418,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/LegalEntityManagement/ObjectSerializer.php b/src/Adyen/Model/LegalEntityManagement/ObjectSerializer.php index d25ad19d7..66642b915 100644 --- a/src/Adyen/Model/LegalEntityManagement/ObjectSerializer.php +++ b/src/Adyen/Model/LegalEntityManagement/ObjectSerializer.php @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach ($data as $property => $value) { + foreach($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) { - return $timestamp; - } + if (!is_string($timestamp)) return $timestamp; return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/LegalEntityManagement/OnboardingLink.php b/src/Adyen/Model/LegalEntityManagement/OnboardingLink.php index 877cc33b9..0a43f382d 100644 --- a/src/Adyen/Model/LegalEntityManagement/OnboardingLink.php +++ b/src/Adyen/Model/LegalEntityManagement/OnboardingLink.php @@ -295,9 +295,6 @@ public function getUrl() */ public function setUrl($url) { - if (is_null($url)) { - throw new \InvalidArgumentException('non-nullable url cannot be null'); - } $this->container['url'] = $url; return $this; diff --git a/src/Adyen/Model/LegalEntityManagement/OnboardingLinkInfo.php b/src/Adyen/Model/LegalEntityManagement/OnboardingLinkInfo.php index 7add4bf65..d154c5de9 100644 --- a/src/Adyen/Model/LegalEntityManagement/OnboardingLinkInfo.php +++ b/src/Adyen/Model/LegalEntityManagement/OnboardingLinkInfo.php @@ -316,9 +316,6 @@ public function getLocale() */ public function setLocale($locale) { - if (is_null($locale)) { - throw new \InvalidArgumentException('non-nullable locale cannot be null'); - } $this->container['locale'] = $locale; return $this; @@ -343,9 +340,6 @@ public function getRedirectUrl() */ public function setRedirectUrl($redirectUrl) { - if (is_null($redirectUrl)) { - throw new \InvalidArgumentException('non-nullable redirectUrl cannot be null'); - } $this->container['redirectUrl'] = $redirectUrl; return $this; @@ -370,9 +364,6 @@ public function getSettings() */ public function setSettings($settings) { - if (is_null($settings)) { - throw new \InvalidArgumentException('non-nullable settings cannot be null'); - } $this->container['settings'] = $settings; return $this; @@ -397,9 +388,6 @@ public function getThemeId() */ public function setThemeId($themeId) { - if (is_null($themeId)) { - throw new \InvalidArgumentException('non-nullable themeId cannot be null'); - } $this->container['themeId'] = $themeId; return $this; diff --git a/src/Adyen/Model/LegalEntityManagement/OnboardingLinkSettings.php b/src/Adyen/Model/LegalEntityManagement/OnboardingLinkSettings.php index 66caa2f6d..c0d5114b2 100644 --- a/src/Adyen/Model/LegalEntityManagement/OnboardingLinkSettings.php +++ b/src/Adyen/Model/LegalEntityManagement/OnboardingLinkSettings.php @@ -393,9 +393,6 @@ public function getAcceptedCountries() */ public function setAcceptedCountries($acceptedCountries) { - if (is_null($acceptedCountries)) { - throw new \InvalidArgumentException('non-nullable acceptedCountries cannot be null'); - } $this->container['acceptedCountries'] = $acceptedCountries; return $this; @@ -420,9 +417,6 @@ public function getAllowBankAccountFormatSelection() */ public function setAllowBankAccountFormatSelection($allowBankAccountFormatSelection) { - if (is_null($allowBankAccountFormatSelection)) { - throw new \InvalidArgumentException('non-nullable allowBankAccountFormatSelection cannot be null'); - } $this->container['allowBankAccountFormatSelection'] = $allowBankAccountFormatSelection; return $this; @@ -447,9 +441,6 @@ public function getAllowIntraRegionCrossBorderPayout() */ public function setAllowIntraRegionCrossBorderPayout($allowIntraRegionCrossBorderPayout) { - if (is_null($allowIntraRegionCrossBorderPayout)) { - throw new \InvalidArgumentException('non-nullable allowIntraRegionCrossBorderPayout cannot be null'); - } $this->container['allowIntraRegionCrossBorderPayout'] = $allowIntraRegionCrossBorderPayout; return $this; @@ -474,9 +465,6 @@ public function getChangeLegalEntityType() */ public function setChangeLegalEntityType($changeLegalEntityType) { - if (is_null($changeLegalEntityType)) { - throw new \InvalidArgumentException('non-nullable changeLegalEntityType cannot be null'); - } $this->container['changeLegalEntityType'] = $changeLegalEntityType; return $this; @@ -501,9 +489,6 @@ public function getEditPrefilledCountry() */ public function setEditPrefilledCountry($editPrefilledCountry) { - if (is_null($editPrefilledCountry)) { - throw new \InvalidArgumentException('non-nullable editPrefilledCountry cannot be null'); - } $this->container['editPrefilledCountry'] = $editPrefilledCountry; return $this; @@ -528,9 +513,6 @@ public function getHideOnboardingIntroductionIndividual() */ public function setHideOnboardingIntroductionIndividual($hideOnboardingIntroductionIndividual) { - if (is_null($hideOnboardingIntroductionIndividual)) { - throw new \InvalidArgumentException('non-nullable hideOnboardingIntroductionIndividual cannot be null'); - } $this->container['hideOnboardingIntroductionIndividual'] = $hideOnboardingIntroductionIndividual; return $this; @@ -555,9 +537,6 @@ public function getHideOnboardingIntroductionOrganization() */ public function setHideOnboardingIntroductionOrganization($hideOnboardingIntroductionOrganization) { - if (is_null($hideOnboardingIntroductionOrganization)) { - throw new \InvalidArgumentException('non-nullable hideOnboardingIntroductionOrganization cannot be null'); - } $this->container['hideOnboardingIntroductionOrganization'] = $hideOnboardingIntroductionOrganization; return $this; @@ -582,9 +561,6 @@ public function getHideOnboardingIntroductionSoleProprietor() */ public function setHideOnboardingIntroductionSoleProprietor($hideOnboardingIntroductionSoleProprietor) { - if (is_null($hideOnboardingIntroductionSoleProprietor)) { - throw new \InvalidArgumentException('non-nullable hideOnboardingIntroductionSoleProprietor cannot be null'); - } $this->container['hideOnboardingIntroductionSoleProprietor'] = $hideOnboardingIntroductionSoleProprietor; return $this; @@ -609,9 +585,6 @@ public function getHideOnboardingIntroductionTrust() */ public function setHideOnboardingIntroductionTrust($hideOnboardingIntroductionTrust) { - if (is_null($hideOnboardingIntroductionTrust)) { - throw new \InvalidArgumentException('non-nullable hideOnboardingIntroductionTrust cannot be null'); - } $this->container['hideOnboardingIntroductionTrust'] = $hideOnboardingIntroductionTrust; return $this; @@ -636,9 +609,6 @@ public function getInstantBankVerification() */ public function setInstantBankVerification($instantBankVerification) { - if (is_null($instantBankVerification)) { - throw new \InvalidArgumentException('non-nullable instantBankVerification cannot be null'); - } $this->container['instantBankVerification'] = $instantBankVerification; return $this; @@ -663,9 +633,6 @@ public function getRequirePciSignEcomMoto() */ public function setRequirePciSignEcomMoto($requirePciSignEcomMoto) { - if (is_null($requirePciSignEcomMoto)) { - throw new \InvalidArgumentException('non-nullable requirePciSignEcomMoto cannot be null'); - } $this->container['requirePciSignEcomMoto'] = $requirePciSignEcomMoto; return $this; @@ -690,9 +657,6 @@ public function getRequirePciSignEcommerce() */ public function setRequirePciSignEcommerce($requirePciSignEcommerce) { - if (is_null($requirePciSignEcommerce)) { - throw new \InvalidArgumentException('non-nullable requirePciSignEcommerce cannot be null'); - } $this->container['requirePciSignEcommerce'] = $requirePciSignEcommerce; return $this; @@ -717,9 +681,6 @@ public function getRequirePciSignPos() */ public function setRequirePciSignPos($requirePciSignPos) { - if (is_null($requirePciSignPos)) { - throw new \InvalidArgumentException('non-nullable requirePciSignPos cannot be null'); - } $this->container['requirePciSignPos'] = $requirePciSignPos; return $this; @@ -744,9 +705,6 @@ public function getRequirePciSignPosMoto() */ public function setRequirePciSignPosMoto($requirePciSignPosMoto) { - if (is_null($requirePciSignPosMoto)) { - throw new \InvalidArgumentException('non-nullable requirePciSignPosMoto cannot be null'); - } $this->container['requirePciSignPosMoto'] = $requirePciSignPosMoto; return $this; @@ -771,7 +729,6 @@ public function getTransferInstrumentLimit() */ public function setTransferInstrumentLimit($transferInstrumentLimit) { - // Do nothing for nullable integers $this->container['transferInstrumentLimit'] = $transferInstrumentLimit; return $this; diff --git a/src/Adyen/Model/LegalEntityManagement/OnboardingTheme.php b/src/Adyen/Model/LegalEntityManagement/OnboardingTheme.php index 46fcf1e92..28bcdba37 100644 --- a/src/Adyen/Model/LegalEntityManagement/OnboardingTheme.php +++ b/src/Adyen/Model/LegalEntityManagement/OnboardingTheme.php @@ -332,9 +332,6 @@ public function getCreatedAt() */ public function setCreatedAt($createdAt) { - if (is_null($createdAt)) { - throw new \InvalidArgumentException('non-nullable createdAt cannot be null'); - } $this->container['createdAt'] = $createdAt; return $this; @@ -359,9 +356,6 @@ public function getDescription() */ public function setDescription($description) { - if (is_null($description)) { - throw new \InvalidArgumentException('non-nullable description cannot be null'); - } $this->container['description'] = $description; return $this; @@ -386,9 +380,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -413,9 +404,6 @@ public function getProperties() */ public function setProperties($properties) { - if (is_null($properties)) { - throw new \InvalidArgumentException('non-nullable properties cannot be null'); - } $this->container['properties'] = $properties; return $this; @@ -440,9 +428,6 @@ public function getUpdatedAt() */ public function setUpdatedAt($updatedAt) { - if (is_null($updatedAt)) { - throw new \InvalidArgumentException('non-nullable updatedAt cannot be null'); - } $this->container['updatedAt'] = $updatedAt; return $this; diff --git a/src/Adyen/Model/LegalEntityManagement/OnboardingThemes.php b/src/Adyen/Model/LegalEntityManagement/OnboardingThemes.php index 03e9a266a..e11fe45c4 100644 --- a/src/Adyen/Model/LegalEntityManagement/OnboardingThemes.php +++ b/src/Adyen/Model/LegalEntityManagement/OnboardingThemes.php @@ -312,9 +312,6 @@ public function getNext() */ public function setNext($next) { - if (is_null($next)) { - throw new \InvalidArgumentException('non-nullable next cannot be null'); - } $this->container['next'] = $next; return $this; @@ -339,9 +336,6 @@ public function getPrevious() */ public function setPrevious($previous) { - if (is_null($previous)) { - throw new \InvalidArgumentException('non-nullable previous cannot be null'); - } $this->container['previous'] = $previous; return $this; @@ -366,9 +360,6 @@ public function getThemes() */ public function setThemes($themes) { - if (is_null($themes)) { - throw new \InvalidArgumentException('non-nullable themes cannot be null'); - } $this->container['themes'] = $themes; return $this; diff --git a/src/Adyen/Model/LegalEntityManagement/Organization.php b/src/Adyen/Model/LegalEntityManagement/Organization.php index c3c052dbf..a144c2080 100644 --- a/src/Adyen/Model/LegalEntityManagement/Organization.php +++ b/src/Adyen/Model/LegalEntityManagement/Organization.php @@ -460,9 +460,6 @@ public function getDateOfIncorporation() */ public function setDateOfIncorporation($dateOfIncorporation) { - if (is_null($dateOfIncorporation)) { - throw new \InvalidArgumentException('non-nullable dateOfIncorporation cannot be null'); - } $this->container['dateOfIncorporation'] = $dateOfIncorporation; return $this; @@ -487,9 +484,6 @@ public function getDescription() */ public function setDescription($description) { - if (is_null($description)) { - throw new \InvalidArgumentException('non-nullable description cannot be null'); - } $this->container['description'] = $description; return $this; @@ -514,9 +508,6 @@ public function getDoingBusinessAs() */ public function setDoingBusinessAs($doingBusinessAs) { - if (is_null($doingBusinessAs)) { - throw new \InvalidArgumentException('non-nullable doingBusinessAs cannot be null'); - } $this->container['doingBusinessAs'] = $doingBusinessAs; return $this; @@ -541,9 +532,6 @@ public function getEmail() */ public function setEmail($email) { - if (is_null($email)) { - throw new \InvalidArgumentException('non-nullable email cannot be null'); - } $this->container['email'] = $email; return $this; @@ -568,9 +556,6 @@ public function getLegalName() */ public function setLegalName($legalName) { - if (is_null($legalName)) { - throw new \InvalidArgumentException('non-nullable legalName cannot be null'); - } $this->container['legalName'] = $legalName; return $this; @@ -595,9 +580,6 @@ public function getPhone() */ public function setPhone($phone) { - if (is_null($phone)) { - throw new \InvalidArgumentException('non-nullable phone cannot be null'); - } $this->container['phone'] = $phone; return $this; @@ -622,9 +604,6 @@ public function getPrincipalPlaceOfBusiness() */ public function setPrincipalPlaceOfBusiness($principalPlaceOfBusiness) { - if (is_null($principalPlaceOfBusiness)) { - throw new \InvalidArgumentException('non-nullable principalPlaceOfBusiness cannot be null'); - } $this->container['principalPlaceOfBusiness'] = $principalPlaceOfBusiness; return $this; @@ -649,9 +628,6 @@ public function getRegisteredAddress() */ public function setRegisteredAddress($registeredAddress) { - if (is_null($registeredAddress)) { - throw new \InvalidArgumentException('non-nullable registeredAddress cannot be null'); - } $this->container['registeredAddress'] = $registeredAddress; return $this; @@ -676,9 +652,6 @@ public function getRegistrationNumber() */ public function setRegistrationNumber($registrationNumber) { - if (is_null($registrationNumber)) { - throw new \InvalidArgumentException('non-nullable registrationNumber cannot be null'); - } $this->container['registrationNumber'] = $registrationNumber; return $this; @@ -703,9 +676,6 @@ public function getStockData() */ public function setStockData($stockData) { - if (is_null($stockData)) { - throw new \InvalidArgumentException('non-nullable stockData cannot be null'); - } $this->container['stockData'] = $stockData; return $this; @@ -730,9 +700,6 @@ public function getTaxInformation() */ public function setTaxInformation($taxInformation) { - if (is_null($taxInformation)) { - throw new \InvalidArgumentException('non-nullable taxInformation cannot be null'); - } $this->container['taxInformation'] = $taxInformation; return $this; @@ -757,9 +724,6 @@ public function getTaxReportingClassification() */ public function setTaxReportingClassification($taxReportingClassification) { - if (is_null($taxReportingClassification)) { - throw new \InvalidArgumentException('non-nullable taxReportingClassification cannot be null'); - } $this->container['taxReportingClassification'] = $taxReportingClassification; return $this; @@ -784,9 +748,6 @@ public function getType() */ 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( @@ -821,9 +782,6 @@ public function getVatAbsenceReason() */ public function setVatAbsenceReason($vatAbsenceReason) { - if (is_null($vatAbsenceReason)) { - throw new \InvalidArgumentException('non-nullable vatAbsenceReason cannot be null'); - } $allowedValues = $this->getVatAbsenceReasonAllowableValues(); if (!in_array($vatAbsenceReason, $allowedValues, true)) { throw new \InvalidArgumentException( @@ -858,9 +816,6 @@ public function getVatNumber() */ public function setVatNumber($vatNumber) { - if (is_null($vatNumber)) { - throw new \InvalidArgumentException('non-nullable vatNumber cannot be null'); - } $this->container['vatNumber'] = $vatNumber; return $this; @@ -885,9 +840,6 @@ public function getWebData() */ public function setWebData($webData) { - if (is_null($webData)) { - throw new \InvalidArgumentException('non-nullable webData cannot be null'); - } $this->container['webData'] = $webData; return $this; diff --git a/src/Adyen/Model/LegalEntityManagement/OwnerEntity.php b/src/Adyen/Model/LegalEntityManagement/OwnerEntity.php index 4224ab381..d9c25bd66 100644 --- a/src/Adyen/Model/LegalEntityManagement/OwnerEntity.php +++ b/src/Adyen/Model/LegalEntityManagement/OwnerEntity.php @@ -308,9 +308,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -335,9 +332,6 @@ public function getType() */ public function setType($type) { - if (is_null($type)) { - throw new \InvalidArgumentException('non-nullable type cannot be null'); - } $this->container['type'] = $type; return $this; diff --git a/src/Adyen/Model/LegalEntityManagement/PLLocalAccountIdentification.php b/src/Adyen/Model/LegalEntityManagement/PLLocalAccountIdentification.php index 876f046c3..3f8fe0ff7 100644 --- a/src/Adyen/Model/LegalEntityManagement/PLLocalAccountIdentification.php +++ b/src/Adyen/Model/LegalEntityManagement/PLLocalAccountIdentification.php @@ -329,9 +329,6 @@ public function getAccountNumber() */ public function setAccountNumber($accountNumber) { - if (is_null($accountNumber)) { - throw new \InvalidArgumentException('non-nullable accountNumber cannot be null'); - } $this->container['accountNumber'] = $accountNumber; return $this; @@ -356,9 +353,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/LegalEntityManagement/PciDocumentInfo.php b/src/Adyen/Model/LegalEntityManagement/PciDocumentInfo.php index 44c53e971..a73ad1f0f 100644 --- a/src/Adyen/Model/LegalEntityManagement/PciDocumentInfo.php +++ b/src/Adyen/Model/LegalEntityManagement/PciDocumentInfo.php @@ -309,9 +309,6 @@ public function getCreatedAt() */ public function setCreatedAt($createdAt) { - if (is_null($createdAt)) { - throw new \InvalidArgumentException('non-nullable createdAt cannot be null'); - } $this->container['createdAt'] = $createdAt; return $this; @@ -336,9 +333,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -363,9 +357,6 @@ public function getValidUntil() */ public function setValidUntil($validUntil) { - if (is_null($validUntil)) { - throw new \InvalidArgumentException('non-nullable validUntil cannot be null'); - } $this->container['validUntil'] = $validUntil; return $this; diff --git a/src/Adyen/Model/LegalEntityManagement/PciSigningRequest.php b/src/Adyen/Model/LegalEntityManagement/PciSigningRequest.php index f7baadfb2..71cc9e86e 100644 --- a/src/Adyen/Model/LegalEntityManagement/PciSigningRequest.php +++ b/src/Adyen/Model/LegalEntityManagement/PciSigningRequest.php @@ -308,9 +308,6 @@ public function getPciTemplateReferences() */ public function setPciTemplateReferences($pciTemplateReferences) { - if (is_null($pciTemplateReferences)) { - throw new \InvalidArgumentException('non-nullable pciTemplateReferences cannot be null'); - } $this->container['pciTemplateReferences'] = $pciTemplateReferences; return $this; @@ -335,9 +332,6 @@ public function getSignedBy() */ public function setSignedBy($signedBy) { - if (is_null($signedBy)) { - throw new \InvalidArgumentException('non-nullable signedBy cannot be null'); - } $this->container['signedBy'] = $signedBy; return $this; diff --git a/src/Adyen/Model/LegalEntityManagement/PciSigningResponse.php b/src/Adyen/Model/LegalEntityManagement/PciSigningResponse.php index 7ee59bddb..2a9eea932 100644 --- a/src/Adyen/Model/LegalEntityManagement/PciSigningResponse.php +++ b/src/Adyen/Model/LegalEntityManagement/PciSigningResponse.php @@ -302,9 +302,6 @@ public function getPciQuestionnaireIds() */ public function setPciQuestionnaireIds($pciQuestionnaireIds) { - if (is_null($pciQuestionnaireIds)) { - throw new \InvalidArgumentException('non-nullable pciQuestionnaireIds cannot be null'); - } $this->container['pciQuestionnaireIds'] = $pciQuestionnaireIds; return $this; @@ -329,9 +326,6 @@ public function getSignedBy() */ public function setSignedBy($signedBy) { - if (is_null($signedBy)) { - throw new \InvalidArgumentException('non-nullable signedBy cannot be null'); - } $this->container['signedBy'] = $signedBy; return $this; diff --git a/src/Adyen/Model/LegalEntityManagement/PhoneNumber.php b/src/Adyen/Model/LegalEntityManagement/PhoneNumber.php index 13453daf2..a01b31eb9 100644 --- a/src/Adyen/Model/LegalEntityManagement/PhoneNumber.php +++ b/src/Adyen/Model/LegalEntityManagement/PhoneNumber.php @@ -305,9 +305,6 @@ public function getNumber() */ public function setNumber($number) { - if (is_null($number)) { - throw new \InvalidArgumentException('non-nullable number cannot be null'); - } $this->container['number'] = $number; return $this; @@ -332,9 +329,6 @@ public function getType() */ public function setType($type) { - if (is_null($type)) { - throw new \InvalidArgumentException('non-nullable type cannot be null'); - } $this->container['type'] = $type; return $this; diff --git a/src/Adyen/Model/LegalEntityManagement/RemediatingAction.php b/src/Adyen/Model/LegalEntityManagement/RemediatingAction.php index 49bcfb6f7..e47d5c8dd 100644 --- a/src/Adyen/Model/LegalEntityManagement/RemediatingAction.php +++ b/src/Adyen/Model/LegalEntityManagement/RemediatingAction.php @@ -302,9 +302,6 @@ public function getCode() */ public function setCode($code) { - if (is_null($code)) { - throw new \InvalidArgumentException('non-nullable code cannot be null'); - } $this->container['code'] = $code; return $this; @@ -329,9 +326,6 @@ public function getMessage() */ public function setMessage($message) { - if (is_null($message)) { - throw new \InvalidArgumentException('non-nullable message cannot be null'); - } $this->container['message'] = $message; return $this; diff --git a/src/Adyen/Model/LegalEntityManagement/SELocalAccountIdentification.php b/src/Adyen/Model/LegalEntityManagement/SELocalAccountIdentification.php index 38ea6f97b..ad72026b2 100644 --- a/src/Adyen/Model/LegalEntityManagement/SELocalAccountIdentification.php +++ b/src/Adyen/Model/LegalEntityManagement/SELocalAccountIdentification.php @@ -339,9 +339,6 @@ public function getAccountNumber() */ public function setAccountNumber($accountNumber) { - if (is_null($accountNumber)) { - throw new \InvalidArgumentException('non-nullable accountNumber cannot be null'); - } $this->container['accountNumber'] = $accountNumber; return $this; @@ -366,9 +363,6 @@ public function getClearingNumber() */ public function setClearingNumber($clearingNumber) { - if (is_null($clearingNumber)) { - throw new \InvalidArgumentException('non-nullable clearingNumber cannot be null'); - } $this->container['clearingNumber'] = $clearingNumber; return $this; @@ -393,9 +387,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/LegalEntityManagement/SGLocalAccountIdentification.php b/src/Adyen/Model/LegalEntityManagement/SGLocalAccountIdentification.php index 2c71cebfe..c7a5acf08 100644 --- a/src/Adyen/Model/LegalEntityManagement/SGLocalAccountIdentification.php +++ b/src/Adyen/Model/LegalEntityManagement/SGLocalAccountIdentification.php @@ -336,9 +336,6 @@ public function getAccountNumber() */ public function setAccountNumber($accountNumber) { - if (is_null($accountNumber)) { - throw new \InvalidArgumentException('non-nullable accountNumber cannot be null'); - } $this->container['accountNumber'] = $accountNumber; return $this; @@ -363,9 +360,6 @@ public function getBic() */ public function setBic($bic) { - if (is_null($bic)) { - throw new \InvalidArgumentException('non-nullable bic cannot be null'); - } $this->container['bic'] = $bic; return $this; @@ -390,9 +384,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/LegalEntityManagement/ServiceError.php b/src/Adyen/Model/LegalEntityManagement/ServiceError.php index 38bb01c60..cd15d6115 100644 --- a/src/Adyen/Model/LegalEntityManagement/ServiceError.php +++ b/src/Adyen/Model/LegalEntityManagement/ServiceError.php @@ -323,9 +323,6 @@ public function getErrorCode() */ public function setErrorCode($errorCode) { - if (is_null($errorCode)) { - throw new \InvalidArgumentException('non-nullable errorCode cannot be null'); - } $this->container['errorCode'] = $errorCode; return $this; @@ -350,9 +347,6 @@ public function getErrorType() */ public function setErrorType($errorType) { - if (is_null($errorType)) { - throw new \InvalidArgumentException('non-nullable errorType cannot be null'); - } $this->container['errorType'] = $errorType; return $this; @@ -377,9 +371,6 @@ public function getMessage() */ public function setMessage($message) { - if (is_null($message)) { - throw new \InvalidArgumentException('non-nullable message cannot be null'); - } $this->container['message'] = $message; return $this; @@ -404,9 +395,6 @@ public function getPspReference() */ public function setPspReference($pspReference) { - if (is_null($pspReference)) { - throw new \InvalidArgumentException('non-nullable pspReference cannot be null'); - } $this->container['pspReference'] = $pspReference; return $this; @@ -431,7 +419,6 @@ public function getStatus() */ public function setStatus($status) { - // Do nothing for nullable integers $this->container['status'] = $status; return $this; diff --git a/src/Adyen/Model/LegalEntityManagement/SoleProprietorship.php b/src/Adyen/Model/LegalEntityManagement/SoleProprietorship.php index 32f62a848..9ec848f99 100644 --- a/src/Adyen/Model/LegalEntityManagement/SoleProprietorship.php +++ b/src/Adyen/Model/LegalEntityManagement/SoleProprietorship.php @@ -397,9 +397,6 @@ public function getCountryOfGoverningLaw() */ public function setCountryOfGoverningLaw($countryOfGoverningLaw) { - if (is_null($countryOfGoverningLaw)) { - throw new \InvalidArgumentException('non-nullable countryOfGoverningLaw cannot be null'); - } $this->container['countryOfGoverningLaw'] = $countryOfGoverningLaw; return $this; @@ -424,9 +421,6 @@ public function getDateOfIncorporation() */ public function setDateOfIncorporation($dateOfIncorporation) { - if (is_null($dateOfIncorporation)) { - throw new \InvalidArgumentException('non-nullable dateOfIncorporation cannot be null'); - } $this->container['dateOfIncorporation'] = $dateOfIncorporation; return $this; @@ -451,9 +445,6 @@ public function getDoingBusinessAs() */ public function setDoingBusinessAs($doingBusinessAs) { - if (is_null($doingBusinessAs)) { - throw new \InvalidArgumentException('non-nullable doingBusinessAs cannot be null'); - } $this->container['doingBusinessAs'] = $doingBusinessAs; return $this; @@ -478,9 +469,6 @@ public function getName() */ public function setName($name) { - if (is_null($name)) { - throw new \InvalidArgumentException('non-nullable name cannot be null'); - } $this->container['name'] = $name; return $this; @@ -505,9 +493,6 @@ public function getPrincipalPlaceOfBusiness() */ public function setPrincipalPlaceOfBusiness($principalPlaceOfBusiness) { - if (is_null($principalPlaceOfBusiness)) { - throw new \InvalidArgumentException('non-nullable principalPlaceOfBusiness cannot be null'); - } $this->container['principalPlaceOfBusiness'] = $principalPlaceOfBusiness; return $this; @@ -532,9 +517,6 @@ public function getRegisteredAddress() */ public function setRegisteredAddress($registeredAddress) { - if (is_null($registeredAddress)) { - throw new \InvalidArgumentException('non-nullable registeredAddress cannot be null'); - } $this->container['registeredAddress'] = $registeredAddress; return $this; @@ -559,9 +541,6 @@ public function getRegistrationNumber() */ public function setRegistrationNumber($registrationNumber) { - if (is_null($registrationNumber)) { - throw new \InvalidArgumentException('non-nullable registrationNumber cannot be null'); - } $this->container['registrationNumber'] = $registrationNumber; return $this; @@ -620,9 +599,6 @@ public function getTaxInformation() */ public function setTaxInformation($taxInformation) { - if (is_null($taxInformation)) { - throw new \InvalidArgumentException('non-nullable taxInformation cannot be null'); - } $this->container['taxInformation'] = $taxInformation; return $this; @@ -647,9 +623,6 @@ public function getVatAbsenceReason() */ public function setVatAbsenceReason($vatAbsenceReason) { - if (is_null($vatAbsenceReason)) { - throw new \InvalidArgumentException('non-nullable vatAbsenceReason cannot be null'); - } $allowedValues = $this->getVatAbsenceReasonAllowableValues(); if (!in_array($vatAbsenceReason, $allowedValues, true)) { throw new \InvalidArgumentException( @@ -684,9 +657,6 @@ public function getVatNumber() */ public function setVatNumber($vatNumber) { - if (is_null($vatNumber)) { - throw new \InvalidArgumentException('non-nullable vatNumber cannot be null'); - } $this->container['vatNumber'] = $vatNumber; return $this; diff --git a/src/Adyen/Model/LegalEntityManagement/SourceOfFunds.php b/src/Adyen/Model/LegalEntityManagement/SourceOfFunds.php index f2bd1761e..42b4b4fa1 100644 --- a/src/Adyen/Model/LegalEntityManagement/SourceOfFunds.php +++ b/src/Adyen/Model/LegalEntityManagement/SourceOfFunds.php @@ -339,9 +339,6 @@ public function getAcquiringBusinessLineId() */ public function setAcquiringBusinessLineId($acquiringBusinessLineId) { - if (is_null($acquiringBusinessLineId)) { - throw new \InvalidArgumentException('non-nullable acquiringBusinessLineId cannot be null'); - } $this->container['acquiringBusinessLineId'] = $acquiringBusinessLineId; return $this; @@ -366,9 +363,6 @@ public function getAdyenProcessedFunds() */ public function setAdyenProcessedFunds($adyenProcessedFunds) { - if (is_null($adyenProcessedFunds)) { - throw new \InvalidArgumentException('non-nullable adyenProcessedFunds cannot be null'); - } $this->container['adyenProcessedFunds'] = $adyenProcessedFunds; return $this; @@ -393,9 +387,6 @@ public function getDescription() */ public function setDescription($description) { - if (is_null($description)) { - throw new \InvalidArgumentException('non-nullable description cannot be null'); - } $this->container['description'] = $description; return $this; @@ -420,9 +411,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/LegalEntityManagement/StockData.php b/src/Adyen/Model/LegalEntityManagement/StockData.php index a43d3c0c0..04efbe08e 100644 --- a/src/Adyen/Model/LegalEntityManagement/StockData.php +++ b/src/Adyen/Model/LegalEntityManagement/StockData.php @@ -309,9 +309,6 @@ public function getMarketIdentifier() */ public function setMarketIdentifier($marketIdentifier) { - if (is_null($marketIdentifier)) { - throw new \InvalidArgumentException('non-nullable marketIdentifier cannot be null'); - } $this->container['marketIdentifier'] = $marketIdentifier; return $this; @@ -336,9 +333,6 @@ public function getStockNumber() */ public function setStockNumber($stockNumber) { - if (is_null($stockNumber)) { - throw new \InvalidArgumentException('non-nullable stockNumber cannot be null'); - } $this->container['stockNumber'] = $stockNumber; return $this; @@ -363,9 +357,6 @@ public function getTickerSymbol() */ public function setTickerSymbol($tickerSymbol) { - if (is_null($tickerSymbol)) { - throw new \InvalidArgumentException('non-nullable tickerSymbol cannot be null'); - } $this->container['tickerSymbol'] = $tickerSymbol; return $this; diff --git a/src/Adyen/Model/LegalEntityManagement/SupportingEntityCapability.php b/src/Adyen/Model/LegalEntityManagement/SupportingEntityCapability.php index 0dcc3bfed..bb9015227 100644 --- a/src/Adyen/Model/LegalEntityManagement/SupportingEntityCapability.php +++ b/src/Adyen/Model/LegalEntityManagement/SupportingEntityCapability.php @@ -316,9 +316,6 @@ public function getAllowed() */ public function setAllowed($allowed) { - if (is_null($allowed)) { - throw new \InvalidArgumentException('non-nullable allowed cannot be null'); - } $this->container['allowed'] = $allowed; return $this; @@ -343,9 +340,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -370,9 +364,6 @@ public function getRequested() */ public function setRequested($requested) { - if (is_null($requested)) { - throw new \InvalidArgumentException('non-nullable requested cannot be null'); - } $this->container['requested'] = $requested; return $this; @@ -397,9 +388,6 @@ public function getVerificationStatus() */ public function setVerificationStatus($verificationStatus) { - if (is_null($verificationStatus)) { - throw new \InvalidArgumentException('non-nullable verificationStatus cannot be null'); - } $this->container['verificationStatus'] = $verificationStatus; return $this; diff --git a/src/Adyen/Model/LegalEntityManagement/TaxInformation.php b/src/Adyen/Model/LegalEntityManagement/TaxInformation.php index edd4a0436..9225bb9f2 100644 --- a/src/Adyen/Model/LegalEntityManagement/TaxInformation.php +++ b/src/Adyen/Model/LegalEntityManagement/TaxInformation.php @@ -309,9 +309,6 @@ public function getCountry() */ public function setCountry($country) { - if (is_null($country)) { - throw new \InvalidArgumentException('non-nullable country cannot be null'); - } $this->container['country'] = $country; return $this; @@ -336,9 +333,6 @@ public function getNumber() */ public function setNumber($number) { - if (is_null($number)) { - throw new \InvalidArgumentException('non-nullable number cannot be null'); - } $this->container['number'] = $number; return $this; @@ -363,9 +357,6 @@ public function getType() */ public function setType($type) { - if (is_null($type)) { - throw new \InvalidArgumentException('non-nullable type cannot be null'); - } $this->container['type'] = $type; return $this; diff --git a/src/Adyen/Model/LegalEntityManagement/TaxReportingClassification.php b/src/Adyen/Model/LegalEntityManagement/TaxReportingClassification.php index fb8303c81..efd22f175 100644 --- a/src/Adyen/Model/LegalEntityManagement/TaxReportingClassification.php +++ b/src/Adyen/Model/LegalEntityManagement/TaxReportingClassification.php @@ -403,9 +403,6 @@ public function getBusinessType() */ public function setBusinessType($businessType) { - if (is_null($businessType)) { - throw new \InvalidArgumentException('non-nullable businessType cannot be null'); - } $allowedValues = $this->getBusinessTypeAllowableValues(); if (!in_array($businessType, $allowedValues, true)) { throw new \InvalidArgumentException( @@ -440,9 +437,6 @@ public function getFinancialInstitutionNumber() */ public function setFinancialInstitutionNumber($financialInstitutionNumber) { - if (is_null($financialInstitutionNumber)) { - throw new \InvalidArgumentException('non-nullable financialInstitutionNumber cannot be null'); - } $this->container['financialInstitutionNumber'] = $financialInstitutionNumber; return $this; @@ -467,9 +461,6 @@ public function getMainSourceOfIncome() */ public function setMainSourceOfIncome($mainSourceOfIncome) { - if (is_null($mainSourceOfIncome)) { - throw new \InvalidArgumentException('non-nullable mainSourceOfIncome cannot be null'); - } $allowedValues = $this->getMainSourceOfIncomeAllowableValues(); if (!in_array($mainSourceOfIncome, $allowedValues, true)) { throw new \InvalidArgumentException( @@ -504,9 +495,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/LegalEntityManagement/TermsOfServiceAcceptanceInfo.php b/src/Adyen/Model/LegalEntityManagement/TermsOfServiceAcceptanceInfo.php index 2f6890678..c124af258 100644 --- a/src/Adyen/Model/LegalEntityManagement/TermsOfServiceAcceptanceInfo.php +++ b/src/Adyen/Model/LegalEntityManagement/TermsOfServiceAcceptanceInfo.php @@ -358,9 +358,6 @@ public function getAcceptedBy() */ public function setAcceptedBy($acceptedBy) { - if (is_null($acceptedBy)) { - throw new \InvalidArgumentException('non-nullable acceptedBy cannot be null'); - } $this->container['acceptedBy'] = $acceptedBy; return $this; @@ -385,9 +382,6 @@ public function getAcceptedFor() */ public function setAcceptedFor($acceptedFor) { - if (is_null($acceptedFor)) { - throw new \InvalidArgumentException('non-nullable acceptedFor cannot be null'); - } $this->container['acceptedFor'] = $acceptedFor; return $this; @@ -412,9 +406,6 @@ public function getCreatedAt() */ public function setCreatedAt($createdAt) { - if (is_null($createdAt)) { - throw new \InvalidArgumentException('non-nullable createdAt cannot be null'); - } $this->container['createdAt'] = $createdAt; return $this; @@ -439,9 +430,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -466,9 +454,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/LegalEntityManagement/TransferInstrument.php b/src/Adyen/Model/LegalEntityManagement/TransferInstrument.php index be950df92..6057d9750 100644 --- a/src/Adyen/Model/LegalEntityManagement/TransferInstrument.php +++ b/src/Adyen/Model/LegalEntityManagement/TransferInstrument.php @@ -372,9 +372,6 @@ public function getBankAccount() */ public function setBankAccount($bankAccount) { - if (is_null($bankAccount)) { - throw new \InvalidArgumentException('non-nullable bankAccount cannot be null'); - } $this->container['bankAccount'] = $bankAccount; return $this; @@ -399,9 +396,6 @@ public function getCapabilities() */ public function setCapabilities($capabilities) { - if (is_null($capabilities)) { - throw new \InvalidArgumentException('non-nullable capabilities cannot be null'); - } $this->container['capabilities'] = $capabilities; return $this; @@ -426,9 +420,6 @@ public function getDocumentDetails() */ public function setDocumentDetails($documentDetails) { - if (is_null($documentDetails)) { - throw new \InvalidArgumentException('non-nullable documentDetails cannot be null'); - } $this->container['documentDetails'] = $documentDetails; return $this; @@ -453,9 +444,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -480,9 +468,6 @@ public function getLegalEntityId() */ public function setLegalEntityId($legalEntityId) { - if (is_null($legalEntityId)) { - throw new \InvalidArgumentException('non-nullable legalEntityId cannot be null'); - } $this->container['legalEntityId'] = $legalEntityId; return $this; @@ -507,9 +492,6 @@ public function getProblems() */ public function setProblems($problems) { - if (is_null($problems)) { - throw new \InvalidArgumentException('non-nullable problems cannot be null'); - } $this->container['problems'] = $problems; return $this; @@ -534,9 +516,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/LegalEntityManagement/TransferInstrumentInfo.php b/src/Adyen/Model/LegalEntityManagement/TransferInstrumentInfo.php index 457d51187..b542ca7ee 100644 --- a/src/Adyen/Model/LegalEntityManagement/TransferInstrumentInfo.php +++ b/src/Adyen/Model/LegalEntityManagement/TransferInstrumentInfo.php @@ -341,9 +341,6 @@ public function getBankAccount() */ public function setBankAccount($bankAccount) { - if (is_null($bankAccount)) { - throw new \InvalidArgumentException('non-nullable bankAccount cannot be null'); - } $this->container['bankAccount'] = $bankAccount; return $this; @@ -368,9 +365,6 @@ public function getLegalEntityId() */ public function setLegalEntityId($legalEntityId) { - if (is_null($legalEntityId)) { - throw new \InvalidArgumentException('non-nullable legalEntityId cannot be null'); - } $this->container['legalEntityId'] = $legalEntityId; return $this; @@ -395,9 +389,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/LegalEntityManagement/TransferInstrumentReference.php b/src/Adyen/Model/LegalEntityManagement/TransferInstrumentReference.php index 9ecd17eae..a696410af 100644 --- a/src/Adyen/Model/LegalEntityManagement/TransferInstrumentReference.php +++ b/src/Adyen/Model/LegalEntityManagement/TransferInstrumentReference.php @@ -322,9 +322,6 @@ public function getAccountIdentifier() */ public function setAccountIdentifier($accountIdentifier) { - if (is_null($accountIdentifier)) { - throw new \InvalidArgumentException('non-nullable accountIdentifier cannot be null'); - } $this->container['accountIdentifier'] = $accountIdentifier; return $this; @@ -349,9 +346,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -376,9 +370,6 @@ public function getRealLastFour() */ public function setRealLastFour($realLastFour) { - if (is_null($realLastFour)) { - throw new \InvalidArgumentException('non-nullable realLastFour cannot be null'); - } $this->container['realLastFour'] = $realLastFour; return $this; @@ -403,9 +394,6 @@ public function getTrustedSource() */ public function setTrustedSource($trustedSource) { - if (is_null($trustedSource)) { - throw new \InvalidArgumentException('non-nullable trustedSource cannot be null'); - } $this->container['trustedSource'] = $trustedSource; return $this; diff --git a/src/Adyen/Model/LegalEntityManagement/Trust.php b/src/Adyen/Model/LegalEntityManagement/Trust.php index d33d4082d..b6b425ff0 100644 --- a/src/Adyen/Model/LegalEntityManagement/Trust.php +++ b/src/Adyen/Model/LegalEntityManagement/Trust.php @@ -463,9 +463,6 @@ public function getCountryOfGoverningLaw() */ public function setCountryOfGoverningLaw($countryOfGoverningLaw) { - if (is_null($countryOfGoverningLaw)) { - throw new \InvalidArgumentException('non-nullable countryOfGoverningLaw cannot be null'); - } $this->container['countryOfGoverningLaw'] = $countryOfGoverningLaw; return $this; @@ -490,9 +487,6 @@ public function getDateOfIncorporation() */ public function setDateOfIncorporation($dateOfIncorporation) { - if (is_null($dateOfIncorporation)) { - throw new \InvalidArgumentException('non-nullable dateOfIncorporation cannot be null'); - } $this->container['dateOfIncorporation'] = $dateOfIncorporation; return $this; @@ -517,9 +511,6 @@ public function getDoingBusinessAs() */ public function setDoingBusinessAs($doingBusinessAs) { - if (is_null($doingBusinessAs)) { - throw new \InvalidArgumentException('non-nullable doingBusinessAs cannot be null'); - } $this->container['doingBusinessAs'] = $doingBusinessAs; return $this; @@ -544,9 +535,6 @@ public function getName() */ public function setName($name) { - if (is_null($name)) { - throw new \InvalidArgumentException('non-nullable name cannot be null'); - } $this->container['name'] = $name; return $this; @@ -571,9 +559,6 @@ public function getPrincipalPlaceOfBusiness() */ public function setPrincipalPlaceOfBusiness($principalPlaceOfBusiness) { - if (is_null($principalPlaceOfBusiness)) { - throw new \InvalidArgumentException('non-nullable principalPlaceOfBusiness cannot be null'); - } $this->container['principalPlaceOfBusiness'] = $principalPlaceOfBusiness; return $this; @@ -598,9 +583,6 @@ public function getRegisteredAddress() */ public function setRegisteredAddress($registeredAddress) { - if (is_null($registeredAddress)) { - throw new \InvalidArgumentException('non-nullable registeredAddress cannot be null'); - } $this->container['registeredAddress'] = $registeredAddress; return $this; @@ -625,9 +607,6 @@ public function getRegistrationNumber() */ public function setRegistrationNumber($registrationNumber) { - if (is_null($registrationNumber)) { - throw new \InvalidArgumentException('non-nullable registrationNumber cannot be null'); - } $this->container['registrationNumber'] = $registrationNumber; return $this; @@ -686,9 +665,6 @@ public function getTaxInformation() */ public function setTaxInformation($taxInformation) { - if (is_null($taxInformation)) { - throw new \InvalidArgumentException('non-nullable taxInformation cannot be null'); - } $this->container['taxInformation'] = $taxInformation; return $this; @@ -713,9 +689,6 @@ public function getType() */ 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( @@ -750,9 +723,6 @@ public function getUndefinedBeneficiaryInfo() */ public function setUndefinedBeneficiaryInfo($undefinedBeneficiaryInfo) { - if (is_null($undefinedBeneficiaryInfo)) { - throw new \InvalidArgumentException('non-nullable undefinedBeneficiaryInfo cannot be null'); - } $this->container['undefinedBeneficiaryInfo'] = $undefinedBeneficiaryInfo; return $this; @@ -777,9 +747,6 @@ public function getVatAbsenceReason() */ public function setVatAbsenceReason($vatAbsenceReason) { - if (is_null($vatAbsenceReason)) { - throw new \InvalidArgumentException('non-nullable vatAbsenceReason cannot be null'); - } $allowedValues = $this->getVatAbsenceReasonAllowableValues(); if (!in_array($vatAbsenceReason, $allowedValues, true)) { throw new \InvalidArgumentException( @@ -814,9 +781,6 @@ public function getVatNumber() */ public function setVatNumber($vatNumber) { - if (is_null($vatNumber)) { - throw new \InvalidArgumentException('non-nullable vatNumber cannot be null'); - } $this->container['vatNumber'] = $vatNumber; return $this; diff --git a/src/Adyen/Model/LegalEntityManagement/UKLocalAccountIdentification.php b/src/Adyen/Model/LegalEntityManagement/UKLocalAccountIdentification.php index 74dc8611f..31b6043e6 100644 --- a/src/Adyen/Model/LegalEntityManagement/UKLocalAccountIdentification.php +++ b/src/Adyen/Model/LegalEntityManagement/UKLocalAccountIdentification.php @@ -339,9 +339,6 @@ public function getAccountNumber() */ public function setAccountNumber($accountNumber) { - if (is_null($accountNumber)) { - throw new \InvalidArgumentException('non-nullable accountNumber cannot be null'); - } $this->container['accountNumber'] = $accountNumber; return $this; @@ -366,9 +363,6 @@ public function getSortCode() */ public function setSortCode($sortCode) { - if (is_null($sortCode)) { - throw new \InvalidArgumentException('non-nullable sortCode cannot be null'); - } $this->container['sortCode'] = $sortCode; return $this; @@ -393,9 +387,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/LegalEntityManagement/USLocalAccountIdentification.php b/src/Adyen/Model/LegalEntityManagement/USLocalAccountIdentification.php index 924e50527..78f3dd56a 100644 --- a/src/Adyen/Model/LegalEntityManagement/USLocalAccountIdentification.php +++ b/src/Adyen/Model/LegalEntityManagement/USLocalAccountIdentification.php @@ -369,9 +369,6 @@ public function getAccountNumber() */ public function setAccountNumber($accountNumber) { - if (is_null($accountNumber)) { - throw new \InvalidArgumentException('non-nullable accountNumber cannot be null'); - } $this->container['accountNumber'] = $accountNumber; return $this; @@ -396,9 +393,6 @@ public function getAccountType() */ 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( @@ -433,9 +427,6 @@ public function getRoutingNumber() */ public function setRoutingNumber($routingNumber) { - if (is_null($routingNumber)) { - throw new \InvalidArgumentException('non-nullable routingNumber cannot be null'); - } $this->container['routingNumber'] = $routingNumber; return $this; @@ -460,9 +451,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/LegalEntityManagement/UndefinedBeneficiary.php b/src/Adyen/Model/LegalEntityManagement/UndefinedBeneficiary.php index 46a0c5d5c..738a29422 100644 --- a/src/Adyen/Model/LegalEntityManagement/UndefinedBeneficiary.php +++ b/src/Adyen/Model/LegalEntityManagement/UndefinedBeneficiary.php @@ -302,9 +302,6 @@ public function getDescription() */ public function setDescription($description) { - if (is_null($description)) { - throw new \InvalidArgumentException('non-nullable description cannot be null'); - } $this->container['description'] = $description; return $this; @@ -329,9 +326,6 @@ public function getReference() */ public function setReference($reference) { - if (is_null($reference)) { - throw new \InvalidArgumentException('non-nullable reference cannot be null'); - } $this->container['reference'] = $reference; return $this; diff --git a/src/Adyen/Model/LegalEntityManagement/VerificationDeadline.php b/src/Adyen/Model/LegalEntityManagement/VerificationDeadline.php index ce4732a98..902853fdb 100644 --- a/src/Adyen/Model/LegalEntityManagement/VerificationDeadline.php +++ b/src/Adyen/Model/LegalEntityManagement/VerificationDeadline.php @@ -425,9 +425,6 @@ public function getCapabilities() */ 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( @@ -461,9 +458,6 @@ public function getEntityIds() */ public function setEntityIds($entityIds) { - if (is_null($entityIds)) { - throw new \InvalidArgumentException('non-nullable entityIds cannot be null'); - } $this->container['entityIds'] = $entityIds; return $this; @@ -488,9 +482,6 @@ public function getExpiresAt() */ public function setExpiresAt($expiresAt) { - if (is_null($expiresAt)) { - throw new \InvalidArgumentException('non-nullable expiresAt cannot be null'); - } $this->container['expiresAt'] = $expiresAt; return $this; diff --git a/src/Adyen/Model/LegalEntityManagement/VerificationError.php b/src/Adyen/Model/LegalEntityManagement/VerificationError.php index fb6a8cccb..2cd9e2d12 100644 --- a/src/Adyen/Model/LegalEntityManagement/VerificationError.php +++ b/src/Adyen/Model/LegalEntityManagement/VerificationError.php @@ -469,9 +469,6 @@ public function getCapabilities() */ 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( @@ -505,9 +502,6 @@ public function getCode() */ public function setCode($code) { - if (is_null($code)) { - throw new \InvalidArgumentException('non-nullable code cannot be null'); - } $this->container['code'] = $code; return $this; @@ -532,9 +526,6 @@ public function getMessage() */ public function setMessage($message) { - if (is_null($message)) { - throw new \InvalidArgumentException('non-nullable message cannot be null'); - } $this->container['message'] = $message; return $this; @@ -559,9 +550,6 @@ public function getRemediatingActions() */ public function setRemediatingActions($remediatingActions) { - if (is_null($remediatingActions)) { - throw new \InvalidArgumentException('non-nullable remediatingActions cannot be null'); - } $this->container['remediatingActions'] = $remediatingActions; return $this; @@ -586,9 +574,6 @@ public function getSubErrors() */ public function setSubErrors($subErrors) { - if (is_null($subErrors)) { - throw new \InvalidArgumentException('non-nullable subErrors cannot be null'); - } $this->container['subErrors'] = $subErrors; return $this; @@ -613,9 +598,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/LegalEntityManagement/VerificationErrorRecursive.php b/src/Adyen/Model/LegalEntityManagement/VerificationErrorRecursive.php index b867127a9..a4e602012 100644 --- a/src/Adyen/Model/LegalEntityManagement/VerificationErrorRecursive.php +++ b/src/Adyen/Model/LegalEntityManagement/VerificationErrorRecursive.php @@ -462,9 +462,6 @@ public function getCapabilities() */ 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( @@ -498,9 +495,6 @@ public function getCode() */ public function setCode($code) { - if (is_null($code)) { - throw new \InvalidArgumentException('non-nullable code cannot be null'); - } $this->container['code'] = $code; return $this; @@ -525,9 +519,6 @@ public function getMessage() */ public function setMessage($message) { - if (is_null($message)) { - throw new \InvalidArgumentException('non-nullable message cannot be null'); - } $this->container['message'] = $message; return $this; @@ -552,9 +543,6 @@ public function getType() */ 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( @@ -589,9 +577,6 @@ public function getRemediatingActions() */ public function setRemediatingActions($remediatingActions) { - if (is_null($remediatingActions)) { - throw new \InvalidArgumentException('non-nullable remediatingActions cannot be null'); - } $this->container['remediatingActions'] = $remediatingActions; return $this; diff --git a/src/Adyen/Model/LegalEntityManagement/VerificationErrors.php b/src/Adyen/Model/LegalEntityManagement/VerificationErrors.php index 813908555..46979620d 100644 --- a/src/Adyen/Model/LegalEntityManagement/VerificationErrors.php +++ b/src/Adyen/Model/LegalEntityManagement/VerificationErrors.php @@ -295,9 +295,6 @@ public function getProblems() */ public function setProblems($problems) { - if (is_null($problems)) { - throw new \InvalidArgumentException('non-nullable problems cannot be null'); - } $this->container['problems'] = $problems; return $this; diff --git a/src/Adyen/Model/LegalEntityManagement/WebData.php b/src/Adyen/Model/LegalEntityManagement/WebData.php index a6d370a50..2b0fb1a22 100644 --- a/src/Adyen/Model/LegalEntityManagement/WebData.php +++ b/src/Adyen/Model/LegalEntityManagement/WebData.php @@ -302,9 +302,6 @@ public function getWebAddress() */ public function setWebAddress($webAddress) { - if (is_null($webAddress)) { - throw new \InvalidArgumentException('non-nullable webAddress cannot be null'); - } $this->container['webAddress'] = $webAddress; return $this; @@ -329,9 +326,6 @@ public function getWebAddressId() */ public function setWebAddressId($webAddressId) { - if (is_null($webAddressId)) { - throw new \InvalidArgumentException('non-nullable webAddressId cannot be null'); - } $this->container['webAddressId'] = $webAddressId; return $this; diff --git a/src/Adyen/Model/LegalEntityManagement/WebDataExemption.php b/src/Adyen/Model/LegalEntityManagement/WebDataExemption.php index e61f6987e..addba895e 100644 --- a/src/Adyen/Model/LegalEntityManagement/WebDataExemption.php +++ b/src/Adyen/Model/LegalEntityManagement/WebDataExemption.php @@ -318,9 +318,6 @@ public function getReason() */ 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( diff --git a/src/Adyen/Model/Management/AdditionalCommission.php b/src/Adyen/Model/Management/AdditionalCommission.php index 07afc2959..2d1970938 100644 --- a/src/Adyen/Model/Management/AdditionalCommission.php +++ b/src/Adyen/Model/Management/AdditionalCommission.php @@ -309,9 +309,6 @@ public function getBalanceAccountId() */ public function setBalanceAccountId($balanceAccountId) { - if (is_null($balanceAccountId)) { - throw new \InvalidArgumentException('non-nullable balanceAccountId cannot be null'); - } $this->container['balanceAccountId'] = $balanceAccountId; return $this; @@ -336,9 +333,6 @@ public function getFixedAmount() */ public function setFixedAmount($fixedAmount) { - if (is_null($fixedAmount)) { - throw new \InvalidArgumentException('non-nullable fixedAmount cannot be null'); - } $this->container['fixedAmount'] = $fixedAmount; return $this; @@ -363,9 +357,6 @@ public function getVariablePercentage() */ public function setVariablePercentage($variablePercentage) { - if (is_null($variablePercentage)) { - throw new \InvalidArgumentException('non-nullable variablePercentage cannot be null'); - } $this->container['variablePercentage'] = $variablePercentage; return $this; diff --git a/src/Adyen/Model/Management/AdditionalSettings.php b/src/Adyen/Model/Management/AdditionalSettings.php index a6cb7f891..e661b66e3 100644 --- a/src/Adyen/Model/Management/AdditionalSettings.php +++ b/src/Adyen/Model/Management/AdditionalSettings.php @@ -302,9 +302,6 @@ public function getIncludeEventCodes() */ public function setIncludeEventCodes($includeEventCodes) { - if (is_null($includeEventCodes)) { - throw new \InvalidArgumentException('non-nullable includeEventCodes cannot be null'); - } $this->container['includeEventCodes'] = $includeEventCodes; return $this; @@ -329,9 +326,6 @@ public function getProperties() */ public function setProperties($properties) { - if (is_null($properties)) { - throw new \InvalidArgumentException('non-nullable properties cannot be null'); - } $this->container['properties'] = $properties; return $this; diff --git a/src/Adyen/Model/Management/AdditionalSettingsResponse.php b/src/Adyen/Model/Management/AdditionalSettingsResponse.php index e9919040c..1a53d0056 100644 --- a/src/Adyen/Model/Management/AdditionalSettingsResponse.php +++ b/src/Adyen/Model/Management/AdditionalSettingsResponse.php @@ -309,9 +309,6 @@ public function getExcludeEventCodes() */ public function setExcludeEventCodes($excludeEventCodes) { - if (is_null($excludeEventCodes)) { - throw new \InvalidArgumentException('non-nullable excludeEventCodes cannot be null'); - } $this->container['excludeEventCodes'] = $excludeEventCodes; return $this; @@ -336,9 +333,6 @@ public function getIncludeEventCodes() */ public function setIncludeEventCodes($includeEventCodes) { - if (is_null($includeEventCodes)) { - throw new \InvalidArgumentException('non-nullable includeEventCodes cannot be null'); - } $this->container['includeEventCodes'] = $includeEventCodes; return $this; @@ -363,9 +357,6 @@ public function getProperties() */ public function setProperties($properties) { - if (is_null($properties)) { - throw new \InvalidArgumentException('non-nullable properties cannot be null'); - } $this->container['properties'] = $properties; return $this; diff --git a/src/Adyen/Model/Management/Address.php b/src/Adyen/Model/Management/Address.php index cf7e987ad..016d5ab4b 100644 --- a/src/Adyen/Model/Management/Address.php +++ b/src/Adyen/Model/Management/Address.php @@ -337,9 +337,6 @@ public function getCity() */ public function setCity($city) { - if (is_null($city)) { - throw new \InvalidArgumentException('non-nullable city cannot be null'); - } $this->container['city'] = $city; return $this; @@ -364,9 +361,6 @@ public function getCompanyName() */ public function setCompanyName($companyName) { - if (is_null($companyName)) { - throw new \InvalidArgumentException('non-nullable companyName cannot be null'); - } $this->container['companyName'] = $companyName; return $this; @@ -391,9 +385,6 @@ public function getCountry() */ public function setCountry($country) { - if (is_null($country)) { - throw new \InvalidArgumentException('non-nullable country cannot be null'); - } $this->container['country'] = $country; return $this; @@ -418,9 +409,6 @@ public function getPostalCode() */ public function setPostalCode($postalCode) { - if (is_null($postalCode)) { - throw new \InvalidArgumentException('non-nullable postalCode cannot be null'); - } $this->container['postalCode'] = $postalCode; return $this; @@ -445,9 +433,6 @@ public function getStateOrProvince() */ public function setStateOrProvince($stateOrProvince) { - if (is_null($stateOrProvince)) { - throw new \InvalidArgumentException('non-nullable stateOrProvince cannot be null'); - } $this->container['stateOrProvince'] = $stateOrProvince; return $this; @@ -472,9 +457,6 @@ public function getStreetAddress() */ public function setStreetAddress($streetAddress) { - if (is_null($streetAddress)) { - throw new \InvalidArgumentException('non-nullable streetAddress cannot be null'); - } $this->container['streetAddress'] = $streetAddress; return $this; @@ -499,9 +481,6 @@ public function getStreetAddress2() */ public function setStreetAddress2($streetAddress2) { - if (is_null($streetAddress2)) { - throw new \InvalidArgumentException('non-nullable streetAddress2 cannot be null'); - } $this->container['streetAddress2'] = $streetAddress2; return $this; diff --git a/src/Adyen/Model/Management/AfterpayTouchInfo.php b/src/Adyen/Model/Management/AfterpayTouchInfo.php index 896c2f093..8967a99c6 100644 --- a/src/Adyen/Model/Management/AfterpayTouchInfo.php +++ b/src/Adyen/Model/Management/AfterpayTouchInfo.php @@ -298,9 +298,6 @@ public function getSupportUrl() */ public function setSupportUrl($supportUrl) { - if (is_null($supportUrl)) { - throw new \InvalidArgumentException('non-nullable supportUrl cannot be null'); - } $this->container['supportUrl'] = $supportUrl; return $this; diff --git a/src/Adyen/Model/Management/AllowedOrigin.php b/src/Adyen/Model/Management/AllowedOrigin.php index 892c9cd23..b111ea1f7 100644 --- a/src/Adyen/Model/Management/AllowedOrigin.php +++ b/src/Adyen/Model/Management/AllowedOrigin.php @@ -312,9 +312,6 @@ public function getLinks() */ public function setLinks($links) { - if (is_null($links)) { - throw new \InvalidArgumentException('non-nullable links cannot be null'); - } $this->container['links'] = $links; return $this; @@ -339,9 +336,6 @@ public function getDomain() */ public function setDomain($domain) { - if (is_null($domain)) { - throw new \InvalidArgumentException('non-nullable domain cannot be null'); - } $this->container['domain'] = $domain; return $this; @@ -366,9 +360,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; diff --git a/src/Adyen/Model/Management/AllowedOriginsResponse.php b/src/Adyen/Model/Management/AllowedOriginsResponse.php index 8565121ea..d99757458 100644 --- a/src/Adyen/Model/Management/AllowedOriginsResponse.php +++ b/src/Adyen/Model/Management/AllowedOriginsResponse.php @@ -295,9 +295,6 @@ public function getData() */ public function setData($data) { - if (is_null($data)) { - throw new \InvalidArgumentException('non-nullable data cannot be null'); - } $this->container['data'] = $data; return $this; diff --git a/src/Adyen/Model/Management/AmexInfo.php b/src/Adyen/Model/Management/AmexInfo.php index 7f36ef654..922eb29b4 100644 --- a/src/Adyen/Model/Management/AmexInfo.php +++ b/src/Adyen/Model/Management/AmexInfo.php @@ -337,9 +337,6 @@ public function getMidNumber() */ public function setMidNumber($midNumber) { - if (is_null($midNumber)) { - throw new \InvalidArgumentException('non-nullable midNumber cannot be null'); - } $this->container['midNumber'] = $midNumber; return $this; @@ -364,9 +361,6 @@ public function getReuseMidNumber() */ public function setReuseMidNumber($reuseMidNumber) { - if (is_null($reuseMidNumber)) { - throw new \InvalidArgumentException('non-nullable reuseMidNumber cannot be null'); - } $this->container['reuseMidNumber'] = $reuseMidNumber; return $this; @@ -391,9 +385,6 @@ public function getServiceLevel() */ public function setServiceLevel($serviceLevel) { - if (is_null($serviceLevel)) { - throw new \InvalidArgumentException('non-nullable serviceLevel cannot be null'); - } $allowedValues = $this->getServiceLevelAllowableValues(); if (!in_array($serviceLevel, $allowedValues, true)) { throw new \InvalidArgumentException( diff --git a/src/Adyen/Model/Management/Amount.php b/src/Adyen/Model/Management/Amount.php index 326940096..336534841 100644 --- a/src/Adyen/Model/Management/Amount.php +++ b/src/Adyen/Model/Management/Amount.php @@ -308,9 +308,6 @@ public function getCurrency() */ public function setCurrency($currency) { - if (is_null($currency)) { - throw new \InvalidArgumentException('non-nullable currency cannot be null'); - } $this->container['currency'] = $currency; return $this; @@ -335,9 +332,6 @@ public function getValue() */ public function setValue($value) { - if (is_null($value)) { - throw new \InvalidArgumentException('non-nullable value cannot be null'); - } $this->container['value'] = $value; return $this; diff --git a/src/Adyen/Model/Management/AndroidApp.php b/src/Adyen/Model/Management/AndroidApp.php index e9ac9e330..27f706890 100644 --- a/src/Adyen/Model/Management/AndroidApp.php +++ b/src/Adyen/Model/Management/AndroidApp.php @@ -357,9 +357,6 @@ public function getDescription() */ public function setDescription($description) { - if (is_null($description)) { - throw new \InvalidArgumentException('non-nullable description cannot be null'); - } $this->container['description'] = $description; return $this; @@ -386,9 +383,6 @@ public function getErrorCode() */ public function setErrorCode($errorCode) { - if (is_null($errorCode)) { - throw new \InvalidArgumentException('non-nullable errorCode cannot be null'); - } $this->container['errorCode'] = $errorCode; return $this; @@ -413,9 +407,6 @@ public function getErrors() */ public function setErrors($errors) { - if (is_null($errors)) { - throw new \InvalidArgumentException('non-nullable errors cannot be null'); - } $this->container['errors'] = $errors; return $this; @@ -440,9 +431,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -467,9 +455,6 @@ public function getLabel() */ public function setLabel($label) { - if (is_null($label)) { - throw new \InvalidArgumentException('non-nullable label cannot be null'); - } $this->container['label'] = $label; return $this; @@ -494,9 +479,6 @@ public function getPackageName() */ public function setPackageName($packageName) { - if (is_null($packageName)) { - throw new \InvalidArgumentException('non-nullable packageName cannot be null'); - } $this->container['packageName'] = $packageName; return $this; @@ -521,9 +503,6 @@ public function getStatus() */ public function setStatus($status) { - if (is_null($status)) { - throw new \InvalidArgumentException('non-nullable status cannot be null'); - } $this->container['status'] = $status; return $this; @@ -548,7 +527,6 @@ public function getVersionCode() */ public function setVersionCode($versionCode) { - // Do nothing for nullable integers $this->container['versionCode'] = $versionCode; return $this; @@ -573,9 +551,6 @@ public function getVersionName() */ public function setVersionName($versionName) { - if (is_null($versionName)) { - throw new \InvalidArgumentException('non-nullable versionName cannot be null'); - } $this->container['versionName'] = $versionName; return $this; diff --git a/src/Adyen/Model/Management/AndroidAppError.php b/src/Adyen/Model/Management/AndroidAppError.php index 27942de25..461f47937 100644 --- a/src/Adyen/Model/Management/AndroidAppError.php +++ b/src/Adyen/Model/Management/AndroidAppError.php @@ -302,9 +302,6 @@ public function getErrorCode() */ public function setErrorCode($errorCode) { - if (is_null($errorCode)) { - throw new \InvalidArgumentException('non-nullable errorCode cannot be null'); - } $this->container['errorCode'] = $errorCode; return $this; @@ -329,9 +326,6 @@ public function getTerminalModels() */ public function setTerminalModels($terminalModels) { - if (is_null($terminalModels)) { - throw new \InvalidArgumentException('non-nullable terminalModels cannot be null'); - } $this->container['terminalModels'] = $terminalModels; return $this; diff --git a/src/Adyen/Model/Management/AndroidAppsResponse.php b/src/Adyen/Model/Management/AndroidAppsResponse.php index 3192b5afb..3ec9cf85d 100644 --- a/src/Adyen/Model/Management/AndroidAppsResponse.php +++ b/src/Adyen/Model/Management/AndroidAppsResponse.php @@ -295,9 +295,6 @@ public function getData() */ public function setData($data) { - if (is_null($data)) { - throw new \InvalidArgumentException('non-nullable data cannot be null'); - } $this->container['data'] = $data; return $this; diff --git a/src/Adyen/Model/Management/AndroidCertificate.php b/src/Adyen/Model/Management/AndroidCertificate.php index 6ef978cb6..654f18ba0 100644 --- a/src/Adyen/Model/Management/AndroidCertificate.php +++ b/src/Adyen/Model/Management/AndroidCertificate.php @@ -340,9 +340,6 @@ public function getDescription() */ public function setDescription($description) { - if (is_null($description)) { - throw new \InvalidArgumentException('non-nullable description cannot be null'); - } $this->container['description'] = $description; return $this; @@ -367,9 +364,6 @@ public function getExtension() */ public function setExtension($extension) { - if (is_null($extension)) { - throw new \InvalidArgumentException('non-nullable extension cannot be null'); - } $this->container['extension'] = $extension; return $this; @@ -394,9 +388,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -421,9 +412,6 @@ public function getName() */ public function setName($name) { - if (is_null($name)) { - throw new \InvalidArgumentException('non-nullable name cannot be null'); - } $this->container['name'] = $name; return $this; @@ -448,9 +436,6 @@ public function getNotAfter() */ public function setNotAfter($notAfter) { - if (is_null($notAfter)) { - throw new \InvalidArgumentException('non-nullable notAfter cannot be null'); - } $this->container['notAfter'] = $notAfter; return $this; @@ -475,9 +460,6 @@ public function getNotBefore() */ public function setNotBefore($notBefore) { - if (is_null($notBefore)) { - throw new \InvalidArgumentException('non-nullable notBefore cannot be null'); - } $this->container['notBefore'] = $notBefore; return $this; @@ -502,9 +484,6 @@ public function getStatus() */ public function setStatus($status) { - if (is_null($status)) { - throw new \InvalidArgumentException('non-nullable status cannot be null'); - } $this->container['status'] = $status; return $this; diff --git a/src/Adyen/Model/Management/AndroidCertificatesResponse.php b/src/Adyen/Model/Management/AndroidCertificatesResponse.php index 94dc61bbe..3052f3114 100644 --- a/src/Adyen/Model/Management/AndroidCertificatesResponse.php +++ b/src/Adyen/Model/Management/AndroidCertificatesResponse.php @@ -295,9 +295,6 @@ public function getData() */ public function setData($data) { - if (is_null($data)) { - throw new \InvalidArgumentException('non-nullable data cannot be null'); - } $this->container['data'] = $data; return $this; diff --git a/src/Adyen/Model/Management/ApiCredential.php b/src/Adyen/Model/Management/ApiCredential.php index a87bd2d31..077dd6e84 100644 --- a/src/Adyen/Model/Management/ApiCredential.php +++ b/src/Adyen/Model/Management/ApiCredential.php @@ -369,9 +369,6 @@ public function getLinks() */ public function setLinks($links) { - if (is_null($links)) { - throw new \InvalidArgumentException('non-nullable links cannot be null'); - } $this->container['links'] = $links; return $this; @@ -396,9 +393,6 @@ public function getActive() */ public function setActive($active) { - if (is_null($active)) { - throw new \InvalidArgumentException('non-nullable active cannot be null'); - } $this->container['active'] = $active; return $this; @@ -423,9 +417,6 @@ public function getAllowedIpAddresses() */ public function setAllowedIpAddresses($allowedIpAddresses) { - if (is_null($allowedIpAddresses)) { - throw new \InvalidArgumentException('non-nullable allowedIpAddresses cannot be null'); - } $this->container['allowedIpAddresses'] = $allowedIpAddresses; return $this; @@ -450,9 +441,6 @@ public function getAllowedOrigins() */ public function setAllowedOrigins($allowedOrigins) { - if (is_null($allowedOrigins)) { - throw new \InvalidArgumentException('non-nullable allowedOrigins cannot be null'); - } $this->container['allowedOrigins'] = $allowedOrigins; return $this; @@ -477,9 +465,6 @@ public function getClientKey() */ public function setClientKey($clientKey) { - if (is_null($clientKey)) { - throw new \InvalidArgumentException('non-nullable clientKey cannot be null'); - } $this->container['clientKey'] = $clientKey; return $this; @@ -504,9 +489,6 @@ public function getDescription() */ public function setDescription($description) { - if (is_null($description)) { - throw new \InvalidArgumentException('non-nullable description cannot be null'); - } $this->container['description'] = $description; return $this; @@ -531,9 +513,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -558,9 +537,6 @@ public function getRoles() */ public function setRoles($roles) { - if (is_null($roles)) { - throw new \InvalidArgumentException('non-nullable roles cannot be null'); - } $this->container['roles'] = $roles; return $this; @@ -585,9 +561,6 @@ public function getUsername() */ public function setUsername($username) { - if (is_null($username)) { - throw new \InvalidArgumentException('non-nullable username cannot be null'); - } $this->container['username'] = $username; return $this; diff --git a/src/Adyen/Model/Management/ApiCredentialLinks.php b/src/Adyen/Model/Management/ApiCredentialLinks.php index 1783ba269..9a9d33cf8 100644 --- a/src/Adyen/Model/Management/ApiCredentialLinks.php +++ b/src/Adyen/Model/Management/ApiCredentialLinks.php @@ -333,9 +333,6 @@ public function getAllowedOrigins() */ public function setAllowedOrigins($allowedOrigins) { - if (is_null($allowedOrigins)) { - throw new \InvalidArgumentException('non-nullable allowedOrigins cannot be null'); - } $this->container['allowedOrigins'] = $allowedOrigins; return $this; @@ -360,9 +357,6 @@ public function getCompany() */ public function setCompany($company) { - if (is_null($company)) { - throw new \InvalidArgumentException('non-nullable company cannot be null'); - } $this->container['company'] = $company; return $this; @@ -387,9 +381,6 @@ public function getGenerateApiKey() */ public function setGenerateApiKey($generateApiKey) { - if (is_null($generateApiKey)) { - throw new \InvalidArgumentException('non-nullable generateApiKey cannot be null'); - } $this->container['generateApiKey'] = $generateApiKey; return $this; @@ -414,9 +405,6 @@ public function getGenerateClientKey() */ public function setGenerateClientKey($generateClientKey) { - if (is_null($generateClientKey)) { - throw new \InvalidArgumentException('non-nullable generateClientKey cannot be null'); - } $this->container['generateClientKey'] = $generateClientKey; return $this; @@ -441,9 +429,6 @@ public function getMerchant() */ public function setMerchant($merchant) { - if (is_null($merchant)) { - throw new \InvalidArgumentException('non-nullable merchant cannot be null'); - } $this->container['merchant'] = $merchant; return $this; @@ -468,9 +453,6 @@ public function getSelf() */ public function setSelf($self) { - if (is_null($self)) { - throw new \InvalidArgumentException('non-nullable self cannot be null'); - } $this->container['self'] = $self; return $this; diff --git a/src/Adyen/Model/Management/ApplePayInfo.php b/src/Adyen/Model/Management/ApplePayInfo.php index 0ca9f334e..9e8737aae 100644 --- a/src/Adyen/Model/Management/ApplePayInfo.php +++ b/src/Adyen/Model/Management/ApplePayInfo.php @@ -298,9 +298,6 @@ public function getDomains() */ public function setDomains($domains) { - if (is_null($domains)) { - throw new \InvalidArgumentException('non-nullable domains cannot be null'); - } $this->container['domains'] = $domains; return $this; diff --git a/src/Adyen/Model/Management/BcmcInfo.php b/src/Adyen/Model/Management/BcmcInfo.php index 168620464..24007aa57 100644 --- a/src/Adyen/Model/Management/BcmcInfo.php +++ b/src/Adyen/Model/Management/BcmcInfo.php @@ -295,9 +295,6 @@ public function getEnableBcmcMobile() */ public function setEnableBcmcMobile($enableBcmcMobile) { - if (is_null($enableBcmcMobile)) { - throw new \InvalidArgumentException('non-nullable enableBcmcMobile cannot be null'); - } $this->container['enableBcmcMobile'] = $enableBcmcMobile; return $this; diff --git a/src/Adyen/Model/Management/BillingEntitiesResponse.php b/src/Adyen/Model/Management/BillingEntitiesResponse.php index 7cca776cf..1160f61ec 100644 --- a/src/Adyen/Model/Management/BillingEntitiesResponse.php +++ b/src/Adyen/Model/Management/BillingEntitiesResponse.php @@ -295,9 +295,6 @@ public function getData() */ public function setData($data) { - if (is_null($data)) { - throw new \InvalidArgumentException('non-nullable data cannot be null'); - } $this->container['data'] = $data; return $this; diff --git a/src/Adyen/Model/Management/BillingEntity.php b/src/Adyen/Model/Management/BillingEntity.php index d4d24ca2e..99731d57c 100644 --- a/src/Adyen/Model/Management/BillingEntity.php +++ b/src/Adyen/Model/Management/BillingEntity.php @@ -323,9 +323,6 @@ public function getAddress() */ public function setAddress($address) { - if (is_null($address)) { - throw new \InvalidArgumentException('non-nullable address cannot be null'); - } $this->container['address'] = $address; return $this; @@ -350,9 +347,6 @@ public function getEmail() */ public function setEmail($email) { - if (is_null($email)) { - throw new \InvalidArgumentException('non-nullable email cannot be null'); - } $this->container['email'] = $email; return $this; @@ -377,9 +371,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -404,9 +395,6 @@ public function getName() */ public function setName($name) { - if (is_null($name)) { - throw new \InvalidArgumentException('non-nullable name cannot be null'); - } $this->container['name'] = $name; return $this; @@ -431,9 +419,6 @@ public function getTaxId() */ public function setTaxId($taxId) { - if (is_null($taxId)) { - throw new \InvalidArgumentException('non-nullable taxId cannot be null'); - } $this->container['taxId'] = $taxId; return $this; diff --git a/src/Adyen/Model/Management/CardholderReceipt.php b/src/Adyen/Model/Management/CardholderReceipt.php index 0345558bc..895a15eae 100644 --- a/src/Adyen/Model/Management/CardholderReceipt.php +++ b/src/Adyen/Model/Management/CardholderReceipt.php @@ -295,9 +295,6 @@ public function getHeaderForAuthorizedReceipt() */ public function setHeaderForAuthorizedReceipt($headerForAuthorizedReceipt) { - if (is_null($headerForAuthorizedReceipt)) { - throw new \InvalidArgumentException('non-nullable headerForAuthorizedReceipt cannot be null'); - } $this->container['headerForAuthorizedReceipt'] = $headerForAuthorizedReceipt; return $this; diff --git a/src/Adyen/Model/Management/CartesBancairesInfo.php b/src/Adyen/Model/Management/CartesBancairesInfo.php index 0bc970bfd..a597f2678 100644 --- a/src/Adyen/Model/Management/CartesBancairesInfo.php +++ b/src/Adyen/Model/Management/CartesBancairesInfo.php @@ -305,9 +305,6 @@ public function getSiret() */ public function setSiret($siret) { - if (is_null($siret)) { - throw new \InvalidArgumentException('non-nullable siret cannot be null'); - } $this->container['siret'] = $siret; return $this; @@ -332,9 +329,6 @@ public function getTransactionDescription() */ public function setTransactionDescription($transactionDescription) { - if (is_null($transactionDescription)) { - throw new \InvalidArgumentException('non-nullable transactionDescription cannot be null'); - } $this->container['transactionDescription'] = $transactionDescription; return $this; diff --git a/src/Adyen/Model/Management/ClearpayInfo.php b/src/Adyen/Model/Management/ClearpayInfo.php index 5914d37e5..cab0148c2 100644 --- a/src/Adyen/Model/Management/ClearpayInfo.php +++ b/src/Adyen/Model/Management/ClearpayInfo.php @@ -298,9 +298,6 @@ public function getSupportUrl() */ public function setSupportUrl($supportUrl) { - if (is_null($supportUrl)) { - throw new \InvalidArgumentException('non-nullable supportUrl cannot be null'); - } $this->container['supportUrl'] = $supportUrl; return $this; diff --git a/src/Adyen/Model/Management/Commission.php b/src/Adyen/Model/Management/Commission.php index 9973ffe27..1aaea2278 100644 --- a/src/Adyen/Model/Management/Commission.php +++ b/src/Adyen/Model/Management/Commission.php @@ -302,9 +302,6 @@ public function getFixedAmount() */ public function setFixedAmount($fixedAmount) { - if (is_null($fixedAmount)) { - throw new \InvalidArgumentException('non-nullable fixedAmount cannot be null'); - } $this->container['fixedAmount'] = $fixedAmount; return $this; @@ -329,9 +326,6 @@ public function getVariablePercentage() */ public function setVariablePercentage($variablePercentage) { - if (is_null($variablePercentage)) { - throw new \InvalidArgumentException('non-nullable variablePercentage cannot be null'); - } $this->container['variablePercentage'] = $variablePercentage; return $this; diff --git a/src/Adyen/Model/Management/Company.php b/src/Adyen/Model/Management/Company.php index b91f84d1c..4b2037d0f 100644 --- a/src/Adyen/Model/Management/Company.php +++ b/src/Adyen/Model/Management/Company.php @@ -337,9 +337,6 @@ public function getLinks() */ public function setLinks($links) { - if (is_null($links)) { - throw new \InvalidArgumentException('non-nullable links cannot be null'); - } $this->container['links'] = $links; return $this; @@ -364,9 +361,6 @@ public function getDataCenters() */ public function setDataCenters($dataCenters) { - if (is_null($dataCenters)) { - throw new \InvalidArgumentException('non-nullable dataCenters cannot be null'); - } $this->container['dataCenters'] = $dataCenters; return $this; @@ -391,9 +385,6 @@ public function getDescription() */ public function setDescription($description) { - if (is_null($description)) { - throw new \InvalidArgumentException('non-nullable description cannot be null'); - } $this->container['description'] = $description; return $this; @@ -418,9 +409,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -445,9 +433,6 @@ public function getName() */ public function setName($name) { - if (is_null($name)) { - throw new \InvalidArgumentException('non-nullable name cannot be null'); - } $this->container['name'] = $name; return $this; @@ -472,9 +457,6 @@ public function getReference() */ public function setReference($reference) { - if (is_null($reference)) { - throw new \InvalidArgumentException('non-nullable reference cannot be null'); - } $this->container['reference'] = $reference; return $this; @@ -499,9 +481,6 @@ public function getStatus() */ public function setStatus($status) { - if (is_null($status)) { - throw new \InvalidArgumentException('non-nullable status cannot be null'); - } $this->container['status'] = $status; return $this; diff --git a/src/Adyen/Model/Management/CompanyApiCredential.php b/src/Adyen/Model/Management/CompanyApiCredential.php index 01d48aca4..d5d4463c9 100644 --- a/src/Adyen/Model/Management/CompanyApiCredential.php +++ b/src/Adyen/Model/Management/CompanyApiCredential.php @@ -376,9 +376,6 @@ public function getLinks() */ public function setLinks($links) { - if (is_null($links)) { - throw new \InvalidArgumentException('non-nullable links cannot be null'); - } $this->container['links'] = $links; return $this; @@ -403,9 +400,6 @@ public function getActive() */ public function setActive($active) { - if (is_null($active)) { - throw new \InvalidArgumentException('non-nullable active cannot be null'); - } $this->container['active'] = $active; return $this; @@ -430,9 +424,6 @@ public function getAllowedIpAddresses() */ public function setAllowedIpAddresses($allowedIpAddresses) { - if (is_null($allowedIpAddresses)) { - throw new \InvalidArgumentException('non-nullable allowedIpAddresses cannot be null'); - } $this->container['allowedIpAddresses'] = $allowedIpAddresses; return $this; @@ -457,9 +448,6 @@ public function getAllowedOrigins() */ public function setAllowedOrigins($allowedOrigins) { - if (is_null($allowedOrigins)) { - throw new \InvalidArgumentException('non-nullable allowedOrigins cannot be null'); - } $this->container['allowedOrigins'] = $allowedOrigins; return $this; @@ -484,9 +472,6 @@ public function getAssociatedMerchantAccounts() */ public function setAssociatedMerchantAccounts($associatedMerchantAccounts) { - if (is_null($associatedMerchantAccounts)) { - throw new \InvalidArgumentException('non-nullable associatedMerchantAccounts cannot be null'); - } $this->container['associatedMerchantAccounts'] = $associatedMerchantAccounts; return $this; @@ -511,9 +496,6 @@ public function getClientKey() */ public function setClientKey($clientKey) { - if (is_null($clientKey)) { - throw new \InvalidArgumentException('non-nullable clientKey cannot be null'); - } $this->container['clientKey'] = $clientKey; return $this; @@ -538,9 +520,6 @@ public function getDescription() */ public function setDescription($description) { - if (is_null($description)) { - throw new \InvalidArgumentException('non-nullable description cannot be null'); - } $this->container['description'] = $description; return $this; @@ -565,9 +544,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -592,9 +568,6 @@ public function getRoles() */ public function setRoles($roles) { - if (is_null($roles)) { - throw new \InvalidArgumentException('non-nullable roles cannot be null'); - } $this->container['roles'] = $roles; return $this; @@ -619,9 +592,6 @@ public function getUsername() */ public function setUsername($username) { - if (is_null($username)) { - throw new \InvalidArgumentException('non-nullable username cannot be null'); - } $this->container['username'] = $username; return $this; diff --git a/src/Adyen/Model/Management/CompanyLinks.php b/src/Adyen/Model/Management/CompanyLinks.php index 373580a44..6c4cefd0c 100644 --- a/src/Adyen/Model/Management/CompanyLinks.php +++ b/src/Adyen/Model/Management/CompanyLinks.php @@ -319,9 +319,6 @@ public function getApiCredentials() */ public function setApiCredentials($apiCredentials) { - if (is_null($apiCredentials)) { - throw new \InvalidArgumentException('non-nullable apiCredentials cannot be null'); - } $this->container['apiCredentials'] = $apiCredentials; return $this; @@ -346,9 +343,6 @@ public function getSelf() */ public function setSelf($self) { - if (is_null($self)) { - throw new \InvalidArgumentException('non-nullable self cannot be null'); - } $this->container['self'] = $self; return $this; @@ -373,9 +367,6 @@ public function getUsers() */ public function setUsers($users) { - if (is_null($users)) { - throw new \InvalidArgumentException('non-nullable users cannot be null'); - } $this->container['users'] = $users; return $this; @@ -400,9 +391,6 @@ public function getWebhooks() */ public function setWebhooks($webhooks) { - if (is_null($webhooks)) { - throw new \InvalidArgumentException('non-nullable webhooks cannot be null'); - } $this->container['webhooks'] = $webhooks; return $this; diff --git a/src/Adyen/Model/Management/CompanyUser.php b/src/Adyen/Model/Management/CompanyUser.php index 82963ce8e..f061b104e 100644 --- a/src/Adyen/Model/Management/CompanyUser.php +++ b/src/Adyen/Model/Management/CompanyUser.php @@ -380,9 +380,6 @@ public function getLinks() */ public function setLinks($links) { - if (is_null($links)) { - throw new \InvalidArgumentException('non-nullable links cannot be null'); - } $this->container['links'] = $links; return $this; @@ -407,9 +404,6 @@ public function getAccountGroups() */ public function setAccountGroups($accountGroups) { - if (is_null($accountGroups)) { - throw new \InvalidArgumentException('non-nullable accountGroups cannot be null'); - } $this->container['accountGroups'] = $accountGroups; return $this; @@ -434,9 +428,6 @@ public function getActive() */ public function setActive($active) { - if (is_null($active)) { - throw new \InvalidArgumentException('non-nullable active cannot be null'); - } $this->container['active'] = $active; return $this; @@ -461,9 +452,6 @@ public function getApps() */ public function setApps($apps) { - if (is_null($apps)) { - throw new \InvalidArgumentException('non-nullable apps cannot be null'); - } $this->container['apps'] = $apps; return $this; @@ -488,9 +476,6 @@ public function getAssociatedMerchantAccounts() */ public function setAssociatedMerchantAccounts($associatedMerchantAccounts) { - if (is_null($associatedMerchantAccounts)) { - throw new \InvalidArgumentException('non-nullable associatedMerchantAccounts cannot be null'); - } $this->container['associatedMerchantAccounts'] = $associatedMerchantAccounts; return $this; @@ -515,9 +500,6 @@ public function getEmail() */ public function setEmail($email) { - if (is_null($email)) { - throw new \InvalidArgumentException('non-nullable email cannot be null'); - } $this->container['email'] = $email; return $this; @@ -542,9 +524,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -569,9 +548,6 @@ public function getName() */ public function setName($name) { - if (is_null($name)) { - throw new \InvalidArgumentException('non-nullable name cannot be null'); - } $this->container['name'] = $name; return $this; @@ -596,9 +572,6 @@ public function getRoles() */ public function setRoles($roles) { - if (is_null($roles)) { - throw new \InvalidArgumentException('non-nullable roles cannot be null'); - } $this->container['roles'] = $roles; return $this; @@ -623,9 +596,6 @@ public function getTimeZoneCode() */ public function setTimeZoneCode($timeZoneCode) { - if (is_null($timeZoneCode)) { - throw new \InvalidArgumentException('non-nullable timeZoneCode cannot be null'); - } $this->container['timeZoneCode'] = $timeZoneCode; return $this; @@ -650,9 +620,6 @@ public function getUsername() */ public function setUsername($username) { - if (is_null($username)) { - throw new \InvalidArgumentException('non-nullable username cannot be null'); - } $this->container['username'] = $username; return $this; diff --git a/src/Adyen/Model/Management/Configuration.php b/src/Adyen/Model/Management/Configuration.php index 61a2ace68..95e562435 100644 --- a/src/Adyen/Model/Management/Configuration.php +++ b/src/Adyen/Model/Management/Configuration.php @@ -322,9 +322,6 @@ public function getBrand() */ public function setBrand($brand) { - if (is_null($brand)) { - throw new \InvalidArgumentException('non-nullable brand cannot be null'); - } $this->container['brand'] = $brand; return $this; @@ -349,9 +346,6 @@ public function getCountry() */ public function setCountry($country) { - if (is_null($country)) { - throw new \InvalidArgumentException('non-nullable country cannot be null'); - } $this->container['country'] = $country; return $this; @@ -376,9 +370,6 @@ public function getCurrencies() */ public function setCurrencies($currencies) { - if (is_null($currencies)) { - throw new \InvalidArgumentException('non-nullable currencies cannot be null'); - } $this->container['currencies'] = $currencies; return $this; @@ -403,9 +394,6 @@ public function getSources() */ public function setSources($sources) { - if (is_null($sources)) { - throw new \InvalidArgumentException('non-nullable sources cannot be null'); - } $this->container['sources'] = $sources; return $this; diff --git a/src/Adyen/Model/Management/Connectivity.php b/src/Adyen/Model/Management/Connectivity.php index 7dbcfd0ac..0ab0df53d 100644 --- a/src/Adyen/Model/Management/Connectivity.php +++ b/src/Adyen/Model/Management/Connectivity.php @@ -318,9 +318,6 @@ public function getSimcardStatus() */ public function setSimcardStatus($simcardStatus) { - if (is_null($simcardStatus)) { - throw new \InvalidArgumentException('non-nullable simcardStatus cannot be null'); - } $allowedValues = $this->getSimcardStatusAllowableValues(); if (!in_array($simcardStatus, $allowedValues, true)) { throw new \InvalidArgumentException( diff --git a/src/Adyen/Model/Management/Contact.php b/src/Adyen/Model/Management/Contact.php index af2efaf79..fe551b4a8 100644 --- a/src/Adyen/Model/Management/Contact.php +++ b/src/Adyen/Model/Management/Contact.php @@ -323,9 +323,6 @@ public function getEmail() */ public function setEmail($email) { - if (is_null($email)) { - throw new \InvalidArgumentException('non-nullable email cannot be null'); - } $this->container['email'] = $email; return $this; @@ -350,9 +347,6 @@ public function getFirstName() */ public function setFirstName($firstName) { - if (is_null($firstName)) { - throw new \InvalidArgumentException('non-nullable firstName cannot be null'); - } $this->container['firstName'] = $firstName; return $this; @@ -377,9 +371,6 @@ public function getInfix() */ public function setInfix($infix) { - if (is_null($infix)) { - throw new \InvalidArgumentException('non-nullable infix cannot be null'); - } $this->container['infix'] = $infix; return $this; @@ -404,9 +395,6 @@ public function getLastName() */ public function setLastName($lastName) { - if (is_null($lastName)) { - throw new \InvalidArgumentException('non-nullable lastName cannot be null'); - } $this->container['lastName'] = $lastName; return $this; @@ -431,9 +419,6 @@ public function getPhoneNumber() */ public function setPhoneNumber($phoneNumber) { - if (is_null($phoneNumber)) { - throw new \InvalidArgumentException('non-nullable phoneNumber cannot be null'); - } $this->container['phoneNumber'] = $phoneNumber; return $this; diff --git a/src/Adyen/Model/Management/CreateAllowedOriginRequest.php b/src/Adyen/Model/Management/CreateAllowedOriginRequest.php index 5287ae56f..949f8f932 100644 --- a/src/Adyen/Model/Management/CreateAllowedOriginRequest.php +++ b/src/Adyen/Model/Management/CreateAllowedOriginRequest.php @@ -312,9 +312,6 @@ public function getLinks() */ public function setLinks($links) { - if (is_null($links)) { - throw new \InvalidArgumentException('non-nullable links cannot be null'); - } $this->container['links'] = $links; return $this; @@ -339,9 +336,6 @@ public function getDomain() */ public function setDomain($domain) { - if (is_null($domain)) { - throw new \InvalidArgumentException('non-nullable domain cannot be null'); - } $this->container['domain'] = $domain; return $this; @@ -366,9 +360,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; diff --git a/src/Adyen/Model/Management/CreateApiCredentialResponse.php b/src/Adyen/Model/Management/CreateApiCredentialResponse.php index d5fadaac7..b13fa5cf7 100644 --- a/src/Adyen/Model/Management/CreateApiCredentialResponse.php +++ b/src/Adyen/Model/Management/CreateApiCredentialResponse.php @@ -389,9 +389,6 @@ public function getLinks() */ public function setLinks($links) { - if (is_null($links)) { - throw new \InvalidArgumentException('non-nullable links cannot be null'); - } $this->container['links'] = $links; return $this; @@ -416,9 +413,6 @@ public function getActive() */ public function setActive($active) { - if (is_null($active)) { - throw new \InvalidArgumentException('non-nullable active cannot be null'); - } $this->container['active'] = $active; return $this; @@ -443,9 +437,6 @@ public function getAllowedIpAddresses() */ public function setAllowedIpAddresses($allowedIpAddresses) { - if (is_null($allowedIpAddresses)) { - throw new \InvalidArgumentException('non-nullable allowedIpAddresses cannot be null'); - } $this->container['allowedIpAddresses'] = $allowedIpAddresses; return $this; @@ -470,9 +461,6 @@ public function getAllowedOrigins() */ public function setAllowedOrigins($allowedOrigins) { - if (is_null($allowedOrigins)) { - throw new \InvalidArgumentException('non-nullable allowedOrigins cannot be null'); - } $this->container['allowedOrigins'] = $allowedOrigins; return $this; @@ -497,9 +485,6 @@ public function getApiKey() */ public function setApiKey($apiKey) { - if (is_null($apiKey)) { - throw new \InvalidArgumentException('non-nullable apiKey cannot be null'); - } $this->container['apiKey'] = $apiKey; return $this; @@ -524,9 +509,6 @@ public function getClientKey() */ public function setClientKey($clientKey) { - if (is_null($clientKey)) { - throw new \InvalidArgumentException('non-nullable clientKey cannot be null'); - } $this->container['clientKey'] = $clientKey; return $this; @@ -551,9 +533,6 @@ public function getDescription() */ public function setDescription($description) { - if (is_null($description)) { - throw new \InvalidArgumentException('non-nullable description cannot be null'); - } $this->container['description'] = $description; return $this; @@ -578,9 +557,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -605,9 +581,6 @@ public function getPassword() */ public function setPassword($password) { - if (is_null($password)) { - throw new \InvalidArgumentException('non-nullable password cannot be null'); - } $this->container['password'] = $password; return $this; @@ -632,9 +605,6 @@ public function getRoles() */ public function setRoles($roles) { - if (is_null($roles)) { - throw new \InvalidArgumentException('non-nullable roles cannot be null'); - } $this->container['roles'] = $roles; return $this; @@ -659,9 +629,6 @@ public function getUsername() */ public function setUsername($username) { - if (is_null($username)) { - throw new \InvalidArgumentException('non-nullable username cannot be null'); - } $this->container['username'] = $username; return $this; diff --git a/src/Adyen/Model/Management/CreateCompanyApiCredentialRequest.php b/src/Adyen/Model/Management/CreateCompanyApiCredentialRequest.php index 96e2813a0..21bd847de 100644 --- a/src/Adyen/Model/Management/CreateCompanyApiCredentialRequest.php +++ b/src/Adyen/Model/Management/CreateCompanyApiCredentialRequest.php @@ -316,9 +316,6 @@ public function getAllowedOrigins() */ public function setAllowedOrigins($allowedOrigins) { - if (is_null($allowedOrigins)) { - throw new \InvalidArgumentException('non-nullable allowedOrigins cannot be null'); - } $this->container['allowedOrigins'] = $allowedOrigins; return $this; @@ -343,9 +340,6 @@ public function getAssociatedMerchantAccounts() */ public function setAssociatedMerchantAccounts($associatedMerchantAccounts) { - if (is_null($associatedMerchantAccounts)) { - throw new \InvalidArgumentException('non-nullable associatedMerchantAccounts cannot be null'); - } $this->container['associatedMerchantAccounts'] = $associatedMerchantAccounts; return $this; @@ -370,9 +364,6 @@ public function getDescription() */ public function setDescription($description) { - if (is_null($description)) { - throw new \InvalidArgumentException('non-nullable description cannot be null'); - } $this->container['description'] = $description; return $this; @@ -397,9 +388,6 @@ public function getRoles() */ public function setRoles($roles) { - if (is_null($roles)) { - throw new \InvalidArgumentException('non-nullable roles cannot be null'); - } $this->container['roles'] = $roles; return $this; diff --git a/src/Adyen/Model/Management/CreateCompanyApiCredentialResponse.php b/src/Adyen/Model/Management/CreateCompanyApiCredentialResponse.php index 26b488eb8..9084d1927 100644 --- a/src/Adyen/Model/Management/CreateCompanyApiCredentialResponse.php +++ b/src/Adyen/Model/Management/CreateCompanyApiCredentialResponse.php @@ -399,9 +399,6 @@ public function getLinks() */ public function setLinks($links) { - if (is_null($links)) { - throw new \InvalidArgumentException('non-nullable links cannot be null'); - } $this->container['links'] = $links; return $this; @@ -426,9 +423,6 @@ public function getActive() */ public function setActive($active) { - if (is_null($active)) { - throw new \InvalidArgumentException('non-nullable active cannot be null'); - } $this->container['active'] = $active; return $this; @@ -453,9 +447,6 @@ public function getAllowedIpAddresses() */ public function setAllowedIpAddresses($allowedIpAddresses) { - if (is_null($allowedIpAddresses)) { - throw new \InvalidArgumentException('non-nullable allowedIpAddresses cannot be null'); - } $this->container['allowedIpAddresses'] = $allowedIpAddresses; return $this; @@ -480,9 +471,6 @@ public function getAllowedOrigins() */ public function setAllowedOrigins($allowedOrigins) { - if (is_null($allowedOrigins)) { - throw new \InvalidArgumentException('non-nullable allowedOrigins cannot be null'); - } $this->container['allowedOrigins'] = $allowedOrigins; return $this; @@ -507,9 +495,6 @@ public function getApiKey() */ public function setApiKey($apiKey) { - if (is_null($apiKey)) { - throw new \InvalidArgumentException('non-nullable apiKey cannot be null'); - } $this->container['apiKey'] = $apiKey; return $this; @@ -534,9 +519,6 @@ public function getAssociatedMerchantAccounts() */ public function setAssociatedMerchantAccounts($associatedMerchantAccounts) { - if (is_null($associatedMerchantAccounts)) { - throw new \InvalidArgumentException('non-nullable associatedMerchantAccounts cannot be null'); - } $this->container['associatedMerchantAccounts'] = $associatedMerchantAccounts; return $this; @@ -561,9 +543,6 @@ public function getClientKey() */ public function setClientKey($clientKey) { - if (is_null($clientKey)) { - throw new \InvalidArgumentException('non-nullable clientKey cannot be null'); - } $this->container['clientKey'] = $clientKey; return $this; @@ -588,9 +567,6 @@ public function getDescription() */ public function setDescription($description) { - if (is_null($description)) { - throw new \InvalidArgumentException('non-nullable description cannot be null'); - } $this->container['description'] = $description; return $this; @@ -615,9 +591,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -642,9 +615,6 @@ public function getPassword() */ public function setPassword($password) { - if (is_null($password)) { - throw new \InvalidArgumentException('non-nullable password cannot be null'); - } $this->container['password'] = $password; return $this; @@ -669,9 +639,6 @@ public function getRoles() */ public function setRoles($roles) { - if (is_null($roles)) { - throw new \InvalidArgumentException('non-nullable roles cannot be null'); - } $this->container['roles'] = $roles; return $this; @@ -696,9 +663,6 @@ public function getUsername() */ public function setUsername($username) { - if (is_null($username)) { - throw new \InvalidArgumentException('non-nullable username cannot be null'); - } $this->container['username'] = $username; return $this; diff --git a/src/Adyen/Model/Management/CreateCompanyUserRequest.php b/src/Adyen/Model/Management/CreateCompanyUserRequest.php index c4dfc07ea..2fd059349 100644 --- a/src/Adyen/Model/Management/CreateCompanyUserRequest.php +++ b/src/Adyen/Model/Management/CreateCompanyUserRequest.php @@ -346,9 +346,6 @@ public function getAccountGroups() */ public function setAccountGroups($accountGroups) { - if (is_null($accountGroups)) { - throw new \InvalidArgumentException('non-nullable accountGroups cannot be null'); - } $this->container['accountGroups'] = $accountGroups; return $this; @@ -373,9 +370,6 @@ public function getAssociatedMerchantAccounts() */ public function setAssociatedMerchantAccounts($associatedMerchantAccounts) { - if (is_null($associatedMerchantAccounts)) { - throw new \InvalidArgumentException('non-nullable associatedMerchantAccounts cannot be null'); - } $this->container['associatedMerchantAccounts'] = $associatedMerchantAccounts; return $this; @@ -400,9 +394,6 @@ public function getEmail() */ public function setEmail($email) { - if (is_null($email)) { - throw new \InvalidArgumentException('non-nullable email cannot be null'); - } $this->container['email'] = $email; return $this; @@ -427,9 +418,6 @@ public function getName() */ public function setName($name) { - if (is_null($name)) { - throw new \InvalidArgumentException('non-nullable name cannot be null'); - } $this->container['name'] = $name; return $this; @@ -454,9 +442,6 @@ public function getRoles() */ public function setRoles($roles) { - if (is_null($roles)) { - throw new \InvalidArgumentException('non-nullable roles cannot be null'); - } $this->container['roles'] = $roles; return $this; @@ -481,9 +466,6 @@ public function getTimeZoneCode() */ public function setTimeZoneCode($timeZoneCode) { - if (is_null($timeZoneCode)) { - throw new \InvalidArgumentException('non-nullable timeZoneCode cannot be null'); - } $this->container['timeZoneCode'] = $timeZoneCode; return $this; @@ -508,9 +490,6 @@ public function getUsername() */ public function setUsername($username) { - if (is_null($username)) { - throw new \InvalidArgumentException('non-nullable username cannot be null'); - } $this->container['username'] = $username; return $this; diff --git a/src/Adyen/Model/Management/CreateCompanyUserResponse.php b/src/Adyen/Model/Management/CreateCompanyUserResponse.php index 533f33922..15e265c4d 100644 --- a/src/Adyen/Model/Management/CreateCompanyUserResponse.php +++ b/src/Adyen/Model/Management/CreateCompanyUserResponse.php @@ -380,9 +380,6 @@ public function getLinks() */ public function setLinks($links) { - if (is_null($links)) { - throw new \InvalidArgumentException('non-nullable links cannot be null'); - } $this->container['links'] = $links; return $this; @@ -407,9 +404,6 @@ public function getAccountGroups() */ public function setAccountGroups($accountGroups) { - if (is_null($accountGroups)) { - throw new \InvalidArgumentException('non-nullable accountGroups cannot be null'); - } $this->container['accountGroups'] = $accountGroups; return $this; @@ -434,9 +428,6 @@ public function getActive() */ public function setActive($active) { - if (is_null($active)) { - throw new \InvalidArgumentException('non-nullable active cannot be null'); - } $this->container['active'] = $active; return $this; @@ -461,9 +452,6 @@ public function getApps() */ public function setApps($apps) { - if (is_null($apps)) { - throw new \InvalidArgumentException('non-nullable apps cannot be null'); - } $this->container['apps'] = $apps; return $this; @@ -488,9 +476,6 @@ public function getAssociatedMerchantAccounts() */ public function setAssociatedMerchantAccounts($associatedMerchantAccounts) { - if (is_null($associatedMerchantAccounts)) { - throw new \InvalidArgumentException('non-nullable associatedMerchantAccounts cannot be null'); - } $this->container['associatedMerchantAccounts'] = $associatedMerchantAccounts; return $this; @@ -515,9 +500,6 @@ public function getEmail() */ public function setEmail($email) { - if (is_null($email)) { - throw new \InvalidArgumentException('non-nullable email cannot be null'); - } $this->container['email'] = $email; return $this; @@ -542,9 +524,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -569,9 +548,6 @@ public function getName() */ public function setName($name) { - if (is_null($name)) { - throw new \InvalidArgumentException('non-nullable name cannot be null'); - } $this->container['name'] = $name; return $this; @@ -596,9 +572,6 @@ public function getRoles() */ public function setRoles($roles) { - if (is_null($roles)) { - throw new \InvalidArgumentException('non-nullable roles cannot be null'); - } $this->container['roles'] = $roles; return $this; @@ -623,9 +596,6 @@ public function getTimeZoneCode() */ public function setTimeZoneCode($timeZoneCode) { - if (is_null($timeZoneCode)) { - throw new \InvalidArgumentException('non-nullable timeZoneCode cannot be null'); - } $this->container['timeZoneCode'] = $timeZoneCode; return $this; @@ -650,9 +620,6 @@ public function getUsername() */ public function setUsername($username) { - if (is_null($username)) { - throw new \InvalidArgumentException('non-nullable username cannot be null'); - } $this->container['username'] = $username; return $this; diff --git a/src/Adyen/Model/Management/CreateCompanyWebhookRequest.php b/src/Adyen/Model/Management/CreateCompanyWebhookRequest.php index 37d3378de..9ce9938b8 100644 --- a/src/Adyen/Model/Management/CreateCompanyWebhookRequest.php +++ b/src/Adyen/Model/Management/CreateCompanyWebhookRequest.php @@ -516,9 +516,6 @@ public function getAcceptsExpiredCertificate() */ public function setAcceptsExpiredCertificate($acceptsExpiredCertificate) { - if (is_null($acceptsExpiredCertificate)) { - throw new \InvalidArgumentException('non-nullable acceptsExpiredCertificate cannot be null'); - } $this->container['acceptsExpiredCertificate'] = $acceptsExpiredCertificate; return $this; @@ -543,9 +540,6 @@ public function getAcceptsSelfSignedCertificate() */ public function setAcceptsSelfSignedCertificate($acceptsSelfSignedCertificate) { - if (is_null($acceptsSelfSignedCertificate)) { - throw new \InvalidArgumentException('non-nullable acceptsSelfSignedCertificate cannot be null'); - } $this->container['acceptsSelfSignedCertificate'] = $acceptsSelfSignedCertificate; return $this; @@ -570,9 +564,6 @@ public function getAcceptsUntrustedRootCertificate() */ public function setAcceptsUntrustedRootCertificate($acceptsUntrustedRootCertificate) { - if (is_null($acceptsUntrustedRootCertificate)) { - throw new \InvalidArgumentException('non-nullable acceptsUntrustedRootCertificate cannot be null'); - } $this->container['acceptsUntrustedRootCertificate'] = $acceptsUntrustedRootCertificate; return $this; @@ -597,9 +588,6 @@ public function getActive() */ public function setActive($active) { - if (is_null($active)) { - throw new \InvalidArgumentException('non-nullable active cannot be null'); - } $this->container['active'] = $active; return $this; @@ -624,9 +612,6 @@ public function getAdditionalSettings() */ public function setAdditionalSettings($additionalSettings) { - if (is_null($additionalSettings)) { - throw new \InvalidArgumentException('non-nullable additionalSettings cannot be null'); - } $this->container['additionalSettings'] = $additionalSettings; return $this; @@ -651,9 +636,6 @@ public function getCommunicationFormat() */ public function setCommunicationFormat($communicationFormat) { - if (is_null($communicationFormat)) { - throw new \InvalidArgumentException('non-nullable communicationFormat cannot be null'); - } $allowedValues = $this->getCommunicationFormatAllowableValues(); if (!in_array($communicationFormat, $allowedValues, true)) { throw new \InvalidArgumentException( @@ -688,9 +670,6 @@ public function getDescription() */ public function setDescription($description) { - if (is_null($description)) { - throw new \InvalidArgumentException('non-nullable description cannot be null'); - } $this->container['description'] = $description; return $this; @@ -715,9 +694,6 @@ public function getEncryptionProtocol() */ public function setEncryptionProtocol($encryptionProtocol) { - if (is_null($encryptionProtocol)) { - throw new \InvalidArgumentException('non-nullable encryptionProtocol cannot be null'); - } $allowedValues = $this->getEncryptionProtocolAllowableValues(); if (!in_array($encryptionProtocol, $allowedValues, true)) { throw new \InvalidArgumentException( @@ -752,9 +728,6 @@ public function getFilterMerchantAccountType() */ public function setFilterMerchantAccountType($filterMerchantAccountType) { - if (is_null($filterMerchantAccountType)) { - throw new \InvalidArgumentException('non-nullable filterMerchantAccountType cannot be null'); - } $allowedValues = $this->getFilterMerchantAccountTypeAllowableValues(); if (!in_array($filterMerchantAccountType, $allowedValues, true)) { throw new \InvalidArgumentException( @@ -789,9 +762,6 @@ public function getFilterMerchantAccounts() */ public function setFilterMerchantAccounts($filterMerchantAccounts) { - if (is_null($filterMerchantAccounts)) { - throw new \InvalidArgumentException('non-nullable filterMerchantAccounts cannot be null'); - } $this->container['filterMerchantAccounts'] = $filterMerchantAccounts; return $this; @@ -816,9 +786,6 @@ public function getNetworkType() */ public function setNetworkType($networkType) { - if (is_null($networkType)) { - throw new \InvalidArgumentException('non-nullable networkType cannot be null'); - } $allowedValues = $this->getNetworkTypeAllowableValues(); if (!in_array($networkType, $allowedValues, true)) { throw new \InvalidArgumentException( @@ -853,9 +820,6 @@ public function getPassword() */ public function setPassword($password) { - if (is_null($password)) { - throw new \InvalidArgumentException('non-nullable password cannot be null'); - } $this->container['password'] = $password; return $this; @@ -880,9 +844,6 @@ public function getPopulateSoapActionHeader() */ public function setPopulateSoapActionHeader($populateSoapActionHeader) { - if (is_null($populateSoapActionHeader)) { - throw new \InvalidArgumentException('non-nullable populateSoapActionHeader cannot be null'); - } $this->container['populateSoapActionHeader'] = $populateSoapActionHeader; return $this; @@ -907,9 +868,6 @@ public function getType() */ public function setType($type) { - if (is_null($type)) { - throw new \InvalidArgumentException('non-nullable type cannot be null'); - } $this->container['type'] = $type; return $this; @@ -934,9 +892,6 @@ public function getUrl() */ public function setUrl($url) { - if (is_null($url)) { - throw new \InvalidArgumentException('non-nullable url cannot be null'); - } $this->container['url'] = $url; return $this; @@ -961,9 +916,6 @@ public function getUsername() */ public function setUsername($username) { - if (is_null($username)) { - throw new \InvalidArgumentException('non-nullable username cannot be null'); - } $this->container['username'] = $username; return $this; diff --git a/src/Adyen/Model/Management/CreateMerchantApiCredentialRequest.php b/src/Adyen/Model/Management/CreateMerchantApiCredentialRequest.php index c7c174615..08e26ed96 100644 --- a/src/Adyen/Model/Management/CreateMerchantApiCredentialRequest.php +++ b/src/Adyen/Model/Management/CreateMerchantApiCredentialRequest.php @@ -309,9 +309,6 @@ public function getAllowedOrigins() */ public function setAllowedOrigins($allowedOrigins) { - if (is_null($allowedOrigins)) { - throw new \InvalidArgumentException('non-nullable allowedOrigins cannot be null'); - } $this->container['allowedOrigins'] = $allowedOrigins; return $this; @@ -336,9 +333,6 @@ public function getDescription() */ public function setDescription($description) { - if (is_null($description)) { - throw new \InvalidArgumentException('non-nullable description cannot be null'); - } $this->container['description'] = $description; return $this; @@ -363,9 +357,6 @@ public function getRoles() */ public function setRoles($roles) { - if (is_null($roles)) { - throw new \InvalidArgumentException('non-nullable roles cannot be null'); - } $this->container['roles'] = $roles; return $this; diff --git a/src/Adyen/Model/Management/CreateMerchantRequest.php b/src/Adyen/Model/Management/CreateMerchantRequest.php index 80755e9f9..619fb77fb 100644 --- a/src/Adyen/Model/Management/CreateMerchantRequest.php +++ b/src/Adyen/Model/Management/CreateMerchantRequest.php @@ -340,9 +340,6 @@ public function getBusinessLineId() */ public function setBusinessLineId($businessLineId) { - if (is_null($businessLineId)) { - throw new \InvalidArgumentException('non-nullable businessLineId cannot be null'); - } $this->container['businessLineId'] = $businessLineId; return $this; @@ -367,9 +364,6 @@ public function getCompanyId() */ public function setCompanyId($companyId) { - if (is_null($companyId)) { - throw new \InvalidArgumentException('non-nullable companyId cannot be null'); - } $this->container['companyId'] = $companyId; return $this; @@ -394,9 +388,6 @@ public function getDescription() */ public function setDescription($description) { - if (is_null($description)) { - throw new \InvalidArgumentException('non-nullable description cannot be null'); - } $this->container['description'] = $description; return $this; @@ -421,9 +412,6 @@ public function getLegalEntityId() */ public function setLegalEntityId($legalEntityId) { - if (is_null($legalEntityId)) { - throw new \InvalidArgumentException('non-nullable legalEntityId cannot be null'); - } $this->container['legalEntityId'] = $legalEntityId; return $this; @@ -448,9 +436,6 @@ public function getPricingPlan() */ public function setPricingPlan($pricingPlan) { - if (is_null($pricingPlan)) { - throw new \InvalidArgumentException('non-nullable pricingPlan cannot be null'); - } $this->container['pricingPlan'] = $pricingPlan; return $this; @@ -475,9 +460,6 @@ public function getReference() */ public function setReference($reference) { - if (is_null($reference)) { - throw new \InvalidArgumentException('non-nullable reference cannot be null'); - } $this->container['reference'] = $reference; return $this; @@ -502,9 +484,6 @@ public function getSalesChannels() */ public function setSalesChannels($salesChannels) { - if (is_null($salesChannels)) { - throw new \InvalidArgumentException('non-nullable salesChannels cannot be null'); - } $this->container['salesChannels'] = $salesChannels; return $this; diff --git a/src/Adyen/Model/Management/CreateMerchantResponse.php b/src/Adyen/Model/Management/CreateMerchantResponse.php index a22cf0f09..a0c2b5b5a 100644 --- a/src/Adyen/Model/Management/CreateMerchantResponse.php +++ b/src/Adyen/Model/Management/CreateMerchantResponse.php @@ -337,9 +337,6 @@ public function getBusinessLineId() */ public function setBusinessLineId($businessLineId) { - if (is_null($businessLineId)) { - throw new \InvalidArgumentException('non-nullable businessLineId cannot be null'); - } $this->container['businessLineId'] = $businessLineId; return $this; @@ -364,9 +361,6 @@ public function getCompanyId() */ public function setCompanyId($companyId) { - if (is_null($companyId)) { - throw new \InvalidArgumentException('non-nullable companyId cannot be null'); - } $this->container['companyId'] = $companyId; return $this; @@ -391,9 +385,6 @@ public function getDescription() */ public function setDescription($description) { - if (is_null($description)) { - throw new \InvalidArgumentException('non-nullable description cannot be null'); - } $this->container['description'] = $description; return $this; @@ -418,9 +409,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -445,9 +433,6 @@ public function getLegalEntityId() */ public function setLegalEntityId($legalEntityId) { - if (is_null($legalEntityId)) { - throw new \InvalidArgumentException('non-nullable legalEntityId cannot be null'); - } $this->container['legalEntityId'] = $legalEntityId; return $this; @@ -472,9 +457,6 @@ public function getPricingPlan() */ public function setPricingPlan($pricingPlan) { - if (is_null($pricingPlan)) { - throw new \InvalidArgumentException('non-nullable pricingPlan cannot be null'); - } $this->container['pricingPlan'] = $pricingPlan; return $this; @@ -499,9 +481,6 @@ public function getReference() */ public function setReference($reference) { - if (is_null($reference)) { - throw new \InvalidArgumentException('non-nullable reference cannot be null'); - } $this->container['reference'] = $reference; return $this; diff --git a/src/Adyen/Model/Management/CreateMerchantUserRequest.php b/src/Adyen/Model/Management/CreateMerchantUserRequest.php index 227e03425..7a84fee1d 100644 --- a/src/Adyen/Model/Management/CreateMerchantUserRequest.php +++ b/src/Adyen/Model/Management/CreateMerchantUserRequest.php @@ -339,9 +339,6 @@ public function getAccountGroups() */ public function setAccountGroups($accountGroups) { - if (is_null($accountGroups)) { - throw new \InvalidArgumentException('non-nullable accountGroups cannot be null'); - } $this->container['accountGroups'] = $accountGroups; return $this; @@ -366,9 +363,6 @@ public function getEmail() */ public function setEmail($email) { - if (is_null($email)) { - throw new \InvalidArgumentException('non-nullable email cannot be null'); - } $this->container['email'] = $email; return $this; @@ -393,9 +387,6 @@ public function getName() */ public function setName($name) { - if (is_null($name)) { - throw new \InvalidArgumentException('non-nullable name cannot be null'); - } $this->container['name'] = $name; return $this; @@ -420,9 +411,6 @@ public function getRoles() */ public function setRoles($roles) { - if (is_null($roles)) { - throw new \InvalidArgumentException('non-nullable roles cannot be null'); - } $this->container['roles'] = $roles; return $this; @@ -447,9 +435,6 @@ public function getTimeZoneCode() */ public function setTimeZoneCode($timeZoneCode) { - if (is_null($timeZoneCode)) { - throw new \InvalidArgumentException('non-nullable timeZoneCode cannot be null'); - } $this->container['timeZoneCode'] = $timeZoneCode; return $this; @@ -474,9 +459,6 @@ public function getUsername() */ public function setUsername($username) { - if (is_null($username)) { - throw new \InvalidArgumentException('non-nullable username cannot be null'); - } $this->container['username'] = $username; return $this; diff --git a/src/Adyen/Model/Management/CreateMerchantWebhookRequest.php b/src/Adyen/Model/Management/CreateMerchantWebhookRequest.php index a9aca87a1..d3a57948b 100644 --- a/src/Adyen/Model/Management/CreateMerchantWebhookRequest.php +++ b/src/Adyen/Model/Management/CreateMerchantWebhookRequest.php @@ -471,9 +471,6 @@ public function getAcceptsExpiredCertificate() */ public function setAcceptsExpiredCertificate($acceptsExpiredCertificate) { - if (is_null($acceptsExpiredCertificate)) { - throw new \InvalidArgumentException('non-nullable acceptsExpiredCertificate cannot be null'); - } $this->container['acceptsExpiredCertificate'] = $acceptsExpiredCertificate; return $this; @@ -498,9 +495,6 @@ public function getAcceptsSelfSignedCertificate() */ public function setAcceptsSelfSignedCertificate($acceptsSelfSignedCertificate) { - if (is_null($acceptsSelfSignedCertificate)) { - throw new \InvalidArgumentException('non-nullable acceptsSelfSignedCertificate cannot be null'); - } $this->container['acceptsSelfSignedCertificate'] = $acceptsSelfSignedCertificate; return $this; @@ -525,9 +519,6 @@ public function getAcceptsUntrustedRootCertificate() */ public function setAcceptsUntrustedRootCertificate($acceptsUntrustedRootCertificate) { - if (is_null($acceptsUntrustedRootCertificate)) { - throw new \InvalidArgumentException('non-nullable acceptsUntrustedRootCertificate cannot be null'); - } $this->container['acceptsUntrustedRootCertificate'] = $acceptsUntrustedRootCertificate; return $this; @@ -552,9 +543,6 @@ public function getActive() */ public function setActive($active) { - if (is_null($active)) { - throw new \InvalidArgumentException('non-nullable active cannot be null'); - } $this->container['active'] = $active; return $this; @@ -579,9 +567,6 @@ public function getAdditionalSettings() */ public function setAdditionalSettings($additionalSettings) { - if (is_null($additionalSettings)) { - throw new \InvalidArgumentException('non-nullable additionalSettings cannot be null'); - } $this->container['additionalSettings'] = $additionalSettings; return $this; @@ -606,9 +591,6 @@ public function getCommunicationFormat() */ public function setCommunicationFormat($communicationFormat) { - if (is_null($communicationFormat)) { - throw new \InvalidArgumentException('non-nullable communicationFormat cannot be null'); - } $allowedValues = $this->getCommunicationFormatAllowableValues(); if (!in_array($communicationFormat, $allowedValues, true)) { throw new \InvalidArgumentException( @@ -643,9 +625,6 @@ public function getDescription() */ public function setDescription($description) { - if (is_null($description)) { - throw new \InvalidArgumentException('non-nullable description cannot be null'); - } $this->container['description'] = $description; return $this; @@ -670,9 +649,6 @@ public function getEncryptionProtocol() */ public function setEncryptionProtocol($encryptionProtocol) { - if (is_null($encryptionProtocol)) { - throw new \InvalidArgumentException('non-nullable encryptionProtocol cannot be null'); - } $allowedValues = $this->getEncryptionProtocolAllowableValues(); if (!in_array($encryptionProtocol, $allowedValues, true)) { throw new \InvalidArgumentException( @@ -707,9 +683,6 @@ public function getNetworkType() */ public function setNetworkType($networkType) { - if (is_null($networkType)) { - throw new \InvalidArgumentException('non-nullable networkType cannot be null'); - } $allowedValues = $this->getNetworkTypeAllowableValues(); if (!in_array($networkType, $allowedValues, true)) { throw new \InvalidArgumentException( @@ -744,9 +717,6 @@ public function getPassword() */ public function setPassword($password) { - if (is_null($password)) { - throw new \InvalidArgumentException('non-nullable password cannot be null'); - } $this->container['password'] = $password; return $this; @@ -771,9 +741,6 @@ public function getPopulateSoapActionHeader() */ public function setPopulateSoapActionHeader($populateSoapActionHeader) { - if (is_null($populateSoapActionHeader)) { - throw new \InvalidArgumentException('non-nullable populateSoapActionHeader cannot be null'); - } $this->container['populateSoapActionHeader'] = $populateSoapActionHeader; return $this; @@ -798,9 +765,6 @@ public function getType() */ public function setType($type) { - if (is_null($type)) { - throw new \InvalidArgumentException('non-nullable type cannot be null'); - } $this->container['type'] = $type; return $this; @@ -825,9 +789,6 @@ public function getUrl() */ public function setUrl($url) { - if (is_null($url)) { - throw new \InvalidArgumentException('non-nullable url cannot be null'); - } $this->container['url'] = $url; return $this; @@ -852,9 +813,6 @@ public function getUsername() */ public function setUsername($username) { - if (is_null($username)) { - throw new \InvalidArgumentException('non-nullable username cannot be null'); - } $this->container['username'] = $username; return $this; diff --git a/src/Adyen/Model/Management/CreateUserResponse.php b/src/Adyen/Model/Management/CreateUserResponse.php index 78e0e7a9a..c67a9af0a 100644 --- a/src/Adyen/Model/Management/CreateUserResponse.php +++ b/src/Adyen/Model/Management/CreateUserResponse.php @@ -373,9 +373,6 @@ public function getLinks() */ public function setLinks($links) { - if (is_null($links)) { - throw new \InvalidArgumentException('non-nullable links cannot be null'); - } $this->container['links'] = $links; return $this; @@ -400,9 +397,6 @@ public function getAccountGroups() */ public function setAccountGroups($accountGroups) { - if (is_null($accountGroups)) { - throw new \InvalidArgumentException('non-nullable accountGroups cannot be null'); - } $this->container['accountGroups'] = $accountGroups; return $this; @@ -427,9 +421,6 @@ public function getActive() */ public function setActive($active) { - if (is_null($active)) { - throw new \InvalidArgumentException('non-nullable active cannot be null'); - } $this->container['active'] = $active; return $this; @@ -454,9 +445,6 @@ public function getApps() */ public function setApps($apps) { - if (is_null($apps)) { - throw new \InvalidArgumentException('non-nullable apps cannot be null'); - } $this->container['apps'] = $apps; return $this; @@ -481,9 +469,6 @@ public function getEmail() */ public function setEmail($email) { - if (is_null($email)) { - throw new \InvalidArgumentException('non-nullable email cannot be null'); - } $this->container['email'] = $email; return $this; @@ -508,9 +493,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -535,9 +517,6 @@ public function getName() */ public function setName($name) { - if (is_null($name)) { - throw new \InvalidArgumentException('non-nullable name cannot be null'); - } $this->container['name'] = $name; return $this; @@ -562,9 +541,6 @@ public function getRoles() */ public function setRoles($roles) { - if (is_null($roles)) { - throw new \InvalidArgumentException('non-nullable roles cannot be null'); - } $this->container['roles'] = $roles; return $this; @@ -589,9 +565,6 @@ public function getTimeZoneCode() */ public function setTimeZoneCode($timeZoneCode) { - if (is_null($timeZoneCode)) { - throw new \InvalidArgumentException('non-nullable timeZoneCode cannot be null'); - } $this->container['timeZoneCode'] = $timeZoneCode; return $this; @@ -616,9 +589,6 @@ public function getUsername() */ public function setUsername($username) { - if (is_null($username)) { - throw new \InvalidArgumentException('non-nullable username cannot be null'); - } $this->container['username'] = $username; return $this; diff --git a/src/Adyen/Model/Management/Currency.php b/src/Adyen/Model/Management/Currency.php index 9a4a088ea..26b981e4e 100644 --- a/src/Adyen/Model/Management/Currency.php +++ b/src/Adyen/Model/Management/Currency.php @@ -312,7 +312,6 @@ public function getAmount() */ public function setAmount($amount) { - // Do nothing for nullable integers $this->container['amount'] = $amount; return $this; @@ -337,9 +336,6 @@ public function getCurrencyCode() */ public function setCurrencyCode($currencyCode) { - if (is_null($currencyCode)) { - throw new \InvalidArgumentException('non-nullable currencyCode cannot be null'); - } $this->container['currencyCode'] = $currencyCode; return $this; @@ -364,9 +360,6 @@ public function getPercentage() */ public function setPercentage($percentage) { - if (is_null($percentage)) { - throw new \InvalidArgumentException('non-nullable percentage cannot be null'); - } $this->container['percentage'] = $percentage; return $this; diff --git a/src/Adyen/Model/Management/CustomNotification.php b/src/Adyen/Model/Management/CustomNotification.php index b5ee7b316..59220592f 100644 --- a/src/Adyen/Model/Management/CustomNotification.php +++ b/src/Adyen/Model/Management/CustomNotification.php @@ -337,9 +337,6 @@ public function getAmount() */ public function setAmount($amount) { - if (is_null($amount)) { - throw new \InvalidArgumentException('non-nullable amount cannot be null'); - } $this->container['amount'] = $amount; return $this; @@ -364,9 +361,6 @@ public function getEventCode() */ public function setEventCode($eventCode) { - if (is_null($eventCode)) { - throw new \InvalidArgumentException('non-nullable eventCode cannot be null'); - } $this->container['eventCode'] = $eventCode; return $this; @@ -391,9 +385,6 @@ public function getEventDate() */ public function setEventDate($eventDate) { - if (is_null($eventDate)) { - throw new \InvalidArgumentException('non-nullable eventDate cannot be null'); - } $this->container['eventDate'] = $eventDate; return $this; @@ -418,9 +409,6 @@ public function getMerchantReference() */ public function setMerchantReference($merchantReference) { - if (is_null($merchantReference)) { - throw new \InvalidArgumentException('non-nullable merchantReference cannot be null'); - } $this->container['merchantReference'] = $merchantReference; return $this; @@ -445,9 +433,6 @@ public function getPaymentMethod() */ public function setPaymentMethod($paymentMethod) { - if (is_null($paymentMethod)) { - throw new \InvalidArgumentException('non-nullable paymentMethod cannot be null'); - } $this->container['paymentMethod'] = $paymentMethod; return $this; @@ -472,9 +457,6 @@ public function getReason() */ public function setReason($reason) { - if (is_null($reason)) { - throw new \InvalidArgumentException('non-nullable reason cannot be null'); - } $this->container['reason'] = $reason; return $this; @@ -499,9 +481,6 @@ public function getSuccess() */ public function setSuccess($success) { - if (is_null($success)) { - throw new \InvalidArgumentException('non-nullable success cannot be null'); - } $this->container['success'] = $success; return $this; diff --git a/src/Adyen/Model/Management/DataCenter.php b/src/Adyen/Model/Management/DataCenter.php index 7936ca800..e4805574a 100644 --- a/src/Adyen/Model/Management/DataCenter.php +++ b/src/Adyen/Model/Management/DataCenter.php @@ -302,9 +302,6 @@ public function getLivePrefix() */ public function setLivePrefix($livePrefix) { - if (is_null($livePrefix)) { - throw new \InvalidArgumentException('non-nullable livePrefix cannot be null'); - } $this->container['livePrefix'] = $livePrefix; return $this; @@ -329,9 +326,6 @@ public function getName() */ public function setName($name) { - if (is_null($name)) { - throw new \InvalidArgumentException('non-nullable name cannot be null'); - } $this->container['name'] = $name; return $this; diff --git a/src/Adyen/Model/Management/EventUrl.php b/src/Adyen/Model/Management/EventUrl.php index 562b7cf71..207ef5940 100644 --- a/src/Adyen/Model/Management/EventUrl.php +++ b/src/Adyen/Model/Management/EventUrl.php @@ -302,9 +302,6 @@ public function getEventLocalUrls() */ public function setEventLocalUrls($eventLocalUrls) { - if (is_null($eventLocalUrls)) { - throw new \InvalidArgumentException('non-nullable eventLocalUrls cannot be null'); - } $this->container['eventLocalUrls'] = $eventLocalUrls; return $this; @@ -329,9 +326,6 @@ public function getEventPublicUrls() */ public function setEventPublicUrls($eventPublicUrls) { - if (is_null($eventPublicUrls)) { - throw new \InvalidArgumentException('non-nullable eventPublicUrls cannot be null'); - } $this->container['eventPublicUrls'] = $eventPublicUrls; return $this; diff --git a/src/Adyen/Model/Management/ExternalTerminalAction.php b/src/Adyen/Model/Management/ExternalTerminalAction.php index e3ced7bfd..379d745cd 100644 --- a/src/Adyen/Model/Management/ExternalTerminalAction.php +++ b/src/Adyen/Model/Management/ExternalTerminalAction.php @@ -344,9 +344,6 @@ public function getActionType() */ public function setActionType($actionType) { - if (is_null($actionType)) { - throw new \InvalidArgumentException('non-nullable actionType cannot be null'); - } $this->container['actionType'] = $actionType; return $this; @@ -371,9 +368,6 @@ public function getConfig() */ public function setConfig($config) { - if (is_null($config)) { - throw new \InvalidArgumentException('non-nullable config cannot be null'); - } $this->container['config'] = $config; return $this; @@ -398,9 +392,6 @@ public function getConfirmedAt() */ public function setConfirmedAt($confirmedAt) { - if (is_null($confirmedAt)) { - throw new \InvalidArgumentException('non-nullable confirmedAt cannot be null'); - } $this->container['confirmedAt'] = $confirmedAt; return $this; @@ -425,9 +416,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -452,9 +440,6 @@ public function getResult() */ public function setResult($result) { - if (is_null($result)) { - throw new \InvalidArgumentException('non-nullable result cannot be null'); - } $this->container['result'] = $result; return $this; @@ -479,9 +464,6 @@ public function getScheduledAt() */ public function setScheduledAt($scheduledAt) { - if (is_null($scheduledAt)) { - throw new \InvalidArgumentException('non-nullable scheduledAt cannot be null'); - } $this->container['scheduledAt'] = $scheduledAt; return $this; @@ -506,9 +488,6 @@ public function getStatus() */ public function setStatus($status) { - if (is_null($status)) { - throw new \InvalidArgumentException('non-nullable status cannot be null'); - } $this->container['status'] = $status; return $this; @@ -533,9 +512,6 @@ public function getTerminalId() */ public function setTerminalId($terminalId) { - if (is_null($terminalId)) { - throw new \InvalidArgumentException('non-nullable terminalId cannot be null'); - } $this->container['terminalId'] = $terminalId; return $this; diff --git a/src/Adyen/Model/Management/File.php b/src/Adyen/Model/Management/File.php index 0e1af202b..a63c76aea 100644 --- a/src/Adyen/Model/Management/File.php +++ b/src/Adyen/Model/Management/File.php @@ -308,9 +308,6 @@ public function getData() */ public function setData($data) { - if (is_null($data)) { - throw new \InvalidArgumentException('non-nullable data cannot be null'); - } $this->container['data'] = $data; return $this; @@ -335,9 +332,6 @@ public function getName() */ public function setName($name) { - if (is_null($name)) { - throw new \InvalidArgumentException('non-nullable name cannot be null'); - } $this->container['name'] = $name; return $this; diff --git a/src/Adyen/Model/Management/GenerateApiKeyResponse.php b/src/Adyen/Model/Management/GenerateApiKeyResponse.php index a010e6406..e1d941ca9 100644 --- a/src/Adyen/Model/Management/GenerateApiKeyResponse.php +++ b/src/Adyen/Model/Management/GenerateApiKeyResponse.php @@ -298,9 +298,6 @@ public function getApiKey() */ public function setApiKey($apiKey) { - if (is_null($apiKey)) { - throw new \InvalidArgumentException('non-nullable apiKey cannot be null'); - } $this->container['apiKey'] = $apiKey; return $this; diff --git a/src/Adyen/Model/Management/GenerateClientKeyResponse.php b/src/Adyen/Model/Management/GenerateClientKeyResponse.php index c669d0e6f..7a0b914a8 100644 --- a/src/Adyen/Model/Management/GenerateClientKeyResponse.php +++ b/src/Adyen/Model/Management/GenerateClientKeyResponse.php @@ -298,9 +298,6 @@ public function getClientKey() */ public function setClientKey($clientKey) { - if (is_null($clientKey)) { - throw new \InvalidArgumentException('non-nullable clientKey cannot be null'); - } $this->container['clientKey'] = $clientKey; return $this; diff --git a/src/Adyen/Model/Management/GenerateHmacKeyResponse.php b/src/Adyen/Model/Management/GenerateHmacKeyResponse.php index 2dcc0fd62..242e5217a 100644 --- a/src/Adyen/Model/Management/GenerateHmacKeyResponse.php +++ b/src/Adyen/Model/Management/GenerateHmacKeyResponse.php @@ -298,9 +298,6 @@ public function getHmacKey() */ public function setHmacKey($hmacKey) { - if (is_null($hmacKey)) { - throw new \InvalidArgumentException('non-nullable hmacKey cannot be null'); - } $this->container['hmacKey'] = $hmacKey; return $this; diff --git a/src/Adyen/Model/Management/GenericPmWithTdiInfo.php b/src/Adyen/Model/Management/GenericPmWithTdiInfo.php index 9df06b32b..e7e694a87 100644 --- a/src/Adyen/Model/Management/GenericPmWithTdiInfo.php +++ b/src/Adyen/Model/Management/GenericPmWithTdiInfo.php @@ -295,9 +295,6 @@ public function getTransactionDescription() */ public function setTransactionDescription($transactionDescription) { - if (is_null($transactionDescription)) { - throw new \InvalidArgumentException('non-nullable transactionDescription cannot be null'); - } $this->container['transactionDescription'] = $transactionDescription; return $this; diff --git a/src/Adyen/Model/Management/GiroPayInfo.php b/src/Adyen/Model/Management/GiroPayInfo.php index ab61e75fe..64cc47887 100644 --- a/src/Adyen/Model/Management/GiroPayInfo.php +++ b/src/Adyen/Model/Management/GiroPayInfo.php @@ -298,9 +298,6 @@ public function getSupportEmail() */ public function setSupportEmail($supportEmail) { - if (is_null($supportEmail)) { - throw new \InvalidArgumentException('non-nullable supportEmail cannot be null'); - } $this->container['supportEmail'] = $supportEmail; return $this; diff --git a/src/Adyen/Model/Management/GooglePayInfo.php b/src/Adyen/Model/Management/GooglePayInfo.php index 50aee9869..351188cef 100644 --- a/src/Adyen/Model/Management/GooglePayInfo.php +++ b/src/Adyen/Model/Management/GooglePayInfo.php @@ -305,9 +305,6 @@ public function getMerchantId() */ public function setMerchantId($merchantId) { - if (is_null($merchantId)) { - throw new \InvalidArgumentException('non-nullable merchantId cannot be null'); - } $this->container['merchantId'] = $merchantId; return $this; @@ -332,9 +329,6 @@ public function getReuseMerchantId() */ public function setReuseMerchantId($reuseMerchantId) { - if (is_null($reuseMerchantId)) { - throw new \InvalidArgumentException('non-nullable reuseMerchantId cannot be null'); - } $this->container['reuseMerchantId'] = $reuseMerchantId; return $this; diff --git a/src/Adyen/Model/Management/Gratuity.php b/src/Adyen/Model/Management/Gratuity.php index 1d435573e..af96331fb 100644 --- a/src/Adyen/Model/Management/Gratuity.php +++ b/src/Adyen/Model/Management/Gratuity.php @@ -316,9 +316,6 @@ public function getAllowCustomAmount() */ public function setAllowCustomAmount($allowCustomAmount) { - if (is_null($allowCustomAmount)) { - throw new \InvalidArgumentException('non-nullable allowCustomAmount cannot be null'); - } $this->container['allowCustomAmount'] = $allowCustomAmount; return $this; @@ -343,9 +340,6 @@ public function getCurrency() */ public function setCurrency($currency) { - if (is_null($currency)) { - throw new \InvalidArgumentException('non-nullable currency cannot be null'); - } $this->container['currency'] = $currency; return $this; @@ -370,9 +364,6 @@ public function getPredefinedTipEntries() */ public function setPredefinedTipEntries($predefinedTipEntries) { - if (is_null($predefinedTipEntries)) { - throw new \InvalidArgumentException('non-nullable predefinedTipEntries cannot be null'); - } $this->container['predefinedTipEntries'] = $predefinedTipEntries; return $this; @@ -397,9 +388,6 @@ public function getUsePredefinedTipEntries() */ public function setUsePredefinedTipEntries($usePredefinedTipEntries) { - if (is_null($usePredefinedTipEntries)) { - throw new \InvalidArgumentException('non-nullable usePredefinedTipEntries cannot be null'); - } $this->container['usePredefinedTipEntries'] = $usePredefinedTipEntries; return $this; diff --git a/src/Adyen/Model/Management/Hardware.php b/src/Adyen/Model/Management/Hardware.php index 01691c51f..66377e996 100644 --- a/src/Adyen/Model/Management/Hardware.php +++ b/src/Adyen/Model/Management/Hardware.php @@ -309,7 +309,6 @@ public function getDisplayMaximumBackLight() */ public function setDisplayMaximumBackLight($displayMaximumBackLight) { - // Do nothing for nullable integers $this->container['displayMaximumBackLight'] = $displayMaximumBackLight; return $this; @@ -334,7 +333,6 @@ public function getResetTotalsHour() */ public function setResetTotalsHour($resetTotalsHour) { - // Do nothing for nullable integers $this->container['resetTotalsHour'] = $resetTotalsHour; return $this; @@ -359,7 +357,6 @@ public function getRestartHour() */ public function setRestartHour($restartHour) { - // Do nothing for nullable integers $this->container['restartHour'] = $restartHour; return $this; diff --git a/src/Adyen/Model/Management/IdName.php b/src/Adyen/Model/Management/IdName.php index 454068c5a..5793b31a5 100644 --- a/src/Adyen/Model/Management/IdName.php +++ b/src/Adyen/Model/Management/IdName.php @@ -302,9 +302,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -329,9 +326,6 @@ public function getName() */ public function setName($name) { - if (is_null($name)) { - throw new \InvalidArgumentException('non-nullable name cannot be null'); - } $this->container['name'] = $name; return $this; diff --git a/src/Adyen/Model/Management/InstallAndroidAppDetails.php b/src/Adyen/Model/Management/InstallAndroidAppDetails.php index a6b5f0d60..1011479b1 100644 --- a/src/Adyen/Model/Management/InstallAndroidAppDetails.php +++ b/src/Adyen/Model/Management/InstallAndroidAppDetails.php @@ -323,9 +323,6 @@ public function getAppId() */ public function setAppId($appId) { - if (is_null($appId)) { - throw new \InvalidArgumentException('non-nullable appId cannot be null'); - } $this->container['appId'] = $appId; return $this; @@ -350,9 +347,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/Management/InstallAndroidCertificateDetails.php b/src/Adyen/Model/Management/InstallAndroidCertificateDetails.php index 02a1e740d..8247c5f17 100644 --- a/src/Adyen/Model/Management/InstallAndroidCertificateDetails.php +++ b/src/Adyen/Model/Management/InstallAndroidCertificateDetails.php @@ -323,9 +323,6 @@ public function getCertificateId() */ public function setCertificateId($certificateId) { - if (is_null($certificateId)) { - throw new \InvalidArgumentException('non-nullable certificateId cannot be null'); - } $this->container['certificateId'] = $certificateId; return $this; @@ -350,9 +347,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/Management/InvalidField.php b/src/Adyen/Model/Management/InvalidField.php index 9f310202f..3e1a1dcf3 100644 --- a/src/Adyen/Model/Management/InvalidField.php +++ b/src/Adyen/Model/Management/InvalidField.php @@ -318,9 +318,6 @@ public function getMessage() */ public function setMessage($message) { - if (is_null($message)) { - throw new \InvalidArgumentException('non-nullable message cannot be null'); - } $this->container['message'] = $message; return $this; @@ -345,9 +342,6 @@ public function getName() */ public function setName($name) { - if (is_null($name)) { - throw new \InvalidArgumentException('non-nullable name cannot be null'); - } $this->container['name'] = $name; return $this; @@ -372,9 +366,6 @@ public function getValue() */ public function setValue($value) { - if (is_null($value)) { - throw new \InvalidArgumentException('non-nullable value cannot be null'); - } $this->container['value'] = $value; return $this; diff --git a/src/Adyen/Model/Management/Key.php b/src/Adyen/Model/Management/Key.php index 4e7d93920..392979203 100644 --- a/src/Adyen/Model/Management/Key.php +++ b/src/Adyen/Model/Management/Key.php @@ -309,9 +309,6 @@ public function getIdentifier() */ public function setIdentifier($identifier) { - if (is_null($identifier)) { - throw new \InvalidArgumentException('non-nullable identifier cannot be null'); - } $this->container['identifier'] = $identifier; return $this; @@ -336,9 +333,6 @@ public function getPassphrase() */ public function setPassphrase($passphrase) { - if (is_null($passphrase)) { - throw new \InvalidArgumentException('non-nullable passphrase cannot be null'); - } $this->container['passphrase'] = $passphrase; return $this; @@ -363,7 +357,6 @@ public function getVersion() */ public function setVersion($version) { - // Do nothing for nullable integers $this->container['version'] = $version; return $this; diff --git a/src/Adyen/Model/Management/KlarnaInfo.php b/src/Adyen/Model/Management/KlarnaInfo.php index ed7d6a266..c5f87657b 100644 --- a/src/Adyen/Model/Management/KlarnaInfo.php +++ b/src/Adyen/Model/Management/KlarnaInfo.php @@ -352,9 +352,6 @@ public function getAutoCapture() */ public function setAutoCapture($autoCapture) { - if (is_null($autoCapture)) { - throw new \InvalidArgumentException('non-nullable autoCapture cannot be null'); - } $this->container['autoCapture'] = $autoCapture; return $this; @@ -379,9 +376,6 @@ public function getDisputeEmail() */ public function setDisputeEmail($disputeEmail) { - if (is_null($disputeEmail)) { - throw new \InvalidArgumentException('non-nullable disputeEmail cannot be null'); - } $this->container['disputeEmail'] = $disputeEmail; return $this; @@ -406,9 +400,6 @@ public function getRegion() */ public function setRegion($region) { - if (is_null($region)) { - throw new \InvalidArgumentException('non-nullable region cannot be null'); - } $allowedValues = $this->getRegionAllowableValues(); if (!in_array($region, $allowedValues, true)) { throw new \InvalidArgumentException( @@ -443,9 +434,6 @@ public function getSupportEmail() */ public function setSupportEmail($supportEmail) { - if (is_null($supportEmail)) { - throw new \InvalidArgumentException('non-nullable supportEmail cannot be null'); - } $this->container['supportEmail'] = $supportEmail; return $this; diff --git a/src/Adyen/Model/Management/Links.php b/src/Adyen/Model/Management/Links.php index 4f23db803..cf33369a4 100644 --- a/src/Adyen/Model/Management/Links.php +++ b/src/Adyen/Model/Management/Links.php @@ -298,9 +298,6 @@ public function getSelf() */ public function setSelf($self) { - if (is_null($self)) { - throw new \InvalidArgumentException('non-nullable self cannot be null'); - } $this->container['self'] = $self; return $this; diff --git a/src/Adyen/Model/Management/LinksElement.php b/src/Adyen/Model/Management/LinksElement.php index 8b158483a..ff59e9ee3 100644 --- a/src/Adyen/Model/Management/LinksElement.php +++ b/src/Adyen/Model/Management/LinksElement.php @@ -295,9 +295,6 @@ public function getHref() */ public function setHref($href) { - if (is_null($href)) { - throw new \InvalidArgumentException('non-nullable href cannot be null'); - } $this->container['href'] = $href; return $this; diff --git a/src/Adyen/Model/Management/ListCompanyApiCredentialsResponse.php b/src/Adyen/Model/Management/ListCompanyApiCredentialsResponse.php index ed3ca5dda..a89c64f19 100644 --- a/src/Adyen/Model/Management/ListCompanyApiCredentialsResponse.php +++ b/src/Adyen/Model/Management/ListCompanyApiCredentialsResponse.php @@ -322,9 +322,6 @@ public function getLinks() */ public function setLinks($links) { - if (is_null($links)) { - throw new \InvalidArgumentException('non-nullable links cannot be null'); - } $this->container['links'] = $links; return $this; @@ -349,9 +346,6 @@ public function getData() */ public function setData($data) { - if (is_null($data)) { - throw new \InvalidArgumentException('non-nullable data cannot be null'); - } $this->container['data'] = $data; return $this; @@ -376,7 +370,6 @@ public function getItemsTotal() */ public function setItemsTotal($itemsTotal) { - // Do nothing for nullable integers $this->container['itemsTotal'] = $itemsTotal; return $this; @@ -401,7 +394,6 @@ public function getPagesTotal() */ public function setPagesTotal($pagesTotal) { - // Do nothing for nullable integers $this->container['pagesTotal'] = $pagesTotal; return $this; diff --git a/src/Adyen/Model/Management/ListCompanyResponse.php b/src/Adyen/Model/Management/ListCompanyResponse.php index 9b7566543..2b5e247a9 100644 --- a/src/Adyen/Model/Management/ListCompanyResponse.php +++ b/src/Adyen/Model/Management/ListCompanyResponse.php @@ -322,9 +322,6 @@ public function getLinks() */ public function setLinks($links) { - if (is_null($links)) { - throw new \InvalidArgumentException('non-nullable links cannot be null'); - } $this->container['links'] = $links; return $this; @@ -349,9 +346,6 @@ public function getData() */ public function setData($data) { - if (is_null($data)) { - throw new \InvalidArgumentException('non-nullable data cannot be null'); - } $this->container['data'] = $data; return $this; @@ -376,7 +370,6 @@ public function getItemsTotal() */ public function setItemsTotal($itemsTotal) { - // Do nothing for nullable integers $this->container['itemsTotal'] = $itemsTotal; return $this; @@ -401,7 +394,6 @@ public function getPagesTotal() */ public function setPagesTotal($pagesTotal) { - // Do nothing for nullable integers $this->container['pagesTotal'] = $pagesTotal; return $this; diff --git a/src/Adyen/Model/Management/ListCompanyUsersResponse.php b/src/Adyen/Model/Management/ListCompanyUsersResponse.php index ddd46fe1b..4d8fe752b 100644 --- a/src/Adyen/Model/Management/ListCompanyUsersResponse.php +++ b/src/Adyen/Model/Management/ListCompanyUsersResponse.php @@ -322,9 +322,6 @@ public function getLinks() */ public function setLinks($links) { - if (is_null($links)) { - throw new \InvalidArgumentException('non-nullable links cannot be null'); - } $this->container['links'] = $links; return $this; @@ -349,9 +346,6 @@ public function getData() */ public function setData($data) { - if (is_null($data)) { - throw new \InvalidArgumentException('non-nullable data cannot be null'); - } $this->container['data'] = $data; return $this; @@ -376,7 +370,6 @@ public function getItemsTotal() */ public function setItemsTotal($itemsTotal) { - // Do nothing for nullable integers $this->container['itemsTotal'] = $itemsTotal; return $this; @@ -401,7 +394,6 @@ public function getPagesTotal() */ public function setPagesTotal($pagesTotal) { - // Do nothing for nullable integers $this->container['pagesTotal'] = $pagesTotal; return $this; diff --git a/src/Adyen/Model/Management/ListExternalTerminalActionsResponse.php b/src/Adyen/Model/Management/ListExternalTerminalActionsResponse.php index fbe66ae12..8263a1f0b 100644 --- a/src/Adyen/Model/Management/ListExternalTerminalActionsResponse.php +++ b/src/Adyen/Model/Management/ListExternalTerminalActionsResponse.php @@ -295,9 +295,6 @@ public function getData() */ public function setData($data) { - if (is_null($data)) { - throw new \InvalidArgumentException('non-nullable data cannot be null'); - } $this->container['data'] = $data; return $this; diff --git a/src/Adyen/Model/Management/ListMerchantApiCredentialsResponse.php b/src/Adyen/Model/Management/ListMerchantApiCredentialsResponse.php index 65cd0c62c..8381ede0f 100644 --- a/src/Adyen/Model/Management/ListMerchantApiCredentialsResponse.php +++ b/src/Adyen/Model/Management/ListMerchantApiCredentialsResponse.php @@ -322,9 +322,6 @@ public function getLinks() */ public function setLinks($links) { - if (is_null($links)) { - throw new \InvalidArgumentException('non-nullable links cannot be null'); - } $this->container['links'] = $links; return $this; @@ -349,9 +346,6 @@ public function getData() */ public function setData($data) { - if (is_null($data)) { - throw new \InvalidArgumentException('non-nullable data cannot be null'); - } $this->container['data'] = $data; return $this; @@ -376,7 +370,6 @@ public function getItemsTotal() */ public function setItemsTotal($itemsTotal) { - // Do nothing for nullable integers $this->container['itemsTotal'] = $itemsTotal; return $this; @@ -401,7 +394,6 @@ public function getPagesTotal() */ public function setPagesTotal($pagesTotal) { - // Do nothing for nullable integers $this->container['pagesTotal'] = $pagesTotal; return $this; diff --git a/src/Adyen/Model/Management/ListMerchantResponse.php b/src/Adyen/Model/Management/ListMerchantResponse.php index 667196d88..1938514ce 100644 --- a/src/Adyen/Model/Management/ListMerchantResponse.php +++ b/src/Adyen/Model/Management/ListMerchantResponse.php @@ -322,9 +322,6 @@ public function getLinks() */ public function setLinks($links) { - if (is_null($links)) { - throw new \InvalidArgumentException('non-nullable links cannot be null'); - } $this->container['links'] = $links; return $this; @@ -349,9 +346,6 @@ public function getData() */ public function setData($data) { - if (is_null($data)) { - throw new \InvalidArgumentException('non-nullable data cannot be null'); - } $this->container['data'] = $data; return $this; @@ -376,7 +370,6 @@ public function getItemsTotal() */ public function setItemsTotal($itemsTotal) { - // Do nothing for nullable integers $this->container['itemsTotal'] = $itemsTotal; return $this; @@ -401,7 +394,6 @@ public function getPagesTotal() */ public function setPagesTotal($pagesTotal) { - // Do nothing for nullable integers $this->container['pagesTotal'] = $pagesTotal; return $this; diff --git a/src/Adyen/Model/Management/ListMerchantUsersResponse.php b/src/Adyen/Model/Management/ListMerchantUsersResponse.php index df8f48ce4..2075fe15c 100644 --- a/src/Adyen/Model/Management/ListMerchantUsersResponse.php +++ b/src/Adyen/Model/Management/ListMerchantUsersResponse.php @@ -322,9 +322,6 @@ public function getLinks() */ public function setLinks($links) { - if (is_null($links)) { - throw new \InvalidArgumentException('non-nullable links cannot be null'); - } $this->container['links'] = $links; return $this; @@ -349,9 +346,6 @@ public function getData() */ public function setData($data) { - if (is_null($data)) { - throw new \InvalidArgumentException('non-nullable data cannot be null'); - } $this->container['data'] = $data; return $this; @@ -376,7 +370,6 @@ public function getItemsTotal() */ public function setItemsTotal($itemsTotal) { - // Do nothing for nullable integers $this->container['itemsTotal'] = $itemsTotal; return $this; @@ -401,7 +394,6 @@ public function getPagesTotal() */ public function setPagesTotal($pagesTotal) { - // Do nothing for nullable integers $this->container['pagesTotal'] = $pagesTotal; return $this; diff --git a/src/Adyen/Model/Management/ListStoresResponse.php b/src/Adyen/Model/Management/ListStoresResponse.php index 95706c604..ebbf3a86d 100644 --- a/src/Adyen/Model/Management/ListStoresResponse.php +++ b/src/Adyen/Model/Management/ListStoresResponse.php @@ -322,9 +322,6 @@ public function getLinks() */ public function setLinks($links) { - if (is_null($links)) { - throw new \InvalidArgumentException('non-nullable links cannot be null'); - } $this->container['links'] = $links; return $this; @@ -349,9 +346,6 @@ public function getData() */ public function setData($data) { - if (is_null($data)) { - throw new \InvalidArgumentException('non-nullable data cannot be null'); - } $this->container['data'] = $data; return $this; @@ -376,7 +370,6 @@ public function getItemsTotal() */ public function setItemsTotal($itemsTotal) { - // Do nothing for nullable integers $this->container['itemsTotal'] = $itemsTotal; return $this; @@ -401,7 +394,6 @@ public function getPagesTotal() */ public function setPagesTotal($pagesTotal) { - // Do nothing for nullable integers $this->container['pagesTotal'] = $pagesTotal; return $this; diff --git a/src/Adyen/Model/Management/ListTerminalsResponse.php b/src/Adyen/Model/Management/ListTerminalsResponse.php index 7bc0c5bdf..8efb15b48 100644 --- a/src/Adyen/Model/Management/ListTerminalsResponse.php +++ b/src/Adyen/Model/Management/ListTerminalsResponse.php @@ -322,9 +322,6 @@ public function getLinks() */ public function setLinks($links) { - if (is_null($links)) { - throw new \InvalidArgumentException('non-nullable links cannot be null'); - } $this->container['links'] = $links; return $this; @@ -349,9 +346,6 @@ public function getData() */ public function setData($data) { - if (is_null($data)) { - throw new \InvalidArgumentException('non-nullable data cannot be null'); - } $this->container['data'] = $data; return $this; @@ -376,7 +370,6 @@ public function getItemsTotal() */ public function setItemsTotal($itemsTotal) { - // Do nothing for nullable integers $this->container['itemsTotal'] = $itemsTotal; return $this; @@ -401,7 +394,6 @@ public function getPagesTotal() */ public function setPagesTotal($pagesTotal) { - // Do nothing for nullable integers $this->container['pagesTotal'] = $pagesTotal; return $this; diff --git a/src/Adyen/Model/Management/ListWebhooksResponse.php b/src/Adyen/Model/Management/ListWebhooksResponse.php index d2901a6bb..4cfb4cb00 100644 --- a/src/Adyen/Model/Management/ListWebhooksResponse.php +++ b/src/Adyen/Model/Management/ListWebhooksResponse.php @@ -329,9 +329,6 @@ public function getLinks() */ public function setLinks($links) { - if (is_null($links)) { - throw new \InvalidArgumentException('non-nullable links cannot be null'); - } $this->container['links'] = $links; return $this; @@ -356,9 +353,6 @@ public function getAccountReference() */ public function setAccountReference($accountReference) { - if (is_null($accountReference)) { - throw new \InvalidArgumentException('non-nullable accountReference cannot be null'); - } $this->container['accountReference'] = $accountReference; return $this; @@ -383,9 +377,6 @@ public function getData() */ public function setData($data) { - if (is_null($data)) { - throw new \InvalidArgumentException('non-nullable data cannot be null'); - } $this->container['data'] = $data; return $this; @@ -410,7 +401,6 @@ public function getItemsTotal() */ public function setItemsTotal($itemsTotal) { - // Do nothing for nullable integers $this->container['itemsTotal'] = $itemsTotal; return $this; @@ -435,7 +425,6 @@ public function getPagesTotal() */ public function setPagesTotal($pagesTotal) { - // Do nothing for nullable integers $this->container['pagesTotal'] = $pagesTotal; return $this; diff --git a/src/Adyen/Model/Management/Localization.php b/src/Adyen/Model/Management/Localization.php index 7ef8be02f..0c07d9980 100644 --- a/src/Adyen/Model/Management/Localization.php +++ b/src/Adyen/Model/Management/Localization.php @@ -309,9 +309,6 @@ public function getLanguage() */ public function setLanguage($language) { - if (is_null($language)) { - throw new \InvalidArgumentException('non-nullable language cannot be null'); - } $this->container['language'] = $language; return $this; @@ -336,9 +333,6 @@ public function getSecondaryLanguage() */ public function setSecondaryLanguage($secondaryLanguage) { - if (is_null($secondaryLanguage)) { - throw new \InvalidArgumentException('non-nullable secondaryLanguage cannot be null'); - } $this->container['secondaryLanguage'] = $secondaryLanguage; return $this; @@ -363,9 +357,6 @@ public function getTimezone() */ public function setTimezone($timezone) { - if (is_null($timezone)) { - throw new \InvalidArgumentException('non-nullable timezone cannot be null'); - } $this->container['timezone'] = $timezone; return $this; diff --git a/src/Adyen/Model/Management/Logo.php b/src/Adyen/Model/Management/Logo.php index 95ccc0aa6..c6fef75d7 100644 --- a/src/Adyen/Model/Management/Logo.php +++ b/src/Adyen/Model/Management/Logo.php @@ -295,9 +295,6 @@ public function getData() */ public function setData($data) { - if (is_null($data)) { - throw new \InvalidArgumentException('non-nullable data cannot be null'); - } $this->container['data'] = $data; return $this; diff --git a/src/Adyen/Model/Management/MeApiCredential.php b/src/Adyen/Model/Management/MeApiCredential.php index db1d3b229..430d88944 100644 --- a/src/Adyen/Model/Management/MeApiCredential.php +++ b/src/Adyen/Model/Management/MeApiCredential.php @@ -383,9 +383,6 @@ public function getLinks() */ public function setLinks($links) { - if (is_null($links)) { - throw new \InvalidArgumentException('non-nullable links cannot be null'); - } $this->container['links'] = $links; return $this; @@ -410,9 +407,6 @@ public function getActive() */ public function setActive($active) { - if (is_null($active)) { - throw new \InvalidArgumentException('non-nullable active cannot be null'); - } $this->container['active'] = $active; return $this; @@ -437,9 +431,6 @@ public function getAllowedIpAddresses() */ public function setAllowedIpAddresses($allowedIpAddresses) { - if (is_null($allowedIpAddresses)) { - throw new \InvalidArgumentException('non-nullable allowedIpAddresses cannot be null'); - } $this->container['allowedIpAddresses'] = $allowedIpAddresses; return $this; @@ -464,9 +455,6 @@ public function getAllowedOrigins() */ public function setAllowedOrigins($allowedOrigins) { - if (is_null($allowedOrigins)) { - throw new \InvalidArgumentException('non-nullable allowedOrigins cannot be null'); - } $this->container['allowedOrigins'] = $allowedOrigins; return $this; @@ -491,9 +479,6 @@ public function getAssociatedMerchantAccounts() */ public function setAssociatedMerchantAccounts($associatedMerchantAccounts) { - if (is_null($associatedMerchantAccounts)) { - throw new \InvalidArgumentException('non-nullable associatedMerchantAccounts cannot be null'); - } $this->container['associatedMerchantAccounts'] = $associatedMerchantAccounts; return $this; @@ -518,9 +503,6 @@ public function getClientKey() */ public function setClientKey($clientKey) { - if (is_null($clientKey)) { - throw new \InvalidArgumentException('non-nullable clientKey cannot be null'); - } $this->container['clientKey'] = $clientKey; return $this; @@ -545,9 +527,6 @@ public function getCompanyName() */ public function setCompanyName($companyName) { - if (is_null($companyName)) { - throw new \InvalidArgumentException('non-nullable companyName cannot be null'); - } $this->container['companyName'] = $companyName; return $this; @@ -572,9 +551,6 @@ public function getDescription() */ public function setDescription($description) { - if (is_null($description)) { - throw new \InvalidArgumentException('non-nullable description cannot be null'); - } $this->container['description'] = $description; return $this; @@ -599,9 +575,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -626,9 +599,6 @@ public function getRoles() */ public function setRoles($roles) { - if (is_null($roles)) { - throw new \InvalidArgumentException('non-nullable roles cannot be null'); - } $this->container['roles'] = $roles; return $this; @@ -653,9 +623,6 @@ public function getUsername() */ public function setUsername($username) { - if (is_null($username)) { - throw new \InvalidArgumentException('non-nullable username cannot be null'); - } $this->container['username'] = $username; return $this; diff --git a/src/Adyen/Model/Management/MealVoucherFRInfo.php b/src/Adyen/Model/Management/MealVoucherFRInfo.php index a4816b952..8fd85d365 100644 --- a/src/Adyen/Model/Management/MealVoucherFRInfo.php +++ b/src/Adyen/Model/Management/MealVoucherFRInfo.php @@ -318,9 +318,6 @@ public function getConecsId() */ public function setConecsId($conecsId) { - if (is_null($conecsId)) { - throw new \InvalidArgumentException('non-nullable conecsId cannot be null'); - } $this->container['conecsId'] = $conecsId; return $this; @@ -345,9 +342,6 @@ public function getSiret() */ public function setSiret($siret) { - if (is_null($siret)) { - throw new \InvalidArgumentException('non-nullable siret cannot be null'); - } $this->container['siret'] = $siret; return $this; @@ -372,9 +366,6 @@ public function getSubTypes() */ public function setSubTypes($subTypes) { - if (is_null($subTypes)) { - throw new \InvalidArgumentException('non-nullable subTypes cannot be null'); - } $this->container['subTypes'] = $subTypes; return $this; diff --git a/src/Adyen/Model/Management/Merchant.php b/src/Adyen/Model/Management/Merchant.php index 48e21ff9e..4a9b232d4 100644 --- a/src/Adyen/Model/Management/Merchant.php +++ b/src/Adyen/Model/Management/Merchant.php @@ -386,9 +386,6 @@ public function getLinks() */ public function setLinks($links) { - if (is_null($links)) { - throw new \InvalidArgumentException('non-nullable links cannot be null'); - } $this->container['links'] = $links; return $this; @@ -413,9 +410,6 @@ public function getCaptureDelay() */ public function setCaptureDelay($captureDelay) { - if (is_null($captureDelay)) { - throw new \InvalidArgumentException('non-nullable captureDelay cannot be null'); - } $this->container['captureDelay'] = $captureDelay; return $this; @@ -440,9 +434,6 @@ public function getCompanyId() */ public function setCompanyId($companyId) { - if (is_null($companyId)) { - throw new \InvalidArgumentException('non-nullable companyId cannot be null'); - } $this->container['companyId'] = $companyId; return $this; @@ -467,9 +458,6 @@ public function getDataCenters() */ public function setDataCenters($dataCenters) { - if (is_null($dataCenters)) { - throw new \InvalidArgumentException('non-nullable dataCenters cannot be null'); - } $this->container['dataCenters'] = $dataCenters; return $this; @@ -494,9 +482,6 @@ public function getDefaultShopperInteraction() */ public function setDefaultShopperInteraction($defaultShopperInteraction) { - if (is_null($defaultShopperInteraction)) { - throw new \InvalidArgumentException('non-nullable defaultShopperInteraction cannot be null'); - } $this->container['defaultShopperInteraction'] = $defaultShopperInteraction; return $this; @@ -521,9 +506,6 @@ public function getDescription() */ public function setDescription($description) { - if (is_null($description)) { - throw new \InvalidArgumentException('non-nullable description cannot be null'); - } $this->container['description'] = $description; return $this; @@ -548,9 +530,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -575,9 +554,6 @@ public function getMerchantCity() */ public function setMerchantCity($merchantCity) { - if (is_null($merchantCity)) { - throw new \InvalidArgumentException('non-nullable merchantCity cannot be null'); - } $this->container['merchantCity'] = $merchantCity; return $this; @@ -602,9 +578,6 @@ public function getName() */ public function setName($name) { - if (is_null($name)) { - throw new \InvalidArgumentException('non-nullable name cannot be null'); - } $this->container['name'] = $name; return $this; @@ -629,9 +602,6 @@ public function getPricingPlan() */ public function setPricingPlan($pricingPlan) { - if (is_null($pricingPlan)) { - throw new \InvalidArgumentException('non-nullable pricingPlan cannot be null'); - } $this->container['pricingPlan'] = $pricingPlan; return $this; @@ -656,9 +626,6 @@ public function getPrimarySettlementCurrency() */ public function setPrimarySettlementCurrency($primarySettlementCurrency) { - if (is_null($primarySettlementCurrency)) { - throw new \InvalidArgumentException('non-nullable primarySettlementCurrency cannot be null'); - } $this->container['primarySettlementCurrency'] = $primarySettlementCurrency; return $this; @@ -683,9 +650,6 @@ public function getReference() */ public function setReference($reference) { - if (is_null($reference)) { - throw new \InvalidArgumentException('non-nullable reference cannot be null'); - } $this->container['reference'] = $reference; return $this; @@ -710,9 +674,6 @@ public function getShopWebAddress() */ public function setShopWebAddress($shopWebAddress) { - if (is_null($shopWebAddress)) { - throw new \InvalidArgumentException('non-nullable shopWebAddress cannot be null'); - } $this->container['shopWebAddress'] = $shopWebAddress; return $this; @@ -737,9 +698,6 @@ public function getStatus() */ public function setStatus($status) { - if (is_null($status)) { - throw new \InvalidArgumentException('non-nullable status cannot be null'); - } $this->container['status'] = $status; return $this; diff --git a/src/Adyen/Model/Management/MerchantLinks.php b/src/Adyen/Model/Management/MerchantLinks.php index 7b7f4b016..8424605c2 100644 --- a/src/Adyen/Model/Management/MerchantLinks.php +++ b/src/Adyen/Model/Management/MerchantLinks.php @@ -319,9 +319,6 @@ public function getApiCredentials() */ public function setApiCredentials($apiCredentials) { - if (is_null($apiCredentials)) { - throw new \InvalidArgumentException('non-nullable apiCredentials cannot be null'); - } $this->container['apiCredentials'] = $apiCredentials; return $this; @@ -346,9 +343,6 @@ public function getSelf() */ public function setSelf($self) { - if (is_null($self)) { - throw new \InvalidArgumentException('non-nullable self cannot be null'); - } $this->container['self'] = $self; return $this; @@ -373,9 +367,6 @@ public function getUsers() */ public function setUsers($users) { - if (is_null($users)) { - throw new \InvalidArgumentException('non-nullable users cannot be null'); - } $this->container['users'] = $users; return $this; @@ -400,9 +391,6 @@ public function getWebhooks() */ public function setWebhooks($webhooks) { - if (is_null($webhooks)) { - throw new \InvalidArgumentException('non-nullable webhooks cannot be null'); - } $this->container['webhooks'] = $webhooks; return $this; diff --git a/src/Adyen/Model/Management/MinorUnitsMonetaryValue.php b/src/Adyen/Model/Management/MinorUnitsMonetaryValue.php index bde8d0b4c..425bb7eb6 100644 --- a/src/Adyen/Model/Management/MinorUnitsMonetaryValue.php +++ b/src/Adyen/Model/Management/MinorUnitsMonetaryValue.php @@ -302,7 +302,6 @@ public function getAmount() */ public function setAmount($amount) { - // Do nothing for nullable integers $this->container['amount'] = $amount; return $this; @@ -327,9 +326,6 @@ public function getCurrencyCode() */ public function setCurrencyCode($currencyCode) { - if (is_null($currencyCode)) { - throw new \InvalidArgumentException('non-nullable currencyCode cannot be null'); - } $this->container['currencyCode'] = $currencyCode; return $this; diff --git a/src/Adyen/Model/Management/Name.php b/src/Adyen/Model/Management/Name.php index 27db963db..0ab85e9ff 100644 --- a/src/Adyen/Model/Management/Name.php +++ b/src/Adyen/Model/Management/Name.php @@ -308,9 +308,6 @@ public function getFirstName() */ public function setFirstName($firstName) { - if (is_null($firstName)) { - throw new \InvalidArgumentException('non-nullable firstName cannot be null'); - } $this->container['firstName'] = $firstName; return $this; @@ -335,9 +332,6 @@ public function getLastName() */ public function setLastName($lastName) { - if (is_null($lastName)) { - throw new \InvalidArgumentException('non-nullable lastName cannot be null'); - } $this->container['lastName'] = $lastName; return $this; diff --git a/src/Adyen/Model/Management/Name2.php b/src/Adyen/Model/Management/Name2.php index 30f8bc7e9..e2bf954dc 100644 --- a/src/Adyen/Model/Management/Name2.php +++ b/src/Adyen/Model/Management/Name2.php @@ -302,9 +302,6 @@ public function getFirstName() */ public function setFirstName($firstName) { - if (is_null($firstName)) { - throw new \InvalidArgumentException('non-nullable firstName cannot be null'); - } $this->container['firstName'] = $firstName; return $this; @@ -329,9 +326,6 @@ public function getLastName() */ public function setLastName($lastName) { - if (is_null($lastName)) { - throw new \InvalidArgumentException('non-nullable lastName cannot be null'); - } $this->container['lastName'] = $lastName; return $this; diff --git a/src/Adyen/Model/Management/Nexo.php b/src/Adyen/Model/Management/Nexo.php index a26325f82..a93ae2ba0 100644 --- a/src/Adyen/Model/Management/Nexo.php +++ b/src/Adyen/Model/Management/Nexo.php @@ -323,9 +323,6 @@ public function getDisplayUrls() */ public function setDisplayUrls($displayUrls) { - if (is_null($displayUrls)) { - throw new \InvalidArgumentException('non-nullable displayUrls cannot be null'); - } $this->container['displayUrls'] = $displayUrls; return $this; @@ -350,9 +347,6 @@ public function getEncryptionKey() */ public function setEncryptionKey($encryptionKey) { - if (is_null($encryptionKey)) { - throw new \InvalidArgumentException('non-nullable encryptionKey cannot be null'); - } $this->container['encryptionKey'] = $encryptionKey; return $this; @@ -377,9 +371,6 @@ public function getEventUrls() */ public function setEventUrls($eventUrls) { - if (is_null($eventUrls)) { - throw new \InvalidArgumentException('non-nullable eventUrls cannot be null'); - } $this->container['eventUrls'] = $eventUrls; return $this; @@ -406,9 +397,6 @@ public function getNexoEventUrls() */ public function setNexoEventUrls($nexoEventUrls) { - if (is_null($nexoEventUrls)) { - throw new \InvalidArgumentException('non-nullable nexoEventUrls cannot be null'); - } $this->container['nexoEventUrls'] = $nexoEventUrls; return $this; @@ -433,9 +421,6 @@ public function getNotification() */ public function setNotification($notification) { - if (is_null($notification)) { - throw new \InvalidArgumentException('non-nullable notification cannot be null'); - } $this->container['notification'] = $notification; return $this; diff --git a/src/Adyen/Model/Management/Notification.php b/src/Adyen/Model/Management/Notification.php index 4c80f842a..b4bcdcfd9 100644 --- a/src/Adyen/Model/Management/Notification.php +++ b/src/Adyen/Model/Management/Notification.php @@ -348,9 +348,6 @@ public function getCategory() */ 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( @@ -385,9 +382,6 @@ public function getDetails() */ public function setDetails($details) { - if (is_null($details)) { - throw new \InvalidArgumentException('non-nullable details cannot be null'); - } $this->container['details'] = $details; return $this; @@ -412,9 +406,6 @@ public function getEnabled() */ public function setEnabled($enabled) { - if (is_null($enabled)) { - throw new \InvalidArgumentException('non-nullable enabled cannot be null'); - } $this->container['enabled'] = $enabled; return $this; @@ -439,9 +430,6 @@ public function getShowButton() */ public function setShowButton($showButton) { - if (is_null($showButton)) { - throw new \InvalidArgumentException('non-nullable showButton cannot be null'); - } $this->container['showButton'] = $showButton; return $this; @@ -466,9 +454,6 @@ public function getTitle() */ public function setTitle($title) { - if (is_null($title)) { - throw new \InvalidArgumentException('non-nullable title cannot be null'); - } $this->container['title'] = $title; return $this; diff --git a/src/Adyen/Model/Management/NotificationUrl.php b/src/Adyen/Model/Management/NotificationUrl.php index 355c33213..fb3ff202d 100644 --- a/src/Adyen/Model/Management/NotificationUrl.php +++ b/src/Adyen/Model/Management/NotificationUrl.php @@ -302,9 +302,6 @@ public function getLocalUrls() */ public function setLocalUrls($localUrls) { - if (is_null($localUrls)) { - throw new \InvalidArgumentException('non-nullable localUrls cannot be null'); - } $this->container['localUrls'] = $localUrls; return $this; @@ -329,9 +326,6 @@ public function getPublicUrls() */ public function setPublicUrls($publicUrls) { - if (is_null($publicUrls)) { - throw new \InvalidArgumentException('non-nullable publicUrls cannot be null'); - } $this->container['publicUrls'] = $publicUrls; return $this; diff --git a/src/Adyen/Model/Management/ObjectSerializer.php b/src/Adyen/Model/Management/ObjectSerializer.php index cc5272bf9..2ff0b7ef6 100644 --- a/src/Adyen/Model/Management/ObjectSerializer.php +++ b/src/Adyen/Model/Management/ObjectSerializer.php @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach ($data as $property => $value) { + foreach($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) { - return $timestamp; - } + if (!is_string($timestamp)) return $timestamp; return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/Management/OfflineProcessing.php b/src/Adyen/Model/Management/OfflineProcessing.php index c7e28d1f7..6a74dc69c 100644 --- a/src/Adyen/Model/Management/OfflineProcessing.php +++ b/src/Adyen/Model/Management/OfflineProcessing.php @@ -302,7 +302,6 @@ public function getChipFloorLimit() */ public function setChipFloorLimit($chipFloorLimit) { - // Do nothing for nullable integers $this->container['chipFloorLimit'] = $chipFloorLimit; return $this; @@ -327,9 +326,6 @@ public function getOfflineSwipeLimits() */ public function setOfflineSwipeLimits($offlineSwipeLimits) { - if (is_null($offlineSwipeLimits)) { - throw new \InvalidArgumentException('non-nullable offlineSwipeLimits cannot be null'); - } $this->container['offlineSwipeLimits'] = $offlineSwipeLimits; return $this; diff --git a/src/Adyen/Model/Management/Opi.php b/src/Adyen/Model/Management/Opi.php index 86f2a0e2c..3055deb21 100644 --- a/src/Adyen/Model/Management/Opi.php +++ b/src/Adyen/Model/Management/Opi.php @@ -309,9 +309,6 @@ public function getEnablePayAtTable() */ public function setEnablePayAtTable($enablePayAtTable) { - if (is_null($enablePayAtTable)) { - throw new \InvalidArgumentException('non-nullable enablePayAtTable cannot be null'); - } $this->container['enablePayAtTable'] = $enablePayAtTable; return $this; @@ -336,9 +333,6 @@ public function getPayAtTableStoreNumber() */ public function setPayAtTableStoreNumber($payAtTableStoreNumber) { - if (is_null($payAtTableStoreNumber)) { - throw new \InvalidArgumentException('non-nullable payAtTableStoreNumber cannot be null'); - } $this->container['payAtTableStoreNumber'] = $payAtTableStoreNumber; return $this; @@ -363,9 +357,6 @@ public function getPayAtTableURL() */ public function setPayAtTableURL($payAtTableURL) { - if (is_null($payAtTableURL)) { - throw new \InvalidArgumentException('non-nullable payAtTableURL cannot be null'); - } $this->container['payAtTableURL'] = $payAtTableURL; return $this; diff --git a/src/Adyen/Model/Management/OrderItem.php b/src/Adyen/Model/Management/OrderItem.php index 42f668d40..4a8d56bd7 100644 --- a/src/Adyen/Model/Management/OrderItem.php +++ b/src/Adyen/Model/Management/OrderItem.php @@ -316,9 +316,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -343,9 +340,6 @@ public function getInstallments() */ public function setInstallments($installments) { - if (is_null($installments)) { - throw new \InvalidArgumentException('non-nullable installments cannot be null'); - } $this->container['installments'] = $installments; return $this; @@ -370,9 +364,6 @@ public function getName() */ public function setName($name) { - if (is_null($name)) { - throw new \InvalidArgumentException('non-nullable name cannot be null'); - } $this->container['name'] = $name; return $this; @@ -397,7 +388,6 @@ public function getQuantity() */ public function setQuantity($quantity) { - // Do nothing for nullable integers $this->container['quantity'] = $quantity; return $this; diff --git a/src/Adyen/Model/Management/PaginationLinks.php b/src/Adyen/Model/Management/PaginationLinks.php index a88612616..045788851 100644 --- a/src/Adyen/Model/Management/PaginationLinks.php +++ b/src/Adyen/Model/Management/PaginationLinks.php @@ -332,9 +332,6 @@ public function getFirst() */ public function setFirst($first) { - if (is_null($first)) { - throw new \InvalidArgumentException('non-nullable first cannot be null'); - } $this->container['first'] = $first; return $this; @@ -359,9 +356,6 @@ public function getLast() */ public function setLast($last) { - if (is_null($last)) { - throw new \InvalidArgumentException('non-nullable last cannot be null'); - } $this->container['last'] = $last; return $this; @@ -386,9 +380,6 @@ public function getNext() */ public function setNext($next) { - if (is_null($next)) { - throw new \InvalidArgumentException('non-nullable next cannot be null'); - } $this->container['next'] = $next; return $this; @@ -413,9 +404,6 @@ public function getPrev() */ public function setPrev($prev) { - if (is_null($prev)) { - throw new \InvalidArgumentException('non-nullable prev cannot be null'); - } $this->container['prev'] = $prev; return $this; @@ -440,9 +428,6 @@ public function getSelf() */ public function setSelf($self) { - if (is_null($self)) { - throw new \InvalidArgumentException('non-nullable self cannot be null'); - } $this->container['self'] = $self; return $this; diff --git a/src/Adyen/Model/Management/Passcodes.php b/src/Adyen/Model/Management/Passcodes.php index 6131b596b..ce42b0597 100644 --- a/src/Adyen/Model/Management/Passcodes.php +++ b/src/Adyen/Model/Management/Passcodes.php @@ -316,9 +316,6 @@ public function getAdminMenuPin() */ public function setAdminMenuPin($adminMenuPin) { - if (is_null($adminMenuPin)) { - throw new \InvalidArgumentException('non-nullable adminMenuPin cannot be null'); - } $this->container['adminMenuPin'] = $adminMenuPin; return $this; @@ -343,9 +340,6 @@ public function getRefundPin() */ public function setRefundPin($refundPin) { - if (is_null($refundPin)) { - throw new \InvalidArgumentException('non-nullable refundPin cannot be null'); - } $this->container['refundPin'] = $refundPin; return $this; @@ -370,9 +364,6 @@ public function getScreenLockPin() */ public function setScreenLockPin($screenLockPin) { - if (is_null($screenLockPin)) { - throw new \InvalidArgumentException('non-nullable screenLockPin cannot be null'); - } $this->container['screenLockPin'] = $screenLockPin; return $this; @@ -397,9 +388,6 @@ public function getTxMenuPin() */ public function setTxMenuPin($txMenuPin) { - if (is_null($txMenuPin)) { - throw new \InvalidArgumentException('non-nullable txMenuPin cannot be null'); - } $this->container['txMenuPin'] = $txMenuPin; return $this; diff --git a/src/Adyen/Model/Management/PayAtTable.php b/src/Adyen/Model/Management/PayAtTable.php index bac364a8e..f28025990 100644 --- a/src/Adyen/Model/Management/PayAtTable.php +++ b/src/Adyen/Model/Management/PayAtTable.php @@ -355,9 +355,6 @@ public function getAuthenticationMethod() */ public function setAuthenticationMethod($authenticationMethod) { - if (is_null($authenticationMethod)) { - throw new \InvalidArgumentException('non-nullable authenticationMethod cannot be null'); - } $allowedValues = $this->getAuthenticationMethodAllowableValues(); if (!in_array($authenticationMethod, $allowedValues, true)) { throw new \InvalidArgumentException( @@ -392,9 +389,6 @@ public function getEnablePayAtTable() */ public function setEnablePayAtTable($enablePayAtTable) { - if (is_null($enablePayAtTable)) { - throw new \InvalidArgumentException('non-nullable enablePayAtTable cannot be null'); - } $this->container['enablePayAtTable'] = $enablePayAtTable; return $this; diff --git a/src/Adyen/Model/Management/PayPalInfo.php b/src/Adyen/Model/Management/PayPalInfo.php index ecf150d78..d48153800 100644 --- a/src/Adyen/Model/Management/PayPalInfo.php +++ b/src/Adyen/Model/Management/PayPalInfo.php @@ -315,9 +315,6 @@ public function getDirectCapture() */ public function setDirectCapture($directCapture) { - if (is_null($directCapture)) { - throw new \InvalidArgumentException('non-nullable directCapture cannot be null'); - } $this->container['directCapture'] = $directCapture; return $this; @@ -342,9 +339,6 @@ public function getPayerId() */ public function setPayerId($payerId) { - if (is_null($payerId)) { - throw new \InvalidArgumentException('non-nullable payerId cannot be null'); - } $this->container['payerId'] = $payerId; return $this; @@ -369,9 +363,6 @@ public function getSubject() */ public function setSubject($subject) { - if (is_null($subject)) { - throw new \InvalidArgumentException('non-nullable subject cannot be null'); - } $this->container['subject'] = $subject; return $this; diff --git a/src/Adyen/Model/Management/Payment.php b/src/Adyen/Model/Management/Payment.php index d0d196850..19323b8eb 100644 --- a/src/Adyen/Model/Management/Payment.php +++ b/src/Adyen/Model/Management/Payment.php @@ -302,9 +302,6 @@ public function getContactlessCurrency() */ public function setContactlessCurrency($contactlessCurrency) { - if (is_null($contactlessCurrency)) { - throw new \InvalidArgumentException('non-nullable contactlessCurrency cannot be null'); - } $this->container['contactlessCurrency'] = $contactlessCurrency; return $this; @@ -329,9 +326,6 @@ public function getHideMinorUnitsInCurrencies() */ public function setHideMinorUnitsInCurrencies($hideMinorUnitsInCurrencies) { - if (is_null($hideMinorUnitsInCurrencies)) { - throw new \InvalidArgumentException('non-nullable hideMinorUnitsInCurrencies cannot be null'); - } $this->container['hideMinorUnitsInCurrencies'] = $hideMinorUnitsInCurrencies; return $this; diff --git a/src/Adyen/Model/Management/PaymentMethod.php b/src/Adyen/Model/Management/PaymentMethod.php index 34927aeb4..8048f8730 100644 --- a/src/Adyen/Model/Management/PaymentMethod.php +++ b/src/Adyen/Model/Management/PaymentMethod.php @@ -598,9 +598,6 @@ public function getAfterpayTouch() */ public function setAfterpayTouch($afterpayTouch) { - if (is_null($afterpayTouch)) { - throw new \InvalidArgumentException('non-nullable afterpayTouch cannot be null'); - } $this->container['afterpayTouch'] = $afterpayTouch; return $this; @@ -625,9 +622,6 @@ public function getAllowed() */ public function setAllowed($allowed) { - if (is_null($allowed)) { - throw new \InvalidArgumentException('non-nullable allowed cannot be null'); - } $this->container['allowed'] = $allowed; return $this; @@ -652,9 +646,6 @@ public function getAmex() */ public function setAmex($amex) { - if (is_null($amex)) { - throw new \InvalidArgumentException('non-nullable amex cannot be null'); - } $this->container['amex'] = $amex; return $this; @@ -679,9 +670,6 @@ public function getApplePay() */ public function setApplePay($applePay) { - if (is_null($applePay)) { - throw new \InvalidArgumentException('non-nullable applePay cannot be null'); - } $this->container['applePay'] = $applePay; return $this; @@ -706,9 +694,6 @@ public function getBcmc() */ public function setBcmc($bcmc) { - if (is_null($bcmc)) { - throw new \InvalidArgumentException('non-nullable bcmc cannot be null'); - } $this->container['bcmc'] = $bcmc; return $this; @@ -733,9 +718,6 @@ public function getBusinessLineId() */ public function setBusinessLineId($businessLineId) { - if (is_null($businessLineId)) { - throw new \InvalidArgumentException('non-nullable businessLineId cannot be null'); - } $this->container['businessLineId'] = $businessLineId; return $this; @@ -760,9 +742,6 @@ public function getCartesBancaires() */ public function setCartesBancaires($cartesBancaires) { - if (is_null($cartesBancaires)) { - throw new \InvalidArgumentException('non-nullable cartesBancaires cannot be null'); - } $this->container['cartesBancaires'] = $cartesBancaires; return $this; @@ -787,9 +766,6 @@ public function getClearpay() */ public function setClearpay($clearpay) { - if (is_null($clearpay)) { - throw new \InvalidArgumentException('non-nullable clearpay cannot be null'); - } $this->container['clearpay'] = $clearpay; return $this; @@ -814,9 +790,6 @@ public function getCountries() */ public function setCountries($countries) { - if (is_null($countries)) { - throw new \InvalidArgumentException('non-nullable countries cannot be null'); - } $this->container['countries'] = $countries; return $this; @@ -841,9 +814,6 @@ public function getCup() */ public function setCup($cup) { - if (is_null($cup)) { - throw new \InvalidArgumentException('non-nullable cup cannot be null'); - } $this->container['cup'] = $cup; return $this; @@ -868,9 +838,6 @@ public function getCurrencies() */ public function setCurrencies($currencies) { - if (is_null($currencies)) { - throw new \InvalidArgumentException('non-nullable currencies cannot be null'); - } $this->container['currencies'] = $currencies; return $this; @@ -895,9 +862,6 @@ public function getCustomRoutingFlags() */ public function setCustomRoutingFlags($customRoutingFlags) { - if (is_null($customRoutingFlags)) { - throw new \InvalidArgumentException('non-nullable customRoutingFlags cannot be null'); - } $this->container['customRoutingFlags'] = $customRoutingFlags; return $this; @@ -922,9 +886,6 @@ public function getDiners() */ public function setDiners($diners) { - if (is_null($diners)) { - throw new \InvalidArgumentException('non-nullable diners cannot be null'); - } $this->container['diners'] = $diners; return $this; @@ -949,9 +910,6 @@ public function getDiscover() */ public function setDiscover($discover) { - if (is_null($discover)) { - throw new \InvalidArgumentException('non-nullable discover cannot be null'); - } $this->container['discover'] = $discover; return $this; @@ -976,9 +934,6 @@ public function getEftposAustralia() */ public function setEftposAustralia($eftposAustralia) { - if (is_null($eftposAustralia)) { - throw new \InvalidArgumentException('non-nullable eftposAustralia cannot be null'); - } $this->container['eftposAustralia'] = $eftposAustralia; return $this; @@ -1003,9 +958,6 @@ public function getEnabled() */ public function setEnabled($enabled) { - if (is_null($enabled)) { - throw new \InvalidArgumentException('non-nullable enabled cannot be null'); - } $this->container['enabled'] = $enabled; return $this; @@ -1030,9 +982,6 @@ public function getGiroPay() */ public function setGiroPay($giroPay) { - if (is_null($giroPay)) { - throw new \InvalidArgumentException('non-nullable giroPay cannot be null'); - } $this->container['giroPay'] = $giroPay; return $this; @@ -1057,9 +1006,6 @@ public function getGirocard() */ public function setGirocard($girocard) { - if (is_null($girocard)) { - throw new \InvalidArgumentException('non-nullable girocard cannot be null'); - } $this->container['girocard'] = $girocard; return $this; @@ -1084,9 +1030,6 @@ public function getGooglePay() */ public function setGooglePay($googlePay) { - if (is_null($googlePay)) { - throw new \InvalidArgumentException('non-nullable googlePay cannot be null'); - } $this->container['googlePay'] = $googlePay; return $this; @@ -1111,9 +1054,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -1138,9 +1078,6 @@ public function getIdeal() */ public function setIdeal($ideal) { - if (is_null($ideal)) { - throw new \InvalidArgumentException('non-nullable ideal cannot be null'); - } $this->container['ideal'] = $ideal; return $this; @@ -1165,9 +1102,6 @@ public function getInteracCard() */ public function setInteracCard($interacCard) { - if (is_null($interacCard)) { - throw new \InvalidArgumentException('non-nullable interacCard cannot be null'); - } $this->container['interacCard'] = $interacCard; return $this; @@ -1192,9 +1126,6 @@ public function getJcb() */ public function setJcb($jcb) { - if (is_null($jcb)) { - throw new \InvalidArgumentException('non-nullable jcb cannot be null'); - } $this->container['jcb'] = $jcb; return $this; @@ -1219,9 +1150,6 @@ public function getKlarna() */ public function setKlarna($klarna) { - if (is_null($klarna)) { - throw new \InvalidArgumentException('non-nullable klarna cannot be null'); - } $this->container['klarna'] = $klarna; return $this; @@ -1246,9 +1174,6 @@ public function getMaestro() */ public function setMaestro($maestro) { - if (is_null($maestro)) { - throw new \InvalidArgumentException('non-nullable maestro cannot be null'); - } $this->container['maestro'] = $maestro; return $this; @@ -1273,9 +1198,6 @@ public function getMc() */ public function setMc($mc) { - if (is_null($mc)) { - throw new \InvalidArgumentException('non-nullable mc cannot be null'); - } $this->container['mc'] = $mc; return $this; @@ -1300,9 +1222,6 @@ public function getMealVoucherFR() */ public function setMealVoucherFR($mealVoucherFR) { - if (is_null($mealVoucherFR)) { - throw new \InvalidArgumentException('non-nullable mealVoucherFR cannot be null'); - } $this->container['mealVoucherFR'] = $mealVoucherFR; return $this; @@ -1327,9 +1246,6 @@ public function getPaypal() */ public function setPaypal($paypal) { - if (is_null($paypal)) { - throw new \InvalidArgumentException('non-nullable paypal cannot be null'); - } $this->container['paypal'] = $paypal; return $this; @@ -1354,9 +1270,6 @@ public function getReference() */ public function setReference($reference) { - if (is_null($reference)) { - throw new \InvalidArgumentException('non-nullable reference cannot be null'); - } $this->container['reference'] = $reference; return $this; @@ -1381,9 +1294,6 @@ public function getShopperInteraction() */ public function setShopperInteraction($shopperInteraction) { - if (is_null($shopperInteraction)) { - throw new \InvalidArgumentException('non-nullable shopperInteraction cannot be null'); - } $this->container['shopperInteraction'] = $shopperInteraction; return $this; @@ -1408,9 +1318,6 @@ public function getSofort() */ public function setSofort($sofort) { - if (is_null($sofort)) { - throw new \InvalidArgumentException('non-nullable sofort cannot be null'); - } $this->container['sofort'] = $sofort; return $this; @@ -1435,9 +1342,6 @@ public function getStoreIds() */ public function setStoreIds($storeIds) { - if (is_null($storeIds)) { - throw new \InvalidArgumentException('non-nullable storeIds cannot be null'); - } $this->container['storeIds'] = $storeIds; return $this; @@ -1462,9 +1366,6 @@ public function getSwish() */ public function setSwish($swish) { - if (is_null($swish)) { - throw new \InvalidArgumentException('non-nullable swish cannot be null'); - } $this->container['swish'] = $swish; return $this; @@ -1489,9 +1390,6 @@ public function getTwint() */ public function setTwint($twint) { - if (is_null($twint)) { - throw new \InvalidArgumentException('non-nullable twint cannot be null'); - } $this->container['twint'] = $twint; return $this; @@ -1516,9 +1414,6 @@ public function getType() */ public function setType($type) { - if (is_null($type)) { - throw new \InvalidArgumentException('non-nullable type cannot be null'); - } $this->container['type'] = $type; return $this; @@ -1543,9 +1438,6 @@ public function getVerificationStatus() */ 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( @@ -1580,9 +1472,6 @@ public function getVipps() */ public function setVipps($vipps) { - if (is_null($vipps)) { - throw new \InvalidArgumentException('non-nullable vipps cannot be null'); - } $this->container['vipps'] = $vipps; return $this; @@ -1607,9 +1496,6 @@ public function getVisa() */ public function setVisa($visa) { - if (is_null($visa)) { - throw new \InvalidArgumentException('non-nullable visa cannot be null'); - } $this->container['visa'] = $visa; return $this; @@ -1634,9 +1520,6 @@ public function getWechatpay() */ public function setWechatpay($wechatpay) { - if (is_null($wechatpay)) { - throw new \InvalidArgumentException('non-nullable wechatpay cannot be null'); - } $this->container['wechatpay'] = $wechatpay; return $this; @@ -1661,9 +1544,6 @@ public function getWechatpayPos() */ public function setWechatpayPos($wechatpayPos) { - if (is_null($wechatpayPos)) { - throw new \InvalidArgumentException('non-nullable wechatpayPos cannot be null'); - } $this->container['wechatpayPos'] = $wechatpayPos; return $this; diff --git a/src/Adyen/Model/Management/PaymentMethodResponse.php b/src/Adyen/Model/Management/PaymentMethodResponse.php index b6a3888af..f8d3b19b4 100644 --- a/src/Adyen/Model/Management/PaymentMethodResponse.php +++ b/src/Adyen/Model/Management/PaymentMethodResponse.php @@ -439,9 +439,6 @@ public function getLinks() */ public function setLinks($links) { - if (is_null($links)) { - throw new \InvalidArgumentException('non-nullable links cannot be null'); - } $this->container['links'] = $links; return $this; @@ -466,9 +463,6 @@ public function getData() */ public function setData($data) { - if (is_null($data)) { - throw new \InvalidArgumentException('non-nullable data cannot be null'); - } $this->container['data'] = $data; return $this; @@ -493,7 +487,6 @@ public function getItemsTotal() */ public function setItemsTotal($itemsTotal) { - // Do nothing for nullable integers $this->container['itemsTotal'] = $itemsTotal; return $this; @@ -518,7 +511,6 @@ public function getPagesTotal() */ public function setPagesTotal($pagesTotal) { - // Do nothing for nullable integers $this->container['pagesTotal'] = $pagesTotal; return $this; @@ -543,9 +535,6 @@ public function getTypesWithErrors() */ public function setTypesWithErrors($typesWithErrors) { - if (is_null($typesWithErrors)) { - throw new \InvalidArgumentException('non-nullable typesWithErrors cannot be null'); - } $allowedValues = $this->getTypesWithErrorsAllowableValues(); if (array_diff($typesWithErrors, $allowedValues)) { throw new \InvalidArgumentException( diff --git a/src/Adyen/Model/Management/PaymentMethodSetupInfo.php b/src/Adyen/Model/Management/PaymentMethodSetupInfo.php index bd66f8821..81e01a046 100644 --- a/src/Adyen/Model/Management/PaymentMethodSetupInfo.php +++ b/src/Adyen/Model/Management/PaymentMethodSetupInfo.php @@ -689,9 +689,6 @@ public function getAfterpayTouch() */ public function setAfterpayTouch($afterpayTouch) { - if (is_null($afterpayTouch)) { - throw new \InvalidArgumentException('non-nullable afterpayTouch cannot be null'); - } $this->container['afterpayTouch'] = $afterpayTouch; return $this; @@ -716,9 +713,6 @@ public function getAmex() */ public function setAmex($amex) { - if (is_null($amex)) { - throw new \InvalidArgumentException('non-nullable amex cannot be null'); - } $this->container['amex'] = $amex; return $this; @@ -743,9 +737,6 @@ public function getApplePay() */ public function setApplePay($applePay) { - if (is_null($applePay)) { - throw new \InvalidArgumentException('non-nullable applePay cannot be null'); - } $this->container['applePay'] = $applePay; return $this; @@ -770,9 +761,6 @@ public function getBcmc() */ public function setBcmc($bcmc) { - if (is_null($bcmc)) { - throw new \InvalidArgumentException('non-nullable bcmc cannot be null'); - } $this->container['bcmc'] = $bcmc; return $this; @@ -797,9 +785,6 @@ public function getBusinessLineId() */ public function setBusinessLineId($businessLineId) { - if (is_null($businessLineId)) { - throw new \InvalidArgumentException('non-nullable businessLineId cannot be null'); - } $this->container['businessLineId'] = $businessLineId; return $this; @@ -824,9 +809,6 @@ public function getCartesBancaires() */ public function setCartesBancaires($cartesBancaires) { - if (is_null($cartesBancaires)) { - throw new \InvalidArgumentException('non-nullable cartesBancaires cannot be null'); - } $this->container['cartesBancaires'] = $cartesBancaires; return $this; @@ -851,9 +833,6 @@ public function getClearpay() */ public function setClearpay($clearpay) { - if (is_null($clearpay)) { - throw new \InvalidArgumentException('non-nullable clearpay cannot be null'); - } $this->container['clearpay'] = $clearpay; return $this; @@ -878,9 +857,6 @@ public function getCountries() */ public function setCountries($countries) { - if (is_null($countries)) { - throw new \InvalidArgumentException('non-nullable countries cannot be null'); - } $this->container['countries'] = $countries; return $this; @@ -905,9 +881,6 @@ public function getCup() */ public function setCup($cup) { - if (is_null($cup)) { - throw new \InvalidArgumentException('non-nullable cup cannot be null'); - } $this->container['cup'] = $cup; return $this; @@ -932,9 +905,6 @@ public function getCurrencies() */ public function setCurrencies($currencies) { - if (is_null($currencies)) { - throw new \InvalidArgumentException('non-nullable currencies cannot be null'); - } $this->container['currencies'] = $currencies; return $this; @@ -959,9 +929,6 @@ public function getCustomRoutingFlags() */ public function setCustomRoutingFlags($customRoutingFlags) { - if (is_null($customRoutingFlags)) { - throw new \InvalidArgumentException('non-nullable customRoutingFlags cannot be null'); - } $this->container['customRoutingFlags'] = $customRoutingFlags; return $this; @@ -986,9 +953,6 @@ public function getDiners() */ public function setDiners($diners) { - if (is_null($diners)) { - throw new \InvalidArgumentException('non-nullable diners cannot be null'); - } $this->container['diners'] = $diners; return $this; @@ -1013,9 +977,6 @@ public function getDiscover() */ public function setDiscover($discover) { - if (is_null($discover)) { - throw new \InvalidArgumentException('non-nullable discover cannot be null'); - } $this->container['discover'] = $discover; return $this; @@ -1040,9 +1001,6 @@ public function getEftposAustralia() */ public function setEftposAustralia($eftposAustralia) { - if (is_null($eftposAustralia)) { - throw new \InvalidArgumentException('non-nullable eftposAustralia cannot be null'); - } $this->container['eftposAustralia'] = $eftposAustralia; return $this; @@ -1067,9 +1025,6 @@ public function getGiroPay() */ public function setGiroPay($giroPay) { - if (is_null($giroPay)) { - throw new \InvalidArgumentException('non-nullable giroPay cannot be null'); - } $this->container['giroPay'] = $giroPay; return $this; @@ -1094,9 +1049,6 @@ public function getGirocard() */ public function setGirocard($girocard) { - if (is_null($girocard)) { - throw new \InvalidArgumentException('non-nullable girocard cannot be null'); - } $this->container['girocard'] = $girocard; return $this; @@ -1121,9 +1073,6 @@ public function getGooglePay() */ public function setGooglePay($googlePay) { - if (is_null($googlePay)) { - throw new \InvalidArgumentException('non-nullable googlePay cannot be null'); - } $this->container['googlePay'] = $googlePay; return $this; @@ -1148,9 +1097,6 @@ public function getIdeal() */ public function setIdeal($ideal) { - if (is_null($ideal)) { - throw new \InvalidArgumentException('non-nullable ideal cannot be null'); - } $this->container['ideal'] = $ideal; return $this; @@ -1175,9 +1121,6 @@ public function getInteracCard() */ public function setInteracCard($interacCard) { - if (is_null($interacCard)) { - throw new \InvalidArgumentException('non-nullable interacCard cannot be null'); - } $this->container['interacCard'] = $interacCard; return $this; @@ -1202,9 +1145,6 @@ public function getJcb() */ public function setJcb($jcb) { - if (is_null($jcb)) { - throw new \InvalidArgumentException('non-nullable jcb cannot be null'); - } $this->container['jcb'] = $jcb; return $this; @@ -1229,9 +1169,6 @@ public function getKlarna() */ public function setKlarna($klarna) { - if (is_null($klarna)) { - throw new \InvalidArgumentException('non-nullable klarna cannot be null'); - } $this->container['klarna'] = $klarna; return $this; @@ -1256,9 +1193,6 @@ public function getMaestro() */ public function setMaestro($maestro) { - if (is_null($maestro)) { - throw new \InvalidArgumentException('non-nullable maestro cannot be null'); - } $this->container['maestro'] = $maestro; return $this; @@ -1283,9 +1217,6 @@ public function getMc() */ public function setMc($mc) { - if (is_null($mc)) { - throw new \InvalidArgumentException('non-nullable mc cannot be null'); - } $this->container['mc'] = $mc; return $this; @@ -1310,9 +1241,6 @@ public function getMealVoucherFR() */ public function setMealVoucherFR($mealVoucherFR) { - if (is_null($mealVoucherFR)) { - throw new \InvalidArgumentException('non-nullable mealVoucherFR cannot be null'); - } $this->container['mealVoucherFR'] = $mealVoucherFR; return $this; @@ -1337,9 +1265,6 @@ public function getPaypal() */ public function setPaypal($paypal) { - if (is_null($paypal)) { - throw new \InvalidArgumentException('non-nullable paypal cannot be null'); - } $this->container['paypal'] = $paypal; return $this; @@ -1364,9 +1289,6 @@ public function getReference() */ public function setReference($reference) { - if (is_null($reference)) { - throw new \InvalidArgumentException('non-nullable reference cannot be null'); - } $this->container['reference'] = $reference; return $this; @@ -1391,9 +1313,6 @@ public function getShopperInteraction() */ 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( @@ -1428,9 +1347,6 @@ public function getSofort() */ public function setSofort($sofort) { - if (is_null($sofort)) { - throw new \InvalidArgumentException('non-nullable sofort cannot be null'); - } $this->container['sofort'] = $sofort; return $this; @@ -1455,9 +1371,6 @@ public function getStoreIds() */ public function setStoreIds($storeIds) { - if (is_null($storeIds)) { - throw new \InvalidArgumentException('non-nullable storeIds cannot be null'); - } $this->container['storeIds'] = $storeIds; return $this; @@ -1482,9 +1395,6 @@ public function getSwish() */ public function setSwish($swish) { - if (is_null($swish)) { - throw new \InvalidArgumentException('non-nullable swish cannot be null'); - } $this->container['swish'] = $swish; return $this; @@ -1509,9 +1419,6 @@ public function getTwint() */ public function setTwint($twint) { - if (is_null($twint)) { - throw new \InvalidArgumentException('non-nullable twint cannot be null'); - } $this->container['twint'] = $twint; return $this; @@ -1536,9 +1443,6 @@ public function getType() */ 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( @@ -1573,9 +1477,6 @@ public function getVipps() */ public function setVipps($vipps) { - if (is_null($vipps)) { - throw new \InvalidArgumentException('non-nullable vipps cannot be null'); - } $this->container['vipps'] = $vipps; return $this; @@ -1600,9 +1501,6 @@ public function getVisa() */ public function setVisa($visa) { - if (is_null($visa)) { - throw new \InvalidArgumentException('non-nullable visa cannot be null'); - } $this->container['visa'] = $visa; return $this; @@ -1627,9 +1525,6 @@ public function getWechatpay() */ public function setWechatpay($wechatpay) { - if (is_null($wechatpay)) { - throw new \InvalidArgumentException('non-nullable wechatpay cannot be null'); - } $this->container['wechatpay'] = $wechatpay; return $this; @@ -1654,9 +1549,6 @@ public function getWechatpayPos() */ public function setWechatpayPos($wechatpayPos) { - if (is_null($wechatpayPos)) { - throw new \InvalidArgumentException('non-nullable wechatpayPos cannot be null'); - } $this->container['wechatpayPos'] = $wechatpayPos; return $this; diff --git a/src/Adyen/Model/Management/PayoutSettings.php b/src/Adyen/Model/Management/PayoutSettings.php index e44aa3b00..b859660ea 100644 --- a/src/Adyen/Model/Management/PayoutSettings.php +++ b/src/Adyen/Model/Management/PayoutSettings.php @@ -395,9 +395,6 @@ public function getAllowed() */ public function setAllowed($allowed) { - if (is_null($allowed)) { - throw new \InvalidArgumentException('non-nullable allowed cannot be null'); - } $this->container['allowed'] = $allowed; return $this; @@ -422,9 +419,6 @@ public function getEnabled() */ public function setEnabled($enabled) { - if (is_null($enabled)) { - throw new \InvalidArgumentException('non-nullable enabled cannot be null'); - } $this->container['enabled'] = $enabled; return $this; @@ -449,9 +443,6 @@ public function getEnabledFromDate() */ public function setEnabledFromDate($enabledFromDate) { - if (is_null($enabledFromDate)) { - throw new \InvalidArgumentException('non-nullable enabledFromDate cannot be null'); - } $this->container['enabledFromDate'] = $enabledFromDate; return $this; @@ -476,9 +467,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -503,9 +491,6 @@ public function getPriority() */ 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( @@ -540,9 +525,6 @@ public function getTransferInstrumentId() */ public function setTransferInstrumentId($transferInstrumentId) { - if (is_null($transferInstrumentId)) { - throw new \InvalidArgumentException('non-nullable transferInstrumentId cannot be null'); - } $this->container['transferInstrumentId'] = $transferInstrumentId; return $this; @@ -567,9 +549,6 @@ public function getVerificationStatus() */ 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( diff --git a/src/Adyen/Model/Management/PayoutSettingsRequest.php b/src/Adyen/Model/Management/PayoutSettingsRequest.php index 136cfccb1..cc4d376f3 100644 --- a/src/Adyen/Model/Management/PayoutSettingsRequest.php +++ b/src/Adyen/Model/Management/PayoutSettingsRequest.php @@ -312,9 +312,6 @@ public function getEnabled() */ public function setEnabled($enabled) { - if (is_null($enabled)) { - throw new \InvalidArgumentException('non-nullable enabled cannot be null'); - } $this->container['enabled'] = $enabled; return $this; @@ -339,9 +336,6 @@ public function getEnabledFromDate() */ public function setEnabledFromDate($enabledFromDate) { - if (is_null($enabledFromDate)) { - throw new \InvalidArgumentException('non-nullable enabledFromDate cannot be null'); - } $this->container['enabledFromDate'] = $enabledFromDate; return $this; @@ -366,9 +360,6 @@ public function getTransferInstrumentId() */ public function setTransferInstrumentId($transferInstrumentId) { - if (is_null($transferInstrumentId)) { - throw new \InvalidArgumentException('non-nullable transferInstrumentId cannot be null'); - } $this->container['transferInstrumentId'] = $transferInstrumentId; return $this; diff --git a/src/Adyen/Model/Management/PayoutSettingsResponse.php b/src/Adyen/Model/Management/PayoutSettingsResponse.php index f43395011..e46cc5254 100644 --- a/src/Adyen/Model/Management/PayoutSettingsResponse.php +++ b/src/Adyen/Model/Management/PayoutSettingsResponse.php @@ -295,9 +295,6 @@ public function getData() */ public function setData($data) { - if (is_null($data)) { - throw new \InvalidArgumentException('non-nullable data cannot be null'); - } $this->container['data'] = $data; return $this; diff --git a/src/Adyen/Model/Management/Profile.php b/src/Adyen/Model/Management/Profile.php index 13de7be6d..b5e09f2d6 100644 --- a/src/Adyen/Model/Management/Profile.php +++ b/src/Adyen/Model/Management/Profile.php @@ -426,9 +426,6 @@ public function getAuthType() */ public function setAuthType($authType) { - if (is_null($authType)) { - throw new \InvalidArgumentException('non-nullable authType cannot be null'); - } $this->container['authType'] = $authType; return $this; @@ -453,9 +450,6 @@ public function getAutoWifi() */ public function setAutoWifi($autoWifi) { - if (is_null($autoWifi)) { - throw new \InvalidArgumentException('non-nullable autoWifi cannot be null'); - } $this->container['autoWifi'] = $autoWifi; return $this; @@ -480,9 +474,6 @@ public function getBssType() */ public function setBssType($bssType) { - if (is_null($bssType)) { - throw new \InvalidArgumentException('non-nullable bssType cannot be null'); - } $this->container['bssType'] = $bssType; return $this; @@ -507,7 +498,6 @@ public function getChannel() */ public function setChannel($channel) { - // Do nothing for nullable integers $this->container['channel'] = $channel; return $this; @@ -532,9 +522,6 @@ public function getDefaultProfile() */ public function setDefaultProfile($defaultProfile) { - if (is_null($defaultProfile)) { - throw new \InvalidArgumentException('non-nullable defaultProfile cannot be null'); - } $this->container['defaultProfile'] = $defaultProfile; return $this; @@ -559,9 +546,6 @@ public function getEap() */ public function setEap($eap) { - if (is_null($eap)) { - throw new \InvalidArgumentException('non-nullable eap cannot be null'); - } $this->container['eap'] = $eap; return $this; @@ -586,9 +570,6 @@ public function getEapCaCert() */ public function setEapCaCert($eapCaCert) { - if (is_null($eapCaCert)) { - throw new \InvalidArgumentException('non-nullable eapCaCert cannot be null'); - } $this->container['eapCaCert'] = $eapCaCert; return $this; @@ -613,9 +594,6 @@ public function getEapClientCert() */ public function setEapClientCert($eapClientCert) { - if (is_null($eapClientCert)) { - throw new \InvalidArgumentException('non-nullable eapClientCert cannot be null'); - } $this->container['eapClientCert'] = $eapClientCert; return $this; @@ -640,9 +618,6 @@ public function getEapClientKey() */ public function setEapClientKey($eapClientKey) { - if (is_null($eapClientKey)) { - throw new \InvalidArgumentException('non-nullable eapClientKey cannot be null'); - } $this->container['eapClientKey'] = $eapClientKey; return $this; @@ -667,9 +642,6 @@ public function getEapClientPwd() */ public function setEapClientPwd($eapClientPwd) { - if (is_null($eapClientPwd)) { - throw new \InvalidArgumentException('non-nullable eapClientPwd cannot be null'); - } $this->container['eapClientPwd'] = $eapClientPwd; return $this; @@ -694,9 +666,6 @@ public function getEapIdentity() */ public function setEapIdentity($eapIdentity) { - if (is_null($eapIdentity)) { - throw new \InvalidArgumentException('non-nullable eapIdentity cannot be null'); - } $this->container['eapIdentity'] = $eapIdentity; return $this; @@ -721,9 +690,6 @@ public function getEapIntermediateCert() */ public function setEapIntermediateCert($eapIntermediateCert) { - if (is_null($eapIntermediateCert)) { - throw new \InvalidArgumentException('non-nullable eapIntermediateCert cannot be null'); - } $this->container['eapIntermediateCert'] = $eapIntermediateCert; return $this; @@ -748,9 +714,6 @@ public function getEapPwd() */ public function setEapPwd($eapPwd) { - if (is_null($eapPwd)) { - throw new \InvalidArgumentException('non-nullable eapPwd cannot be null'); - } $this->container['eapPwd'] = $eapPwd; return $this; @@ -775,9 +738,6 @@ public function getHiddenSsid() */ public function setHiddenSsid($hiddenSsid) { - if (is_null($hiddenSsid)) { - throw new \InvalidArgumentException('non-nullable hiddenSsid cannot be null'); - } $this->container['hiddenSsid'] = $hiddenSsid; return $this; @@ -802,9 +762,6 @@ public function getName() */ public function setName($name) { - if (is_null($name)) { - throw new \InvalidArgumentException('non-nullable name cannot be null'); - } $this->container['name'] = $name; return $this; @@ -829,9 +786,6 @@ public function getPsk() */ public function setPsk($psk) { - if (is_null($psk)) { - throw new \InvalidArgumentException('non-nullable psk cannot be null'); - } $this->container['psk'] = $psk; return $this; @@ -856,9 +810,6 @@ public function getSsid() */ public function setSsid($ssid) { - if (is_null($ssid)) { - throw new \InvalidArgumentException('non-nullable ssid cannot be null'); - } $this->container['ssid'] = $ssid; return $this; @@ -883,9 +834,6 @@ public function getWsec() */ public function setWsec($wsec) { - if (is_null($wsec)) { - throw new \InvalidArgumentException('non-nullable wsec cannot be null'); - } $this->container['wsec'] = $wsec; return $this; diff --git a/src/Adyen/Model/Management/ReceiptOptions.php b/src/Adyen/Model/Management/ReceiptOptions.php index 97879f599..1c0bf9016 100644 --- a/src/Adyen/Model/Management/ReceiptOptions.php +++ b/src/Adyen/Model/Management/ReceiptOptions.php @@ -309,9 +309,6 @@ public function getLogo() */ public function setLogo($logo) { - if (is_null($logo)) { - throw new \InvalidArgumentException('non-nullable logo cannot be null'); - } $this->container['logo'] = $logo; return $this; @@ -336,9 +333,6 @@ public function getPromptBeforePrinting() */ public function setPromptBeforePrinting($promptBeforePrinting) { - if (is_null($promptBeforePrinting)) { - throw new \InvalidArgumentException('non-nullable promptBeforePrinting cannot be null'); - } $this->container['promptBeforePrinting'] = $promptBeforePrinting; return $this; @@ -363,9 +357,6 @@ public function getQrCodeData() */ public function setQrCodeData($qrCodeData) { - if (is_null($qrCodeData)) { - throw new \InvalidArgumentException('non-nullable qrCodeData cannot be null'); - } $this->container['qrCodeData'] = $qrCodeData; return $this; diff --git a/src/Adyen/Model/Management/ReceiptPrinting.php b/src/Adyen/Model/Management/ReceiptPrinting.php index 896bdf3c8..581e5b901 100644 --- a/src/Adyen/Model/Management/ReceiptPrinting.php +++ b/src/Adyen/Model/Management/ReceiptPrinting.php @@ -400,9 +400,6 @@ public function getMerchantApproved() */ public function setMerchantApproved($merchantApproved) { - if (is_null($merchantApproved)) { - throw new \InvalidArgumentException('non-nullable merchantApproved cannot be null'); - } $this->container['merchantApproved'] = $merchantApproved; return $this; @@ -427,9 +424,6 @@ public function getMerchantCancelled() */ public function setMerchantCancelled($merchantCancelled) { - if (is_null($merchantCancelled)) { - throw new \InvalidArgumentException('non-nullable merchantCancelled cannot be null'); - } $this->container['merchantCancelled'] = $merchantCancelled; return $this; @@ -454,9 +448,6 @@ public function getMerchantCaptureApproved() */ public function setMerchantCaptureApproved($merchantCaptureApproved) { - if (is_null($merchantCaptureApproved)) { - throw new \InvalidArgumentException('non-nullable merchantCaptureApproved cannot be null'); - } $this->container['merchantCaptureApproved'] = $merchantCaptureApproved; return $this; @@ -481,9 +472,6 @@ public function getMerchantCaptureRefused() */ public function setMerchantCaptureRefused($merchantCaptureRefused) { - if (is_null($merchantCaptureRefused)) { - throw new \InvalidArgumentException('non-nullable merchantCaptureRefused cannot be null'); - } $this->container['merchantCaptureRefused'] = $merchantCaptureRefused; return $this; @@ -508,9 +496,6 @@ public function getMerchantRefundApproved() */ public function setMerchantRefundApproved($merchantRefundApproved) { - if (is_null($merchantRefundApproved)) { - throw new \InvalidArgumentException('non-nullable merchantRefundApproved cannot be null'); - } $this->container['merchantRefundApproved'] = $merchantRefundApproved; return $this; @@ -535,9 +520,6 @@ public function getMerchantRefundRefused() */ public function setMerchantRefundRefused($merchantRefundRefused) { - if (is_null($merchantRefundRefused)) { - throw new \InvalidArgumentException('non-nullable merchantRefundRefused cannot be null'); - } $this->container['merchantRefundRefused'] = $merchantRefundRefused; return $this; @@ -562,9 +544,6 @@ public function getMerchantRefused() */ public function setMerchantRefused($merchantRefused) { - if (is_null($merchantRefused)) { - throw new \InvalidArgumentException('non-nullable merchantRefused cannot be null'); - } $this->container['merchantRefused'] = $merchantRefused; return $this; @@ -589,9 +568,6 @@ public function getMerchantVoid() */ public function setMerchantVoid($merchantVoid) { - if (is_null($merchantVoid)) { - throw new \InvalidArgumentException('non-nullable merchantVoid cannot be null'); - } $this->container['merchantVoid'] = $merchantVoid; return $this; @@ -616,9 +592,6 @@ public function getShopperApproved() */ public function setShopperApproved($shopperApproved) { - if (is_null($shopperApproved)) { - throw new \InvalidArgumentException('non-nullable shopperApproved cannot be null'); - } $this->container['shopperApproved'] = $shopperApproved; return $this; @@ -643,9 +616,6 @@ public function getShopperCancelled() */ public function setShopperCancelled($shopperCancelled) { - if (is_null($shopperCancelled)) { - throw new \InvalidArgumentException('non-nullable shopperCancelled cannot be null'); - } $this->container['shopperCancelled'] = $shopperCancelled; return $this; @@ -670,9 +640,6 @@ public function getShopperCaptureApproved() */ public function setShopperCaptureApproved($shopperCaptureApproved) { - if (is_null($shopperCaptureApproved)) { - throw new \InvalidArgumentException('non-nullable shopperCaptureApproved cannot be null'); - } $this->container['shopperCaptureApproved'] = $shopperCaptureApproved; return $this; @@ -697,9 +664,6 @@ public function getShopperCaptureRefused() */ public function setShopperCaptureRefused($shopperCaptureRefused) { - if (is_null($shopperCaptureRefused)) { - throw new \InvalidArgumentException('non-nullable shopperCaptureRefused cannot be null'); - } $this->container['shopperCaptureRefused'] = $shopperCaptureRefused; return $this; @@ -724,9 +688,6 @@ public function getShopperRefundApproved() */ public function setShopperRefundApproved($shopperRefundApproved) { - if (is_null($shopperRefundApproved)) { - throw new \InvalidArgumentException('non-nullable shopperRefundApproved cannot be null'); - } $this->container['shopperRefundApproved'] = $shopperRefundApproved; return $this; @@ -751,9 +712,6 @@ public function getShopperRefundRefused() */ public function setShopperRefundRefused($shopperRefundRefused) { - if (is_null($shopperRefundRefused)) { - throw new \InvalidArgumentException('non-nullable shopperRefundRefused cannot be null'); - } $this->container['shopperRefundRefused'] = $shopperRefundRefused; return $this; @@ -778,9 +736,6 @@ public function getShopperRefused() */ public function setShopperRefused($shopperRefused) { - if (is_null($shopperRefused)) { - throw new \InvalidArgumentException('non-nullable shopperRefused cannot be null'); - } $this->container['shopperRefused'] = $shopperRefused; return $this; @@ -805,9 +760,6 @@ public function getShopperVoid() */ public function setShopperVoid($shopperVoid) { - if (is_null($shopperVoid)) { - throw new \InvalidArgumentException('non-nullable shopperVoid cannot be null'); - } $this->container['shopperVoid'] = $shopperVoid; return $this; diff --git a/src/Adyen/Model/Management/Referenced.php b/src/Adyen/Model/Management/Referenced.php index 6707ddd4a..ef4c91a59 100644 --- a/src/Adyen/Model/Management/Referenced.php +++ b/src/Adyen/Model/Management/Referenced.php @@ -295,9 +295,6 @@ public function getEnableStandaloneRefunds() */ public function setEnableStandaloneRefunds($enableStandaloneRefunds) { - if (is_null($enableStandaloneRefunds)) { - throw new \InvalidArgumentException('non-nullable enableStandaloneRefunds cannot be null'); - } $this->container['enableStandaloneRefunds'] = $enableStandaloneRefunds; return $this; diff --git a/src/Adyen/Model/Management/Refunds.php b/src/Adyen/Model/Management/Refunds.php index c3fb622a8..5797301fa 100644 --- a/src/Adyen/Model/Management/Refunds.php +++ b/src/Adyen/Model/Management/Refunds.php @@ -295,9 +295,6 @@ public function getReferenced() */ public function setReferenced($referenced) { - if (is_null($referenced)) { - throw new \InvalidArgumentException('non-nullable referenced cannot be null'); - } $this->container['referenced'] = $referenced; return $this; diff --git a/src/Adyen/Model/Management/ReleaseUpdateDetails.php b/src/Adyen/Model/Management/ReleaseUpdateDetails.php index 91ec532e2..77df0312c 100644 --- a/src/Adyen/Model/Management/ReleaseUpdateDetails.php +++ b/src/Adyen/Model/Management/ReleaseUpdateDetails.php @@ -323,9 +323,6 @@ public function getType() */ 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( @@ -360,9 +357,6 @@ public function getUpdateAtFirstMaintenanceCall() */ public function setUpdateAtFirstMaintenanceCall($updateAtFirstMaintenanceCall) { - if (is_null($updateAtFirstMaintenanceCall)) { - throw new \InvalidArgumentException('non-nullable updateAtFirstMaintenanceCall cannot be null'); - } $this->container['updateAtFirstMaintenanceCall'] = $updateAtFirstMaintenanceCall; return $this; diff --git a/src/Adyen/Model/Management/ReprocessAndroidAppResponse.php b/src/Adyen/Model/Management/ReprocessAndroidAppResponse.php index ec739c955..493aff5ac 100644 --- a/src/Adyen/Model/Management/ReprocessAndroidAppResponse.php +++ b/src/Adyen/Model/Management/ReprocessAndroidAppResponse.php @@ -295,9 +295,6 @@ public function getMessage() */ public function setMessage($message) { - if (is_null($message)) { - throw new \InvalidArgumentException('non-nullable message cannot be null'); - } $this->container['message'] = $message; return $this; diff --git a/src/Adyen/Model/Management/RequestActivationResponse.php b/src/Adyen/Model/Management/RequestActivationResponse.php index fba55144d..e51ad06f9 100644 --- a/src/Adyen/Model/Management/RequestActivationResponse.php +++ b/src/Adyen/Model/Management/RequestActivationResponse.php @@ -302,9 +302,6 @@ public function getCompanyId() */ public function setCompanyId($companyId) { - if (is_null($companyId)) { - throw new \InvalidArgumentException('non-nullable companyId cannot be null'); - } $this->container['companyId'] = $companyId; return $this; @@ -329,9 +326,6 @@ public function getMerchantId() */ public function setMerchantId($merchantId) { - if (is_null($merchantId)) { - throw new \InvalidArgumentException('non-nullable merchantId cannot be null'); - } $this->container['merchantId'] = $merchantId; return $this; diff --git a/src/Adyen/Model/Management/RestServiceError.php b/src/Adyen/Model/Management/RestServiceError.php index abfe58252..665642006 100644 --- a/src/Adyen/Model/Management/RestServiceError.php +++ b/src/Adyen/Model/Management/RestServiceError.php @@ -366,9 +366,6 @@ public function getDetail() */ public function setDetail($detail) { - if (is_null($detail)) { - throw new \InvalidArgumentException('non-nullable detail cannot be null'); - } $this->container['detail'] = $detail; return $this; @@ -393,9 +390,6 @@ public function getErrorCode() */ public function setErrorCode($errorCode) { - if (is_null($errorCode)) { - throw new \InvalidArgumentException('non-nullable errorCode cannot be null'); - } $this->container['errorCode'] = $errorCode; return $this; @@ -420,9 +414,6 @@ public function getInstance() */ public function setInstance($instance) { - if (is_null($instance)) { - throw new \InvalidArgumentException('non-nullable instance cannot be null'); - } $this->container['instance'] = $instance; return $this; @@ -447,9 +438,6 @@ public function getInvalidFields() */ public function setInvalidFields($invalidFields) { - if (is_null($invalidFields)) { - throw new \InvalidArgumentException('non-nullable invalidFields cannot be null'); - } $this->container['invalidFields'] = $invalidFields; return $this; @@ -474,9 +462,6 @@ public function getRequestId() */ public function setRequestId($requestId) { - if (is_null($requestId)) { - throw new \InvalidArgumentException('non-nullable requestId cannot be null'); - } $this->container['requestId'] = $requestId; return $this; @@ -501,9 +486,6 @@ public function getResponse() */ public function setResponse($response) { - if (is_null($response)) { - throw new \InvalidArgumentException('non-nullable response cannot be null'); - } $this->container['response'] = $response; return $this; @@ -528,7 +510,6 @@ public function getStatus() */ public function setStatus($status) { - // Do nothing for nullable integers $this->container['status'] = $status; return $this; @@ -553,9 +534,6 @@ public function getTitle() */ public function setTitle($title) { - if (is_null($title)) { - throw new \InvalidArgumentException('non-nullable title cannot be null'); - } $this->container['title'] = $title; return $this; @@ -580,9 +558,6 @@ public function getType() */ public function setType($type) { - if (is_null($type)) { - throw new \InvalidArgumentException('non-nullable type cannot be null'); - } $this->container['type'] = $type; return $this; diff --git a/src/Adyen/Model/Management/ScheduleTerminalActionsRequest.php b/src/Adyen/Model/Management/ScheduleTerminalActionsRequest.php index 5f0fc7c15..c2b8c541b 100644 --- a/src/Adyen/Model/Management/ScheduleTerminalActionsRequest.php +++ b/src/Adyen/Model/Management/ScheduleTerminalActionsRequest.php @@ -316,9 +316,6 @@ public function getActionDetails() */ public function setActionDetails($actionDetails) { - if (is_null($actionDetails)) { - throw new \InvalidArgumentException('non-nullable actionDetails cannot be null'); - } $this->container['actionDetails'] = $actionDetails; return $this; @@ -343,9 +340,6 @@ public function getScheduledAt() */ public function setScheduledAt($scheduledAt) { - if (is_null($scheduledAt)) { - throw new \InvalidArgumentException('non-nullable scheduledAt cannot be null'); - } $this->container['scheduledAt'] = $scheduledAt; return $this; @@ -370,9 +364,6 @@ public function getStoreId() */ public function setStoreId($storeId) { - if (is_null($storeId)) { - throw new \InvalidArgumentException('non-nullable storeId cannot be null'); - } $this->container['storeId'] = $storeId; return $this; @@ -397,9 +388,6 @@ public function getTerminalIds() */ public function setTerminalIds($terminalIds) { - if (is_null($terminalIds)) { - throw new \InvalidArgumentException('non-nullable terminalIds cannot be null'); - } $this->container['terminalIds'] = $terminalIds; return $this; diff --git a/src/Adyen/Model/Management/ScheduleTerminalActionsRequestActionDetails.php b/src/Adyen/Model/Management/ScheduleTerminalActionsRequestActionDetails.php index e821d7db5..2cc0ec55e 100644 --- a/src/Adyen/Model/Management/ScheduleTerminalActionsRequestActionDetails.php +++ b/src/Adyen/Model/Management/ScheduleTerminalActionsRequestActionDetails.php @@ -317,9 +317,6 @@ public function getAppId() */ public function setAppId($appId) { - if (is_null($appId)) { - throw new \InvalidArgumentException('non-nullable appId cannot be null'); - } $this->container['appId'] = $appId; return $this; @@ -344,9 +341,6 @@ public function getType() */ public function setType($type) { - if (is_null($type)) { - throw new \InvalidArgumentException('non-nullable type cannot be null'); - } $this->container['type'] = $type; return $this; @@ -371,9 +365,6 @@ public function getCertificateId() */ public function setCertificateId($certificateId) { - if (is_null($certificateId)) { - throw new \InvalidArgumentException('non-nullable certificateId cannot be null'); - } $this->container['certificateId'] = $certificateId; return $this; @@ -398,9 +389,6 @@ public function getUpdateAtFirstMaintenanceCall() */ public function setUpdateAtFirstMaintenanceCall($updateAtFirstMaintenanceCall) { - if (is_null($updateAtFirstMaintenanceCall)) { - throw new \InvalidArgumentException('non-nullable updateAtFirstMaintenanceCall cannot be null'); - } $this->container['updateAtFirstMaintenanceCall'] = $updateAtFirstMaintenanceCall; return $this; diff --git a/src/Adyen/Model/Management/ScheduleTerminalActionsResponse.php b/src/Adyen/Model/Management/ScheduleTerminalActionsResponse.php index b69018bb1..cdba4499b 100644 --- a/src/Adyen/Model/Management/ScheduleTerminalActionsResponse.php +++ b/src/Adyen/Model/Management/ScheduleTerminalActionsResponse.php @@ -337,9 +337,6 @@ public function getActionDetails() */ public function setActionDetails($actionDetails) { - if (is_null($actionDetails)) { - throw new \InvalidArgumentException('non-nullable actionDetails cannot be null'); - } $this->container['actionDetails'] = $actionDetails; return $this; @@ -364,9 +361,6 @@ public function getItems() */ public function setItems($items) { - if (is_null($items)) { - throw new \InvalidArgumentException('non-nullable items cannot be null'); - } $this->container['items'] = $items; return $this; @@ -391,9 +385,6 @@ public function getScheduledAt() */ public function setScheduledAt($scheduledAt) { - if (is_null($scheduledAt)) { - throw new \InvalidArgumentException('non-nullable scheduledAt cannot be null'); - } $this->container['scheduledAt'] = $scheduledAt; return $this; @@ -418,9 +409,6 @@ public function getStoreId() */ public function setStoreId($storeId) { - if (is_null($storeId)) { - throw new \InvalidArgumentException('non-nullable storeId cannot be null'); - } $this->container['storeId'] = $storeId; return $this; @@ -445,9 +433,6 @@ public function getTerminalsWithErrors() */ public function setTerminalsWithErrors($terminalsWithErrors) { - if (is_null($terminalsWithErrors)) { - throw new \InvalidArgumentException('non-nullable terminalsWithErrors cannot be null'); - } $this->container['terminalsWithErrors'] = $terminalsWithErrors; return $this; @@ -472,7 +457,6 @@ public function getTotalErrors() */ public function setTotalErrors($totalErrors) { - // Do nothing for nullable integers $this->container['totalErrors'] = $totalErrors; return $this; @@ -497,7 +481,6 @@ public function getTotalScheduled() */ public function setTotalScheduled($totalScheduled) { - // Do nothing for nullable integers $this->container['totalScheduled'] = $totalScheduled; return $this; diff --git a/src/Adyen/Model/Management/Settings.php b/src/Adyen/Model/Management/Settings.php index 04001a20f..3a19f6263 100644 --- a/src/Adyen/Model/Management/Settings.php +++ b/src/Adyen/Model/Management/Settings.php @@ -309,9 +309,6 @@ public function getBand() */ public function setBand($band) { - if (is_null($band)) { - throw new \InvalidArgumentException('non-nullable band cannot be null'); - } $this->container['band'] = $band; return $this; @@ -336,9 +333,6 @@ public function getRoaming() */ public function setRoaming($roaming) { - if (is_null($roaming)) { - throw new \InvalidArgumentException('non-nullable roaming cannot be null'); - } $this->container['roaming'] = $roaming; return $this; @@ -363,7 +357,6 @@ public function getTimeout() */ public function setTimeout($timeout) { - // Do nothing for nullable integers $this->container['timeout'] = $timeout; return $this; diff --git a/src/Adyen/Model/Management/ShippingLocation.php b/src/Adyen/Model/Management/ShippingLocation.php index 22dd6d5b4..8254aac48 100644 --- a/src/Adyen/Model/Management/ShippingLocation.php +++ b/src/Adyen/Model/Management/ShippingLocation.php @@ -316,9 +316,6 @@ public function getAddress() */ public function setAddress($address) { - if (is_null($address)) { - throw new \InvalidArgumentException('non-nullable address cannot be null'); - } $this->container['address'] = $address; return $this; @@ -343,9 +340,6 @@ public function getContact() */ public function setContact($contact) { - if (is_null($contact)) { - throw new \InvalidArgumentException('non-nullable contact cannot be null'); - } $this->container['contact'] = $contact; return $this; @@ -370,9 +364,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -397,9 +388,6 @@ public function getName() */ public function setName($name) { - if (is_null($name)) { - throw new \InvalidArgumentException('non-nullable name cannot be null'); - } $this->container['name'] = $name; return $this; diff --git a/src/Adyen/Model/Management/ShippingLocationsResponse.php b/src/Adyen/Model/Management/ShippingLocationsResponse.php index 78bc03bd8..f82ef8140 100644 --- a/src/Adyen/Model/Management/ShippingLocationsResponse.php +++ b/src/Adyen/Model/Management/ShippingLocationsResponse.php @@ -295,9 +295,6 @@ public function getData() */ public function setData($data) { - if (is_null($data)) { - throw new \InvalidArgumentException('non-nullable data cannot be null'); - } $this->container['data'] = $data; return $this; diff --git a/src/Adyen/Model/Management/Signature.php b/src/Adyen/Model/Management/Signature.php index a07c593ee..b4d09fe1b 100644 --- a/src/Adyen/Model/Management/Signature.php +++ b/src/Adyen/Model/Management/Signature.php @@ -316,9 +316,6 @@ public function getAskSignatureOnScreen() */ public function setAskSignatureOnScreen($askSignatureOnScreen) { - if (is_null($askSignatureOnScreen)) { - throw new \InvalidArgumentException('non-nullable askSignatureOnScreen cannot be null'); - } $this->container['askSignatureOnScreen'] = $askSignatureOnScreen; return $this; @@ -343,9 +340,6 @@ public function getDeviceName() */ public function setDeviceName($deviceName) { - if (is_null($deviceName)) { - throw new \InvalidArgumentException('non-nullable deviceName cannot be null'); - } $this->container['deviceName'] = $deviceName; return $this; @@ -370,9 +364,6 @@ public function getDeviceSlogan() */ public function setDeviceSlogan($deviceSlogan) { - if (is_null($deviceSlogan)) { - throw new \InvalidArgumentException('non-nullable deviceSlogan cannot be null'); - } $this->container['deviceSlogan'] = $deviceSlogan; return $this; @@ -397,9 +388,6 @@ public function getSkipSignature() */ public function setSkipSignature($skipSignature) { - if (is_null($skipSignature)) { - throw new \InvalidArgumentException('non-nullable skipSignature cannot be null'); - } $this->container['skipSignature'] = $skipSignature; return $this; diff --git a/src/Adyen/Model/Management/SofortInfo.php b/src/Adyen/Model/Management/SofortInfo.php index cb177767b..627a42e33 100644 --- a/src/Adyen/Model/Management/SofortInfo.php +++ b/src/Adyen/Model/Management/SofortInfo.php @@ -308,9 +308,6 @@ public function getCurrencyCode() */ public function setCurrencyCode($currencyCode) { - if (is_null($currencyCode)) { - throw new \InvalidArgumentException('non-nullable currencyCode cannot be null'); - } $this->container['currencyCode'] = $currencyCode; return $this; @@ -335,9 +332,6 @@ public function getLogo() */ public function setLogo($logo) { - if (is_null($logo)) { - throw new \InvalidArgumentException('non-nullable logo cannot be null'); - } $this->container['logo'] = $logo; return $this; diff --git a/src/Adyen/Model/Management/SplitConfiguration.php b/src/Adyen/Model/Management/SplitConfiguration.php index 670083be4..1881b181c 100644 --- a/src/Adyen/Model/Management/SplitConfiguration.php +++ b/src/Adyen/Model/Management/SplitConfiguration.php @@ -322,9 +322,6 @@ public function getDescription() */ public function setDescription($description) { - if (is_null($description)) { - throw new \InvalidArgumentException('non-nullable description cannot be null'); - } $this->container['description'] = $description; return $this; @@ -349,9 +346,6 @@ public function getRules() */ public function setRules($rules) { - if (is_null($rules)) { - throw new \InvalidArgumentException('non-nullable rules cannot be null'); - } $this->container['rules'] = $rules; return $this; @@ -376,9 +370,6 @@ public function getSplitConfigurationId() */ public function setSplitConfigurationId($splitConfigurationId) { - if (is_null($splitConfigurationId)) { - throw new \InvalidArgumentException('non-nullable splitConfigurationId cannot be null'); - } $this->container['splitConfigurationId'] = $splitConfigurationId; return $this; @@ -403,9 +394,6 @@ public function getStores() */ public function setStores($stores) { - if (is_null($stores)) { - throw new \InvalidArgumentException('non-nullable stores cannot be null'); - } $this->container['stores'] = $stores; return $this; diff --git a/src/Adyen/Model/Management/SplitConfigurationList.php b/src/Adyen/Model/Management/SplitConfigurationList.php index 89138e384..90719f657 100644 --- a/src/Adyen/Model/Management/SplitConfigurationList.php +++ b/src/Adyen/Model/Management/SplitConfigurationList.php @@ -295,9 +295,6 @@ public function getData() */ public function setData($data) { - if (is_null($data)) { - throw new \InvalidArgumentException('non-nullable data cannot be null'); - } $this->container['data'] = $data; return $this; diff --git a/src/Adyen/Model/Management/SplitConfigurationLogic.php b/src/Adyen/Model/Management/SplitConfigurationLogic.php index d40c8d252..8043abbfb 100644 --- a/src/Adyen/Model/Management/SplitConfigurationLogic.php +++ b/src/Adyen/Model/Management/SplitConfigurationLogic.php @@ -736,9 +736,6 @@ public function getAcquiringFees() */ public function setAcquiringFees($acquiringFees) { - if (is_null($acquiringFees)) { - throw new \InvalidArgumentException('non-nullable acquiringFees cannot be null'); - } $allowedValues = $this->getAcquiringFeesAllowableValues(); if (!in_array($acquiringFees, $allowedValues, true)) { throw new \InvalidArgumentException( @@ -773,9 +770,6 @@ public function getAdditionalCommission() */ public function setAdditionalCommission($additionalCommission) { - if (is_null($additionalCommission)) { - throw new \InvalidArgumentException('non-nullable additionalCommission cannot be null'); - } $this->container['additionalCommission'] = $additionalCommission; return $this; @@ -800,9 +794,6 @@ public function getAdyenCommission() */ public function setAdyenCommission($adyenCommission) { - if (is_null($adyenCommission)) { - throw new \InvalidArgumentException('non-nullable adyenCommission cannot be null'); - } $allowedValues = $this->getAdyenCommissionAllowableValues(); if (!in_array($adyenCommission, $allowedValues, true)) { throw new \InvalidArgumentException( @@ -837,9 +828,6 @@ public function getAdyenFees() */ public function setAdyenFees($adyenFees) { - if (is_null($adyenFees)) { - throw new \InvalidArgumentException('non-nullable adyenFees cannot be null'); - } $allowedValues = $this->getAdyenFeesAllowableValues(); if (!in_array($adyenFees, $allowedValues, true)) { throw new \InvalidArgumentException( @@ -874,9 +862,6 @@ public function getAdyenMarkup() */ public function setAdyenMarkup($adyenMarkup) { - if (is_null($adyenMarkup)) { - throw new \InvalidArgumentException('non-nullable adyenMarkup cannot be null'); - } $allowedValues = $this->getAdyenMarkupAllowableValues(); if (!in_array($adyenMarkup, $allowedValues, true)) { throw new \InvalidArgumentException( @@ -911,9 +896,6 @@ public function getChargeback() */ public function setChargeback($chargeback) { - if (is_null($chargeback)) { - throw new \InvalidArgumentException('non-nullable chargeback cannot be null'); - } $allowedValues = $this->getChargebackAllowableValues(); if (!in_array($chargeback, $allowedValues, true)) { throw new \InvalidArgumentException( @@ -948,9 +930,6 @@ public function getChargebackCostAllocation() */ public function setChargebackCostAllocation($chargebackCostAllocation) { - if (is_null($chargebackCostAllocation)) { - throw new \InvalidArgumentException('non-nullable chargebackCostAllocation cannot be null'); - } $allowedValues = $this->getChargebackCostAllocationAllowableValues(); if (!in_array($chargebackCostAllocation, $allowedValues, true)) { throw new \InvalidArgumentException( @@ -985,9 +964,6 @@ public function getCommission() */ public function setCommission($commission) { - if (is_null($commission)) { - throw new \InvalidArgumentException('non-nullable commission cannot be null'); - } $this->container['commission'] = $commission; return $this; @@ -1012,9 +988,6 @@ public function getInterchange() */ public function setInterchange($interchange) { - if (is_null($interchange)) { - throw new \InvalidArgumentException('non-nullable interchange cannot be null'); - } $allowedValues = $this->getInterchangeAllowableValues(); if (!in_array($interchange, $allowedValues, true)) { throw new \InvalidArgumentException( @@ -1049,9 +1022,6 @@ public function getPaymentFee() */ public function setPaymentFee($paymentFee) { - if (is_null($paymentFee)) { - throw new \InvalidArgumentException('non-nullable paymentFee cannot be null'); - } $allowedValues = $this->getPaymentFeeAllowableValues(); if (!in_array($paymentFee, $allowedValues, true)) { throw new \InvalidArgumentException( @@ -1086,9 +1056,6 @@ public function getRefund() */ public function setRefund($refund) { - if (is_null($refund)) { - throw new \InvalidArgumentException('non-nullable refund cannot be null'); - } $allowedValues = $this->getRefundAllowableValues(); if (!in_array($refund, $allowedValues, true)) { throw new \InvalidArgumentException( @@ -1123,9 +1090,6 @@ public function getRefundCostAllocation() */ public function setRefundCostAllocation($refundCostAllocation) { - if (is_null($refundCostAllocation)) { - throw new \InvalidArgumentException('non-nullable refundCostAllocation cannot be null'); - } $allowedValues = $this->getRefundCostAllocationAllowableValues(); if (!in_array($refundCostAllocation, $allowedValues, true)) { throw new \InvalidArgumentException( @@ -1160,9 +1124,6 @@ public function getRemainder() */ public function setRemainder($remainder) { - if (is_null($remainder)) { - throw new \InvalidArgumentException('non-nullable remainder cannot be null'); - } $allowedValues = $this->getRemainderAllowableValues(); if (!in_array($remainder, $allowedValues, true)) { throw new \InvalidArgumentException( @@ -1197,9 +1158,6 @@ public function getSchemeFee() */ public function setSchemeFee($schemeFee) { - if (is_null($schemeFee)) { - throw new \InvalidArgumentException('non-nullable schemeFee cannot be null'); - } $allowedValues = $this->getSchemeFeeAllowableValues(); if (!in_array($schemeFee, $allowedValues, true)) { throw new \InvalidArgumentException( @@ -1234,9 +1192,6 @@ public function getSplitLogicId() */ public function setSplitLogicId($splitLogicId) { - if (is_null($splitLogicId)) { - throw new \InvalidArgumentException('non-nullable splitLogicId cannot be null'); - } $this->container['splitLogicId'] = $splitLogicId; return $this; @@ -1261,9 +1216,6 @@ public function getSurcharge() */ public function setSurcharge($surcharge) { - if (is_null($surcharge)) { - throw new \InvalidArgumentException('non-nullable surcharge cannot be null'); - } $allowedValues = $this->getSurchargeAllowableValues(); if (!in_array($surcharge, $allowedValues, true)) { throw new \InvalidArgumentException( @@ -1298,9 +1250,6 @@ public function getTip() */ public function setTip($tip) { - if (is_null($tip)) { - throw new \InvalidArgumentException('non-nullable tip cannot be null'); - } $allowedValues = $this->getTipAllowableValues(); if (!in_array($tip, $allowedValues, true)) { throw new \InvalidArgumentException( diff --git a/src/Adyen/Model/Management/SplitConfigurationRule.php b/src/Adyen/Model/Management/SplitConfigurationRule.php index 9cd2e018f..3968180b2 100644 --- a/src/Adyen/Model/Management/SplitConfigurationRule.php +++ b/src/Adyen/Model/Management/SplitConfigurationRule.php @@ -396,9 +396,6 @@ public function getCurrency() */ public function setCurrency($currency) { - if (is_null($currency)) { - throw new \InvalidArgumentException('non-nullable currency cannot be null'); - } $this->container['currency'] = $currency; return $this; @@ -423,9 +420,6 @@ public function getFundingSource() */ 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( @@ -460,9 +454,6 @@ public function getPaymentMethod() */ public function setPaymentMethod($paymentMethod) { - if (is_null($paymentMethod)) { - throw new \InvalidArgumentException('non-nullable paymentMethod cannot be null'); - } $this->container['paymentMethod'] = $paymentMethod; return $this; @@ -487,9 +478,6 @@ public function getRuleId() */ public function setRuleId($ruleId) { - if (is_null($ruleId)) { - throw new \InvalidArgumentException('non-nullable ruleId cannot be null'); - } $this->container['ruleId'] = $ruleId; return $this; @@ -514,9 +502,6 @@ public function getShopperInteraction() */ 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( @@ -551,9 +536,6 @@ public function getSplitLogic() */ public function setSplitLogic($splitLogic) { - if (is_null($splitLogic)) { - throw new \InvalidArgumentException('non-nullable splitLogic cannot be null'); - } $this->container['splitLogic'] = $splitLogic; return $this; diff --git a/src/Adyen/Model/Management/Standalone.php b/src/Adyen/Model/Management/Standalone.php index 348720b30..e25a1aead 100644 --- a/src/Adyen/Model/Management/Standalone.php +++ b/src/Adyen/Model/Management/Standalone.php @@ -302,9 +302,6 @@ public function getCurrencyCode() */ public function setCurrencyCode($currencyCode) { - if (is_null($currencyCode)) { - throw new \InvalidArgumentException('non-nullable currencyCode cannot be null'); - } $this->container['currencyCode'] = $currencyCode; return $this; @@ -329,9 +326,6 @@ public function getEnableStandalone() */ public function setEnableStandalone($enableStandalone) { - if (is_null($enableStandalone)) { - throw new \InvalidArgumentException('non-nullable enableStandalone cannot be null'); - } $this->container['enableStandalone'] = $enableStandalone; return $this; diff --git a/src/Adyen/Model/Management/Store.php b/src/Adyen/Model/Management/Store.php index 18a52cc6e..a7ece8584 100644 --- a/src/Adyen/Model/Management/Store.php +++ b/src/Adyen/Model/Management/Store.php @@ -397,9 +397,6 @@ public function getLinks() */ public function setLinks($links) { - if (is_null($links)) { - throw new \InvalidArgumentException('non-nullable links cannot be null'); - } $this->container['links'] = $links; return $this; @@ -424,9 +421,6 @@ public function getAddress() */ public function setAddress($address) { - if (is_null($address)) { - throw new \InvalidArgumentException('non-nullable address cannot be null'); - } $this->container['address'] = $address; return $this; @@ -451,9 +445,6 @@ public function getBusinessLineIds() */ public function setBusinessLineIds($businessLineIds) { - if (is_null($businessLineIds)) { - throw new \InvalidArgumentException('non-nullable businessLineIds cannot be null'); - } $this->container['businessLineIds'] = $businessLineIds; return $this; @@ -478,9 +469,6 @@ public function getDescription() */ public function setDescription($description) { - if (is_null($description)) { - throw new \InvalidArgumentException('non-nullable description cannot be null'); - } $this->container['description'] = $description; return $this; @@ -505,9 +493,6 @@ public function getExternalReferenceId() */ public function setExternalReferenceId($externalReferenceId) { - if (is_null($externalReferenceId)) { - throw new \InvalidArgumentException('non-nullable externalReferenceId cannot be null'); - } $this->container['externalReferenceId'] = $externalReferenceId; return $this; @@ -532,9 +517,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -559,9 +541,6 @@ public function getMerchantId() */ public function setMerchantId($merchantId) { - if (is_null($merchantId)) { - throw new \InvalidArgumentException('non-nullable merchantId cannot be null'); - } $this->container['merchantId'] = $merchantId; return $this; @@ -586,9 +565,6 @@ public function getPhoneNumber() */ public function setPhoneNumber($phoneNumber) { - if (is_null($phoneNumber)) { - throw new \InvalidArgumentException('non-nullable phoneNumber cannot be null'); - } $this->container['phoneNumber'] = $phoneNumber; return $this; @@ -613,9 +589,6 @@ public function getReference() */ public function setReference($reference) { - if (is_null($reference)) { - throw new \InvalidArgumentException('non-nullable reference cannot be null'); - } $this->container['reference'] = $reference; return $this; @@ -640,9 +613,6 @@ public function getShopperStatement() */ public function setShopperStatement($shopperStatement) { - if (is_null($shopperStatement)) { - throw new \InvalidArgumentException('non-nullable shopperStatement cannot be null'); - } $this->container['shopperStatement'] = $shopperStatement; return $this; @@ -667,9 +637,6 @@ public function getSplitConfiguration() */ public function setSplitConfiguration($splitConfiguration) { - if (is_null($splitConfiguration)) { - throw new \InvalidArgumentException('non-nullable splitConfiguration cannot be null'); - } $this->container['splitConfiguration'] = $splitConfiguration; return $this; @@ -694,9 +661,6 @@ public function getStatus() */ 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( diff --git a/src/Adyen/Model/Management/StoreAndForward.php b/src/Adyen/Model/Management/StoreAndForward.php index 9d119f359..6e1fc7fd3 100644 --- a/src/Adyen/Model/Management/StoreAndForward.php +++ b/src/Adyen/Model/Management/StoreAndForward.php @@ -309,9 +309,6 @@ public function getMaxAmount() */ public function setMaxAmount($maxAmount) { - if (is_null($maxAmount)) { - throw new \InvalidArgumentException('non-nullable maxAmount cannot be null'); - } $this->container['maxAmount'] = $maxAmount; return $this; @@ -336,7 +333,6 @@ public function getMaxPayments() */ public function setMaxPayments($maxPayments) { - // Do nothing for nullable integers $this->container['maxPayments'] = $maxPayments; return $this; @@ -361,9 +357,6 @@ public function getSupportedCardTypes() */ public function setSupportedCardTypes($supportedCardTypes) { - if (is_null($supportedCardTypes)) { - throw new \InvalidArgumentException('non-nullable supportedCardTypes cannot be null'); - } $this->container['supportedCardTypes'] = $supportedCardTypes; return $this; diff --git a/src/Adyen/Model/Management/StoreCreationRequest.php b/src/Adyen/Model/Management/StoreCreationRequest.php index f70ab7b62..8b098ec62 100644 --- a/src/Adyen/Model/Management/StoreCreationRequest.php +++ b/src/Adyen/Model/Management/StoreCreationRequest.php @@ -356,9 +356,6 @@ public function getAddress() */ public function setAddress($address) { - if (is_null($address)) { - throw new \InvalidArgumentException('non-nullable address cannot be null'); - } $this->container['address'] = $address; return $this; @@ -383,9 +380,6 @@ public function getBusinessLineIds() */ public function setBusinessLineIds($businessLineIds) { - if (is_null($businessLineIds)) { - throw new \InvalidArgumentException('non-nullable businessLineIds cannot be null'); - } $this->container['businessLineIds'] = $businessLineIds; return $this; @@ -410,9 +404,6 @@ public function getDescription() */ public function setDescription($description) { - if (is_null($description)) { - throw new \InvalidArgumentException('non-nullable description cannot be null'); - } $this->container['description'] = $description; return $this; @@ -437,9 +428,6 @@ public function getExternalReferenceId() */ public function setExternalReferenceId($externalReferenceId) { - if (is_null($externalReferenceId)) { - throw new \InvalidArgumentException('non-nullable externalReferenceId cannot be null'); - } $this->container['externalReferenceId'] = $externalReferenceId; return $this; @@ -464,9 +452,6 @@ public function getPhoneNumber() */ public function setPhoneNumber($phoneNumber) { - if (is_null($phoneNumber)) { - throw new \InvalidArgumentException('non-nullable phoneNumber cannot be null'); - } $this->container['phoneNumber'] = $phoneNumber; return $this; @@ -491,9 +476,6 @@ public function getReference() */ public function setReference($reference) { - if (is_null($reference)) { - throw new \InvalidArgumentException('non-nullable reference cannot be null'); - } $this->container['reference'] = $reference; return $this; @@ -518,9 +500,6 @@ public function getShopperStatement() */ public function setShopperStatement($shopperStatement) { - if (is_null($shopperStatement)) { - throw new \InvalidArgumentException('non-nullable shopperStatement cannot be null'); - } $this->container['shopperStatement'] = $shopperStatement; return $this; @@ -545,9 +524,6 @@ public function getSplitConfiguration() */ public function setSplitConfiguration($splitConfiguration) { - if (is_null($splitConfiguration)) { - throw new \InvalidArgumentException('non-nullable splitConfiguration cannot be null'); - } $this->container['splitConfiguration'] = $splitConfiguration; return $this; diff --git a/src/Adyen/Model/Management/StoreCreationWithMerchantCodeRequest.php b/src/Adyen/Model/Management/StoreCreationWithMerchantCodeRequest.php index 42be44cb7..fd8a32615 100644 --- a/src/Adyen/Model/Management/StoreCreationWithMerchantCodeRequest.php +++ b/src/Adyen/Model/Management/StoreCreationWithMerchantCodeRequest.php @@ -366,9 +366,6 @@ public function getAddress() */ public function setAddress($address) { - if (is_null($address)) { - throw new \InvalidArgumentException('non-nullable address cannot be null'); - } $this->container['address'] = $address; return $this; @@ -393,9 +390,6 @@ public function getBusinessLineIds() */ public function setBusinessLineIds($businessLineIds) { - if (is_null($businessLineIds)) { - throw new \InvalidArgumentException('non-nullable businessLineIds cannot be null'); - } $this->container['businessLineIds'] = $businessLineIds; return $this; @@ -420,9 +414,6 @@ public function getDescription() */ public function setDescription($description) { - if (is_null($description)) { - throw new \InvalidArgumentException('non-nullable description cannot be null'); - } $this->container['description'] = $description; return $this; @@ -447,9 +438,6 @@ public function getExternalReferenceId() */ public function setExternalReferenceId($externalReferenceId) { - if (is_null($externalReferenceId)) { - throw new \InvalidArgumentException('non-nullable externalReferenceId cannot be null'); - } $this->container['externalReferenceId'] = $externalReferenceId; return $this; @@ -474,9 +462,6 @@ public function getMerchantId() */ public function setMerchantId($merchantId) { - if (is_null($merchantId)) { - throw new \InvalidArgumentException('non-nullable merchantId cannot be null'); - } $this->container['merchantId'] = $merchantId; return $this; @@ -501,9 +486,6 @@ public function getPhoneNumber() */ public function setPhoneNumber($phoneNumber) { - if (is_null($phoneNumber)) { - throw new \InvalidArgumentException('non-nullable phoneNumber cannot be null'); - } $this->container['phoneNumber'] = $phoneNumber; return $this; @@ -528,9 +510,6 @@ public function getReference() */ public function setReference($reference) { - if (is_null($reference)) { - throw new \InvalidArgumentException('non-nullable reference cannot be null'); - } $this->container['reference'] = $reference; return $this; @@ -555,9 +534,6 @@ public function getShopperStatement() */ public function setShopperStatement($shopperStatement) { - if (is_null($shopperStatement)) { - throw new \InvalidArgumentException('non-nullable shopperStatement cannot be null'); - } $this->container['shopperStatement'] = $shopperStatement; return $this; @@ -582,9 +558,6 @@ public function getSplitConfiguration() */ public function setSplitConfiguration($splitConfiguration) { - if (is_null($splitConfiguration)) { - throw new \InvalidArgumentException('non-nullable splitConfiguration cannot be null'); - } $this->container['splitConfiguration'] = $splitConfiguration; return $this; diff --git a/src/Adyen/Model/Management/StoreLocation.php b/src/Adyen/Model/Management/StoreLocation.php index 2770423a3..a0c1795a4 100644 --- a/src/Adyen/Model/Management/StoreLocation.php +++ b/src/Adyen/Model/Management/StoreLocation.php @@ -340,9 +340,6 @@ public function getCity() */ public function setCity($city) { - if (is_null($city)) { - throw new \InvalidArgumentException('non-nullable city cannot be null'); - } $this->container['city'] = $city; return $this; @@ -367,9 +364,6 @@ public function getCountry() */ public function setCountry($country) { - if (is_null($country)) { - throw new \InvalidArgumentException('non-nullable country cannot be null'); - } $this->container['country'] = $country; return $this; @@ -394,9 +388,6 @@ public function getLine1() */ public function setLine1($line1) { - if (is_null($line1)) { - throw new \InvalidArgumentException('non-nullable line1 cannot be null'); - } $this->container['line1'] = $line1; return $this; @@ -421,9 +412,6 @@ public function getLine2() */ public function setLine2($line2) { - if (is_null($line2)) { - throw new \InvalidArgumentException('non-nullable line2 cannot be null'); - } $this->container['line2'] = $line2; return $this; @@ -448,9 +436,6 @@ public function getLine3() */ public function setLine3($line3) { - if (is_null($line3)) { - throw new \InvalidArgumentException('non-nullable line3 cannot be null'); - } $this->container['line3'] = $line3; return $this; @@ -475,9 +460,6 @@ public function getPostalCode() */ public function setPostalCode($postalCode) { - if (is_null($postalCode)) { - throw new \InvalidArgumentException('non-nullable postalCode cannot be null'); - } $this->container['postalCode'] = $postalCode; return $this; @@ -502,9 +484,6 @@ public function getStateOrProvince() */ public function setStateOrProvince($stateOrProvince) { - if (is_null($stateOrProvince)) { - throw new \InvalidArgumentException('non-nullable stateOrProvince cannot be null'); - } $this->container['stateOrProvince'] = $stateOrProvince; return $this; diff --git a/src/Adyen/Model/Management/StoreSplitConfiguration.php b/src/Adyen/Model/Management/StoreSplitConfiguration.php index f2d1a9b03..f3800bd38 100644 --- a/src/Adyen/Model/Management/StoreSplitConfiguration.php +++ b/src/Adyen/Model/Management/StoreSplitConfiguration.php @@ -302,9 +302,6 @@ public function getBalanceAccountId() */ public function setBalanceAccountId($balanceAccountId) { - if (is_null($balanceAccountId)) { - throw new \InvalidArgumentException('non-nullable balanceAccountId cannot be null'); - } $this->container['balanceAccountId'] = $balanceAccountId; return $this; @@ -329,9 +326,6 @@ public function getSplitConfigurationId() */ public function setSplitConfigurationId($splitConfigurationId) { - if (is_null($splitConfigurationId)) { - throw new \InvalidArgumentException('non-nullable splitConfigurationId cannot be null'); - } $this->container['splitConfigurationId'] = $splitConfigurationId; return $this; diff --git a/src/Adyen/Model/Management/SupportedCardTypes.php b/src/Adyen/Model/Management/SupportedCardTypes.php index 66d57ca71..2dd148e4b 100644 --- a/src/Adyen/Model/Management/SupportedCardTypes.php +++ b/src/Adyen/Model/Management/SupportedCardTypes.php @@ -323,9 +323,6 @@ public function getCredit() */ public function setCredit($credit) { - if (is_null($credit)) { - throw new \InvalidArgumentException('non-nullable credit cannot be null'); - } $this->container['credit'] = $credit; return $this; @@ -350,9 +347,6 @@ public function getDebit() */ public function setDebit($debit) { - if (is_null($debit)) { - throw new \InvalidArgumentException('non-nullable debit cannot be null'); - } $this->container['debit'] = $debit; return $this; @@ -377,9 +371,6 @@ public function getDeferredDebit() */ public function setDeferredDebit($deferredDebit) { - if (is_null($deferredDebit)) { - throw new \InvalidArgumentException('non-nullable deferredDebit cannot be null'); - } $this->container['deferredDebit'] = $deferredDebit; return $this; @@ -404,9 +395,6 @@ public function getPrepaid() */ public function setPrepaid($prepaid) { - if (is_null($prepaid)) { - throw new \InvalidArgumentException('non-nullable prepaid cannot be null'); - } $this->container['prepaid'] = $prepaid; return $this; @@ -431,9 +419,6 @@ public function getUnknown() */ public function setUnknown($unknown) { - if (is_null($unknown)) { - throw new \InvalidArgumentException('non-nullable unknown cannot be null'); - } $this->container['unknown'] = $unknown; return $this; diff --git a/src/Adyen/Model/Management/Surcharge.php b/src/Adyen/Model/Management/Surcharge.php index 2fe95f188..d9dd59824 100644 --- a/src/Adyen/Model/Management/Surcharge.php +++ b/src/Adyen/Model/Management/Surcharge.php @@ -302,9 +302,6 @@ public function getAskConfirmation() */ public function setAskConfirmation($askConfirmation) { - if (is_null($askConfirmation)) { - throw new \InvalidArgumentException('non-nullable askConfirmation cannot be null'); - } $this->container['askConfirmation'] = $askConfirmation; return $this; @@ -329,9 +326,6 @@ public function getConfigurations() */ public function setConfigurations($configurations) { - if (is_null($configurations)) { - throw new \InvalidArgumentException('non-nullable configurations cannot be null'); - } $this->container['configurations'] = $configurations; return $this; diff --git a/src/Adyen/Model/Management/SwishInfo.php b/src/Adyen/Model/Management/SwishInfo.php index 1ca9d82b0..109f51587 100644 --- a/src/Adyen/Model/Management/SwishInfo.php +++ b/src/Adyen/Model/Management/SwishInfo.php @@ -298,9 +298,6 @@ public function getSwishNumber() */ public function setSwishNumber($swishNumber) { - if (is_null($swishNumber)) { - throw new \InvalidArgumentException('non-nullable swishNumber cannot be null'); - } $this->container['swishNumber'] = $swishNumber; return $this; diff --git a/src/Adyen/Model/Management/TapToPay.php b/src/Adyen/Model/Management/TapToPay.php index 22cff040c..ce07046f7 100644 --- a/src/Adyen/Model/Management/TapToPay.php +++ b/src/Adyen/Model/Management/TapToPay.php @@ -295,9 +295,6 @@ public function getMerchantDisplayName() */ public function setMerchantDisplayName($merchantDisplayName) { - if (is_null($merchantDisplayName)) { - throw new \InvalidArgumentException('non-nullable merchantDisplayName cannot be null'); - } $this->container['merchantDisplayName'] = $merchantDisplayName; return $this; diff --git a/src/Adyen/Model/Management/Terminal.php b/src/Adyen/Model/Management/Terminal.php index 9af81e9e5..10bc42a44 100644 --- a/src/Adyen/Model/Management/Terminal.php +++ b/src/Adyen/Model/Management/Terminal.php @@ -351,9 +351,6 @@ public function getAssignment() */ public function setAssignment($assignment) { - if (is_null($assignment)) { - throw new \InvalidArgumentException('non-nullable assignment cannot be null'); - } $this->container['assignment'] = $assignment; return $this; @@ -378,9 +375,6 @@ public function getConnectivity() */ public function setConnectivity($connectivity) { - if (is_null($connectivity)) { - throw new \InvalidArgumentException('non-nullable connectivity cannot be null'); - } $this->container['connectivity'] = $connectivity; return $this; @@ -405,9 +399,6 @@ public function getFirmwareVersion() */ public function setFirmwareVersion($firmwareVersion) { - if (is_null($firmwareVersion)) { - throw new \InvalidArgumentException('non-nullable firmwareVersion cannot be null'); - } $this->container['firmwareVersion'] = $firmwareVersion; return $this; @@ -432,9 +423,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -459,9 +447,6 @@ public function getLastActivityAt() */ public function setLastActivityAt($lastActivityAt) { - if (is_null($lastActivityAt)) { - throw new \InvalidArgumentException('non-nullable lastActivityAt cannot be null'); - } $this->container['lastActivityAt'] = $lastActivityAt; return $this; @@ -486,9 +471,6 @@ public function getLastTransactionAt() */ public function setLastTransactionAt($lastTransactionAt) { - if (is_null($lastTransactionAt)) { - throw new \InvalidArgumentException('non-nullable lastTransactionAt cannot be null'); - } $this->container['lastTransactionAt'] = $lastTransactionAt; return $this; @@ -513,9 +495,6 @@ public function getModel() */ public function setModel($model) { - if (is_null($model)) { - throw new \InvalidArgumentException('non-nullable model cannot be null'); - } $this->container['model'] = $model; return $this; @@ -540,9 +519,6 @@ public function getRestartLocalTime() */ public function setRestartLocalTime($restartLocalTime) { - if (is_null($restartLocalTime)) { - throw new \InvalidArgumentException('non-nullable restartLocalTime cannot be null'); - } $this->container['restartLocalTime'] = $restartLocalTime; return $this; @@ -567,9 +543,6 @@ public function getSerialNumber() */ public function setSerialNumber($serialNumber) { - if (is_null($serialNumber)) { - throw new \InvalidArgumentException('non-nullable serialNumber cannot be null'); - } $this->container['serialNumber'] = $serialNumber; return $this; diff --git a/src/Adyen/Model/Management/TerminalActionScheduleDetail.php b/src/Adyen/Model/Management/TerminalActionScheduleDetail.php index 045ad991a..982657de5 100644 --- a/src/Adyen/Model/Management/TerminalActionScheduleDetail.php +++ b/src/Adyen/Model/Management/TerminalActionScheduleDetail.php @@ -302,9 +302,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -329,9 +326,6 @@ public function getTerminalId() */ public function setTerminalId($terminalId) { - if (is_null($terminalId)) { - throw new \InvalidArgumentException('non-nullable terminalId cannot be null'); - } $this->container['terminalId'] = $terminalId; return $this; diff --git a/src/Adyen/Model/Management/TerminalAssignment.php b/src/Adyen/Model/Management/TerminalAssignment.php index b4c32a11c..2bb1c2912 100644 --- a/src/Adyen/Model/Management/TerminalAssignment.php +++ b/src/Adyen/Model/Management/TerminalAssignment.php @@ -356,9 +356,6 @@ public function getCompanyId() */ public function setCompanyId($companyId) { - if (is_null($companyId)) { - throw new \InvalidArgumentException('non-nullable companyId cannot be null'); - } $this->container['companyId'] = $companyId; return $this; @@ -383,9 +380,6 @@ public function getMerchantId() */ public function setMerchantId($merchantId) { - if (is_null($merchantId)) { - throw new \InvalidArgumentException('non-nullable merchantId cannot be null'); - } $this->container['merchantId'] = $merchantId; return $this; @@ -410,9 +404,6 @@ public function getReassignmentTarget() */ public function setReassignmentTarget($reassignmentTarget) { - if (is_null($reassignmentTarget)) { - throw new \InvalidArgumentException('non-nullable reassignmentTarget cannot be null'); - } $this->container['reassignmentTarget'] = $reassignmentTarget; return $this; @@ -437,9 +428,6 @@ public function getStatus() */ 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( @@ -474,9 +462,6 @@ public function getStoreId() */ public function setStoreId($storeId) { - if (is_null($storeId)) { - throw new \InvalidArgumentException('non-nullable storeId cannot be null'); - } $this->container['storeId'] = $storeId; return $this; diff --git a/src/Adyen/Model/Management/TerminalConnectivity.php b/src/Adyen/Model/Management/TerminalConnectivity.php index 7da64ba2a..7285f6053 100644 --- a/src/Adyen/Model/Management/TerminalConnectivity.php +++ b/src/Adyen/Model/Management/TerminalConnectivity.php @@ -316,9 +316,6 @@ public function getBluetooth() */ public function setBluetooth($bluetooth) { - if (is_null($bluetooth)) { - throw new \InvalidArgumentException('non-nullable bluetooth cannot be null'); - } $this->container['bluetooth'] = $bluetooth; return $this; @@ -343,9 +340,6 @@ public function getCellular() */ public function setCellular($cellular) { - if (is_null($cellular)) { - throw new \InvalidArgumentException('non-nullable cellular cannot be null'); - } $this->container['cellular'] = $cellular; return $this; @@ -370,9 +364,6 @@ public function getEthernet() */ public function setEthernet($ethernet) { - if (is_null($ethernet)) { - throw new \InvalidArgumentException('non-nullable ethernet cannot be null'); - } $this->container['ethernet'] = $ethernet; return $this; @@ -397,9 +388,6 @@ public function getWifi() */ public function setWifi($wifi) { - if (is_null($wifi)) { - throw new \InvalidArgumentException('non-nullable wifi cannot be null'); - } $this->container['wifi'] = $wifi; return $this; diff --git a/src/Adyen/Model/Management/TerminalConnectivityBluetooth.php b/src/Adyen/Model/Management/TerminalConnectivityBluetooth.php index 623822a38..85066d229 100644 --- a/src/Adyen/Model/Management/TerminalConnectivityBluetooth.php +++ b/src/Adyen/Model/Management/TerminalConnectivityBluetooth.php @@ -302,9 +302,6 @@ public function getIpAddress() */ public function setIpAddress($ipAddress) { - if (is_null($ipAddress)) { - throw new \InvalidArgumentException('non-nullable ipAddress cannot be null'); - } $this->container['ipAddress'] = $ipAddress; return $this; @@ -329,9 +326,6 @@ public function getMacAddress() */ public function setMacAddress($macAddress) { - if (is_null($macAddress)) { - throw new \InvalidArgumentException('non-nullable macAddress cannot be null'); - } $this->container['macAddress'] = $macAddress; return $this; diff --git a/src/Adyen/Model/Management/TerminalConnectivityCellular.php b/src/Adyen/Model/Management/TerminalConnectivityCellular.php index e449cc85f..c0bcb3748 100644 --- a/src/Adyen/Model/Management/TerminalConnectivityCellular.php +++ b/src/Adyen/Model/Management/TerminalConnectivityCellular.php @@ -331,9 +331,6 @@ public function getIccid() */ public function setIccid($iccid) { - if (is_null($iccid)) { - throw new \InvalidArgumentException('non-nullable iccid cannot be null'); - } $this->container['iccid'] = $iccid; return $this; @@ -358,9 +355,6 @@ public function getStatus() */ 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( diff --git a/src/Adyen/Model/Management/TerminalConnectivityEthernet.php b/src/Adyen/Model/Management/TerminalConnectivityEthernet.php index 35a6cb9f3..4c27ba3e7 100644 --- a/src/Adyen/Model/Management/TerminalConnectivityEthernet.php +++ b/src/Adyen/Model/Management/TerminalConnectivityEthernet.php @@ -309,9 +309,6 @@ public function getIpAddress() */ public function setIpAddress($ipAddress) { - if (is_null($ipAddress)) { - throw new \InvalidArgumentException('non-nullable ipAddress cannot be null'); - } $this->container['ipAddress'] = $ipAddress; return $this; @@ -336,9 +333,6 @@ public function getLinkNegotiation() */ public function setLinkNegotiation($linkNegotiation) { - if (is_null($linkNegotiation)) { - throw new \InvalidArgumentException('non-nullable linkNegotiation cannot be null'); - } $this->container['linkNegotiation'] = $linkNegotiation; return $this; @@ -363,9 +357,6 @@ public function getMacAddress() */ public function setMacAddress($macAddress) { - if (is_null($macAddress)) { - throw new \InvalidArgumentException('non-nullable macAddress cannot be null'); - } $this->container['macAddress'] = $macAddress; return $this; diff --git a/src/Adyen/Model/Management/TerminalConnectivityWifi.php b/src/Adyen/Model/Management/TerminalConnectivityWifi.php index 062a9adea..1fe6c3d77 100644 --- a/src/Adyen/Model/Management/TerminalConnectivityWifi.php +++ b/src/Adyen/Model/Management/TerminalConnectivityWifi.php @@ -309,9 +309,6 @@ public function getIpAddress() */ public function setIpAddress($ipAddress) { - if (is_null($ipAddress)) { - throw new \InvalidArgumentException('non-nullable ipAddress cannot be null'); - } $this->container['ipAddress'] = $ipAddress; return $this; @@ -336,9 +333,6 @@ public function getMacAddress() */ public function setMacAddress($macAddress) { - if (is_null($macAddress)) { - throw new \InvalidArgumentException('non-nullable macAddress cannot be null'); - } $this->container['macAddress'] = $macAddress; return $this; @@ -363,9 +357,6 @@ public function getSsid() */ public function setSsid($ssid) { - if (is_null($ssid)) { - throw new \InvalidArgumentException('non-nullable ssid cannot be null'); - } $this->container['ssid'] = $ssid; return $this; diff --git a/src/Adyen/Model/Management/TerminalInstructions.php b/src/Adyen/Model/Management/TerminalInstructions.php index b21cce76c..4ca7b016d 100644 --- a/src/Adyen/Model/Management/TerminalInstructions.php +++ b/src/Adyen/Model/Management/TerminalInstructions.php @@ -295,9 +295,6 @@ public function getAdyenAppRestart() */ public function setAdyenAppRestart($adyenAppRestart) { - if (is_null($adyenAppRestart)) { - throw new \InvalidArgumentException('non-nullable adyenAppRestart cannot be null'); - } $this->container['adyenAppRestart'] = $adyenAppRestart; return $this; diff --git a/src/Adyen/Model/Management/TerminalModelsResponse.php b/src/Adyen/Model/Management/TerminalModelsResponse.php index 644cf81a2..56dbfa4f0 100644 --- a/src/Adyen/Model/Management/TerminalModelsResponse.php +++ b/src/Adyen/Model/Management/TerminalModelsResponse.php @@ -295,9 +295,6 @@ public function getData() */ public function setData($data) { - if (is_null($data)) { - throw new \InvalidArgumentException('non-nullable data cannot be null'); - } $this->container['data'] = $data; return $this; diff --git a/src/Adyen/Model/Management/TerminalOrder.php b/src/Adyen/Model/Management/TerminalOrder.php index d369298fc..33582c16a 100644 --- a/src/Adyen/Model/Management/TerminalOrder.php +++ b/src/Adyen/Model/Management/TerminalOrder.php @@ -344,9 +344,6 @@ public function getBillingEntity() */ public function setBillingEntity($billingEntity) { - if (is_null($billingEntity)) { - throw new \InvalidArgumentException('non-nullable billingEntity cannot be null'); - } $this->container['billingEntity'] = $billingEntity; return $this; @@ -371,9 +368,6 @@ public function getCustomerOrderReference() */ public function setCustomerOrderReference($customerOrderReference) { - if (is_null($customerOrderReference)) { - throw new \InvalidArgumentException('non-nullable customerOrderReference cannot be null'); - } $this->container['customerOrderReference'] = $customerOrderReference; return $this; @@ -398,9 +392,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -425,9 +416,6 @@ public function getItems() */ public function setItems($items) { - if (is_null($items)) { - throw new \InvalidArgumentException('non-nullable items cannot be null'); - } $this->container['items'] = $items; return $this; @@ -452,9 +440,6 @@ public function getOrderDate() */ public function setOrderDate($orderDate) { - if (is_null($orderDate)) { - throw new \InvalidArgumentException('non-nullable orderDate cannot be null'); - } $this->container['orderDate'] = $orderDate; return $this; @@ -479,9 +464,6 @@ public function getShippingLocation() */ public function setShippingLocation($shippingLocation) { - if (is_null($shippingLocation)) { - throw new \InvalidArgumentException('non-nullable shippingLocation cannot be null'); - } $this->container['shippingLocation'] = $shippingLocation; return $this; @@ -506,9 +488,6 @@ public function getStatus() */ public function setStatus($status) { - if (is_null($status)) { - throw new \InvalidArgumentException('non-nullable status cannot be null'); - } $this->container['status'] = $status; return $this; @@ -533,9 +512,6 @@ public function getTrackingUrl() */ public function setTrackingUrl($trackingUrl) { - if (is_null($trackingUrl)) { - throw new \InvalidArgumentException('non-nullable trackingUrl cannot be null'); - } $this->container['trackingUrl'] = $trackingUrl; return $this; diff --git a/src/Adyen/Model/Management/TerminalOrderRequest.php b/src/Adyen/Model/Management/TerminalOrderRequest.php index df149c5d2..b995fc8c8 100644 --- a/src/Adyen/Model/Management/TerminalOrderRequest.php +++ b/src/Adyen/Model/Management/TerminalOrderRequest.php @@ -330,9 +330,6 @@ public function getBillingEntityId() */ public function setBillingEntityId($billingEntityId) { - if (is_null($billingEntityId)) { - throw new \InvalidArgumentException('non-nullable billingEntityId cannot be null'); - } $this->container['billingEntityId'] = $billingEntityId; return $this; @@ -357,9 +354,6 @@ public function getCustomerOrderReference() */ public function setCustomerOrderReference($customerOrderReference) { - if (is_null($customerOrderReference)) { - throw new \InvalidArgumentException('non-nullable customerOrderReference cannot be null'); - } $this->container['customerOrderReference'] = $customerOrderReference; return $this; @@ -384,9 +378,6 @@ public function getItems() */ public function setItems($items) { - if (is_null($items)) { - throw new \InvalidArgumentException('non-nullable items cannot be null'); - } $this->container['items'] = $items; return $this; @@ -411,9 +402,6 @@ public function getOrderType() */ public function setOrderType($orderType) { - if (is_null($orderType)) { - throw new \InvalidArgumentException('non-nullable orderType cannot be null'); - } $this->container['orderType'] = $orderType; return $this; @@ -438,9 +426,6 @@ public function getShippingLocationId() */ public function setShippingLocationId($shippingLocationId) { - if (is_null($shippingLocationId)) { - throw new \InvalidArgumentException('non-nullable shippingLocationId cannot be null'); - } $this->container['shippingLocationId'] = $shippingLocationId; return $this; @@ -465,9 +450,6 @@ public function getTaxId() */ public function setTaxId($taxId) { - if (is_null($taxId)) { - throw new \InvalidArgumentException('non-nullable taxId cannot be null'); - } $this->container['taxId'] = $taxId; return $this; diff --git a/src/Adyen/Model/Management/TerminalOrdersResponse.php b/src/Adyen/Model/Management/TerminalOrdersResponse.php index cbe5f54b9..d138d411f 100644 --- a/src/Adyen/Model/Management/TerminalOrdersResponse.php +++ b/src/Adyen/Model/Management/TerminalOrdersResponse.php @@ -295,9 +295,6 @@ public function getData() */ public function setData($data) { - if (is_null($data)) { - throw new \InvalidArgumentException('non-nullable data cannot be null'); - } $this->container['data'] = $data; return $this; diff --git a/src/Adyen/Model/Management/TerminalProduct.php b/src/Adyen/Model/Management/TerminalProduct.php index 4b33d4b65..0ce501ca3 100644 --- a/src/Adyen/Model/Management/TerminalProduct.php +++ b/src/Adyen/Model/Management/TerminalProduct.php @@ -323,9 +323,6 @@ public function getDescription() */ public function setDescription($description) { - if (is_null($description)) { - throw new \InvalidArgumentException('non-nullable description cannot be null'); - } $this->container['description'] = $description; return $this; @@ -350,9 +347,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -377,9 +371,6 @@ public function getItemsIncluded() */ public function setItemsIncluded($itemsIncluded) { - if (is_null($itemsIncluded)) { - throw new \InvalidArgumentException('non-nullable itemsIncluded cannot be null'); - } $this->container['itemsIncluded'] = $itemsIncluded; return $this; @@ -404,9 +395,6 @@ public function getName() */ public function setName($name) { - if (is_null($name)) { - throw new \InvalidArgumentException('non-nullable name cannot be null'); - } $this->container['name'] = $name; return $this; @@ -431,9 +419,6 @@ public function getPrice() */ public function setPrice($price) { - if (is_null($price)) { - throw new \InvalidArgumentException('non-nullable price cannot be null'); - } $this->container['price'] = $price; return $this; diff --git a/src/Adyen/Model/Management/TerminalProductPrice.php b/src/Adyen/Model/Management/TerminalProductPrice.php index 098f7ba8d..2fc9f5a8d 100644 --- a/src/Adyen/Model/Management/TerminalProductPrice.php +++ b/src/Adyen/Model/Management/TerminalProductPrice.php @@ -302,9 +302,6 @@ public function getCurrency() */ public function setCurrency($currency) { - if (is_null($currency)) { - throw new \InvalidArgumentException('non-nullable currency cannot be null'); - } $this->container['currency'] = $currency; return $this; @@ -329,9 +326,6 @@ public function getValue() */ public function setValue($value) { - if (is_null($value)) { - throw new \InvalidArgumentException('non-nullable value cannot be null'); - } $this->container['value'] = $value; return $this; diff --git a/src/Adyen/Model/Management/TerminalProductsResponse.php b/src/Adyen/Model/Management/TerminalProductsResponse.php index 52b7cbf9f..1265dbffa 100644 --- a/src/Adyen/Model/Management/TerminalProductsResponse.php +++ b/src/Adyen/Model/Management/TerminalProductsResponse.php @@ -295,9 +295,6 @@ public function getData() */ public function setData($data) { - if (is_null($data)) { - throw new \InvalidArgumentException('non-nullable data cannot be null'); - } $this->container['data'] = $data; return $this; diff --git a/src/Adyen/Model/Management/TerminalReassignmentRequest.php b/src/Adyen/Model/Management/TerminalReassignmentRequest.php index d623637e8..191c5dff2 100644 --- a/src/Adyen/Model/Management/TerminalReassignmentRequest.php +++ b/src/Adyen/Model/Management/TerminalReassignmentRequest.php @@ -316,9 +316,6 @@ public function getCompanyId() */ public function setCompanyId($companyId) { - if (is_null($companyId)) { - throw new \InvalidArgumentException('non-nullable companyId cannot be null'); - } $this->container['companyId'] = $companyId; return $this; @@ -343,9 +340,6 @@ public function getInventory() */ public function setInventory($inventory) { - if (is_null($inventory)) { - throw new \InvalidArgumentException('non-nullable inventory cannot be null'); - } $this->container['inventory'] = $inventory; return $this; @@ -370,9 +364,6 @@ public function getMerchantId() */ public function setMerchantId($merchantId) { - if (is_null($merchantId)) { - throw new \InvalidArgumentException('non-nullable merchantId cannot be null'); - } $this->container['merchantId'] = $merchantId; return $this; @@ -397,9 +388,6 @@ public function getStoreId() */ public function setStoreId($storeId) { - if (is_null($storeId)) { - throw new \InvalidArgumentException('non-nullable storeId cannot be null'); - } $this->container['storeId'] = $storeId; return $this; diff --git a/src/Adyen/Model/Management/TerminalReassignmentTarget.php b/src/Adyen/Model/Management/TerminalReassignmentTarget.php index 535f75c4f..830038d2f 100644 --- a/src/Adyen/Model/Management/TerminalReassignmentTarget.php +++ b/src/Adyen/Model/Management/TerminalReassignmentTarget.php @@ -319,9 +319,6 @@ public function getCompanyId() */ public function setCompanyId($companyId) { - if (is_null($companyId)) { - throw new \InvalidArgumentException('non-nullable companyId cannot be null'); - } $this->container['companyId'] = $companyId; return $this; @@ -346,9 +343,6 @@ public function getInventory() */ public function setInventory($inventory) { - if (is_null($inventory)) { - throw new \InvalidArgumentException('non-nullable inventory cannot be null'); - } $this->container['inventory'] = $inventory; return $this; @@ -373,9 +367,6 @@ public function getMerchantId() */ public function setMerchantId($merchantId) { - if (is_null($merchantId)) { - throw new \InvalidArgumentException('non-nullable merchantId cannot be null'); - } $this->container['merchantId'] = $merchantId; return $this; @@ -400,9 +391,6 @@ public function getStoreId() */ public function setStoreId($storeId) { - if (is_null($storeId)) { - throw new \InvalidArgumentException('non-nullable storeId cannot be null'); - } $this->container['storeId'] = $storeId; return $this; diff --git a/src/Adyen/Model/Management/TerminalSettings.php b/src/Adyen/Model/Management/TerminalSettings.php index 63f2c0291..2eb510791 100644 --- a/src/Adyen/Model/Management/TerminalSettings.php +++ b/src/Adyen/Model/Management/TerminalSettings.php @@ -442,9 +442,6 @@ public function getCardholderReceipt() */ public function setCardholderReceipt($cardholderReceipt) { - if (is_null($cardholderReceipt)) { - throw new \InvalidArgumentException('non-nullable cardholderReceipt cannot be null'); - } $this->container['cardholderReceipt'] = $cardholderReceipt; return $this; @@ -469,9 +466,6 @@ public function getConnectivity() */ public function setConnectivity($connectivity) { - if (is_null($connectivity)) { - throw new \InvalidArgumentException('non-nullable connectivity cannot be null'); - } $this->container['connectivity'] = $connectivity; return $this; @@ -530,9 +524,6 @@ public function getHardware() */ public function setHardware($hardware) { - if (is_null($hardware)) { - throw new \InvalidArgumentException('non-nullable hardware cannot be null'); - } $this->container['hardware'] = $hardware; return $this; @@ -557,9 +548,6 @@ public function getLocalization() */ public function setLocalization($localization) { - if (is_null($localization)) { - throw new \InvalidArgumentException('non-nullable localization cannot be null'); - } $this->container['localization'] = $localization; return $this; @@ -584,9 +572,6 @@ public function getNexo() */ public function setNexo($nexo) { - if (is_null($nexo)) { - throw new \InvalidArgumentException('non-nullable nexo cannot be null'); - } $this->container['nexo'] = $nexo; return $this; @@ -611,9 +596,6 @@ public function getOfflineProcessing() */ public function setOfflineProcessing($offlineProcessing) { - if (is_null($offlineProcessing)) { - throw new \InvalidArgumentException('non-nullable offlineProcessing cannot be null'); - } $this->container['offlineProcessing'] = $offlineProcessing; return $this; @@ -638,9 +620,6 @@ public function getOpi() */ public function setOpi($opi) { - if (is_null($opi)) { - throw new \InvalidArgumentException('non-nullable opi cannot be null'); - } $this->container['opi'] = $opi; return $this; @@ -665,9 +644,6 @@ public function getPasscodes() */ public function setPasscodes($passcodes) { - if (is_null($passcodes)) { - throw new \InvalidArgumentException('non-nullable passcodes cannot be null'); - } $this->container['passcodes'] = $passcodes; return $this; @@ -692,9 +668,6 @@ public function getPayAtTable() */ public function setPayAtTable($payAtTable) { - if (is_null($payAtTable)) { - throw new \InvalidArgumentException('non-nullable payAtTable cannot be null'); - } $this->container['payAtTable'] = $payAtTable; return $this; @@ -719,9 +692,6 @@ public function getPayment() */ public function setPayment($payment) { - if (is_null($payment)) { - throw new \InvalidArgumentException('non-nullable payment cannot be null'); - } $this->container['payment'] = $payment; return $this; @@ -746,9 +716,6 @@ public function getReceiptOptions() */ public function setReceiptOptions($receiptOptions) { - if (is_null($receiptOptions)) { - throw new \InvalidArgumentException('non-nullable receiptOptions cannot be null'); - } $this->container['receiptOptions'] = $receiptOptions; return $this; @@ -773,9 +740,6 @@ public function getReceiptPrinting() */ public function setReceiptPrinting($receiptPrinting) { - if (is_null($receiptPrinting)) { - throw new \InvalidArgumentException('non-nullable receiptPrinting cannot be null'); - } $this->container['receiptPrinting'] = $receiptPrinting; return $this; @@ -800,9 +764,6 @@ public function getRefunds() */ public function setRefunds($refunds) { - if (is_null($refunds)) { - throw new \InvalidArgumentException('non-nullable refunds cannot be null'); - } $this->container['refunds'] = $refunds; return $this; @@ -827,9 +788,6 @@ public function getSignature() */ public function setSignature($signature) { - if (is_null($signature)) { - throw new \InvalidArgumentException('non-nullable signature cannot be null'); - } $this->container['signature'] = $signature; return $this; @@ -854,9 +812,6 @@ public function getStandalone() */ public function setStandalone($standalone) { - if (is_null($standalone)) { - throw new \InvalidArgumentException('non-nullable standalone cannot be null'); - } $this->container['standalone'] = $standalone; return $this; @@ -881,9 +836,6 @@ public function getStoreAndForward() */ public function setStoreAndForward($storeAndForward) { - if (is_null($storeAndForward)) { - throw new \InvalidArgumentException('non-nullable storeAndForward cannot be null'); - } $this->container['storeAndForward'] = $storeAndForward; return $this; @@ -908,9 +860,6 @@ public function getSurcharge() */ public function setSurcharge($surcharge) { - if (is_null($surcharge)) { - throw new \InvalidArgumentException('non-nullable surcharge cannot be null'); - } $this->container['surcharge'] = $surcharge; return $this; @@ -935,9 +884,6 @@ public function getTapToPay() */ public function setTapToPay($tapToPay) { - if (is_null($tapToPay)) { - throw new \InvalidArgumentException('non-nullable tapToPay cannot be null'); - } $this->container['tapToPay'] = $tapToPay; return $this; @@ -962,9 +908,6 @@ public function getTerminalInstructions() */ public function setTerminalInstructions($terminalInstructions) { - if (is_null($terminalInstructions)) { - throw new \InvalidArgumentException('non-nullable terminalInstructions cannot be null'); - } $this->container['terminalInstructions'] = $terminalInstructions; return $this; @@ -989,9 +932,6 @@ public function getTimeouts() */ public function setTimeouts($timeouts) { - if (is_null($timeouts)) { - throw new \InvalidArgumentException('non-nullable timeouts cannot be null'); - } $this->container['timeouts'] = $timeouts; return $this; @@ -1016,9 +956,6 @@ public function getWifiProfiles() */ public function setWifiProfiles($wifiProfiles) { - if (is_null($wifiProfiles)) { - throw new \InvalidArgumentException('non-nullable wifiProfiles cannot be null'); - } $this->container['wifiProfiles'] = $wifiProfiles; return $this; diff --git a/src/Adyen/Model/Management/TestCompanyWebhookRequest.php b/src/Adyen/Model/Management/TestCompanyWebhookRequest.php index bae2848a5..adaccb309 100644 --- a/src/Adyen/Model/Management/TestCompanyWebhookRequest.php +++ b/src/Adyen/Model/Management/TestCompanyWebhookRequest.php @@ -309,9 +309,6 @@ public function getMerchantIds() */ public function setMerchantIds($merchantIds) { - if (is_null($merchantIds)) { - throw new \InvalidArgumentException('non-nullable merchantIds cannot be null'); - } $this->container['merchantIds'] = $merchantIds; return $this; @@ -336,9 +333,6 @@ public function getNotification() */ public function setNotification($notification) { - if (is_null($notification)) { - throw new \InvalidArgumentException('non-nullable notification cannot be null'); - } $this->container['notification'] = $notification; return $this; @@ -363,9 +357,6 @@ public function getTypes() */ public function setTypes($types) { - if (is_null($types)) { - throw new \InvalidArgumentException('non-nullable types cannot be null'); - } $this->container['types'] = $types; return $this; diff --git a/src/Adyen/Model/Management/TestOutput.php b/src/Adyen/Model/Management/TestOutput.php index 5a5a51049..6ad0897fa 100644 --- a/src/Adyen/Model/Management/TestOutput.php +++ b/src/Adyen/Model/Management/TestOutput.php @@ -333,9 +333,6 @@ public function getMerchantId() */ public function setMerchantId($merchantId) { - if (is_null($merchantId)) { - throw new \InvalidArgumentException('non-nullable merchantId cannot be null'); - } $this->container['merchantId'] = $merchantId; return $this; @@ -360,9 +357,6 @@ public function getOutput() */ public function setOutput($output) { - if (is_null($output)) { - throw new \InvalidArgumentException('non-nullable output cannot be null'); - } $this->container['output'] = $output; return $this; @@ -387,9 +381,6 @@ public function getRequestSent() */ public function setRequestSent($requestSent) { - if (is_null($requestSent)) { - throw new \InvalidArgumentException('non-nullable requestSent cannot be null'); - } $this->container['requestSent'] = $requestSent; return $this; @@ -414,9 +405,6 @@ public function getResponseCode() */ public function setResponseCode($responseCode) { - if (is_null($responseCode)) { - throw new \InvalidArgumentException('non-nullable responseCode cannot be null'); - } $this->container['responseCode'] = $responseCode; return $this; @@ -441,9 +429,6 @@ public function getResponseTime() */ public function setResponseTime($responseTime) { - if (is_null($responseTime)) { - throw new \InvalidArgumentException('non-nullable responseTime cannot be null'); - } $this->container['responseTime'] = $responseTime; return $this; @@ -468,9 +453,6 @@ public function getStatus() */ public function setStatus($status) { - if (is_null($status)) { - throw new \InvalidArgumentException('non-nullable status cannot be null'); - } $this->container['status'] = $status; return $this; diff --git a/src/Adyen/Model/Management/TestWebhookRequest.php b/src/Adyen/Model/Management/TestWebhookRequest.php index aed3166b1..81f1ba303 100644 --- a/src/Adyen/Model/Management/TestWebhookRequest.php +++ b/src/Adyen/Model/Management/TestWebhookRequest.php @@ -302,9 +302,6 @@ public function getNotification() */ public function setNotification($notification) { - if (is_null($notification)) { - throw new \InvalidArgumentException('non-nullable notification cannot be null'); - } $this->container['notification'] = $notification; return $this; @@ -329,9 +326,6 @@ public function getTypes() */ public function setTypes($types) { - if (is_null($types)) { - throw new \InvalidArgumentException('non-nullable types cannot be null'); - } $this->container['types'] = $types; return $this; diff --git a/src/Adyen/Model/Management/TestWebhookResponse.php b/src/Adyen/Model/Management/TestWebhookResponse.php index bb28a1761..44f8894bf 100644 --- a/src/Adyen/Model/Management/TestWebhookResponse.php +++ b/src/Adyen/Model/Management/TestWebhookResponse.php @@ -295,9 +295,6 @@ public function getData() */ public function setData($data) { - if (is_null($data)) { - throw new \InvalidArgumentException('non-nullable data cannot be null'); - } $this->container['data'] = $data; return $this; diff --git a/src/Adyen/Model/Management/Timeouts.php b/src/Adyen/Model/Management/Timeouts.php index 6c90ae099..299840329 100644 --- a/src/Adyen/Model/Management/Timeouts.php +++ b/src/Adyen/Model/Management/Timeouts.php @@ -295,7 +295,6 @@ public function getFromActiveToSleep() */ public function setFromActiveToSleep($fromActiveToSleep) { - // Do nothing for nullable integers $this->container['fromActiveToSleep'] = $fromActiveToSleep; return $this; diff --git a/src/Adyen/Model/Management/TransactionDescriptionInfo.php b/src/Adyen/Model/Management/TransactionDescriptionInfo.php index 75f8f578c..64624194f 100644 --- a/src/Adyen/Model/Management/TransactionDescriptionInfo.php +++ b/src/Adyen/Model/Management/TransactionDescriptionInfo.php @@ -327,9 +327,6 @@ public function getDoingBusinessAsName() */ public function setDoingBusinessAsName($doingBusinessAsName) { - if (is_null($doingBusinessAsName)) { - throw new \InvalidArgumentException('non-nullable doingBusinessAsName cannot be null'); - } $this->container['doingBusinessAsName'] = $doingBusinessAsName; return $this; @@ -354,9 +351,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/Management/TwintInfo.php b/src/Adyen/Model/Management/TwintInfo.php index 83f1cf480..3591c4d83 100644 --- a/src/Adyen/Model/Management/TwintInfo.php +++ b/src/Adyen/Model/Management/TwintInfo.php @@ -298,9 +298,6 @@ public function getLogo() */ public function setLogo($logo) { - if (is_null($logo)) { - throw new \InvalidArgumentException('non-nullable logo cannot be null'); - } $this->container['logo'] = $logo; return $this; diff --git a/src/Adyen/Model/Management/UninstallAndroidAppDetails.php b/src/Adyen/Model/Management/UninstallAndroidAppDetails.php index f0cb1b6ab..20e5e3db1 100644 --- a/src/Adyen/Model/Management/UninstallAndroidAppDetails.php +++ b/src/Adyen/Model/Management/UninstallAndroidAppDetails.php @@ -323,9 +323,6 @@ public function getAppId() */ public function setAppId($appId) { - if (is_null($appId)) { - throw new \InvalidArgumentException('non-nullable appId cannot be null'); - } $this->container['appId'] = $appId; return $this; @@ -350,9 +347,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/Management/UninstallAndroidCertificateDetails.php b/src/Adyen/Model/Management/UninstallAndroidCertificateDetails.php index cd0006b58..22a6c3599 100644 --- a/src/Adyen/Model/Management/UninstallAndroidCertificateDetails.php +++ b/src/Adyen/Model/Management/UninstallAndroidCertificateDetails.php @@ -323,9 +323,6 @@ public function getCertificateId() */ public function setCertificateId($certificateId) { - if (is_null($certificateId)) { - throw new \InvalidArgumentException('non-nullable certificateId cannot be null'); - } $this->container['certificateId'] = $certificateId; return $this; @@ -350,9 +347,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/Management/UpdatableAddress.php b/src/Adyen/Model/Management/UpdatableAddress.php index 3a63ab925..828766f78 100644 --- a/src/Adyen/Model/Management/UpdatableAddress.php +++ b/src/Adyen/Model/Management/UpdatableAddress.php @@ -330,9 +330,6 @@ public function getCity() */ public function setCity($city) { - if (is_null($city)) { - throw new \InvalidArgumentException('non-nullable city cannot be null'); - } $this->container['city'] = $city; return $this; @@ -357,9 +354,6 @@ public function getLine1() */ public function setLine1($line1) { - if (is_null($line1)) { - throw new \InvalidArgumentException('non-nullable line1 cannot be null'); - } $this->container['line1'] = $line1; return $this; @@ -384,9 +378,6 @@ public function getLine2() */ public function setLine2($line2) { - if (is_null($line2)) { - throw new \InvalidArgumentException('non-nullable line2 cannot be null'); - } $this->container['line2'] = $line2; return $this; @@ -411,9 +402,6 @@ public function getLine3() */ public function setLine3($line3) { - if (is_null($line3)) { - throw new \InvalidArgumentException('non-nullable line3 cannot be null'); - } $this->container['line3'] = $line3; return $this; @@ -438,9 +426,6 @@ public function getPostalCode() */ public function setPostalCode($postalCode) { - if (is_null($postalCode)) { - throw new \InvalidArgumentException('non-nullable postalCode cannot be null'); - } $this->container['postalCode'] = $postalCode; return $this; @@ -465,9 +450,6 @@ public function getStateOrProvince() */ public function setStateOrProvince($stateOrProvince) { - if (is_null($stateOrProvince)) { - throw new \InvalidArgumentException('non-nullable stateOrProvince cannot be null'); - } $this->container['stateOrProvince'] = $stateOrProvince; return $this; diff --git a/src/Adyen/Model/Management/UpdateCompanyApiCredentialRequest.php b/src/Adyen/Model/Management/UpdateCompanyApiCredentialRequest.php index 587fcca22..dff5eb02b 100644 --- a/src/Adyen/Model/Management/UpdateCompanyApiCredentialRequest.php +++ b/src/Adyen/Model/Management/UpdateCompanyApiCredentialRequest.php @@ -323,9 +323,6 @@ public function getActive() */ public function setActive($active) { - if (is_null($active)) { - throw new \InvalidArgumentException('non-nullable active cannot be null'); - } $this->container['active'] = $active; return $this; @@ -350,9 +347,6 @@ public function getAllowedOrigins() */ public function setAllowedOrigins($allowedOrigins) { - if (is_null($allowedOrigins)) { - throw new \InvalidArgumentException('non-nullable allowedOrigins cannot be null'); - } $this->container['allowedOrigins'] = $allowedOrigins; return $this; @@ -377,9 +371,6 @@ public function getAssociatedMerchantAccounts() */ public function setAssociatedMerchantAccounts($associatedMerchantAccounts) { - if (is_null($associatedMerchantAccounts)) { - throw new \InvalidArgumentException('non-nullable associatedMerchantAccounts cannot be null'); - } $this->container['associatedMerchantAccounts'] = $associatedMerchantAccounts; return $this; @@ -404,9 +395,6 @@ public function getDescription() */ public function setDescription($description) { - if (is_null($description)) { - throw new \InvalidArgumentException('non-nullable description cannot be null'); - } $this->container['description'] = $description; return $this; @@ -431,9 +419,6 @@ public function getRoles() */ public function setRoles($roles) { - if (is_null($roles)) { - throw new \InvalidArgumentException('non-nullable roles cannot be null'); - } $this->container['roles'] = $roles; return $this; diff --git a/src/Adyen/Model/Management/UpdateCompanyUserRequest.php b/src/Adyen/Model/Management/UpdateCompanyUserRequest.php index 4cc10f7f1..6dd7660ed 100644 --- a/src/Adyen/Model/Management/UpdateCompanyUserRequest.php +++ b/src/Adyen/Model/Management/UpdateCompanyUserRequest.php @@ -337,9 +337,6 @@ public function getAccountGroups() */ public function setAccountGroups($accountGroups) { - if (is_null($accountGroups)) { - throw new \InvalidArgumentException('non-nullable accountGroups cannot be null'); - } $this->container['accountGroups'] = $accountGroups; return $this; @@ -364,9 +361,6 @@ public function getActive() */ public function setActive($active) { - if (is_null($active)) { - throw new \InvalidArgumentException('non-nullable active cannot be null'); - } $this->container['active'] = $active; return $this; @@ -391,9 +385,6 @@ public function getAssociatedMerchantAccounts() */ public function setAssociatedMerchantAccounts($associatedMerchantAccounts) { - if (is_null($associatedMerchantAccounts)) { - throw new \InvalidArgumentException('non-nullable associatedMerchantAccounts cannot be null'); - } $this->container['associatedMerchantAccounts'] = $associatedMerchantAccounts; return $this; @@ -418,9 +409,6 @@ public function getEmail() */ public function setEmail($email) { - if (is_null($email)) { - throw new \InvalidArgumentException('non-nullable email cannot be null'); - } $this->container['email'] = $email; return $this; @@ -445,9 +433,6 @@ public function getName() */ public function setName($name) { - if (is_null($name)) { - throw new \InvalidArgumentException('non-nullable name cannot be null'); - } $this->container['name'] = $name; return $this; @@ -472,9 +457,6 @@ public function getRoles() */ public function setRoles($roles) { - if (is_null($roles)) { - throw new \InvalidArgumentException('non-nullable roles cannot be null'); - } $this->container['roles'] = $roles; return $this; @@ -499,9 +481,6 @@ public function getTimeZoneCode() */ public function setTimeZoneCode($timeZoneCode) { - if (is_null($timeZoneCode)) { - throw new \InvalidArgumentException('non-nullable timeZoneCode cannot be null'); - } $this->container['timeZoneCode'] = $timeZoneCode; return $this; diff --git a/src/Adyen/Model/Management/UpdateCompanyWebhookRequest.php b/src/Adyen/Model/Management/UpdateCompanyWebhookRequest.php index c6bef2e46..b83cb82da 100644 --- a/src/Adyen/Model/Management/UpdateCompanyWebhookRequest.php +++ b/src/Adyen/Model/Management/UpdateCompanyWebhookRequest.php @@ -491,9 +491,6 @@ public function getAcceptsExpiredCertificate() */ public function setAcceptsExpiredCertificate($acceptsExpiredCertificate) { - if (is_null($acceptsExpiredCertificate)) { - throw new \InvalidArgumentException('non-nullable acceptsExpiredCertificate cannot be null'); - } $this->container['acceptsExpiredCertificate'] = $acceptsExpiredCertificate; return $this; @@ -518,9 +515,6 @@ public function getAcceptsSelfSignedCertificate() */ public function setAcceptsSelfSignedCertificate($acceptsSelfSignedCertificate) { - if (is_null($acceptsSelfSignedCertificate)) { - throw new \InvalidArgumentException('non-nullable acceptsSelfSignedCertificate cannot be null'); - } $this->container['acceptsSelfSignedCertificate'] = $acceptsSelfSignedCertificate; return $this; @@ -545,9 +539,6 @@ public function getAcceptsUntrustedRootCertificate() */ public function setAcceptsUntrustedRootCertificate($acceptsUntrustedRootCertificate) { - if (is_null($acceptsUntrustedRootCertificate)) { - throw new \InvalidArgumentException('non-nullable acceptsUntrustedRootCertificate cannot be null'); - } $this->container['acceptsUntrustedRootCertificate'] = $acceptsUntrustedRootCertificate; return $this; @@ -572,9 +563,6 @@ public function getActive() */ public function setActive($active) { - if (is_null($active)) { - throw new \InvalidArgumentException('non-nullable active cannot be null'); - } $this->container['active'] = $active; return $this; @@ -599,9 +587,6 @@ public function getAdditionalSettings() */ public function setAdditionalSettings($additionalSettings) { - if (is_null($additionalSettings)) { - throw new \InvalidArgumentException('non-nullable additionalSettings cannot be null'); - } $this->container['additionalSettings'] = $additionalSettings; return $this; @@ -626,9 +611,6 @@ public function getCommunicationFormat() */ public function setCommunicationFormat($communicationFormat) { - if (is_null($communicationFormat)) { - throw new \InvalidArgumentException('non-nullable communicationFormat cannot be null'); - } $allowedValues = $this->getCommunicationFormatAllowableValues(); if (!in_array($communicationFormat, $allowedValues, true)) { throw new \InvalidArgumentException( @@ -663,9 +645,6 @@ public function getDescription() */ public function setDescription($description) { - if (is_null($description)) { - throw new \InvalidArgumentException('non-nullable description cannot be null'); - } $this->container['description'] = $description; return $this; @@ -690,9 +669,6 @@ public function getEncryptionProtocol() */ public function setEncryptionProtocol($encryptionProtocol) { - if (is_null($encryptionProtocol)) { - throw new \InvalidArgumentException('non-nullable encryptionProtocol cannot be null'); - } $allowedValues = $this->getEncryptionProtocolAllowableValues(); if (!in_array($encryptionProtocol, $allowedValues, true)) { throw new \InvalidArgumentException( @@ -727,9 +703,6 @@ public function getFilterMerchantAccountType() */ public function setFilterMerchantAccountType($filterMerchantAccountType) { - if (is_null($filterMerchantAccountType)) { - throw new \InvalidArgumentException('non-nullable filterMerchantAccountType cannot be null'); - } $allowedValues = $this->getFilterMerchantAccountTypeAllowableValues(); if (!in_array($filterMerchantAccountType, $allowedValues, true)) { throw new \InvalidArgumentException( @@ -764,9 +737,6 @@ public function getFilterMerchantAccounts() */ public function setFilterMerchantAccounts($filterMerchantAccounts) { - if (is_null($filterMerchantAccounts)) { - throw new \InvalidArgumentException('non-nullable filterMerchantAccounts cannot be null'); - } $this->container['filterMerchantAccounts'] = $filterMerchantAccounts; return $this; @@ -791,9 +761,6 @@ public function getNetworkType() */ public function setNetworkType($networkType) { - if (is_null($networkType)) { - throw new \InvalidArgumentException('non-nullable networkType cannot be null'); - } $allowedValues = $this->getNetworkTypeAllowableValues(); if (!in_array($networkType, $allowedValues, true)) { throw new \InvalidArgumentException( @@ -828,9 +795,6 @@ public function getPassword() */ public function setPassword($password) { - if (is_null($password)) { - throw new \InvalidArgumentException('non-nullable password cannot be null'); - } $this->container['password'] = $password; return $this; @@ -855,9 +819,6 @@ public function getPopulateSoapActionHeader() */ public function setPopulateSoapActionHeader($populateSoapActionHeader) { - if (is_null($populateSoapActionHeader)) { - throw new \InvalidArgumentException('non-nullable populateSoapActionHeader cannot be null'); - } $this->container['populateSoapActionHeader'] = $populateSoapActionHeader; return $this; @@ -882,9 +843,6 @@ public function getUrl() */ public function setUrl($url) { - if (is_null($url)) { - throw new \InvalidArgumentException('non-nullable url cannot be null'); - } $this->container['url'] = $url; return $this; @@ -909,9 +867,6 @@ public function getUsername() */ public function setUsername($username) { - if (is_null($username)) { - throw new \InvalidArgumentException('non-nullable username cannot be null'); - } $this->container['username'] = $username; return $this; diff --git a/src/Adyen/Model/Management/UpdateMerchantApiCredentialRequest.php b/src/Adyen/Model/Management/UpdateMerchantApiCredentialRequest.php index d89b7c791..a35eebf25 100644 --- a/src/Adyen/Model/Management/UpdateMerchantApiCredentialRequest.php +++ b/src/Adyen/Model/Management/UpdateMerchantApiCredentialRequest.php @@ -316,9 +316,6 @@ public function getActive() */ public function setActive($active) { - if (is_null($active)) { - throw new \InvalidArgumentException('non-nullable active cannot be null'); - } $this->container['active'] = $active; return $this; @@ -343,9 +340,6 @@ public function getAllowedOrigins() */ public function setAllowedOrigins($allowedOrigins) { - if (is_null($allowedOrigins)) { - throw new \InvalidArgumentException('non-nullable allowedOrigins cannot be null'); - } $this->container['allowedOrigins'] = $allowedOrigins; return $this; @@ -370,9 +364,6 @@ public function getDescription() */ public function setDescription($description) { - if (is_null($description)) { - throw new \InvalidArgumentException('non-nullable description cannot be null'); - } $this->container['description'] = $description; return $this; @@ -397,9 +388,6 @@ public function getRoles() */ public function setRoles($roles) { - if (is_null($roles)) { - throw new \InvalidArgumentException('non-nullable roles cannot be null'); - } $this->container['roles'] = $roles; return $this; diff --git a/src/Adyen/Model/Management/UpdateMerchantUserRequest.php b/src/Adyen/Model/Management/UpdateMerchantUserRequest.php index 82684b887..33b8fd3fa 100644 --- a/src/Adyen/Model/Management/UpdateMerchantUserRequest.php +++ b/src/Adyen/Model/Management/UpdateMerchantUserRequest.php @@ -330,9 +330,6 @@ public function getAccountGroups() */ public function setAccountGroups($accountGroups) { - if (is_null($accountGroups)) { - throw new \InvalidArgumentException('non-nullable accountGroups cannot be null'); - } $this->container['accountGroups'] = $accountGroups; return $this; @@ -357,9 +354,6 @@ public function getActive() */ public function setActive($active) { - if (is_null($active)) { - throw new \InvalidArgumentException('non-nullable active cannot be null'); - } $this->container['active'] = $active; return $this; @@ -384,9 +378,6 @@ public function getEmail() */ public function setEmail($email) { - if (is_null($email)) { - throw new \InvalidArgumentException('non-nullable email cannot be null'); - } $this->container['email'] = $email; return $this; @@ -411,9 +402,6 @@ public function getName() */ public function setName($name) { - if (is_null($name)) { - throw new \InvalidArgumentException('non-nullable name cannot be null'); - } $this->container['name'] = $name; return $this; @@ -438,9 +426,6 @@ public function getRoles() */ public function setRoles($roles) { - if (is_null($roles)) { - throw new \InvalidArgumentException('non-nullable roles cannot be null'); - } $this->container['roles'] = $roles; return $this; @@ -465,9 +450,6 @@ public function getTimeZoneCode() */ public function setTimeZoneCode($timeZoneCode) { - if (is_null($timeZoneCode)) { - throw new \InvalidArgumentException('non-nullable timeZoneCode cannot be null'); - } $this->container['timeZoneCode'] = $timeZoneCode; return $this; diff --git a/src/Adyen/Model/Management/UpdateMerchantWebhookRequest.php b/src/Adyen/Model/Management/UpdateMerchantWebhookRequest.php index 07b8f6b2d..c347171db 100644 --- a/src/Adyen/Model/Management/UpdateMerchantWebhookRequest.php +++ b/src/Adyen/Model/Management/UpdateMerchantWebhookRequest.php @@ -452,9 +452,6 @@ public function getAcceptsExpiredCertificate() */ public function setAcceptsExpiredCertificate($acceptsExpiredCertificate) { - if (is_null($acceptsExpiredCertificate)) { - throw new \InvalidArgumentException('non-nullable acceptsExpiredCertificate cannot be null'); - } $this->container['acceptsExpiredCertificate'] = $acceptsExpiredCertificate; return $this; @@ -479,9 +476,6 @@ public function getAcceptsSelfSignedCertificate() */ public function setAcceptsSelfSignedCertificate($acceptsSelfSignedCertificate) { - if (is_null($acceptsSelfSignedCertificate)) { - throw new \InvalidArgumentException('non-nullable acceptsSelfSignedCertificate cannot be null'); - } $this->container['acceptsSelfSignedCertificate'] = $acceptsSelfSignedCertificate; return $this; @@ -506,9 +500,6 @@ public function getAcceptsUntrustedRootCertificate() */ public function setAcceptsUntrustedRootCertificate($acceptsUntrustedRootCertificate) { - if (is_null($acceptsUntrustedRootCertificate)) { - throw new \InvalidArgumentException('non-nullable acceptsUntrustedRootCertificate cannot be null'); - } $this->container['acceptsUntrustedRootCertificate'] = $acceptsUntrustedRootCertificate; return $this; @@ -533,9 +524,6 @@ public function getActive() */ public function setActive($active) { - if (is_null($active)) { - throw new \InvalidArgumentException('non-nullable active cannot be null'); - } $this->container['active'] = $active; return $this; @@ -560,9 +548,6 @@ public function getAdditionalSettings() */ public function setAdditionalSettings($additionalSettings) { - if (is_null($additionalSettings)) { - throw new \InvalidArgumentException('non-nullable additionalSettings cannot be null'); - } $this->container['additionalSettings'] = $additionalSettings; return $this; @@ -587,9 +572,6 @@ public function getCommunicationFormat() */ public function setCommunicationFormat($communicationFormat) { - if (is_null($communicationFormat)) { - throw new \InvalidArgumentException('non-nullable communicationFormat cannot be null'); - } $allowedValues = $this->getCommunicationFormatAllowableValues(); if (!in_array($communicationFormat, $allowedValues, true)) { throw new \InvalidArgumentException( @@ -624,9 +606,6 @@ public function getDescription() */ public function setDescription($description) { - if (is_null($description)) { - throw new \InvalidArgumentException('non-nullable description cannot be null'); - } $this->container['description'] = $description; return $this; @@ -651,9 +630,6 @@ public function getEncryptionProtocol() */ public function setEncryptionProtocol($encryptionProtocol) { - if (is_null($encryptionProtocol)) { - throw new \InvalidArgumentException('non-nullable encryptionProtocol cannot be null'); - } $allowedValues = $this->getEncryptionProtocolAllowableValues(); if (!in_array($encryptionProtocol, $allowedValues, true)) { throw new \InvalidArgumentException( @@ -688,9 +664,6 @@ public function getNetworkType() */ public function setNetworkType($networkType) { - if (is_null($networkType)) { - throw new \InvalidArgumentException('non-nullable networkType cannot be null'); - } $allowedValues = $this->getNetworkTypeAllowableValues(); if (!in_array($networkType, $allowedValues, true)) { throw new \InvalidArgumentException( @@ -725,9 +698,6 @@ public function getPassword() */ public function setPassword($password) { - if (is_null($password)) { - throw new \InvalidArgumentException('non-nullable password cannot be null'); - } $this->container['password'] = $password; return $this; @@ -752,9 +722,6 @@ public function getPopulateSoapActionHeader() */ public function setPopulateSoapActionHeader($populateSoapActionHeader) { - if (is_null($populateSoapActionHeader)) { - throw new \InvalidArgumentException('non-nullable populateSoapActionHeader cannot be null'); - } $this->container['populateSoapActionHeader'] = $populateSoapActionHeader; return $this; @@ -779,9 +746,6 @@ public function getUrl() */ public function setUrl($url) { - if (is_null($url)) { - throw new \InvalidArgumentException('non-nullable url cannot be null'); - } $this->container['url'] = $url; return $this; @@ -806,9 +770,6 @@ public function getUsername() */ public function setUsername($username) { - if (is_null($username)) { - throw new \InvalidArgumentException('non-nullable username cannot be null'); - } $this->container['username'] = $username; return $this; diff --git a/src/Adyen/Model/Management/UpdatePaymentMethodInfo.php b/src/Adyen/Model/Management/UpdatePaymentMethodInfo.php index 5ac3c3c5b..87212bf5b 100644 --- a/src/Adyen/Model/Management/UpdatePaymentMethodInfo.php +++ b/src/Adyen/Model/Management/UpdatePaymentMethodInfo.php @@ -414,9 +414,6 @@ public function getBcmc() */ public function setBcmc($bcmc) { - if (is_null($bcmc)) { - throw new \InvalidArgumentException('non-nullable bcmc cannot be null'); - } $this->container['bcmc'] = $bcmc; return $this; @@ -441,9 +438,6 @@ public function getCartesBancaires() */ public function setCartesBancaires($cartesBancaires) { - if (is_null($cartesBancaires)) { - throw new \InvalidArgumentException('non-nullable cartesBancaires cannot be null'); - } $this->container['cartesBancaires'] = $cartesBancaires; return $this; @@ -468,9 +462,6 @@ public function getCountries() */ public function setCountries($countries) { - if (is_null($countries)) { - throw new \InvalidArgumentException('non-nullable countries cannot be null'); - } $this->container['countries'] = $countries; return $this; @@ -495,9 +486,6 @@ public function getCup() */ public function setCup($cup) { - if (is_null($cup)) { - throw new \InvalidArgumentException('non-nullable cup cannot be null'); - } $this->container['cup'] = $cup; return $this; @@ -522,9 +510,6 @@ public function getCurrencies() */ public function setCurrencies($currencies) { - if (is_null($currencies)) { - throw new \InvalidArgumentException('non-nullable currencies cannot be null'); - } $this->container['currencies'] = $currencies; return $this; @@ -549,9 +534,6 @@ public function getCustomRoutingFlags() */ public function setCustomRoutingFlags($customRoutingFlags) { - if (is_null($customRoutingFlags)) { - throw new \InvalidArgumentException('non-nullable customRoutingFlags cannot be null'); - } $this->container['customRoutingFlags'] = $customRoutingFlags; return $this; @@ -576,9 +558,6 @@ public function getDiners() */ public function setDiners($diners) { - if (is_null($diners)) { - throw new \InvalidArgumentException('non-nullable diners cannot be null'); - } $this->container['diners'] = $diners; return $this; @@ -603,9 +582,6 @@ public function getDiscover() */ public function setDiscover($discover) { - if (is_null($discover)) { - throw new \InvalidArgumentException('non-nullable discover cannot be null'); - } $this->container['discover'] = $discover; return $this; @@ -630,9 +606,6 @@ public function getEftposAustralia() */ public function setEftposAustralia($eftposAustralia) { - if (is_null($eftposAustralia)) { - throw new \InvalidArgumentException('non-nullable eftposAustralia cannot be null'); - } $this->container['eftposAustralia'] = $eftposAustralia; return $this; @@ -657,9 +630,6 @@ public function getEnabled() */ public function setEnabled($enabled) { - if (is_null($enabled)) { - throw new \InvalidArgumentException('non-nullable enabled cannot be null'); - } $this->container['enabled'] = $enabled; return $this; @@ -684,9 +654,6 @@ public function getGirocard() */ public function setGirocard($girocard) { - if (is_null($girocard)) { - throw new \InvalidArgumentException('non-nullable girocard cannot be null'); - } $this->container['girocard'] = $girocard; return $this; @@ -711,9 +678,6 @@ public function getIdeal() */ public function setIdeal($ideal) { - if (is_null($ideal)) { - throw new \InvalidArgumentException('non-nullable ideal cannot be null'); - } $this->container['ideal'] = $ideal; return $this; @@ -738,9 +702,6 @@ public function getInteracCard() */ public function setInteracCard($interacCard) { - if (is_null($interacCard)) { - throw new \InvalidArgumentException('non-nullable interacCard cannot be null'); - } $this->container['interacCard'] = $interacCard; return $this; @@ -765,9 +726,6 @@ public function getJcb() */ public function setJcb($jcb) { - if (is_null($jcb)) { - throw new \InvalidArgumentException('non-nullable jcb cannot be null'); - } $this->container['jcb'] = $jcb; return $this; @@ -792,9 +750,6 @@ public function getMaestro() */ public function setMaestro($maestro) { - if (is_null($maestro)) { - throw new \InvalidArgumentException('non-nullable maestro cannot be null'); - } $this->container['maestro'] = $maestro; return $this; @@ -819,9 +774,6 @@ public function getMc() */ public function setMc($mc) { - if (is_null($mc)) { - throw new \InvalidArgumentException('non-nullable mc cannot be null'); - } $this->container['mc'] = $mc; return $this; @@ -846,9 +798,6 @@ public function getStoreIds() */ public function setStoreIds($storeIds) { - if (is_null($storeIds)) { - throw new \InvalidArgumentException('non-nullable storeIds cannot be null'); - } $this->container['storeIds'] = $storeIds; return $this; @@ -873,9 +822,6 @@ public function getVisa() */ public function setVisa($visa) { - if (is_null($visa)) { - throw new \InvalidArgumentException('non-nullable visa cannot be null'); - } $this->container['visa'] = $visa; return $this; diff --git a/src/Adyen/Model/Management/UpdatePayoutSettingsRequest.php b/src/Adyen/Model/Management/UpdatePayoutSettingsRequest.php index 3e4cf5a75..0370326ec 100644 --- a/src/Adyen/Model/Management/UpdatePayoutSettingsRequest.php +++ b/src/Adyen/Model/Management/UpdatePayoutSettingsRequest.php @@ -295,9 +295,6 @@ public function getEnabled() */ public function setEnabled($enabled) { - if (is_null($enabled)) { - throw new \InvalidArgumentException('non-nullable enabled cannot be null'); - } $this->container['enabled'] = $enabled; return $this; diff --git a/src/Adyen/Model/Management/UpdateSplitConfigurationLogicRequest.php b/src/Adyen/Model/Management/UpdateSplitConfigurationLogicRequest.php index 53cbcc7ed..a7f91274b 100644 --- a/src/Adyen/Model/Management/UpdateSplitConfigurationLogicRequest.php +++ b/src/Adyen/Model/Management/UpdateSplitConfigurationLogicRequest.php @@ -736,9 +736,6 @@ public function getAcquiringFees() */ public function setAcquiringFees($acquiringFees) { - if (is_null($acquiringFees)) { - throw new \InvalidArgumentException('non-nullable acquiringFees cannot be null'); - } $allowedValues = $this->getAcquiringFeesAllowableValues(); if (!in_array($acquiringFees, $allowedValues, true)) { throw new \InvalidArgumentException( @@ -773,9 +770,6 @@ public function getAdditionalCommission() */ public function setAdditionalCommission($additionalCommission) { - if (is_null($additionalCommission)) { - throw new \InvalidArgumentException('non-nullable additionalCommission cannot be null'); - } $this->container['additionalCommission'] = $additionalCommission; return $this; @@ -800,9 +794,6 @@ public function getAdyenCommission() */ public function setAdyenCommission($adyenCommission) { - if (is_null($adyenCommission)) { - throw new \InvalidArgumentException('non-nullable adyenCommission cannot be null'); - } $allowedValues = $this->getAdyenCommissionAllowableValues(); if (!in_array($adyenCommission, $allowedValues, true)) { throw new \InvalidArgumentException( @@ -837,9 +828,6 @@ public function getAdyenFees() */ public function setAdyenFees($adyenFees) { - if (is_null($adyenFees)) { - throw new \InvalidArgumentException('non-nullable adyenFees cannot be null'); - } $allowedValues = $this->getAdyenFeesAllowableValues(); if (!in_array($adyenFees, $allowedValues, true)) { throw new \InvalidArgumentException( @@ -874,9 +862,6 @@ public function getAdyenMarkup() */ public function setAdyenMarkup($adyenMarkup) { - if (is_null($adyenMarkup)) { - throw new \InvalidArgumentException('non-nullable adyenMarkup cannot be null'); - } $allowedValues = $this->getAdyenMarkupAllowableValues(); if (!in_array($adyenMarkup, $allowedValues, true)) { throw new \InvalidArgumentException( @@ -911,9 +896,6 @@ public function getChargeback() */ public function setChargeback($chargeback) { - if (is_null($chargeback)) { - throw new \InvalidArgumentException('non-nullable chargeback cannot be null'); - } $allowedValues = $this->getChargebackAllowableValues(); if (!in_array($chargeback, $allowedValues, true)) { throw new \InvalidArgumentException( @@ -948,9 +930,6 @@ public function getChargebackCostAllocation() */ public function setChargebackCostAllocation($chargebackCostAllocation) { - if (is_null($chargebackCostAllocation)) { - throw new \InvalidArgumentException('non-nullable chargebackCostAllocation cannot be null'); - } $allowedValues = $this->getChargebackCostAllocationAllowableValues(); if (!in_array($chargebackCostAllocation, $allowedValues, true)) { throw new \InvalidArgumentException( @@ -985,9 +964,6 @@ public function getCommission() */ public function setCommission($commission) { - if (is_null($commission)) { - throw new \InvalidArgumentException('non-nullable commission cannot be null'); - } $this->container['commission'] = $commission; return $this; @@ -1012,9 +988,6 @@ public function getInterchange() */ public function setInterchange($interchange) { - if (is_null($interchange)) { - throw new \InvalidArgumentException('non-nullable interchange cannot be null'); - } $allowedValues = $this->getInterchangeAllowableValues(); if (!in_array($interchange, $allowedValues, true)) { throw new \InvalidArgumentException( @@ -1049,9 +1022,6 @@ public function getPaymentFee() */ public function setPaymentFee($paymentFee) { - if (is_null($paymentFee)) { - throw new \InvalidArgumentException('non-nullable paymentFee cannot be null'); - } $allowedValues = $this->getPaymentFeeAllowableValues(); if (!in_array($paymentFee, $allowedValues, true)) { throw new \InvalidArgumentException( @@ -1086,9 +1056,6 @@ public function getRefund() */ public function setRefund($refund) { - if (is_null($refund)) { - throw new \InvalidArgumentException('non-nullable refund cannot be null'); - } $allowedValues = $this->getRefundAllowableValues(); if (!in_array($refund, $allowedValues, true)) { throw new \InvalidArgumentException( @@ -1123,9 +1090,6 @@ public function getRefundCostAllocation() */ public function setRefundCostAllocation($refundCostAllocation) { - if (is_null($refundCostAllocation)) { - throw new \InvalidArgumentException('non-nullable refundCostAllocation cannot be null'); - } $allowedValues = $this->getRefundCostAllocationAllowableValues(); if (!in_array($refundCostAllocation, $allowedValues, true)) { throw new \InvalidArgumentException( @@ -1160,9 +1124,6 @@ public function getRemainder() */ public function setRemainder($remainder) { - if (is_null($remainder)) { - throw new \InvalidArgumentException('non-nullable remainder cannot be null'); - } $allowedValues = $this->getRemainderAllowableValues(); if (!in_array($remainder, $allowedValues, true)) { throw new \InvalidArgumentException( @@ -1197,9 +1158,6 @@ public function getSchemeFee() */ public function setSchemeFee($schemeFee) { - if (is_null($schemeFee)) { - throw new \InvalidArgumentException('non-nullable schemeFee cannot be null'); - } $allowedValues = $this->getSchemeFeeAllowableValues(); if (!in_array($schemeFee, $allowedValues, true)) { throw new \InvalidArgumentException( @@ -1234,9 +1192,6 @@ public function getSplitLogicId() */ public function setSplitLogicId($splitLogicId) { - if (is_null($splitLogicId)) { - throw new \InvalidArgumentException('non-nullable splitLogicId cannot be null'); - } $this->container['splitLogicId'] = $splitLogicId; return $this; @@ -1261,9 +1216,6 @@ public function getSurcharge() */ public function setSurcharge($surcharge) { - if (is_null($surcharge)) { - throw new \InvalidArgumentException('non-nullable surcharge cannot be null'); - } $allowedValues = $this->getSurchargeAllowableValues(); if (!in_array($surcharge, $allowedValues, true)) { throw new \InvalidArgumentException( @@ -1298,9 +1250,6 @@ public function getTip() */ public function setTip($tip) { - if (is_null($tip)) { - throw new \InvalidArgumentException('non-nullable tip cannot be null'); - } $allowedValues = $this->getTipAllowableValues(); if (!in_array($tip, $allowedValues, true)) { throw new \InvalidArgumentException( diff --git a/src/Adyen/Model/Management/UpdateSplitConfigurationRequest.php b/src/Adyen/Model/Management/UpdateSplitConfigurationRequest.php index ac6d4625e..7656cfa76 100644 --- a/src/Adyen/Model/Management/UpdateSplitConfigurationRequest.php +++ b/src/Adyen/Model/Management/UpdateSplitConfigurationRequest.php @@ -298,9 +298,6 @@ public function getDescription() */ public function setDescription($description) { - if (is_null($description)) { - throw new \InvalidArgumentException('non-nullable description cannot be null'); - } $this->container['description'] = $description; return $this; diff --git a/src/Adyen/Model/Management/UpdateSplitConfigurationRuleRequest.php b/src/Adyen/Model/Management/UpdateSplitConfigurationRuleRequest.php index ae79fbb0d..ef5715562 100644 --- a/src/Adyen/Model/Management/UpdateSplitConfigurationRuleRequest.php +++ b/src/Adyen/Model/Management/UpdateSplitConfigurationRuleRequest.php @@ -325,9 +325,6 @@ public function getCurrency() */ public function setCurrency($currency) { - if (is_null($currency)) { - throw new \InvalidArgumentException('non-nullable currency cannot be null'); - } $this->container['currency'] = $currency; return $this; @@ -352,9 +349,6 @@ public function getFundingSource() */ public function setFundingSource($fundingSource) { - if (is_null($fundingSource)) { - throw new \InvalidArgumentException('non-nullable fundingSource cannot be null'); - } $this->container['fundingSource'] = $fundingSource; return $this; @@ -379,9 +373,6 @@ public function getPaymentMethod() */ public function setPaymentMethod($paymentMethod) { - if (is_null($paymentMethod)) { - throw new \InvalidArgumentException('non-nullable paymentMethod cannot be null'); - } $this->container['paymentMethod'] = $paymentMethod; return $this; @@ -406,9 +397,6 @@ public function getShopperInteraction() */ public function setShopperInteraction($shopperInteraction) { - if (is_null($shopperInteraction)) { - throw new \InvalidArgumentException('non-nullable shopperInteraction cannot be null'); - } $this->container['shopperInteraction'] = $shopperInteraction; return $this; diff --git a/src/Adyen/Model/Management/UpdateStoreRequest.php b/src/Adyen/Model/Management/UpdateStoreRequest.php index 690a19029..7ed98dddd 100644 --- a/src/Adyen/Model/Management/UpdateStoreRequest.php +++ b/src/Adyen/Model/Management/UpdateStoreRequest.php @@ -362,9 +362,6 @@ public function getAddress() */ public function setAddress($address) { - if (is_null($address)) { - throw new \InvalidArgumentException('non-nullable address cannot be null'); - } $this->container['address'] = $address; return $this; @@ -389,9 +386,6 @@ public function getBusinessLineIds() */ public function setBusinessLineIds($businessLineIds) { - if (is_null($businessLineIds)) { - throw new \InvalidArgumentException('non-nullable businessLineIds cannot be null'); - } $this->container['businessLineIds'] = $businessLineIds; return $this; @@ -416,9 +410,6 @@ public function getDescription() */ public function setDescription($description) { - if (is_null($description)) { - throw new \InvalidArgumentException('non-nullable description cannot be null'); - } $this->container['description'] = $description; return $this; @@ -443,9 +434,6 @@ public function getExternalReferenceId() */ public function setExternalReferenceId($externalReferenceId) { - if (is_null($externalReferenceId)) { - throw new \InvalidArgumentException('non-nullable externalReferenceId cannot be null'); - } $this->container['externalReferenceId'] = $externalReferenceId; return $this; @@ -470,9 +458,6 @@ public function getPhoneNumber() */ public function setPhoneNumber($phoneNumber) { - if (is_null($phoneNumber)) { - throw new \InvalidArgumentException('non-nullable phoneNumber cannot be null'); - } $this->container['phoneNumber'] = $phoneNumber; return $this; @@ -497,9 +482,6 @@ public function getSplitConfiguration() */ public function setSplitConfiguration($splitConfiguration) { - if (is_null($splitConfiguration)) { - throw new \InvalidArgumentException('non-nullable splitConfiguration cannot be null'); - } $this->container['splitConfiguration'] = $splitConfiguration; return $this; @@ -524,9 +506,6 @@ public function getStatus() */ 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( diff --git a/src/Adyen/Model/Management/UploadAndroidAppResponse.php b/src/Adyen/Model/Management/UploadAndroidAppResponse.php index 2b47d968f..0f215abdd 100644 --- a/src/Adyen/Model/Management/UploadAndroidAppResponse.php +++ b/src/Adyen/Model/Management/UploadAndroidAppResponse.php @@ -295,9 +295,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; diff --git a/src/Adyen/Model/Management/UploadAndroidCertificateResponse.php b/src/Adyen/Model/Management/UploadAndroidCertificateResponse.php index 0cabf556b..9a51f3e33 100644 --- a/src/Adyen/Model/Management/UploadAndroidCertificateResponse.php +++ b/src/Adyen/Model/Management/UploadAndroidCertificateResponse.php @@ -295,9 +295,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; diff --git a/src/Adyen/Model/Management/Url.php b/src/Adyen/Model/Management/Url.php index 2f4f82215..1a453ca07 100644 --- a/src/Adyen/Model/Management/Url.php +++ b/src/Adyen/Model/Management/Url.php @@ -316,9 +316,6 @@ public function getEncrypted() */ public function setEncrypted($encrypted) { - if (is_null($encrypted)) { - throw new \InvalidArgumentException('non-nullable encrypted cannot be null'); - } $this->container['encrypted'] = $encrypted; return $this; @@ -343,9 +340,6 @@ public function getPassword() */ public function setPassword($password) { - if (is_null($password)) { - throw new \InvalidArgumentException('non-nullable password cannot be null'); - } $this->container['password'] = $password; return $this; @@ -370,9 +364,6 @@ public function getUrl() */ public function setUrl($url) { - if (is_null($url)) { - throw new \InvalidArgumentException('non-nullable url cannot be null'); - } $this->container['url'] = $url; return $this; @@ -397,9 +388,6 @@ public function getUsername() */ public function setUsername($username) { - if (is_null($username)) { - throw new \InvalidArgumentException('non-nullable username cannot be null'); - } $this->container['username'] = $username; return $this; diff --git a/src/Adyen/Model/Management/User.php b/src/Adyen/Model/Management/User.php index 6f74aba9a..0728f1e18 100644 --- a/src/Adyen/Model/Management/User.php +++ b/src/Adyen/Model/Management/User.php @@ -373,9 +373,6 @@ public function getLinks() */ public function setLinks($links) { - if (is_null($links)) { - throw new \InvalidArgumentException('non-nullable links cannot be null'); - } $this->container['links'] = $links; return $this; @@ -400,9 +397,6 @@ public function getAccountGroups() */ public function setAccountGroups($accountGroups) { - if (is_null($accountGroups)) { - throw new \InvalidArgumentException('non-nullable accountGroups cannot be null'); - } $this->container['accountGroups'] = $accountGroups; return $this; @@ -427,9 +421,6 @@ public function getActive() */ public function setActive($active) { - if (is_null($active)) { - throw new \InvalidArgumentException('non-nullable active cannot be null'); - } $this->container['active'] = $active; return $this; @@ -454,9 +445,6 @@ public function getApps() */ public function setApps($apps) { - if (is_null($apps)) { - throw new \InvalidArgumentException('non-nullable apps cannot be null'); - } $this->container['apps'] = $apps; return $this; @@ -481,9 +469,6 @@ public function getEmail() */ public function setEmail($email) { - if (is_null($email)) { - throw new \InvalidArgumentException('non-nullable email cannot be null'); - } $this->container['email'] = $email; return $this; @@ -508,9 +493,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -535,9 +517,6 @@ public function getName() */ public function setName($name) { - if (is_null($name)) { - throw new \InvalidArgumentException('non-nullable name cannot be null'); - } $this->container['name'] = $name; return $this; @@ -562,9 +541,6 @@ public function getRoles() */ public function setRoles($roles) { - if (is_null($roles)) { - throw new \InvalidArgumentException('non-nullable roles cannot be null'); - } $this->container['roles'] = $roles; return $this; @@ -589,9 +565,6 @@ public function getTimeZoneCode() */ public function setTimeZoneCode($timeZoneCode) { - if (is_null($timeZoneCode)) { - throw new \InvalidArgumentException('non-nullable timeZoneCode cannot be null'); - } $this->container['timeZoneCode'] = $timeZoneCode; return $this; @@ -616,9 +589,6 @@ public function getUsername() */ public function setUsername($username) { - if (is_null($username)) { - throw new \InvalidArgumentException('non-nullable username cannot be null'); - } $this->container['username'] = $username; return $this; diff --git a/src/Adyen/Model/Management/VippsInfo.php b/src/Adyen/Model/Management/VippsInfo.php index 5ee851da2..896a23ea0 100644 --- a/src/Adyen/Model/Management/VippsInfo.php +++ b/src/Adyen/Model/Management/VippsInfo.php @@ -305,9 +305,6 @@ public function getLogo() */ public function setLogo($logo) { - if (is_null($logo)) { - throw new \InvalidArgumentException('non-nullable logo cannot be null'); - } $this->container['logo'] = $logo; return $this; @@ -332,9 +329,6 @@ public function getSubscriptionCancelUrl() */ public function setSubscriptionCancelUrl($subscriptionCancelUrl) { - if (is_null($subscriptionCancelUrl)) { - throw new \InvalidArgumentException('non-nullable subscriptionCancelUrl cannot be null'); - } $this->container['subscriptionCancelUrl'] = $subscriptionCancelUrl; return $this; diff --git a/src/Adyen/Model/Management/WeChatPayInfo.php b/src/Adyen/Model/Management/WeChatPayInfo.php index b99d7372d..0f8b260d3 100644 --- a/src/Adyen/Model/Management/WeChatPayInfo.php +++ b/src/Adyen/Model/Management/WeChatPayInfo.php @@ -308,9 +308,6 @@ public function getContactPersonName() */ public function setContactPersonName($contactPersonName) { - if (is_null($contactPersonName)) { - throw new \InvalidArgumentException('non-nullable contactPersonName cannot be null'); - } $this->container['contactPersonName'] = $contactPersonName; return $this; @@ -335,9 +332,6 @@ public function getEmail() */ public function setEmail($email) { - if (is_null($email)) { - throw new \InvalidArgumentException('non-nullable email cannot be null'); - } $this->container['email'] = $email; return $this; diff --git a/src/Adyen/Model/Management/WeChatPayPosInfo.php b/src/Adyen/Model/Management/WeChatPayPosInfo.php index 07023029b..f19d0b407 100644 --- a/src/Adyen/Model/Management/WeChatPayPosInfo.php +++ b/src/Adyen/Model/Management/WeChatPayPosInfo.php @@ -308,9 +308,6 @@ public function getContactPersonName() */ public function setContactPersonName($contactPersonName) { - if (is_null($contactPersonName)) { - throw new \InvalidArgumentException('non-nullable contactPersonName cannot be null'); - } $this->container['contactPersonName'] = $contactPersonName; return $this; @@ -335,9 +332,6 @@ public function getEmail() */ public function setEmail($email) { - if (is_null($email)) { - throw new \InvalidArgumentException('non-nullable email cannot be null'); - } $this->container['email'] = $email; return $this; diff --git a/src/Adyen/Model/Management/Webhook.php b/src/Adyen/Model/Management/Webhook.php index ebfa2a159..0fc4e71e1 100644 --- a/src/Adyen/Model/Management/Webhook.php +++ b/src/Adyen/Model/Management/Webhook.php @@ -552,9 +552,6 @@ public function getLinks() */ public function setLinks($links) { - if (is_null($links)) { - throw new \InvalidArgumentException('non-nullable links cannot be null'); - } $this->container['links'] = $links; return $this; @@ -579,9 +576,6 @@ public function getAcceptsExpiredCertificate() */ public function setAcceptsExpiredCertificate($acceptsExpiredCertificate) { - if (is_null($acceptsExpiredCertificate)) { - throw new \InvalidArgumentException('non-nullable acceptsExpiredCertificate cannot be null'); - } $this->container['acceptsExpiredCertificate'] = $acceptsExpiredCertificate; return $this; @@ -606,9 +600,6 @@ public function getAcceptsSelfSignedCertificate() */ public function setAcceptsSelfSignedCertificate($acceptsSelfSignedCertificate) { - if (is_null($acceptsSelfSignedCertificate)) { - throw new \InvalidArgumentException('non-nullable acceptsSelfSignedCertificate cannot be null'); - } $this->container['acceptsSelfSignedCertificate'] = $acceptsSelfSignedCertificate; return $this; @@ -633,9 +624,6 @@ public function getAcceptsUntrustedRootCertificate() */ public function setAcceptsUntrustedRootCertificate($acceptsUntrustedRootCertificate) { - if (is_null($acceptsUntrustedRootCertificate)) { - throw new \InvalidArgumentException('non-nullable acceptsUntrustedRootCertificate cannot be null'); - } $this->container['acceptsUntrustedRootCertificate'] = $acceptsUntrustedRootCertificate; return $this; @@ -660,9 +648,6 @@ public function getAccountReference() */ public function setAccountReference($accountReference) { - if (is_null($accountReference)) { - throw new \InvalidArgumentException('non-nullable accountReference cannot be null'); - } $this->container['accountReference'] = $accountReference; return $this; @@ -687,9 +672,6 @@ public function getActive() */ public function setActive($active) { - if (is_null($active)) { - throw new \InvalidArgumentException('non-nullable active cannot be null'); - } $this->container['active'] = $active; return $this; @@ -714,9 +696,6 @@ public function getAdditionalSettings() */ public function setAdditionalSettings($additionalSettings) { - if (is_null($additionalSettings)) { - throw new \InvalidArgumentException('non-nullable additionalSettings cannot be null'); - } $this->container['additionalSettings'] = $additionalSettings; return $this; @@ -741,9 +720,6 @@ public function getCertificateAlias() */ public function setCertificateAlias($certificateAlias) { - if (is_null($certificateAlias)) { - throw new \InvalidArgumentException('non-nullable certificateAlias cannot be null'); - } $this->container['certificateAlias'] = $certificateAlias; return $this; @@ -768,9 +744,6 @@ public function getCommunicationFormat() */ public function setCommunicationFormat($communicationFormat) { - if (is_null($communicationFormat)) { - throw new \InvalidArgumentException('non-nullable communicationFormat cannot be null'); - } $allowedValues = $this->getCommunicationFormatAllowableValues(); if (!in_array($communicationFormat, $allowedValues, true)) { throw new \InvalidArgumentException( @@ -805,9 +778,6 @@ public function getDescription() */ public function setDescription($description) { - if (is_null($description)) { - throw new \InvalidArgumentException('non-nullable description cannot be null'); - } $this->container['description'] = $description; return $this; @@ -832,9 +802,6 @@ public function getEncryptionProtocol() */ public function setEncryptionProtocol($encryptionProtocol) { - if (is_null($encryptionProtocol)) { - throw new \InvalidArgumentException('non-nullable encryptionProtocol cannot be null'); - } $allowedValues = $this->getEncryptionProtocolAllowableValues(); if (!in_array($encryptionProtocol, $allowedValues, true)) { throw new \InvalidArgumentException( @@ -869,9 +836,6 @@ public function getFilterMerchantAccountType() */ public function setFilterMerchantAccountType($filterMerchantAccountType) { - if (is_null($filterMerchantAccountType)) { - throw new \InvalidArgumentException('non-nullable filterMerchantAccountType cannot be null'); - } $allowedValues = $this->getFilterMerchantAccountTypeAllowableValues(); if (!in_array($filterMerchantAccountType, $allowedValues, true)) { throw new \InvalidArgumentException( @@ -906,9 +870,6 @@ public function getFilterMerchantAccounts() */ public function setFilterMerchantAccounts($filterMerchantAccounts) { - if (is_null($filterMerchantAccounts)) { - throw new \InvalidArgumentException('non-nullable filterMerchantAccounts cannot be null'); - } $this->container['filterMerchantAccounts'] = $filterMerchantAccounts; return $this; @@ -933,9 +894,6 @@ public function getHasError() */ public function setHasError($hasError) { - if (is_null($hasError)) { - throw new \InvalidArgumentException('non-nullable hasError cannot be null'); - } $this->container['hasError'] = $hasError; return $this; @@ -960,9 +918,6 @@ public function getHasPassword() */ public function setHasPassword($hasPassword) { - if (is_null($hasPassword)) { - throw new \InvalidArgumentException('non-nullable hasPassword cannot be null'); - } $this->container['hasPassword'] = $hasPassword; return $this; @@ -987,9 +942,6 @@ public function getHmacKeyCheckValue() */ public function setHmacKeyCheckValue($hmacKeyCheckValue) { - if (is_null($hmacKeyCheckValue)) { - throw new \InvalidArgumentException('non-nullable hmacKeyCheckValue cannot be null'); - } $this->container['hmacKeyCheckValue'] = $hmacKeyCheckValue; return $this; @@ -1014,9 +966,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -1041,9 +990,6 @@ public function getNetworkType() */ public function setNetworkType($networkType) { - if (is_null($networkType)) { - throw new \InvalidArgumentException('non-nullable networkType cannot be null'); - } $allowedValues = $this->getNetworkTypeAllowableValues(); if (!in_array($networkType, $allowedValues, true)) { throw new \InvalidArgumentException( @@ -1078,9 +1024,6 @@ public function getPopulateSoapActionHeader() */ public function setPopulateSoapActionHeader($populateSoapActionHeader) { - if (is_null($populateSoapActionHeader)) { - throw new \InvalidArgumentException('non-nullable populateSoapActionHeader cannot be null'); - } $this->container['populateSoapActionHeader'] = $populateSoapActionHeader; return $this; @@ -1105,9 +1048,6 @@ public function getType() */ public function setType($type) { - if (is_null($type)) { - throw new \InvalidArgumentException('non-nullable type cannot be null'); - } $this->container['type'] = $type; return $this; @@ -1132,9 +1072,6 @@ public function getUrl() */ public function setUrl($url) { - if (is_null($url)) { - throw new \InvalidArgumentException('non-nullable url cannot be null'); - } $this->container['url'] = $url; return $this; @@ -1159,9 +1096,6 @@ public function getUsername() */ public function setUsername($username) { - if (is_null($username)) { - throw new \InvalidArgumentException('non-nullable username cannot be null'); - } $this->container['username'] = $username; return $this; diff --git a/src/Adyen/Model/Management/WebhookLinks.php b/src/Adyen/Model/Management/WebhookLinks.php index 3ce3b9853..2330c538f 100644 --- a/src/Adyen/Model/Management/WebhookLinks.php +++ b/src/Adyen/Model/Management/WebhookLinks.php @@ -332,9 +332,6 @@ public function getCompany() */ public function setCompany($company) { - if (is_null($company)) { - throw new \InvalidArgumentException('non-nullable company cannot be null'); - } $this->container['company'] = $company; return $this; @@ -359,9 +356,6 @@ public function getGenerateHmac() */ public function setGenerateHmac($generateHmac) { - if (is_null($generateHmac)) { - throw new \InvalidArgumentException('non-nullable generateHmac cannot be null'); - } $this->container['generateHmac'] = $generateHmac; return $this; @@ -386,9 +380,6 @@ public function getMerchant() */ public function setMerchant($merchant) { - if (is_null($merchant)) { - throw new \InvalidArgumentException('non-nullable merchant cannot be null'); - } $this->container['merchant'] = $merchant; return $this; @@ -413,9 +404,6 @@ public function getSelf() */ public function setSelf($self) { - if (is_null($self)) { - throw new \InvalidArgumentException('non-nullable self cannot be null'); - } $this->container['self'] = $self; return $this; @@ -440,9 +428,6 @@ public function getTestWebhook() */ public function setTestWebhook($testWebhook) { - if (is_null($testWebhook)) { - throw new \InvalidArgumentException('non-nullable testWebhook cannot be null'); - } $this->container['testWebhook'] = $testWebhook; return $this; diff --git a/src/Adyen/Model/Management/WifiProfiles.php b/src/Adyen/Model/Management/WifiProfiles.php index 997bb53cb..869eae1b9 100644 --- a/src/Adyen/Model/Management/WifiProfiles.php +++ b/src/Adyen/Model/Management/WifiProfiles.php @@ -302,9 +302,6 @@ public function getProfiles() */ public function setProfiles($profiles) { - if (is_null($profiles)) { - throw new \InvalidArgumentException('non-nullable profiles cannot be null'); - } $this->container['profiles'] = $profiles; return $this; @@ -329,9 +326,6 @@ public function getSettings() */ public function setSettings($settings) { - if (is_null($settings)) { - throw new \InvalidArgumentException('non-nullable settings cannot be null'); - } $this->container['settings'] = $settings; return $this; diff --git a/src/Adyen/Model/ManagementWebhooks/AccountCapabilityData.php b/src/Adyen/Model/ManagementWebhooks/AccountCapabilityData.php index a46da09bb..4d63839ee 100644 --- a/src/Adyen/Model/ManagementWebhooks/AccountCapabilityData.php +++ b/src/Adyen/Model/ManagementWebhooks/AccountCapabilityData.php @@ -350,9 +350,6 @@ public function getAllowed() */ public function setAllowed($allowed) { - if (is_null($allowed)) { - throw new \InvalidArgumentException('non-nullable allowed cannot be null'); - } $this->container['allowed'] = $allowed; return $this; @@ -377,9 +374,6 @@ public function getAllowedLevel() */ public function setAllowedLevel($allowedLevel) { - if (is_null($allowedLevel)) { - throw new \InvalidArgumentException('non-nullable allowedLevel cannot be null'); - } $this->container['allowedLevel'] = $allowedLevel; return $this; @@ -404,9 +398,6 @@ public function getCapability() */ public function setCapability($capability) { - if (is_null($capability)) { - throw new \InvalidArgumentException('non-nullable capability cannot be null'); - } $this->container['capability'] = $capability; return $this; @@ -431,9 +422,6 @@ public function getProblems() */ public function setProblems($problems) { - if (is_null($problems)) { - throw new \InvalidArgumentException('non-nullable problems cannot be null'); - } $this->container['problems'] = $problems; return $this; @@ -458,9 +446,6 @@ public function getRequested() */ public function setRequested($requested) { - if (is_null($requested)) { - throw new \InvalidArgumentException('non-nullable requested cannot be null'); - } $this->container['requested'] = $requested; return $this; @@ -485,9 +470,6 @@ public function getRequestedLevel() */ public function setRequestedLevel($requestedLevel) { - if (is_null($requestedLevel)) { - throw new \InvalidArgumentException('non-nullable requestedLevel cannot be null'); - } $this->container['requestedLevel'] = $requestedLevel; return $this; @@ -512,9 +494,6 @@ public function getVerificationDeadline() */ public function setVerificationDeadline($verificationDeadline) { - if (is_null($verificationDeadline)) { - throw new \InvalidArgumentException('non-nullable verificationDeadline cannot be null'); - } $this->container['verificationDeadline'] = $verificationDeadline; return $this; @@ -539,9 +518,6 @@ public function getVerificationStatus() */ public function setVerificationStatus($verificationStatus) { - if (is_null($verificationStatus)) { - throw new \InvalidArgumentException('non-nullable verificationStatus cannot be null'); - } $this->container['verificationStatus'] = $verificationStatus; return $this; diff --git a/src/Adyen/Model/ManagementWebhooks/AccountCreateNotificationData.php b/src/Adyen/Model/ManagementWebhooks/AccountCreateNotificationData.php index bb71d85a4..040ec1e60 100644 --- a/src/Adyen/Model/ManagementWebhooks/AccountCreateNotificationData.php +++ b/src/Adyen/Model/ManagementWebhooks/AccountCreateNotificationData.php @@ -335,9 +335,6 @@ public function getCapabilities() */ public function setCapabilities($capabilities) { - if (is_null($capabilities)) { - throw new \InvalidArgumentException('non-nullable capabilities cannot be null'); - } $this->container['capabilities'] = $capabilities; return $this; @@ -362,9 +359,6 @@ public function getCompanyId() */ public function setCompanyId($companyId) { - if (is_null($companyId)) { - throw new \InvalidArgumentException('non-nullable companyId cannot be null'); - } $this->container['companyId'] = $companyId; return $this; @@ -389,9 +383,6 @@ public function getLegalEntityId() */ public function setLegalEntityId($legalEntityId) { - if (is_null($legalEntityId)) { - throw new \InvalidArgumentException('non-nullable legalEntityId cannot be null'); - } $this->container['legalEntityId'] = $legalEntityId; return $this; @@ -416,9 +407,6 @@ public function getMerchantId() */ public function setMerchantId($merchantId) { - if (is_null($merchantId)) { - throw new \InvalidArgumentException('non-nullable merchantId cannot be null'); - } $this->container['merchantId'] = $merchantId; return $this; @@ -443,9 +431,6 @@ public function getStatus() */ public function setStatus($status) { - if (is_null($status)) { - throw new \InvalidArgumentException('non-nullable status cannot be null'); - } $this->container['status'] = $status; return $this; diff --git a/src/Adyen/Model/ManagementWebhooks/AccountNotificationResponse.php b/src/Adyen/Model/ManagementWebhooks/AccountNotificationResponse.php index a9e40d578..74e7fec14 100644 --- a/src/Adyen/Model/ManagementWebhooks/AccountNotificationResponse.php +++ b/src/Adyen/Model/ManagementWebhooks/AccountNotificationResponse.php @@ -295,9 +295,6 @@ public function getNotificationResponse() */ public function setNotificationResponse($notificationResponse) { - if (is_null($notificationResponse)) { - throw new \InvalidArgumentException('non-nullable notificationResponse cannot be null'); - } $this->container['notificationResponse'] = $notificationResponse; return $this; diff --git a/src/Adyen/Model/ManagementWebhooks/AccountUpdateNotificationData.php b/src/Adyen/Model/ManagementWebhooks/AccountUpdateNotificationData.php index 8c5110260..e2a257f95 100644 --- a/src/Adyen/Model/ManagementWebhooks/AccountUpdateNotificationData.php +++ b/src/Adyen/Model/ManagementWebhooks/AccountUpdateNotificationData.php @@ -325,9 +325,6 @@ public function getCapabilities() */ public function setCapabilities($capabilities) { - if (is_null($capabilities)) { - throw new \InvalidArgumentException('non-nullable capabilities cannot be null'); - } $this->container['capabilities'] = $capabilities; return $this; @@ -352,9 +349,6 @@ public function getLegalEntityId() */ public function setLegalEntityId($legalEntityId) { - if (is_null($legalEntityId)) { - throw new \InvalidArgumentException('non-nullable legalEntityId cannot be null'); - } $this->container['legalEntityId'] = $legalEntityId; return $this; @@ -379,9 +373,6 @@ public function getMerchantId() */ public function setMerchantId($merchantId) { - if (is_null($merchantId)) { - throw new \InvalidArgumentException('non-nullable merchantId cannot be null'); - } $this->container['merchantId'] = $merchantId; return $this; @@ -406,9 +397,6 @@ public function getStatus() */ public function setStatus($status) { - if (is_null($status)) { - throw new \InvalidArgumentException('non-nullable status cannot be null'); - } $this->container['status'] = $status; return $this; diff --git a/src/Adyen/Model/ManagementWebhooks/CapabilityProblem.php b/src/Adyen/Model/ManagementWebhooks/CapabilityProblem.php index 6fc51dccc..59f7ddc6d 100644 --- a/src/Adyen/Model/ManagementWebhooks/CapabilityProblem.php +++ b/src/Adyen/Model/ManagementWebhooks/CapabilityProblem.php @@ -302,9 +302,6 @@ public function getEntity() */ public function setEntity($entity) { - if (is_null($entity)) { - throw new \InvalidArgumentException('non-nullable entity cannot be null'); - } $this->container['entity'] = $entity; return $this; @@ -329,9 +326,6 @@ public function getVerificationErrors() */ public function setVerificationErrors($verificationErrors) { - if (is_null($verificationErrors)) { - throw new \InvalidArgumentException('non-nullable verificationErrors cannot be null'); - } $this->container['verificationErrors'] = $verificationErrors; return $this; diff --git a/src/Adyen/Model/ManagementWebhooks/CapabilityProblemEntity.php b/src/Adyen/Model/ManagementWebhooks/CapabilityProblemEntity.php index 6921e11e6..0061b5d1c 100644 --- a/src/Adyen/Model/ManagementWebhooks/CapabilityProblemEntity.php +++ b/src/Adyen/Model/ManagementWebhooks/CapabilityProblemEntity.php @@ -341,9 +341,6 @@ public function getDocuments() */ public function setDocuments($documents) { - if (is_null($documents)) { - throw new \InvalidArgumentException('non-nullable documents cannot be null'); - } $this->container['documents'] = $documents; return $this; @@ -368,9 +365,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -395,9 +389,6 @@ public function getOwner() */ public function setOwner($owner) { - if (is_null($owner)) { - throw new \InvalidArgumentException('non-nullable owner cannot be null'); - } $this->container['owner'] = $owner; return $this; @@ -422,9 +413,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/ManagementWebhooks/CapabilityProblemEntityRecursive.php b/src/Adyen/Model/ManagementWebhooks/CapabilityProblemEntityRecursive.php index 508a550be..661f52521 100644 --- a/src/Adyen/Model/ManagementWebhooks/CapabilityProblemEntityRecursive.php +++ b/src/Adyen/Model/ManagementWebhooks/CapabilityProblemEntityRecursive.php @@ -334,9 +334,6 @@ public function getDocuments() */ public function setDocuments($documents) { - if (is_null($documents)) { - throw new \InvalidArgumentException('non-nullable documents cannot be null'); - } $this->container['documents'] = $documents; return $this; @@ -361,9 +358,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -388,9 +382,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/ManagementWebhooks/MerchantCreatedNotificationRequest.php b/src/Adyen/Model/ManagementWebhooks/MerchantCreatedNotificationRequest.php index f8b09a297..7bd10c67a 100644 --- a/src/Adyen/Model/ManagementWebhooks/MerchantCreatedNotificationRequest.php +++ b/src/Adyen/Model/ManagementWebhooks/MerchantCreatedNotificationRequest.php @@ -349,9 +349,6 @@ public function getCreatedAt() */ public function setCreatedAt($createdAt) { - if (is_null($createdAt)) { - throw new \InvalidArgumentException('non-nullable createdAt cannot be null'); - } $this->container['createdAt'] = $createdAt; return $this; @@ -376,9 +373,6 @@ public function getData() */ public function setData($data) { - if (is_null($data)) { - throw new \InvalidArgumentException('non-nullable data cannot be null'); - } $this->container['data'] = $data; return $this; @@ -403,9 +397,6 @@ public function getEnvironment() */ public function setEnvironment($environment) { - if (is_null($environment)) { - throw new \InvalidArgumentException('non-nullable environment cannot be null'); - } $this->container['environment'] = $environment; return $this; @@ -430,9 +421,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/ManagementWebhooks/MerchantUpdatedNotificationRequest.php b/src/Adyen/Model/ManagementWebhooks/MerchantUpdatedNotificationRequest.php index f0c6ae668..fd10bc914 100644 --- a/src/Adyen/Model/ManagementWebhooks/MerchantUpdatedNotificationRequest.php +++ b/src/Adyen/Model/ManagementWebhooks/MerchantUpdatedNotificationRequest.php @@ -349,9 +349,6 @@ public function getCreatedAt() */ public function setCreatedAt($createdAt) { - if (is_null($createdAt)) { - throw new \InvalidArgumentException('non-nullable createdAt cannot be null'); - } $this->container['createdAt'] = $createdAt; return $this; @@ -376,9 +373,6 @@ public function getData() */ public function setData($data) { - if (is_null($data)) { - throw new \InvalidArgumentException('non-nullable data cannot be null'); - } $this->container['data'] = $data; return $this; @@ -403,9 +397,6 @@ public function getEnvironment() */ public function setEnvironment($environment) { - if (is_null($environment)) { - throw new \InvalidArgumentException('non-nullable environment cannot be null'); - } $this->container['environment'] = $environment; return $this; @@ -430,9 +421,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/ManagementWebhooks/MidServiceNotificationData.php b/src/Adyen/Model/ManagementWebhooks/MidServiceNotificationData.php index e3abd5262..b84597c9c 100644 --- a/src/Adyen/Model/ManagementWebhooks/MidServiceNotificationData.php +++ b/src/Adyen/Model/ManagementWebhooks/MidServiceNotificationData.php @@ -419,9 +419,6 @@ public function getAllowed() */ public function setAllowed($allowed) { - if (is_null($allowed)) { - throw new \InvalidArgumentException('non-nullable allowed cannot be null'); - } $this->container['allowed'] = $allowed; return $this; @@ -446,9 +443,6 @@ public function getEnabled() */ public function setEnabled($enabled) { - if (is_null($enabled)) { - throw new \InvalidArgumentException('non-nullable enabled cannot be null'); - } $this->container['enabled'] = $enabled; return $this; @@ -473,9 +467,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -500,9 +491,6 @@ public function getMerchantId() */ public function setMerchantId($merchantId) { - if (is_null($merchantId)) { - throw new \InvalidArgumentException('non-nullable merchantId cannot be null'); - } $this->container['merchantId'] = $merchantId; return $this; @@ -527,9 +515,6 @@ public function getReference() */ public function setReference($reference) { - if (is_null($reference)) { - throw new \InvalidArgumentException('non-nullable reference cannot be null'); - } $this->container['reference'] = $reference; return $this; @@ -554,9 +539,6 @@ public function getStatus() */ 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( @@ -591,9 +573,6 @@ public function getStoreId() */ public function setStoreId($storeId) { - if (is_null($storeId)) { - throw new \InvalidArgumentException('non-nullable storeId cannot be null'); - } $this->container['storeId'] = $storeId; return $this; @@ -618,9 +597,6 @@ public function getType() */ public function setType($type) { - if (is_null($type)) { - throw new \InvalidArgumentException('non-nullable type cannot be null'); - } $this->container['type'] = $type; return $this; @@ -645,9 +621,6 @@ public function getVerificationStatus() */ 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( diff --git a/src/Adyen/Model/ManagementWebhooks/ObjectSerializer.php b/src/Adyen/Model/ManagementWebhooks/ObjectSerializer.php index 9c73e94b9..a3626e45d 100644 --- a/src/Adyen/Model/ManagementWebhooks/ObjectSerializer.php +++ b/src/Adyen/Model/ManagementWebhooks/ObjectSerializer.php @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach ($data as $property => $value) { + foreach($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) { - return $timestamp; - } + if (!is_string($timestamp)) return $timestamp; return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/ManagementWebhooks/PaymentMethodCreatedNotificationRequest.php b/src/Adyen/Model/ManagementWebhooks/PaymentMethodCreatedNotificationRequest.php index 93e57d5db..a48b22230 100644 --- a/src/Adyen/Model/ManagementWebhooks/PaymentMethodCreatedNotificationRequest.php +++ b/src/Adyen/Model/ManagementWebhooks/PaymentMethodCreatedNotificationRequest.php @@ -349,9 +349,6 @@ public function getCreatedAt() */ public function setCreatedAt($createdAt) { - if (is_null($createdAt)) { - throw new \InvalidArgumentException('non-nullable createdAt cannot be null'); - } $this->container['createdAt'] = $createdAt; return $this; @@ -376,9 +373,6 @@ public function getData() */ public function setData($data) { - if (is_null($data)) { - throw new \InvalidArgumentException('non-nullable data cannot be null'); - } $this->container['data'] = $data; return $this; @@ -403,9 +397,6 @@ public function getEnvironment() */ public function setEnvironment($environment) { - if (is_null($environment)) { - throw new \InvalidArgumentException('non-nullable environment cannot be null'); - } $this->container['environment'] = $environment; return $this; @@ -430,9 +421,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/ManagementWebhooks/PaymentMethodNotificationResponse.php b/src/Adyen/Model/ManagementWebhooks/PaymentMethodNotificationResponse.php index e9e7293a3..307d1d17f 100644 --- a/src/Adyen/Model/ManagementWebhooks/PaymentMethodNotificationResponse.php +++ b/src/Adyen/Model/ManagementWebhooks/PaymentMethodNotificationResponse.php @@ -295,9 +295,6 @@ public function getNotificationResponse() */ public function setNotificationResponse($notificationResponse) { - if (is_null($notificationResponse)) { - throw new \InvalidArgumentException('non-nullable notificationResponse cannot be null'); - } $this->container['notificationResponse'] = $notificationResponse; return $this; diff --git a/src/Adyen/Model/ManagementWebhooks/PaymentMethodRequestRemovedNotificationRequest.php b/src/Adyen/Model/ManagementWebhooks/PaymentMethodRequestRemovedNotificationRequest.php index 016cb54ab..207999375 100644 --- a/src/Adyen/Model/ManagementWebhooks/PaymentMethodRequestRemovedNotificationRequest.php +++ b/src/Adyen/Model/ManagementWebhooks/PaymentMethodRequestRemovedNotificationRequest.php @@ -349,9 +349,6 @@ public function getCreatedAt() */ public function setCreatedAt($createdAt) { - if (is_null($createdAt)) { - throw new \InvalidArgumentException('non-nullable createdAt cannot be null'); - } $this->container['createdAt'] = $createdAt; return $this; @@ -376,9 +373,6 @@ public function getData() */ public function setData($data) { - if (is_null($data)) { - throw new \InvalidArgumentException('non-nullable data cannot be null'); - } $this->container['data'] = $data; return $this; @@ -403,9 +397,6 @@ public function getEnvironment() */ public function setEnvironment($environment) { - if (is_null($environment)) { - throw new \InvalidArgumentException('non-nullable environment cannot be null'); - } $this->container['environment'] = $environment; return $this; @@ -430,9 +421,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/ManagementWebhooks/PaymentMethodScheduledForRemovalNotificationRequest.php b/src/Adyen/Model/ManagementWebhooks/PaymentMethodScheduledForRemovalNotificationRequest.php index 9c21bc1a0..50aa4d769 100644 --- a/src/Adyen/Model/ManagementWebhooks/PaymentMethodScheduledForRemovalNotificationRequest.php +++ b/src/Adyen/Model/ManagementWebhooks/PaymentMethodScheduledForRemovalNotificationRequest.php @@ -349,9 +349,6 @@ public function getCreatedAt() */ public function setCreatedAt($createdAt) { - if (is_null($createdAt)) { - throw new \InvalidArgumentException('non-nullable createdAt cannot be null'); - } $this->container['createdAt'] = $createdAt; return $this; @@ -376,9 +373,6 @@ public function getData() */ public function setData($data) { - if (is_null($data)) { - throw new \InvalidArgumentException('non-nullable data cannot be null'); - } $this->container['data'] = $data; return $this; @@ -403,9 +397,6 @@ public function getEnvironment() */ public function setEnvironment($environment) { - if (is_null($environment)) { - throw new \InvalidArgumentException('non-nullable environment cannot be null'); - } $this->container['environment'] = $environment; return $this; @@ -430,9 +421,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/ManagementWebhooks/RemediatingAction.php b/src/Adyen/Model/ManagementWebhooks/RemediatingAction.php index 793122b94..ee6b41c67 100644 --- a/src/Adyen/Model/ManagementWebhooks/RemediatingAction.php +++ b/src/Adyen/Model/ManagementWebhooks/RemediatingAction.php @@ -302,9 +302,6 @@ public function getCode() */ public function setCode($code) { - if (is_null($code)) { - throw new \InvalidArgumentException('non-nullable code cannot be null'); - } $this->container['code'] = $code; return $this; @@ -329,9 +326,6 @@ public function getMessage() */ public function setMessage($message) { - if (is_null($message)) { - throw new \InvalidArgumentException('non-nullable message cannot be null'); - } $this->container['message'] = $message; return $this; diff --git a/src/Adyen/Model/ManagementWebhooks/TerminalSettingsData.php b/src/Adyen/Model/ManagementWebhooks/TerminalSettingsData.php index ba221cb7c..8b01c07d3 100644 --- a/src/Adyen/Model/ManagementWebhooks/TerminalSettingsData.php +++ b/src/Adyen/Model/ManagementWebhooks/TerminalSettingsData.php @@ -359,9 +359,6 @@ public function getCompanyId() */ public function setCompanyId($companyId) { - if (is_null($companyId)) { - throw new \InvalidArgumentException('non-nullable companyId cannot be null'); - } $this->container['companyId'] = $companyId; return $this; @@ -386,9 +383,6 @@ public function getMerchantId() */ public function setMerchantId($merchantId) { - if (is_null($merchantId)) { - throw new \InvalidArgumentException('non-nullable merchantId cannot be null'); - } $this->container['merchantId'] = $merchantId; return $this; @@ -413,9 +407,6 @@ public function getStoreId() */ public function setStoreId($storeId) { - if (is_null($storeId)) { - throw new \InvalidArgumentException('non-nullable storeId cannot be null'); - } $this->container['storeId'] = $storeId; return $this; @@ -440,9 +431,6 @@ public function getTerminalId() */ public function setTerminalId($terminalId) { - if (is_null($terminalId)) { - throw new \InvalidArgumentException('non-nullable terminalId cannot be null'); - } $this->container['terminalId'] = $terminalId; return $this; @@ -467,9 +455,6 @@ public function getUpdateSource() */ public function setUpdateSource($updateSource) { - if (is_null($updateSource)) { - throw new \InvalidArgumentException('non-nullable updateSource cannot be null'); - } $allowedValues = $this->getUpdateSourceAllowableValues(); if (!in_array($updateSource, $allowedValues, true)) { throw new \InvalidArgumentException( @@ -504,9 +489,6 @@ public function getUser() */ public function setUser($user) { - if (is_null($user)) { - throw new \InvalidArgumentException('non-nullable user cannot be null'); - } $this->container['user'] = $user; return $this; diff --git a/src/Adyen/Model/ManagementWebhooks/TerminalSettingsNotificationRequest.php b/src/Adyen/Model/ManagementWebhooks/TerminalSettingsNotificationRequest.php index 4208cea2c..fa2fb4604 100644 --- a/src/Adyen/Model/ManagementWebhooks/TerminalSettingsNotificationRequest.php +++ b/src/Adyen/Model/ManagementWebhooks/TerminalSettingsNotificationRequest.php @@ -349,9 +349,6 @@ public function getCreatedAt() */ public function setCreatedAt($createdAt) { - if (is_null($createdAt)) { - throw new \InvalidArgumentException('non-nullable createdAt cannot be null'); - } $this->container['createdAt'] = $createdAt; return $this; @@ -376,9 +373,6 @@ public function getData() */ public function setData($data) { - if (is_null($data)) { - throw new \InvalidArgumentException('non-nullable data cannot be null'); - } $this->container['data'] = $data; return $this; @@ -403,9 +397,6 @@ public function getEnvironment() */ public function setEnvironment($environment) { - if (is_null($environment)) { - throw new \InvalidArgumentException('non-nullable environment cannot be null'); - } $this->container['environment'] = $environment; return $this; @@ -430,9 +421,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/ManagementWebhooks/TerminalSettingsNotificationResponse.php b/src/Adyen/Model/ManagementWebhooks/TerminalSettingsNotificationResponse.php index d6b4bf31f..530a4e113 100644 --- a/src/Adyen/Model/ManagementWebhooks/TerminalSettingsNotificationResponse.php +++ b/src/Adyen/Model/ManagementWebhooks/TerminalSettingsNotificationResponse.php @@ -295,9 +295,6 @@ public function getNotificationResponse() */ public function setNotificationResponse($notificationResponse) { - if (is_null($notificationResponse)) { - throw new \InvalidArgumentException('non-nullable notificationResponse cannot be null'); - } $this->container['notificationResponse'] = $notificationResponse; return $this; diff --git a/src/Adyen/Model/ManagementWebhooks/VerificationError.php b/src/Adyen/Model/ManagementWebhooks/VerificationError.php index bb643faf7..10ff608f9 100644 --- a/src/Adyen/Model/ManagementWebhooks/VerificationError.php +++ b/src/Adyen/Model/ManagementWebhooks/VerificationError.php @@ -348,9 +348,6 @@ public function getCode() */ public function setCode($code) { - if (is_null($code)) { - throw new \InvalidArgumentException('non-nullable code cannot be null'); - } $this->container['code'] = $code; return $this; @@ -375,9 +372,6 @@ public function getMessage() */ public function setMessage($message) { - if (is_null($message)) { - throw new \InvalidArgumentException('non-nullable message cannot be null'); - } $this->container['message'] = $message; return $this; @@ -402,9 +396,6 @@ public function getRemediatingActions() */ public function setRemediatingActions($remediatingActions) { - if (is_null($remediatingActions)) { - throw new \InvalidArgumentException('non-nullable remediatingActions cannot be null'); - } $this->container['remediatingActions'] = $remediatingActions; return $this; @@ -429,9 +420,6 @@ public function getSubErrors() */ public function setSubErrors($subErrors) { - if (is_null($subErrors)) { - throw new \InvalidArgumentException('non-nullable subErrors cannot be null'); - } $this->container['subErrors'] = $subErrors; return $this; @@ -456,9 +444,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/ManagementWebhooks/VerificationErrorRecursive.php b/src/Adyen/Model/ManagementWebhooks/VerificationErrorRecursive.php index 1ad6fad97..c3120012d 100644 --- a/src/Adyen/Model/ManagementWebhooks/VerificationErrorRecursive.php +++ b/src/Adyen/Model/ManagementWebhooks/VerificationErrorRecursive.php @@ -341,9 +341,6 @@ public function getCode() */ public function setCode($code) { - if (is_null($code)) { - throw new \InvalidArgumentException('non-nullable code cannot be null'); - } $this->container['code'] = $code; return $this; @@ -368,9 +365,6 @@ public function getMessage() */ public function setMessage($message) { - if (is_null($message)) { - throw new \InvalidArgumentException('non-nullable message cannot be null'); - } $this->container['message'] = $message; return $this; @@ -395,9 +389,6 @@ public function getType() */ 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( @@ -432,9 +423,6 @@ public function getRemediatingActions() */ public function setRemediatingActions($remediatingActions) { - if (is_null($remediatingActions)) { - throw new \InvalidArgumentException('non-nullable remediatingActions cannot be null'); - } $this->container['remediatingActions'] = $remediatingActions; return $this; diff --git a/src/Adyen/Model/POSTerminalManagement/Address.php b/src/Adyen/Model/POSTerminalManagement/Address.php index 6416abd17..2ab762f42 100644 --- a/src/Adyen/Model/POSTerminalManagement/Address.php +++ b/src/Adyen/Model/POSTerminalManagement/Address.php @@ -330,9 +330,6 @@ public function getCity() */ public function setCity($city) { - if (is_null($city)) { - throw new \InvalidArgumentException('non-nullable city cannot be null'); - } $this->container['city'] = $city; return $this; @@ -357,9 +354,6 @@ public function getCountryCode() */ public function setCountryCode($countryCode) { - if (is_null($countryCode)) { - throw new \InvalidArgumentException('non-nullable countryCode cannot be null'); - } $this->container['countryCode'] = $countryCode; return $this; @@ -384,9 +378,6 @@ public function getPostalCode() */ public function setPostalCode($postalCode) { - if (is_null($postalCode)) { - throw new \InvalidArgumentException('non-nullable postalCode cannot be null'); - } $this->container['postalCode'] = $postalCode; return $this; @@ -411,9 +402,6 @@ public function getStateOrProvince() */ public function setStateOrProvince($stateOrProvince) { - if (is_null($stateOrProvince)) { - throw new \InvalidArgumentException('non-nullable stateOrProvince cannot be null'); - } $this->container['stateOrProvince'] = $stateOrProvince; return $this; @@ -438,9 +426,6 @@ public function getStreetAddress() */ public function setStreetAddress($streetAddress) { - if (is_null($streetAddress)) { - throw new \InvalidArgumentException('non-nullable streetAddress cannot be null'); - } $this->container['streetAddress'] = $streetAddress; return $this; @@ -465,9 +450,6 @@ public function getStreetAddress2() */ public function setStreetAddress2($streetAddress2) { - if (is_null($streetAddress2)) { - throw new \InvalidArgumentException('non-nullable streetAddress2 cannot be null'); - } $this->container['streetAddress2'] = $streetAddress2; return $this; diff --git a/src/Adyen/Model/POSTerminalManagement/AssignTerminalsRequest.php b/src/Adyen/Model/POSTerminalManagement/AssignTerminalsRequest.php index 8020b041e..07d35ba50 100644 --- a/src/Adyen/Model/POSTerminalManagement/AssignTerminalsRequest.php +++ b/src/Adyen/Model/POSTerminalManagement/AssignTerminalsRequest.php @@ -329,9 +329,6 @@ public function getCompanyAccount() */ public function setCompanyAccount($companyAccount) { - if (is_null($companyAccount)) { - throw new \InvalidArgumentException('non-nullable companyAccount cannot be null'); - } $this->container['companyAccount'] = $companyAccount; return $this; @@ -356,9 +353,6 @@ public function getMerchantAccount() */ public function setMerchantAccount($merchantAccount) { - if (is_null($merchantAccount)) { - throw new \InvalidArgumentException('non-nullable merchantAccount cannot be null'); - } $this->container['merchantAccount'] = $merchantAccount; return $this; @@ -383,9 +377,6 @@ public function getMerchantInventory() */ public function setMerchantInventory($merchantInventory) { - if (is_null($merchantInventory)) { - throw new \InvalidArgumentException('non-nullable merchantInventory cannot be null'); - } $this->container['merchantInventory'] = $merchantInventory; return $this; @@ -410,9 +401,6 @@ public function getStore() */ public function setStore($store) { - if (is_null($store)) { - throw new \InvalidArgumentException('non-nullable store cannot be null'); - } $this->container['store'] = $store; return $this; @@ -437,9 +425,6 @@ public function getTerminals() */ public function setTerminals($terminals) { - if (is_null($terminals)) { - throw new \InvalidArgumentException('non-nullable terminals cannot be null'); - } $this->container['terminals'] = $terminals; return $this; diff --git a/src/Adyen/Model/POSTerminalManagement/AssignTerminalsResponse.php b/src/Adyen/Model/POSTerminalManagement/AssignTerminalsResponse.php index eeeebeaf2..a16444897 100644 --- a/src/Adyen/Model/POSTerminalManagement/AssignTerminalsResponse.php +++ b/src/Adyen/Model/POSTerminalManagement/AssignTerminalsResponse.php @@ -298,9 +298,6 @@ public function getResults() */ public function setResults($results) { - if (is_null($results)) { - throw new \InvalidArgumentException('non-nullable results cannot be null'); - } $this->container['results'] = $results; return $this; diff --git a/src/Adyen/Model/POSTerminalManagement/FindTerminalRequest.php b/src/Adyen/Model/POSTerminalManagement/FindTerminalRequest.php index 916a7c177..a699971b5 100644 --- a/src/Adyen/Model/POSTerminalManagement/FindTerminalRequest.php +++ b/src/Adyen/Model/POSTerminalManagement/FindTerminalRequest.php @@ -298,9 +298,6 @@ public function getTerminal() */ public function setTerminal($terminal) { - if (is_null($terminal)) { - throw new \InvalidArgumentException('non-nullable terminal cannot be null'); - } $this->container['terminal'] = $terminal; return $this; diff --git a/src/Adyen/Model/POSTerminalManagement/FindTerminalResponse.php b/src/Adyen/Model/POSTerminalManagement/FindTerminalResponse.php index b88d7f15e..81daa2e96 100644 --- a/src/Adyen/Model/POSTerminalManagement/FindTerminalResponse.php +++ b/src/Adyen/Model/POSTerminalManagement/FindTerminalResponse.php @@ -329,9 +329,6 @@ public function getCompanyAccount() */ public function setCompanyAccount($companyAccount) { - if (is_null($companyAccount)) { - throw new \InvalidArgumentException('non-nullable companyAccount cannot be null'); - } $this->container['companyAccount'] = $companyAccount; return $this; @@ -356,9 +353,6 @@ public function getMerchantAccount() */ public function setMerchantAccount($merchantAccount) { - if (is_null($merchantAccount)) { - throw new \InvalidArgumentException('non-nullable merchantAccount cannot be null'); - } $this->container['merchantAccount'] = $merchantAccount; return $this; @@ -383,9 +377,6 @@ public function getMerchantInventory() */ public function setMerchantInventory($merchantInventory) { - if (is_null($merchantInventory)) { - throw new \InvalidArgumentException('non-nullable merchantInventory cannot be null'); - } $this->container['merchantInventory'] = $merchantInventory; return $this; @@ -410,9 +401,6 @@ public function getStore() */ public function setStore($store) { - if (is_null($store)) { - throw new \InvalidArgumentException('non-nullable store cannot be null'); - } $this->container['store'] = $store; return $this; @@ -437,9 +425,6 @@ public function getTerminal() */ public function setTerminal($terminal) { - if (is_null($terminal)) { - throw new \InvalidArgumentException('non-nullable terminal cannot be null'); - } $this->container['terminal'] = $terminal; return $this; diff --git a/src/Adyen/Model/POSTerminalManagement/GetStoresUnderAccountRequest.php b/src/Adyen/Model/POSTerminalManagement/GetStoresUnderAccountRequest.php index aae0b36b5..6799b0e08 100644 --- a/src/Adyen/Model/POSTerminalManagement/GetStoresUnderAccountRequest.php +++ b/src/Adyen/Model/POSTerminalManagement/GetStoresUnderAccountRequest.php @@ -305,9 +305,6 @@ public function getCompanyAccount() */ public function setCompanyAccount($companyAccount) { - if (is_null($companyAccount)) { - throw new \InvalidArgumentException('non-nullable companyAccount cannot be null'); - } $this->container['companyAccount'] = $companyAccount; return $this; @@ -332,9 +329,6 @@ public function getMerchantAccount() */ public function setMerchantAccount($merchantAccount) { - if (is_null($merchantAccount)) { - throw new \InvalidArgumentException('non-nullable merchantAccount cannot be null'); - } $this->container['merchantAccount'] = $merchantAccount; return $this; diff --git a/src/Adyen/Model/POSTerminalManagement/GetStoresUnderAccountResponse.php b/src/Adyen/Model/POSTerminalManagement/GetStoresUnderAccountResponse.php index add2953e1..128aff9c6 100644 --- a/src/Adyen/Model/POSTerminalManagement/GetStoresUnderAccountResponse.php +++ b/src/Adyen/Model/POSTerminalManagement/GetStoresUnderAccountResponse.php @@ -295,9 +295,6 @@ public function getStores() */ public function setStores($stores) { - if (is_null($stores)) { - throw new \InvalidArgumentException('non-nullable stores cannot be null'); - } $this->container['stores'] = $stores; return $this; diff --git a/src/Adyen/Model/POSTerminalManagement/GetTerminalDetailsRequest.php b/src/Adyen/Model/POSTerminalManagement/GetTerminalDetailsRequest.php index cd5520c21..08a164690 100644 --- a/src/Adyen/Model/POSTerminalManagement/GetTerminalDetailsRequest.php +++ b/src/Adyen/Model/POSTerminalManagement/GetTerminalDetailsRequest.php @@ -298,9 +298,6 @@ public function getTerminal() */ public function setTerminal($terminal) { - if (is_null($terminal)) { - throw new \InvalidArgumentException('non-nullable terminal cannot be null'); - } $this->container['terminal'] = $terminal; return $this; diff --git a/src/Adyen/Model/POSTerminalManagement/GetTerminalDetailsResponse.php b/src/Adyen/Model/POSTerminalManagement/GetTerminalDetailsResponse.php index 7c866d576..7218eb46f 100644 --- a/src/Adyen/Model/POSTerminalManagement/GetTerminalDetailsResponse.php +++ b/src/Adyen/Model/POSTerminalManagement/GetTerminalDetailsResponse.php @@ -512,9 +512,6 @@ public function getBluetoothIp() */ public function setBluetoothIp($bluetoothIp) { - if (is_null($bluetoothIp)) { - throw new \InvalidArgumentException('non-nullable bluetoothIp cannot be null'); - } $this->container['bluetoothIp'] = $bluetoothIp; return $this; @@ -539,9 +536,6 @@ public function getBluetoothMac() */ public function setBluetoothMac($bluetoothMac) { - if (is_null($bluetoothMac)) { - throw new \InvalidArgumentException('non-nullable bluetoothMac cannot be null'); - } $this->container['bluetoothMac'] = $bluetoothMac; return $this; @@ -566,9 +560,6 @@ public function getCompanyAccount() */ public function setCompanyAccount($companyAccount) { - if (is_null($companyAccount)) { - throw new \InvalidArgumentException('non-nullable companyAccount cannot be null'); - } $this->container['companyAccount'] = $companyAccount; return $this; @@ -593,9 +584,6 @@ public function getCountry() */ public function setCountry($country) { - if (is_null($country)) { - throw new \InvalidArgumentException('non-nullable country cannot be null'); - } $this->container['country'] = $country; return $this; @@ -620,9 +608,6 @@ public function getDeviceModel() */ public function setDeviceModel($deviceModel) { - if (is_null($deviceModel)) { - throw new \InvalidArgumentException('non-nullable deviceModel cannot be null'); - } $this->container['deviceModel'] = $deviceModel; return $this; @@ -647,9 +632,6 @@ public function getDhcpEnabled() */ public function setDhcpEnabled($dhcpEnabled) { - if (is_null($dhcpEnabled)) { - throw new \InvalidArgumentException('non-nullable dhcpEnabled cannot be null'); - } $this->container['dhcpEnabled'] = $dhcpEnabled; return $this; @@ -674,9 +656,6 @@ public function getDisplayLabel() */ public function setDisplayLabel($displayLabel) { - if (is_null($displayLabel)) { - throw new \InvalidArgumentException('non-nullable displayLabel cannot be null'); - } $this->container['displayLabel'] = $displayLabel; return $this; @@ -701,9 +680,6 @@ public function getEthernetIp() */ public function setEthernetIp($ethernetIp) { - if (is_null($ethernetIp)) { - throw new \InvalidArgumentException('non-nullable ethernetIp cannot be null'); - } $this->container['ethernetIp'] = $ethernetIp; return $this; @@ -728,9 +704,6 @@ public function getEthernetMac() */ public function setEthernetMac($ethernetMac) { - if (is_null($ethernetMac)) { - throw new \InvalidArgumentException('non-nullable ethernetMac cannot be null'); - } $this->container['ethernetMac'] = $ethernetMac; return $this; @@ -755,9 +728,6 @@ public function getFirmwareVersion() */ public function setFirmwareVersion($firmwareVersion) { - if (is_null($firmwareVersion)) { - throw new \InvalidArgumentException('non-nullable firmwareVersion cannot be null'); - } $this->container['firmwareVersion'] = $firmwareVersion; return $this; @@ -782,9 +752,6 @@ public function getIccid() */ public function setIccid($iccid) { - if (is_null($iccid)) { - throw new \InvalidArgumentException('non-nullable iccid cannot be null'); - } $this->container['iccid'] = $iccid; return $this; @@ -809,9 +776,6 @@ public function getLastActivityDateTime() */ public function setLastActivityDateTime($lastActivityDateTime) { - if (is_null($lastActivityDateTime)) { - throw new \InvalidArgumentException('non-nullable lastActivityDateTime cannot be null'); - } $this->container['lastActivityDateTime'] = $lastActivityDateTime; return $this; @@ -836,9 +800,6 @@ public function getLastTransactionDateTime() */ public function setLastTransactionDateTime($lastTransactionDateTime) { - if (is_null($lastTransactionDateTime)) { - throw new \InvalidArgumentException('non-nullable lastTransactionDateTime cannot be null'); - } $this->container['lastTransactionDateTime'] = $lastTransactionDateTime; return $this; @@ -863,9 +824,6 @@ public function getLinkNegotiation() */ public function setLinkNegotiation($linkNegotiation) { - if (is_null($linkNegotiation)) { - throw new \InvalidArgumentException('non-nullable linkNegotiation cannot be null'); - } $this->container['linkNegotiation'] = $linkNegotiation; return $this; @@ -890,9 +848,6 @@ public function getMerchantAccount() */ public function setMerchantAccount($merchantAccount) { - if (is_null($merchantAccount)) { - throw new \InvalidArgumentException('non-nullable merchantAccount cannot be null'); - } $this->container['merchantAccount'] = $merchantAccount; return $this; @@ -917,9 +872,6 @@ public function getMerchantInventory() */ public function setMerchantInventory($merchantInventory) { - if (is_null($merchantInventory)) { - throw new \InvalidArgumentException('non-nullable merchantInventory cannot be null'); - } $this->container['merchantInventory'] = $merchantInventory; return $this; @@ -944,9 +896,6 @@ public function getPermanentTerminalId() */ public function setPermanentTerminalId($permanentTerminalId) { - if (is_null($permanentTerminalId)) { - throw new \InvalidArgumentException('non-nullable permanentTerminalId cannot be null'); - } $this->container['permanentTerminalId'] = $permanentTerminalId; return $this; @@ -971,9 +920,6 @@ public function getSerialNumber() */ public function setSerialNumber($serialNumber) { - if (is_null($serialNumber)) { - throw new \InvalidArgumentException('non-nullable serialNumber cannot be null'); - } $this->container['serialNumber'] = $serialNumber; return $this; @@ -998,9 +944,6 @@ public function getSimStatus() */ public function setSimStatus($simStatus) { - if (is_null($simStatus)) { - throw new \InvalidArgumentException('non-nullable simStatus cannot be null'); - } $this->container['simStatus'] = $simStatus; return $this; @@ -1025,9 +968,6 @@ public function getStore() */ public function setStore($store) { - if (is_null($store)) { - throw new \InvalidArgumentException('non-nullable store cannot be null'); - } $this->container['store'] = $store; return $this; @@ -1052,9 +992,6 @@ public function getStoreDetails() */ public function setStoreDetails($storeDetails) { - if (is_null($storeDetails)) { - throw new \InvalidArgumentException('non-nullable storeDetails cannot be null'); - } $this->container['storeDetails'] = $storeDetails; return $this; @@ -1079,9 +1016,6 @@ public function getTerminal() */ public function setTerminal($terminal) { - if (is_null($terminal)) { - throw new \InvalidArgumentException('non-nullable terminal cannot be null'); - } $this->container['terminal'] = $terminal; return $this; @@ -1106,9 +1040,6 @@ public function getTerminalStatus() */ public function setTerminalStatus($terminalStatus) { - if (is_null($terminalStatus)) { - throw new \InvalidArgumentException('non-nullable terminalStatus cannot be null'); - } $allowedValues = $this->getTerminalStatusAllowableValues(); if (!in_array($terminalStatus, $allowedValues, true)) { throw new \InvalidArgumentException( @@ -1143,9 +1074,6 @@ public function getWifiIp() */ public function setWifiIp($wifiIp) { - if (is_null($wifiIp)) { - throw new \InvalidArgumentException('non-nullable wifiIp cannot be null'); - } $this->container['wifiIp'] = $wifiIp; return $this; @@ -1170,9 +1098,6 @@ public function getWifiMac() */ public function setWifiMac($wifiMac) { - if (is_null($wifiMac)) { - throw new \InvalidArgumentException('non-nullable wifiMac cannot be null'); - } $this->container['wifiMac'] = $wifiMac; return $this; diff --git a/src/Adyen/Model/POSTerminalManagement/GetTerminalsUnderAccountRequest.php b/src/Adyen/Model/POSTerminalManagement/GetTerminalsUnderAccountRequest.php index 57e938b6c..102db4397 100644 --- a/src/Adyen/Model/POSTerminalManagement/GetTerminalsUnderAccountRequest.php +++ b/src/Adyen/Model/POSTerminalManagement/GetTerminalsUnderAccountRequest.php @@ -312,9 +312,6 @@ public function getCompanyAccount() */ public function setCompanyAccount($companyAccount) { - if (is_null($companyAccount)) { - throw new \InvalidArgumentException('non-nullable companyAccount cannot be null'); - } $this->container['companyAccount'] = $companyAccount; return $this; @@ -339,9 +336,6 @@ public function getMerchantAccount() */ public function setMerchantAccount($merchantAccount) { - if (is_null($merchantAccount)) { - throw new \InvalidArgumentException('non-nullable merchantAccount cannot be null'); - } $this->container['merchantAccount'] = $merchantAccount; return $this; @@ -366,9 +360,6 @@ public function getStore() */ public function setStore($store) { - if (is_null($store)) { - throw new \InvalidArgumentException('non-nullable store cannot be null'); - } $this->container['store'] = $store; return $this; diff --git a/src/Adyen/Model/POSTerminalManagement/GetTerminalsUnderAccountResponse.php b/src/Adyen/Model/POSTerminalManagement/GetTerminalsUnderAccountResponse.php index 524d9b1ab..9c9240efb 100644 --- a/src/Adyen/Model/POSTerminalManagement/GetTerminalsUnderAccountResponse.php +++ b/src/Adyen/Model/POSTerminalManagement/GetTerminalsUnderAccountResponse.php @@ -312,9 +312,6 @@ public function getCompanyAccount() */ public function setCompanyAccount($companyAccount) { - if (is_null($companyAccount)) { - throw new \InvalidArgumentException('non-nullable companyAccount cannot be null'); - } $this->container['companyAccount'] = $companyAccount; return $this; @@ -339,9 +336,6 @@ public function getInventoryTerminals() */ public function setInventoryTerminals($inventoryTerminals) { - if (is_null($inventoryTerminals)) { - throw new \InvalidArgumentException('non-nullable inventoryTerminals cannot be null'); - } $this->container['inventoryTerminals'] = $inventoryTerminals; return $this; @@ -366,9 +360,6 @@ public function getMerchantAccounts() */ public function setMerchantAccounts($merchantAccounts) { - if (is_null($merchantAccounts)) { - throw new \InvalidArgumentException('non-nullable merchantAccounts cannot be null'); - } $this->container['merchantAccounts'] = $merchantAccounts; return $this; diff --git a/src/Adyen/Model/POSTerminalManagement/MerchantAccount.php b/src/Adyen/Model/POSTerminalManagement/MerchantAccount.php index 80af1499b..71f7632d3 100644 --- a/src/Adyen/Model/POSTerminalManagement/MerchantAccount.php +++ b/src/Adyen/Model/POSTerminalManagement/MerchantAccount.php @@ -319,9 +319,6 @@ public function getInStoreTerminals() */ public function setInStoreTerminals($inStoreTerminals) { - if (is_null($inStoreTerminals)) { - throw new \InvalidArgumentException('non-nullable inStoreTerminals cannot be null'); - } $this->container['inStoreTerminals'] = $inStoreTerminals; return $this; @@ -346,9 +343,6 @@ public function getInventoryTerminals() */ public function setInventoryTerminals($inventoryTerminals) { - if (is_null($inventoryTerminals)) { - throw new \InvalidArgumentException('non-nullable inventoryTerminals cannot be null'); - } $this->container['inventoryTerminals'] = $inventoryTerminals; return $this; @@ -373,9 +367,6 @@ public function getMerchantAccount() */ public function setMerchantAccount($merchantAccount) { - if (is_null($merchantAccount)) { - throw new \InvalidArgumentException('non-nullable merchantAccount cannot be null'); - } $this->container['merchantAccount'] = $merchantAccount; return $this; @@ -400,9 +391,6 @@ public function getStores() */ public function setStores($stores) { - if (is_null($stores)) { - throw new \InvalidArgumentException('non-nullable stores cannot be null'); - } $this->container['stores'] = $stores; return $this; diff --git a/src/Adyen/Model/POSTerminalManagement/ObjectSerializer.php b/src/Adyen/Model/POSTerminalManagement/ObjectSerializer.php index 8032f208b..b6a5027ee 100644 --- a/src/Adyen/Model/POSTerminalManagement/ObjectSerializer.php +++ b/src/Adyen/Model/POSTerminalManagement/ObjectSerializer.php @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach ($data as $property => $value) { + foreach($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) { - return $timestamp; - } + if (!is_string($timestamp)) return $timestamp; return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/POSTerminalManagement/ServiceError.php b/src/Adyen/Model/POSTerminalManagement/ServiceError.php index 081691ee9..6f608eefc 100644 --- a/src/Adyen/Model/POSTerminalManagement/ServiceError.php +++ b/src/Adyen/Model/POSTerminalManagement/ServiceError.php @@ -323,9 +323,6 @@ public function getErrorCode() */ public function setErrorCode($errorCode) { - if (is_null($errorCode)) { - throw new \InvalidArgumentException('non-nullable errorCode cannot be null'); - } $this->container['errorCode'] = $errorCode; return $this; @@ -350,9 +347,6 @@ public function getErrorType() */ public function setErrorType($errorType) { - if (is_null($errorType)) { - throw new \InvalidArgumentException('non-nullable errorType cannot be null'); - } $this->container['errorType'] = $errorType; return $this; @@ -377,9 +371,6 @@ public function getMessage() */ public function setMessage($message) { - if (is_null($message)) { - throw new \InvalidArgumentException('non-nullable message cannot be null'); - } $this->container['message'] = $message; return $this; @@ -404,9 +395,6 @@ public function getPspReference() */ public function setPspReference($pspReference) { - if (is_null($pspReference)) { - throw new \InvalidArgumentException('non-nullable pspReference cannot be null'); - } $this->container['pspReference'] = $pspReference; return $this; @@ -431,7 +419,6 @@ public function getStatus() */ public function setStatus($status) { - // Do nothing for nullable integers $this->container['status'] = $status; return $this; diff --git a/src/Adyen/Model/POSTerminalManagement/Store.php b/src/Adyen/Model/POSTerminalManagement/Store.php index 9f4c37500..55a91e71f 100644 --- a/src/Adyen/Model/POSTerminalManagement/Store.php +++ b/src/Adyen/Model/POSTerminalManagement/Store.php @@ -333,9 +333,6 @@ public function getAddress() */ public function setAddress($address) { - if (is_null($address)) { - throw new \InvalidArgumentException('non-nullable address cannot be null'); - } $this->container['address'] = $address; return $this; @@ -360,9 +357,6 @@ public function getDescription() */ public function setDescription($description) { - if (is_null($description)) { - throw new \InvalidArgumentException('non-nullable description cannot be null'); - } $this->container['description'] = $description; return $this; @@ -387,9 +381,6 @@ public function getInStoreTerminals() */ public function setInStoreTerminals($inStoreTerminals) { - if (is_null($inStoreTerminals)) { - throw new \InvalidArgumentException('non-nullable inStoreTerminals cannot be null'); - } $this->container['inStoreTerminals'] = $inStoreTerminals; return $this; @@ -414,9 +405,6 @@ public function getMerchantAccountCode() */ public function setMerchantAccountCode($merchantAccountCode) { - if (is_null($merchantAccountCode)) { - throw new \InvalidArgumentException('non-nullable merchantAccountCode cannot be null'); - } $this->container['merchantAccountCode'] = $merchantAccountCode; return $this; @@ -441,9 +429,6 @@ public function getStatus() */ public function setStatus($status) { - if (is_null($status)) { - throw new \InvalidArgumentException('non-nullable status cannot be null'); - } $this->container['status'] = $status; return $this; @@ -468,9 +453,6 @@ public function getStore() */ public function setStore($store) { - if (is_null($store)) { - throw new \InvalidArgumentException('non-nullable store cannot be null'); - } $this->container['store'] = $store; return $this; diff --git a/src/Adyen/Model/Payments/AccountInfo.php b/src/Adyen/Model/Payments/AccountInfo.php index 732f88cb7..d1632a52e 100644 --- a/src/Adyen/Model/Payments/AccountInfo.php +++ b/src/Adyen/Model/Payments/AccountInfo.php @@ -587,9 +587,6 @@ public function getAccountAgeIndicator() */ 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( @@ -624,9 +621,6 @@ public function getAccountChangeDate() */ public function setAccountChangeDate($accountChangeDate) { - if (is_null($accountChangeDate)) { - throw new \InvalidArgumentException('non-nullable accountChangeDate cannot be null'); - } $this->container['accountChangeDate'] = $accountChangeDate; return $this; @@ -651,9 +645,6 @@ public function getAccountChangeIndicator() */ 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( @@ -688,9 +679,6 @@ public function getAccountCreationDate() */ public function setAccountCreationDate($accountCreationDate) { - if (is_null($accountCreationDate)) { - throw new \InvalidArgumentException('non-nullable accountCreationDate cannot be null'); - } $this->container['accountCreationDate'] = $accountCreationDate; return $this; @@ -715,9 +703,6 @@ public function getAccountType() */ 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( @@ -752,7 +737,6 @@ public function getAddCardAttemptsDay() */ public function setAddCardAttemptsDay($addCardAttemptsDay) { - // Do nothing for nullable integers $this->container['addCardAttemptsDay'] = $addCardAttemptsDay; return $this; @@ -777,9 +761,6 @@ public function getDeliveryAddressUsageDate() */ public function setDeliveryAddressUsageDate($deliveryAddressUsageDate) { - if (is_null($deliveryAddressUsageDate)) { - throw new \InvalidArgumentException('non-nullable deliveryAddressUsageDate cannot be null'); - } $this->container['deliveryAddressUsageDate'] = $deliveryAddressUsageDate; return $this; @@ -804,9 +785,6 @@ public function getDeliveryAddressUsageIndicator() */ 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( @@ -843,9 +821,6 @@ public function getHomePhone() */ public function setHomePhone($homePhone) { - if (is_null($homePhone)) { - throw new \InvalidArgumentException('non-nullable homePhone cannot be null'); - } $this->container['homePhone'] = $homePhone; return $this; @@ -872,9 +847,6 @@ public function getMobilePhone() */ public function setMobilePhone($mobilePhone) { - if (is_null($mobilePhone)) { - throw new \InvalidArgumentException('non-nullable mobilePhone cannot be null'); - } $this->container['mobilePhone'] = $mobilePhone; return $this; @@ -899,9 +871,6 @@ public function getPasswordChangeDate() */ public function setPasswordChangeDate($passwordChangeDate) { - if (is_null($passwordChangeDate)) { - throw new \InvalidArgumentException('non-nullable passwordChangeDate cannot be null'); - } $this->container['passwordChangeDate'] = $passwordChangeDate; return $this; @@ -926,9 +895,6 @@ public function getPasswordChangeIndicator() */ 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( @@ -963,7 +929,6 @@ public function getPastTransactionsDay() */ public function setPastTransactionsDay($pastTransactionsDay) { - // Do nothing for nullable integers $this->container['pastTransactionsDay'] = $pastTransactionsDay; return $this; @@ -988,7 +953,6 @@ public function getPastTransactionsYear() */ public function setPastTransactionsYear($pastTransactionsYear) { - // Do nothing for nullable integers $this->container['pastTransactionsYear'] = $pastTransactionsYear; return $this; @@ -1013,9 +977,6 @@ public function getPaymentAccountAge() */ public function setPaymentAccountAge($paymentAccountAge) { - if (is_null($paymentAccountAge)) { - throw new \InvalidArgumentException('non-nullable paymentAccountAge cannot be null'); - } $this->container['paymentAccountAge'] = $paymentAccountAge; return $this; @@ -1040,9 +1001,6 @@ public function getPaymentAccountIndicator() */ 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( @@ -1077,7 +1035,6 @@ public function getPurchasesLast6Months() */ public function setPurchasesLast6Months($purchasesLast6Months) { - // Do nothing for nullable integers $this->container['purchasesLast6Months'] = $purchasesLast6Months; return $this; @@ -1102,9 +1059,6 @@ public function getSuspiciousActivity() */ public function setSuspiciousActivity($suspiciousActivity) { - if (is_null($suspiciousActivity)) { - throw new \InvalidArgumentException('non-nullable suspiciousActivity cannot be null'); - } $this->container['suspiciousActivity'] = $suspiciousActivity; return $this; @@ -1131,9 +1085,6 @@ public function getWorkPhone() */ public function setWorkPhone($workPhone) { - if (is_null($workPhone)) { - throw new \InvalidArgumentException('non-nullable workPhone cannot be null'); - } $this->container['workPhone'] = $workPhone; return $this; diff --git a/src/Adyen/Model/Payments/AcctInfo.php b/src/Adyen/Model/Payments/AcctInfo.php index b2b1be0b0..c13ec113a 100644 --- a/src/Adyen/Model/Payments/AcctInfo.php +++ b/src/Adyen/Model/Payments/AcctInfo.php @@ -587,9 +587,6 @@ public function getChAccAgeInd() */ 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( @@ -624,9 +621,6 @@ public function getChAccChange() */ public function setChAccChange($chAccChange) { - if (is_null($chAccChange)) { - throw new \InvalidArgumentException('non-nullable chAccChange cannot be null'); - } $this->container['chAccChange'] = $chAccChange; return $this; @@ -651,9 +645,6 @@ public function getChAccChangeInd() */ 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( @@ -688,9 +679,6 @@ public function getChAccPwChange() */ public function setChAccPwChange($chAccPwChange) { - if (is_null($chAccPwChange)) { - throw new \InvalidArgumentException('non-nullable chAccPwChange cannot be null'); - } $this->container['chAccPwChange'] = $chAccPwChange; return $this; @@ -715,9 +703,6 @@ public function getChAccPwChangeInd() */ 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( @@ -752,9 +737,6 @@ public function getChAccString() */ public function setChAccString($chAccString) { - if (is_null($chAccString)) { - throw new \InvalidArgumentException('non-nullable chAccString cannot be null'); - } $this->container['chAccString'] = $chAccString; return $this; @@ -779,9 +761,6 @@ public function getNbPurchaseAccount() */ public function setNbPurchaseAccount($nbPurchaseAccount) { - if (is_null($nbPurchaseAccount)) { - throw new \InvalidArgumentException('non-nullable nbPurchaseAccount cannot be null'); - } $this->container['nbPurchaseAccount'] = $nbPurchaseAccount; return $this; @@ -806,9 +785,6 @@ public function getPaymentAccAge() */ public function setPaymentAccAge($paymentAccAge) { - if (is_null($paymentAccAge)) { - throw new \InvalidArgumentException('non-nullable paymentAccAge cannot be null'); - } $this->container['paymentAccAge'] = $paymentAccAge; return $this; @@ -833,9 +809,6 @@ public function getPaymentAccInd() */ 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( @@ -870,9 +843,6 @@ public function getProvisionAttemptsDay() */ public function setProvisionAttemptsDay($provisionAttemptsDay) { - if (is_null($provisionAttemptsDay)) { - throw new \InvalidArgumentException('non-nullable provisionAttemptsDay cannot be null'); - } $this->container['provisionAttemptsDay'] = $provisionAttemptsDay; return $this; @@ -897,9 +867,6 @@ public function getShipAddressUsage() */ public function setShipAddressUsage($shipAddressUsage) { - if (is_null($shipAddressUsage)) { - throw new \InvalidArgumentException('non-nullable shipAddressUsage cannot be null'); - } $this->container['shipAddressUsage'] = $shipAddressUsage; return $this; @@ -924,9 +891,6 @@ public function getShipAddressUsageInd() */ 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( @@ -961,9 +925,6 @@ public function getShipNameIndicator() */ 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( @@ -998,9 +959,6 @@ public function getSuspiciousAccActivity() */ 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( @@ -1035,9 +993,6 @@ public function getTxnActivityDay() */ public function setTxnActivityDay($txnActivityDay) { - if (is_null($txnActivityDay)) { - throw new \InvalidArgumentException('non-nullable txnActivityDay cannot be null'); - } $this->container['txnActivityDay'] = $txnActivityDay; return $this; @@ -1062,9 +1017,6 @@ public function getTxnActivityYear() */ public function setTxnActivityYear($txnActivityYear) { - if (is_null($txnActivityYear)) { - throw new \InvalidArgumentException('non-nullable txnActivityYear cannot be null'); - } $this->container['txnActivityYear'] = $txnActivityYear; return $this; diff --git a/src/Adyen/Model/Payments/AdditionalData3DSecure.php b/src/Adyen/Model/Payments/AdditionalData3DSecure.php index e566098c9..84d875d9b 100644 --- a/src/Adyen/Model/Payments/AdditionalData3DSecure.php +++ b/src/Adyen/Model/Payments/AdditionalData3DSecure.php @@ -359,9 +359,6 @@ public function getAllow3DS2() */ public function setAllow3DS2($allow3DS2) { - if (is_null($allow3DS2)) { - throw new \InvalidArgumentException('non-nullable allow3DS2 cannot be null'); - } $this->container['allow3DS2'] = $allow3DS2; return $this; @@ -386,9 +383,6 @@ public function getChallengeWindowSize() */ 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( @@ -423,9 +417,6 @@ public function getExecuteThreeD() */ public function setExecuteThreeD($executeThreeD) { - if (is_null($executeThreeD)) { - throw new \InvalidArgumentException('non-nullable executeThreeD cannot be null'); - } $this->container['executeThreeD'] = $executeThreeD; return $this; @@ -450,9 +441,6 @@ public function getMpiImplementationType() */ public function setMpiImplementationType($mpiImplementationType) { - if (is_null($mpiImplementationType)) { - throw new \InvalidArgumentException('non-nullable mpiImplementationType cannot be null'); - } $this->container['mpiImplementationType'] = $mpiImplementationType; return $this; @@ -477,9 +465,6 @@ public function getScaExemption() */ public function setScaExemption($scaExemption) { - if (is_null($scaExemption)) { - throw new \InvalidArgumentException('non-nullable scaExemption cannot be null'); - } $this->container['scaExemption'] = $scaExemption; return $this; @@ -504,9 +489,6 @@ public function getThreeDSVersion() */ public function setThreeDSVersion($threeDSVersion) { - if (is_null($threeDSVersion)) { - throw new \InvalidArgumentException('non-nullable threeDSVersion cannot be null'); - } $this->container['threeDSVersion'] = $threeDSVersion; return $this; diff --git a/src/Adyen/Model/Payments/AdditionalDataAirline.php b/src/Adyen/Model/Payments/AdditionalDataAirline.php index 3c855939c..ce286b262 100644 --- a/src/Adyen/Model/Payments/AdditionalDataAirline.php +++ b/src/Adyen/Model/Payments/AdditionalDataAirline.php @@ -53,6 +53,7 @@ class AdditionalDataAirline implements ModelInterface, ArrayAccess, \JsonSeriali 'airlineCustomerReferenceNumber' => 'string', 'airlineDocumentType' => 'string', 'airlineFlightDate' => 'string', + 'airlineIssueDate' => 'string', 'airlineLegCarrierCode' => 'string', 'airlineLegClassOfTravel' => 'string', 'airlineLegDateOfTravel' => 'string', @@ -91,6 +92,7 @@ class AdditionalDataAirline implements ModelInterface, ArrayAccess, \JsonSeriali 'airlineCustomerReferenceNumber' => null, 'airlineDocumentType' => null, 'airlineFlightDate' => null, + 'airlineIssueDate' => null, 'airlineLegCarrierCode' => null, 'airlineLegClassOfTravel' => null, 'airlineLegDateOfTravel' => null, @@ -127,6 +129,7 @@ class AdditionalDataAirline implements ModelInterface, ArrayAccess, \JsonSeriali 'airlineCustomerReferenceNumber' => false, 'airlineDocumentType' => false, 'airlineFlightDate' => false, + 'airlineIssueDate' => false, 'airlineLegCarrierCode' => false, 'airlineLegClassOfTravel' => false, 'airlineLegDateOfTravel' => false, @@ -243,6 +246,7 @@ public function isNullableSetToNull(string $property): bool 'airlineCustomerReferenceNumber' => 'airline.customer_reference_number', 'airlineDocumentType' => 'airline.document_type', 'airlineFlightDate' => 'airline.flight_date', + 'airlineIssueDate' => 'airline.issue_date', 'airlineLegCarrierCode' => 'airline.leg.carrier_code', 'airlineLegClassOfTravel' => 'airline.leg.class_of_travel', 'airlineLegDateOfTravel' => 'airline.leg.date_of_travel', @@ -279,6 +283,7 @@ public function isNullableSetToNull(string $property): bool 'airlineCustomerReferenceNumber' => 'setAirlineCustomerReferenceNumber', 'airlineDocumentType' => 'setAirlineDocumentType', 'airlineFlightDate' => 'setAirlineFlightDate', + 'airlineIssueDate' => 'setAirlineIssueDate', 'airlineLegCarrierCode' => 'setAirlineLegCarrierCode', 'airlineLegClassOfTravel' => 'setAirlineLegClassOfTravel', 'airlineLegDateOfTravel' => 'setAirlineLegDateOfTravel', @@ -315,6 +320,7 @@ public function isNullableSetToNull(string $property): bool 'airlineCustomerReferenceNumber' => 'getAirlineCustomerReferenceNumber', 'airlineDocumentType' => 'getAirlineDocumentType', 'airlineFlightDate' => 'getAirlineFlightDate', + 'airlineIssueDate' => 'getAirlineIssueDate', 'airlineLegCarrierCode' => 'getAirlineLegCarrierCode', 'airlineLegClassOfTravel' => 'getAirlineLegClassOfTravel', 'airlineLegDateOfTravel' => 'getAirlineLegDateOfTravel', @@ -402,6 +408,7 @@ public function __construct(array $data = null) $this->setIfExists('airlineCustomerReferenceNumber', $data ?? [], null); $this->setIfExists('airlineDocumentType', $data ?? [], null); $this->setIfExists('airlineFlightDate', $data ?? [], null); + $this->setIfExists('airlineIssueDate', $data ?? [], null); $this->setIfExists('airlineLegCarrierCode', $data ?? [], null); $this->setIfExists('airlineLegClassOfTravel', $data ?? [], null); $this->setIfExists('airlineLegDateOfTravel', $data ?? [], null); @@ -487,9 +494,6 @@ public function getAirlineAgencyInvoiceNumber() */ public function setAirlineAgencyInvoiceNumber($airlineAgencyInvoiceNumber) { - if (is_null($airlineAgencyInvoiceNumber)) { - throw new \InvalidArgumentException('non-nullable airlineAgencyInvoiceNumber cannot be null'); - } $this->container['airlineAgencyInvoiceNumber'] = $airlineAgencyInvoiceNumber; return $this; @@ -514,9 +518,6 @@ public function getAirlineAgencyPlanName() */ public function setAirlineAgencyPlanName($airlineAgencyPlanName) { - if (is_null($airlineAgencyPlanName)) { - throw new \InvalidArgumentException('non-nullable airlineAgencyPlanName cannot be null'); - } $this->container['airlineAgencyPlanName'] = $airlineAgencyPlanName; return $this; @@ -541,9 +542,6 @@ public function getAirlineAirlineCode() */ public function setAirlineAirlineCode($airlineAirlineCode) { - if (is_null($airlineAirlineCode)) { - throw new \InvalidArgumentException('non-nullable airlineAirlineCode cannot be null'); - } $this->container['airlineAirlineCode'] = $airlineAirlineCode; return $this; @@ -568,9 +566,6 @@ public function getAirlineAirlineDesignatorCode() */ public function setAirlineAirlineDesignatorCode($airlineAirlineDesignatorCode) { - if (is_null($airlineAirlineDesignatorCode)) { - throw new \InvalidArgumentException('non-nullable airlineAirlineDesignatorCode cannot be null'); - } $this->container['airlineAirlineDesignatorCode'] = $airlineAirlineDesignatorCode; return $this; @@ -595,9 +590,6 @@ public function getAirlineBoardingFee() */ public function setAirlineBoardingFee($airlineBoardingFee) { - if (is_null($airlineBoardingFee)) { - throw new \InvalidArgumentException('non-nullable airlineBoardingFee cannot be null'); - } $this->container['airlineBoardingFee'] = $airlineBoardingFee; return $this; @@ -622,9 +614,6 @@ public function getAirlineComputerizedReservationSystem() */ public function setAirlineComputerizedReservationSystem($airlineComputerizedReservationSystem) { - if (is_null($airlineComputerizedReservationSystem)) { - throw new \InvalidArgumentException('non-nullable airlineComputerizedReservationSystem cannot be null'); - } $this->container['airlineComputerizedReservationSystem'] = $airlineComputerizedReservationSystem; return $this; @@ -649,9 +638,6 @@ public function getAirlineCustomerReferenceNumber() */ public function setAirlineCustomerReferenceNumber($airlineCustomerReferenceNumber) { - if (is_null($airlineCustomerReferenceNumber)) { - throw new \InvalidArgumentException('non-nullable airlineCustomerReferenceNumber cannot be null'); - } $this->container['airlineCustomerReferenceNumber'] = $airlineCustomerReferenceNumber; return $this; @@ -676,9 +662,6 @@ public function getAirlineDocumentType() */ public function setAirlineDocumentType($airlineDocumentType) { - if (is_null($airlineDocumentType)) { - throw new \InvalidArgumentException('non-nullable airlineDocumentType cannot be null'); - } $this->container['airlineDocumentType'] = $airlineDocumentType; return $this; @@ -703,14 +686,35 @@ public function getAirlineFlightDate() */ public function setAirlineFlightDate($airlineFlightDate) { - if (is_null($airlineFlightDate)) { - throw new \InvalidArgumentException('non-nullable airlineFlightDate cannot be null'); - } $this->container['airlineFlightDate'] = $airlineFlightDate; return $this; } + /** + * Gets airlineIssueDate + * + * @return string|null + */ + public function getAirlineIssueDate() + { + return $this->container['airlineIssueDate']; + } + + /** + * Sets airlineIssueDate + * + * @param string|null $airlineIssueDate The date that the ticket was issued to the passenger. * minLength: 6 characters * maxLength: 6 characters * Date format: YYMMDD + * + * @return self + */ + public function setAirlineIssueDate($airlineIssueDate) + { + $this->container['airlineIssueDate'] = $airlineIssueDate; + + return $this; + } + /** * Gets airlineLegCarrierCode * @@ -730,9 +734,6 @@ public function getAirlineLegCarrierCode() */ public function setAirlineLegCarrierCode($airlineLegCarrierCode) { - if (is_null($airlineLegCarrierCode)) { - throw new \InvalidArgumentException('non-nullable airlineLegCarrierCode cannot be null'); - } $this->container['airlineLegCarrierCode'] = $airlineLegCarrierCode; return $this; @@ -757,9 +758,6 @@ public function getAirlineLegClassOfTravel() */ public function setAirlineLegClassOfTravel($airlineLegClassOfTravel) { - if (is_null($airlineLegClassOfTravel)) { - throw new \InvalidArgumentException('non-nullable airlineLegClassOfTravel cannot be null'); - } $this->container['airlineLegClassOfTravel'] = $airlineLegClassOfTravel; return $this; @@ -784,9 +782,6 @@ public function getAirlineLegDateOfTravel() */ public function setAirlineLegDateOfTravel($airlineLegDateOfTravel) { - if (is_null($airlineLegDateOfTravel)) { - throw new \InvalidArgumentException('non-nullable airlineLegDateOfTravel cannot be null'); - } $this->container['airlineLegDateOfTravel'] = $airlineLegDateOfTravel; return $this; @@ -811,9 +806,6 @@ public function getAirlineLegDepartAirport() */ public function setAirlineLegDepartAirport($airlineLegDepartAirport) { - if (is_null($airlineLegDepartAirport)) { - throw new \InvalidArgumentException('non-nullable airlineLegDepartAirport cannot be null'); - } $this->container['airlineLegDepartAirport'] = $airlineLegDepartAirport; return $this; @@ -838,9 +830,6 @@ public function getAirlineLegDepartTax() */ public function setAirlineLegDepartTax($airlineLegDepartTax) { - if (is_null($airlineLegDepartTax)) { - throw new \InvalidArgumentException('non-nullable airlineLegDepartTax cannot be null'); - } $this->container['airlineLegDepartTax'] = $airlineLegDepartTax; return $this; @@ -865,9 +854,6 @@ public function getAirlineLegDestinationCode() */ public function setAirlineLegDestinationCode($airlineLegDestinationCode) { - if (is_null($airlineLegDestinationCode)) { - throw new \InvalidArgumentException('non-nullable airlineLegDestinationCode cannot be null'); - } $this->container['airlineLegDestinationCode'] = $airlineLegDestinationCode; return $this; @@ -892,9 +878,6 @@ public function getAirlineLegFareBaseCode() */ public function setAirlineLegFareBaseCode($airlineLegFareBaseCode) { - if (is_null($airlineLegFareBaseCode)) { - throw new \InvalidArgumentException('non-nullable airlineLegFareBaseCode cannot be null'); - } $this->container['airlineLegFareBaseCode'] = $airlineLegFareBaseCode; return $this; @@ -919,9 +902,6 @@ public function getAirlineLegFlightNumber() */ public function setAirlineLegFlightNumber($airlineLegFlightNumber) { - if (is_null($airlineLegFlightNumber)) { - throw new \InvalidArgumentException('non-nullable airlineLegFlightNumber cannot be null'); - } $this->container['airlineLegFlightNumber'] = $airlineLegFlightNumber; return $this; @@ -946,9 +926,6 @@ public function getAirlineLegStopOverCode() */ public function setAirlineLegStopOverCode($airlineLegStopOverCode) { - if (is_null($airlineLegStopOverCode)) { - throw new \InvalidArgumentException('non-nullable airlineLegStopOverCode cannot be null'); - } $this->container['airlineLegStopOverCode'] = $airlineLegStopOverCode; return $this; @@ -973,9 +950,6 @@ public function getAirlinePassengerDateOfBirth() */ public function setAirlinePassengerDateOfBirth($airlinePassengerDateOfBirth) { - if (is_null($airlinePassengerDateOfBirth)) { - throw new \InvalidArgumentException('non-nullable airlinePassengerDateOfBirth cannot be null'); - } $this->container['airlinePassengerDateOfBirth'] = $airlinePassengerDateOfBirth; return $this; @@ -1000,9 +974,6 @@ public function getAirlinePassengerFirstName() */ public function setAirlinePassengerFirstName($airlinePassengerFirstName) { - if (is_null($airlinePassengerFirstName)) { - throw new \InvalidArgumentException('non-nullable airlinePassengerFirstName cannot be null'); - } $this->container['airlinePassengerFirstName'] = $airlinePassengerFirstName; return $this; @@ -1027,9 +998,6 @@ public function getAirlinePassengerLastName() */ public function setAirlinePassengerLastName($airlinePassengerLastName) { - if (is_null($airlinePassengerLastName)) { - throw new \InvalidArgumentException('non-nullable airlinePassengerLastName cannot be null'); - } $this->container['airlinePassengerLastName'] = $airlinePassengerLastName; return $this; @@ -1054,9 +1022,6 @@ public function getAirlinePassengerTelephoneNumber() */ public function setAirlinePassengerTelephoneNumber($airlinePassengerTelephoneNumber) { - if (is_null($airlinePassengerTelephoneNumber)) { - throw new \InvalidArgumentException('non-nullable airlinePassengerTelephoneNumber cannot be null'); - } $this->container['airlinePassengerTelephoneNumber'] = $airlinePassengerTelephoneNumber; return $this; @@ -1081,9 +1046,6 @@ public function getAirlinePassengerTravellerType() */ public function setAirlinePassengerTravellerType($airlinePassengerTravellerType) { - if (is_null($airlinePassengerTravellerType)) { - throw new \InvalidArgumentException('non-nullable airlinePassengerTravellerType cannot be null'); - } $this->container['airlinePassengerTravellerType'] = $airlinePassengerTravellerType; return $this; @@ -1108,9 +1070,6 @@ public function getAirlinePassengerName() */ public function setAirlinePassengerName($airlinePassengerName) { - if (is_null($airlinePassengerName)) { - throw new \InvalidArgumentException('non-nullable airlinePassengerName cannot be null'); - } $this->container['airlinePassengerName'] = $airlinePassengerName; return $this; @@ -1135,9 +1094,6 @@ public function getAirlineTicketIssueAddress() */ public function setAirlineTicketIssueAddress($airlineTicketIssueAddress) { - if (is_null($airlineTicketIssueAddress)) { - throw new \InvalidArgumentException('non-nullable airlineTicketIssueAddress cannot be null'); - } $this->container['airlineTicketIssueAddress'] = $airlineTicketIssueAddress; return $this; @@ -1162,9 +1118,6 @@ public function getAirlineTicketNumber() */ public function setAirlineTicketNumber($airlineTicketNumber) { - if (is_null($airlineTicketNumber)) { - throw new \InvalidArgumentException('non-nullable airlineTicketNumber cannot be null'); - } $this->container['airlineTicketNumber'] = $airlineTicketNumber; return $this; @@ -1189,9 +1142,6 @@ public function getAirlineTravelAgencyCode() */ public function setAirlineTravelAgencyCode($airlineTravelAgencyCode) { - if (is_null($airlineTravelAgencyCode)) { - throw new \InvalidArgumentException('non-nullable airlineTravelAgencyCode cannot be null'); - } $this->container['airlineTravelAgencyCode'] = $airlineTravelAgencyCode; return $this; @@ -1216,9 +1166,6 @@ public function getAirlineTravelAgencyName() */ public function setAirlineTravelAgencyName($airlineTravelAgencyName) { - if (is_null($airlineTravelAgencyName)) { - throw new \InvalidArgumentException('non-nullable airlineTravelAgencyName cannot be null'); - } $this->container['airlineTravelAgencyName'] = $airlineTravelAgencyName; return $this; diff --git a/src/Adyen/Model/Payments/AdditionalDataCarRental.php b/src/Adyen/Model/Payments/AdditionalDataCarRental.php index e0a23f421..f3f24f1d4 100644 --- a/src/Adyen/Model/Payments/AdditionalDataCarRental.php +++ b/src/Adyen/Model/Payments/AdditionalDataCarRental.php @@ -449,9 +449,6 @@ public function getCarRentalCheckOutDate() */ public function setCarRentalCheckOutDate($carRentalCheckOutDate) { - if (is_null($carRentalCheckOutDate)) { - throw new \InvalidArgumentException('non-nullable carRentalCheckOutDate cannot be null'); - } $this->container['carRentalCheckOutDate'] = $carRentalCheckOutDate; return $this; @@ -476,9 +473,6 @@ public function getCarRentalCustomerServiceTollFreeNumber() */ public function setCarRentalCustomerServiceTollFreeNumber($carRentalCustomerServiceTollFreeNumber) { - if (is_null($carRentalCustomerServiceTollFreeNumber)) { - throw new \InvalidArgumentException('non-nullable carRentalCustomerServiceTollFreeNumber cannot be null'); - } $this->container['carRentalCustomerServiceTollFreeNumber'] = $carRentalCustomerServiceTollFreeNumber; return $this; @@ -503,9 +497,6 @@ public function getCarRentalDaysRented() */ public function setCarRentalDaysRented($carRentalDaysRented) { - if (is_null($carRentalDaysRented)) { - throw new \InvalidArgumentException('non-nullable carRentalDaysRented cannot be null'); - } $this->container['carRentalDaysRented'] = $carRentalDaysRented; return $this; @@ -530,9 +521,6 @@ public function getCarRentalFuelCharges() */ public function setCarRentalFuelCharges($carRentalFuelCharges) { - if (is_null($carRentalFuelCharges)) { - throw new \InvalidArgumentException('non-nullable carRentalFuelCharges cannot be null'); - } $this->container['carRentalFuelCharges'] = $carRentalFuelCharges; return $this; @@ -557,9 +545,6 @@ public function getCarRentalInsuranceCharges() */ public function setCarRentalInsuranceCharges($carRentalInsuranceCharges) { - if (is_null($carRentalInsuranceCharges)) { - throw new \InvalidArgumentException('non-nullable carRentalInsuranceCharges cannot be null'); - } $this->container['carRentalInsuranceCharges'] = $carRentalInsuranceCharges; return $this; @@ -584,9 +569,6 @@ public function getCarRentalLocationCity() */ public function setCarRentalLocationCity($carRentalLocationCity) { - if (is_null($carRentalLocationCity)) { - throw new \InvalidArgumentException('non-nullable carRentalLocationCity cannot be null'); - } $this->container['carRentalLocationCity'] = $carRentalLocationCity; return $this; @@ -611,9 +593,6 @@ public function getCarRentalLocationCountry() */ public function setCarRentalLocationCountry($carRentalLocationCountry) { - if (is_null($carRentalLocationCountry)) { - throw new \InvalidArgumentException('non-nullable carRentalLocationCountry cannot be null'); - } $this->container['carRentalLocationCountry'] = $carRentalLocationCountry; return $this; @@ -638,9 +617,6 @@ public function getCarRentalLocationStateProvince() */ public function setCarRentalLocationStateProvince($carRentalLocationStateProvince) { - if (is_null($carRentalLocationStateProvince)) { - throw new \InvalidArgumentException('non-nullable carRentalLocationStateProvince cannot be null'); - } $this->container['carRentalLocationStateProvince'] = $carRentalLocationStateProvince; return $this; @@ -665,9 +641,6 @@ public function getCarRentalNoShowIndicator() */ public function setCarRentalNoShowIndicator($carRentalNoShowIndicator) { - if (is_null($carRentalNoShowIndicator)) { - throw new \InvalidArgumentException('non-nullable carRentalNoShowIndicator cannot be null'); - } $this->container['carRentalNoShowIndicator'] = $carRentalNoShowIndicator; return $this; @@ -692,9 +665,6 @@ public function getCarRentalOneWayDropOffCharges() */ public function setCarRentalOneWayDropOffCharges($carRentalOneWayDropOffCharges) { - if (is_null($carRentalOneWayDropOffCharges)) { - throw new \InvalidArgumentException('non-nullable carRentalOneWayDropOffCharges cannot be null'); - } $this->container['carRentalOneWayDropOffCharges'] = $carRentalOneWayDropOffCharges; return $this; @@ -719,9 +689,6 @@ public function getCarRentalRate() */ public function setCarRentalRate($carRentalRate) { - if (is_null($carRentalRate)) { - throw new \InvalidArgumentException('non-nullable carRentalRate cannot be null'); - } $this->container['carRentalRate'] = $carRentalRate; return $this; @@ -746,9 +713,6 @@ public function getCarRentalRateIndicator() */ public function setCarRentalRateIndicator($carRentalRateIndicator) { - if (is_null($carRentalRateIndicator)) { - throw new \InvalidArgumentException('non-nullable carRentalRateIndicator cannot be null'); - } $this->container['carRentalRateIndicator'] = $carRentalRateIndicator; return $this; @@ -773,9 +737,6 @@ public function getCarRentalRentalAgreementNumber() */ public function setCarRentalRentalAgreementNumber($carRentalRentalAgreementNumber) { - if (is_null($carRentalRentalAgreementNumber)) { - throw new \InvalidArgumentException('non-nullable carRentalRentalAgreementNumber cannot be null'); - } $this->container['carRentalRentalAgreementNumber'] = $carRentalRentalAgreementNumber; return $this; @@ -800,9 +761,6 @@ public function getCarRentalRentalClassId() */ public function setCarRentalRentalClassId($carRentalRentalClassId) { - if (is_null($carRentalRentalClassId)) { - throw new \InvalidArgumentException('non-nullable carRentalRentalClassId cannot be null'); - } $this->container['carRentalRentalClassId'] = $carRentalRentalClassId; return $this; @@ -827,9 +785,6 @@ public function getCarRentalRenterName() */ public function setCarRentalRenterName($carRentalRenterName) { - if (is_null($carRentalRenterName)) { - throw new \InvalidArgumentException('non-nullable carRentalRenterName cannot be null'); - } $this->container['carRentalRenterName'] = $carRentalRenterName; return $this; @@ -854,9 +809,6 @@ public function getCarRentalReturnCity() */ public function setCarRentalReturnCity($carRentalReturnCity) { - if (is_null($carRentalReturnCity)) { - throw new \InvalidArgumentException('non-nullable carRentalReturnCity cannot be null'); - } $this->container['carRentalReturnCity'] = $carRentalReturnCity; return $this; @@ -881,9 +833,6 @@ public function getCarRentalReturnCountry() */ public function setCarRentalReturnCountry($carRentalReturnCountry) { - if (is_null($carRentalReturnCountry)) { - throw new \InvalidArgumentException('non-nullable carRentalReturnCountry cannot be null'); - } $this->container['carRentalReturnCountry'] = $carRentalReturnCountry; return $this; @@ -908,9 +857,6 @@ public function getCarRentalReturnDate() */ public function setCarRentalReturnDate($carRentalReturnDate) { - if (is_null($carRentalReturnDate)) { - throw new \InvalidArgumentException('non-nullable carRentalReturnDate cannot be null'); - } $this->container['carRentalReturnDate'] = $carRentalReturnDate; return $this; @@ -935,9 +881,6 @@ public function getCarRentalReturnLocationId() */ public function setCarRentalReturnLocationId($carRentalReturnLocationId) { - if (is_null($carRentalReturnLocationId)) { - throw new \InvalidArgumentException('non-nullable carRentalReturnLocationId cannot be null'); - } $this->container['carRentalReturnLocationId'] = $carRentalReturnLocationId; return $this; @@ -962,9 +905,6 @@ public function getCarRentalReturnStateProvince() */ public function setCarRentalReturnStateProvince($carRentalReturnStateProvince) { - if (is_null($carRentalReturnStateProvince)) { - throw new \InvalidArgumentException('non-nullable carRentalReturnStateProvince cannot be null'); - } $this->container['carRentalReturnStateProvince'] = $carRentalReturnStateProvince; return $this; @@ -989,9 +929,6 @@ public function getCarRentalTaxExemptIndicator() */ public function setCarRentalTaxExemptIndicator($carRentalTaxExemptIndicator) { - if (is_null($carRentalTaxExemptIndicator)) { - throw new \InvalidArgumentException('non-nullable carRentalTaxExemptIndicator cannot be null'); - } $this->container['carRentalTaxExemptIndicator'] = $carRentalTaxExemptIndicator; return $this; @@ -1016,9 +953,6 @@ public function getTravelEntertainmentAuthDataDuration() */ public function setTravelEntertainmentAuthDataDuration($travelEntertainmentAuthDataDuration) { - if (is_null($travelEntertainmentAuthDataDuration)) { - throw new \InvalidArgumentException('non-nullable travelEntertainmentAuthDataDuration cannot be null'); - } $this->container['travelEntertainmentAuthDataDuration'] = $travelEntertainmentAuthDataDuration; return $this; @@ -1043,9 +977,6 @@ public function getTravelEntertainmentAuthDataMarket() */ public function setTravelEntertainmentAuthDataMarket($travelEntertainmentAuthDataMarket) { - if (is_null($travelEntertainmentAuthDataMarket)) { - throw new \InvalidArgumentException('non-nullable travelEntertainmentAuthDataMarket cannot be null'); - } $this->container['travelEntertainmentAuthDataMarket'] = $travelEntertainmentAuthDataMarket; return $this; diff --git a/src/Adyen/Model/Payments/AdditionalDataCommon.php b/src/Adyen/Model/Payments/AdditionalDataCommon.php index 52816fabe..5f997bb37 100644 --- a/src/Adyen/Model/Payments/AdditionalDataCommon.php +++ b/src/Adyen/Model/Payments/AdditionalDataCommon.php @@ -423,9 +423,6 @@ public function getRequestedTestErrorResponseCode() */ public function setRequestedTestErrorResponseCode($requestedTestErrorResponseCode) { - if (is_null($requestedTestErrorResponseCode)) { - throw new \InvalidArgumentException('non-nullable requestedTestErrorResponseCode cannot be null'); - } $this->container['requestedTestErrorResponseCode'] = $requestedTestErrorResponseCode; return $this; @@ -450,9 +447,6 @@ public function getAllowPartialAuth() */ public function setAllowPartialAuth($allowPartialAuth) { - if (is_null($allowPartialAuth)) { - throw new \InvalidArgumentException('non-nullable allowPartialAuth cannot be null'); - } $this->container['allowPartialAuth'] = $allowPartialAuth; return $this; @@ -477,9 +471,6 @@ public function getAuthorisationType() */ public function setAuthorisationType($authorisationType) { - if (is_null($authorisationType)) { - throw new \InvalidArgumentException('non-nullable authorisationType cannot be null'); - } $this->container['authorisationType'] = $authorisationType; return $this; @@ -504,9 +495,6 @@ public function getCustomRoutingFlag() */ public function setCustomRoutingFlag($customRoutingFlag) { - if (is_null($customRoutingFlag)) { - throw new \InvalidArgumentException('non-nullable customRoutingFlag cannot be null'); - } $this->container['customRoutingFlag'] = $customRoutingFlag; return $this; @@ -531,9 +519,6 @@ public function getIndustryUsage() */ 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( @@ -568,9 +553,6 @@ public function getManualCapture() */ public function setManualCapture($manualCapture) { - if (is_null($manualCapture)) { - throw new \InvalidArgumentException('non-nullable manualCapture cannot be null'); - } $this->container['manualCapture'] = $manualCapture; return $this; @@ -595,9 +577,6 @@ public function getNetworkTxReference() */ public function setNetworkTxReference($networkTxReference) { - if (is_null($networkTxReference)) { - throw new \InvalidArgumentException('non-nullable networkTxReference cannot be null'); - } $this->container['networkTxReference'] = $networkTxReference; return $this; @@ -622,9 +601,6 @@ public function getOverwriteBrand() */ public function setOverwriteBrand($overwriteBrand) { - if (is_null($overwriteBrand)) { - throw new \InvalidArgumentException('non-nullable overwriteBrand cannot be null'); - } $this->container['overwriteBrand'] = $overwriteBrand; return $this; @@ -649,9 +625,6 @@ public function getSubMerchantCity() */ public function setSubMerchantCity($subMerchantCity) { - if (is_null($subMerchantCity)) { - throw new \InvalidArgumentException('non-nullable subMerchantCity cannot be null'); - } $this->container['subMerchantCity'] = $subMerchantCity; return $this; @@ -676,9 +649,6 @@ public function getSubMerchantCountry() */ public function setSubMerchantCountry($subMerchantCountry) { - if (is_null($subMerchantCountry)) { - throw new \InvalidArgumentException('non-nullable subMerchantCountry cannot be null'); - } $this->container['subMerchantCountry'] = $subMerchantCountry; return $this; @@ -703,9 +673,6 @@ public function getSubMerchantID() */ public function setSubMerchantID($subMerchantID) { - if (is_null($subMerchantID)) { - throw new \InvalidArgumentException('non-nullable subMerchantID cannot be null'); - } $this->container['subMerchantID'] = $subMerchantID; return $this; @@ -730,9 +697,6 @@ public function getSubMerchantName() */ public function setSubMerchantName($subMerchantName) { - if (is_null($subMerchantName)) { - throw new \InvalidArgumentException('non-nullable subMerchantName cannot be null'); - } $this->container['subMerchantName'] = $subMerchantName; return $this; @@ -757,9 +721,6 @@ public function getSubMerchantPostalCode() */ public function setSubMerchantPostalCode($subMerchantPostalCode) { - if (is_null($subMerchantPostalCode)) { - throw new \InvalidArgumentException('non-nullable subMerchantPostalCode cannot be null'); - } $this->container['subMerchantPostalCode'] = $subMerchantPostalCode; return $this; @@ -784,9 +745,6 @@ public function getSubMerchantState() */ public function setSubMerchantState($subMerchantState) { - if (is_null($subMerchantState)) { - throw new \InvalidArgumentException('non-nullable subMerchantState cannot be null'); - } $this->container['subMerchantState'] = $subMerchantState; return $this; @@ -811,9 +769,6 @@ public function getSubMerchantStreet() */ public function setSubMerchantStreet($subMerchantStreet) { - if (is_null($subMerchantStreet)) { - throw new \InvalidArgumentException('non-nullable subMerchantStreet cannot be null'); - } $this->container['subMerchantStreet'] = $subMerchantStreet; return $this; @@ -838,9 +793,6 @@ public function getSubMerchantTaxId() */ public function setSubMerchantTaxId($subMerchantTaxId) { - if (is_null($subMerchantTaxId)) { - throw new \InvalidArgumentException('non-nullable subMerchantTaxId cannot be null'); - } $this->container['subMerchantTaxId'] = $subMerchantTaxId; return $this; diff --git a/src/Adyen/Model/Payments/AdditionalDataLevel23.php b/src/Adyen/Model/Payments/AdditionalDataLevel23.php index 85f330d15..3d8585b61 100644 --- a/src/Adyen/Model/Payments/AdditionalDataLevel23.php +++ b/src/Adyen/Model/Payments/AdditionalDataLevel23.php @@ -407,9 +407,6 @@ public function getEnhancedSchemeDataCustomerReference() */ public function setEnhancedSchemeDataCustomerReference($enhancedSchemeDataCustomerReference) { - if (is_null($enhancedSchemeDataCustomerReference)) { - throw new \InvalidArgumentException('non-nullable enhancedSchemeDataCustomerReference cannot be null'); - } $this->container['enhancedSchemeDataCustomerReference'] = $enhancedSchemeDataCustomerReference; return $this; @@ -434,9 +431,6 @@ public function getEnhancedSchemeDataDestinationCountryCode() */ public function setEnhancedSchemeDataDestinationCountryCode($enhancedSchemeDataDestinationCountryCode) { - if (is_null($enhancedSchemeDataDestinationCountryCode)) { - throw new \InvalidArgumentException('non-nullable enhancedSchemeDataDestinationCountryCode cannot be null'); - } $this->container['enhancedSchemeDataDestinationCountryCode'] = $enhancedSchemeDataDestinationCountryCode; return $this; @@ -461,9 +455,6 @@ public function getEnhancedSchemeDataDestinationPostalCode() */ public function setEnhancedSchemeDataDestinationPostalCode($enhancedSchemeDataDestinationPostalCode) { - if (is_null($enhancedSchemeDataDestinationPostalCode)) { - throw new \InvalidArgumentException('non-nullable enhancedSchemeDataDestinationPostalCode cannot be null'); - } $this->container['enhancedSchemeDataDestinationPostalCode'] = $enhancedSchemeDataDestinationPostalCode; return $this; @@ -488,9 +479,6 @@ public function getEnhancedSchemeDataDestinationStateProvinceCode() */ public function setEnhancedSchemeDataDestinationStateProvinceCode($enhancedSchemeDataDestinationStateProvinceCode) { - if (is_null($enhancedSchemeDataDestinationStateProvinceCode)) { - throw new \InvalidArgumentException('non-nullable enhancedSchemeDataDestinationStateProvinceCode cannot be null'); - } $this->container['enhancedSchemeDataDestinationStateProvinceCode'] = $enhancedSchemeDataDestinationStateProvinceCode; return $this; @@ -515,9 +503,6 @@ public function getEnhancedSchemeDataDutyAmount() */ public function setEnhancedSchemeDataDutyAmount($enhancedSchemeDataDutyAmount) { - if (is_null($enhancedSchemeDataDutyAmount)) { - throw new \InvalidArgumentException('non-nullable enhancedSchemeDataDutyAmount cannot be null'); - } $this->container['enhancedSchemeDataDutyAmount'] = $enhancedSchemeDataDutyAmount; return $this; @@ -542,9 +527,6 @@ public function getEnhancedSchemeDataFreightAmount() */ public function setEnhancedSchemeDataFreightAmount($enhancedSchemeDataFreightAmount) { - if (is_null($enhancedSchemeDataFreightAmount)) { - throw new \InvalidArgumentException('non-nullable enhancedSchemeDataFreightAmount cannot be null'); - } $this->container['enhancedSchemeDataFreightAmount'] = $enhancedSchemeDataFreightAmount; return $this; @@ -569,9 +551,6 @@ public function getEnhancedSchemeDataItemDetailLineItemNrCommodityCode() */ public function setEnhancedSchemeDataItemDetailLineItemNrCommodityCode($enhancedSchemeDataItemDetailLineItemNrCommodityCode) { - if (is_null($enhancedSchemeDataItemDetailLineItemNrCommodityCode)) { - throw new \InvalidArgumentException('non-nullable enhancedSchemeDataItemDetailLineItemNrCommodityCode cannot be null'); - } $this->container['enhancedSchemeDataItemDetailLineItemNrCommodityCode'] = $enhancedSchemeDataItemDetailLineItemNrCommodityCode; return $this; @@ -596,9 +575,6 @@ public function getEnhancedSchemeDataItemDetailLineItemNrDescription() */ public function setEnhancedSchemeDataItemDetailLineItemNrDescription($enhancedSchemeDataItemDetailLineItemNrDescription) { - if (is_null($enhancedSchemeDataItemDetailLineItemNrDescription)) { - throw new \InvalidArgumentException('non-nullable enhancedSchemeDataItemDetailLineItemNrDescription cannot be null'); - } $this->container['enhancedSchemeDataItemDetailLineItemNrDescription'] = $enhancedSchemeDataItemDetailLineItemNrDescription; return $this; @@ -623,9 +599,6 @@ public function getEnhancedSchemeDataItemDetailLineItemNrDiscountAmount() */ public function setEnhancedSchemeDataItemDetailLineItemNrDiscountAmount($enhancedSchemeDataItemDetailLineItemNrDiscountAmount) { - if (is_null($enhancedSchemeDataItemDetailLineItemNrDiscountAmount)) { - throw new \InvalidArgumentException('non-nullable enhancedSchemeDataItemDetailLineItemNrDiscountAmount cannot be null'); - } $this->container['enhancedSchemeDataItemDetailLineItemNrDiscountAmount'] = $enhancedSchemeDataItemDetailLineItemNrDiscountAmount; return $this; @@ -650,9 +623,6 @@ public function getEnhancedSchemeDataItemDetailLineItemNrProductCode() */ public function setEnhancedSchemeDataItemDetailLineItemNrProductCode($enhancedSchemeDataItemDetailLineItemNrProductCode) { - if (is_null($enhancedSchemeDataItemDetailLineItemNrProductCode)) { - throw new \InvalidArgumentException('non-nullable enhancedSchemeDataItemDetailLineItemNrProductCode cannot be null'); - } $this->container['enhancedSchemeDataItemDetailLineItemNrProductCode'] = $enhancedSchemeDataItemDetailLineItemNrProductCode; return $this; @@ -677,9 +647,6 @@ public function getEnhancedSchemeDataItemDetailLineItemNrQuantity() */ public function setEnhancedSchemeDataItemDetailLineItemNrQuantity($enhancedSchemeDataItemDetailLineItemNrQuantity) { - if (is_null($enhancedSchemeDataItemDetailLineItemNrQuantity)) { - throw new \InvalidArgumentException('non-nullable enhancedSchemeDataItemDetailLineItemNrQuantity cannot be null'); - } $this->container['enhancedSchemeDataItemDetailLineItemNrQuantity'] = $enhancedSchemeDataItemDetailLineItemNrQuantity; return $this; @@ -704,9 +671,6 @@ public function getEnhancedSchemeDataItemDetailLineItemNrTotalAmount() */ public function setEnhancedSchemeDataItemDetailLineItemNrTotalAmount($enhancedSchemeDataItemDetailLineItemNrTotalAmount) { - if (is_null($enhancedSchemeDataItemDetailLineItemNrTotalAmount)) { - throw new \InvalidArgumentException('non-nullable enhancedSchemeDataItemDetailLineItemNrTotalAmount cannot be null'); - } $this->container['enhancedSchemeDataItemDetailLineItemNrTotalAmount'] = $enhancedSchemeDataItemDetailLineItemNrTotalAmount; return $this; @@ -731,9 +695,6 @@ public function getEnhancedSchemeDataItemDetailLineItemNrUnitOfMeasure() */ public function setEnhancedSchemeDataItemDetailLineItemNrUnitOfMeasure($enhancedSchemeDataItemDetailLineItemNrUnitOfMeasure) { - if (is_null($enhancedSchemeDataItemDetailLineItemNrUnitOfMeasure)) { - throw new \InvalidArgumentException('non-nullable enhancedSchemeDataItemDetailLineItemNrUnitOfMeasure cannot be null'); - } $this->container['enhancedSchemeDataItemDetailLineItemNrUnitOfMeasure'] = $enhancedSchemeDataItemDetailLineItemNrUnitOfMeasure; return $this; @@ -758,9 +719,6 @@ public function getEnhancedSchemeDataItemDetailLineItemNrUnitPrice() */ public function setEnhancedSchemeDataItemDetailLineItemNrUnitPrice($enhancedSchemeDataItemDetailLineItemNrUnitPrice) { - if (is_null($enhancedSchemeDataItemDetailLineItemNrUnitPrice)) { - throw new \InvalidArgumentException('non-nullable enhancedSchemeDataItemDetailLineItemNrUnitPrice cannot be null'); - } $this->container['enhancedSchemeDataItemDetailLineItemNrUnitPrice'] = $enhancedSchemeDataItemDetailLineItemNrUnitPrice; return $this; @@ -785,9 +743,6 @@ public function getEnhancedSchemeDataOrderDate() */ public function setEnhancedSchemeDataOrderDate($enhancedSchemeDataOrderDate) { - if (is_null($enhancedSchemeDataOrderDate)) { - throw new \InvalidArgumentException('non-nullable enhancedSchemeDataOrderDate cannot be null'); - } $this->container['enhancedSchemeDataOrderDate'] = $enhancedSchemeDataOrderDate; return $this; @@ -812,9 +767,6 @@ public function getEnhancedSchemeDataShipFromPostalCode() */ public function setEnhancedSchemeDataShipFromPostalCode($enhancedSchemeDataShipFromPostalCode) { - if (is_null($enhancedSchemeDataShipFromPostalCode)) { - throw new \InvalidArgumentException('non-nullable enhancedSchemeDataShipFromPostalCode cannot be null'); - } $this->container['enhancedSchemeDataShipFromPostalCode'] = $enhancedSchemeDataShipFromPostalCode; return $this; @@ -839,9 +791,6 @@ public function getEnhancedSchemeDataTotalTaxAmount() */ public function setEnhancedSchemeDataTotalTaxAmount($enhancedSchemeDataTotalTaxAmount) { - if (is_null($enhancedSchemeDataTotalTaxAmount)) { - throw new \InvalidArgumentException('non-nullable enhancedSchemeDataTotalTaxAmount cannot be null'); - } $this->container['enhancedSchemeDataTotalTaxAmount'] = $enhancedSchemeDataTotalTaxAmount; return $this; diff --git a/src/Adyen/Model/Payments/AdditionalDataLodging.php b/src/Adyen/Model/Payments/AdditionalDataLodging.php index 936d38b1a..b909017d9 100644 --- a/src/Adyen/Model/Payments/AdditionalDataLodging.php +++ b/src/Adyen/Model/Payments/AdditionalDataLodging.php @@ -44,6 +44,7 @@ class AdditionalDataLodging implements ModelInterface, ArrayAccess, \JsonSeriali * @var string[] */ protected static $openAPITypes = [ + 'lodgingSpecialProgramCode' => 'string', 'lodgingCheckInDate' => 'string', 'lodgingCheckOutDate' => 'string', 'lodgingCustomerServiceTollFreeNumber' => 'string', @@ -70,6 +71,7 @@ class AdditionalDataLodging implements ModelInterface, ArrayAccess, \JsonSeriali * @psalm-var array */ protected static $openAPIFormats = [ + 'lodgingSpecialProgramCode' => null, 'lodgingCheckInDate' => null, 'lodgingCheckOutDate' => null, 'lodgingCustomerServiceTollFreeNumber' => null, @@ -94,6 +96,7 @@ class AdditionalDataLodging implements ModelInterface, ArrayAccess, \JsonSeriali * @var boolean[] */ protected static $openAPINullables = [ + 'lodgingSpecialProgramCode' => false, 'lodgingCheckInDate' => false, 'lodgingCheckOutDate' => false, 'lodgingCustomerServiceTollFreeNumber' => false, @@ -198,6 +201,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ + 'lodgingSpecialProgramCode' => 'lodging.SpecialProgramCode', 'lodgingCheckInDate' => 'lodging.checkInDate', 'lodgingCheckOutDate' => 'lodging.checkOutDate', 'lodgingCustomerServiceTollFreeNumber' => 'lodging.customerServiceTollFreeNumber', @@ -222,6 +226,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ + 'lodgingSpecialProgramCode' => 'setLodgingSpecialProgramCode', 'lodgingCheckInDate' => 'setLodgingCheckInDate', 'lodgingCheckOutDate' => 'setLodgingCheckOutDate', 'lodgingCustomerServiceTollFreeNumber' => 'setLodgingCustomerServiceTollFreeNumber', @@ -246,6 +251,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ + 'lodgingSpecialProgramCode' => 'getLodgingSpecialProgramCode', 'lodgingCheckInDate' => 'getLodgingCheckInDate', 'lodgingCheckOutDate' => 'getLodgingCheckOutDate', 'lodgingCustomerServiceTollFreeNumber' => 'getLodgingCustomerServiceTollFreeNumber', @@ -321,6 +327,7 @@ public function getModelName() */ public function __construct(array $data = null) { + $this->setIfExists('lodgingSpecialProgramCode', $data ?? [], null); $this->setIfExists('lodgingCheckInDate', $data ?? [], null); $this->setIfExists('lodgingCheckOutDate', $data ?? [], null); $this->setIfExists('lodgingCustomerServiceTollFreeNumber', $data ?? [], null); @@ -381,6 +388,30 @@ public function valid() } + /** + * Gets lodgingSpecialProgramCode + * + * @return string|null + */ + public function getLodgingSpecialProgramCode() + { + return $this->container['lodgingSpecialProgramCode']; + } + + /** + * Sets lodgingSpecialProgramCode + * + * @param string|null $lodgingSpecialProgramCode A code that corresponds to the category of lodging charges for the payment. Possible values: * 1: Lodging * 2: No show reservation * 3: Advanced deposit + * + * @return self + */ + public function setLodgingSpecialProgramCode($lodgingSpecialProgramCode) + { + $this->container['lodgingSpecialProgramCode'] = $lodgingSpecialProgramCode; + + return $this; + } + /** * Gets lodgingCheckInDate * @@ -400,9 +431,6 @@ public function getLodgingCheckInDate() */ public function setLodgingCheckInDate($lodgingCheckInDate) { - if (is_null($lodgingCheckInDate)) { - throw new \InvalidArgumentException('non-nullable lodgingCheckInDate cannot be null'); - } $this->container['lodgingCheckInDate'] = $lodgingCheckInDate; return $this; @@ -427,9 +455,6 @@ public function getLodgingCheckOutDate() */ public function setLodgingCheckOutDate($lodgingCheckOutDate) { - if (is_null($lodgingCheckOutDate)) { - throw new \InvalidArgumentException('non-nullable lodgingCheckOutDate cannot be null'); - } $this->container['lodgingCheckOutDate'] = $lodgingCheckOutDate; return $this; @@ -454,9 +479,6 @@ public function getLodgingCustomerServiceTollFreeNumber() */ public function setLodgingCustomerServiceTollFreeNumber($lodgingCustomerServiceTollFreeNumber) { - if (is_null($lodgingCustomerServiceTollFreeNumber)) { - throw new \InvalidArgumentException('non-nullable lodgingCustomerServiceTollFreeNumber cannot be null'); - } $this->container['lodgingCustomerServiceTollFreeNumber'] = $lodgingCustomerServiceTollFreeNumber; return $this; @@ -481,9 +503,6 @@ public function getLodgingFireSafetyActIndicator() */ public function setLodgingFireSafetyActIndicator($lodgingFireSafetyActIndicator) { - if (is_null($lodgingFireSafetyActIndicator)) { - throw new \InvalidArgumentException('non-nullable lodgingFireSafetyActIndicator cannot be null'); - } $this->container['lodgingFireSafetyActIndicator'] = $lodgingFireSafetyActIndicator; return $this; @@ -508,9 +527,6 @@ public function getLodgingFolioCashAdvances() */ public function setLodgingFolioCashAdvances($lodgingFolioCashAdvances) { - if (is_null($lodgingFolioCashAdvances)) { - throw new \InvalidArgumentException('non-nullable lodgingFolioCashAdvances cannot be null'); - } $this->container['lodgingFolioCashAdvances'] = $lodgingFolioCashAdvances; return $this; @@ -535,9 +551,6 @@ public function getLodgingFolioNumber() */ public function setLodgingFolioNumber($lodgingFolioNumber) { - if (is_null($lodgingFolioNumber)) { - throw new \InvalidArgumentException('non-nullable lodgingFolioNumber cannot be null'); - } $this->container['lodgingFolioNumber'] = $lodgingFolioNumber; return $this; @@ -562,9 +575,6 @@ public function getLodgingFoodBeverageCharges() */ public function setLodgingFoodBeverageCharges($lodgingFoodBeverageCharges) { - if (is_null($lodgingFoodBeverageCharges)) { - throw new \InvalidArgumentException('non-nullable lodgingFoodBeverageCharges cannot be null'); - } $this->container['lodgingFoodBeverageCharges'] = $lodgingFoodBeverageCharges; return $this; @@ -589,9 +599,6 @@ public function getLodgingNoShowIndicator() */ public function setLodgingNoShowIndicator($lodgingNoShowIndicator) { - if (is_null($lodgingNoShowIndicator)) { - throw new \InvalidArgumentException('non-nullable lodgingNoShowIndicator cannot be null'); - } $this->container['lodgingNoShowIndicator'] = $lodgingNoShowIndicator; return $this; @@ -616,9 +623,6 @@ public function getLodgingPrepaidExpenses() */ public function setLodgingPrepaidExpenses($lodgingPrepaidExpenses) { - if (is_null($lodgingPrepaidExpenses)) { - throw new \InvalidArgumentException('non-nullable lodgingPrepaidExpenses cannot be null'); - } $this->container['lodgingPrepaidExpenses'] = $lodgingPrepaidExpenses; return $this; @@ -643,9 +647,6 @@ public function getLodgingPropertyPhoneNumber() */ public function setLodgingPropertyPhoneNumber($lodgingPropertyPhoneNumber) { - if (is_null($lodgingPropertyPhoneNumber)) { - throw new \InvalidArgumentException('non-nullable lodgingPropertyPhoneNumber cannot be null'); - } $this->container['lodgingPropertyPhoneNumber'] = $lodgingPropertyPhoneNumber; return $this; @@ -670,9 +671,6 @@ public function getLodgingRoom1NumberOfNights() */ public function setLodgingRoom1NumberOfNights($lodgingRoom1NumberOfNights) { - if (is_null($lodgingRoom1NumberOfNights)) { - throw new \InvalidArgumentException('non-nullable lodgingRoom1NumberOfNights cannot be null'); - } $this->container['lodgingRoom1NumberOfNights'] = $lodgingRoom1NumberOfNights; return $this; @@ -697,9 +695,6 @@ public function getLodgingRoom1Rate() */ public function setLodgingRoom1Rate($lodgingRoom1Rate) { - if (is_null($lodgingRoom1Rate)) { - throw new \InvalidArgumentException('non-nullable lodgingRoom1Rate cannot be null'); - } $this->container['lodgingRoom1Rate'] = $lodgingRoom1Rate; return $this; @@ -724,9 +719,6 @@ public function getLodgingTotalRoomTax() */ public function setLodgingTotalRoomTax($lodgingTotalRoomTax) { - if (is_null($lodgingTotalRoomTax)) { - throw new \InvalidArgumentException('non-nullable lodgingTotalRoomTax cannot be null'); - } $this->container['lodgingTotalRoomTax'] = $lodgingTotalRoomTax; return $this; @@ -751,9 +743,6 @@ public function getLodgingTotalTax() */ public function setLodgingTotalTax($lodgingTotalTax) { - if (is_null($lodgingTotalTax)) { - throw new \InvalidArgumentException('non-nullable lodgingTotalTax cannot be null'); - } $this->container['lodgingTotalTax'] = $lodgingTotalTax; return $this; @@ -778,9 +767,6 @@ public function getTravelEntertainmentAuthDataDuration() */ public function setTravelEntertainmentAuthDataDuration($travelEntertainmentAuthDataDuration) { - if (is_null($travelEntertainmentAuthDataDuration)) { - throw new \InvalidArgumentException('non-nullable travelEntertainmentAuthDataDuration cannot be null'); - } $this->container['travelEntertainmentAuthDataDuration'] = $travelEntertainmentAuthDataDuration; return $this; @@ -805,9 +791,6 @@ public function getTravelEntertainmentAuthDataMarket() */ public function setTravelEntertainmentAuthDataMarket($travelEntertainmentAuthDataMarket) { - if (is_null($travelEntertainmentAuthDataMarket)) { - throw new \InvalidArgumentException('non-nullable travelEntertainmentAuthDataMarket cannot be null'); - } $this->container['travelEntertainmentAuthDataMarket'] = $travelEntertainmentAuthDataMarket; return $this; diff --git a/src/Adyen/Model/Payments/AdditionalDataModifications.php b/src/Adyen/Model/Payments/AdditionalDataModifications.php index 65668707f..960fe85cc 100644 --- a/src/Adyen/Model/Payments/AdditionalDataModifications.php +++ b/src/Adyen/Model/Payments/AdditionalDataModifications.php @@ -295,9 +295,6 @@ public function getInstallmentPaymentDataSelectedInstallmentOption() */ public function setInstallmentPaymentDataSelectedInstallmentOption($installmentPaymentDataSelectedInstallmentOption) { - if (is_null($installmentPaymentDataSelectedInstallmentOption)) { - throw new \InvalidArgumentException('non-nullable installmentPaymentDataSelectedInstallmentOption cannot be null'); - } $this->container['installmentPaymentDataSelectedInstallmentOption'] = $installmentPaymentDataSelectedInstallmentOption; return $this; diff --git a/src/Adyen/Model/Payments/AdditionalDataOpenInvoice.php b/src/Adyen/Model/Payments/AdditionalDataOpenInvoice.php index 220f8736b..08c0fd15f 100644 --- a/src/Adyen/Model/Payments/AdditionalDataOpenInvoice.php +++ b/src/Adyen/Model/Payments/AdditionalDataOpenInvoice.php @@ -414,9 +414,6 @@ public function getOpeninvoicedataMerchantData() */ public function setOpeninvoicedataMerchantData($openinvoicedataMerchantData) { - if (is_null($openinvoicedataMerchantData)) { - throw new \InvalidArgumentException('non-nullable openinvoicedataMerchantData cannot be null'); - } $this->container['openinvoicedataMerchantData'] = $openinvoicedataMerchantData; return $this; @@ -441,9 +438,6 @@ public function getOpeninvoicedataNumberOfLines() */ public function setOpeninvoicedataNumberOfLines($openinvoicedataNumberOfLines) { - if (is_null($openinvoicedataNumberOfLines)) { - throw new \InvalidArgumentException('non-nullable openinvoicedataNumberOfLines cannot be null'); - } $this->container['openinvoicedataNumberOfLines'] = $openinvoicedataNumberOfLines; return $this; @@ -468,9 +462,6 @@ public function getOpeninvoicedataRecipientFirstName() */ public function setOpeninvoicedataRecipientFirstName($openinvoicedataRecipientFirstName) { - if (is_null($openinvoicedataRecipientFirstName)) { - throw new \InvalidArgumentException('non-nullable openinvoicedataRecipientFirstName cannot be null'); - } $this->container['openinvoicedataRecipientFirstName'] = $openinvoicedataRecipientFirstName; return $this; @@ -495,9 +486,6 @@ public function getOpeninvoicedataRecipientLastName() */ public function setOpeninvoicedataRecipientLastName($openinvoicedataRecipientLastName) { - if (is_null($openinvoicedataRecipientLastName)) { - throw new \InvalidArgumentException('non-nullable openinvoicedataRecipientLastName cannot be null'); - } $this->container['openinvoicedataRecipientLastName'] = $openinvoicedataRecipientLastName; return $this; @@ -522,9 +510,6 @@ public function getOpeninvoicedataLineItemNrCurrencyCode() */ public function setOpeninvoicedataLineItemNrCurrencyCode($openinvoicedataLineItemNrCurrencyCode) { - if (is_null($openinvoicedataLineItemNrCurrencyCode)) { - throw new \InvalidArgumentException('non-nullable openinvoicedataLineItemNrCurrencyCode cannot be null'); - } $this->container['openinvoicedataLineItemNrCurrencyCode'] = $openinvoicedataLineItemNrCurrencyCode; return $this; @@ -549,9 +534,6 @@ public function getOpeninvoicedataLineItemNrDescription() */ public function setOpeninvoicedataLineItemNrDescription($openinvoicedataLineItemNrDescription) { - if (is_null($openinvoicedataLineItemNrDescription)) { - throw new \InvalidArgumentException('non-nullable openinvoicedataLineItemNrDescription cannot be null'); - } $this->container['openinvoicedataLineItemNrDescription'] = $openinvoicedataLineItemNrDescription; return $this; @@ -576,9 +558,6 @@ public function getOpeninvoicedataLineItemNrItemAmount() */ public function setOpeninvoicedataLineItemNrItemAmount($openinvoicedataLineItemNrItemAmount) { - if (is_null($openinvoicedataLineItemNrItemAmount)) { - throw new \InvalidArgumentException('non-nullable openinvoicedataLineItemNrItemAmount cannot be null'); - } $this->container['openinvoicedataLineItemNrItemAmount'] = $openinvoicedataLineItemNrItemAmount; return $this; @@ -603,9 +582,6 @@ public function getOpeninvoicedataLineItemNrItemId() */ public function setOpeninvoicedataLineItemNrItemId($openinvoicedataLineItemNrItemId) { - if (is_null($openinvoicedataLineItemNrItemId)) { - throw new \InvalidArgumentException('non-nullable openinvoicedataLineItemNrItemId cannot be null'); - } $this->container['openinvoicedataLineItemNrItemId'] = $openinvoicedataLineItemNrItemId; return $this; @@ -630,9 +606,6 @@ public function getOpeninvoicedataLineItemNrItemVatAmount() */ public function setOpeninvoicedataLineItemNrItemVatAmount($openinvoicedataLineItemNrItemVatAmount) { - if (is_null($openinvoicedataLineItemNrItemVatAmount)) { - throw new \InvalidArgumentException('non-nullable openinvoicedataLineItemNrItemVatAmount cannot be null'); - } $this->container['openinvoicedataLineItemNrItemVatAmount'] = $openinvoicedataLineItemNrItemVatAmount; return $this; @@ -657,9 +630,6 @@ public function getOpeninvoicedataLineItemNrItemVatPercentage() */ public function setOpeninvoicedataLineItemNrItemVatPercentage($openinvoicedataLineItemNrItemVatPercentage) { - if (is_null($openinvoicedataLineItemNrItemVatPercentage)) { - throw new \InvalidArgumentException('non-nullable openinvoicedataLineItemNrItemVatPercentage cannot be null'); - } $this->container['openinvoicedataLineItemNrItemVatPercentage'] = $openinvoicedataLineItemNrItemVatPercentage; return $this; @@ -684,9 +654,6 @@ public function getOpeninvoicedataLineItemNrNumberOfItems() */ public function setOpeninvoicedataLineItemNrNumberOfItems($openinvoicedataLineItemNrNumberOfItems) { - if (is_null($openinvoicedataLineItemNrNumberOfItems)) { - throw new \InvalidArgumentException('non-nullable openinvoicedataLineItemNrNumberOfItems cannot be null'); - } $this->container['openinvoicedataLineItemNrNumberOfItems'] = $openinvoicedataLineItemNrNumberOfItems; return $this; @@ -711,9 +678,6 @@ public function getOpeninvoicedataLineItemNrReturnShippingCompany() */ public function setOpeninvoicedataLineItemNrReturnShippingCompany($openinvoicedataLineItemNrReturnShippingCompany) { - if (is_null($openinvoicedataLineItemNrReturnShippingCompany)) { - throw new \InvalidArgumentException('non-nullable openinvoicedataLineItemNrReturnShippingCompany cannot be null'); - } $this->container['openinvoicedataLineItemNrReturnShippingCompany'] = $openinvoicedataLineItemNrReturnShippingCompany; return $this; @@ -738,9 +702,6 @@ public function getOpeninvoicedataLineItemNrReturnTrackingNumber() */ public function setOpeninvoicedataLineItemNrReturnTrackingNumber($openinvoicedataLineItemNrReturnTrackingNumber) { - if (is_null($openinvoicedataLineItemNrReturnTrackingNumber)) { - throw new \InvalidArgumentException('non-nullable openinvoicedataLineItemNrReturnTrackingNumber cannot be null'); - } $this->container['openinvoicedataLineItemNrReturnTrackingNumber'] = $openinvoicedataLineItemNrReturnTrackingNumber; return $this; @@ -765,9 +726,6 @@ public function getOpeninvoicedataLineItemNrReturnTrackingUri() */ public function setOpeninvoicedataLineItemNrReturnTrackingUri($openinvoicedataLineItemNrReturnTrackingUri) { - if (is_null($openinvoicedataLineItemNrReturnTrackingUri)) { - throw new \InvalidArgumentException('non-nullable openinvoicedataLineItemNrReturnTrackingUri cannot be null'); - } $this->container['openinvoicedataLineItemNrReturnTrackingUri'] = $openinvoicedataLineItemNrReturnTrackingUri; return $this; @@ -792,9 +750,6 @@ public function getOpeninvoicedataLineItemNrShippingCompany() */ public function setOpeninvoicedataLineItemNrShippingCompany($openinvoicedataLineItemNrShippingCompany) { - if (is_null($openinvoicedataLineItemNrShippingCompany)) { - throw new \InvalidArgumentException('non-nullable openinvoicedataLineItemNrShippingCompany cannot be null'); - } $this->container['openinvoicedataLineItemNrShippingCompany'] = $openinvoicedataLineItemNrShippingCompany; return $this; @@ -819,9 +774,6 @@ public function getOpeninvoicedataLineItemNrShippingMethod() */ public function setOpeninvoicedataLineItemNrShippingMethod($openinvoicedataLineItemNrShippingMethod) { - if (is_null($openinvoicedataLineItemNrShippingMethod)) { - throw new \InvalidArgumentException('non-nullable openinvoicedataLineItemNrShippingMethod cannot be null'); - } $this->container['openinvoicedataLineItemNrShippingMethod'] = $openinvoicedataLineItemNrShippingMethod; return $this; @@ -846,9 +798,6 @@ public function getOpeninvoicedataLineItemNrTrackingNumber() */ public function setOpeninvoicedataLineItemNrTrackingNumber($openinvoicedataLineItemNrTrackingNumber) { - if (is_null($openinvoicedataLineItemNrTrackingNumber)) { - throw new \InvalidArgumentException('non-nullable openinvoicedataLineItemNrTrackingNumber cannot be null'); - } $this->container['openinvoicedataLineItemNrTrackingNumber'] = $openinvoicedataLineItemNrTrackingNumber; return $this; @@ -873,9 +822,6 @@ public function getOpeninvoicedataLineItemNrTrackingUri() */ public function setOpeninvoicedataLineItemNrTrackingUri($openinvoicedataLineItemNrTrackingUri) { - if (is_null($openinvoicedataLineItemNrTrackingUri)) { - throw new \InvalidArgumentException('non-nullable openinvoicedataLineItemNrTrackingUri cannot be null'); - } $this->container['openinvoicedataLineItemNrTrackingUri'] = $openinvoicedataLineItemNrTrackingUri; return $this; diff --git a/src/Adyen/Model/Payments/AdditionalDataOpi.php b/src/Adyen/Model/Payments/AdditionalDataOpi.php index 6fedc7acc..57eef93c8 100644 --- a/src/Adyen/Model/Payments/AdditionalDataOpi.php +++ b/src/Adyen/Model/Payments/AdditionalDataOpi.php @@ -295,9 +295,6 @@ public function getOpiIncludeTransToken() */ public function setOpiIncludeTransToken($opiIncludeTransToken) { - if (is_null($opiIncludeTransToken)) { - throw new \InvalidArgumentException('non-nullable opiIncludeTransToken cannot be null'); - } $this->container['opiIncludeTransToken'] = $opiIncludeTransToken; return $this; diff --git a/src/Adyen/Model/Payments/AdditionalDataRatepay.php b/src/Adyen/Model/Payments/AdditionalDataRatepay.php index 308f27a66..0b234a1b7 100644 --- a/src/Adyen/Model/Payments/AdditionalDataRatepay.php +++ b/src/Adyen/Model/Payments/AdditionalDataRatepay.php @@ -344,9 +344,6 @@ public function getRatepayInstallmentAmount() */ public function setRatepayInstallmentAmount($ratepayInstallmentAmount) { - if (is_null($ratepayInstallmentAmount)) { - throw new \InvalidArgumentException('non-nullable ratepayInstallmentAmount cannot be null'); - } $this->container['ratepayInstallmentAmount'] = $ratepayInstallmentAmount; return $this; @@ -371,9 +368,6 @@ public function getRatepayInterestRate() */ public function setRatepayInterestRate($ratepayInterestRate) { - if (is_null($ratepayInterestRate)) { - throw new \InvalidArgumentException('non-nullable ratepayInterestRate cannot be null'); - } $this->container['ratepayInterestRate'] = $ratepayInterestRate; return $this; @@ -398,9 +392,6 @@ public function getRatepayLastInstallmentAmount() */ public function setRatepayLastInstallmentAmount($ratepayLastInstallmentAmount) { - if (is_null($ratepayLastInstallmentAmount)) { - throw new \InvalidArgumentException('non-nullable ratepayLastInstallmentAmount cannot be null'); - } $this->container['ratepayLastInstallmentAmount'] = $ratepayLastInstallmentAmount; return $this; @@ -425,9 +416,6 @@ public function getRatepayPaymentFirstday() */ public function setRatepayPaymentFirstday($ratepayPaymentFirstday) { - if (is_null($ratepayPaymentFirstday)) { - throw new \InvalidArgumentException('non-nullable ratepayPaymentFirstday cannot be null'); - } $this->container['ratepayPaymentFirstday'] = $ratepayPaymentFirstday; return $this; @@ -452,9 +440,6 @@ public function getRatepaydataDeliveryDate() */ public function setRatepaydataDeliveryDate($ratepaydataDeliveryDate) { - if (is_null($ratepaydataDeliveryDate)) { - throw new \InvalidArgumentException('non-nullable ratepaydataDeliveryDate cannot be null'); - } $this->container['ratepaydataDeliveryDate'] = $ratepaydataDeliveryDate; return $this; @@ -479,9 +464,6 @@ public function getRatepaydataDueDate() */ public function setRatepaydataDueDate($ratepaydataDueDate) { - if (is_null($ratepaydataDueDate)) { - throw new \InvalidArgumentException('non-nullable ratepaydataDueDate cannot be null'); - } $this->container['ratepaydataDueDate'] = $ratepaydataDueDate; return $this; @@ -506,9 +488,6 @@ public function getRatepaydataInvoiceDate() */ public function setRatepaydataInvoiceDate($ratepaydataInvoiceDate) { - if (is_null($ratepaydataInvoiceDate)) { - throw new \InvalidArgumentException('non-nullable ratepaydataInvoiceDate cannot be null'); - } $this->container['ratepaydataInvoiceDate'] = $ratepaydataInvoiceDate; return $this; @@ -533,9 +512,6 @@ public function getRatepaydataInvoiceId() */ public function setRatepaydataInvoiceId($ratepaydataInvoiceId) { - if (is_null($ratepaydataInvoiceId)) { - throw new \InvalidArgumentException('non-nullable ratepaydataInvoiceId cannot be null'); - } $this->container['ratepaydataInvoiceId'] = $ratepaydataInvoiceId; return $this; diff --git a/src/Adyen/Model/Payments/AdditionalDataRetry.php b/src/Adyen/Model/Payments/AdditionalDataRetry.php index c7e93972a..c1261ab31 100644 --- a/src/Adyen/Model/Payments/AdditionalDataRetry.php +++ b/src/Adyen/Model/Payments/AdditionalDataRetry.php @@ -309,9 +309,6 @@ public function getRetryChainAttemptNumber() */ public function setRetryChainAttemptNumber($retryChainAttemptNumber) { - if (is_null($retryChainAttemptNumber)) { - throw new \InvalidArgumentException('non-nullable retryChainAttemptNumber cannot be null'); - } $this->container['retryChainAttemptNumber'] = $retryChainAttemptNumber; return $this; @@ -336,9 +333,6 @@ public function getRetryOrderAttemptNumber() */ public function setRetryOrderAttemptNumber($retryOrderAttemptNumber) { - if (is_null($retryOrderAttemptNumber)) { - throw new \InvalidArgumentException('non-nullable retryOrderAttemptNumber cannot be null'); - } $this->container['retryOrderAttemptNumber'] = $retryOrderAttemptNumber; return $this; @@ -363,9 +357,6 @@ public function getRetrySkipRetry() */ public function setRetrySkipRetry($retrySkipRetry) { - if (is_null($retrySkipRetry)) { - throw new \InvalidArgumentException('non-nullable retrySkipRetry cannot be null'); - } $this->container['retrySkipRetry'] = $retrySkipRetry; return $this; diff --git a/src/Adyen/Model/Payments/AdditionalDataRisk.php b/src/Adyen/Model/Payments/AdditionalDataRisk.php index 52fde27f6..b8d3aceed 100644 --- a/src/Adyen/Model/Payments/AdditionalDataRisk.php +++ b/src/Adyen/Model/Payments/AdditionalDataRisk.php @@ -435,9 +435,6 @@ public function getRiskdataCustomFieldName() */ public function setRiskdataCustomFieldName($riskdataCustomFieldName) { - if (is_null($riskdataCustomFieldName)) { - throw new \InvalidArgumentException('non-nullable riskdataCustomFieldName cannot be null'); - } $this->container['riskdataCustomFieldName'] = $riskdataCustomFieldName; return $this; @@ -462,9 +459,6 @@ public function getRiskdataBasketItemItemNrAmountPerItem() */ public function setRiskdataBasketItemItemNrAmountPerItem($riskdataBasketItemItemNrAmountPerItem) { - if (is_null($riskdataBasketItemItemNrAmountPerItem)) { - throw new \InvalidArgumentException('non-nullable riskdataBasketItemItemNrAmountPerItem cannot be null'); - } $this->container['riskdataBasketItemItemNrAmountPerItem'] = $riskdataBasketItemItemNrAmountPerItem; return $this; @@ -489,9 +483,6 @@ public function getRiskdataBasketItemItemNrBrand() */ public function setRiskdataBasketItemItemNrBrand($riskdataBasketItemItemNrBrand) { - if (is_null($riskdataBasketItemItemNrBrand)) { - throw new \InvalidArgumentException('non-nullable riskdataBasketItemItemNrBrand cannot be null'); - } $this->container['riskdataBasketItemItemNrBrand'] = $riskdataBasketItemItemNrBrand; return $this; @@ -516,9 +507,6 @@ public function getRiskdataBasketItemItemNrCategory() */ public function setRiskdataBasketItemItemNrCategory($riskdataBasketItemItemNrCategory) { - if (is_null($riskdataBasketItemItemNrCategory)) { - throw new \InvalidArgumentException('non-nullable riskdataBasketItemItemNrCategory cannot be null'); - } $this->container['riskdataBasketItemItemNrCategory'] = $riskdataBasketItemItemNrCategory; return $this; @@ -543,9 +531,6 @@ public function getRiskdataBasketItemItemNrColor() */ public function setRiskdataBasketItemItemNrColor($riskdataBasketItemItemNrColor) { - if (is_null($riskdataBasketItemItemNrColor)) { - throw new \InvalidArgumentException('non-nullable riskdataBasketItemItemNrColor cannot be null'); - } $this->container['riskdataBasketItemItemNrColor'] = $riskdataBasketItemItemNrColor; return $this; @@ -570,9 +555,6 @@ public function getRiskdataBasketItemItemNrCurrency() */ public function setRiskdataBasketItemItemNrCurrency($riskdataBasketItemItemNrCurrency) { - if (is_null($riskdataBasketItemItemNrCurrency)) { - throw new \InvalidArgumentException('non-nullable riskdataBasketItemItemNrCurrency cannot be null'); - } $this->container['riskdataBasketItemItemNrCurrency'] = $riskdataBasketItemItemNrCurrency; return $this; @@ -597,9 +579,6 @@ public function getRiskdataBasketItemItemNrItemID() */ public function setRiskdataBasketItemItemNrItemID($riskdataBasketItemItemNrItemID) { - if (is_null($riskdataBasketItemItemNrItemID)) { - throw new \InvalidArgumentException('non-nullable riskdataBasketItemItemNrItemID cannot be null'); - } $this->container['riskdataBasketItemItemNrItemID'] = $riskdataBasketItemItemNrItemID; return $this; @@ -624,9 +603,6 @@ public function getRiskdataBasketItemItemNrManufacturer() */ public function setRiskdataBasketItemItemNrManufacturer($riskdataBasketItemItemNrManufacturer) { - if (is_null($riskdataBasketItemItemNrManufacturer)) { - throw new \InvalidArgumentException('non-nullable riskdataBasketItemItemNrManufacturer cannot be null'); - } $this->container['riskdataBasketItemItemNrManufacturer'] = $riskdataBasketItemItemNrManufacturer; return $this; @@ -651,9 +627,6 @@ public function getRiskdataBasketItemItemNrProductTitle() */ public function setRiskdataBasketItemItemNrProductTitle($riskdataBasketItemItemNrProductTitle) { - if (is_null($riskdataBasketItemItemNrProductTitle)) { - throw new \InvalidArgumentException('non-nullable riskdataBasketItemItemNrProductTitle cannot be null'); - } $this->container['riskdataBasketItemItemNrProductTitle'] = $riskdataBasketItemItemNrProductTitle; return $this; @@ -678,9 +651,6 @@ public function getRiskdataBasketItemItemNrQuantity() */ public function setRiskdataBasketItemItemNrQuantity($riskdataBasketItemItemNrQuantity) { - if (is_null($riskdataBasketItemItemNrQuantity)) { - throw new \InvalidArgumentException('non-nullable riskdataBasketItemItemNrQuantity cannot be null'); - } $this->container['riskdataBasketItemItemNrQuantity'] = $riskdataBasketItemItemNrQuantity; return $this; @@ -705,9 +675,6 @@ public function getRiskdataBasketItemItemNrReceiverEmail() */ public function setRiskdataBasketItemItemNrReceiverEmail($riskdataBasketItemItemNrReceiverEmail) { - if (is_null($riskdataBasketItemItemNrReceiverEmail)) { - throw new \InvalidArgumentException('non-nullable riskdataBasketItemItemNrReceiverEmail cannot be null'); - } $this->container['riskdataBasketItemItemNrReceiverEmail'] = $riskdataBasketItemItemNrReceiverEmail; return $this; @@ -732,9 +699,6 @@ public function getRiskdataBasketItemItemNrSize() */ public function setRiskdataBasketItemItemNrSize($riskdataBasketItemItemNrSize) { - if (is_null($riskdataBasketItemItemNrSize)) { - throw new \InvalidArgumentException('non-nullable riskdataBasketItemItemNrSize cannot be null'); - } $this->container['riskdataBasketItemItemNrSize'] = $riskdataBasketItemItemNrSize; return $this; @@ -759,9 +723,6 @@ public function getRiskdataBasketItemItemNrSku() */ public function setRiskdataBasketItemItemNrSku($riskdataBasketItemItemNrSku) { - if (is_null($riskdataBasketItemItemNrSku)) { - throw new \InvalidArgumentException('non-nullable riskdataBasketItemItemNrSku cannot be null'); - } $this->container['riskdataBasketItemItemNrSku'] = $riskdataBasketItemItemNrSku; return $this; @@ -786,9 +747,6 @@ public function getRiskdataBasketItemItemNrUpc() */ public function setRiskdataBasketItemItemNrUpc($riskdataBasketItemItemNrUpc) { - if (is_null($riskdataBasketItemItemNrUpc)) { - throw new \InvalidArgumentException('non-nullable riskdataBasketItemItemNrUpc cannot be null'); - } $this->container['riskdataBasketItemItemNrUpc'] = $riskdataBasketItemItemNrUpc; return $this; @@ -813,9 +771,6 @@ public function getRiskdataPromotionsPromotionItemNrPromotionCode() */ public function setRiskdataPromotionsPromotionItemNrPromotionCode($riskdataPromotionsPromotionItemNrPromotionCode) { - if (is_null($riskdataPromotionsPromotionItemNrPromotionCode)) { - throw new \InvalidArgumentException('non-nullable riskdataPromotionsPromotionItemNrPromotionCode cannot be null'); - } $this->container['riskdataPromotionsPromotionItemNrPromotionCode'] = $riskdataPromotionsPromotionItemNrPromotionCode; return $this; @@ -840,9 +795,6 @@ public function getRiskdataPromotionsPromotionItemNrPromotionDiscountAmount() */ public function setRiskdataPromotionsPromotionItemNrPromotionDiscountAmount($riskdataPromotionsPromotionItemNrPromotionDiscountAmount) { - if (is_null($riskdataPromotionsPromotionItemNrPromotionDiscountAmount)) { - throw new \InvalidArgumentException('non-nullable riskdataPromotionsPromotionItemNrPromotionDiscountAmount cannot be null'); - } $this->container['riskdataPromotionsPromotionItemNrPromotionDiscountAmount'] = $riskdataPromotionsPromotionItemNrPromotionDiscountAmount; return $this; @@ -867,9 +819,6 @@ public function getRiskdataPromotionsPromotionItemNrPromotionDiscountCurrency() */ public function setRiskdataPromotionsPromotionItemNrPromotionDiscountCurrency($riskdataPromotionsPromotionItemNrPromotionDiscountCurrency) { - if (is_null($riskdataPromotionsPromotionItemNrPromotionDiscountCurrency)) { - throw new \InvalidArgumentException('non-nullable riskdataPromotionsPromotionItemNrPromotionDiscountCurrency cannot be null'); - } $this->container['riskdataPromotionsPromotionItemNrPromotionDiscountCurrency'] = $riskdataPromotionsPromotionItemNrPromotionDiscountCurrency; return $this; @@ -894,9 +843,6 @@ public function getRiskdataPromotionsPromotionItemNrPromotionDiscountPercentage( */ public function setRiskdataPromotionsPromotionItemNrPromotionDiscountPercentage($riskdataPromotionsPromotionItemNrPromotionDiscountPercentage) { - if (is_null($riskdataPromotionsPromotionItemNrPromotionDiscountPercentage)) { - throw new \InvalidArgumentException('non-nullable riskdataPromotionsPromotionItemNrPromotionDiscountPercentage cannot be null'); - } $this->container['riskdataPromotionsPromotionItemNrPromotionDiscountPercentage'] = $riskdataPromotionsPromotionItemNrPromotionDiscountPercentage; return $this; @@ -921,9 +867,6 @@ public function getRiskdataPromotionsPromotionItemNrPromotionName() */ public function setRiskdataPromotionsPromotionItemNrPromotionName($riskdataPromotionsPromotionItemNrPromotionName) { - if (is_null($riskdataPromotionsPromotionItemNrPromotionName)) { - throw new \InvalidArgumentException('non-nullable riskdataPromotionsPromotionItemNrPromotionName cannot be null'); - } $this->container['riskdataPromotionsPromotionItemNrPromotionName'] = $riskdataPromotionsPromotionItemNrPromotionName; return $this; @@ -948,9 +891,6 @@ public function getRiskdataRiskProfileReference() */ public function setRiskdataRiskProfileReference($riskdataRiskProfileReference) { - if (is_null($riskdataRiskProfileReference)) { - throw new \InvalidArgumentException('non-nullable riskdataRiskProfileReference cannot be null'); - } $this->container['riskdataRiskProfileReference'] = $riskdataRiskProfileReference; return $this; @@ -975,9 +915,6 @@ public function getRiskdataSkipRisk() */ public function setRiskdataSkipRisk($riskdataSkipRisk) { - if (is_null($riskdataSkipRisk)) { - throw new \InvalidArgumentException('non-nullable riskdataSkipRisk cannot be null'); - } $this->container['riskdataSkipRisk'] = $riskdataSkipRisk; return $this; diff --git a/src/Adyen/Model/Payments/AdditionalDataRiskStandalone.php b/src/Adyen/Model/Payments/AdditionalDataRiskStandalone.php index 0b9f5ea59..772bcf1d0 100644 --- a/src/Adyen/Model/Payments/AdditionalDataRiskStandalone.php +++ b/src/Adyen/Model/Payments/AdditionalDataRiskStandalone.php @@ -393,9 +393,6 @@ public function getPayPalCountryCode() */ public function setPayPalCountryCode($payPalCountryCode) { - if (is_null($payPalCountryCode)) { - throw new \InvalidArgumentException('non-nullable payPalCountryCode cannot be null'); - } $this->container['payPalCountryCode'] = $payPalCountryCode; return $this; @@ -420,9 +417,6 @@ public function getPayPalEmailId() */ public function setPayPalEmailId($payPalEmailId) { - if (is_null($payPalEmailId)) { - throw new \InvalidArgumentException('non-nullable payPalEmailId cannot be null'); - } $this->container['payPalEmailId'] = $payPalEmailId; return $this; @@ -447,9 +441,6 @@ public function getPayPalFirstName() */ public function setPayPalFirstName($payPalFirstName) { - if (is_null($payPalFirstName)) { - throw new \InvalidArgumentException('non-nullable payPalFirstName cannot be null'); - } $this->container['payPalFirstName'] = $payPalFirstName; return $this; @@ -474,9 +465,6 @@ public function getPayPalLastName() */ public function setPayPalLastName($payPalLastName) { - if (is_null($payPalLastName)) { - throw new \InvalidArgumentException('non-nullable payPalLastName cannot be null'); - } $this->container['payPalLastName'] = $payPalLastName; return $this; @@ -501,9 +489,6 @@ public function getPayPalPayerId() */ public function setPayPalPayerId($payPalPayerId) { - if (is_null($payPalPayerId)) { - throw new \InvalidArgumentException('non-nullable payPalPayerId cannot be null'); - } $this->container['payPalPayerId'] = $payPalPayerId; return $this; @@ -528,9 +513,6 @@ public function getPayPalPhone() */ public function setPayPalPhone($payPalPhone) { - if (is_null($payPalPhone)) { - throw new \InvalidArgumentException('non-nullable payPalPhone cannot be null'); - } $this->container['payPalPhone'] = $payPalPhone; return $this; @@ -555,9 +537,6 @@ public function getPayPalProtectionEligibility() */ public function setPayPalProtectionEligibility($payPalProtectionEligibility) { - if (is_null($payPalProtectionEligibility)) { - throw new \InvalidArgumentException('non-nullable payPalProtectionEligibility cannot be null'); - } $this->container['payPalProtectionEligibility'] = $payPalProtectionEligibility; return $this; @@ -582,9 +561,6 @@ public function getPayPalTransactionId() */ public function setPayPalTransactionId($payPalTransactionId) { - if (is_null($payPalTransactionId)) { - throw new \InvalidArgumentException('non-nullable payPalTransactionId cannot be null'); - } $this->container['payPalTransactionId'] = $payPalTransactionId; return $this; @@ -609,9 +585,6 @@ public function getAvsResultRaw() */ public function setAvsResultRaw($avsResultRaw) { - if (is_null($avsResultRaw)) { - throw new \InvalidArgumentException('non-nullable avsResultRaw cannot be null'); - } $this->container['avsResultRaw'] = $avsResultRaw; return $this; @@ -630,15 +603,12 @@ public function getBin() /** * 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). + * @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/online-payments/tokenization). * * @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; @@ -663,9 +633,6 @@ public function getCvcResultRaw() */ public function setCvcResultRaw($cvcResultRaw) { - if (is_null($cvcResultRaw)) { - throw new \InvalidArgumentException('non-nullable cvcResultRaw cannot be null'); - } $this->container['cvcResultRaw'] = $cvcResultRaw; return $this; @@ -690,9 +657,6 @@ public function getRiskToken() */ public function setRiskToken($riskToken) { - if (is_null($riskToken)) { - throw new \InvalidArgumentException('non-nullable riskToken cannot be null'); - } $this->container['riskToken'] = $riskToken; return $this; @@ -717,9 +681,6 @@ public function getThreeDAuthenticated() */ public function setThreeDAuthenticated($threeDAuthenticated) { - if (is_null($threeDAuthenticated)) { - throw new \InvalidArgumentException('non-nullable threeDAuthenticated cannot be null'); - } $this->container['threeDAuthenticated'] = $threeDAuthenticated; return $this; @@ -744,9 +705,6 @@ public function getThreeDOffered() */ public function setThreeDOffered($threeDOffered) { - if (is_null($threeDOffered)) { - throw new \InvalidArgumentException('non-nullable threeDOffered cannot be null'); - } $this->container['threeDOffered'] = $threeDOffered; return $this; @@ -771,9 +729,6 @@ public function getTokenDataType() */ public function setTokenDataType($tokenDataType) { - if (is_null($tokenDataType)) { - throw new \InvalidArgumentException('non-nullable tokenDataType cannot be null'); - } $this->container['tokenDataType'] = $tokenDataType; return $this; diff --git a/src/Adyen/Model/Payments/AdditionalDataSubMerchant.php b/src/Adyen/Model/Payments/AdditionalDataSubMerchant.php index 7613d5678..76a2a10cc 100644 --- a/src/Adyen/Model/Payments/AdditionalDataSubMerchant.php +++ b/src/Adyen/Model/Payments/AdditionalDataSubMerchant.php @@ -358,9 +358,6 @@ public function getSubMerchantNumberOfSubSellers() */ public function setSubMerchantNumberOfSubSellers($subMerchantNumberOfSubSellers) { - if (is_null($subMerchantNumberOfSubSellers)) { - throw new \InvalidArgumentException('non-nullable subMerchantNumberOfSubSellers cannot be null'); - } $this->container['subMerchantNumberOfSubSellers'] = $subMerchantNumberOfSubSellers; return $this; @@ -385,9 +382,6 @@ public function getSubMerchantSubSellerSubSellerNrCity() */ public function setSubMerchantSubSellerSubSellerNrCity($subMerchantSubSellerSubSellerNrCity) { - if (is_null($subMerchantSubSellerSubSellerNrCity)) { - throw new \InvalidArgumentException('non-nullable subMerchantSubSellerSubSellerNrCity cannot be null'); - } $this->container['subMerchantSubSellerSubSellerNrCity'] = $subMerchantSubSellerSubSellerNrCity; return $this; @@ -412,9 +406,6 @@ public function getSubMerchantSubSellerSubSellerNrCountry() */ public function setSubMerchantSubSellerSubSellerNrCountry($subMerchantSubSellerSubSellerNrCountry) { - if (is_null($subMerchantSubSellerSubSellerNrCountry)) { - throw new \InvalidArgumentException('non-nullable subMerchantSubSellerSubSellerNrCountry cannot be null'); - } $this->container['subMerchantSubSellerSubSellerNrCountry'] = $subMerchantSubSellerSubSellerNrCountry; return $this; @@ -439,9 +430,6 @@ public function getSubMerchantSubSellerSubSellerNrId() */ public function setSubMerchantSubSellerSubSellerNrId($subMerchantSubSellerSubSellerNrId) { - if (is_null($subMerchantSubSellerSubSellerNrId)) { - throw new \InvalidArgumentException('non-nullable subMerchantSubSellerSubSellerNrId cannot be null'); - } $this->container['subMerchantSubSellerSubSellerNrId'] = $subMerchantSubSellerSubSellerNrId; return $this; @@ -466,9 +454,6 @@ public function getSubMerchantSubSellerSubSellerNrMcc() */ public function setSubMerchantSubSellerSubSellerNrMcc($subMerchantSubSellerSubSellerNrMcc) { - if (is_null($subMerchantSubSellerSubSellerNrMcc)) { - throw new \InvalidArgumentException('non-nullable subMerchantSubSellerSubSellerNrMcc cannot be null'); - } $this->container['subMerchantSubSellerSubSellerNrMcc'] = $subMerchantSubSellerSubSellerNrMcc; return $this; @@ -493,9 +478,6 @@ public function getSubMerchantSubSellerSubSellerNrName() */ public function setSubMerchantSubSellerSubSellerNrName($subMerchantSubSellerSubSellerNrName) { - if (is_null($subMerchantSubSellerSubSellerNrName)) { - throw new \InvalidArgumentException('non-nullable subMerchantSubSellerSubSellerNrName cannot be null'); - } $this->container['subMerchantSubSellerSubSellerNrName'] = $subMerchantSubSellerSubSellerNrName; return $this; @@ -520,9 +502,6 @@ public function getSubMerchantSubSellerSubSellerNrPostalCode() */ public function setSubMerchantSubSellerSubSellerNrPostalCode($subMerchantSubSellerSubSellerNrPostalCode) { - if (is_null($subMerchantSubSellerSubSellerNrPostalCode)) { - throw new \InvalidArgumentException('non-nullable subMerchantSubSellerSubSellerNrPostalCode cannot be null'); - } $this->container['subMerchantSubSellerSubSellerNrPostalCode'] = $subMerchantSubSellerSubSellerNrPostalCode; return $this; @@ -547,9 +526,6 @@ public function getSubMerchantSubSellerSubSellerNrState() */ public function setSubMerchantSubSellerSubSellerNrState($subMerchantSubSellerSubSellerNrState) { - if (is_null($subMerchantSubSellerSubSellerNrState)) { - throw new \InvalidArgumentException('non-nullable subMerchantSubSellerSubSellerNrState cannot be null'); - } $this->container['subMerchantSubSellerSubSellerNrState'] = $subMerchantSubSellerSubSellerNrState; return $this; @@ -574,9 +550,6 @@ public function getSubMerchantSubSellerSubSellerNrStreet() */ public function setSubMerchantSubSellerSubSellerNrStreet($subMerchantSubSellerSubSellerNrStreet) { - if (is_null($subMerchantSubSellerSubSellerNrStreet)) { - throw new \InvalidArgumentException('non-nullable subMerchantSubSellerSubSellerNrStreet cannot be null'); - } $this->container['subMerchantSubSellerSubSellerNrStreet'] = $subMerchantSubSellerSubSellerNrStreet; return $this; @@ -601,9 +574,6 @@ public function getSubMerchantSubSellerSubSellerNrTaxId() */ public function setSubMerchantSubSellerSubSellerNrTaxId($subMerchantSubSellerSubSellerNrTaxId) { - if (is_null($subMerchantSubSellerSubSellerNrTaxId)) { - throw new \InvalidArgumentException('non-nullable subMerchantSubSellerSubSellerNrTaxId cannot be null'); - } $this->container['subMerchantSubSellerSubSellerNrTaxId'] = $subMerchantSubSellerSubSellerNrTaxId; return $this; diff --git a/src/Adyen/Model/Payments/AdditionalDataTemporaryServices.php b/src/Adyen/Model/Payments/AdditionalDataTemporaryServices.php index 8e4c0e060..b8aec31a3 100644 --- a/src/Adyen/Model/Payments/AdditionalDataTemporaryServices.php +++ b/src/Adyen/Model/Payments/AdditionalDataTemporaryServices.php @@ -351,9 +351,6 @@ public function getEnhancedSchemeDataCustomerReference() */ public function setEnhancedSchemeDataCustomerReference($enhancedSchemeDataCustomerReference) { - if (is_null($enhancedSchemeDataCustomerReference)) { - throw new \InvalidArgumentException('non-nullable enhancedSchemeDataCustomerReference cannot be null'); - } $this->container['enhancedSchemeDataCustomerReference'] = $enhancedSchemeDataCustomerReference; return $this; @@ -378,9 +375,6 @@ public function getEnhancedSchemeDataEmployeeName() */ public function setEnhancedSchemeDataEmployeeName($enhancedSchemeDataEmployeeName) { - if (is_null($enhancedSchemeDataEmployeeName)) { - throw new \InvalidArgumentException('non-nullable enhancedSchemeDataEmployeeName cannot be null'); - } $this->container['enhancedSchemeDataEmployeeName'] = $enhancedSchemeDataEmployeeName; return $this; @@ -405,9 +399,6 @@ public function getEnhancedSchemeDataJobDescription() */ public function setEnhancedSchemeDataJobDescription($enhancedSchemeDataJobDescription) { - if (is_null($enhancedSchemeDataJobDescription)) { - throw new \InvalidArgumentException('non-nullable enhancedSchemeDataJobDescription cannot be null'); - } $this->container['enhancedSchemeDataJobDescription'] = $enhancedSchemeDataJobDescription; return $this; @@ -432,9 +423,6 @@ public function getEnhancedSchemeDataRegularHoursRate() */ public function setEnhancedSchemeDataRegularHoursRate($enhancedSchemeDataRegularHoursRate) { - if (is_null($enhancedSchemeDataRegularHoursRate)) { - throw new \InvalidArgumentException('non-nullable enhancedSchemeDataRegularHoursRate cannot be null'); - } $this->container['enhancedSchemeDataRegularHoursRate'] = $enhancedSchemeDataRegularHoursRate; return $this; @@ -459,9 +447,6 @@ public function getEnhancedSchemeDataRegularHoursWorked() */ public function setEnhancedSchemeDataRegularHoursWorked($enhancedSchemeDataRegularHoursWorked) { - if (is_null($enhancedSchemeDataRegularHoursWorked)) { - throw new \InvalidArgumentException('non-nullable enhancedSchemeDataRegularHoursWorked cannot be null'); - } $this->container['enhancedSchemeDataRegularHoursWorked'] = $enhancedSchemeDataRegularHoursWorked; return $this; @@ -486,9 +471,6 @@ public function getEnhancedSchemeDataRequestName() */ public function setEnhancedSchemeDataRequestName($enhancedSchemeDataRequestName) { - if (is_null($enhancedSchemeDataRequestName)) { - throw new \InvalidArgumentException('non-nullable enhancedSchemeDataRequestName cannot be null'); - } $this->container['enhancedSchemeDataRequestName'] = $enhancedSchemeDataRequestName; return $this; @@ -513,9 +495,6 @@ public function getEnhancedSchemeDataTempStartDate() */ public function setEnhancedSchemeDataTempStartDate($enhancedSchemeDataTempStartDate) { - if (is_null($enhancedSchemeDataTempStartDate)) { - throw new \InvalidArgumentException('non-nullable enhancedSchemeDataTempStartDate cannot be null'); - } $this->container['enhancedSchemeDataTempStartDate'] = $enhancedSchemeDataTempStartDate; return $this; @@ -540,9 +519,6 @@ public function getEnhancedSchemeDataTempWeekEnding() */ public function setEnhancedSchemeDataTempWeekEnding($enhancedSchemeDataTempWeekEnding) { - if (is_null($enhancedSchemeDataTempWeekEnding)) { - throw new \InvalidArgumentException('non-nullable enhancedSchemeDataTempWeekEnding cannot be null'); - } $this->container['enhancedSchemeDataTempWeekEnding'] = $enhancedSchemeDataTempWeekEnding; return $this; @@ -567,9 +543,6 @@ public function getEnhancedSchemeDataTotalTaxAmount() */ public function setEnhancedSchemeDataTotalTaxAmount($enhancedSchemeDataTotalTaxAmount) { - if (is_null($enhancedSchemeDataTotalTaxAmount)) { - throw new \InvalidArgumentException('non-nullable enhancedSchemeDataTotalTaxAmount cannot be null'); - } $this->container['enhancedSchemeDataTotalTaxAmount'] = $enhancedSchemeDataTotalTaxAmount; return $this; diff --git a/src/Adyen/Model/Payments/AdditionalDataWallets.php b/src/Adyen/Model/Payments/AdditionalDataWallets.php index 541b2947b..be347e9dc 100644 --- a/src/Adyen/Model/Payments/AdditionalDataWallets.php +++ b/src/Adyen/Model/Payments/AdditionalDataWallets.php @@ -330,9 +330,6 @@ public function getAndroidpayToken() */ public function setAndroidpayToken($androidpayToken) { - if (is_null($androidpayToken)) { - throw new \InvalidArgumentException('non-nullable androidpayToken cannot be null'); - } $this->container['androidpayToken'] = $androidpayToken; return $this; @@ -357,9 +354,6 @@ public function getMasterpassTransactionId() */ public function setMasterpassTransactionId($masterpassTransactionId) { - if (is_null($masterpassTransactionId)) { - throw new \InvalidArgumentException('non-nullable masterpassTransactionId cannot be null'); - } $this->container['masterpassTransactionId'] = $masterpassTransactionId; return $this; @@ -384,9 +378,6 @@ public function getPaymentToken() */ public function setPaymentToken($paymentToken) { - if (is_null($paymentToken)) { - throw new \InvalidArgumentException('non-nullable paymentToken cannot be null'); - } $this->container['paymentToken'] = $paymentToken; return $this; @@ -411,9 +402,6 @@ public function getPaywithgoogleToken() */ public function setPaywithgoogleToken($paywithgoogleToken) { - if (is_null($paywithgoogleToken)) { - throw new \InvalidArgumentException('non-nullable paywithgoogleToken cannot be null'); - } $this->container['paywithgoogleToken'] = $paywithgoogleToken; return $this; @@ -438,9 +426,6 @@ public function getSamsungpayToken() */ public function setSamsungpayToken($samsungpayToken) { - if (is_null($samsungpayToken)) { - throw new \InvalidArgumentException('non-nullable samsungpayToken cannot be null'); - } $this->container['samsungpayToken'] = $samsungpayToken; return $this; @@ -465,9 +450,6 @@ public function getVisacheckoutCallId() */ public function setVisacheckoutCallId($visacheckoutCallId) { - if (is_null($visacheckoutCallId)) { - throw new \InvalidArgumentException('non-nullable visacheckoutCallId cannot be null'); - } $this->container['visacheckoutCallId'] = $visacheckoutCallId; return $this; diff --git a/src/Adyen/Model/Payments/Address.php b/src/Adyen/Model/Payments/Address.php index c8ac11460..ebce29b3b 100644 --- a/src/Adyen/Model/Payments/Address.php +++ b/src/Adyen/Model/Payments/Address.php @@ -345,9 +345,6 @@ public function getCity() */ public function setCity($city) { - if (is_null($city)) { - throw new \InvalidArgumentException('non-nullable city cannot be null'); - } $this->container['city'] = $city; return $this; @@ -372,9 +369,6 @@ public function getCountry() */ public function setCountry($country) { - if (is_null($country)) { - throw new \InvalidArgumentException('non-nullable country cannot be null'); - } $this->container['country'] = $country; return $this; @@ -399,9 +393,6 @@ public function getHouseNumberOrName() */ public function setHouseNumberOrName($houseNumberOrName) { - if (is_null($houseNumberOrName)) { - throw new \InvalidArgumentException('non-nullable houseNumberOrName cannot be null'); - } $this->container['houseNumberOrName'] = $houseNumberOrName; return $this; @@ -426,9 +417,6 @@ public function getPostalCode() */ public function setPostalCode($postalCode) { - if (is_null($postalCode)) { - throw new \InvalidArgumentException('non-nullable postalCode cannot be null'); - } $this->container['postalCode'] = $postalCode; return $this; @@ -453,9 +441,6 @@ public function getStateOrProvince() */ public function setStateOrProvince($stateOrProvince) { - if (is_null($stateOrProvince)) { - throw new \InvalidArgumentException('non-nullable stateOrProvince cannot be null'); - } $this->container['stateOrProvince'] = $stateOrProvince; return $this; @@ -480,9 +465,6 @@ public function getStreet() */ public function setStreet($street) { - if (is_null($street)) { - throw new \InvalidArgumentException('non-nullable street cannot be null'); - } $this->container['street'] = $street; return $this; diff --git a/src/Adyen/Model/Payments/AdjustAuthorisationRequest.php b/src/Adyen/Model/Payments/AdjustAuthorisationRequest.php index d0db54c20..5ffb11b3e 100644 --- a/src/Adyen/Model/Payments/AdjustAuthorisationRequest.php +++ b/src/Adyen/Model/Payments/AdjustAuthorisationRequest.php @@ -374,9 +374,6 @@ public function getAdditionalData() */ public function setAdditionalData($additionalData) { - if (is_null($additionalData)) { - throw new \InvalidArgumentException('non-nullable additionalData cannot be null'); - } $this->container['additionalData'] = $additionalData; return $this; @@ -401,9 +398,6 @@ public function getMerchantAccount() */ public function setMerchantAccount($merchantAccount) { - if (is_null($merchantAccount)) { - throw new \InvalidArgumentException('non-nullable merchantAccount cannot be null'); - } $this->container['merchantAccount'] = $merchantAccount; return $this; @@ -428,9 +422,6 @@ public function getModificationAmount() */ public function setModificationAmount($modificationAmount) { - if (is_null($modificationAmount)) { - throw new \InvalidArgumentException('non-nullable modificationAmount cannot be null'); - } $this->container['modificationAmount'] = $modificationAmount; return $this; @@ -455,9 +446,6 @@ public function getMpiData() */ public function setMpiData($mpiData) { - if (is_null($mpiData)) { - throw new \InvalidArgumentException('non-nullable mpiData cannot be null'); - } $this->container['mpiData'] = $mpiData; return $this; @@ -482,9 +470,6 @@ public function getOriginalMerchantReference() */ public function setOriginalMerchantReference($originalMerchantReference) { - if (is_null($originalMerchantReference)) { - throw new \InvalidArgumentException('non-nullable originalMerchantReference cannot be null'); - } $this->container['originalMerchantReference'] = $originalMerchantReference; return $this; @@ -509,9 +494,6 @@ public function getOriginalReference() */ public function setOriginalReference($originalReference) { - if (is_null($originalReference)) { - throw new \InvalidArgumentException('non-nullable originalReference cannot be null'); - } $this->container['originalReference'] = $originalReference; return $this; @@ -536,9 +518,6 @@ public function getPlatformChargebackLogic() */ public function setPlatformChargebackLogic($platformChargebackLogic) { - if (is_null($platformChargebackLogic)) { - throw new \InvalidArgumentException('non-nullable platformChargebackLogic cannot be null'); - } $this->container['platformChargebackLogic'] = $platformChargebackLogic; return $this; @@ -563,9 +542,6 @@ public function getReference() */ public function setReference($reference) { - if (is_null($reference)) { - throw new \InvalidArgumentException('non-nullable reference cannot be null'); - } $this->container['reference'] = $reference; return $this; @@ -590,9 +566,6 @@ public function getSplits() */ public function setSplits($splits) { - if (is_null($splits)) { - throw new \InvalidArgumentException('non-nullable splits cannot be null'); - } $this->container['splits'] = $splits; return $this; @@ -617,9 +590,6 @@ public function getTenderReference() */ public function setTenderReference($tenderReference) { - if (is_null($tenderReference)) { - throw new \InvalidArgumentException('non-nullable tenderReference cannot be null'); - } $this->container['tenderReference'] = $tenderReference; return $this; @@ -644,9 +614,6 @@ public function getUniqueTerminalId() */ public function setUniqueTerminalId($uniqueTerminalId) { - if (is_null($uniqueTerminalId)) { - throw new \InvalidArgumentException('non-nullable uniqueTerminalId cannot be null'); - } $this->container['uniqueTerminalId'] = $uniqueTerminalId; return $this; diff --git a/src/Adyen/Model/Payments/Amount.php b/src/Adyen/Model/Payments/Amount.php index d65b2d699..47e105d8f 100644 --- a/src/Adyen/Model/Payments/Amount.php +++ b/src/Adyen/Model/Payments/Amount.php @@ -308,9 +308,6 @@ public function getCurrency() */ public function setCurrency($currency) { - if (is_null($currency)) { - throw new \InvalidArgumentException('non-nullable currency cannot be null'); - } $this->container['currency'] = $currency; return $this; @@ -335,9 +332,6 @@ public function getValue() */ public function setValue($value) { - if (is_null($value)) { - throw new \InvalidArgumentException('non-nullable value cannot be null'); - } $this->container['value'] = $value; return $this; diff --git a/src/Adyen/Model/Payments/ApplicationInfo.php b/src/Adyen/Model/Payments/ApplicationInfo.php index 0c6a32762..480541f32 100644 --- a/src/Adyen/Model/Payments/ApplicationInfo.php +++ b/src/Adyen/Model/Payments/ApplicationInfo.php @@ -330,9 +330,6 @@ public function getAdyenLibrary() */ public function setAdyenLibrary($adyenLibrary) { - if (is_null($adyenLibrary)) { - throw new \InvalidArgumentException('non-nullable adyenLibrary cannot be null'); - } $this->container['adyenLibrary'] = $adyenLibrary; return $this; @@ -357,9 +354,6 @@ public function getAdyenPaymentSource() */ public function setAdyenPaymentSource($adyenPaymentSource) { - if (is_null($adyenPaymentSource)) { - throw new \InvalidArgumentException('non-nullable adyenPaymentSource cannot be null'); - } $this->container['adyenPaymentSource'] = $adyenPaymentSource; return $this; @@ -384,9 +378,6 @@ public function getExternalPlatform() */ public function setExternalPlatform($externalPlatform) { - if (is_null($externalPlatform)) { - throw new \InvalidArgumentException('non-nullable externalPlatform cannot be null'); - } $this->container['externalPlatform'] = $externalPlatform; return $this; @@ -411,9 +402,6 @@ public function getMerchantApplication() */ public function setMerchantApplication($merchantApplication) { - if (is_null($merchantApplication)) { - throw new \InvalidArgumentException('non-nullable merchantApplication cannot be null'); - } $this->container['merchantApplication'] = $merchantApplication; return $this; @@ -438,9 +426,6 @@ public function getMerchantDevice() */ public function setMerchantDevice($merchantDevice) { - if (is_null($merchantDevice)) { - throw new \InvalidArgumentException('non-nullable merchantDevice cannot be null'); - } $this->container['merchantDevice'] = $merchantDevice; return $this; @@ -465,9 +450,6 @@ public function getShopperInteractionDevice() */ public function setShopperInteractionDevice($shopperInteractionDevice) { - if (is_null($shopperInteractionDevice)) { - throw new \InvalidArgumentException('non-nullable shopperInteractionDevice cannot be null'); - } $this->container['shopperInteractionDevice'] = $shopperInteractionDevice; return $this; diff --git a/src/Adyen/Model/Payments/AuthenticationResultRequest.php b/src/Adyen/Model/Payments/AuthenticationResultRequest.php index b028a237e..ed73c9711 100644 --- a/src/Adyen/Model/Payments/AuthenticationResultRequest.php +++ b/src/Adyen/Model/Payments/AuthenticationResultRequest.php @@ -308,9 +308,6 @@ public function getMerchantAccount() */ public function setMerchantAccount($merchantAccount) { - if (is_null($merchantAccount)) { - throw new \InvalidArgumentException('non-nullable merchantAccount cannot be null'); - } $this->container['merchantAccount'] = $merchantAccount; return $this; @@ -335,9 +332,6 @@ public function getPspReference() */ public function setPspReference($pspReference) { - if (is_null($pspReference)) { - throw new \InvalidArgumentException('non-nullable pspReference cannot be null'); - } $this->container['pspReference'] = $pspReference; return $this; diff --git a/src/Adyen/Model/Payments/AuthenticationResultResponse.php b/src/Adyen/Model/Payments/AuthenticationResultResponse.php index 747888b24..dcd8ad1b6 100644 --- a/src/Adyen/Model/Payments/AuthenticationResultResponse.php +++ b/src/Adyen/Model/Payments/AuthenticationResultResponse.php @@ -302,9 +302,6 @@ public function getThreeDS1Result() */ public function setThreeDS1Result($threeDS1Result) { - if (is_null($threeDS1Result)) { - throw new \InvalidArgumentException('non-nullable threeDS1Result cannot be null'); - } $this->container['threeDS1Result'] = $threeDS1Result; return $this; @@ -329,9 +326,6 @@ public function getThreeDS2Result() */ public function setThreeDS2Result($threeDS2Result) { - if (is_null($threeDS2Result)) { - throw new \InvalidArgumentException('non-nullable threeDS2Result cannot be null'); - } $this->container['threeDS2Result'] = $threeDS2Result; return $this; diff --git a/src/Adyen/Model/Payments/BankAccount.php b/src/Adyen/Model/Payments/BankAccount.php index ec7be5f83..869486ad2 100644 --- a/src/Adyen/Model/Payments/BankAccount.php +++ b/src/Adyen/Model/Payments/BankAccount.php @@ -351,9 +351,6 @@ public function getBankAccountNumber() */ public function setBankAccountNumber($bankAccountNumber) { - if (is_null($bankAccountNumber)) { - throw new \InvalidArgumentException('non-nullable bankAccountNumber cannot be null'); - } $this->container['bankAccountNumber'] = $bankAccountNumber; return $this; @@ -378,9 +375,6 @@ public function getBankCity() */ public function setBankCity($bankCity) { - if (is_null($bankCity)) { - throw new \InvalidArgumentException('non-nullable bankCity cannot be null'); - } $this->container['bankCity'] = $bankCity; return $this; @@ -405,9 +399,6 @@ public function getBankLocationId() */ public function setBankLocationId($bankLocationId) { - if (is_null($bankLocationId)) { - throw new \InvalidArgumentException('non-nullable bankLocationId cannot be null'); - } $this->container['bankLocationId'] = $bankLocationId; return $this; @@ -432,9 +423,6 @@ public function getBankName() */ public function setBankName($bankName) { - if (is_null($bankName)) { - throw new \InvalidArgumentException('non-nullable bankName cannot be null'); - } $this->container['bankName'] = $bankName; return $this; @@ -459,9 +447,6 @@ public function getBic() */ public function setBic($bic) { - if (is_null($bic)) { - throw new \InvalidArgumentException('non-nullable bic cannot be null'); - } $this->container['bic'] = $bic; return $this; @@ -486,9 +471,6 @@ public function getCountryCode() */ public function setCountryCode($countryCode) { - if (is_null($countryCode)) { - throw new \InvalidArgumentException('non-nullable countryCode cannot be null'); - } $this->container['countryCode'] = $countryCode; return $this; @@ -513,9 +495,6 @@ public function getIban() */ public function setIban($iban) { - if (is_null($iban)) { - throw new \InvalidArgumentException('non-nullable iban cannot be null'); - } $this->container['iban'] = $iban; return $this; @@ -540,9 +519,6 @@ public function getOwnerName() */ public function setOwnerName($ownerName) { - if (is_null($ownerName)) { - throw new \InvalidArgumentException('non-nullable ownerName cannot be null'); - } $this->container['ownerName'] = $ownerName; return $this; @@ -567,9 +543,6 @@ public function getTaxId() */ public function setTaxId($taxId) { - if (is_null($taxId)) { - throw new \InvalidArgumentException('non-nullable taxId cannot be null'); - } $this->container['taxId'] = $taxId; return $this; diff --git a/src/Adyen/Model/Payments/BrowserInfo.php b/src/Adyen/Model/Payments/BrowserInfo.php index 14470bf66..a6c85b9a2 100644 --- a/src/Adyen/Model/Payments/BrowserInfo.php +++ b/src/Adyen/Model/Payments/BrowserInfo.php @@ -375,9 +375,6 @@ public function getAcceptHeader() */ public function setAcceptHeader($acceptHeader) { - if (is_null($acceptHeader)) { - throw new \InvalidArgumentException('non-nullable acceptHeader cannot be null'); - } $this->container['acceptHeader'] = $acceptHeader; return $this; @@ -402,7 +399,6 @@ public function getColorDepth() */ public function setColorDepth($colorDepth) { - // Do nothing for nullable integers $this->container['colorDepth'] = $colorDepth; return $this; @@ -427,9 +423,6 @@ public function getJavaEnabled() */ public function setJavaEnabled($javaEnabled) { - if (is_null($javaEnabled)) { - throw new \InvalidArgumentException('non-nullable javaEnabled cannot be null'); - } $this->container['javaEnabled'] = $javaEnabled; return $this; @@ -454,9 +447,6 @@ public function getJavaScriptEnabled() */ public function setJavaScriptEnabled($javaScriptEnabled) { - if (is_null($javaScriptEnabled)) { - throw new \InvalidArgumentException('non-nullable javaScriptEnabled cannot be null'); - } $this->container['javaScriptEnabled'] = $javaScriptEnabled; return $this; @@ -481,9 +471,6 @@ public function getLanguage() */ public function setLanguage($language) { - if (is_null($language)) { - throw new \InvalidArgumentException('non-nullable language cannot be null'); - } $this->container['language'] = $language; return $this; @@ -508,7 +495,6 @@ public function getScreenHeight() */ public function setScreenHeight($screenHeight) { - // Do nothing for nullable integers $this->container['screenHeight'] = $screenHeight; return $this; @@ -533,7 +519,6 @@ public function getScreenWidth() */ public function setScreenWidth($screenWidth) { - // Do nothing for nullable integers $this->container['screenWidth'] = $screenWidth; return $this; @@ -558,7 +543,6 @@ public function getTimeZoneOffset() */ public function setTimeZoneOffset($timeZoneOffset) { - // Do nothing for nullable integers $this->container['timeZoneOffset'] = $timeZoneOffset; return $this; @@ -583,9 +567,6 @@ public function getUserAgent() */ public function setUserAgent($userAgent) { - if (is_null($userAgent)) { - throw new \InvalidArgumentException('non-nullable userAgent cannot be null'); - } $this->container['userAgent'] = $userAgent; return $this; diff --git a/src/Adyen/Model/Payments/CancelOrRefundRequest.php b/src/Adyen/Model/Payments/CancelOrRefundRequest.php index b867716a8..b20940d24 100644 --- a/src/Adyen/Model/Payments/CancelOrRefundRequest.php +++ b/src/Adyen/Model/Payments/CancelOrRefundRequest.php @@ -357,9 +357,6 @@ public function getAdditionalData() */ public function setAdditionalData($additionalData) { - if (is_null($additionalData)) { - throw new \InvalidArgumentException('non-nullable additionalData cannot be null'); - } $this->container['additionalData'] = $additionalData; return $this; @@ -384,9 +381,6 @@ public function getMerchantAccount() */ public function setMerchantAccount($merchantAccount) { - if (is_null($merchantAccount)) { - throw new \InvalidArgumentException('non-nullable merchantAccount cannot be null'); - } $this->container['merchantAccount'] = $merchantAccount; return $this; @@ -411,9 +405,6 @@ public function getMpiData() */ public function setMpiData($mpiData) { - if (is_null($mpiData)) { - throw new \InvalidArgumentException('non-nullable mpiData cannot be null'); - } $this->container['mpiData'] = $mpiData; return $this; @@ -438,9 +429,6 @@ public function getOriginalMerchantReference() */ public function setOriginalMerchantReference($originalMerchantReference) { - if (is_null($originalMerchantReference)) { - throw new \InvalidArgumentException('non-nullable originalMerchantReference cannot be null'); - } $this->container['originalMerchantReference'] = $originalMerchantReference; return $this; @@ -465,9 +453,6 @@ public function getOriginalReference() */ public function setOriginalReference($originalReference) { - if (is_null($originalReference)) { - throw new \InvalidArgumentException('non-nullable originalReference cannot be null'); - } $this->container['originalReference'] = $originalReference; return $this; @@ -492,9 +477,6 @@ public function getPlatformChargebackLogic() */ public function setPlatformChargebackLogic($platformChargebackLogic) { - if (is_null($platformChargebackLogic)) { - throw new \InvalidArgumentException('non-nullable platformChargebackLogic cannot be null'); - } $this->container['platformChargebackLogic'] = $platformChargebackLogic; return $this; @@ -519,9 +501,6 @@ public function getReference() */ public function setReference($reference) { - if (is_null($reference)) { - throw new \InvalidArgumentException('non-nullable reference cannot be null'); - } $this->container['reference'] = $reference; return $this; @@ -546,9 +525,6 @@ public function getTenderReference() */ public function setTenderReference($tenderReference) { - if (is_null($tenderReference)) { - throw new \InvalidArgumentException('non-nullable tenderReference cannot be null'); - } $this->container['tenderReference'] = $tenderReference; return $this; @@ -573,9 +549,6 @@ public function getUniqueTerminalId() */ public function setUniqueTerminalId($uniqueTerminalId) { - if (is_null($uniqueTerminalId)) { - throw new \InvalidArgumentException('non-nullable uniqueTerminalId cannot be null'); - } $this->container['uniqueTerminalId'] = $uniqueTerminalId; return $this; diff --git a/src/Adyen/Model/Payments/CancelRequest.php b/src/Adyen/Model/Payments/CancelRequest.php index 658bcc5bc..dfba4c386 100644 --- a/src/Adyen/Model/Payments/CancelRequest.php +++ b/src/Adyen/Model/Payments/CancelRequest.php @@ -364,9 +364,6 @@ public function getAdditionalData() */ public function setAdditionalData($additionalData) { - if (is_null($additionalData)) { - throw new \InvalidArgumentException('non-nullable additionalData cannot be null'); - } $this->container['additionalData'] = $additionalData; return $this; @@ -391,9 +388,6 @@ public function getMerchantAccount() */ public function setMerchantAccount($merchantAccount) { - if (is_null($merchantAccount)) { - throw new \InvalidArgumentException('non-nullable merchantAccount cannot be null'); - } $this->container['merchantAccount'] = $merchantAccount; return $this; @@ -418,9 +412,6 @@ public function getMpiData() */ public function setMpiData($mpiData) { - if (is_null($mpiData)) { - throw new \InvalidArgumentException('non-nullable mpiData cannot be null'); - } $this->container['mpiData'] = $mpiData; return $this; @@ -445,9 +436,6 @@ public function getOriginalMerchantReference() */ public function setOriginalMerchantReference($originalMerchantReference) { - if (is_null($originalMerchantReference)) { - throw new \InvalidArgumentException('non-nullable originalMerchantReference cannot be null'); - } $this->container['originalMerchantReference'] = $originalMerchantReference; return $this; @@ -472,9 +460,6 @@ public function getOriginalReference() */ public function setOriginalReference($originalReference) { - if (is_null($originalReference)) { - throw new \InvalidArgumentException('non-nullable originalReference cannot be null'); - } $this->container['originalReference'] = $originalReference; return $this; @@ -499,9 +484,6 @@ public function getPlatformChargebackLogic() */ public function setPlatformChargebackLogic($platformChargebackLogic) { - if (is_null($platformChargebackLogic)) { - throw new \InvalidArgumentException('non-nullable platformChargebackLogic cannot be null'); - } $this->container['platformChargebackLogic'] = $platformChargebackLogic; return $this; @@ -526,9 +508,6 @@ public function getReference() */ public function setReference($reference) { - if (is_null($reference)) { - throw new \InvalidArgumentException('non-nullable reference cannot be null'); - } $this->container['reference'] = $reference; return $this; @@ -553,9 +532,6 @@ public function getSplits() */ public function setSplits($splits) { - if (is_null($splits)) { - throw new \InvalidArgumentException('non-nullable splits cannot be null'); - } $this->container['splits'] = $splits; return $this; @@ -580,9 +556,6 @@ public function getTenderReference() */ public function setTenderReference($tenderReference) { - if (is_null($tenderReference)) { - throw new \InvalidArgumentException('non-nullable tenderReference cannot be null'); - } $this->container['tenderReference'] = $tenderReference; return $this; @@ -607,9 +580,6 @@ public function getUniqueTerminalId() */ public function setUniqueTerminalId($uniqueTerminalId) { - if (is_null($uniqueTerminalId)) { - throw new \InvalidArgumentException('non-nullable uniqueTerminalId cannot be null'); - } $this->container['uniqueTerminalId'] = $uniqueTerminalId; return $this; diff --git a/src/Adyen/Model/Payments/CaptureRequest.php b/src/Adyen/Model/Payments/CaptureRequest.php index cab260f94..ac29a6897 100644 --- a/src/Adyen/Model/Payments/CaptureRequest.php +++ b/src/Adyen/Model/Payments/CaptureRequest.php @@ -374,9 +374,6 @@ public function getAdditionalData() */ public function setAdditionalData($additionalData) { - if (is_null($additionalData)) { - throw new \InvalidArgumentException('non-nullable additionalData cannot be null'); - } $this->container['additionalData'] = $additionalData; return $this; @@ -401,9 +398,6 @@ public function getMerchantAccount() */ public function setMerchantAccount($merchantAccount) { - if (is_null($merchantAccount)) { - throw new \InvalidArgumentException('non-nullable merchantAccount cannot be null'); - } $this->container['merchantAccount'] = $merchantAccount; return $this; @@ -428,9 +422,6 @@ public function getModificationAmount() */ public function setModificationAmount($modificationAmount) { - if (is_null($modificationAmount)) { - throw new \InvalidArgumentException('non-nullable modificationAmount cannot be null'); - } $this->container['modificationAmount'] = $modificationAmount; return $this; @@ -455,9 +446,6 @@ public function getMpiData() */ public function setMpiData($mpiData) { - if (is_null($mpiData)) { - throw new \InvalidArgumentException('non-nullable mpiData cannot be null'); - } $this->container['mpiData'] = $mpiData; return $this; @@ -482,9 +470,6 @@ public function getOriginalMerchantReference() */ public function setOriginalMerchantReference($originalMerchantReference) { - if (is_null($originalMerchantReference)) { - throw new \InvalidArgumentException('non-nullable originalMerchantReference cannot be null'); - } $this->container['originalMerchantReference'] = $originalMerchantReference; return $this; @@ -509,9 +494,6 @@ public function getOriginalReference() */ public function setOriginalReference($originalReference) { - if (is_null($originalReference)) { - throw new \InvalidArgumentException('non-nullable originalReference cannot be null'); - } $this->container['originalReference'] = $originalReference; return $this; @@ -536,9 +518,6 @@ public function getPlatformChargebackLogic() */ public function setPlatformChargebackLogic($platformChargebackLogic) { - if (is_null($platformChargebackLogic)) { - throw new \InvalidArgumentException('non-nullable platformChargebackLogic cannot be null'); - } $this->container['platformChargebackLogic'] = $platformChargebackLogic; return $this; @@ -563,9 +542,6 @@ public function getReference() */ public function setReference($reference) { - if (is_null($reference)) { - throw new \InvalidArgumentException('non-nullable reference cannot be null'); - } $this->container['reference'] = $reference; return $this; @@ -590,9 +566,6 @@ public function getSplits() */ public function setSplits($splits) { - if (is_null($splits)) { - throw new \InvalidArgumentException('non-nullable splits cannot be null'); - } $this->container['splits'] = $splits; return $this; @@ -617,9 +590,6 @@ public function getTenderReference() */ public function setTenderReference($tenderReference) { - if (is_null($tenderReference)) { - throw new \InvalidArgumentException('non-nullable tenderReference cannot be null'); - } $this->container['tenderReference'] = $tenderReference; return $this; @@ -644,9 +614,6 @@ public function getUniqueTerminalId() */ public function setUniqueTerminalId($uniqueTerminalId) { - if (is_null($uniqueTerminalId)) { - throw new \InvalidArgumentException('non-nullable uniqueTerminalId cannot be null'); - } $this->container['uniqueTerminalId'] = $uniqueTerminalId; return $this; diff --git a/src/Adyen/Model/Payments/Card.php b/src/Adyen/Model/Payments/Card.php index d4ca76283..be0d93a95 100644 --- a/src/Adyen/Model/Payments/Card.php +++ b/src/Adyen/Model/Payments/Card.php @@ -344,9 +344,6 @@ public function getCvc() */ public function setCvc($cvc) { - if (is_null($cvc)) { - throw new \InvalidArgumentException('non-nullable cvc cannot be null'); - } $this->container['cvc'] = $cvc; return $this; @@ -371,9 +368,6 @@ public function getExpiryMonth() */ public function setExpiryMonth($expiryMonth) { - if (is_null($expiryMonth)) { - throw new \InvalidArgumentException('non-nullable expiryMonth cannot be null'); - } $this->container['expiryMonth'] = $expiryMonth; return $this; @@ -398,9 +392,6 @@ public function getExpiryYear() */ public function setExpiryYear($expiryYear) { - if (is_null($expiryYear)) { - throw new \InvalidArgumentException('non-nullable expiryYear cannot be null'); - } $this->container['expiryYear'] = $expiryYear; return $this; @@ -425,9 +416,6 @@ public function getHolderName() */ public function setHolderName($holderName) { - if (is_null($holderName)) { - throw new \InvalidArgumentException('non-nullable holderName cannot be null'); - } $this->container['holderName'] = $holderName; return $this; @@ -452,9 +440,6 @@ public function getIssueNumber() */ public function setIssueNumber($issueNumber) { - if (is_null($issueNumber)) { - throw new \InvalidArgumentException('non-nullable issueNumber cannot be null'); - } $this->container['issueNumber'] = $issueNumber; return $this; @@ -479,9 +464,6 @@ public function getNumber() */ public function setNumber($number) { - if (is_null($number)) { - throw new \InvalidArgumentException('non-nullable number cannot be null'); - } $this->container['number'] = $number; return $this; @@ -506,9 +488,6 @@ public function getStartMonth() */ public function setStartMonth($startMonth) { - if (is_null($startMonth)) { - throw new \InvalidArgumentException('non-nullable startMonth cannot be null'); - } $this->container['startMonth'] = $startMonth; return $this; @@ -533,9 +512,6 @@ public function getStartYear() */ public function setStartYear($startYear) { - if (is_null($startYear)) { - throw new \InvalidArgumentException('non-nullable startYear cannot be null'); - } $this->container['startYear'] = $startYear; return $this; diff --git a/src/Adyen/Model/Payments/CommonField.php b/src/Adyen/Model/Payments/CommonField.php index e66a557d9..bde94acfa 100644 --- a/src/Adyen/Model/Payments/CommonField.php +++ b/src/Adyen/Model/Payments/CommonField.php @@ -302,9 +302,6 @@ public function getName() */ public function setName($name) { - if (is_null($name)) { - throw new \InvalidArgumentException('non-nullable name cannot be null'); - } $this->container['name'] = $name; return $this; @@ -329,9 +326,6 @@ public function getVersion() */ public function setVersion($version) { - if (is_null($version)) { - throw new \InvalidArgumentException('non-nullable version cannot be null'); - } $this->container['version'] = $version; return $this; diff --git a/src/Adyen/Model/Payments/DeviceRenderOptions.php b/src/Adyen/Model/Payments/DeviceRenderOptions.php index 9b5abf159..6ded1689b 100644 --- a/src/Adyen/Model/Payments/DeviceRenderOptions.php +++ b/src/Adyen/Model/Payments/DeviceRenderOptions.php @@ -347,9 +347,6 @@ public function getSdkInterface() */ 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( @@ -384,9 +381,6 @@ public function getSdkUiType() */ 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( diff --git a/src/Adyen/Model/Payments/DonationRequest.php b/src/Adyen/Model/Payments/DonationRequest.php index 817568751..5ee32cb76 100644 --- a/src/Adyen/Model/Payments/DonationRequest.php +++ b/src/Adyen/Model/Payments/DonationRequest.php @@ -339,9 +339,6 @@ public function getDonationAccount() */ public function setDonationAccount($donationAccount) { - if (is_null($donationAccount)) { - throw new \InvalidArgumentException('non-nullable donationAccount cannot be null'); - } $this->container['donationAccount'] = $donationAccount; return $this; @@ -366,9 +363,6 @@ public function getMerchantAccount() */ public function setMerchantAccount($merchantAccount) { - if (is_null($merchantAccount)) { - throw new \InvalidArgumentException('non-nullable merchantAccount cannot be null'); - } $this->container['merchantAccount'] = $merchantAccount; return $this; @@ -393,9 +387,6 @@ public function getModificationAmount() */ public function setModificationAmount($modificationAmount) { - if (is_null($modificationAmount)) { - throw new \InvalidArgumentException('non-nullable modificationAmount cannot be null'); - } $this->container['modificationAmount'] = $modificationAmount; return $this; @@ -420,9 +411,6 @@ public function getOriginalReference() */ public function setOriginalReference($originalReference) { - if (is_null($originalReference)) { - throw new \InvalidArgumentException('non-nullable originalReference cannot be null'); - } $this->container['originalReference'] = $originalReference; return $this; @@ -447,9 +435,6 @@ public function getPlatformChargebackLogic() */ public function setPlatformChargebackLogic($platformChargebackLogic) { - if (is_null($platformChargebackLogic)) { - throw new \InvalidArgumentException('non-nullable platformChargebackLogic cannot be null'); - } $this->container['platformChargebackLogic'] = $platformChargebackLogic; return $this; @@ -474,9 +459,6 @@ public function getReference() */ public function setReference($reference) { - if (is_null($reference)) { - throw new \InvalidArgumentException('non-nullable reference cannot be null'); - } $this->container['reference'] = $reference; return $this; diff --git a/src/Adyen/Model/Payments/ExternalPlatform.php b/src/Adyen/Model/Payments/ExternalPlatform.php index 5ce03a9ee..cf66f80e7 100644 --- a/src/Adyen/Model/Payments/ExternalPlatform.php +++ b/src/Adyen/Model/Payments/ExternalPlatform.php @@ -309,9 +309,6 @@ public function getIntegrator() */ public function setIntegrator($integrator) { - if (is_null($integrator)) { - throw new \InvalidArgumentException('non-nullable integrator cannot be null'); - } $this->container['integrator'] = $integrator; return $this; @@ -336,9 +333,6 @@ public function getName() */ public function setName($name) { - if (is_null($name)) { - throw new \InvalidArgumentException('non-nullable name cannot be null'); - } $this->container['name'] = $name; return $this; @@ -363,9 +357,6 @@ public function getVersion() */ public function setVersion($version) { - if (is_null($version)) { - throw new \InvalidArgumentException('non-nullable version cannot be null'); - } $this->container['version'] = $version; return $this; diff --git a/src/Adyen/Model/Payments/ForexQuote.php b/src/Adyen/Model/Payments/ForexQuote.php index 3298e15a4..d5d2bb975 100644 --- a/src/Adyen/Model/Payments/ForexQuote.php +++ b/src/Adyen/Model/Payments/ForexQuote.php @@ -378,9 +378,6 @@ public function getAccount() */ public function setAccount($account) { - if (is_null($account)) { - throw new \InvalidArgumentException('non-nullable account cannot be null'); - } $this->container['account'] = $account; return $this; @@ -405,9 +402,6 @@ public function getAccountType() */ public function setAccountType($accountType) { - if (is_null($accountType)) { - throw new \InvalidArgumentException('non-nullable accountType cannot be null'); - } $this->container['accountType'] = $accountType; return $this; @@ -432,9 +426,6 @@ public function getBaseAmount() */ public function setBaseAmount($baseAmount) { - if (is_null($baseAmount)) { - throw new \InvalidArgumentException('non-nullable baseAmount cannot be null'); - } $this->container['baseAmount'] = $baseAmount; return $this; @@ -459,7 +450,6 @@ public function getBasePoints() */ public function setBasePoints($basePoints) { - // Do nothing for nullable integers $this->container['basePoints'] = $basePoints; return $this; @@ -484,9 +474,6 @@ public function getBuy() */ public function setBuy($buy) { - if (is_null($buy)) { - throw new \InvalidArgumentException('non-nullable buy cannot be null'); - } $this->container['buy'] = $buy; return $this; @@ -511,9 +498,6 @@ public function getInterbank() */ public function setInterbank($interbank) { - if (is_null($interbank)) { - throw new \InvalidArgumentException('non-nullable interbank cannot be null'); - } $this->container['interbank'] = $interbank; return $this; @@ -538,9 +522,6 @@ public function getReference() */ public function setReference($reference) { - if (is_null($reference)) { - throw new \InvalidArgumentException('non-nullable reference cannot be null'); - } $this->container['reference'] = $reference; return $this; @@ -565,9 +546,6 @@ public function getSell() */ public function setSell($sell) { - if (is_null($sell)) { - throw new \InvalidArgumentException('non-nullable sell cannot be null'); - } $this->container['sell'] = $sell; return $this; @@ -592,9 +570,6 @@ public function getSignature() */ public function setSignature($signature) { - if (is_null($signature)) { - throw new \InvalidArgumentException('non-nullable signature cannot be null'); - } $this->container['signature'] = $signature; return $this; @@ -619,9 +594,6 @@ public function getSource() */ public function setSource($source) { - if (is_null($source)) { - throw new \InvalidArgumentException('non-nullable source cannot be null'); - } $this->container['source'] = $source; return $this; @@ -646,9 +618,6 @@ public function getType() */ public function setType($type) { - if (is_null($type)) { - throw new \InvalidArgumentException('non-nullable type cannot be null'); - } $this->container['type'] = $type; return $this; @@ -673,9 +642,6 @@ public function getValidTill() */ public function setValidTill($validTill) { - if (is_null($validTill)) { - throw new \InvalidArgumentException('non-nullable validTill cannot be null'); - } $this->container['validTill'] = $validTill; return $this; diff --git a/src/Adyen/Model/Payments/FraudCheckResult.php b/src/Adyen/Model/Payments/FraudCheckResult.php index cc976d4c9..87fbebeaf 100644 --- a/src/Adyen/Model/Payments/FraudCheckResult.php +++ b/src/Adyen/Model/Payments/FraudCheckResult.php @@ -318,7 +318,6 @@ public function getAccountScore() */ public function setAccountScore($accountScore) { - // Do nothing for nullable integers $this->container['accountScore'] = $accountScore; return $this; @@ -343,7 +342,6 @@ public function getCheckId() */ public function setCheckId($checkId) { - // Do nothing for nullable integers $this->container['checkId'] = $checkId; return $this; @@ -368,9 +366,6 @@ public function getName() */ public function setName($name) { - if (is_null($name)) { - throw new \InvalidArgumentException('non-nullable name cannot be null'); - } $this->container['name'] = $name; return $this; diff --git a/src/Adyen/Model/Payments/FraudCheckResultWrapper.php b/src/Adyen/Model/Payments/FraudCheckResultWrapper.php index 6238c3b2f..a89e3545f 100644 --- a/src/Adyen/Model/Payments/FraudCheckResultWrapper.php +++ b/src/Adyen/Model/Payments/FraudCheckResultWrapper.php @@ -295,9 +295,6 @@ public function getFraudCheckResult() */ public function setFraudCheckResult($fraudCheckResult) { - if (is_null($fraudCheckResult)) { - throw new \InvalidArgumentException('non-nullable fraudCheckResult cannot be null'); - } $this->container['fraudCheckResult'] = $fraudCheckResult; return $this; diff --git a/src/Adyen/Model/Payments/FraudResult.php b/src/Adyen/Model/Payments/FraudResult.php index 70e6731be..03abe3d86 100644 --- a/src/Adyen/Model/Payments/FraudResult.php +++ b/src/Adyen/Model/Payments/FraudResult.php @@ -305,7 +305,6 @@ public function getAccountScore() */ public function setAccountScore($accountScore) { - // Do nothing for nullable integers $this->container['accountScore'] = $accountScore; return $this; @@ -330,9 +329,6 @@ public function getResults() */ public function setResults($results) { - if (is_null($results)) { - throw new \InvalidArgumentException('non-nullable results cannot be null'); - } $this->container['results'] = $results; return $this; diff --git a/src/Adyen/Model/Payments/FundDestination.php b/src/Adyen/Model/Payments/FundDestination.php index 5e8033d9e..38e03dbba 100644 --- a/src/Adyen/Model/Payments/FundDestination.php +++ b/src/Adyen/Model/Payments/FundDestination.php @@ -358,9 +358,6 @@ public function getAdditionalData() */ public function setAdditionalData($additionalData) { - if (is_null($additionalData)) { - throw new \InvalidArgumentException('non-nullable additionalData cannot be null'); - } $this->container['additionalData'] = $additionalData; return $this; @@ -385,9 +382,6 @@ public function getBillingAddress() */ public function setBillingAddress($billingAddress) { - if (is_null($billingAddress)) { - throw new \InvalidArgumentException('non-nullable billingAddress cannot be null'); - } $this->container['billingAddress'] = $billingAddress; return $this; @@ -412,9 +406,6 @@ public function getCard() */ public function setCard($card) { - if (is_null($card)) { - throw new \InvalidArgumentException('non-nullable card cannot be null'); - } $this->container['card'] = $card; return $this; @@ -439,9 +430,6 @@ public function getSelectedRecurringDetailReference() */ public function setSelectedRecurringDetailReference($selectedRecurringDetailReference) { - if (is_null($selectedRecurringDetailReference)) { - throw new \InvalidArgumentException('non-nullable selectedRecurringDetailReference cannot be null'); - } $this->container['selectedRecurringDetailReference'] = $selectedRecurringDetailReference; return $this; @@ -466,9 +454,6 @@ public function getShopperEmail() */ public function setShopperEmail($shopperEmail) { - if (is_null($shopperEmail)) { - throw new \InvalidArgumentException('non-nullable shopperEmail cannot be null'); - } $this->container['shopperEmail'] = $shopperEmail; return $this; @@ -493,9 +478,6 @@ public function getShopperName() */ public function setShopperName($shopperName) { - if (is_null($shopperName)) { - throw new \InvalidArgumentException('non-nullable shopperName cannot be null'); - } $this->container['shopperName'] = $shopperName; return $this; @@ -520,9 +502,6 @@ public function getShopperReference() */ public function setShopperReference($shopperReference) { - if (is_null($shopperReference)) { - throw new \InvalidArgumentException('non-nullable shopperReference cannot be null'); - } $this->container['shopperReference'] = $shopperReference; return $this; @@ -547,9 +526,6 @@ public function getSubMerchant() */ public function setSubMerchant($subMerchant) { - if (is_null($subMerchant)) { - throw new \InvalidArgumentException('non-nullable subMerchant cannot be null'); - } $this->container['subMerchant'] = $subMerchant; return $this; @@ -574,9 +550,6 @@ public function getTelephoneNumber() */ public function setTelephoneNumber($telephoneNumber) { - if (is_null($telephoneNumber)) { - throw new \InvalidArgumentException('non-nullable telephoneNumber cannot be null'); - } $this->container['telephoneNumber'] = $telephoneNumber; return $this; @@ -601,9 +574,6 @@ public function getWalletPurpose() */ public function setWalletPurpose($walletPurpose) { - if (is_null($walletPurpose)) { - throw new \InvalidArgumentException('non-nullable walletPurpose cannot be null'); - } $this->container['walletPurpose'] = $walletPurpose; return $this; diff --git a/src/Adyen/Model/Payments/FundSource.php b/src/Adyen/Model/Payments/FundSource.php index 4fdb63b36..954241149 100644 --- a/src/Adyen/Model/Payments/FundSource.php +++ b/src/Adyen/Model/Payments/FundSource.php @@ -330,9 +330,6 @@ public function getAdditionalData() */ public function setAdditionalData($additionalData) { - if (is_null($additionalData)) { - throw new \InvalidArgumentException('non-nullable additionalData cannot be null'); - } $this->container['additionalData'] = $additionalData; return $this; @@ -357,9 +354,6 @@ public function getBillingAddress() */ public function setBillingAddress($billingAddress) { - if (is_null($billingAddress)) { - throw new \InvalidArgumentException('non-nullable billingAddress cannot be null'); - } $this->container['billingAddress'] = $billingAddress; return $this; @@ -384,9 +378,6 @@ public function getCard() */ public function setCard($card) { - if (is_null($card)) { - throw new \InvalidArgumentException('non-nullable card cannot be null'); - } $this->container['card'] = $card; return $this; @@ -411,9 +402,6 @@ public function getShopperEmail() */ public function setShopperEmail($shopperEmail) { - if (is_null($shopperEmail)) { - throw new \InvalidArgumentException('non-nullable shopperEmail cannot be null'); - } $this->container['shopperEmail'] = $shopperEmail; return $this; @@ -438,9 +426,6 @@ public function getShopperName() */ public function setShopperName($shopperName) { - if (is_null($shopperName)) { - throw new \InvalidArgumentException('non-nullable shopperName cannot be null'); - } $this->container['shopperName'] = $shopperName; return $this; @@ -465,9 +450,6 @@ public function getTelephoneNumber() */ public function setTelephoneNumber($telephoneNumber) { - if (is_null($telephoneNumber)) { - throw new \InvalidArgumentException('non-nullable telephoneNumber cannot be null'); - } $this->container['telephoneNumber'] = $telephoneNumber; return $this; diff --git a/src/Adyen/Model/Payments/Installments.php b/src/Adyen/Model/Payments/Installments.php index 20b216196..fae2de776 100644 --- a/src/Adyen/Model/Payments/Installments.php +++ b/src/Adyen/Model/Payments/Installments.php @@ -349,7 +349,6 @@ public function getExtra() */ public function setExtra($extra) { - // Do nothing for nullable integers $this->container['extra'] = $extra; return $this; @@ -374,9 +373,6 @@ public function getPlan() */ 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( @@ -411,7 +407,6 @@ public function getValue() */ public function setValue($value) { - // Do nothing for nullable integers $this->container['value'] = $value; return $this; diff --git a/src/Adyen/Model/Payments/Mandate.php b/src/Adyen/Model/Payments/Mandate.php index 4646b438b..4e735cb3a 100644 --- a/src/Adyen/Model/Payments/Mandate.php +++ b/src/Adyen/Model/Payments/Mandate.php @@ -436,9 +436,6 @@ public function getAmount() */ public function setAmount($amount) { - if (is_null($amount)) { - throw new \InvalidArgumentException('non-nullable amount cannot be null'); - } $this->container['amount'] = $amount; return $this; @@ -463,9 +460,6 @@ public function getAmountRule() */ 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( @@ -500,9 +494,6 @@ public function getBillingAttemptsRule() */ 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( @@ -537,9 +528,6 @@ public function getBillingDay() */ public function setBillingDay($billingDay) { - if (is_null($billingDay)) { - throw new \InvalidArgumentException('non-nullable billingDay cannot be null'); - } $this->container['billingDay'] = $billingDay; return $this; @@ -564,9 +552,6 @@ public function getEndsAt() */ public function setEndsAt($endsAt) { - if (is_null($endsAt)) { - throw new \InvalidArgumentException('non-nullable endsAt cannot be null'); - } $this->container['endsAt'] = $endsAt; return $this; @@ -591,9 +576,6 @@ public function getFrequency() */ 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( @@ -628,9 +610,6 @@ public function getRemarks() */ public function setRemarks($remarks) { - if (is_null($remarks)) { - throw new \InvalidArgumentException('non-nullable remarks cannot be null'); - } $this->container['remarks'] = $remarks; return $this; @@ -655,9 +634,6 @@ public function getStartsAt() */ public function setStartsAt($startsAt) { - if (is_null($startsAt)) { - throw new \InvalidArgumentException('non-nullable startsAt cannot be null'); - } $this->container['startsAt'] = $startsAt; return $this; diff --git a/src/Adyen/Model/Payments/MerchantDevice.php b/src/Adyen/Model/Payments/MerchantDevice.php index 95d663eea..426477c88 100644 --- a/src/Adyen/Model/Payments/MerchantDevice.php +++ b/src/Adyen/Model/Payments/MerchantDevice.php @@ -309,9 +309,6 @@ public function getOs() */ public function setOs($os) { - if (is_null($os)) { - throw new \InvalidArgumentException('non-nullable os cannot be null'); - } $this->container['os'] = $os; return $this; @@ -336,9 +333,6 @@ public function getOsVersion() */ public function setOsVersion($osVersion) { - if (is_null($osVersion)) { - throw new \InvalidArgumentException('non-nullable osVersion cannot be null'); - } $this->container['osVersion'] = $osVersion; return $this; @@ -363,9 +357,6 @@ public function getReference() */ public function setReference($reference) { - if (is_null($reference)) { - throw new \InvalidArgumentException('non-nullable reference cannot be null'); - } $this->container['reference'] = $reference; return $this; diff --git a/src/Adyen/Model/Payments/MerchantRiskIndicator.php b/src/Adyen/Model/Payments/MerchantRiskIndicator.php index 5ec23b0cc..69a92753b 100644 --- a/src/Adyen/Model/Payments/MerchantRiskIndicator.php +++ b/src/Adyen/Model/Payments/MerchantRiskIndicator.php @@ -446,9 +446,6 @@ public function getAddressMatch() */ public function setAddressMatch($addressMatch) { - if (is_null($addressMatch)) { - throw new \InvalidArgumentException('non-nullable addressMatch cannot be null'); - } $this->container['addressMatch'] = $addressMatch; return $this; @@ -473,9 +470,6 @@ public function getDeliveryAddressIndicator() */ 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( @@ -512,9 +506,6 @@ public function getDeliveryEmail() */ public function setDeliveryEmail($deliveryEmail) { - if (is_null($deliveryEmail)) { - throw new \InvalidArgumentException('non-nullable deliveryEmail cannot be null'); - } $this->container['deliveryEmail'] = $deliveryEmail; return $this; @@ -539,9 +530,6 @@ public function getDeliveryEmailAddress() */ public function setDeliveryEmailAddress($deliveryEmailAddress) { - if (is_null($deliveryEmailAddress)) { - throw new \InvalidArgumentException('non-nullable deliveryEmailAddress cannot be null'); - } $this->container['deliveryEmailAddress'] = $deliveryEmailAddress; return $this; @@ -566,9 +554,6 @@ public function getDeliveryTimeframe() */ 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( @@ -603,9 +588,6 @@ public function getGiftCardAmount() */ public function setGiftCardAmount($giftCardAmount) { - if (is_null($giftCardAmount)) { - throw new \InvalidArgumentException('non-nullable giftCardAmount cannot be null'); - } $this->container['giftCardAmount'] = $giftCardAmount; return $this; @@ -630,7 +612,6 @@ public function getGiftCardCount() */ public function setGiftCardCount($giftCardCount) { - // Do nothing for nullable integers $this->container['giftCardCount'] = $giftCardCount; return $this; @@ -655,9 +636,6 @@ public function getGiftCardCurr() */ public function setGiftCardCurr($giftCardCurr) { - if (is_null($giftCardCurr)) { - throw new \InvalidArgumentException('non-nullable giftCardCurr cannot be null'); - } $this->container['giftCardCurr'] = $giftCardCurr; return $this; @@ -682,9 +660,6 @@ public function getPreOrderDate() */ public function setPreOrderDate($preOrderDate) { - if (is_null($preOrderDate)) { - throw new \InvalidArgumentException('non-nullable preOrderDate cannot be null'); - } $this->container['preOrderDate'] = $preOrderDate; return $this; @@ -709,9 +684,6 @@ public function getPreOrderPurchase() */ public function setPreOrderPurchase($preOrderPurchase) { - if (is_null($preOrderPurchase)) { - throw new \InvalidArgumentException('non-nullable preOrderPurchase cannot be null'); - } $this->container['preOrderPurchase'] = $preOrderPurchase; return $this; @@ -736,9 +708,6 @@ public function getPreOrderPurchaseInd() */ public function setPreOrderPurchaseInd($preOrderPurchaseInd) { - if (is_null($preOrderPurchaseInd)) { - throw new \InvalidArgumentException('non-nullable preOrderPurchaseInd cannot be null'); - } $this->container['preOrderPurchaseInd'] = $preOrderPurchaseInd; return $this; @@ -763,9 +732,6 @@ public function getReorderItems() */ public function setReorderItems($reorderItems) { - if (is_null($reorderItems)) { - throw new \InvalidArgumentException('non-nullable reorderItems cannot be null'); - } $this->container['reorderItems'] = $reorderItems; return $this; @@ -790,9 +756,6 @@ public function getReorderItemsInd() */ public function setReorderItemsInd($reorderItemsInd) { - if (is_null($reorderItemsInd)) { - throw new \InvalidArgumentException('non-nullable reorderItemsInd cannot be null'); - } $this->container['reorderItemsInd'] = $reorderItemsInd; return $this; @@ -817,9 +780,6 @@ public function getShipIndicator() */ public function setShipIndicator($shipIndicator) { - if (is_null($shipIndicator)) { - throw new \InvalidArgumentException('non-nullable shipIndicator cannot be null'); - } $this->container['shipIndicator'] = $shipIndicator; return $this; diff --git a/src/Adyen/Model/Payments/ModificationResult.php b/src/Adyen/Model/Payments/ModificationResult.php index a8a3b3139..b60ace919 100644 --- a/src/Adyen/Model/Payments/ModificationResult.php +++ b/src/Adyen/Model/Payments/ModificationResult.php @@ -350,9 +350,6 @@ public function getAdditionalData() */ public function setAdditionalData($additionalData) { - if (is_null($additionalData)) { - throw new \InvalidArgumentException('non-nullable additionalData cannot be null'); - } $this->container['additionalData'] = $additionalData; return $this; @@ -377,9 +374,6 @@ public function getPspReference() */ public function setPspReference($pspReference) { - if (is_null($pspReference)) { - throw new \InvalidArgumentException('non-nullable pspReference cannot be null'); - } $this->container['pspReference'] = $pspReference; return $this; @@ -404,9 +398,6 @@ public function getResponse() */ 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( diff --git a/src/Adyen/Model/Payments/Name.php b/src/Adyen/Model/Payments/Name.php index 857e2cc52..4a0d2ff26 100644 --- a/src/Adyen/Model/Payments/Name.php +++ b/src/Adyen/Model/Payments/Name.php @@ -308,9 +308,6 @@ public function getFirstName() */ public function setFirstName($firstName) { - if (is_null($firstName)) { - throw new \InvalidArgumentException('non-nullable firstName cannot be null'); - } $this->container['firstName'] = $firstName; return $this; @@ -335,9 +332,6 @@ public function getLastName() */ public function setLastName($lastName) { - if (is_null($lastName)) { - throw new \InvalidArgumentException('non-nullable lastName cannot be null'); - } $this->container['lastName'] = $lastName; return $this; diff --git a/src/Adyen/Model/Payments/ObjectSerializer.php b/src/Adyen/Model/Payments/ObjectSerializer.php index 4e217461d..ae7a870cb 100644 --- a/src/Adyen/Model/Payments/ObjectSerializer.php +++ b/src/Adyen/Model/Payments/ObjectSerializer.php @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach ($data as $property => $value) { + foreach($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) { - return $timestamp; - } + if (!is_string($timestamp)) return $timestamp; return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/Payments/PaymentRequest.php b/src/Adyen/Model/Payments/PaymentRequest.php index 4132683c9..ea72302ab 100644 --- a/src/Adyen/Model/Payments/PaymentRequest.php +++ b/src/Adyen/Model/Payments/PaymentRequest.php @@ -79,6 +79,7 @@ class PaymentRequest implements ModelInterface, ArrayAccess, \JsonSerializable 'recurring' => '\Adyen\Model\Payments\Recurring', 'recurringProcessingModel' => 'string', 'reference' => 'string', + 'secureRemoteCommerceCheckoutData' => '\Adyen\Model\Payments\SecureRemoteCommerceCheckoutData', 'selectedBrand' => 'string', 'selectedRecurringDetailReference' => 'string', 'sessionId' => 'string', @@ -142,6 +143,7 @@ class PaymentRequest implements ModelInterface, ArrayAccess, \JsonSerializable 'recurring' => null, 'recurringProcessingModel' => null, 'reference' => null, + 'secureRemoteCommerceCheckoutData' => null, 'selectedBrand' => null, 'selectedRecurringDetailReference' => null, 'sessionId' => null, @@ -203,6 +205,7 @@ class PaymentRequest implements ModelInterface, ArrayAccess, \JsonSerializable 'recurring' => false, 'recurringProcessingModel' => false, 'reference' => false, + 'secureRemoteCommerceCheckoutData' => false, 'selectedBrand' => false, 'selectedRecurringDetailReference' => false, 'sessionId' => false, @@ -344,6 +347,7 @@ public function isNullableSetToNull(string $property): bool 'recurring' => 'recurring', 'recurringProcessingModel' => 'recurringProcessingModel', 'reference' => 'reference', + 'secureRemoteCommerceCheckoutData' => 'secureRemoteCommerceCheckoutData', 'selectedBrand' => 'selectedBrand', 'selectedRecurringDetailReference' => 'selectedRecurringDetailReference', 'sessionId' => 'sessionId', @@ -405,6 +409,7 @@ public function isNullableSetToNull(string $property): bool 'recurring' => 'setRecurring', 'recurringProcessingModel' => 'setRecurringProcessingModel', 'reference' => 'setReference', + 'secureRemoteCommerceCheckoutData' => 'setSecureRemoteCommerceCheckoutData', 'selectedBrand' => 'setSelectedBrand', 'selectedRecurringDetailReference' => 'setSelectedRecurringDetailReference', 'sessionId' => 'setSessionId', @@ -466,6 +471,7 @@ public function isNullableSetToNull(string $property): bool 'recurring' => 'getRecurring', 'recurringProcessingModel' => 'getRecurringProcessingModel', 'reference' => 'getReference', + 'secureRemoteCommerceCheckoutData' => 'getSecureRemoteCommerceCheckoutData', 'selectedBrand' => 'getSelectedBrand', 'selectedRecurringDetailReference' => 'getSelectedRecurringDetailReference', 'sessionId' => 'getSessionId', @@ -640,6 +646,7 @@ public function __construct(array $data = null) $this->setIfExists('recurring', $data ?? [], null); $this->setIfExists('recurringProcessingModel', $data ?? [], null); $this->setIfExists('reference', $data ?? [], null); + $this->setIfExists('secureRemoteCommerceCheckoutData', $data ?? [], null); $this->setIfExists('selectedBrand', $data ?? [], null); $this->setIfExists('selectedRecurringDetailReference', $data ?? [], null); $this->setIfExists('sessionId', $data ?? [], null); @@ -766,9 +773,6 @@ public function getAccountInfo() */ public function setAccountInfo($accountInfo) { - if (is_null($accountInfo)) { - throw new \InvalidArgumentException('non-nullable accountInfo cannot be null'); - } $this->container['accountInfo'] = $accountInfo; return $this; @@ -793,9 +797,6 @@ public function getAdditionalAmount() */ public function setAdditionalAmount($additionalAmount) { - if (is_null($additionalAmount)) { - throw new \InvalidArgumentException('non-nullable additionalAmount cannot be null'); - } $this->container['additionalAmount'] = $additionalAmount; return $this; @@ -820,9 +821,6 @@ public function getAdditionalData() */ public function setAdditionalData($additionalData) { - if (is_null($additionalData)) { - throw new \InvalidArgumentException('non-nullable additionalData cannot be null'); - } $this->container['additionalData'] = $additionalData; return $this; @@ -847,9 +845,6 @@ public function getAmount() */ public function setAmount($amount) { - if (is_null($amount)) { - throw new \InvalidArgumentException('non-nullable amount cannot be null'); - } $this->container['amount'] = $amount; return $this; @@ -874,9 +869,6 @@ public function getApplicationInfo() */ public function setApplicationInfo($applicationInfo) { - if (is_null($applicationInfo)) { - throw new \InvalidArgumentException('non-nullable applicationInfo cannot be null'); - } $this->container['applicationInfo'] = $applicationInfo; return $this; @@ -901,9 +893,6 @@ public function getBankAccount() */ public function setBankAccount($bankAccount) { - if (is_null($bankAccount)) { - throw new \InvalidArgumentException('non-nullable bankAccount cannot be null'); - } $this->container['bankAccount'] = $bankAccount; return $this; @@ -928,9 +917,6 @@ public function getBillingAddress() */ public function setBillingAddress($billingAddress) { - if (is_null($billingAddress)) { - throw new \InvalidArgumentException('non-nullable billingAddress cannot be null'); - } $this->container['billingAddress'] = $billingAddress; return $this; @@ -955,9 +941,6 @@ public function getBrowserInfo() */ public function setBrowserInfo($browserInfo) { - if (is_null($browserInfo)) { - throw new \InvalidArgumentException('non-nullable browserInfo cannot be null'); - } $this->container['browserInfo'] = $browserInfo; return $this; @@ -982,7 +965,6 @@ public function getCaptureDelayHours() */ public function setCaptureDelayHours($captureDelayHours) { - // Do nothing for nullable integers $this->container['captureDelayHours'] = $captureDelayHours; return $this; @@ -1007,9 +989,6 @@ public function getCard() */ public function setCard($card) { - if (is_null($card)) { - throw new \InvalidArgumentException('non-nullable card cannot be null'); - } $this->container['card'] = $card; return $this; @@ -1034,9 +1013,6 @@ public function getDateOfBirth() */ public function setDateOfBirth($dateOfBirth) { - if (is_null($dateOfBirth)) { - throw new \InvalidArgumentException('non-nullable dateOfBirth cannot be null'); - } $this->container['dateOfBirth'] = $dateOfBirth; return $this; @@ -1061,9 +1037,6 @@ public function getDccQuote() */ public function setDccQuote($dccQuote) { - if (is_null($dccQuote)) { - throw new \InvalidArgumentException('non-nullable dccQuote cannot be null'); - } $this->container['dccQuote'] = $dccQuote; return $this; @@ -1088,9 +1061,6 @@ public function getDeliveryAddress() */ public function setDeliveryAddress($deliveryAddress) { - if (is_null($deliveryAddress)) { - throw new \InvalidArgumentException('non-nullable deliveryAddress cannot be null'); - } $this->container['deliveryAddress'] = $deliveryAddress; return $this; @@ -1115,9 +1085,6 @@ public function getDeliveryDate() */ public function setDeliveryDate($deliveryDate) { - if (is_null($deliveryDate)) { - throw new \InvalidArgumentException('non-nullable deliveryDate cannot be null'); - } $this->container['deliveryDate'] = $deliveryDate; return $this; @@ -1142,9 +1109,6 @@ public function getDeviceFingerprint() */ public function setDeviceFingerprint($deviceFingerprint) { - if (is_null($deviceFingerprint)) { - throw new \InvalidArgumentException('non-nullable deviceFingerprint cannot be null'); - } $this->container['deviceFingerprint'] = $deviceFingerprint; return $this; @@ -1169,9 +1133,6 @@ public function getEntityType() */ 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( @@ -1206,7 +1167,6 @@ public function getFraudOffset() */ public function setFraudOffset($fraudOffset) { - // Do nothing for nullable integers $this->container['fraudOffset'] = $fraudOffset; return $this; @@ -1231,9 +1191,6 @@ public function getFundDestination() */ public function setFundDestination($fundDestination) { - if (is_null($fundDestination)) { - throw new \InvalidArgumentException('non-nullable fundDestination cannot be null'); - } $this->container['fundDestination'] = $fundDestination; return $this; @@ -1258,9 +1215,6 @@ public function getFundSource() */ public function setFundSource($fundSource) { - if (is_null($fundSource)) { - throw new \InvalidArgumentException('non-nullable fundSource cannot be null'); - } $this->container['fundSource'] = $fundSource; return $this; @@ -1285,9 +1239,6 @@ public function getFundingSource() */ 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( @@ -1322,9 +1273,6 @@ public function getInstallments() */ public function setInstallments($installments) { - if (is_null($installments)) { - throw new \InvalidArgumentException('non-nullable installments cannot be null'); - } $this->container['installments'] = $installments; return $this; @@ -1349,9 +1297,6 @@ public function getLocalizedShopperStatement() */ public function setLocalizedShopperStatement($localizedShopperStatement) { - if (is_null($localizedShopperStatement)) { - throw new \InvalidArgumentException('non-nullable localizedShopperStatement cannot be null'); - } $this->container['localizedShopperStatement'] = $localizedShopperStatement; return $this; @@ -1376,9 +1321,6 @@ public function getMandate() */ public function setMandate($mandate) { - if (is_null($mandate)) { - throw new \InvalidArgumentException('non-nullable mandate cannot be null'); - } $this->container['mandate'] = $mandate; return $this; @@ -1403,9 +1345,6 @@ public function getMcc() */ public function setMcc($mcc) { - if (is_null($mcc)) { - throw new \InvalidArgumentException('non-nullable mcc cannot be null'); - } $this->container['mcc'] = $mcc; return $this; @@ -1430,9 +1369,6 @@ public function getMerchantAccount() */ public function setMerchantAccount($merchantAccount) { - if (is_null($merchantAccount)) { - throw new \InvalidArgumentException('non-nullable merchantAccount cannot be null'); - } $this->container['merchantAccount'] = $merchantAccount; return $this; @@ -1457,9 +1393,6 @@ public function getMerchantOrderReference() */ public function setMerchantOrderReference($merchantOrderReference) { - if (is_null($merchantOrderReference)) { - throw new \InvalidArgumentException('non-nullable merchantOrderReference cannot be null'); - } $this->container['merchantOrderReference'] = $merchantOrderReference; return $this; @@ -1484,9 +1417,6 @@ public function getMerchantRiskIndicator() */ public function setMerchantRiskIndicator($merchantRiskIndicator) { - if (is_null($merchantRiskIndicator)) { - throw new \InvalidArgumentException('non-nullable merchantRiskIndicator cannot be null'); - } $this->container['merchantRiskIndicator'] = $merchantRiskIndicator; return $this; @@ -1511,9 +1441,6 @@ public function getMetadata() */ public function setMetadata($metadata) { - if (is_null($metadata)) { - throw new \InvalidArgumentException('non-nullable metadata cannot be null'); - } $this->container['metadata'] = $metadata; return $this; @@ -1538,9 +1465,6 @@ public function getMpiData() */ public function setMpiData($mpiData) { - if (is_null($mpiData)) { - throw new \InvalidArgumentException('non-nullable mpiData cannot be null'); - } $this->container['mpiData'] = $mpiData; return $this; @@ -1565,9 +1489,6 @@ public function getNationality() */ public function setNationality($nationality) { - if (is_null($nationality)) { - throw new \InvalidArgumentException('non-nullable nationality cannot be null'); - } $this->container['nationality'] = $nationality; return $this; @@ -1592,9 +1513,6 @@ public function getOrderReference() */ public function setOrderReference($orderReference) { - if (is_null($orderReference)) { - throw new \InvalidArgumentException('non-nullable orderReference cannot be null'); - } $this->container['orderReference'] = $orderReference; return $this; @@ -1619,9 +1537,6 @@ public function getPlatformChargebackLogic() */ public function setPlatformChargebackLogic($platformChargebackLogic) { - if (is_null($platformChargebackLogic)) { - throw new \InvalidArgumentException('non-nullable platformChargebackLogic cannot be null'); - } $this->container['platformChargebackLogic'] = $platformChargebackLogic; return $this; @@ -1646,9 +1561,6 @@ public function getRecurring() */ public function setRecurring($recurring) { - if (is_null($recurring)) { - throw new \InvalidArgumentException('non-nullable recurring cannot be null'); - } $this->container['recurring'] = $recurring; return $this; @@ -1673,9 +1585,6 @@ public function getRecurringProcessingModel() */ 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( @@ -1710,14 +1619,35 @@ public function getReference() */ public function setReference($reference) { - if (is_null($reference)) { - throw new \InvalidArgumentException('non-nullable reference cannot be null'); - } $this->container['reference'] = $reference; return $this; } + /** + * Gets secureRemoteCommerceCheckoutData + * + * @return \Adyen\Model\Payments\SecureRemoteCommerceCheckoutData|null + */ + public function getSecureRemoteCommerceCheckoutData() + { + return $this->container['secureRemoteCommerceCheckoutData']; + } + + /** + * Sets secureRemoteCommerceCheckoutData + * + * @param \Adyen\Model\Payments\SecureRemoteCommerceCheckoutData|null $secureRemoteCommerceCheckoutData secureRemoteCommerceCheckoutData + * + * @return self + */ + public function setSecureRemoteCommerceCheckoutData($secureRemoteCommerceCheckoutData) + { + $this->container['secureRemoteCommerceCheckoutData'] = $secureRemoteCommerceCheckoutData; + + return $this; + } + /** * Gets selectedBrand * @@ -1737,9 +1667,6 @@ public function getSelectedBrand() */ public function setSelectedBrand($selectedBrand) { - if (is_null($selectedBrand)) { - throw new \InvalidArgumentException('non-nullable selectedBrand cannot be null'); - } $this->container['selectedBrand'] = $selectedBrand; return $this; @@ -1764,9 +1691,6 @@ public function getSelectedRecurringDetailReference() */ public function setSelectedRecurringDetailReference($selectedRecurringDetailReference) { - if (is_null($selectedRecurringDetailReference)) { - throw new \InvalidArgumentException('non-nullable selectedRecurringDetailReference cannot be null'); - } $this->container['selectedRecurringDetailReference'] = $selectedRecurringDetailReference; return $this; @@ -1791,9 +1715,6 @@ public function getSessionId() */ public function setSessionId($sessionId) { - if (is_null($sessionId)) { - throw new \InvalidArgumentException('non-nullable sessionId cannot be null'); - } $this->container['sessionId'] = $sessionId; return $this; @@ -1818,9 +1739,6 @@ public function getShopperEmail() */ public function setShopperEmail($shopperEmail) { - if (is_null($shopperEmail)) { - throw new \InvalidArgumentException('non-nullable shopperEmail cannot be null'); - } $this->container['shopperEmail'] = $shopperEmail; return $this; @@ -1845,9 +1763,6 @@ public function getShopperIP() */ public function setShopperIP($shopperIP) { - if (is_null($shopperIP)) { - throw new \InvalidArgumentException('non-nullable shopperIP cannot be null'); - } $this->container['shopperIP'] = $shopperIP; return $this; @@ -1872,9 +1787,6 @@ public function getShopperInteraction() */ 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( @@ -1909,9 +1821,6 @@ public function getShopperLocale() */ public function setShopperLocale($shopperLocale) { - if (is_null($shopperLocale)) { - throw new \InvalidArgumentException('non-nullable shopperLocale cannot be null'); - } $this->container['shopperLocale'] = $shopperLocale; return $this; @@ -1936,9 +1845,6 @@ public function getShopperName() */ public function setShopperName($shopperName) { - if (is_null($shopperName)) { - throw new \InvalidArgumentException('non-nullable shopperName cannot be null'); - } $this->container['shopperName'] = $shopperName; return $this; @@ -1963,9 +1869,6 @@ public function getShopperReference() */ public function setShopperReference($shopperReference) { - if (is_null($shopperReference)) { - throw new \InvalidArgumentException('non-nullable shopperReference cannot be null'); - } $this->container['shopperReference'] = $shopperReference; return $this; @@ -1990,9 +1893,6 @@ public function getShopperStatement() */ public function setShopperStatement($shopperStatement) { - if (is_null($shopperStatement)) { - throw new \InvalidArgumentException('non-nullable shopperStatement cannot be null'); - } $this->container['shopperStatement'] = $shopperStatement; return $this; @@ -2017,9 +1917,6 @@ public function getSocialSecurityNumber() */ public function setSocialSecurityNumber($socialSecurityNumber) { - if (is_null($socialSecurityNumber)) { - throw new \InvalidArgumentException('non-nullable socialSecurityNumber cannot be null'); - } $this->container['socialSecurityNumber'] = $socialSecurityNumber; return $this; @@ -2044,9 +1941,6 @@ public function getSplits() */ public function setSplits($splits) { - if (is_null($splits)) { - throw new \InvalidArgumentException('non-nullable splits cannot be null'); - } $this->container['splits'] = $splits; return $this; @@ -2071,9 +1965,6 @@ public function getStore() */ public function setStore($store) { - if (is_null($store)) { - throw new \InvalidArgumentException('non-nullable store cannot be null'); - } $this->container['store'] = $store; return $this; @@ -2098,9 +1989,6 @@ public function getTelephoneNumber() */ public function setTelephoneNumber($telephoneNumber) { - if (is_null($telephoneNumber)) { - throw new \InvalidArgumentException('non-nullable telephoneNumber cannot be null'); - } $this->container['telephoneNumber'] = $telephoneNumber; return $this; @@ -2125,9 +2013,6 @@ public function getThreeDS2RequestData() */ public function setThreeDS2RequestData($threeDS2RequestData) { - if (is_null($threeDS2RequestData)) { - throw new \InvalidArgumentException('non-nullable threeDS2RequestData cannot be null'); - } $this->container['threeDS2RequestData'] = $threeDS2RequestData; return $this; @@ -2152,9 +2037,6 @@ public function getThreeDSAuthenticationOnly() */ public function setThreeDSAuthenticationOnly($threeDSAuthenticationOnly) { - if (is_null($threeDSAuthenticationOnly)) { - throw new \InvalidArgumentException('non-nullable threeDSAuthenticationOnly cannot be null'); - } $this->container['threeDSAuthenticationOnly'] = $threeDSAuthenticationOnly; return $this; @@ -2179,9 +2061,6 @@ public function getTotalsGroup() */ public function setTotalsGroup($totalsGroup) { - if (is_null($totalsGroup)) { - throw new \InvalidArgumentException('non-nullable totalsGroup cannot be null'); - } $this->container['totalsGroup'] = $totalsGroup; return $this; @@ -2206,9 +2085,6 @@ public function getTrustedShopper() */ public function setTrustedShopper($trustedShopper) { - if (is_null($trustedShopper)) { - throw new \InvalidArgumentException('non-nullable trustedShopper cannot be null'); - } $this->container['trustedShopper'] = $trustedShopper; return $this; diff --git a/src/Adyen/Model/Payments/PaymentRequest3d.php b/src/Adyen/Model/Payments/PaymentRequest3d.php index 407f19214..8c8ed8440 100644 --- a/src/Adyen/Model/Payments/PaymentRequest3d.php +++ b/src/Adyen/Model/Payments/PaymentRequest3d.php @@ -664,9 +664,6 @@ public function getAccountInfo() */ public function setAccountInfo($accountInfo) { - if (is_null($accountInfo)) { - throw new \InvalidArgumentException('non-nullable accountInfo cannot be null'); - } $this->container['accountInfo'] = $accountInfo; return $this; @@ -691,9 +688,6 @@ public function getAdditionalAmount() */ public function setAdditionalAmount($additionalAmount) { - if (is_null($additionalAmount)) { - throw new \InvalidArgumentException('non-nullable additionalAmount cannot be null'); - } $this->container['additionalAmount'] = $additionalAmount; return $this; @@ -718,9 +712,6 @@ public function getAdditionalData() */ public function setAdditionalData($additionalData) { - if (is_null($additionalData)) { - throw new \InvalidArgumentException('non-nullable additionalData cannot be null'); - } $this->container['additionalData'] = $additionalData; return $this; @@ -745,9 +736,6 @@ public function getAmount() */ public function setAmount($amount) { - if (is_null($amount)) { - throw new \InvalidArgumentException('non-nullable amount cannot be null'); - } $this->container['amount'] = $amount; return $this; @@ -772,9 +760,6 @@ public function getApplicationInfo() */ public function setApplicationInfo($applicationInfo) { - if (is_null($applicationInfo)) { - throw new \InvalidArgumentException('non-nullable applicationInfo cannot be null'); - } $this->container['applicationInfo'] = $applicationInfo; return $this; @@ -799,9 +784,6 @@ public function getBillingAddress() */ public function setBillingAddress($billingAddress) { - if (is_null($billingAddress)) { - throw new \InvalidArgumentException('non-nullable billingAddress cannot be null'); - } $this->container['billingAddress'] = $billingAddress; return $this; @@ -826,9 +808,6 @@ public function getBrowserInfo() */ public function setBrowserInfo($browserInfo) { - if (is_null($browserInfo)) { - throw new \InvalidArgumentException('non-nullable browserInfo cannot be null'); - } $this->container['browserInfo'] = $browserInfo; return $this; @@ -853,7 +832,6 @@ public function getCaptureDelayHours() */ public function setCaptureDelayHours($captureDelayHours) { - // Do nothing for nullable integers $this->container['captureDelayHours'] = $captureDelayHours; return $this; @@ -878,9 +856,6 @@ public function getDateOfBirth() */ public function setDateOfBirth($dateOfBirth) { - if (is_null($dateOfBirth)) { - throw new \InvalidArgumentException('non-nullable dateOfBirth cannot be null'); - } $this->container['dateOfBirth'] = $dateOfBirth; return $this; @@ -905,9 +880,6 @@ public function getDccQuote() */ public function setDccQuote($dccQuote) { - if (is_null($dccQuote)) { - throw new \InvalidArgumentException('non-nullable dccQuote cannot be null'); - } $this->container['dccQuote'] = $dccQuote; return $this; @@ -932,9 +904,6 @@ public function getDeliveryAddress() */ public function setDeliveryAddress($deliveryAddress) { - if (is_null($deliveryAddress)) { - throw new \InvalidArgumentException('non-nullable deliveryAddress cannot be null'); - } $this->container['deliveryAddress'] = $deliveryAddress; return $this; @@ -959,9 +928,6 @@ public function getDeliveryDate() */ public function setDeliveryDate($deliveryDate) { - if (is_null($deliveryDate)) { - throw new \InvalidArgumentException('non-nullable deliveryDate cannot be null'); - } $this->container['deliveryDate'] = $deliveryDate; return $this; @@ -986,9 +952,6 @@ public function getDeviceFingerprint() */ public function setDeviceFingerprint($deviceFingerprint) { - if (is_null($deviceFingerprint)) { - throw new \InvalidArgumentException('non-nullable deviceFingerprint cannot be null'); - } $this->container['deviceFingerprint'] = $deviceFingerprint; return $this; @@ -1013,7 +976,6 @@ public function getFraudOffset() */ public function setFraudOffset($fraudOffset) { - // Do nothing for nullable integers $this->container['fraudOffset'] = $fraudOffset; return $this; @@ -1038,9 +1000,6 @@ public function getInstallments() */ public function setInstallments($installments) { - if (is_null($installments)) { - throw new \InvalidArgumentException('non-nullable installments cannot be null'); - } $this->container['installments'] = $installments; return $this; @@ -1065,9 +1024,6 @@ public function getLocalizedShopperStatement() */ public function setLocalizedShopperStatement($localizedShopperStatement) { - if (is_null($localizedShopperStatement)) { - throw new \InvalidArgumentException('non-nullable localizedShopperStatement cannot be null'); - } $this->container['localizedShopperStatement'] = $localizedShopperStatement; return $this; @@ -1092,9 +1048,6 @@ public function getMcc() */ public function setMcc($mcc) { - if (is_null($mcc)) { - throw new \InvalidArgumentException('non-nullable mcc cannot be null'); - } $this->container['mcc'] = $mcc; return $this; @@ -1119,9 +1072,6 @@ public function getMd() */ public function setMd($md) { - if (is_null($md)) { - throw new \InvalidArgumentException('non-nullable md cannot be null'); - } $this->container['md'] = $md; return $this; @@ -1146,9 +1096,6 @@ public function getMerchantAccount() */ public function setMerchantAccount($merchantAccount) { - if (is_null($merchantAccount)) { - throw new \InvalidArgumentException('non-nullable merchantAccount cannot be null'); - } $this->container['merchantAccount'] = $merchantAccount; return $this; @@ -1173,9 +1120,6 @@ public function getMerchantOrderReference() */ public function setMerchantOrderReference($merchantOrderReference) { - if (is_null($merchantOrderReference)) { - throw new \InvalidArgumentException('non-nullable merchantOrderReference cannot be null'); - } $this->container['merchantOrderReference'] = $merchantOrderReference; return $this; @@ -1200,9 +1144,6 @@ public function getMerchantRiskIndicator() */ public function setMerchantRiskIndicator($merchantRiskIndicator) { - if (is_null($merchantRiskIndicator)) { - throw new \InvalidArgumentException('non-nullable merchantRiskIndicator cannot be null'); - } $this->container['merchantRiskIndicator'] = $merchantRiskIndicator; return $this; @@ -1227,9 +1168,6 @@ public function getMetadata() */ public function setMetadata($metadata) { - if (is_null($metadata)) { - throw new \InvalidArgumentException('non-nullable metadata cannot be null'); - } $this->container['metadata'] = $metadata; return $this; @@ -1254,9 +1192,6 @@ public function getOrderReference() */ public function setOrderReference($orderReference) { - if (is_null($orderReference)) { - throw new \InvalidArgumentException('non-nullable orderReference cannot be null'); - } $this->container['orderReference'] = $orderReference; return $this; @@ -1281,9 +1216,6 @@ public function getPaResponse() */ public function setPaResponse($paResponse) { - if (is_null($paResponse)) { - throw new \InvalidArgumentException('non-nullable paResponse cannot be null'); - } $this->container['paResponse'] = $paResponse; return $this; @@ -1308,9 +1240,6 @@ public function getRecurring() */ public function setRecurring($recurring) { - if (is_null($recurring)) { - throw new \InvalidArgumentException('non-nullable recurring cannot be null'); - } $this->container['recurring'] = $recurring; return $this; @@ -1335,9 +1264,6 @@ public function getRecurringProcessingModel() */ 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( @@ -1372,9 +1298,6 @@ public function getReference() */ public function setReference($reference) { - if (is_null($reference)) { - throw new \InvalidArgumentException('non-nullable reference cannot be null'); - } $this->container['reference'] = $reference; return $this; @@ -1399,9 +1322,6 @@ public function getSelectedBrand() */ public function setSelectedBrand($selectedBrand) { - if (is_null($selectedBrand)) { - throw new \InvalidArgumentException('non-nullable selectedBrand cannot be null'); - } $this->container['selectedBrand'] = $selectedBrand; return $this; @@ -1426,9 +1346,6 @@ public function getSelectedRecurringDetailReference() */ public function setSelectedRecurringDetailReference($selectedRecurringDetailReference) { - if (is_null($selectedRecurringDetailReference)) { - throw new \InvalidArgumentException('non-nullable selectedRecurringDetailReference cannot be null'); - } $this->container['selectedRecurringDetailReference'] = $selectedRecurringDetailReference; return $this; @@ -1453,9 +1370,6 @@ public function getSessionId() */ public function setSessionId($sessionId) { - if (is_null($sessionId)) { - throw new \InvalidArgumentException('non-nullable sessionId cannot be null'); - } $this->container['sessionId'] = $sessionId; return $this; @@ -1480,9 +1394,6 @@ public function getShopperEmail() */ public function setShopperEmail($shopperEmail) { - if (is_null($shopperEmail)) { - throw new \InvalidArgumentException('non-nullable shopperEmail cannot be null'); - } $this->container['shopperEmail'] = $shopperEmail; return $this; @@ -1507,9 +1418,6 @@ public function getShopperIP() */ public function setShopperIP($shopperIP) { - if (is_null($shopperIP)) { - throw new \InvalidArgumentException('non-nullable shopperIP cannot be null'); - } $this->container['shopperIP'] = $shopperIP; return $this; @@ -1534,9 +1442,6 @@ public function getShopperInteraction() */ 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( @@ -1571,9 +1476,6 @@ public function getShopperLocale() */ public function setShopperLocale($shopperLocale) { - if (is_null($shopperLocale)) { - throw new \InvalidArgumentException('non-nullable shopperLocale cannot be null'); - } $this->container['shopperLocale'] = $shopperLocale; return $this; @@ -1598,9 +1500,6 @@ public function getShopperName() */ public function setShopperName($shopperName) { - if (is_null($shopperName)) { - throw new \InvalidArgumentException('non-nullable shopperName cannot be null'); - } $this->container['shopperName'] = $shopperName; return $this; @@ -1625,9 +1524,6 @@ public function getShopperReference() */ public function setShopperReference($shopperReference) { - if (is_null($shopperReference)) { - throw new \InvalidArgumentException('non-nullable shopperReference cannot be null'); - } $this->container['shopperReference'] = $shopperReference; return $this; @@ -1652,9 +1548,6 @@ public function getShopperStatement() */ public function setShopperStatement($shopperStatement) { - if (is_null($shopperStatement)) { - throw new \InvalidArgumentException('non-nullable shopperStatement cannot be null'); - } $this->container['shopperStatement'] = $shopperStatement; return $this; @@ -1679,9 +1572,6 @@ public function getSocialSecurityNumber() */ public function setSocialSecurityNumber($socialSecurityNumber) { - if (is_null($socialSecurityNumber)) { - throw new \InvalidArgumentException('non-nullable socialSecurityNumber cannot be null'); - } $this->container['socialSecurityNumber'] = $socialSecurityNumber; return $this; @@ -1706,9 +1596,6 @@ public function getSplits() */ public function setSplits($splits) { - if (is_null($splits)) { - throw new \InvalidArgumentException('non-nullable splits cannot be null'); - } $this->container['splits'] = $splits; return $this; @@ -1733,9 +1620,6 @@ public function getStore() */ public function setStore($store) { - if (is_null($store)) { - throw new \InvalidArgumentException('non-nullable store cannot be null'); - } $this->container['store'] = $store; return $this; @@ -1760,9 +1644,6 @@ public function getTelephoneNumber() */ public function setTelephoneNumber($telephoneNumber) { - if (is_null($telephoneNumber)) { - throw new \InvalidArgumentException('non-nullable telephoneNumber cannot be null'); - } $this->container['telephoneNumber'] = $telephoneNumber; return $this; @@ -1787,9 +1668,6 @@ public function getThreeDS2RequestData() */ public function setThreeDS2RequestData($threeDS2RequestData) { - if (is_null($threeDS2RequestData)) { - throw new \InvalidArgumentException('non-nullable threeDS2RequestData cannot be null'); - } $this->container['threeDS2RequestData'] = $threeDS2RequestData; return $this; @@ -1814,9 +1692,6 @@ public function getThreeDSAuthenticationOnly() */ public function setThreeDSAuthenticationOnly($threeDSAuthenticationOnly) { - if (is_null($threeDSAuthenticationOnly)) { - throw new \InvalidArgumentException('non-nullable threeDSAuthenticationOnly cannot be null'); - } $this->container['threeDSAuthenticationOnly'] = $threeDSAuthenticationOnly; return $this; @@ -1841,9 +1716,6 @@ public function getTotalsGroup() */ public function setTotalsGroup($totalsGroup) { - if (is_null($totalsGroup)) { - throw new \InvalidArgumentException('non-nullable totalsGroup cannot be null'); - } $this->container['totalsGroup'] = $totalsGroup; return $this; @@ -1868,9 +1740,6 @@ public function getTrustedShopper() */ public function setTrustedShopper($trustedShopper) { - if (is_null($trustedShopper)) { - throw new \InvalidArgumentException('non-nullable trustedShopper cannot be null'); - } $this->container['trustedShopper'] = $trustedShopper; return $this; diff --git a/src/Adyen/Model/Payments/PaymentRequest3ds2.php b/src/Adyen/Model/Payments/PaymentRequest3ds2.php index a0e0ef34a..92df5e30b 100644 --- a/src/Adyen/Model/Payments/PaymentRequest3ds2.php +++ b/src/Adyen/Model/Payments/PaymentRequest3ds2.php @@ -664,9 +664,6 @@ public function getAccountInfo() */ public function setAccountInfo($accountInfo) { - if (is_null($accountInfo)) { - throw new \InvalidArgumentException('non-nullable accountInfo cannot be null'); - } $this->container['accountInfo'] = $accountInfo; return $this; @@ -691,9 +688,6 @@ public function getAdditionalAmount() */ public function setAdditionalAmount($additionalAmount) { - if (is_null($additionalAmount)) { - throw new \InvalidArgumentException('non-nullable additionalAmount cannot be null'); - } $this->container['additionalAmount'] = $additionalAmount; return $this; @@ -718,9 +712,6 @@ public function getAdditionalData() */ public function setAdditionalData($additionalData) { - if (is_null($additionalData)) { - throw new \InvalidArgumentException('non-nullable additionalData cannot be null'); - } $this->container['additionalData'] = $additionalData; return $this; @@ -745,9 +736,6 @@ public function getAmount() */ public function setAmount($amount) { - if (is_null($amount)) { - throw new \InvalidArgumentException('non-nullable amount cannot be null'); - } $this->container['amount'] = $amount; return $this; @@ -772,9 +760,6 @@ public function getApplicationInfo() */ public function setApplicationInfo($applicationInfo) { - if (is_null($applicationInfo)) { - throw new \InvalidArgumentException('non-nullable applicationInfo cannot be null'); - } $this->container['applicationInfo'] = $applicationInfo; return $this; @@ -799,9 +784,6 @@ public function getBillingAddress() */ public function setBillingAddress($billingAddress) { - if (is_null($billingAddress)) { - throw new \InvalidArgumentException('non-nullable billingAddress cannot be null'); - } $this->container['billingAddress'] = $billingAddress; return $this; @@ -826,9 +808,6 @@ public function getBrowserInfo() */ public function setBrowserInfo($browserInfo) { - if (is_null($browserInfo)) { - throw new \InvalidArgumentException('non-nullable browserInfo cannot be null'); - } $this->container['browserInfo'] = $browserInfo; return $this; @@ -853,7 +832,6 @@ public function getCaptureDelayHours() */ public function setCaptureDelayHours($captureDelayHours) { - // Do nothing for nullable integers $this->container['captureDelayHours'] = $captureDelayHours; return $this; @@ -878,9 +856,6 @@ public function getDateOfBirth() */ public function setDateOfBirth($dateOfBirth) { - if (is_null($dateOfBirth)) { - throw new \InvalidArgumentException('non-nullable dateOfBirth cannot be null'); - } $this->container['dateOfBirth'] = $dateOfBirth; return $this; @@ -905,9 +880,6 @@ public function getDccQuote() */ public function setDccQuote($dccQuote) { - if (is_null($dccQuote)) { - throw new \InvalidArgumentException('non-nullable dccQuote cannot be null'); - } $this->container['dccQuote'] = $dccQuote; return $this; @@ -932,9 +904,6 @@ public function getDeliveryAddress() */ public function setDeliveryAddress($deliveryAddress) { - if (is_null($deliveryAddress)) { - throw new \InvalidArgumentException('non-nullable deliveryAddress cannot be null'); - } $this->container['deliveryAddress'] = $deliveryAddress; return $this; @@ -959,9 +928,6 @@ public function getDeliveryDate() */ public function setDeliveryDate($deliveryDate) { - if (is_null($deliveryDate)) { - throw new \InvalidArgumentException('non-nullable deliveryDate cannot be null'); - } $this->container['deliveryDate'] = $deliveryDate; return $this; @@ -986,9 +952,6 @@ public function getDeviceFingerprint() */ public function setDeviceFingerprint($deviceFingerprint) { - if (is_null($deviceFingerprint)) { - throw new \InvalidArgumentException('non-nullable deviceFingerprint cannot be null'); - } $this->container['deviceFingerprint'] = $deviceFingerprint; return $this; @@ -1013,7 +976,6 @@ public function getFraudOffset() */ public function setFraudOffset($fraudOffset) { - // Do nothing for nullable integers $this->container['fraudOffset'] = $fraudOffset; return $this; @@ -1038,9 +1000,6 @@ public function getInstallments() */ public function setInstallments($installments) { - if (is_null($installments)) { - throw new \InvalidArgumentException('non-nullable installments cannot be null'); - } $this->container['installments'] = $installments; return $this; @@ -1065,9 +1024,6 @@ public function getLocalizedShopperStatement() */ public function setLocalizedShopperStatement($localizedShopperStatement) { - if (is_null($localizedShopperStatement)) { - throw new \InvalidArgumentException('non-nullable localizedShopperStatement cannot be null'); - } $this->container['localizedShopperStatement'] = $localizedShopperStatement; return $this; @@ -1092,9 +1048,6 @@ public function getMcc() */ public function setMcc($mcc) { - if (is_null($mcc)) { - throw new \InvalidArgumentException('non-nullable mcc cannot be null'); - } $this->container['mcc'] = $mcc; return $this; @@ -1119,9 +1072,6 @@ public function getMerchantAccount() */ public function setMerchantAccount($merchantAccount) { - if (is_null($merchantAccount)) { - throw new \InvalidArgumentException('non-nullable merchantAccount cannot be null'); - } $this->container['merchantAccount'] = $merchantAccount; return $this; @@ -1146,9 +1096,6 @@ public function getMerchantOrderReference() */ public function setMerchantOrderReference($merchantOrderReference) { - if (is_null($merchantOrderReference)) { - throw new \InvalidArgumentException('non-nullable merchantOrderReference cannot be null'); - } $this->container['merchantOrderReference'] = $merchantOrderReference; return $this; @@ -1173,9 +1120,6 @@ public function getMerchantRiskIndicator() */ public function setMerchantRiskIndicator($merchantRiskIndicator) { - if (is_null($merchantRiskIndicator)) { - throw new \InvalidArgumentException('non-nullable merchantRiskIndicator cannot be null'); - } $this->container['merchantRiskIndicator'] = $merchantRiskIndicator; return $this; @@ -1200,9 +1144,6 @@ public function getMetadata() */ public function setMetadata($metadata) { - if (is_null($metadata)) { - throw new \InvalidArgumentException('non-nullable metadata cannot be null'); - } $this->container['metadata'] = $metadata; return $this; @@ -1227,9 +1168,6 @@ public function getOrderReference() */ public function setOrderReference($orderReference) { - if (is_null($orderReference)) { - throw new \InvalidArgumentException('non-nullable orderReference cannot be null'); - } $this->container['orderReference'] = $orderReference; return $this; @@ -1254,9 +1192,6 @@ public function getRecurring() */ public function setRecurring($recurring) { - if (is_null($recurring)) { - throw new \InvalidArgumentException('non-nullable recurring cannot be null'); - } $this->container['recurring'] = $recurring; return $this; @@ -1281,9 +1216,6 @@ public function getRecurringProcessingModel() */ 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( @@ -1318,9 +1250,6 @@ public function getReference() */ public function setReference($reference) { - if (is_null($reference)) { - throw new \InvalidArgumentException('non-nullable reference cannot be null'); - } $this->container['reference'] = $reference; return $this; @@ -1345,9 +1274,6 @@ public function getSelectedBrand() */ public function setSelectedBrand($selectedBrand) { - if (is_null($selectedBrand)) { - throw new \InvalidArgumentException('non-nullable selectedBrand cannot be null'); - } $this->container['selectedBrand'] = $selectedBrand; return $this; @@ -1372,9 +1298,6 @@ public function getSelectedRecurringDetailReference() */ public function setSelectedRecurringDetailReference($selectedRecurringDetailReference) { - if (is_null($selectedRecurringDetailReference)) { - throw new \InvalidArgumentException('non-nullable selectedRecurringDetailReference cannot be null'); - } $this->container['selectedRecurringDetailReference'] = $selectedRecurringDetailReference; return $this; @@ -1399,9 +1322,6 @@ public function getSessionId() */ public function setSessionId($sessionId) { - if (is_null($sessionId)) { - throw new \InvalidArgumentException('non-nullable sessionId cannot be null'); - } $this->container['sessionId'] = $sessionId; return $this; @@ -1426,9 +1346,6 @@ public function getShopperEmail() */ public function setShopperEmail($shopperEmail) { - if (is_null($shopperEmail)) { - throw new \InvalidArgumentException('non-nullable shopperEmail cannot be null'); - } $this->container['shopperEmail'] = $shopperEmail; return $this; @@ -1453,9 +1370,6 @@ public function getShopperIP() */ public function setShopperIP($shopperIP) { - if (is_null($shopperIP)) { - throw new \InvalidArgumentException('non-nullable shopperIP cannot be null'); - } $this->container['shopperIP'] = $shopperIP; return $this; @@ -1480,9 +1394,6 @@ public function getShopperInteraction() */ 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( @@ -1517,9 +1428,6 @@ public function getShopperLocale() */ public function setShopperLocale($shopperLocale) { - if (is_null($shopperLocale)) { - throw new \InvalidArgumentException('non-nullable shopperLocale cannot be null'); - } $this->container['shopperLocale'] = $shopperLocale; return $this; @@ -1544,9 +1452,6 @@ public function getShopperName() */ public function setShopperName($shopperName) { - if (is_null($shopperName)) { - throw new \InvalidArgumentException('non-nullable shopperName cannot be null'); - } $this->container['shopperName'] = $shopperName; return $this; @@ -1571,9 +1476,6 @@ public function getShopperReference() */ public function setShopperReference($shopperReference) { - if (is_null($shopperReference)) { - throw new \InvalidArgumentException('non-nullable shopperReference cannot be null'); - } $this->container['shopperReference'] = $shopperReference; return $this; @@ -1598,9 +1500,6 @@ public function getShopperStatement() */ public function setShopperStatement($shopperStatement) { - if (is_null($shopperStatement)) { - throw new \InvalidArgumentException('non-nullable shopperStatement cannot be null'); - } $this->container['shopperStatement'] = $shopperStatement; return $this; @@ -1625,9 +1524,6 @@ public function getSocialSecurityNumber() */ public function setSocialSecurityNumber($socialSecurityNumber) { - if (is_null($socialSecurityNumber)) { - throw new \InvalidArgumentException('non-nullable socialSecurityNumber cannot be null'); - } $this->container['socialSecurityNumber'] = $socialSecurityNumber; return $this; @@ -1652,9 +1548,6 @@ public function getSplits() */ public function setSplits($splits) { - if (is_null($splits)) { - throw new \InvalidArgumentException('non-nullable splits cannot be null'); - } $this->container['splits'] = $splits; return $this; @@ -1679,9 +1572,6 @@ public function getStore() */ public function setStore($store) { - if (is_null($store)) { - throw new \InvalidArgumentException('non-nullable store cannot be null'); - } $this->container['store'] = $store; return $this; @@ -1706,9 +1596,6 @@ public function getTelephoneNumber() */ public function setTelephoneNumber($telephoneNumber) { - if (is_null($telephoneNumber)) { - throw new \InvalidArgumentException('non-nullable telephoneNumber cannot be null'); - } $this->container['telephoneNumber'] = $telephoneNumber; return $this; @@ -1733,9 +1620,6 @@ public function getThreeDS2RequestData() */ public function setThreeDS2RequestData($threeDS2RequestData) { - if (is_null($threeDS2RequestData)) { - throw new \InvalidArgumentException('non-nullable threeDS2RequestData cannot be null'); - } $this->container['threeDS2RequestData'] = $threeDS2RequestData; return $this; @@ -1760,9 +1644,6 @@ public function getThreeDS2Result() */ public function setThreeDS2Result($threeDS2Result) { - if (is_null($threeDS2Result)) { - throw new \InvalidArgumentException('non-nullable threeDS2Result cannot be null'); - } $this->container['threeDS2Result'] = $threeDS2Result; return $this; @@ -1787,9 +1668,6 @@ public function getThreeDS2Token() */ public function setThreeDS2Token($threeDS2Token) { - if (is_null($threeDS2Token)) { - throw new \InvalidArgumentException('non-nullable threeDS2Token cannot be null'); - } $this->container['threeDS2Token'] = $threeDS2Token; return $this; @@ -1814,9 +1692,6 @@ public function getThreeDSAuthenticationOnly() */ public function setThreeDSAuthenticationOnly($threeDSAuthenticationOnly) { - if (is_null($threeDSAuthenticationOnly)) { - throw new \InvalidArgumentException('non-nullable threeDSAuthenticationOnly cannot be null'); - } $this->container['threeDSAuthenticationOnly'] = $threeDSAuthenticationOnly; return $this; @@ -1841,9 +1716,6 @@ public function getTotalsGroup() */ public function setTotalsGroup($totalsGroup) { - if (is_null($totalsGroup)) { - throw new \InvalidArgumentException('non-nullable totalsGroup cannot be null'); - } $this->container['totalsGroup'] = $totalsGroup; return $this; @@ -1868,9 +1740,6 @@ public function getTrustedShopper() */ public function setTrustedShopper($trustedShopper) { - if (is_null($trustedShopper)) { - throw new \InvalidArgumentException('non-nullable trustedShopper cannot be null'); - } $this->container['trustedShopper'] = $trustedShopper; return $this; diff --git a/src/Adyen/Model/Payments/PaymentResult.php b/src/Adyen/Model/Payments/PaymentResult.php index 487413712..6cab22a4b 100644 --- a/src/Adyen/Model/Payments/PaymentResult.php +++ b/src/Adyen/Model/Payments/PaymentResult.php @@ -412,9 +412,6 @@ public function getAdditionalData() */ public function setAdditionalData($additionalData) { - if (is_null($additionalData)) { - throw new \InvalidArgumentException('non-nullable additionalData cannot be null'); - } $this->container['additionalData'] = $additionalData; return $this; @@ -439,9 +436,6 @@ public function getAuthCode() */ public function setAuthCode($authCode) { - if (is_null($authCode)) { - throw new \InvalidArgumentException('non-nullable authCode cannot be null'); - } $this->container['authCode'] = $authCode; return $this; @@ -466,9 +460,6 @@ public function getDccAmount() */ public function setDccAmount($dccAmount) { - if (is_null($dccAmount)) { - throw new \InvalidArgumentException('non-nullable dccAmount cannot be null'); - } $this->container['dccAmount'] = $dccAmount; return $this; @@ -493,9 +484,6 @@ public function getDccSignature() */ public function setDccSignature($dccSignature) { - if (is_null($dccSignature)) { - throw new \InvalidArgumentException('non-nullable dccSignature cannot be null'); - } $this->container['dccSignature'] = $dccSignature; return $this; @@ -520,9 +508,6 @@ public function getFraudResult() */ public function setFraudResult($fraudResult) { - if (is_null($fraudResult)) { - throw new \InvalidArgumentException('non-nullable fraudResult cannot be null'); - } $this->container['fraudResult'] = $fraudResult; return $this; @@ -547,9 +532,6 @@ public function getIssuerUrl() */ public function setIssuerUrl($issuerUrl) { - if (is_null($issuerUrl)) { - throw new \InvalidArgumentException('non-nullable issuerUrl cannot be null'); - } $this->container['issuerUrl'] = $issuerUrl; return $this; @@ -574,9 +556,6 @@ public function getMd() */ public function setMd($md) { - if (is_null($md)) { - throw new \InvalidArgumentException('non-nullable md cannot be null'); - } $this->container['md'] = $md; return $this; @@ -601,9 +580,6 @@ public function getPaRequest() */ public function setPaRequest($paRequest) { - if (is_null($paRequest)) { - throw new \InvalidArgumentException('non-nullable paRequest cannot be null'); - } $this->container['paRequest'] = $paRequest; return $this; @@ -628,9 +604,6 @@ public function getPspReference() */ public function setPspReference($pspReference) { - if (is_null($pspReference)) { - throw new \InvalidArgumentException('non-nullable pspReference cannot be null'); - } $this->container['pspReference'] = $pspReference; return $this; @@ -655,9 +628,6 @@ public function getRefusalReason() */ public function setRefusalReason($refusalReason) { - if (is_null($refusalReason)) { - throw new \InvalidArgumentException('non-nullable refusalReason cannot be null'); - } $this->container['refusalReason'] = $refusalReason; return $this; @@ -682,9 +652,6 @@ public function getResultCode() */ 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( diff --git a/src/Adyen/Model/Payments/Phone.php b/src/Adyen/Model/Payments/Phone.php index 29e4a650d..a249087c7 100644 --- a/src/Adyen/Model/Payments/Phone.php +++ b/src/Adyen/Model/Payments/Phone.php @@ -302,9 +302,6 @@ public function getCc() */ public function setCc($cc) { - if (is_null($cc)) { - throw new \InvalidArgumentException('non-nullable cc cannot be null'); - } $this->container['cc'] = $cc; return $this; @@ -329,9 +326,6 @@ public function getSubscriber() */ public function setSubscriber($subscriber) { - if (is_null($subscriber)) { - throw new \InvalidArgumentException('non-nullable subscriber cannot be null'); - } $this->container['subscriber'] = $subscriber; return $this; diff --git a/src/Adyen/Model/Payments/PlatformChargebackLogic.php b/src/Adyen/Model/Payments/PlatformChargebackLogic.php index 07d9bd8d8..516d846af 100644 --- a/src/Adyen/Model/Payments/PlatformChargebackLogic.php +++ b/src/Adyen/Model/Payments/PlatformChargebackLogic.php @@ -334,9 +334,6 @@ public function getBehavior() */ 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( @@ -371,9 +368,6 @@ public function getCostAllocationAccount() */ public function setCostAllocationAccount($costAllocationAccount) { - if (is_null($costAllocationAccount)) { - throw new \InvalidArgumentException('non-nullable costAllocationAccount cannot be null'); - } $this->container['costAllocationAccount'] = $costAllocationAccount; return $this; @@ -398,9 +392,6 @@ public function getTargetAccount() */ public function setTargetAccount($targetAccount) { - if (is_null($targetAccount)) { - throw new \InvalidArgumentException('non-nullable targetAccount cannot be null'); - } $this->container['targetAccount'] = $targetAccount; return $this; diff --git a/src/Adyen/Model/Payments/Recurring.php b/src/Adyen/Model/Payments/Recurring.php index 66d9e5d77..c42aee29e 100644 --- a/src/Adyen/Model/Payments/Recurring.php +++ b/src/Adyen/Model/Payments/Recurring.php @@ -375,9 +375,6 @@ public function getContract() */ 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( @@ -412,9 +409,6 @@ public function getRecurringDetailName() */ public function setRecurringDetailName($recurringDetailName) { - if (is_null($recurringDetailName)) { - throw new \InvalidArgumentException('non-nullable recurringDetailName cannot be null'); - } $this->container['recurringDetailName'] = $recurringDetailName; return $this; @@ -439,9 +433,6 @@ public function getRecurringExpiry() */ public function setRecurringExpiry($recurringExpiry) { - if (is_null($recurringExpiry)) { - throw new \InvalidArgumentException('non-nullable recurringExpiry cannot be null'); - } $this->container['recurringExpiry'] = $recurringExpiry; return $this; @@ -466,9 +457,6 @@ public function getRecurringFrequency() */ public function setRecurringFrequency($recurringFrequency) { - if (is_null($recurringFrequency)) { - throw new \InvalidArgumentException('non-nullable recurringFrequency cannot be null'); - } $this->container['recurringFrequency'] = $recurringFrequency; return $this; @@ -493,9 +481,6 @@ public function getTokenService() */ 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( diff --git a/src/Adyen/Model/Payments/RefundRequest.php b/src/Adyen/Model/Payments/RefundRequest.php index 934e6fd64..653bfbd13 100644 --- a/src/Adyen/Model/Payments/RefundRequest.php +++ b/src/Adyen/Model/Payments/RefundRequest.php @@ -374,9 +374,6 @@ public function getAdditionalData() */ public function setAdditionalData($additionalData) { - if (is_null($additionalData)) { - throw new \InvalidArgumentException('non-nullable additionalData cannot be null'); - } $this->container['additionalData'] = $additionalData; return $this; @@ -401,9 +398,6 @@ public function getMerchantAccount() */ public function setMerchantAccount($merchantAccount) { - if (is_null($merchantAccount)) { - throw new \InvalidArgumentException('non-nullable merchantAccount cannot be null'); - } $this->container['merchantAccount'] = $merchantAccount; return $this; @@ -428,9 +422,6 @@ public function getModificationAmount() */ public function setModificationAmount($modificationAmount) { - if (is_null($modificationAmount)) { - throw new \InvalidArgumentException('non-nullable modificationAmount cannot be null'); - } $this->container['modificationAmount'] = $modificationAmount; return $this; @@ -455,9 +446,6 @@ public function getMpiData() */ public function setMpiData($mpiData) { - if (is_null($mpiData)) { - throw new \InvalidArgumentException('non-nullable mpiData cannot be null'); - } $this->container['mpiData'] = $mpiData; return $this; @@ -482,9 +470,6 @@ public function getOriginalMerchantReference() */ public function setOriginalMerchantReference($originalMerchantReference) { - if (is_null($originalMerchantReference)) { - throw new \InvalidArgumentException('non-nullable originalMerchantReference cannot be null'); - } $this->container['originalMerchantReference'] = $originalMerchantReference; return $this; @@ -509,9 +494,6 @@ public function getOriginalReference() */ public function setOriginalReference($originalReference) { - if (is_null($originalReference)) { - throw new \InvalidArgumentException('non-nullable originalReference cannot be null'); - } $this->container['originalReference'] = $originalReference; return $this; @@ -536,9 +518,6 @@ public function getPlatformChargebackLogic() */ public function setPlatformChargebackLogic($platformChargebackLogic) { - if (is_null($platformChargebackLogic)) { - throw new \InvalidArgumentException('non-nullable platformChargebackLogic cannot be null'); - } $this->container['platformChargebackLogic'] = $platformChargebackLogic; return $this; @@ -563,9 +542,6 @@ public function getReference() */ public function setReference($reference) { - if (is_null($reference)) { - throw new \InvalidArgumentException('non-nullable reference cannot be null'); - } $this->container['reference'] = $reference; return $this; @@ -590,9 +566,6 @@ public function getSplits() */ public function setSplits($splits) { - if (is_null($splits)) { - throw new \InvalidArgumentException('non-nullable splits cannot be null'); - } $this->container['splits'] = $splits; return $this; @@ -617,9 +590,6 @@ public function getTenderReference() */ public function setTenderReference($tenderReference) { - if (is_null($tenderReference)) { - throw new \InvalidArgumentException('non-nullable tenderReference cannot be null'); - } $this->container['tenderReference'] = $tenderReference; return $this; @@ -644,9 +614,6 @@ public function getUniqueTerminalId() */ public function setUniqueTerminalId($uniqueTerminalId) { - if (is_null($uniqueTerminalId)) { - throw new \InvalidArgumentException('non-nullable uniqueTerminalId cannot be null'); - } $this->container['uniqueTerminalId'] = $uniqueTerminalId; return $this; diff --git a/src/Adyen/Model/Payments/ResponseAdditionalData3DSecure.php b/src/Adyen/Model/Payments/ResponseAdditionalData3DSecure.php index 6025562fd..1352635b4 100644 --- a/src/Adyen/Model/Payments/ResponseAdditionalData3DSecure.php +++ b/src/Adyen/Model/Payments/ResponseAdditionalData3DSecure.php @@ -323,9 +323,6 @@ public function getCardHolderInfo() */ public function setCardHolderInfo($cardHolderInfo) { - if (is_null($cardHolderInfo)) { - throw new \InvalidArgumentException('non-nullable cardHolderInfo cannot be null'); - } $this->container['cardHolderInfo'] = $cardHolderInfo; return $this; @@ -350,9 +347,6 @@ public function getCavv() */ public function setCavv($cavv) { - if (is_null($cavv)) { - throw new \InvalidArgumentException('non-nullable cavv cannot be null'); - } $this->container['cavv'] = $cavv; return $this; @@ -377,9 +371,6 @@ public function getCavvAlgorithm() */ public function setCavvAlgorithm($cavvAlgorithm) { - if (is_null($cavvAlgorithm)) { - throw new \InvalidArgumentException('non-nullable cavvAlgorithm cannot be null'); - } $this->container['cavvAlgorithm'] = $cavvAlgorithm; return $this; @@ -404,9 +395,6 @@ public function getScaExemptionRequested() */ public function setScaExemptionRequested($scaExemptionRequested) { - if (is_null($scaExemptionRequested)) { - throw new \InvalidArgumentException('non-nullable scaExemptionRequested cannot be null'); - } $this->container['scaExemptionRequested'] = $scaExemptionRequested; return $this; @@ -431,9 +419,6 @@ public function getThreeds2CardEnrolled() */ public function setThreeds2CardEnrolled($threeds2CardEnrolled) { - if (is_null($threeds2CardEnrolled)) { - throw new \InvalidArgumentException('non-nullable threeds2CardEnrolled cannot be null'); - } $this->container['threeds2CardEnrolled'] = $threeds2CardEnrolled; return $this; diff --git a/src/Adyen/Model/Payments/ResponseAdditionalDataBillingAddress.php b/src/Adyen/Model/Payments/ResponseAdditionalDataBillingAddress.php index 7a18dc419..08dfacfe9 100644 --- a/src/Adyen/Model/Payments/ResponseAdditionalDataBillingAddress.php +++ b/src/Adyen/Model/Payments/ResponseAdditionalDataBillingAddress.php @@ -330,9 +330,6 @@ public function getBillingAddressCity() */ public function setBillingAddressCity($billingAddressCity) { - if (is_null($billingAddressCity)) { - throw new \InvalidArgumentException('non-nullable billingAddressCity cannot be null'); - } $this->container['billingAddressCity'] = $billingAddressCity; return $this; @@ -357,9 +354,6 @@ public function getBillingAddressCountry() */ public function setBillingAddressCountry($billingAddressCountry) { - if (is_null($billingAddressCountry)) { - throw new \InvalidArgumentException('non-nullable billingAddressCountry cannot be null'); - } $this->container['billingAddressCountry'] = $billingAddressCountry; return $this; @@ -384,9 +378,6 @@ public function getBillingAddressHouseNumberOrName() */ public function setBillingAddressHouseNumberOrName($billingAddressHouseNumberOrName) { - if (is_null($billingAddressHouseNumberOrName)) { - throw new \InvalidArgumentException('non-nullable billingAddressHouseNumberOrName cannot be null'); - } $this->container['billingAddressHouseNumberOrName'] = $billingAddressHouseNumberOrName; return $this; @@ -411,9 +402,6 @@ public function getBillingAddressPostalCode() */ public function setBillingAddressPostalCode($billingAddressPostalCode) { - if (is_null($billingAddressPostalCode)) { - throw new \InvalidArgumentException('non-nullable billingAddressPostalCode cannot be null'); - } $this->container['billingAddressPostalCode'] = $billingAddressPostalCode; return $this; @@ -438,9 +426,6 @@ public function getBillingAddressStateOrProvince() */ public function setBillingAddressStateOrProvince($billingAddressStateOrProvince) { - if (is_null($billingAddressStateOrProvince)) { - throw new \InvalidArgumentException('non-nullable billingAddressStateOrProvince cannot be null'); - } $this->container['billingAddressStateOrProvince'] = $billingAddressStateOrProvince; return $this; @@ -465,9 +450,6 @@ public function getBillingAddressStreet() */ public function setBillingAddressStreet($billingAddressStreet) { - if (is_null($billingAddressStreet)) { - throw new \InvalidArgumentException('non-nullable billingAddressStreet cannot be null'); - } $this->container['billingAddressStreet'] = $billingAddressStreet; return $this; diff --git a/src/Adyen/Model/Payments/ResponseAdditionalDataCard.php b/src/Adyen/Model/Payments/ResponseAdditionalDataCard.php index b51caf9e0..97986396b 100644 --- a/src/Adyen/Model/Payments/ResponseAdditionalDataCard.php +++ b/src/Adyen/Model/Payments/ResponseAdditionalDataCard.php @@ -344,9 +344,6 @@ public function getCardBin() */ public function setCardBin($cardBin) { - if (is_null($cardBin)) { - throw new \InvalidArgumentException('non-nullable cardBin cannot be null'); - } $this->container['cardBin'] = $cardBin; return $this; @@ -371,9 +368,6 @@ public function getCardHolderName() */ public function setCardHolderName($cardHolderName) { - if (is_null($cardHolderName)) { - throw new \InvalidArgumentException('non-nullable cardHolderName cannot be null'); - } $this->container['cardHolderName'] = $cardHolderName; return $this; @@ -398,9 +392,6 @@ public function getCardIssuingBank() */ public function setCardIssuingBank($cardIssuingBank) { - if (is_null($cardIssuingBank)) { - throw new \InvalidArgumentException('non-nullable cardIssuingBank cannot be null'); - } $this->container['cardIssuingBank'] = $cardIssuingBank; return $this; @@ -425,9 +416,6 @@ public function getCardIssuingCountry() */ public function setCardIssuingCountry($cardIssuingCountry) { - if (is_null($cardIssuingCountry)) { - throw new \InvalidArgumentException('non-nullable cardIssuingCountry cannot be null'); - } $this->container['cardIssuingCountry'] = $cardIssuingCountry; return $this; @@ -452,9 +440,6 @@ public function getCardIssuingCurrency() */ public function setCardIssuingCurrency($cardIssuingCurrency) { - if (is_null($cardIssuingCurrency)) { - throw new \InvalidArgumentException('non-nullable cardIssuingCurrency cannot be null'); - } $this->container['cardIssuingCurrency'] = $cardIssuingCurrency; return $this; @@ -479,9 +464,6 @@ public function getCardPaymentMethod() */ public function setCardPaymentMethod($cardPaymentMethod) { - if (is_null($cardPaymentMethod)) { - throw new \InvalidArgumentException('non-nullable cardPaymentMethod cannot be null'); - } $this->container['cardPaymentMethod'] = $cardPaymentMethod; return $this; @@ -506,9 +488,6 @@ public function getCardSummary() */ public function setCardSummary($cardSummary) { - if (is_null($cardSummary)) { - throw new \InvalidArgumentException('non-nullable cardSummary cannot be null'); - } $this->container['cardSummary'] = $cardSummary; return $this; @@ -533,9 +512,6 @@ public function getIssuerBin() */ public function setIssuerBin($issuerBin) { - if (is_null($issuerBin)) { - throw new \InvalidArgumentException('non-nullable issuerBin cannot be null'); - } $this->container['issuerBin'] = $issuerBin; return $this; diff --git a/src/Adyen/Model/Payments/ResponseAdditionalDataCommon.php b/src/Adyen/Model/Payments/ResponseAdditionalDataCommon.php index 5951b83d6..fa74b35fc 100644 --- a/src/Adyen/Model/Payments/ResponseAdditionalDataCommon.php +++ b/src/Adyen/Model/Payments/ResponseAdditionalDataCommon.php @@ -749,9 +749,6 @@ public function getAcquirerAccountCode() */ public function setAcquirerAccountCode($acquirerAccountCode) { - if (is_null($acquirerAccountCode)) { - throw new \InvalidArgumentException('non-nullable acquirerAccountCode cannot be null'); - } $this->container['acquirerAccountCode'] = $acquirerAccountCode; return $this; @@ -776,9 +773,6 @@ public function getAcquirerCode() */ public function setAcquirerCode($acquirerCode) { - if (is_null($acquirerCode)) { - throw new \InvalidArgumentException('non-nullable acquirerCode cannot be null'); - } $this->container['acquirerCode'] = $acquirerCode; return $this; @@ -803,9 +797,6 @@ public function getAcquirerReference() */ public function setAcquirerReference($acquirerReference) { - if (is_null($acquirerReference)) { - throw new \InvalidArgumentException('non-nullable acquirerReference cannot be null'); - } $this->container['acquirerReference'] = $acquirerReference; return $this; @@ -830,9 +821,6 @@ public function getAlias() */ public function setAlias($alias) { - if (is_null($alias)) { - throw new \InvalidArgumentException('non-nullable alias cannot be null'); - } $this->container['alias'] = $alias; return $this; @@ -857,9 +845,6 @@ public function getAliasType() */ public function setAliasType($aliasType) { - if (is_null($aliasType)) { - throw new \InvalidArgumentException('non-nullable aliasType cannot be null'); - } $this->container['aliasType'] = $aliasType; return $this; @@ -884,9 +869,6 @@ public function getAuthCode() */ public function setAuthCode($authCode) { - if (is_null($authCode)) { - throw new \InvalidArgumentException('non-nullable authCode cannot be null'); - } $this->container['authCode'] = $authCode; return $this; @@ -911,9 +893,6 @@ public function getAuthorisationMid() */ public function setAuthorisationMid($authorisationMid) { - if (is_null($authorisationMid)) { - throw new \InvalidArgumentException('non-nullable authorisationMid cannot be null'); - } $this->container['authorisationMid'] = $authorisationMid; return $this; @@ -938,9 +917,6 @@ public function getAuthorisedAmountCurrency() */ public function setAuthorisedAmountCurrency($authorisedAmountCurrency) { - if (is_null($authorisedAmountCurrency)) { - throw new \InvalidArgumentException('non-nullable authorisedAmountCurrency cannot be null'); - } $this->container['authorisedAmountCurrency'] = $authorisedAmountCurrency; return $this; @@ -965,9 +941,6 @@ public function getAuthorisedAmountValue() */ public function setAuthorisedAmountValue($authorisedAmountValue) { - if (is_null($authorisedAmountValue)) { - throw new \InvalidArgumentException('non-nullable authorisedAmountValue cannot be null'); - } $this->container['authorisedAmountValue'] = $authorisedAmountValue; return $this; @@ -992,9 +965,6 @@ public function getAvsResult() */ public function setAvsResult($avsResult) { - if (is_null($avsResult)) { - throw new \InvalidArgumentException('non-nullable avsResult cannot be null'); - } $this->container['avsResult'] = $avsResult; return $this; @@ -1019,9 +989,6 @@ public function getAvsResultRaw() */ public function setAvsResultRaw($avsResultRaw) { - if (is_null($avsResultRaw)) { - throw new \InvalidArgumentException('non-nullable avsResultRaw cannot be null'); - } $this->container['avsResultRaw'] = $avsResultRaw; return $this; @@ -1046,9 +1013,6 @@ public function getBic() */ public function setBic($bic) { - if (is_null($bic)) { - throw new \InvalidArgumentException('non-nullable bic cannot be null'); - } $this->container['bic'] = $bic; return $this; @@ -1073,9 +1037,6 @@ public function getCoBrandedWith() */ public function setCoBrandedWith($coBrandedWith) { - if (is_null($coBrandedWith)) { - throw new \InvalidArgumentException('non-nullable coBrandedWith cannot be null'); - } $this->container['coBrandedWith'] = $coBrandedWith; return $this; @@ -1100,9 +1061,6 @@ public function getCvcResult() */ public function setCvcResult($cvcResult) { - if (is_null($cvcResult)) { - throw new \InvalidArgumentException('non-nullable cvcResult cannot be null'); - } $this->container['cvcResult'] = $cvcResult; return $this; @@ -1127,9 +1085,6 @@ public function getCvcResultRaw() */ public function setCvcResultRaw($cvcResultRaw) { - if (is_null($cvcResultRaw)) { - throw new \InvalidArgumentException('non-nullable cvcResultRaw cannot be null'); - } $this->container['cvcResultRaw'] = $cvcResultRaw; return $this; @@ -1154,9 +1109,6 @@ public function getDsTransID() */ public function setDsTransID($dsTransID) { - if (is_null($dsTransID)) { - throw new \InvalidArgumentException('non-nullable dsTransID cannot be null'); - } $this->container['dsTransID'] = $dsTransID; return $this; @@ -1181,9 +1133,6 @@ public function getEci() */ public function setEci($eci) { - if (is_null($eci)) { - throw new \InvalidArgumentException('non-nullable eci cannot be null'); - } $this->container['eci'] = $eci; return $this; @@ -1208,9 +1157,6 @@ public function getExpiryDate() */ public function setExpiryDate($expiryDate) { - if (is_null($expiryDate)) { - throw new \InvalidArgumentException('non-nullable expiryDate cannot be null'); - } $this->container['expiryDate'] = $expiryDate; return $this; @@ -1235,9 +1181,6 @@ public function getExtraCostsCurrency() */ public function setExtraCostsCurrency($extraCostsCurrency) { - if (is_null($extraCostsCurrency)) { - throw new \InvalidArgumentException('non-nullable extraCostsCurrency cannot be null'); - } $this->container['extraCostsCurrency'] = $extraCostsCurrency; return $this; @@ -1262,9 +1205,6 @@ public function getExtraCostsValue() */ public function setExtraCostsValue($extraCostsValue) { - if (is_null($extraCostsValue)) { - throw new \InvalidArgumentException('non-nullable extraCostsValue cannot be null'); - } $this->container['extraCostsValue'] = $extraCostsValue; return $this; @@ -1289,9 +1229,6 @@ public function getFraudCheckItemNrFraudCheckname() */ public function setFraudCheckItemNrFraudCheckname($fraudCheckItemNrFraudCheckname) { - if (is_null($fraudCheckItemNrFraudCheckname)) { - throw new \InvalidArgumentException('non-nullable fraudCheckItemNrFraudCheckname cannot be null'); - } $this->container['fraudCheckItemNrFraudCheckname'] = $fraudCheckItemNrFraudCheckname; return $this; @@ -1316,9 +1253,6 @@ public function getFraudManualReview() */ public function setFraudManualReview($fraudManualReview) { - if (is_null($fraudManualReview)) { - throw new \InvalidArgumentException('non-nullable fraudManualReview cannot be null'); - } $this->container['fraudManualReview'] = $fraudManualReview; return $this; @@ -1343,9 +1277,6 @@ public function getFraudResultType() */ 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( @@ -1380,9 +1311,6 @@ public function getFundingSource() */ public function setFundingSource($fundingSource) { - if (is_null($fundingSource)) { - throw new \InvalidArgumentException('non-nullable fundingSource cannot be null'); - } $this->container['fundingSource'] = $fundingSource; return $this; @@ -1407,9 +1335,6 @@ public function getFundsAvailability() */ public function setFundsAvailability($fundsAvailability) { - if (is_null($fundsAvailability)) { - throw new \InvalidArgumentException('non-nullable fundsAvailability cannot be null'); - } $this->container['fundsAvailability'] = $fundsAvailability; return $this; @@ -1434,9 +1359,6 @@ public function getInferredRefusalReason() */ public function setInferredRefusalReason($inferredRefusalReason) { - if (is_null($inferredRefusalReason)) { - throw new \InvalidArgumentException('non-nullable inferredRefusalReason cannot be null'); - } $this->container['inferredRefusalReason'] = $inferredRefusalReason; return $this; @@ -1461,9 +1383,6 @@ public function getIsCardCommercial() */ public function setIsCardCommercial($isCardCommercial) { - if (is_null($isCardCommercial)) { - throw new \InvalidArgumentException('non-nullable isCardCommercial cannot be null'); - } $this->container['isCardCommercial'] = $isCardCommercial; return $this; @@ -1488,9 +1407,6 @@ public function getIssuerCountry() */ public function setIssuerCountry($issuerCountry) { - if (is_null($issuerCountry)) { - throw new \InvalidArgumentException('non-nullable issuerCountry cannot be null'); - } $this->container['issuerCountry'] = $issuerCountry; return $this; @@ -1515,9 +1431,6 @@ public function getLiabilityShift() */ public function setLiabilityShift($liabilityShift) { - if (is_null($liabilityShift)) { - throw new \InvalidArgumentException('non-nullable liabilityShift cannot be null'); - } $this->container['liabilityShift'] = $liabilityShift; return $this; @@ -1542,9 +1455,6 @@ public function getMcBankNetReferenceNumber() */ public function setMcBankNetReferenceNumber($mcBankNetReferenceNumber) { - if (is_null($mcBankNetReferenceNumber)) { - throw new \InvalidArgumentException('non-nullable mcBankNetReferenceNumber cannot be null'); - } $this->container['mcBankNetReferenceNumber'] = $mcBankNetReferenceNumber; return $this; @@ -1569,9 +1479,6 @@ public function getMerchantAdviceCode() */ public function setMerchantAdviceCode($merchantAdviceCode) { - if (is_null($merchantAdviceCode)) { - throw new \InvalidArgumentException('non-nullable merchantAdviceCode cannot be null'); - } $this->container['merchantAdviceCode'] = $merchantAdviceCode; return $this; @@ -1596,9 +1503,6 @@ public function getMerchantReference() */ public function setMerchantReference($merchantReference) { - if (is_null($merchantReference)) { - throw new \InvalidArgumentException('non-nullable merchantReference cannot be null'); - } $this->container['merchantReference'] = $merchantReference; return $this; @@ -1623,9 +1527,6 @@ public function getNetworkTxReference() */ public function setNetworkTxReference($networkTxReference) { - if (is_null($networkTxReference)) { - throw new \InvalidArgumentException('non-nullable networkTxReference cannot be null'); - } $this->container['networkTxReference'] = $networkTxReference; return $this; @@ -1650,9 +1551,6 @@ public function getOwnerName() */ public function setOwnerName($ownerName) { - if (is_null($ownerName)) { - throw new \InvalidArgumentException('non-nullable ownerName cannot be null'); - } $this->container['ownerName'] = $ownerName; return $this; @@ -1677,9 +1575,6 @@ public function getPaymentAccountReference() */ public function setPaymentAccountReference($paymentAccountReference) { - if (is_null($paymentAccountReference)) { - throw new \InvalidArgumentException('non-nullable paymentAccountReference cannot be null'); - } $this->container['paymentAccountReference'] = $paymentAccountReference; return $this; @@ -1704,9 +1599,6 @@ public function getPaymentMethod() */ public function setPaymentMethod($paymentMethod) { - if (is_null($paymentMethod)) { - throw new \InvalidArgumentException('non-nullable paymentMethod cannot be null'); - } $this->container['paymentMethod'] = $paymentMethod; return $this; @@ -1731,9 +1623,6 @@ public function getPaymentMethodVariant() */ public function setPaymentMethodVariant($paymentMethodVariant) { - if (is_null($paymentMethodVariant)) { - throw new \InvalidArgumentException('non-nullable paymentMethodVariant cannot be null'); - } $this->container['paymentMethodVariant'] = $paymentMethodVariant; return $this; @@ -1758,9 +1647,6 @@ public function getPayoutEligible() */ public function setPayoutEligible($payoutEligible) { - if (is_null($payoutEligible)) { - throw new \InvalidArgumentException('non-nullable payoutEligible cannot be null'); - } $this->container['payoutEligible'] = $payoutEligible; return $this; @@ -1785,9 +1671,6 @@ public function getRealtimeAccountUpdaterStatus() */ public function setRealtimeAccountUpdaterStatus($realtimeAccountUpdaterStatus) { - if (is_null($realtimeAccountUpdaterStatus)) { - throw new \InvalidArgumentException('non-nullable realtimeAccountUpdaterStatus cannot be null'); - } $this->container['realtimeAccountUpdaterStatus'] = $realtimeAccountUpdaterStatus; return $this; @@ -1812,9 +1695,6 @@ public function getReceiptFreeText() */ public function setReceiptFreeText($receiptFreeText) { - if (is_null($receiptFreeText)) { - throw new \InvalidArgumentException('non-nullable receiptFreeText cannot be null'); - } $this->container['receiptFreeText'] = $receiptFreeText; return $this; @@ -1839,9 +1719,6 @@ public function getRecurringContractTypes() */ public function setRecurringContractTypes($recurringContractTypes) { - if (is_null($recurringContractTypes)) { - throw new \InvalidArgumentException('non-nullable recurringContractTypes cannot be null'); - } $this->container['recurringContractTypes'] = $recurringContractTypes; return $this; @@ -1866,9 +1743,6 @@ public function getRecurringFirstPspReference() */ public function setRecurringFirstPspReference($recurringFirstPspReference) { - if (is_null($recurringFirstPspReference)) { - throw new \InvalidArgumentException('non-nullable recurringFirstPspReference cannot be null'); - } $this->container['recurringFirstPspReference'] = $recurringFirstPspReference; return $this; @@ -1893,9 +1767,6 @@ public function getRecurringRecurringDetailReference() */ public function setRecurringRecurringDetailReference($recurringRecurringDetailReference) { - if (is_null($recurringRecurringDetailReference)) { - throw new \InvalidArgumentException('non-nullable recurringRecurringDetailReference cannot be null'); - } $this->container['recurringRecurringDetailReference'] = $recurringRecurringDetailReference; return $this; @@ -1920,9 +1791,6 @@ public function getRecurringShopperReference() */ public function setRecurringShopperReference($recurringShopperReference) { - if (is_null($recurringShopperReference)) { - throw new \InvalidArgumentException('non-nullable recurringShopperReference cannot be null'); - } $this->container['recurringShopperReference'] = $recurringShopperReference; return $this; @@ -1947,9 +1815,6 @@ public function getRecurringProcessingModel() */ 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( @@ -1984,9 +1849,6 @@ public function getReferred() */ public function setReferred($referred) { - if (is_null($referred)) { - throw new \InvalidArgumentException('non-nullable referred cannot be null'); - } $this->container['referred'] = $referred; return $this; @@ -2011,9 +1873,6 @@ public function getRefusalReasonRaw() */ public function setRefusalReasonRaw($refusalReasonRaw) { - if (is_null($refusalReasonRaw)) { - throw new \InvalidArgumentException('non-nullable refusalReasonRaw cannot be null'); - } $this->container['refusalReasonRaw'] = $refusalReasonRaw; return $this; @@ -2038,9 +1897,6 @@ public function getRequestAmount() */ public function setRequestAmount($requestAmount) { - if (is_null($requestAmount)) { - throw new \InvalidArgumentException('non-nullable requestAmount cannot be null'); - } $this->container['requestAmount'] = $requestAmount; return $this; @@ -2065,9 +1921,6 @@ public function getRequestCurrencyCode() */ public function setRequestCurrencyCode($requestCurrencyCode) { - if (is_null($requestCurrencyCode)) { - throw new \InvalidArgumentException('non-nullable requestCurrencyCode cannot be null'); - } $this->container['requestCurrencyCode'] = $requestCurrencyCode; return $this; @@ -2092,9 +1945,6 @@ public function getShopperInteraction() */ public function setShopperInteraction($shopperInteraction) { - if (is_null($shopperInteraction)) { - throw new \InvalidArgumentException('non-nullable shopperInteraction cannot be null'); - } $this->container['shopperInteraction'] = $shopperInteraction; return $this; @@ -2119,9 +1969,6 @@ public function getShopperReference() */ public function setShopperReference($shopperReference) { - if (is_null($shopperReference)) { - throw new \InvalidArgumentException('non-nullable shopperReference cannot be null'); - } $this->container['shopperReference'] = $shopperReference; return $this; @@ -2146,9 +1993,6 @@ public function getTerminalId() */ public function setTerminalId($terminalId) { - if (is_null($terminalId)) { - throw new \InvalidArgumentException('non-nullable terminalId cannot be null'); - } $this->container['terminalId'] = $terminalId; return $this; @@ -2173,9 +2017,6 @@ public function getThreeDAuthenticated() */ public function setThreeDAuthenticated($threeDAuthenticated) { - if (is_null($threeDAuthenticated)) { - throw new \InvalidArgumentException('non-nullable threeDAuthenticated cannot be null'); - } $this->container['threeDAuthenticated'] = $threeDAuthenticated; return $this; @@ -2200,9 +2041,6 @@ public function getThreeDAuthenticatedResponse() */ public function setThreeDAuthenticatedResponse($threeDAuthenticatedResponse) { - if (is_null($threeDAuthenticatedResponse)) { - throw new \InvalidArgumentException('non-nullable threeDAuthenticatedResponse cannot be null'); - } $this->container['threeDAuthenticatedResponse'] = $threeDAuthenticatedResponse; return $this; @@ -2227,9 +2065,6 @@ public function getThreeDOffered() */ public function setThreeDOffered($threeDOffered) { - if (is_null($threeDOffered)) { - throw new \InvalidArgumentException('non-nullable threeDOffered cannot be null'); - } $this->container['threeDOffered'] = $threeDOffered; return $this; @@ -2254,9 +2089,6 @@ public function getThreeDOfferedResponse() */ public function setThreeDOfferedResponse($threeDOfferedResponse) { - if (is_null($threeDOfferedResponse)) { - throw new \InvalidArgumentException('non-nullable threeDOfferedResponse cannot be null'); - } $this->container['threeDOfferedResponse'] = $threeDOfferedResponse; return $this; @@ -2281,9 +2113,6 @@ public function getThreeDSVersion() */ public function setThreeDSVersion($threeDSVersion) { - if (is_null($threeDSVersion)) { - throw new \InvalidArgumentException('non-nullable threeDSVersion cannot be null'); - } $this->container['threeDSVersion'] = $threeDSVersion; return $this; @@ -2308,9 +2137,6 @@ public function getVisaTransactionId() */ public function setVisaTransactionId($visaTransactionId) { - if (is_null($visaTransactionId)) { - throw new \InvalidArgumentException('non-nullable visaTransactionId cannot be null'); - } $this->container['visaTransactionId'] = $visaTransactionId; return $this; @@ -2335,9 +2161,6 @@ public function getXid() */ public function setXid($xid) { - if (is_null($xid)) { - throw new \InvalidArgumentException('non-nullable xid cannot be null'); - } $this->container['xid'] = $xid; return $this; diff --git a/src/Adyen/Model/Payments/ResponseAdditionalDataDomesticError.php b/src/Adyen/Model/Payments/ResponseAdditionalDataDomesticError.php index 4c8cf8959..c94d6ac25 100644 --- a/src/Adyen/Model/Payments/ResponseAdditionalDataDomesticError.php +++ b/src/Adyen/Model/Payments/ResponseAdditionalDataDomesticError.php @@ -302,9 +302,6 @@ public function getDomesticRefusalReasonRaw() */ public function setDomesticRefusalReasonRaw($domesticRefusalReasonRaw) { - if (is_null($domesticRefusalReasonRaw)) { - throw new \InvalidArgumentException('non-nullable domesticRefusalReasonRaw cannot be null'); - } $this->container['domesticRefusalReasonRaw'] = $domesticRefusalReasonRaw; return $this; @@ -329,9 +326,6 @@ public function getDomesticShopperAdvice() */ public function setDomesticShopperAdvice($domesticShopperAdvice) { - if (is_null($domesticShopperAdvice)) { - throw new \InvalidArgumentException('non-nullable domesticShopperAdvice cannot be null'); - } $this->container['domesticShopperAdvice'] = $domesticShopperAdvice; return $this; diff --git a/src/Adyen/Model/Payments/ResponseAdditionalDataInstallments.php b/src/Adyen/Model/Payments/ResponseAdditionalDataInstallments.php index fe7d5a4db..4abedcf68 100644 --- a/src/Adyen/Model/Payments/ResponseAdditionalDataInstallments.php +++ b/src/Adyen/Model/Payments/ResponseAdditionalDataInstallments.php @@ -372,9 +372,6 @@ public function getInstallmentPaymentDataInstallmentType() */ public function setInstallmentPaymentDataInstallmentType($installmentPaymentDataInstallmentType) { - if (is_null($installmentPaymentDataInstallmentType)) { - throw new \InvalidArgumentException('non-nullable installmentPaymentDataInstallmentType cannot be null'); - } $this->container['installmentPaymentDataInstallmentType'] = $installmentPaymentDataInstallmentType; return $this; @@ -399,9 +396,6 @@ public function getInstallmentPaymentDataOptionItemNrAnnualPercentageRate() */ public function setInstallmentPaymentDataOptionItemNrAnnualPercentageRate($installmentPaymentDataOptionItemNrAnnualPercentageRate) { - if (is_null($installmentPaymentDataOptionItemNrAnnualPercentageRate)) { - throw new \InvalidArgumentException('non-nullable installmentPaymentDataOptionItemNrAnnualPercentageRate cannot be null'); - } $this->container['installmentPaymentDataOptionItemNrAnnualPercentageRate'] = $installmentPaymentDataOptionItemNrAnnualPercentageRate; return $this; @@ -426,9 +420,6 @@ public function getInstallmentPaymentDataOptionItemNrFirstInstallmentAmount() */ public function setInstallmentPaymentDataOptionItemNrFirstInstallmentAmount($installmentPaymentDataOptionItemNrFirstInstallmentAmount) { - if (is_null($installmentPaymentDataOptionItemNrFirstInstallmentAmount)) { - throw new \InvalidArgumentException('non-nullable installmentPaymentDataOptionItemNrFirstInstallmentAmount cannot be null'); - } $this->container['installmentPaymentDataOptionItemNrFirstInstallmentAmount'] = $installmentPaymentDataOptionItemNrFirstInstallmentAmount; return $this; @@ -453,9 +444,6 @@ public function getInstallmentPaymentDataOptionItemNrInstallmentFee() */ public function setInstallmentPaymentDataOptionItemNrInstallmentFee($installmentPaymentDataOptionItemNrInstallmentFee) { - if (is_null($installmentPaymentDataOptionItemNrInstallmentFee)) { - throw new \InvalidArgumentException('non-nullable installmentPaymentDataOptionItemNrInstallmentFee cannot be null'); - } $this->container['installmentPaymentDataOptionItemNrInstallmentFee'] = $installmentPaymentDataOptionItemNrInstallmentFee; return $this; @@ -480,9 +468,6 @@ public function getInstallmentPaymentDataOptionItemNrInterestRate() */ public function setInstallmentPaymentDataOptionItemNrInterestRate($installmentPaymentDataOptionItemNrInterestRate) { - if (is_null($installmentPaymentDataOptionItemNrInterestRate)) { - throw new \InvalidArgumentException('non-nullable installmentPaymentDataOptionItemNrInterestRate cannot be null'); - } $this->container['installmentPaymentDataOptionItemNrInterestRate'] = $installmentPaymentDataOptionItemNrInterestRate; return $this; @@ -507,9 +492,6 @@ public function getInstallmentPaymentDataOptionItemNrMaximumNumberOfInstallments */ public function setInstallmentPaymentDataOptionItemNrMaximumNumberOfInstallments($installmentPaymentDataOptionItemNrMaximumNumberOfInstallments) { - if (is_null($installmentPaymentDataOptionItemNrMaximumNumberOfInstallments)) { - throw new \InvalidArgumentException('non-nullable installmentPaymentDataOptionItemNrMaximumNumberOfInstallments cannot be null'); - } $this->container['installmentPaymentDataOptionItemNrMaximumNumberOfInstallments'] = $installmentPaymentDataOptionItemNrMaximumNumberOfInstallments; return $this; @@ -534,9 +516,6 @@ public function getInstallmentPaymentDataOptionItemNrMinimumNumberOfInstallments */ public function setInstallmentPaymentDataOptionItemNrMinimumNumberOfInstallments($installmentPaymentDataOptionItemNrMinimumNumberOfInstallments) { - if (is_null($installmentPaymentDataOptionItemNrMinimumNumberOfInstallments)) { - throw new \InvalidArgumentException('non-nullable installmentPaymentDataOptionItemNrMinimumNumberOfInstallments cannot be null'); - } $this->container['installmentPaymentDataOptionItemNrMinimumNumberOfInstallments'] = $installmentPaymentDataOptionItemNrMinimumNumberOfInstallments; return $this; @@ -561,9 +540,6 @@ public function getInstallmentPaymentDataOptionItemNrNumberOfInstallments() */ public function setInstallmentPaymentDataOptionItemNrNumberOfInstallments($installmentPaymentDataOptionItemNrNumberOfInstallments) { - if (is_null($installmentPaymentDataOptionItemNrNumberOfInstallments)) { - throw new \InvalidArgumentException('non-nullable installmentPaymentDataOptionItemNrNumberOfInstallments cannot be null'); - } $this->container['installmentPaymentDataOptionItemNrNumberOfInstallments'] = $installmentPaymentDataOptionItemNrNumberOfInstallments; return $this; @@ -588,9 +564,6 @@ public function getInstallmentPaymentDataOptionItemNrSubsequentInstallmentAmount */ public function setInstallmentPaymentDataOptionItemNrSubsequentInstallmentAmount($installmentPaymentDataOptionItemNrSubsequentInstallmentAmount) { - if (is_null($installmentPaymentDataOptionItemNrSubsequentInstallmentAmount)) { - throw new \InvalidArgumentException('non-nullable installmentPaymentDataOptionItemNrSubsequentInstallmentAmount cannot be null'); - } $this->container['installmentPaymentDataOptionItemNrSubsequentInstallmentAmount'] = $installmentPaymentDataOptionItemNrSubsequentInstallmentAmount; return $this; @@ -615,9 +588,6 @@ public function getInstallmentPaymentDataOptionItemNrTotalAmountDue() */ public function setInstallmentPaymentDataOptionItemNrTotalAmountDue($installmentPaymentDataOptionItemNrTotalAmountDue) { - if (is_null($installmentPaymentDataOptionItemNrTotalAmountDue)) { - throw new \InvalidArgumentException('non-nullable installmentPaymentDataOptionItemNrTotalAmountDue cannot be null'); - } $this->container['installmentPaymentDataOptionItemNrTotalAmountDue'] = $installmentPaymentDataOptionItemNrTotalAmountDue; return $this; @@ -642,9 +612,6 @@ public function getInstallmentPaymentDataPaymentOptions() */ public function setInstallmentPaymentDataPaymentOptions($installmentPaymentDataPaymentOptions) { - if (is_null($installmentPaymentDataPaymentOptions)) { - throw new \InvalidArgumentException('non-nullable installmentPaymentDataPaymentOptions cannot be null'); - } $this->container['installmentPaymentDataPaymentOptions'] = $installmentPaymentDataPaymentOptions; return $this; @@ -669,9 +636,6 @@ public function getInstallmentsValue() */ public function setInstallmentsValue($installmentsValue) { - if (is_null($installmentsValue)) { - throw new \InvalidArgumentException('non-nullable installmentsValue cannot be null'); - } $this->container['installmentsValue'] = $installmentsValue; return $this; diff --git a/src/Adyen/Model/Payments/ResponseAdditionalDataNetworkTokens.php b/src/Adyen/Model/Payments/ResponseAdditionalDataNetworkTokens.php index 83c1c328c..1adbf0e55 100644 --- a/src/Adyen/Model/Payments/ResponseAdditionalDataNetworkTokens.php +++ b/src/Adyen/Model/Payments/ResponseAdditionalDataNetworkTokens.php @@ -309,9 +309,6 @@ public function getNetworkTokenAvailable() */ public function setNetworkTokenAvailable($networkTokenAvailable) { - if (is_null($networkTokenAvailable)) { - throw new \InvalidArgumentException('non-nullable networkTokenAvailable cannot be null'); - } $this->container['networkTokenAvailable'] = $networkTokenAvailable; return $this; @@ -336,9 +333,6 @@ public function getNetworkTokenBin() */ public function setNetworkTokenBin($networkTokenBin) { - if (is_null($networkTokenBin)) { - throw new \InvalidArgumentException('non-nullable networkTokenBin cannot be null'); - } $this->container['networkTokenBin'] = $networkTokenBin; return $this; @@ -363,9 +357,6 @@ public function getNetworkTokenTokenSummary() */ public function setNetworkTokenTokenSummary($networkTokenTokenSummary) { - if (is_null($networkTokenTokenSummary)) { - throw new \InvalidArgumentException('non-nullable networkTokenTokenSummary cannot be null'); - } $this->container['networkTokenTokenSummary'] = $networkTokenTokenSummary; return $this; diff --git a/src/Adyen/Model/Payments/ResponseAdditionalDataOpi.php b/src/Adyen/Model/Payments/ResponseAdditionalDataOpi.php index 9b7fe84a4..61f53df0c 100644 --- a/src/Adyen/Model/Payments/ResponseAdditionalDataOpi.php +++ b/src/Adyen/Model/Payments/ResponseAdditionalDataOpi.php @@ -295,9 +295,6 @@ public function getOpiTransToken() */ public function setOpiTransToken($opiTransToken) { - if (is_null($opiTransToken)) { - throw new \InvalidArgumentException('non-nullable opiTransToken cannot be null'); - } $this->container['opiTransToken'] = $opiTransToken; return $this; diff --git a/src/Adyen/Model/Payments/ResponseAdditionalDataSepa.php b/src/Adyen/Model/Payments/ResponseAdditionalDataSepa.php index 799996deb..7175374a4 100644 --- a/src/Adyen/Model/Payments/ResponseAdditionalDataSepa.php +++ b/src/Adyen/Model/Payments/ResponseAdditionalDataSepa.php @@ -309,9 +309,6 @@ public function getSepadirectdebitDateOfSignature() */ public function setSepadirectdebitDateOfSignature($sepadirectdebitDateOfSignature) { - if (is_null($sepadirectdebitDateOfSignature)) { - throw new \InvalidArgumentException('non-nullable sepadirectdebitDateOfSignature cannot be null'); - } $this->container['sepadirectdebitDateOfSignature'] = $sepadirectdebitDateOfSignature; return $this; @@ -336,9 +333,6 @@ public function getSepadirectdebitMandateId() */ public function setSepadirectdebitMandateId($sepadirectdebitMandateId) { - if (is_null($sepadirectdebitMandateId)) { - throw new \InvalidArgumentException('non-nullable sepadirectdebitMandateId cannot be null'); - } $this->container['sepadirectdebitMandateId'] = $sepadirectdebitMandateId; return $this; @@ -363,9 +357,6 @@ public function getSepadirectdebitSequenceType() */ public function setSepadirectdebitSequenceType($sepadirectdebitSequenceType) { - if (is_null($sepadirectdebitSequenceType)) { - throw new \InvalidArgumentException('non-nullable sepadirectdebitSequenceType cannot be null'); - } $this->container['sepadirectdebitSequenceType'] = $sepadirectdebitSequenceType; return $this; diff --git a/src/Adyen/Model/Payments/SDKEphemPubKey.php b/src/Adyen/Model/Payments/SDKEphemPubKey.php index 732833f66..04b2c6631 100644 --- a/src/Adyen/Model/Payments/SDKEphemPubKey.php +++ b/src/Adyen/Model/Payments/SDKEphemPubKey.php @@ -316,9 +316,6 @@ public function getCrv() */ public function setCrv($crv) { - if (is_null($crv)) { - throw new \InvalidArgumentException('non-nullable crv cannot be null'); - } $this->container['crv'] = $crv; return $this; @@ -343,9 +340,6 @@ public function getKty() */ public function setKty($kty) { - if (is_null($kty)) { - throw new \InvalidArgumentException('non-nullable kty cannot be null'); - } $this->container['kty'] = $kty; return $this; @@ -370,9 +364,6 @@ public function getX() */ public function setX($x) { - if (is_null($x)) { - throw new \InvalidArgumentException('non-nullable x cannot be null'); - } $this->container['x'] = $x; return $this; @@ -397,9 +388,6 @@ public function getY() */ public function setY($y) { - if (is_null($y)) { - throw new \InvalidArgumentException('non-nullable y cannot be null'); - } $this->container['y'] = $y; return $this; diff --git a/src/Adyen/Model/Payments/SecureRemoteCommerceCheckoutData.php b/src/Adyen/Model/Payments/SecureRemoteCommerceCheckoutData.php new file mode 100644 index 000000000..ed4862d95 --- /dev/null +++ b/src/Adyen/Model/Payments/SecureRemoteCommerceCheckoutData.php @@ -0,0 +1,595 @@ + + */ +class SecureRemoteCommerceCheckoutData implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'SecureRemoteCommerceCheckoutData'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'checkoutPayload' => 'string', + 'correlationId' => 'string', + 'cvc' => 'string', + 'digitalCardId' => 'string', + 'scheme' => 'string', + 'tokenReference' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'checkoutPayload' => null, + 'correlationId' => null, + 'cvc' => null, + 'digitalCardId' => null, + 'scheme' => null, + 'tokenReference' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'checkoutPayload' => false, + 'correlationId' => false, + 'cvc' => false, + 'digitalCardId' => false, + 'scheme' => false, + 'tokenReference' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'checkoutPayload' => 'checkoutPayload', + 'correlationId' => 'correlationId', + 'cvc' => 'cvc', + 'digitalCardId' => 'digitalCardId', + 'scheme' => 'scheme', + 'tokenReference' => 'tokenReference' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'checkoutPayload' => 'setCheckoutPayload', + 'correlationId' => 'setCorrelationId', + 'cvc' => 'setCvc', + 'digitalCardId' => 'setDigitalCardId', + 'scheme' => 'setScheme', + 'tokenReference' => 'setTokenReference' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'checkoutPayload' => 'getCheckoutPayload', + 'correlationId' => 'getCorrelationId', + 'cvc' => 'getCvc', + 'digitalCardId' => 'getDigitalCardId', + 'scheme' => 'getScheme', + 'tokenReference' => 'getTokenReference' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of 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 SCHEME_MC = 'mc'; + public const SCHEME_VISA = 'visa'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getSchemeAllowableValues() + { + return [ + self::SCHEME_MC, + self::SCHEME_VISA, + ]; + } + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('checkoutPayload', $data ?? [], null); + $this->setIfExists('correlationId', $data ?? [], null); + $this->setIfExists('cvc', $data ?? [], null); + $this->setIfExists('digitalCardId', $data ?? [], null); + $this->setIfExists('scheme', $data ?? [], null); + $this->setIfExists('tokenReference', $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->getSchemeAllowableValues(); + if (!is_null($this->container['scheme']) && !in_array($this->container['scheme'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'scheme', must be one of '%s'", + $this->container['scheme'], + 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 checkoutPayload + * + * @return string|null + */ + public function getCheckoutPayload() + { + return $this->container['checkoutPayload']; + } + + /** + * Sets checkoutPayload + * + * @param string|null $checkoutPayload The Secure Remote Commerce checkout payload to process the payment with. + * + * @return self + */ + public function setCheckoutPayload($checkoutPayload) + { + $this->container['checkoutPayload'] = $checkoutPayload; + + return $this; + } + + /** + * Gets correlationId + * + * @return string|null + */ + public function getCorrelationId() + { + return $this->container['correlationId']; + } + + /** + * Sets correlationId + * + * @param string|null $correlationId This is the unique identifier generated by SRC system to track and link SRC messages. Available within the present checkout session (e.g. received in an earlier API response during the present session). + * + * @return self + */ + public function setCorrelationId($correlationId) + { + $this->container['correlationId'] = $correlationId; + + return $this; + } + + /** + * 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/get-started-with-adyen/payment-glossary/#card-security-code-cvc-cvv-cid). + * + * @return self + */ + public function setCvc($cvc) + { + $this->container['cvc'] = $cvc; + + return $this; + } + + /** + * Gets digitalCardId + * + * @return string|null + */ + public function getDigitalCardId() + { + return $this->container['digitalCardId']; + } + + /** + * Sets digitalCardId + * + * @param string|null $digitalCardId A unique identifier that represents the token associated with a card enrolled. Required for scheme 'mc'. + * + * @return self + */ + public function setDigitalCardId($digitalCardId) + { + $this->container['digitalCardId'] = $digitalCardId; + + return $this; + } + + /** + * Gets scheme + * + * @return string|null + */ + public function getScheme() + { + return $this->container['scheme']; + } + + /** + * Sets scheme + * + * @param string|null $scheme The Secure Remote Commerce scheme. + * + * @return self + */ + public function setScheme($scheme) + { + $allowedValues = $this->getSchemeAllowableValues(); + if (!in_array($scheme, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'scheme', must be one of '%s'", + $scheme, + implode("', '", $allowedValues) + ) + ); + } + $this->container['scheme'] = $scheme; + + return $this; + } + + /** + * Gets tokenReference + * + * @return string|null + */ + public function getTokenReference() + { + return $this->container['tokenReference']; + } + + /** + * Sets tokenReference + * + * @param string|null $tokenReference A unique identifier that represents the token associated with a card enrolled. Required for scheme 'visa'. + * + * @return self + */ + public function setTokenReference($tokenReference) + { + $this->container['tokenReference'] = $tokenReference; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + public function toArray(): array + { + $array = []; + foreach (self::$openAPITypes as $propertyName => $propertyType) { + $propertyValue = $this[$propertyName]; + if ($propertyValue !== null) { + // Check if the property value is an object and has a toArray() method + if (is_object($propertyValue) && method_exists($propertyValue, 'toArray')) { + $array[$propertyName] = $propertyValue->toArray(); + // Check if it's type datetime + } elseif ($propertyValue instanceof \DateTime) { + $array[$propertyName] = $propertyValue->format(DATE_ATOM); + // If it's an array type we should check whether it contains objects and if so call toArray method + } elseif (is_array($propertyValue)) { + $array[$propertyName] = array_map(function ($item) { + return $item instanceof ModelInterface ? $item->toArray() : $item; + }, $propertyValue); + } else { + // Otherwise, directly assign the property value to the array + $array[$propertyName] = $propertyValue; + } + } + } + return $array; + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} diff --git a/src/Adyen/Model/Payments/ServiceError.php b/src/Adyen/Model/Payments/ServiceError.php index fdda5df8d..7238a08f9 100644 --- a/src/Adyen/Model/Payments/ServiceError.php +++ b/src/Adyen/Model/Payments/ServiceError.php @@ -330,9 +330,6 @@ public function getAdditionalData() */ public function setAdditionalData($additionalData) { - if (is_null($additionalData)) { - throw new \InvalidArgumentException('non-nullable additionalData cannot be null'); - } $this->container['additionalData'] = $additionalData; return $this; @@ -357,9 +354,6 @@ public function getErrorCode() */ public function setErrorCode($errorCode) { - if (is_null($errorCode)) { - throw new \InvalidArgumentException('non-nullable errorCode cannot be null'); - } $this->container['errorCode'] = $errorCode; return $this; @@ -384,9 +378,6 @@ public function getErrorType() */ public function setErrorType($errorType) { - if (is_null($errorType)) { - throw new \InvalidArgumentException('non-nullable errorType cannot be null'); - } $this->container['errorType'] = $errorType; return $this; @@ -411,9 +402,6 @@ public function getMessage() */ public function setMessage($message) { - if (is_null($message)) { - throw new \InvalidArgumentException('non-nullable message cannot be null'); - } $this->container['message'] = $message; return $this; @@ -438,9 +426,6 @@ public function getPspReference() */ public function setPspReference($pspReference) { - if (is_null($pspReference)) { - throw new \InvalidArgumentException('non-nullable pspReference cannot be null'); - } $this->container['pspReference'] = $pspReference; return $this; @@ -465,7 +450,6 @@ public function getStatus() */ public function setStatus($status) { - // Do nothing for nullable integers $this->container['status'] = $status; return $this; diff --git a/src/Adyen/Model/Payments/ShopperInteractionDevice.php b/src/Adyen/Model/Payments/ShopperInteractionDevice.php index a359b9218..658d8975e 100644 --- a/src/Adyen/Model/Payments/ShopperInteractionDevice.php +++ b/src/Adyen/Model/Payments/ShopperInteractionDevice.php @@ -309,9 +309,6 @@ public function getLocale() */ public function setLocale($locale) { - if (is_null($locale)) { - throw new \InvalidArgumentException('non-nullable locale cannot be null'); - } $this->container['locale'] = $locale; return $this; @@ -336,9 +333,6 @@ public function getOs() */ public function setOs($os) { - if (is_null($os)) { - throw new \InvalidArgumentException('non-nullable os cannot be null'); - } $this->container['os'] = $os; return $this; @@ -363,9 +357,6 @@ public function getOsVersion() */ public function setOsVersion($osVersion) { - if (is_null($osVersion)) { - throw new \InvalidArgumentException('non-nullable osVersion cannot be null'); - } $this->container['osVersion'] = $osVersion; return $this; diff --git a/src/Adyen/Model/Payments/Split.php b/src/Adyen/Model/Payments/Split.php index d4eb1a41f..fa28253e7 100644 --- a/src/Adyen/Model/Payments/Split.php +++ b/src/Adyen/Model/Payments/Split.php @@ -375,9 +375,6 @@ public function getAccount() */ public function setAccount($account) { - if (is_null($account)) { - throw new \InvalidArgumentException('non-nullable account cannot be null'); - } $this->container['account'] = $account; return $this; @@ -402,9 +399,6 @@ public function getAmount() */ public function setAmount($amount) { - if (is_null($amount)) { - throw new \InvalidArgumentException('non-nullable amount cannot be null'); - } $this->container['amount'] = $amount; return $this; @@ -429,9 +423,6 @@ public function getDescription() */ public function setDescription($description) { - if (is_null($description)) { - throw new \InvalidArgumentException('non-nullable description cannot be null'); - } $this->container['description'] = $description; return $this; @@ -456,9 +447,6 @@ public function getReference() */ public function setReference($reference) { - if (is_null($reference)) { - throw new \InvalidArgumentException('non-nullable reference cannot be null'); - } $this->container['reference'] = $reference; return $this; @@ -483,9 +471,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/Payments/SplitAmount.php b/src/Adyen/Model/Payments/SplitAmount.php index 0a473c807..aaed21e25 100644 --- a/src/Adyen/Model/Payments/SplitAmount.php +++ b/src/Adyen/Model/Payments/SplitAmount.php @@ -305,9 +305,6 @@ public function getCurrency() */ public function setCurrency($currency) { - if (is_null($currency)) { - throw new \InvalidArgumentException('non-nullable currency cannot be null'); - } $this->container['currency'] = $currency; return $this; @@ -332,9 +329,6 @@ public function getValue() */ public function setValue($value) { - if (is_null($value)) { - throw new \InvalidArgumentException('non-nullable value cannot be null'); - } $this->container['value'] = $value; return $this; diff --git a/src/Adyen/Model/Payments/SubMerchant.php b/src/Adyen/Model/Payments/SubMerchant.php index 4396dd82b..dbfa0f75f 100644 --- a/src/Adyen/Model/Payments/SubMerchant.php +++ b/src/Adyen/Model/Payments/SubMerchant.php @@ -323,9 +323,6 @@ public function getCity() */ public function setCity($city) { - if (is_null($city)) { - throw new \InvalidArgumentException('non-nullable city cannot be null'); - } $this->container['city'] = $city; return $this; @@ -350,9 +347,6 @@ public function getCountry() */ public function setCountry($country) { - if (is_null($country)) { - throw new \InvalidArgumentException('non-nullable country cannot be null'); - } $this->container['country'] = $country; return $this; @@ -377,9 +371,6 @@ public function getMcc() */ public function setMcc($mcc) { - if (is_null($mcc)) { - throw new \InvalidArgumentException('non-nullable mcc cannot be null'); - } $this->container['mcc'] = $mcc; return $this; @@ -404,9 +395,6 @@ public function getName() */ public function setName($name) { - if (is_null($name)) { - throw new \InvalidArgumentException('non-nullable name cannot be null'); - } $this->container['name'] = $name; return $this; @@ -431,9 +419,6 @@ public function getTaxId() */ public function setTaxId($taxId) { - if (is_null($taxId)) { - throw new \InvalidArgumentException('non-nullable taxId cannot be null'); - } $this->container['taxId'] = $taxId; return $this; diff --git a/src/Adyen/Model/Payments/TechnicalCancelRequest.php b/src/Adyen/Model/Payments/TechnicalCancelRequest.php index 019007b7c..5f27bcfa1 100644 --- a/src/Adyen/Model/Payments/TechnicalCancelRequest.php +++ b/src/Adyen/Model/Payments/TechnicalCancelRequest.php @@ -364,9 +364,6 @@ public function getAdditionalData() */ public function setAdditionalData($additionalData) { - if (is_null($additionalData)) { - throw new \InvalidArgumentException('non-nullable additionalData cannot be null'); - } $this->container['additionalData'] = $additionalData; return $this; @@ -391,9 +388,6 @@ public function getMerchantAccount() */ public function setMerchantAccount($merchantAccount) { - if (is_null($merchantAccount)) { - throw new \InvalidArgumentException('non-nullable merchantAccount cannot be null'); - } $this->container['merchantAccount'] = $merchantAccount; return $this; @@ -418,9 +412,6 @@ public function getModificationAmount() */ public function setModificationAmount($modificationAmount) { - if (is_null($modificationAmount)) { - throw new \InvalidArgumentException('non-nullable modificationAmount cannot be null'); - } $this->container['modificationAmount'] = $modificationAmount; return $this; @@ -445,9 +436,6 @@ public function getMpiData() */ public function setMpiData($mpiData) { - if (is_null($mpiData)) { - throw new \InvalidArgumentException('non-nullable mpiData cannot be null'); - } $this->container['mpiData'] = $mpiData; return $this; @@ -472,9 +460,6 @@ public function getOriginalMerchantReference() */ public function setOriginalMerchantReference($originalMerchantReference) { - if (is_null($originalMerchantReference)) { - throw new \InvalidArgumentException('non-nullable originalMerchantReference cannot be null'); - } $this->container['originalMerchantReference'] = $originalMerchantReference; return $this; @@ -499,9 +484,6 @@ public function getPlatformChargebackLogic() */ public function setPlatformChargebackLogic($platformChargebackLogic) { - if (is_null($platformChargebackLogic)) { - throw new \InvalidArgumentException('non-nullable platformChargebackLogic cannot be null'); - } $this->container['platformChargebackLogic'] = $platformChargebackLogic; return $this; @@ -526,9 +508,6 @@ public function getReference() */ public function setReference($reference) { - if (is_null($reference)) { - throw new \InvalidArgumentException('non-nullable reference cannot be null'); - } $this->container['reference'] = $reference; return $this; @@ -553,9 +532,6 @@ public function getSplits() */ public function setSplits($splits) { - if (is_null($splits)) { - throw new \InvalidArgumentException('non-nullable splits cannot be null'); - } $this->container['splits'] = $splits; return $this; @@ -580,9 +556,6 @@ public function getTenderReference() */ public function setTenderReference($tenderReference) { - if (is_null($tenderReference)) { - throw new \InvalidArgumentException('non-nullable tenderReference cannot be null'); - } $this->container['tenderReference'] = $tenderReference; return $this; @@ -607,9 +580,6 @@ public function getUniqueTerminalId() */ public function setUniqueTerminalId($uniqueTerminalId) { - if (is_null($uniqueTerminalId)) { - throw new \InvalidArgumentException('non-nullable uniqueTerminalId cannot be null'); - } $this->container['uniqueTerminalId'] = $uniqueTerminalId; return $this; diff --git a/src/Adyen/Model/Payments/ThreeDS1Result.php b/src/Adyen/Model/Payments/ThreeDS1Result.php index 4e31dbb93..c472ea3c7 100644 --- a/src/Adyen/Model/Payments/ThreeDS1Result.php +++ b/src/Adyen/Model/Payments/ThreeDS1Result.php @@ -330,9 +330,6 @@ public function getCavv() */ public function setCavv($cavv) { - if (is_null($cavv)) { - throw new \InvalidArgumentException('non-nullable cavv cannot be null'); - } $this->container['cavv'] = $cavv; return $this; @@ -357,9 +354,6 @@ public function getCavvAlgorithm() */ public function setCavvAlgorithm($cavvAlgorithm) { - if (is_null($cavvAlgorithm)) { - throw new \InvalidArgumentException('non-nullable cavvAlgorithm cannot be null'); - } $this->container['cavvAlgorithm'] = $cavvAlgorithm; return $this; @@ -384,9 +378,6 @@ public function getEci() */ public function setEci($eci) { - if (is_null($eci)) { - throw new \InvalidArgumentException('non-nullable eci cannot be null'); - } $this->container['eci'] = $eci; return $this; @@ -411,9 +402,6 @@ public function getThreeDAuthenticatedResponse() */ public function setThreeDAuthenticatedResponse($threeDAuthenticatedResponse) { - if (is_null($threeDAuthenticatedResponse)) { - throw new \InvalidArgumentException('non-nullable threeDAuthenticatedResponse cannot be null'); - } $this->container['threeDAuthenticatedResponse'] = $threeDAuthenticatedResponse; return $this; @@ -438,9 +426,6 @@ public function getThreeDOfferedResponse() */ public function setThreeDOfferedResponse($threeDOfferedResponse) { - if (is_null($threeDOfferedResponse)) { - throw new \InvalidArgumentException('non-nullable threeDOfferedResponse cannot be null'); - } $this->container['threeDOfferedResponse'] = $threeDOfferedResponse; return $this; @@ -465,9 +450,6 @@ public function getXid() */ public function setXid($xid) { - if (is_null($xid)) { - throw new \InvalidArgumentException('non-nullable xid cannot be null'); - } $this->container['xid'] = $xid; return $this; diff --git a/src/Adyen/Model/Payments/ThreeDS2RequestData.php b/src/Adyen/Model/Payments/ThreeDS2RequestData.php index f9bc03095..669f6cfe1 100644 --- a/src/Adyen/Model/Payments/ThreeDS2RequestData.php +++ b/src/Adyen/Model/Payments/ThreeDS2RequestData.php @@ -728,9 +728,6 @@ public function getAcctInfo() */ public function setAcctInfo($acctInfo) { - if (is_null($acctInfo)) { - throw new \InvalidArgumentException('non-nullable acctInfo cannot be null'); - } $this->container['acctInfo'] = $acctInfo; return $this; @@ -755,9 +752,6 @@ public function getAcctType() */ 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( @@ -792,9 +786,6 @@ public function getAcquirerBIN() */ public function setAcquirerBIN($acquirerBIN) { - if (is_null($acquirerBIN)) { - throw new \InvalidArgumentException('non-nullable acquirerBIN cannot be null'); - } $this->container['acquirerBIN'] = $acquirerBIN; return $this; @@ -819,9 +810,6 @@ public function getAcquirerMerchantID() */ public function setAcquirerMerchantID($acquirerMerchantID) { - if (is_null($acquirerMerchantID)) { - throw new \InvalidArgumentException('non-nullable acquirerMerchantID cannot be null'); - } $this->container['acquirerMerchantID'] = $acquirerMerchantID; return $this; @@ -846,9 +834,6 @@ public function getAddrMatch() */ 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( @@ -885,9 +870,6 @@ public function getAuthenticationOnly() */ public function setAuthenticationOnly($authenticationOnly) { - if (is_null($authenticationOnly)) { - throw new \InvalidArgumentException('non-nullable authenticationOnly cannot be null'); - } $this->container['authenticationOnly'] = $authenticationOnly; return $this; @@ -914,9 +896,6 @@ public function getChallengeIndicator() */ 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( @@ -951,9 +930,6 @@ public function getDeviceChannel() */ public function setDeviceChannel($deviceChannel) { - if (is_null($deviceChannel)) { - throw new \InvalidArgumentException('non-nullable deviceChannel cannot be null'); - } $this->container['deviceChannel'] = $deviceChannel; return $this; @@ -978,9 +954,6 @@ public function getDeviceRenderOptions() */ public function setDeviceRenderOptions($deviceRenderOptions) { - if (is_null($deviceRenderOptions)) { - throw new \InvalidArgumentException('non-nullable deviceRenderOptions cannot be null'); - } $this->container['deviceRenderOptions'] = $deviceRenderOptions; return $this; @@ -1005,9 +978,6 @@ public function getHomePhone() */ public function setHomePhone($homePhone) { - if (is_null($homePhone)) { - throw new \InvalidArgumentException('non-nullable homePhone cannot be null'); - } $this->container['homePhone'] = $homePhone; return $this; @@ -1032,9 +1002,6 @@ public function getMcc() */ public function setMcc($mcc) { - if (is_null($mcc)) { - throw new \InvalidArgumentException('non-nullable mcc cannot be null'); - } $this->container['mcc'] = $mcc; return $this; @@ -1059,9 +1026,6 @@ public function getMerchantName() */ public function setMerchantName($merchantName) { - if (is_null($merchantName)) { - throw new \InvalidArgumentException('non-nullable merchantName cannot be null'); - } $this->container['merchantName'] = $merchantName; return $this; @@ -1086,9 +1050,6 @@ public function getMessageVersion() */ public function setMessageVersion($messageVersion) { - if (is_null($messageVersion)) { - throw new \InvalidArgumentException('non-nullable messageVersion cannot be null'); - } $this->container['messageVersion'] = $messageVersion; return $this; @@ -1113,9 +1074,6 @@ public function getMobilePhone() */ public function setMobilePhone($mobilePhone) { - if (is_null($mobilePhone)) { - throw new \InvalidArgumentException('non-nullable mobilePhone cannot be null'); - } $this->container['mobilePhone'] = $mobilePhone; return $this; @@ -1140,9 +1098,6 @@ public function getNotificationURL() */ public function setNotificationURL($notificationURL) { - if (is_null($notificationURL)) { - throw new \InvalidArgumentException('non-nullable notificationURL cannot be null'); - } $this->container['notificationURL'] = $notificationURL; return $this; @@ -1167,9 +1122,6 @@ public function getPayTokenInd() */ public function setPayTokenInd($payTokenInd) { - if (is_null($payTokenInd)) { - throw new \InvalidArgumentException('non-nullable payTokenInd cannot be null'); - } $this->container['payTokenInd'] = $payTokenInd; return $this; @@ -1194,9 +1146,6 @@ public function getPaymentAuthenticationUseCase() */ public function setPaymentAuthenticationUseCase($paymentAuthenticationUseCase) { - if (is_null($paymentAuthenticationUseCase)) { - throw new \InvalidArgumentException('non-nullable paymentAuthenticationUseCase cannot be null'); - } $this->container['paymentAuthenticationUseCase'] = $paymentAuthenticationUseCase; return $this; @@ -1221,9 +1170,6 @@ public function getPurchaseInstalData() */ public function setPurchaseInstalData($purchaseInstalData) { - if (is_null($purchaseInstalData)) { - throw new \InvalidArgumentException('non-nullable purchaseInstalData cannot be null'); - } $this->container['purchaseInstalData'] = $purchaseInstalData; return $this; @@ -1248,9 +1194,6 @@ public function getRecurringExpiry() */ public function setRecurringExpiry($recurringExpiry) { - if (is_null($recurringExpiry)) { - throw new \InvalidArgumentException('non-nullable recurringExpiry cannot be null'); - } $this->container['recurringExpiry'] = $recurringExpiry; return $this; @@ -1275,9 +1218,6 @@ public function getRecurringFrequency() */ public function setRecurringFrequency($recurringFrequency) { - if (is_null($recurringFrequency)) { - throw new \InvalidArgumentException('non-nullable recurringFrequency cannot be null'); - } $this->container['recurringFrequency'] = $recurringFrequency; return $this; @@ -1302,9 +1242,6 @@ public function getSdkAppID() */ public function setSdkAppID($sdkAppID) { - if (is_null($sdkAppID)) { - throw new \InvalidArgumentException('non-nullable sdkAppID cannot be null'); - } $this->container['sdkAppID'] = $sdkAppID; return $this; @@ -1329,9 +1266,6 @@ public function getSdkEncData() */ public function setSdkEncData($sdkEncData) { - if (is_null($sdkEncData)) { - throw new \InvalidArgumentException('non-nullable sdkEncData cannot be null'); - } $this->container['sdkEncData'] = $sdkEncData; return $this; @@ -1356,9 +1290,6 @@ public function getSdkEphemPubKey() */ public function setSdkEphemPubKey($sdkEphemPubKey) { - if (is_null($sdkEphemPubKey)) { - throw new \InvalidArgumentException('non-nullable sdkEphemPubKey cannot be null'); - } $this->container['sdkEphemPubKey'] = $sdkEphemPubKey; return $this; @@ -1383,7 +1314,6 @@ public function getSdkMaxTimeout() */ public function setSdkMaxTimeout($sdkMaxTimeout) { - // Do nothing for nullable integers $this->container['sdkMaxTimeout'] = $sdkMaxTimeout; return $this; @@ -1408,9 +1338,6 @@ public function getSdkReferenceNumber() */ public function setSdkReferenceNumber($sdkReferenceNumber) { - if (is_null($sdkReferenceNumber)) { - throw new \InvalidArgumentException('non-nullable sdkReferenceNumber cannot be null'); - } $this->container['sdkReferenceNumber'] = $sdkReferenceNumber; return $this; @@ -1435,9 +1362,6 @@ public function getSdkTransID() */ public function setSdkTransID($sdkTransID) { - if (is_null($sdkTransID)) { - throw new \InvalidArgumentException('non-nullable sdkTransID cannot be null'); - } $this->container['sdkTransID'] = $sdkTransID; return $this; @@ -1462,9 +1386,6 @@ public function getSdkVersion() */ public function setSdkVersion($sdkVersion) { - if (is_null($sdkVersion)) { - throw new \InvalidArgumentException('non-nullable sdkVersion cannot be null'); - } $this->container['sdkVersion'] = $sdkVersion; return $this; @@ -1489,9 +1410,6 @@ public function getThreeDSCompInd() */ public function setThreeDSCompInd($threeDSCompInd) { - if (is_null($threeDSCompInd)) { - throw new \InvalidArgumentException('non-nullable threeDSCompInd cannot be null'); - } $this->container['threeDSCompInd'] = $threeDSCompInd; return $this; @@ -1516,9 +1434,6 @@ public function getThreeDSRequestorAuthenticationInd() */ public function setThreeDSRequestorAuthenticationInd($threeDSRequestorAuthenticationInd) { - if (is_null($threeDSRequestorAuthenticationInd)) { - throw new \InvalidArgumentException('non-nullable threeDSRequestorAuthenticationInd cannot be null'); - } $this->container['threeDSRequestorAuthenticationInd'] = $threeDSRequestorAuthenticationInd; return $this; @@ -1543,9 +1458,6 @@ public function getThreeDSRequestorAuthenticationInfo() */ public function setThreeDSRequestorAuthenticationInfo($threeDSRequestorAuthenticationInfo) { - if (is_null($threeDSRequestorAuthenticationInfo)) { - throw new \InvalidArgumentException('non-nullable threeDSRequestorAuthenticationInfo cannot be null'); - } $this->container['threeDSRequestorAuthenticationInfo'] = $threeDSRequestorAuthenticationInfo; return $this; @@ -1570,9 +1482,6 @@ public function getThreeDSRequestorChallengeInd() */ 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( @@ -1607,9 +1516,6 @@ public function getThreeDSRequestorID() */ public function setThreeDSRequestorID($threeDSRequestorID) { - if (is_null($threeDSRequestorID)) { - throw new \InvalidArgumentException('non-nullable threeDSRequestorID cannot be null'); - } $this->container['threeDSRequestorID'] = $threeDSRequestorID; return $this; @@ -1634,9 +1540,6 @@ public function getThreeDSRequestorName() */ public function setThreeDSRequestorName($threeDSRequestorName) { - if (is_null($threeDSRequestorName)) { - throw new \InvalidArgumentException('non-nullable threeDSRequestorName cannot be null'); - } $this->container['threeDSRequestorName'] = $threeDSRequestorName; return $this; @@ -1661,9 +1564,6 @@ public function getThreeDSRequestorPriorAuthenticationInfo() */ public function setThreeDSRequestorPriorAuthenticationInfo($threeDSRequestorPriorAuthenticationInfo) { - if (is_null($threeDSRequestorPriorAuthenticationInfo)) { - throw new \InvalidArgumentException('non-nullable threeDSRequestorPriorAuthenticationInfo cannot be null'); - } $this->container['threeDSRequestorPriorAuthenticationInfo'] = $threeDSRequestorPriorAuthenticationInfo; return $this; @@ -1688,9 +1588,6 @@ public function getThreeDSRequestorURL() */ public function setThreeDSRequestorURL($threeDSRequestorURL) { - if (is_null($threeDSRequestorURL)) { - throw new \InvalidArgumentException('non-nullable threeDSRequestorURL cannot be null'); - } $this->container['threeDSRequestorURL'] = $threeDSRequestorURL; return $this; @@ -1715,9 +1612,6 @@ public function getTransType() */ 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( @@ -1752,9 +1646,6 @@ public function getTransactionType() */ 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( @@ -1789,9 +1680,6 @@ public function getWhiteListStatus() */ public function setWhiteListStatus($whiteListStatus) { - if (is_null($whiteListStatus)) { - throw new \InvalidArgumentException('non-nullable whiteListStatus cannot be null'); - } $this->container['whiteListStatus'] = $whiteListStatus; return $this; @@ -1816,9 +1704,6 @@ public function getWorkPhone() */ public function setWorkPhone($workPhone) { - if (is_null($workPhone)) { - throw new \InvalidArgumentException('non-nullable workPhone cannot be null'); - } $this->container['workPhone'] = $workPhone; return $this; diff --git a/src/Adyen/Model/Payments/ThreeDS2Result.php b/src/Adyen/Model/Payments/ThreeDS2Result.php index 119912480..73bd6d6ec 100644 --- a/src/Adyen/Model/Payments/ThreeDS2Result.php +++ b/src/Adyen/Model/Payments/ThreeDS2Result.php @@ -477,9 +477,6 @@ public function getAuthenticationValue() */ public function setAuthenticationValue($authenticationValue) { - if (is_null($authenticationValue)) { - throw new \InvalidArgumentException('non-nullable authenticationValue cannot be null'); - } $this->container['authenticationValue'] = $authenticationValue; return $this; @@ -504,9 +501,6 @@ public function getCavvAlgorithm() */ public function setCavvAlgorithm($cavvAlgorithm) { - if (is_null($cavvAlgorithm)) { - throw new \InvalidArgumentException('non-nullable cavvAlgorithm cannot be null'); - } $this->container['cavvAlgorithm'] = $cavvAlgorithm; return $this; @@ -531,9 +525,6 @@ public function getChallengeCancel() */ 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( @@ -568,9 +559,6 @@ public function getDsTransID() */ public function setDsTransID($dsTransID) { - if (is_null($dsTransID)) { - throw new \InvalidArgumentException('non-nullable dsTransID cannot be null'); - } $this->container['dsTransID'] = $dsTransID; return $this; @@ -595,9 +583,6 @@ public function getEci() */ public function setEci($eci) { - if (is_null($eci)) { - throw new \InvalidArgumentException('non-nullable eci cannot be null'); - } $this->container['eci'] = $eci; return $this; @@ -622,9 +607,6 @@ public function getExemptionIndicator() */ 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( @@ -659,9 +641,6 @@ public function getMessageVersion() */ public function setMessageVersion($messageVersion) { - if (is_null($messageVersion)) { - throw new \InvalidArgumentException('non-nullable messageVersion cannot be null'); - } $this->container['messageVersion'] = $messageVersion; return $this; @@ -686,9 +665,6 @@ public function getRiskScore() */ public function setRiskScore($riskScore) { - if (is_null($riskScore)) { - throw new \InvalidArgumentException('non-nullable riskScore cannot be null'); - } $this->container['riskScore'] = $riskScore; return $this; @@ -713,9 +689,6 @@ public function getThreeDSRequestorChallengeInd() */ 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( @@ -750,9 +723,6 @@ public function getThreeDSServerTransID() */ public function setThreeDSServerTransID($threeDSServerTransID) { - if (is_null($threeDSServerTransID)) { - throw new \InvalidArgumentException('non-nullable threeDSServerTransID cannot be null'); - } $this->container['threeDSServerTransID'] = $threeDSServerTransID; return $this; @@ -777,9 +747,6 @@ public function getTimestamp() */ public function setTimestamp($timestamp) { - if (is_null($timestamp)) { - throw new \InvalidArgumentException('non-nullable timestamp cannot be null'); - } $this->container['timestamp'] = $timestamp; return $this; @@ -804,9 +771,6 @@ public function getTransStatus() */ public function setTransStatus($transStatus) { - if (is_null($transStatus)) { - throw new \InvalidArgumentException('non-nullable transStatus cannot be null'); - } $this->container['transStatus'] = $transStatus; return $this; @@ -831,9 +795,6 @@ public function getTransStatusReason() */ public function setTransStatusReason($transStatusReason) { - if (is_null($transStatusReason)) { - throw new \InvalidArgumentException('non-nullable transStatusReason cannot be null'); - } $this->container['transStatusReason'] = $transStatusReason; return $this; @@ -858,9 +819,6 @@ public function getWhiteListStatus() */ public function setWhiteListStatus($whiteListStatus) { - if (is_null($whiteListStatus)) { - throw new \InvalidArgumentException('non-nullable whiteListStatus cannot be null'); - } $this->container['whiteListStatus'] = $whiteListStatus; return $this; diff --git a/src/Adyen/Model/Payments/ThreeDS2ResultRequest.php b/src/Adyen/Model/Payments/ThreeDS2ResultRequest.php index 1031706f8..4929f320d 100644 --- a/src/Adyen/Model/Payments/ThreeDS2ResultRequest.php +++ b/src/Adyen/Model/Payments/ThreeDS2ResultRequest.php @@ -308,9 +308,6 @@ public function getMerchantAccount() */ public function setMerchantAccount($merchantAccount) { - if (is_null($merchantAccount)) { - throw new \InvalidArgumentException('non-nullable merchantAccount cannot be null'); - } $this->container['merchantAccount'] = $merchantAccount; return $this; @@ -335,9 +332,6 @@ public function getPspReference() */ public function setPspReference($pspReference) { - if (is_null($pspReference)) { - throw new \InvalidArgumentException('non-nullable pspReference cannot be null'); - } $this->container['pspReference'] = $pspReference; return $this; diff --git a/src/Adyen/Model/Payments/ThreeDS2ResultResponse.php b/src/Adyen/Model/Payments/ThreeDS2ResultResponse.php index aaba993af..02b92b05a 100644 --- a/src/Adyen/Model/Payments/ThreeDS2ResultResponse.php +++ b/src/Adyen/Model/Payments/ThreeDS2ResultResponse.php @@ -295,9 +295,6 @@ public function getThreeDS2Result() */ public function setThreeDS2Result($threeDS2Result) { - if (is_null($threeDS2Result)) { - throw new \InvalidArgumentException('non-nullable threeDS2Result cannot be null'); - } $this->container['threeDS2Result'] = $threeDS2Result; return $this; diff --git a/src/Adyen/Model/Payments/ThreeDSRequestorAuthenticationInfo.php b/src/Adyen/Model/Payments/ThreeDSRequestorAuthenticationInfo.php index 71ac55f79..862118edd 100644 --- a/src/Adyen/Model/Payments/ThreeDSRequestorAuthenticationInfo.php +++ b/src/Adyen/Model/Payments/ThreeDSRequestorAuthenticationInfo.php @@ -340,9 +340,6 @@ public function getThreeDSReqAuthData() */ public function setThreeDSReqAuthData($threeDSReqAuthData) { - if (is_null($threeDSReqAuthData)) { - throw new \InvalidArgumentException('non-nullable threeDSReqAuthData cannot be null'); - } $this->container['threeDSReqAuthData'] = $threeDSReqAuthData; return $this; @@ -367,9 +364,6 @@ public function getThreeDSReqAuthMethod() */ 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( @@ -404,9 +398,6 @@ public function getThreeDSReqAuthTimestamp() */ public function setThreeDSReqAuthTimestamp($threeDSReqAuthTimestamp) { - if (is_null($threeDSReqAuthTimestamp)) { - throw new \InvalidArgumentException('non-nullable threeDSReqAuthTimestamp cannot be null'); - } $this->container['threeDSReqAuthTimestamp'] = $threeDSReqAuthTimestamp; return $this; diff --git a/src/Adyen/Model/Payments/ThreeDSRequestorPriorAuthenticationInfo.php b/src/Adyen/Model/Payments/ThreeDSRequestorPriorAuthenticationInfo.php index de29aa9bc..b20e924f8 100644 --- a/src/Adyen/Model/Payments/ThreeDSRequestorPriorAuthenticationInfo.php +++ b/src/Adyen/Model/Payments/ThreeDSRequestorPriorAuthenticationInfo.php @@ -343,9 +343,6 @@ public function getThreeDSReqPriorAuthData() */ public function setThreeDSReqPriorAuthData($threeDSReqPriorAuthData) { - if (is_null($threeDSReqPriorAuthData)) { - throw new \InvalidArgumentException('non-nullable threeDSReqPriorAuthData cannot be null'); - } $this->container['threeDSReqPriorAuthData'] = $threeDSReqPriorAuthData; return $this; @@ -370,9 +367,6 @@ public function getThreeDSReqPriorAuthMethod() */ 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( @@ -407,9 +401,6 @@ public function getThreeDSReqPriorAuthTimestamp() */ public function setThreeDSReqPriorAuthTimestamp($threeDSReqPriorAuthTimestamp) { - if (is_null($threeDSReqPriorAuthTimestamp)) { - throw new \InvalidArgumentException('non-nullable threeDSReqPriorAuthTimestamp cannot be null'); - } $this->container['threeDSReqPriorAuthTimestamp'] = $threeDSReqPriorAuthTimestamp; return $this; @@ -434,9 +425,6 @@ public function getThreeDSReqPriorRef() */ public function setThreeDSReqPriorRef($threeDSReqPriorRef) { - if (is_null($threeDSReqPriorRef)) { - throw new \InvalidArgumentException('non-nullable threeDSReqPriorRef cannot be null'); - } $this->container['threeDSReqPriorRef'] = $threeDSReqPriorRef; return $this; diff --git a/src/Adyen/Model/Payments/ThreeDSecureData.php b/src/Adyen/Model/Payments/ThreeDSecureData.php index 87aa50849..cc1247315 100644 --- a/src/Adyen/Model/Payments/ThreeDSecureData.php +++ b/src/Adyen/Model/Payments/ThreeDSecureData.php @@ -467,9 +467,6 @@ public function getAuthenticationResponse() */ 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( @@ -504,9 +501,6 @@ public function getCavv() */ public function setCavv($cavv) { - if (is_null($cavv)) { - throw new \InvalidArgumentException('non-nullable cavv cannot be null'); - } $this->container['cavv'] = $cavv; return $this; @@ -531,9 +525,6 @@ public function getCavvAlgorithm() */ public function setCavvAlgorithm($cavvAlgorithm) { - if (is_null($cavvAlgorithm)) { - throw new \InvalidArgumentException('non-nullable cavvAlgorithm cannot be null'); - } $this->container['cavvAlgorithm'] = $cavvAlgorithm; return $this; @@ -558,9 +549,6 @@ public function getChallengeCancel() */ 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( @@ -595,9 +583,6 @@ public function getDirectoryResponse() */ 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( @@ -632,9 +617,6 @@ public function getDsTransID() */ public function setDsTransID($dsTransID) { - if (is_null($dsTransID)) { - throw new \InvalidArgumentException('non-nullable dsTransID cannot be null'); - } $this->container['dsTransID'] = $dsTransID; return $this; @@ -659,9 +641,6 @@ public function getEci() */ public function setEci($eci) { - if (is_null($eci)) { - throw new \InvalidArgumentException('non-nullable eci cannot be null'); - } $this->container['eci'] = $eci; return $this; @@ -686,9 +665,6 @@ public function getRiskScore() */ public function setRiskScore($riskScore) { - if (is_null($riskScore)) { - throw new \InvalidArgumentException('non-nullable riskScore cannot be null'); - } $this->container['riskScore'] = $riskScore; return $this; @@ -713,9 +689,6 @@ public function getThreeDSVersion() */ public function setThreeDSVersion($threeDSVersion) { - if (is_null($threeDSVersion)) { - throw new \InvalidArgumentException('non-nullable threeDSVersion cannot be null'); - } $this->container['threeDSVersion'] = $threeDSVersion; return $this; @@ -740,9 +713,6 @@ public function getTokenAuthenticationVerificationValue() */ public function setTokenAuthenticationVerificationValue($tokenAuthenticationVerificationValue) { - if (is_null($tokenAuthenticationVerificationValue)) { - throw new \InvalidArgumentException('non-nullable tokenAuthenticationVerificationValue cannot be null'); - } $this->container['tokenAuthenticationVerificationValue'] = $tokenAuthenticationVerificationValue; return $this; @@ -767,9 +737,6 @@ public function getTransStatusReason() */ public function setTransStatusReason($transStatusReason) { - if (is_null($transStatusReason)) { - throw new \InvalidArgumentException('non-nullable transStatusReason cannot be null'); - } $this->container['transStatusReason'] = $transStatusReason; return $this; @@ -794,9 +761,6 @@ public function getXid() */ public function setXid($xid) { - if (is_null($xid)) { - throw new \InvalidArgumentException('non-nullable xid cannot be null'); - } $this->container['xid'] = $xid; return $this; diff --git a/src/Adyen/Model/Payments/VoidPendingRefundRequest.php b/src/Adyen/Model/Payments/VoidPendingRefundRequest.php index ca431f16a..ded87fb42 100644 --- a/src/Adyen/Model/Payments/VoidPendingRefundRequest.php +++ b/src/Adyen/Model/Payments/VoidPendingRefundRequest.php @@ -368,9 +368,6 @@ public function getAdditionalData() */ public function setAdditionalData($additionalData) { - if (is_null($additionalData)) { - throw new \InvalidArgumentException('non-nullable additionalData cannot be null'); - } $this->container['additionalData'] = $additionalData; return $this; @@ -395,9 +392,6 @@ public function getMerchantAccount() */ public function setMerchantAccount($merchantAccount) { - if (is_null($merchantAccount)) { - throw new \InvalidArgumentException('non-nullable merchantAccount cannot be null'); - } $this->container['merchantAccount'] = $merchantAccount; return $this; @@ -422,9 +416,6 @@ public function getModificationAmount() */ public function setModificationAmount($modificationAmount) { - if (is_null($modificationAmount)) { - throw new \InvalidArgumentException('non-nullable modificationAmount cannot be null'); - } $this->container['modificationAmount'] = $modificationAmount; return $this; @@ -449,9 +440,6 @@ public function getMpiData() */ public function setMpiData($mpiData) { - if (is_null($mpiData)) { - throw new \InvalidArgumentException('non-nullable mpiData cannot be null'); - } $this->container['mpiData'] = $mpiData; return $this; @@ -476,9 +464,6 @@ public function getOriginalMerchantReference() */ public function setOriginalMerchantReference($originalMerchantReference) { - if (is_null($originalMerchantReference)) { - throw new \InvalidArgumentException('non-nullable originalMerchantReference cannot be null'); - } $this->container['originalMerchantReference'] = $originalMerchantReference; return $this; @@ -503,9 +488,6 @@ public function getOriginalReference() */ public function setOriginalReference($originalReference) { - if (is_null($originalReference)) { - throw new \InvalidArgumentException('non-nullable originalReference cannot be null'); - } $this->container['originalReference'] = $originalReference; return $this; @@ -530,9 +512,6 @@ public function getPlatformChargebackLogic() */ public function setPlatformChargebackLogic($platformChargebackLogic) { - if (is_null($platformChargebackLogic)) { - throw new \InvalidArgumentException('non-nullable platformChargebackLogic cannot be null'); - } $this->container['platformChargebackLogic'] = $platformChargebackLogic; return $this; @@ -557,9 +536,6 @@ public function getReference() */ public function setReference($reference) { - if (is_null($reference)) { - throw new \InvalidArgumentException('non-nullable reference cannot be null'); - } $this->container['reference'] = $reference; return $this; @@ -584,9 +560,6 @@ public function getSplits() */ public function setSplits($splits) { - if (is_null($splits)) { - throw new \InvalidArgumentException('non-nullable splits cannot be null'); - } $this->container['splits'] = $splits; return $this; @@ -611,9 +584,6 @@ public function getTenderReference() */ public function setTenderReference($tenderReference) { - if (is_null($tenderReference)) { - throw new \InvalidArgumentException('non-nullable tenderReference cannot be null'); - } $this->container['tenderReference'] = $tenderReference; return $this; @@ -638,9 +608,6 @@ public function getUniqueTerminalId() */ public function setUniqueTerminalId($uniqueTerminalId) { - if (is_null($uniqueTerminalId)) { - throw new \InvalidArgumentException('non-nullable uniqueTerminalId cannot be null'); - } $this->container['uniqueTerminalId'] = $uniqueTerminalId; return $this; diff --git a/src/Adyen/Model/Payout/Address.php b/src/Adyen/Model/Payout/Address.php index 3823f3a44..13c16560a 100644 --- a/src/Adyen/Model/Payout/Address.php +++ b/src/Adyen/Model/Payout/Address.php @@ -345,9 +345,6 @@ public function getCity() */ public function setCity($city) { - if (is_null($city)) { - throw new \InvalidArgumentException('non-nullable city cannot be null'); - } $this->container['city'] = $city; return $this; @@ -372,9 +369,6 @@ public function getCountry() */ public function setCountry($country) { - if (is_null($country)) { - throw new \InvalidArgumentException('non-nullable country cannot be null'); - } $this->container['country'] = $country; return $this; @@ -399,9 +393,6 @@ public function getHouseNumberOrName() */ public function setHouseNumberOrName($houseNumberOrName) { - if (is_null($houseNumberOrName)) { - throw new \InvalidArgumentException('non-nullable houseNumberOrName cannot be null'); - } $this->container['houseNumberOrName'] = $houseNumberOrName; return $this; @@ -426,9 +417,6 @@ public function getPostalCode() */ public function setPostalCode($postalCode) { - if (is_null($postalCode)) { - throw new \InvalidArgumentException('non-nullable postalCode cannot be null'); - } $this->container['postalCode'] = $postalCode; return $this; @@ -453,9 +441,6 @@ public function getStateOrProvince() */ public function setStateOrProvince($stateOrProvince) { - if (is_null($stateOrProvince)) { - throw new \InvalidArgumentException('non-nullable stateOrProvince cannot be null'); - } $this->container['stateOrProvince'] = $stateOrProvince; return $this; @@ -480,9 +465,6 @@ public function getStreet() */ public function setStreet($street) { - if (is_null($street)) { - throw new \InvalidArgumentException('non-nullable street cannot be null'); - } $this->container['street'] = $street; return $this; diff --git a/src/Adyen/Model/Payout/Amount.php b/src/Adyen/Model/Payout/Amount.php index 5474d285e..627084b23 100644 --- a/src/Adyen/Model/Payout/Amount.php +++ b/src/Adyen/Model/Payout/Amount.php @@ -308,9 +308,6 @@ public function getCurrency() */ public function setCurrency($currency) { - if (is_null($currency)) { - throw new \InvalidArgumentException('non-nullable currency cannot be null'); - } $this->container['currency'] = $currency; return $this; @@ -335,9 +332,6 @@ public function getValue() */ public function setValue($value) { - if (is_null($value)) { - throw new \InvalidArgumentException('non-nullable value cannot be null'); - } $this->container['value'] = $value; return $this; diff --git a/src/Adyen/Model/Payout/BankAccount.php b/src/Adyen/Model/Payout/BankAccount.php index 56c6f1d0a..8c7134ead 100644 --- a/src/Adyen/Model/Payout/BankAccount.php +++ b/src/Adyen/Model/Payout/BankAccount.php @@ -351,9 +351,6 @@ public function getBankAccountNumber() */ public function setBankAccountNumber($bankAccountNumber) { - if (is_null($bankAccountNumber)) { - throw new \InvalidArgumentException('non-nullable bankAccountNumber cannot be null'); - } $this->container['bankAccountNumber'] = $bankAccountNumber; return $this; @@ -378,9 +375,6 @@ public function getBankCity() */ public function setBankCity($bankCity) { - if (is_null($bankCity)) { - throw new \InvalidArgumentException('non-nullable bankCity cannot be null'); - } $this->container['bankCity'] = $bankCity; return $this; @@ -405,9 +399,6 @@ public function getBankLocationId() */ public function setBankLocationId($bankLocationId) { - if (is_null($bankLocationId)) { - throw new \InvalidArgumentException('non-nullable bankLocationId cannot be null'); - } $this->container['bankLocationId'] = $bankLocationId; return $this; @@ -432,9 +423,6 @@ public function getBankName() */ public function setBankName($bankName) { - if (is_null($bankName)) { - throw new \InvalidArgumentException('non-nullable bankName cannot be null'); - } $this->container['bankName'] = $bankName; return $this; @@ -459,9 +447,6 @@ public function getBic() */ public function setBic($bic) { - if (is_null($bic)) { - throw new \InvalidArgumentException('non-nullable bic cannot be null'); - } $this->container['bic'] = $bic; return $this; @@ -486,9 +471,6 @@ public function getCountryCode() */ public function setCountryCode($countryCode) { - if (is_null($countryCode)) { - throw new \InvalidArgumentException('non-nullable countryCode cannot be null'); - } $this->container['countryCode'] = $countryCode; return $this; @@ -513,9 +495,6 @@ public function getIban() */ public function setIban($iban) { - if (is_null($iban)) { - throw new \InvalidArgumentException('non-nullable iban cannot be null'); - } $this->container['iban'] = $iban; return $this; @@ -540,9 +519,6 @@ public function getOwnerName() */ public function setOwnerName($ownerName) { - if (is_null($ownerName)) { - throw new \InvalidArgumentException('non-nullable ownerName cannot be null'); - } $this->container['ownerName'] = $ownerName; return $this; @@ -567,9 +543,6 @@ public function getTaxId() */ public function setTaxId($taxId) { - if (is_null($taxId)) { - throw new \InvalidArgumentException('non-nullable taxId cannot be null'); - } $this->container['taxId'] = $taxId; return $this; diff --git a/src/Adyen/Model/Payout/Card.php b/src/Adyen/Model/Payout/Card.php index ddbbda3ed..4d49666e0 100644 --- a/src/Adyen/Model/Payout/Card.php +++ b/src/Adyen/Model/Payout/Card.php @@ -344,9 +344,6 @@ public function getCvc() */ public function setCvc($cvc) { - if (is_null($cvc)) { - throw new \InvalidArgumentException('non-nullable cvc cannot be null'); - } $this->container['cvc'] = $cvc; return $this; @@ -371,9 +368,6 @@ public function getExpiryMonth() */ public function setExpiryMonth($expiryMonth) { - if (is_null($expiryMonth)) { - throw new \InvalidArgumentException('non-nullable expiryMonth cannot be null'); - } $this->container['expiryMonth'] = $expiryMonth; return $this; @@ -398,9 +392,6 @@ public function getExpiryYear() */ public function setExpiryYear($expiryYear) { - if (is_null($expiryYear)) { - throw new \InvalidArgumentException('non-nullable expiryYear cannot be null'); - } $this->container['expiryYear'] = $expiryYear; return $this; @@ -425,9 +416,6 @@ public function getHolderName() */ public function setHolderName($holderName) { - if (is_null($holderName)) { - throw new \InvalidArgumentException('non-nullable holderName cannot be null'); - } $this->container['holderName'] = $holderName; return $this; @@ -452,9 +440,6 @@ public function getIssueNumber() */ public function setIssueNumber($issueNumber) { - if (is_null($issueNumber)) { - throw new \InvalidArgumentException('non-nullable issueNumber cannot be null'); - } $this->container['issueNumber'] = $issueNumber; return $this; @@ -479,9 +464,6 @@ public function getNumber() */ public function setNumber($number) { - if (is_null($number)) { - throw new \InvalidArgumentException('non-nullable number cannot be null'); - } $this->container['number'] = $number; return $this; @@ -506,9 +488,6 @@ public function getStartMonth() */ public function setStartMonth($startMonth) { - if (is_null($startMonth)) { - throw new \InvalidArgumentException('non-nullable startMonth cannot be null'); - } $this->container['startMonth'] = $startMonth; return $this; @@ -533,9 +512,6 @@ public function getStartYear() */ public function setStartYear($startYear) { - if (is_null($startYear)) { - throw new \InvalidArgumentException('non-nullable startYear cannot be null'); - } $this->container['startYear'] = $startYear; return $this; diff --git a/src/Adyen/Model/Payout/FraudCheckResult.php b/src/Adyen/Model/Payout/FraudCheckResult.php index a1895c91c..2a3a93a0e 100644 --- a/src/Adyen/Model/Payout/FraudCheckResult.php +++ b/src/Adyen/Model/Payout/FraudCheckResult.php @@ -318,7 +318,6 @@ public function getAccountScore() */ public function setAccountScore($accountScore) { - // Do nothing for nullable integers $this->container['accountScore'] = $accountScore; return $this; @@ -343,7 +342,6 @@ public function getCheckId() */ public function setCheckId($checkId) { - // Do nothing for nullable integers $this->container['checkId'] = $checkId; return $this; @@ -368,9 +366,6 @@ public function getName() */ public function setName($name) { - if (is_null($name)) { - throw new \InvalidArgumentException('non-nullable name cannot be null'); - } $this->container['name'] = $name; return $this; diff --git a/src/Adyen/Model/Payout/FraudCheckResultWrapper.php b/src/Adyen/Model/Payout/FraudCheckResultWrapper.php index 50c53d390..8d8cd6016 100644 --- a/src/Adyen/Model/Payout/FraudCheckResultWrapper.php +++ b/src/Adyen/Model/Payout/FraudCheckResultWrapper.php @@ -295,9 +295,6 @@ public function getFraudCheckResult() */ public function setFraudCheckResult($fraudCheckResult) { - if (is_null($fraudCheckResult)) { - throw new \InvalidArgumentException('non-nullable fraudCheckResult cannot be null'); - } $this->container['fraudCheckResult'] = $fraudCheckResult; return $this; diff --git a/src/Adyen/Model/Payout/FraudResult.php b/src/Adyen/Model/Payout/FraudResult.php index f742186b4..3650cb4db 100644 --- a/src/Adyen/Model/Payout/FraudResult.php +++ b/src/Adyen/Model/Payout/FraudResult.php @@ -305,7 +305,6 @@ public function getAccountScore() */ public function setAccountScore($accountScore) { - // Do nothing for nullable integers $this->container['accountScore'] = $accountScore; return $this; @@ -330,9 +329,6 @@ public function getResults() */ public function setResults($results) { - if (is_null($results)) { - throw new \InvalidArgumentException('non-nullable results cannot be null'); - } $this->container['results'] = $results; return $this; diff --git a/src/Adyen/Model/Payout/FundSource.php b/src/Adyen/Model/Payout/FundSource.php index bb3196941..0e17f8d38 100644 --- a/src/Adyen/Model/Payout/FundSource.php +++ b/src/Adyen/Model/Payout/FundSource.php @@ -330,9 +330,6 @@ public function getAdditionalData() */ public function setAdditionalData($additionalData) { - if (is_null($additionalData)) { - throw new \InvalidArgumentException('non-nullable additionalData cannot be null'); - } $this->container['additionalData'] = $additionalData; return $this; @@ -357,9 +354,6 @@ public function getBillingAddress() */ public function setBillingAddress($billingAddress) { - if (is_null($billingAddress)) { - throw new \InvalidArgumentException('non-nullable billingAddress cannot be null'); - } $this->container['billingAddress'] = $billingAddress; return $this; @@ -384,9 +378,6 @@ public function getCard() */ public function setCard($card) { - if (is_null($card)) { - throw new \InvalidArgumentException('non-nullable card cannot be null'); - } $this->container['card'] = $card; return $this; @@ -411,9 +402,6 @@ public function getShopperEmail() */ public function setShopperEmail($shopperEmail) { - if (is_null($shopperEmail)) { - throw new \InvalidArgumentException('non-nullable shopperEmail cannot be null'); - } $this->container['shopperEmail'] = $shopperEmail; return $this; @@ -438,9 +426,6 @@ public function getShopperName() */ public function setShopperName($shopperName) { - if (is_null($shopperName)) { - throw new \InvalidArgumentException('non-nullable shopperName cannot be null'); - } $this->container['shopperName'] = $shopperName; return $this; @@ -465,9 +450,6 @@ public function getTelephoneNumber() */ public function setTelephoneNumber($telephoneNumber) { - if (is_null($telephoneNumber)) { - throw new \InvalidArgumentException('non-nullable telephoneNumber cannot be null'); - } $this->container['telephoneNumber'] = $telephoneNumber; return $this; diff --git a/src/Adyen/Model/Payout/ModifyRequest.php b/src/Adyen/Model/Payout/ModifyRequest.php index aa154ea2f..969585f96 100644 --- a/src/Adyen/Model/Payout/ModifyRequest.php +++ b/src/Adyen/Model/Payout/ModifyRequest.php @@ -315,9 +315,6 @@ public function getAdditionalData() */ public function setAdditionalData($additionalData) { - if (is_null($additionalData)) { - throw new \InvalidArgumentException('non-nullable additionalData cannot be null'); - } $this->container['additionalData'] = $additionalData; return $this; @@ -342,9 +339,6 @@ public function getMerchantAccount() */ public function setMerchantAccount($merchantAccount) { - if (is_null($merchantAccount)) { - throw new \InvalidArgumentException('non-nullable merchantAccount cannot be null'); - } $this->container['merchantAccount'] = $merchantAccount; return $this; @@ -369,9 +363,6 @@ public function getOriginalReference() */ public function setOriginalReference($originalReference) { - if (is_null($originalReference)) { - throw new \InvalidArgumentException('non-nullable originalReference cannot be null'); - } $this->container['originalReference'] = $originalReference; return $this; diff --git a/src/Adyen/Model/Payout/ModifyResponse.php b/src/Adyen/Model/Payout/ModifyResponse.php index c27fd6f82..25149da64 100644 --- a/src/Adyen/Model/Payout/ModifyResponse.php +++ b/src/Adyen/Model/Payout/ModifyResponse.php @@ -315,9 +315,6 @@ public function getAdditionalData() */ public function setAdditionalData($additionalData) { - if (is_null($additionalData)) { - throw new \InvalidArgumentException('non-nullable additionalData cannot be null'); - } $this->container['additionalData'] = $additionalData; return $this; @@ -342,9 +339,6 @@ public function getPspReference() */ public function setPspReference($pspReference) { - if (is_null($pspReference)) { - throw new \InvalidArgumentException('non-nullable pspReference cannot be null'); - } $this->container['pspReference'] = $pspReference; return $this; @@ -369,9 +363,6 @@ public function getResponse() */ public function setResponse($response) { - if (is_null($response)) { - throw new \InvalidArgumentException('non-nullable response cannot be null'); - } $this->container['response'] = $response; return $this; diff --git a/src/Adyen/Model/Payout/Name.php b/src/Adyen/Model/Payout/Name.php index 074bc1d2b..30ec17f1d 100644 --- a/src/Adyen/Model/Payout/Name.php +++ b/src/Adyen/Model/Payout/Name.php @@ -308,9 +308,6 @@ public function getFirstName() */ public function setFirstName($firstName) { - if (is_null($firstName)) { - throw new \InvalidArgumentException('non-nullable firstName cannot be null'); - } $this->container['firstName'] = $firstName; return $this; @@ -335,9 +332,6 @@ public function getLastName() */ public function setLastName($lastName) { - if (is_null($lastName)) { - throw new \InvalidArgumentException('non-nullable lastName cannot be null'); - } $this->container['lastName'] = $lastName; return $this; diff --git a/src/Adyen/Model/Payout/ObjectSerializer.php b/src/Adyen/Model/Payout/ObjectSerializer.php index ad1c991ab..0d50f4363 100644 --- a/src/Adyen/Model/Payout/ObjectSerializer.php +++ b/src/Adyen/Model/Payout/ObjectSerializer.php @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach ($data as $property => $value) { + foreach($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) { - return $timestamp; - } + if (!is_string($timestamp)) return $timestamp; return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/Payout/PayoutRequest.php b/src/Adyen/Model/Payout/PayoutRequest.php index dca80a631..90bb1c1d0 100644 --- a/src/Adyen/Model/Payout/PayoutRequest.php +++ b/src/Adyen/Model/Payout/PayoutRequest.php @@ -422,9 +422,6 @@ public function getAmount() */ public function setAmount($amount) { - if (is_null($amount)) { - throw new \InvalidArgumentException('non-nullable amount cannot be null'); - } $this->container['amount'] = $amount; return $this; @@ -449,9 +446,6 @@ public function getBillingAddress() */ public function setBillingAddress($billingAddress) { - if (is_null($billingAddress)) { - throw new \InvalidArgumentException('non-nullable billingAddress cannot be null'); - } $this->container['billingAddress'] = $billingAddress; return $this; @@ -476,9 +470,6 @@ public function getCard() */ public function setCard($card) { - if (is_null($card)) { - throw new \InvalidArgumentException('non-nullable card cannot be null'); - } $this->container['card'] = $card; return $this; @@ -503,7 +494,6 @@ public function getFraudOffset() */ public function setFraudOffset($fraudOffset) { - // Do nothing for nullable integers $this->container['fraudOffset'] = $fraudOffset; return $this; @@ -528,9 +518,6 @@ public function getFundSource() */ public function setFundSource($fundSource) { - if (is_null($fundSource)) { - throw new \InvalidArgumentException('non-nullable fundSource cannot be null'); - } $this->container['fundSource'] = $fundSource; return $this; @@ -555,9 +542,6 @@ public function getMerchantAccount() */ public function setMerchantAccount($merchantAccount) { - if (is_null($merchantAccount)) { - throw new \InvalidArgumentException('non-nullable merchantAccount cannot be null'); - } $this->container['merchantAccount'] = $merchantAccount; return $this; @@ -582,9 +566,6 @@ public function getRecurring() */ public function setRecurring($recurring) { - if (is_null($recurring)) { - throw new \InvalidArgumentException('non-nullable recurring cannot be null'); - } $this->container['recurring'] = $recurring; return $this; @@ -609,9 +590,6 @@ public function getReference() */ public function setReference($reference) { - if (is_null($reference)) { - throw new \InvalidArgumentException('non-nullable reference cannot be null'); - } $this->container['reference'] = $reference; return $this; @@ -636,9 +614,6 @@ public function getSelectedRecurringDetailReference() */ public function setSelectedRecurringDetailReference($selectedRecurringDetailReference) { - if (is_null($selectedRecurringDetailReference)) { - throw new \InvalidArgumentException('non-nullable selectedRecurringDetailReference cannot be null'); - } $this->container['selectedRecurringDetailReference'] = $selectedRecurringDetailReference; return $this; @@ -663,9 +638,6 @@ public function getShopperEmail() */ public function setShopperEmail($shopperEmail) { - if (is_null($shopperEmail)) { - throw new \InvalidArgumentException('non-nullable shopperEmail cannot be null'); - } $this->container['shopperEmail'] = $shopperEmail; return $this; @@ -690,9 +662,6 @@ public function getShopperInteraction() */ 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( @@ -727,9 +696,6 @@ public function getShopperName() */ public function setShopperName($shopperName) { - if (is_null($shopperName)) { - throw new \InvalidArgumentException('non-nullable shopperName cannot be null'); - } $this->container['shopperName'] = $shopperName; return $this; @@ -754,9 +720,6 @@ public function getShopperReference() */ public function setShopperReference($shopperReference) { - if (is_null($shopperReference)) { - throw new \InvalidArgumentException('non-nullable shopperReference cannot be null'); - } $this->container['shopperReference'] = $shopperReference; return $this; @@ -781,9 +744,6 @@ public function getTelephoneNumber() */ public function setTelephoneNumber($telephoneNumber) { - if (is_null($telephoneNumber)) { - throw new \InvalidArgumentException('non-nullable telephoneNumber cannot be null'); - } $this->container['telephoneNumber'] = $telephoneNumber; return $this; diff --git a/src/Adyen/Model/Payout/PayoutResponse.php b/src/Adyen/Model/Payout/PayoutResponse.php index 24f833e6a..cb9abcf0c 100644 --- a/src/Adyen/Model/Payout/PayoutResponse.php +++ b/src/Adyen/Model/Payout/PayoutResponse.php @@ -412,9 +412,6 @@ public function getAdditionalData() */ public function setAdditionalData($additionalData) { - if (is_null($additionalData)) { - throw new \InvalidArgumentException('non-nullable additionalData cannot be null'); - } $this->container['additionalData'] = $additionalData; return $this; @@ -439,9 +436,6 @@ public function getAuthCode() */ public function setAuthCode($authCode) { - if (is_null($authCode)) { - throw new \InvalidArgumentException('non-nullable authCode cannot be null'); - } $this->container['authCode'] = $authCode; return $this; @@ -466,9 +460,6 @@ public function getDccAmount() */ public function setDccAmount($dccAmount) { - if (is_null($dccAmount)) { - throw new \InvalidArgumentException('non-nullable dccAmount cannot be null'); - } $this->container['dccAmount'] = $dccAmount; return $this; @@ -493,9 +484,6 @@ public function getDccSignature() */ public function setDccSignature($dccSignature) { - if (is_null($dccSignature)) { - throw new \InvalidArgumentException('non-nullable dccSignature cannot be null'); - } $this->container['dccSignature'] = $dccSignature; return $this; @@ -520,9 +508,6 @@ public function getFraudResult() */ public function setFraudResult($fraudResult) { - if (is_null($fraudResult)) { - throw new \InvalidArgumentException('non-nullable fraudResult cannot be null'); - } $this->container['fraudResult'] = $fraudResult; return $this; @@ -547,9 +532,6 @@ public function getIssuerUrl() */ public function setIssuerUrl($issuerUrl) { - if (is_null($issuerUrl)) { - throw new \InvalidArgumentException('non-nullable issuerUrl cannot be null'); - } $this->container['issuerUrl'] = $issuerUrl; return $this; @@ -574,9 +556,6 @@ public function getMd() */ public function setMd($md) { - if (is_null($md)) { - throw new \InvalidArgumentException('non-nullable md cannot be null'); - } $this->container['md'] = $md; return $this; @@ -601,9 +580,6 @@ public function getPaRequest() */ public function setPaRequest($paRequest) { - if (is_null($paRequest)) { - throw new \InvalidArgumentException('non-nullable paRequest cannot be null'); - } $this->container['paRequest'] = $paRequest; return $this; @@ -628,9 +604,6 @@ public function getPspReference() */ public function setPspReference($pspReference) { - if (is_null($pspReference)) { - throw new \InvalidArgumentException('non-nullable pspReference cannot be null'); - } $this->container['pspReference'] = $pspReference; return $this; @@ -655,9 +628,6 @@ public function getRefusalReason() */ public function setRefusalReason($refusalReason) { - if (is_null($refusalReason)) { - throw new \InvalidArgumentException('non-nullable refusalReason cannot be null'); - } $this->container['refusalReason'] = $refusalReason; return $this; @@ -682,9 +652,6 @@ public function getResultCode() */ 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( diff --git a/src/Adyen/Model/Payout/Recurring.php b/src/Adyen/Model/Payout/Recurring.php index b595235c7..b064dce51 100644 --- a/src/Adyen/Model/Payout/Recurring.php +++ b/src/Adyen/Model/Payout/Recurring.php @@ -375,9 +375,6 @@ public function getContract() */ 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( @@ -412,9 +409,6 @@ public function getRecurringDetailName() */ public function setRecurringDetailName($recurringDetailName) { - if (is_null($recurringDetailName)) { - throw new \InvalidArgumentException('non-nullable recurringDetailName cannot be null'); - } $this->container['recurringDetailName'] = $recurringDetailName; return $this; @@ -439,9 +433,6 @@ public function getRecurringExpiry() */ public function setRecurringExpiry($recurringExpiry) { - if (is_null($recurringExpiry)) { - throw new \InvalidArgumentException('non-nullable recurringExpiry cannot be null'); - } $this->container['recurringExpiry'] = $recurringExpiry; return $this; @@ -466,9 +457,6 @@ public function getRecurringFrequency() */ public function setRecurringFrequency($recurringFrequency) { - if (is_null($recurringFrequency)) { - throw new \InvalidArgumentException('non-nullable recurringFrequency cannot be null'); - } $this->container['recurringFrequency'] = $recurringFrequency; return $this; @@ -493,9 +481,6 @@ public function getTokenService() */ 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( diff --git a/src/Adyen/Model/Payout/ResponseAdditionalData3DSecure.php b/src/Adyen/Model/Payout/ResponseAdditionalData3DSecure.php index 21babcbb2..0c9969b25 100644 --- a/src/Adyen/Model/Payout/ResponseAdditionalData3DSecure.php +++ b/src/Adyen/Model/Payout/ResponseAdditionalData3DSecure.php @@ -323,9 +323,6 @@ public function getCardHolderInfo() */ public function setCardHolderInfo($cardHolderInfo) { - if (is_null($cardHolderInfo)) { - throw new \InvalidArgumentException('non-nullable cardHolderInfo cannot be null'); - } $this->container['cardHolderInfo'] = $cardHolderInfo; return $this; @@ -350,9 +347,6 @@ public function getCavv() */ public function setCavv($cavv) { - if (is_null($cavv)) { - throw new \InvalidArgumentException('non-nullable cavv cannot be null'); - } $this->container['cavv'] = $cavv; return $this; @@ -377,9 +371,6 @@ public function getCavvAlgorithm() */ public function setCavvAlgorithm($cavvAlgorithm) { - if (is_null($cavvAlgorithm)) { - throw new \InvalidArgumentException('non-nullable cavvAlgorithm cannot be null'); - } $this->container['cavvAlgorithm'] = $cavvAlgorithm; return $this; @@ -404,9 +395,6 @@ public function getScaExemptionRequested() */ public function setScaExemptionRequested($scaExemptionRequested) { - if (is_null($scaExemptionRequested)) { - throw new \InvalidArgumentException('non-nullable scaExemptionRequested cannot be null'); - } $this->container['scaExemptionRequested'] = $scaExemptionRequested; return $this; @@ -431,9 +419,6 @@ public function getThreeds2CardEnrolled() */ public function setThreeds2CardEnrolled($threeds2CardEnrolled) { - if (is_null($threeds2CardEnrolled)) { - throw new \InvalidArgumentException('non-nullable threeds2CardEnrolled cannot be null'); - } $this->container['threeds2CardEnrolled'] = $threeds2CardEnrolled; return $this; diff --git a/src/Adyen/Model/Payout/ResponseAdditionalDataBillingAddress.php b/src/Adyen/Model/Payout/ResponseAdditionalDataBillingAddress.php index d2b5591c1..a524642df 100644 --- a/src/Adyen/Model/Payout/ResponseAdditionalDataBillingAddress.php +++ b/src/Adyen/Model/Payout/ResponseAdditionalDataBillingAddress.php @@ -330,9 +330,6 @@ public function getBillingAddressCity() */ public function setBillingAddressCity($billingAddressCity) { - if (is_null($billingAddressCity)) { - throw new \InvalidArgumentException('non-nullable billingAddressCity cannot be null'); - } $this->container['billingAddressCity'] = $billingAddressCity; return $this; @@ -357,9 +354,6 @@ public function getBillingAddressCountry() */ public function setBillingAddressCountry($billingAddressCountry) { - if (is_null($billingAddressCountry)) { - throw new \InvalidArgumentException('non-nullable billingAddressCountry cannot be null'); - } $this->container['billingAddressCountry'] = $billingAddressCountry; return $this; @@ -384,9 +378,6 @@ public function getBillingAddressHouseNumberOrName() */ public function setBillingAddressHouseNumberOrName($billingAddressHouseNumberOrName) { - if (is_null($billingAddressHouseNumberOrName)) { - throw new \InvalidArgumentException('non-nullable billingAddressHouseNumberOrName cannot be null'); - } $this->container['billingAddressHouseNumberOrName'] = $billingAddressHouseNumberOrName; return $this; @@ -411,9 +402,6 @@ public function getBillingAddressPostalCode() */ public function setBillingAddressPostalCode($billingAddressPostalCode) { - if (is_null($billingAddressPostalCode)) { - throw new \InvalidArgumentException('non-nullable billingAddressPostalCode cannot be null'); - } $this->container['billingAddressPostalCode'] = $billingAddressPostalCode; return $this; @@ -438,9 +426,6 @@ public function getBillingAddressStateOrProvince() */ public function setBillingAddressStateOrProvince($billingAddressStateOrProvince) { - if (is_null($billingAddressStateOrProvince)) { - throw new \InvalidArgumentException('non-nullable billingAddressStateOrProvince cannot be null'); - } $this->container['billingAddressStateOrProvince'] = $billingAddressStateOrProvince; return $this; @@ -465,9 +450,6 @@ public function getBillingAddressStreet() */ public function setBillingAddressStreet($billingAddressStreet) { - if (is_null($billingAddressStreet)) { - throw new \InvalidArgumentException('non-nullable billingAddressStreet cannot be null'); - } $this->container['billingAddressStreet'] = $billingAddressStreet; return $this; diff --git a/src/Adyen/Model/Payout/ResponseAdditionalDataCard.php b/src/Adyen/Model/Payout/ResponseAdditionalDataCard.php index ec633b8a4..674d336aa 100644 --- a/src/Adyen/Model/Payout/ResponseAdditionalDataCard.php +++ b/src/Adyen/Model/Payout/ResponseAdditionalDataCard.php @@ -344,9 +344,6 @@ public function getCardBin() */ public function setCardBin($cardBin) { - if (is_null($cardBin)) { - throw new \InvalidArgumentException('non-nullable cardBin cannot be null'); - } $this->container['cardBin'] = $cardBin; return $this; @@ -371,9 +368,6 @@ public function getCardHolderName() */ public function setCardHolderName($cardHolderName) { - if (is_null($cardHolderName)) { - throw new \InvalidArgumentException('non-nullable cardHolderName cannot be null'); - } $this->container['cardHolderName'] = $cardHolderName; return $this; @@ -398,9 +392,6 @@ public function getCardIssuingBank() */ public function setCardIssuingBank($cardIssuingBank) { - if (is_null($cardIssuingBank)) { - throw new \InvalidArgumentException('non-nullable cardIssuingBank cannot be null'); - } $this->container['cardIssuingBank'] = $cardIssuingBank; return $this; @@ -425,9 +416,6 @@ public function getCardIssuingCountry() */ public function setCardIssuingCountry($cardIssuingCountry) { - if (is_null($cardIssuingCountry)) { - throw new \InvalidArgumentException('non-nullable cardIssuingCountry cannot be null'); - } $this->container['cardIssuingCountry'] = $cardIssuingCountry; return $this; @@ -452,9 +440,6 @@ public function getCardIssuingCurrency() */ public function setCardIssuingCurrency($cardIssuingCurrency) { - if (is_null($cardIssuingCurrency)) { - throw new \InvalidArgumentException('non-nullable cardIssuingCurrency cannot be null'); - } $this->container['cardIssuingCurrency'] = $cardIssuingCurrency; return $this; @@ -479,9 +464,6 @@ public function getCardPaymentMethod() */ public function setCardPaymentMethod($cardPaymentMethod) { - if (is_null($cardPaymentMethod)) { - throw new \InvalidArgumentException('non-nullable cardPaymentMethod cannot be null'); - } $this->container['cardPaymentMethod'] = $cardPaymentMethod; return $this; @@ -506,9 +488,6 @@ public function getCardSummary() */ public function setCardSummary($cardSummary) { - if (is_null($cardSummary)) { - throw new \InvalidArgumentException('non-nullable cardSummary cannot be null'); - } $this->container['cardSummary'] = $cardSummary; return $this; @@ -533,9 +512,6 @@ public function getIssuerBin() */ public function setIssuerBin($issuerBin) { - if (is_null($issuerBin)) { - throw new \InvalidArgumentException('non-nullable issuerBin cannot be null'); - } $this->container['issuerBin'] = $issuerBin; return $this; diff --git a/src/Adyen/Model/Payout/ResponseAdditionalDataCommon.php b/src/Adyen/Model/Payout/ResponseAdditionalDataCommon.php index 62875e29a..ec660c499 100644 --- a/src/Adyen/Model/Payout/ResponseAdditionalDataCommon.php +++ b/src/Adyen/Model/Payout/ResponseAdditionalDataCommon.php @@ -749,9 +749,6 @@ public function getAcquirerAccountCode() */ public function setAcquirerAccountCode($acquirerAccountCode) { - if (is_null($acquirerAccountCode)) { - throw new \InvalidArgumentException('non-nullable acquirerAccountCode cannot be null'); - } $this->container['acquirerAccountCode'] = $acquirerAccountCode; return $this; @@ -776,9 +773,6 @@ public function getAcquirerCode() */ public function setAcquirerCode($acquirerCode) { - if (is_null($acquirerCode)) { - throw new \InvalidArgumentException('non-nullable acquirerCode cannot be null'); - } $this->container['acquirerCode'] = $acquirerCode; return $this; @@ -803,9 +797,6 @@ public function getAcquirerReference() */ public function setAcquirerReference($acquirerReference) { - if (is_null($acquirerReference)) { - throw new \InvalidArgumentException('non-nullable acquirerReference cannot be null'); - } $this->container['acquirerReference'] = $acquirerReference; return $this; @@ -830,9 +821,6 @@ public function getAlias() */ public function setAlias($alias) { - if (is_null($alias)) { - throw new \InvalidArgumentException('non-nullable alias cannot be null'); - } $this->container['alias'] = $alias; return $this; @@ -857,9 +845,6 @@ public function getAliasType() */ public function setAliasType($aliasType) { - if (is_null($aliasType)) { - throw new \InvalidArgumentException('non-nullable aliasType cannot be null'); - } $this->container['aliasType'] = $aliasType; return $this; @@ -884,9 +869,6 @@ public function getAuthCode() */ public function setAuthCode($authCode) { - if (is_null($authCode)) { - throw new \InvalidArgumentException('non-nullable authCode cannot be null'); - } $this->container['authCode'] = $authCode; return $this; @@ -911,9 +893,6 @@ public function getAuthorisationMid() */ public function setAuthorisationMid($authorisationMid) { - if (is_null($authorisationMid)) { - throw new \InvalidArgumentException('non-nullable authorisationMid cannot be null'); - } $this->container['authorisationMid'] = $authorisationMid; return $this; @@ -938,9 +917,6 @@ public function getAuthorisedAmountCurrency() */ public function setAuthorisedAmountCurrency($authorisedAmountCurrency) { - if (is_null($authorisedAmountCurrency)) { - throw new \InvalidArgumentException('non-nullable authorisedAmountCurrency cannot be null'); - } $this->container['authorisedAmountCurrency'] = $authorisedAmountCurrency; return $this; @@ -965,9 +941,6 @@ public function getAuthorisedAmountValue() */ public function setAuthorisedAmountValue($authorisedAmountValue) { - if (is_null($authorisedAmountValue)) { - throw new \InvalidArgumentException('non-nullable authorisedAmountValue cannot be null'); - } $this->container['authorisedAmountValue'] = $authorisedAmountValue; return $this; @@ -992,9 +965,6 @@ public function getAvsResult() */ public function setAvsResult($avsResult) { - if (is_null($avsResult)) { - throw new \InvalidArgumentException('non-nullable avsResult cannot be null'); - } $this->container['avsResult'] = $avsResult; return $this; @@ -1019,9 +989,6 @@ public function getAvsResultRaw() */ public function setAvsResultRaw($avsResultRaw) { - if (is_null($avsResultRaw)) { - throw new \InvalidArgumentException('non-nullable avsResultRaw cannot be null'); - } $this->container['avsResultRaw'] = $avsResultRaw; return $this; @@ -1046,9 +1013,6 @@ public function getBic() */ public function setBic($bic) { - if (is_null($bic)) { - throw new \InvalidArgumentException('non-nullable bic cannot be null'); - } $this->container['bic'] = $bic; return $this; @@ -1073,9 +1037,6 @@ public function getCoBrandedWith() */ public function setCoBrandedWith($coBrandedWith) { - if (is_null($coBrandedWith)) { - throw new \InvalidArgumentException('non-nullable coBrandedWith cannot be null'); - } $this->container['coBrandedWith'] = $coBrandedWith; return $this; @@ -1100,9 +1061,6 @@ public function getCvcResult() */ public function setCvcResult($cvcResult) { - if (is_null($cvcResult)) { - throw new \InvalidArgumentException('non-nullable cvcResult cannot be null'); - } $this->container['cvcResult'] = $cvcResult; return $this; @@ -1127,9 +1085,6 @@ public function getCvcResultRaw() */ public function setCvcResultRaw($cvcResultRaw) { - if (is_null($cvcResultRaw)) { - throw new \InvalidArgumentException('non-nullable cvcResultRaw cannot be null'); - } $this->container['cvcResultRaw'] = $cvcResultRaw; return $this; @@ -1154,9 +1109,6 @@ public function getDsTransID() */ public function setDsTransID($dsTransID) { - if (is_null($dsTransID)) { - throw new \InvalidArgumentException('non-nullable dsTransID cannot be null'); - } $this->container['dsTransID'] = $dsTransID; return $this; @@ -1181,9 +1133,6 @@ public function getEci() */ public function setEci($eci) { - if (is_null($eci)) { - throw new \InvalidArgumentException('non-nullable eci cannot be null'); - } $this->container['eci'] = $eci; return $this; @@ -1208,9 +1157,6 @@ public function getExpiryDate() */ public function setExpiryDate($expiryDate) { - if (is_null($expiryDate)) { - throw new \InvalidArgumentException('non-nullable expiryDate cannot be null'); - } $this->container['expiryDate'] = $expiryDate; return $this; @@ -1235,9 +1181,6 @@ public function getExtraCostsCurrency() */ public function setExtraCostsCurrency($extraCostsCurrency) { - if (is_null($extraCostsCurrency)) { - throw new \InvalidArgumentException('non-nullable extraCostsCurrency cannot be null'); - } $this->container['extraCostsCurrency'] = $extraCostsCurrency; return $this; @@ -1262,9 +1205,6 @@ public function getExtraCostsValue() */ public function setExtraCostsValue($extraCostsValue) { - if (is_null($extraCostsValue)) { - throw new \InvalidArgumentException('non-nullable extraCostsValue cannot be null'); - } $this->container['extraCostsValue'] = $extraCostsValue; return $this; @@ -1289,9 +1229,6 @@ public function getFraudCheckItemNrFraudCheckname() */ public function setFraudCheckItemNrFraudCheckname($fraudCheckItemNrFraudCheckname) { - if (is_null($fraudCheckItemNrFraudCheckname)) { - throw new \InvalidArgumentException('non-nullable fraudCheckItemNrFraudCheckname cannot be null'); - } $this->container['fraudCheckItemNrFraudCheckname'] = $fraudCheckItemNrFraudCheckname; return $this; @@ -1316,9 +1253,6 @@ public function getFraudManualReview() */ public function setFraudManualReview($fraudManualReview) { - if (is_null($fraudManualReview)) { - throw new \InvalidArgumentException('non-nullable fraudManualReview cannot be null'); - } $this->container['fraudManualReview'] = $fraudManualReview; return $this; @@ -1343,9 +1277,6 @@ public function getFraudResultType() */ 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( @@ -1380,9 +1311,6 @@ public function getFundingSource() */ public function setFundingSource($fundingSource) { - if (is_null($fundingSource)) { - throw new \InvalidArgumentException('non-nullable fundingSource cannot be null'); - } $this->container['fundingSource'] = $fundingSource; return $this; @@ -1407,9 +1335,6 @@ public function getFundsAvailability() */ public function setFundsAvailability($fundsAvailability) { - if (is_null($fundsAvailability)) { - throw new \InvalidArgumentException('non-nullable fundsAvailability cannot be null'); - } $this->container['fundsAvailability'] = $fundsAvailability; return $this; @@ -1434,9 +1359,6 @@ public function getInferredRefusalReason() */ public function setInferredRefusalReason($inferredRefusalReason) { - if (is_null($inferredRefusalReason)) { - throw new \InvalidArgumentException('non-nullable inferredRefusalReason cannot be null'); - } $this->container['inferredRefusalReason'] = $inferredRefusalReason; return $this; @@ -1461,9 +1383,6 @@ public function getIsCardCommercial() */ public function setIsCardCommercial($isCardCommercial) { - if (is_null($isCardCommercial)) { - throw new \InvalidArgumentException('non-nullable isCardCommercial cannot be null'); - } $this->container['isCardCommercial'] = $isCardCommercial; return $this; @@ -1488,9 +1407,6 @@ public function getIssuerCountry() */ public function setIssuerCountry($issuerCountry) { - if (is_null($issuerCountry)) { - throw new \InvalidArgumentException('non-nullable issuerCountry cannot be null'); - } $this->container['issuerCountry'] = $issuerCountry; return $this; @@ -1515,9 +1431,6 @@ public function getLiabilityShift() */ public function setLiabilityShift($liabilityShift) { - if (is_null($liabilityShift)) { - throw new \InvalidArgumentException('non-nullable liabilityShift cannot be null'); - } $this->container['liabilityShift'] = $liabilityShift; return $this; @@ -1542,9 +1455,6 @@ public function getMcBankNetReferenceNumber() */ public function setMcBankNetReferenceNumber($mcBankNetReferenceNumber) { - if (is_null($mcBankNetReferenceNumber)) { - throw new \InvalidArgumentException('non-nullable mcBankNetReferenceNumber cannot be null'); - } $this->container['mcBankNetReferenceNumber'] = $mcBankNetReferenceNumber; return $this; @@ -1569,9 +1479,6 @@ public function getMerchantAdviceCode() */ public function setMerchantAdviceCode($merchantAdviceCode) { - if (is_null($merchantAdviceCode)) { - throw new \InvalidArgumentException('non-nullable merchantAdviceCode cannot be null'); - } $this->container['merchantAdviceCode'] = $merchantAdviceCode; return $this; @@ -1596,9 +1503,6 @@ public function getMerchantReference() */ public function setMerchantReference($merchantReference) { - if (is_null($merchantReference)) { - throw new \InvalidArgumentException('non-nullable merchantReference cannot be null'); - } $this->container['merchantReference'] = $merchantReference; return $this; @@ -1623,9 +1527,6 @@ public function getNetworkTxReference() */ public function setNetworkTxReference($networkTxReference) { - if (is_null($networkTxReference)) { - throw new \InvalidArgumentException('non-nullable networkTxReference cannot be null'); - } $this->container['networkTxReference'] = $networkTxReference; return $this; @@ -1650,9 +1551,6 @@ public function getOwnerName() */ public function setOwnerName($ownerName) { - if (is_null($ownerName)) { - throw new \InvalidArgumentException('non-nullable ownerName cannot be null'); - } $this->container['ownerName'] = $ownerName; return $this; @@ -1677,9 +1575,6 @@ public function getPaymentAccountReference() */ public function setPaymentAccountReference($paymentAccountReference) { - if (is_null($paymentAccountReference)) { - throw new \InvalidArgumentException('non-nullable paymentAccountReference cannot be null'); - } $this->container['paymentAccountReference'] = $paymentAccountReference; return $this; @@ -1704,9 +1599,6 @@ public function getPaymentMethod() */ public function setPaymentMethod($paymentMethod) { - if (is_null($paymentMethod)) { - throw new \InvalidArgumentException('non-nullable paymentMethod cannot be null'); - } $this->container['paymentMethod'] = $paymentMethod; return $this; @@ -1731,9 +1623,6 @@ public function getPaymentMethodVariant() */ public function setPaymentMethodVariant($paymentMethodVariant) { - if (is_null($paymentMethodVariant)) { - throw new \InvalidArgumentException('non-nullable paymentMethodVariant cannot be null'); - } $this->container['paymentMethodVariant'] = $paymentMethodVariant; return $this; @@ -1758,9 +1647,6 @@ public function getPayoutEligible() */ public function setPayoutEligible($payoutEligible) { - if (is_null($payoutEligible)) { - throw new \InvalidArgumentException('non-nullable payoutEligible cannot be null'); - } $this->container['payoutEligible'] = $payoutEligible; return $this; @@ -1785,9 +1671,6 @@ public function getRealtimeAccountUpdaterStatus() */ public function setRealtimeAccountUpdaterStatus($realtimeAccountUpdaterStatus) { - if (is_null($realtimeAccountUpdaterStatus)) { - throw new \InvalidArgumentException('non-nullable realtimeAccountUpdaterStatus cannot be null'); - } $this->container['realtimeAccountUpdaterStatus'] = $realtimeAccountUpdaterStatus; return $this; @@ -1812,9 +1695,6 @@ public function getReceiptFreeText() */ public function setReceiptFreeText($receiptFreeText) { - if (is_null($receiptFreeText)) { - throw new \InvalidArgumentException('non-nullable receiptFreeText cannot be null'); - } $this->container['receiptFreeText'] = $receiptFreeText; return $this; @@ -1839,9 +1719,6 @@ public function getRecurringContractTypes() */ public function setRecurringContractTypes($recurringContractTypes) { - if (is_null($recurringContractTypes)) { - throw new \InvalidArgumentException('non-nullable recurringContractTypes cannot be null'); - } $this->container['recurringContractTypes'] = $recurringContractTypes; return $this; @@ -1866,9 +1743,6 @@ public function getRecurringFirstPspReference() */ public function setRecurringFirstPspReference($recurringFirstPspReference) { - if (is_null($recurringFirstPspReference)) { - throw new \InvalidArgumentException('non-nullable recurringFirstPspReference cannot be null'); - } $this->container['recurringFirstPspReference'] = $recurringFirstPspReference; return $this; @@ -1893,9 +1767,6 @@ public function getRecurringRecurringDetailReference() */ public function setRecurringRecurringDetailReference($recurringRecurringDetailReference) { - if (is_null($recurringRecurringDetailReference)) { - throw new \InvalidArgumentException('non-nullable recurringRecurringDetailReference cannot be null'); - } $this->container['recurringRecurringDetailReference'] = $recurringRecurringDetailReference; return $this; @@ -1920,9 +1791,6 @@ public function getRecurringShopperReference() */ public function setRecurringShopperReference($recurringShopperReference) { - if (is_null($recurringShopperReference)) { - throw new \InvalidArgumentException('non-nullable recurringShopperReference cannot be null'); - } $this->container['recurringShopperReference'] = $recurringShopperReference; return $this; @@ -1947,9 +1815,6 @@ public function getRecurringProcessingModel() */ 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( @@ -1984,9 +1849,6 @@ public function getReferred() */ public function setReferred($referred) { - if (is_null($referred)) { - throw new \InvalidArgumentException('non-nullable referred cannot be null'); - } $this->container['referred'] = $referred; return $this; @@ -2011,9 +1873,6 @@ public function getRefusalReasonRaw() */ public function setRefusalReasonRaw($refusalReasonRaw) { - if (is_null($refusalReasonRaw)) { - throw new \InvalidArgumentException('non-nullable refusalReasonRaw cannot be null'); - } $this->container['refusalReasonRaw'] = $refusalReasonRaw; return $this; @@ -2038,9 +1897,6 @@ public function getRequestAmount() */ public function setRequestAmount($requestAmount) { - if (is_null($requestAmount)) { - throw new \InvalidArgumentException('non-nullable requestAmount cannot be null'); - } $this->container['requestAmount'] = $requestAmount; return $this; @@ -2065,9 +1921,6 @@ public function getRequestCurrencyCode() */ public function setRequestCurrencyCode($requestCurrencyCode) { - if (is_null($requestCurrencyCode)) { - throw new \InvalidArgumentException('non-nullable requestCurrencyCode cannot be null'); - } $this->container['requestCurrencyCode'] = $requestCurrencyCode; return $this; @@ -2092,9 +1945,6 @@ public function getShopperInteraction() */ public function setShopperInteraction($shopperInteraction) { - if (is_null($shopperInteraction)) { - throw new \InvalidArgumentException('non-nullable shopperInteraction cannot be null'); - } $this->container['shopperInteraction'] = $shopperInteraction; return $this; @@ -2119,9 +1969,6 @@ public function getShopperReference() */ public function setShopperReference($shopperReference) { - if (is_null($shopperReference)) { - throw new \InvalidArgumentException('non-nullable shopperReference cannot be null'); - } $this->container['shopperReference'] = $shopperReference; return $this; @@ -2146,9 +1993,6 @@ public function getTerminalId() */ public function setTerminalId($terminalId) { - if (is_null($terminalId)) { - throw new \InvalidArgumentException('non-nullable terminalId cannot be null'); - } $this->container['terminalId'] = $terminalId; return $this; @@ -2173,9 +2017,6 @@ public function getThreeDAuthenticated() */ public function setThreeDAuthenticated($threeDAuthenticated) { - if (is_null($threeDAuthenticated)) { - throw new \InvalidArgumentException('non-nullable threeDAuthenticated cannot be null'); - } $this->container['threeDAuthenticated'] = $threeDAuthenticated; return $this; @@ -2200,9 +2041,6 @@ public function getThreeDAuthenticatedResponse() */ public function setThreeDAuthenticatedResponse($threeDAuthenticatedResponse) { - if (is_null($threeDAuthenticatedResponse)) { - throw new \InvalidArgumentException('non-nullable threeDAuthenticatedResponse cannot be null'); - } $this->container['threeDAuthenticatedResponse'] = $threeDAuthenticatedResponse; return $this; @@ -2227,9 +2065,6 @@ public function getThreeDOffered() */ public function setThreeDOffered($threeDOffered) { - if (is_null($threeDOffered)) { - throw new \InvalidArgumentException('non-nullable threeDOffered cannot be null'); - } $this->container['threeDOffered'] = $threeDOffered; return $this; @@ -2254,9 +2089,6 @@ public function getThreeDOfferedResponse() */ public function setThreeDOfferedResponse($threeDOfferedResponse) { - if (is_null($threeDOfferedResponse)) { - throw new \InvalidArgumentException('non-nullable threeDOfferedResponse cannot be null'); - } $this->container['threeDOfferedResponse'] = $threeDOfferedResponse; return $this; @@ -2281,9 +2113,6 @@ public function getThreeDSVersion() */ public function setThreeDSVersion($threeDSVersion) { - if (is_null($threeDSVersion)) { - throw new \InvalidArgumentException('non-nullable threeDSVersion cannot be null'); - } $this->container['threeDSVersion'] = $threeDSVersion; return $this; @@ -2308,9 +2137,6 @@ public function getVisaTransactionId() */ public function setVisaTransactionId($visaTransactionId) { - if (is_null($visaTransactionId)) { - throw new \InvalidArgumentException('non-nullable visaTransactionId cannot be null'); - } $this->container['visaTransactionId'] = $visaTransactionId; return $this; @@ -2335,9 +2161,6 @@ public function getXid() */ public function setXid($xid) { - if (is_null($xid)) { - throw new \InvalidArgumentException('non-nullable xid cannot be null'); - } $this->container['xid'] = $xid; return $this; diff --git a/src/Adyen/Model/Payout/ResponseAdditionalDataDomesticError.php b/src/Adyen/Model/Payout/ResponseAdditionalDataDomesticError.php index 990001dd2..11b83520a 100644 --- a/src/Adyen/Model/Payout/ResponseAdditionalDataDomesticError.php +++ b/src/Adyen/Model/Payout/ResponseAdditionalDataDomesticError.php @@ -302,9 +302,6 @@ public function getDomesticRefusalReasonRaw() */ public function setDomesticRefusalReasonRaw($domesticRefusalReasonRaw) { - if (is_null($domesticRefusalReasonRaw)) { - throw new \InvalidArgumentException('non-nullable domesticRefusalReasonRaw cannot be null'); - } $this->container['domesticRefusalReasonRaw'] = $domesticRefusalReasonRaw; return $this; @@ -329,9 +326,6 @@ public function getDomesticShopperAdvice() */ public function setDomesticShopperAdvice($domesticShopperAdvice) { - if (is_null($domesticShopperAdvice)) { - throw new \InvalidArgumentException('non-nullable domesticShopperAdvice cannot be null'); - } $this->container['domesticShopperAdvice'] = $domesticShopperAdvice; return $this; diff --git a/src/Adyen/Model/Payout/ResponseAdditionalDataInstallments.php b/src/Adyen/Model/Payout/ResponseAdditionalDataInstallments.php index 42ba8b01e..bedc7bf06 100644 --- a/src/Adyen/Model/Payout/ResponseAdditionalDataInstallments.php +++ b/src/Adyen/Model/Payout/ResponseAdditionalDataInstallments.php @@ -372,9 +372,6 @@ public function getInstallmentPaymentDataInstallmentType() */ public function setInstallmentPaymentDataInstallmentType($installmentPaymentDataInstallmentType) { - if (is_null($installmentPaymentDataInstallmentType)) { - throw new \InvalidArgumentException('non-nullable installmentPaymentDataInstallmentType cannot be null'); - } $this->container['installmentPaymentDataInstallmentType'] = $installmentPaymentDataInstallmentType; return $this; @@ -399,9 +396,6 @@ public function getInstallmentPaymentDataOptionItemNrAnnualPercentageRate() */ public function setInstallmentPaymentDataOptionItemNrAnnualPercentageRate($installmentPaymentDataOptionItemNrAnnualPercentageRate) { - if (is_null($installmentPaymentDataOptionItemNrAnnualPercentageRate)) { - throw new \InvalidArgumentException('non-nullable installmentPaymentDataOptionItemNrAnnualPercentageRate cannot be null'); - } $this->container['installmentPaymentDataOptionItemNrAnnualPercentageRate'] = $installmentPaymentDataOptionItemNrAnnualPercentageRate; return $this; @@ -426,9 +420,6 @@ public function getInstallmentPaymentDataOptionItemNrFirstInstallmentAmount() */ public function setInstallmentPaymentDataOptionItemNrFirstInstallmentAmount($installmentPaymentDataOptionItemNrFirstInstallmentAmount) { - if (is_null($installmentPaymentDataOptionItemNrFirstInstallmentAmount)) { - throw new \InvalidArgumentException('non-nullable installmentPaymentDataOptionItemNrFirstInstallmentAmount cannot be null'); - } $this->container['installmentPaymentDataOptionItemNrFirstInstallmentAmount'] = $installmentPaymentDataOptionItemNrFirstInstallmentAmount; return $this; @@ -453,9 +444,6 @@ public function getInstallmentPaymentDataOptionItemNrInstallmentFee() */ public function setInstallmentPaymentDataOptionItemNrInstallmentFee($installmentPaymentDataOptionItemNrInstallmentFee) { - if (is_null($installmentPaymentDataOptionItemNrInstallmentFee)) { - throw new \InvalidArgumentException('non-nullable installmentPaymentDataOptionItemNrInstallmentFee cannot be null'); - } $this->container['installmentPaymentDataOptionItemNrInstallmentFee'] = $installmentPaymentDataOptionItemNrInstallmentFee; return $this; @@ -480,9 +468,6 @@ public function getInstallmentPaymentDataOptionItemNrInterestRate() */ public function setInstallmentPaymentDataOptionItemNrInterestRate($installmentPaymentDataOptionItemNrInterestRate) { - if (is_null($installmentPaymentDataOptionItemNrInterestRate)) { - throw new \InvalidArgumentException('non-nullable installmentPaymentDataOptionItemNrInterestRate cannot be null'); - } $this->container['installmentPaymentDataOptionItemNrInterestRate'] = $installmentPaymentDataOptionItemNrInterestRate; return $this; @@ -507,9 +492,6 @@ public function getInstallmentPaymentDataOptionItemNrMaximumNumberOfInstallments */ public function setInstallmentPaymentDataOptionItemNrMaximumNumberOfInstallments($installmentPaymentDataOptionItemNrMaximumNumberOfInstallments) { - if (is_null($installmentPaymentDataOptionItemNrMaximumNumberOfInstallments)) { - throw new \InvalidArgumentException('non-nullable installmentPaymentDataOptionItemNrMaximumNumberOfInstallments cannot be null'); - } $this->container['installmentPaymentDataOptionItemNrMaximumNumberOfInstallments'] = $installmentPaymentDataOptionItemNrMaximumNumberOfInstallments; return $this; @@ -534,9 +516,6 @@ public function getInstallmentPaymentDataOptionItemNrMinimumNumberOfInstallments */ public function setInstallmentPaymentDataOptionItemNrMinimumNumberOfInstallments($installmentPaymentDataOptionItemNrMinimumNumberOfInstallments) { - if (is_null($installmentPaymentDataOptionItemNrMinimumNumberOfInstallments)) { - throw new \InvalidArgumentException('non-nullable installmentPaymentDataOptionItemNrMinimumNumberOfInstallments cannot be null'); - } $this->container['installmentPaymentDataOptionItemNrMinimumNumberOfInstallments'] = $installmentPaymentDataOptionItemNrMinimumNumberOfInstallments; return $this; @@ -561,9 +540,6 @@ public function getInstallmentPaymentDataOptionItemNrNumberOfInstallments() */ public function setInstallmentPaymentDataOptionItemNrNumberOfInstallments($installmentPaymentDataOptionItemNrNumberOfInstallments) { - if (is_null($installmentPaymentDataOptionItemNrNumberOfInstallments)) { - throw new \InvalidArgumentException('non-nullable installmentPaymentDataOptionItemNrNumberOfInstallments cannot be null'); - } $this->container['installmentPaymentDataOptionItemNrNumberOfInstallments'] = $installmentPaymentDataOptionItemNrNumberOfInstallments; return $this; @@ -588,9 +564,6 @@ public function getInstallmentPaymentDataOptionItemNrSubsequentInstallmentAmount */ public function setInstallmentPaymentDataOptionItemNrSubsequentInstallmentAmount($installmentPaymentDataOptionItemNrSubsequentInstallmentAmount) { - if (is_null($installmentPaymentDataOptionItemNrSubsequentInstallmentAmount)) { - throw new \InvalidArgumentException('non-nullable installmentPaymentDataOptionItemNrSubsequentInstallmentAmount cannot be null'); - } $this->container['installmentPaymentDataOptionItemNrSubsequentInstallmentAmount'] = $installmentPaymentDataOptionItemNrSubsequentInstallmentAmount; return $this; @@ -615,9 +588,6 @@ public function getInstallmentPaymentDataOptionItemNrTotalAmountDue() */ public function setInstallmentPaymentDataOptionItemNrTotalAmountDue($installmentPaymentDataOptionItemNrTotalAmountDue) { - if (is_null($installmentPaymentDataOptionItemNrTotalAmountDue)) { - throw new \InvalidArgumentException('non-nullable installmentPaymentDataOptionItemNrTotalAmountDue cannot be null'); - } $this->container['installmentPaymentDataOptionItemNrTotalAmountDue'] = $installmentPaymentDataOptionItemNrTotalAmountDue; return $this; @@ -642,9 +612,6 @@ public function getInstallmentPaymentDataPaymentOptions() */ public function setInstallmentPaymentDataPaymentOptions($installmentPaymentDataPaymentOptions) { - if (is_null($installmentPaymentDataPaymentOptions)) { - throw new \InvalidArgumentException('non-nullable installmentPaymentDataPaymentOptions cannot be null'); - } $this->container['installmentPaymentDataPaymentOptions'] = $installmentPaymentDataPaymentOptions; return $this; @@ -669,9 +636,6 @@ public function getInstallmentsValue() */ public function setInstallmentsValue($installmentsValue) { - if (is_null($installmentsValue)) { - throw new \InvalidArgumentException('non-nullable installmentsValue cannot be null'); - } $this->container['installmentsValue'] = $installmentsValue; return $this; diff --git a/src/Adyen/Model/Payout/ResponseAdditionalDataNetworkTokens.php b/src/Adyen/Model/Payout/ResponseAdditionalDataNetworkTokens.php index 24746b7f3..99868e3d8 100644 --- a/src/Adyen/Model/Payout/ResponseAdditionalDataNetworkTokens.php +++ b/src/Adyen/Model/Payout/ResponseAdditionalDataNetworkTokens.php @@ -309,9 +309,6 @@ public function getNetworkTokenAvailable() */ public function setNetworkTokenAvailable($networkTokenAvailable) { - if (is_null($networkTokenAvailable)) { - throw new \InvalidArgumentException('non-nullable networkTokenAvailable cannot be null'); - } $this->container['networkTokenAvailable'] = $networkTokenAvailable; return $this; @@ -336,9 +333,6 @@ public function getNetworkTokenBin() */ public function setNetworkTokenBin($networkTokenBin) { - if (is_null($networkTokenBin)) { - throw new \InvalidArgumentException('non-nullable networkTokenBin cannot be null'); - } $this->container['networkTokenBin'] = $networkTokenBin; return $this; @@ -363,9 +357,6 @@ public function getNetworkTokenTokenSummary() */ public function setNetworkTokenTokenSummary($networkTokenTokenSummary) { - if (is_null($networkTokenTokenSummary)) { - throw new \InvalidArgumentException('non-nullable networkTokenTokenSummary cannot be null'); - } $this->container['networkTokenTokenSummary'] = $networkTokenTokenSummary; return $this; diff --git a/src/Adyen/Model/Payout/ResponseAdditionalDataOpi.php b/src/Adyen/Model/Payout/ResponseAdditionalDataOpi.php index a485a6a07..7eab74318 100644 --- a/src/Adyen/Model/Payout/ResponseAdditionalDataOpi.php +++ b/src/Adyen/Model/Payout/ResponseAdditionalDataOpi.php @@ -295,9 +295,6 @@ public function getOpiTransToken() */ public function setOpiTransToken($opiTransToken) { - if (is_null($opiTransToken)) { - throw new \InvalidArgumentException('non-nullable opiTransToken cannot be null'); - } $this->container['opiTransToken'] = $opiTransToken; return $this; diff --git a/src/Adyen/Model/Payout/ResponseAdditionalDataSepa.php b/src/Adyen/Model/Payout/ResponseAdditionalDataSepa.php index abef93caa..33e99a2c8 100644 --- a/src/Adyen/Model/Payout/ResponseAdditionalDataSepa.php +++ b/src/Adyen/Model/Payout/ResponseAdditionalDataSepa.php @@ -309,9 +309,6 @@ public function getSepadirectdebitDateOfSignature() */ public function setSepadirectdebitDateOfSignature($sepadirectdebitDateOfSignature) { - if (is_null($sepadirectdebitDateOfSignature)) { - throw new \InvalidArgumentException('non-nullable sepadirectdebitDateOfSignature cannot be null'); - } $this->container['sepadirectdebitDateOfSignature'] = $sepadirectdebitDateOfSignature; return $this; @@ -336,9 +333,6 @@ public function getSepadirectdebitMandateId() */ public function setSepadirectdebitMandateId($sepadirectdebitMandateId) { - if (is_null($sepadirectdebitMandateId)) { - throw new \InvalidArgumentException('non-nullable sepadirectdebitMandateId cannot be null'); - } $this->container['sepadirectdebitMandateId'] = $sepadirectdebitMandateId; return $this; @@ -363,9 +357,6 @@ public function getSepadirectdebitSequenceType() */ public function setSepadirectdebitSequenceType($sepadirectdebitSequenceType) { - if (is_null($sepadirectdebitSequenceType)) { - throw new \InvalidArgumentException('non-nullable sepadirectdebitSequenceType cannot be null'); - } $this->container['sepadirectdebitSequenceType'] = $sepadirectdebitSequenceType; return $this; diff --git a/src/Adyen/Model/Payout/ServiceError.php b/src/Adyen/Model/Payout/ServiceError.php index dcd1b6563..a1158c3b4 100644 --- a/src/Adyen/Model/Payout/ServiceError.php +++ b/src/Adyen/Model/Payout/ServiceError.php @@ -330,9 +330,6 @@ public function getAdditionalData() */ public function setAdditionalData($additionalData) { - if (is_null($additionalData)) { - throw new \InvalidArgumentException('non-nullable additionalData cannot be null'); - } $this->container['additionalData'] = $additionalData; return $this; @@ -357,9 +354,6 @@ public function getErrorCode() */ public function setErrorCode($errorCode) { - if (is_null($errorCode)) { - throw new \InvalidArgumentException('non-nullable errorCode cannot be null'); - } $this->container['errorCode'] = $errorCode; return $this; @@ -384,9 +378,6 @@ public function getErrorType() */ public function setErrorType($errorType) { - if (is_null($errorType)) { - throw new \InvalidArgumentException('non-nullable errorType cannot be null'); - } $this->container['errorType'] = $errorType; return $this; @@ -411,9 +402,6 @@ public function getMessage() */ public function setMessage($message) { - if (is_null($message)) { - throw new \InvalidArgumentException('non-nullable message cannot be null'); - } $this->container['message'] = $message; return $this; @@ -438,9 +426,6 @@ public function getPspReference() */ public function setPspReference($pspReference) { - if (is_null($pspReference)) { - throw new \InvalidArgumentException('non-nullable pspReference cannot be null'); - } $this->container['pspReference'] = $pspReference; return $this; @@ -465,7 +450,6 @@ public function getStatus() */ public function setStatus($status) { - // Do nothing for nullable integers $this->container['status'] = $status; return $this; diff --git a/src/Adyen/Model/Payout/StoreDetailAndSubmitRequest.php b/src/Adyen/Model/Payout/StoreDetailAndSubmitRequest.php index 49b2254f3..02626cf6d 100644 --- a/src/Adyen/Model/Payout/StoreDetailAndSubmitRequest.php +++ b/src/Adyen/Model/Payout/StoreDetailAndSubmitRequest.php @@ -471,9 +471,6 @@ public function getAdditionalData() */ public function setAdditionalData($additionalData) { - if (is_null($additionalData)) { - throw new \InvalidArgumentException('non-nullable additionalData cannot be null'); - } $this->container['additionalData'] = $additionalData; return $this; @@ -498,9 +495,6 @@ public function getAmount() */ public function setAmount($amount) { - if (is_null($amount)) { - throw new \InvalidArgumentException('non-nullable amount cannot be null'); - } $this->container['amount'] = $amount; return $this; @@ -525,9 +519,6 @@ public function getBank() */ public function setBank($bank) { - if (is_null($bank)) { - throw new \InvalidArgumentException('non-nullable bank cannot be null'); - } $this->container['bank'] = $bank; return $this; @@ -552,9 +543,6 @@ public function getBillingAddress() */ public function setBillingAddress($billingAddress) { - if (is_null($billingAddress)) { - throw new \InvalidArgumentException('non-nullable billingAddress cannot be null'); - } $this->container['billingAddress'] = $billingAddress; return $this; @@ -579,9 +567,6 @@ public function getCard() */ public function setCard($card) { - if (is_null($card)) { - throw new \InvalidArgumentException('non-nullable card cannot be null'); - } $this->container['card'] = $card; return $this; @@ -606,9 +591,6 @@ public function getDateOfBirth() */ public function setDateOfBirth($dateOfBirth) { - if (is_null($dateOfBirth)) { - throw new \InvalidArgumentException('non-nullable dateOfBirth cannot be null'); - } $this->container['dateOfBirth'] = $dateOfBirth; return $this; @@ -633,9 +615,6 @@ public function getEntityType() */ 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( @@ -670,7 +649,6 @@ public function getFraudOffset() */ public function setFraudOffset($fraudOffset) { - // Do nothing for nullable integers $this->container['fraudOffset'] = $fraudOffset; return $this; @@ -695,9 +673,6 @@ public function getMerchantAccount() */ public function setMerchantAccount($merchantAccount) { - if (is_null($merchantAccount)) { - throw new \InvalidArgumentException('non-nullable merchantAccount cannot be null'); - } $this->container['merchantAccount'] = $merchantAccount; return $this; @@ -722,9 +697,6 @@ public function getNationality() */ public function setNationality($nationality) { - if (is_null($nationality)) { - throw new \InvalidArgumentException('non-nullable nationality cannot be null'); - } $this->container['nationality'] = $nationality; return $this; @@ -749,9 +721,6 @@ public function getRecurring() */ public function setRecurring($recurring) { - if (is_null($recurring)) { - throw new \InvalidArgumentException('non-nullable recurring cannot be null'); - } $this->container['recurring'] = $recurring; return $this; @@ -776,9 +745,6 @@ public function getReference() */ public function setReference($reference) { - if (is_null($reference)) { - throw new \InvalidArgumentException('non-nullable reference cannot be null'); - } $this->container['reference'] = $reference; return $this; @@ -803,9 +769,6 @@ public function getSelectedBrand() */ public function setSelectedBrand($selectedBrand) { - if (is_null($selectedBrand)) { - throw new \InvalidArgumentException('non-nullable selectedBrand cannot be null'); - } $this->container['selectedBrand'] = $selectedBrand; return $this; @@ -830,9 +793,6 @@ public function getShopperEmail() */ public function setShopperEmail($shopperEmail) { - if (is_null($shopperEmail)) { - throw new \InvalidArgumentException('non-nullable shopperEmail cannot be null'); - } $this->container['shopperEmail'] = $shopperEmail; return $this; @@ -857,9 +817,6 @@ public function getShopperName() */ public function setShopperName($shopperName) { - if (is_null($shopperName)) { - throw new \InvalidArgumentException('non-nullable shopperName cannot be null'); - } $this->container['shopperName'] = $shopperName; return $this; @@ -884,9 +841,6 @@ public function getShopperReference() */ public function setShopperReference($shopperReference) { - if (is_null($shopperReference)) { - throw new \InvalidArgumentException('non-nullable shopperReference cannot be null'); - } $this->container['shopperReference'] = $shopperReference; return $this; @@ -911,9 +865,6 @@ public function getShopperStatement() */ public function setShopperStatement($shopperStatement) { - if (is_null($shopperStatement)) { - throw new \InvalidArgumentException('non-nullable shopperStatement cannot be null'); - } $this->container['shopperStatement'] = $shopperStatement; return $this; @@ -938,9 +889,6 @@ public function getSocialSecurityNumber() */ public function setSocialSecurityNumber($socialSecurityNumber) { - if (is_null($socialSecurityNumber)) { - throw new \InvalidArgumentException('non-nullable socialSecurityNumber cannot be null'); - } $this->container['socialSecurityNumber'] = $socialSecurityNumber; return $this; @@ -965,9 +913,6 @@ public function getTelephoneNumber() */ public function setTelephoneNumber($telephoneNumber) { - if (is_null($telephoneNumber)) { - throw new \InvalidArgumentException('non-nullable telephoneNumber cannot be null'); - } $this->container['telephoneNumber'] = $telephoneNumber; return $this; diff --git a/src/Adyen/Model/Payout/StoreDetailAndSubmitResponse.php b/src/Adyen/Model/Payout/StoreDetailAndSubmitResponse.php index 0463b0ef8..f61ca2e4b 100644 --- a/src/Adyen/Model/Payout/StoreDetailAndSubmitResponse.php +++ b/src/Adyen/Model/Payout/StoreDetailAndSubmitResponse.php @@ -322,9 +322,6 @@ public function getAdditionalData() */ public function setAdditionalData($additionalData) { - if (is_null($additionalData)) { - throw new \InvalidArgumentException('non-nullable additionalData cannot be null'); - } $this->container['additionalData'] = $additionalData; return $this; @@ -349,9 +346,6 @@ public function getPspReference() */ public function setPspReference($pspReference) { - if (is_null($pspReference)) { - throw new \InvalidArgumentException('non-nullable pspReference cannot be null'); - } $this->container['pspReference'] = $pspReference; return $this; @@ -376,9 +370,6 @@ public function getRefusalReason() */ public function setRefusalReason($refusalReason) { - if (is_null($refusalReason)) { - throw new \InvalidArgumentException('non-nullable refusalReason cannot be null'); - } $this->container['refusalReason'] = $refusalReason; return $this; @@ -403,9 +394,6 @@ public function getResultCode() */ public function setResultCode($resultCode) { - if (is_null($resultCode)) { - throw new \InvalidArgumentException('non-nullable resultCode cannot be null'); - } $this->container['resultCode'] = $resultCode; return $this; diff --git a/src/Adyen/Model/Payout/StoreDetailRequest.php b/src/Adyen/Model/Payout/StoreDetailRequest.php index d69970666..65d4d9f5b 100644 --- a/src/Adyen/Model/Payout/StoreDetailRequest.php +++ b/src/Adyen/Model/Payout/StoreDetailRequest.php @@ -444,9 +444,6 @@ public function getAdditionalData() */ public function setAdditionalData($additionalData) { - if (is_null($additionalData)) { - throw new \InvalidArgumentException('non-nullable additionalData cannot be null'); - } $this->container['additionalData'] = $additionalData; return $this; @@ -471,9 +468,6 @@ public function getBank() */ public function setBank($bank) { - if (is_null($bank)) { - throw new \InvalidArgumentException('non-nullable bank cannot be null'); - } $this->container['bank'] = $bank; return $this; @@ -498,9 +492,6 @@ public function getBillingAddress() */ public function setBillingAddress($billingAddress) { - if (is_null($billingAddress)) { - throw new \InvalidArgumentException('non-nullable billingAddress cannot be null'); - } $this->container['billingAddress'] = $billingAddress; return $this; @@ -525,9 +516,6 @@ public function getCard() */ public function setCard($card) { - if (is_null($card)) { - throw new \InvalidArgumentException('non-nullable card cannot be null'); - } $this->container['card'] = $card; return $this; @@ -552,9 +540,6 @@ public function getDateOfBirth() */ public function setDateOfBirth($dateOfBirth) { - if (is_null($dateOfBirth)) { - throw new \InvalidArgumentException('non-nullable dateOfBirth cannot be null'); - } $this->container['dateOfBirth'] = $dateOfBirth; return $this; @@ -579,9 +564,6 @@ public function getEntityType() */ 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( @@ -616,7 +598,6 @@ public function getFraudOffset() */ public function setFraudOffset($fraudOffset) { - // Do nothing for nullable integers $this->container['fraudOffset'] = $fraudOffset; return $this; @@ -641,9 +622,6 @@ public function getMerchantAccount() */ public function setMerchantAccount($merchantAccount) { - if (is_null($merchantAccount)) { - throw new \InvalidArgumentException('non-nullable merchantAccount cannot be null'); - } $this->container['merchantAccount'] = $merchantAccount; return $this; @@ -668,9 +646,6 @@ public function getNationality() */ public function setNationality($nationality) { - if (is_null($nationality)) { - throw new \InvalidArgumentException('non-nullable nationality cannot be null'); - } $this->container['nationality'] = $nationality; return $this; @@ -695,9 +670,6 @@ public function getRecurring() */ public function setRecurring($recurring) { - if (is_null($recurring)) { - throw new \InvalidArgumentException('non-nullable recurring cannot be null'); - } $this->container['recurring'] = $recurring; return $this; @@ -722,9 +694,6 @@ public function getSelectedBrand() */ public function setSelectedBrand($selectedBrand) { - if (is_null($selectedBrand)) { - throw new \InvalidArgumentException('non-nullable selectedBrand cannot be null'); - } $this->container['selectedBrand'] = $selectedBrand; return $this; @@ -749,9 +718,6 @@ public function getShopperEmail() */ public function setShopperEmail($shopperEmail) { - if (is_null($shopperEmail)) { - throw new \InvalidArgumentException('non-nullable shopperEmail cannot be null'); - } $this->container['shopperEmail'] = $shopperEmail; return $this; @@ -776,9 +742,6 @@ public function getShopperName() */ public function setShopperName($shopperName) { - if (is_null($shopperName)) { - throw new \InvalidArgumentException('non-nullable shopperName cannot be null'); - } $this->container['shopperName'] = $shopperName; return $this; @@ -803,9 +766,6 @@ public function getShopperReference() */ public function setShopperReference($shopperReference) { - if (is_null($shopperReference)) { - throw new \InvalidArgumentException('non-nullable shopperReference cannot be null'); - } $this->container['shopperReference'] = $shopperReference; return $this; @@ -830,9 +790,6 @@ public function getSocialSecurityNumber() */ public function setSocialSecurityNumber($socialSecurityNumber) { - if (is_null($socialSecurityNumber)) { - throw new \InvalidArgumentException('non-nullable socialSecurityNumber cannot be null'); - } $this->container['socialSecurityNumber'] = $socialSecurityNumber; return $this; @@ -857,9 +814,6 @@ public function getTelephoneNumber() */ public function setTelephoneNumber($telephoneNumber) { - if (is_null($telephoneNumber)) { - throw new \InvalidArgumentException('non-nullable telephoneNumber cannot be null'); - } $this->container['telephoneNumber'] = $telephoneNumber; return $this; diff --git a/src/Adyen/Model/Payout/StoreDetailResponse.php b/src/Adyen/Model/Payout/StoreDetailResponse.php index 21f08f036..9001492f2 100644 --- a/src/Adyen/Model/Payout/StoreDetailResponse.php +++ b/src/Adyen/Model/Payout/StoreDetailResponse.php @@ -325,9 +325,6 @@ public function getAdditionalData() */ public function setAdditionalData($additionalData) { - if (is_null($additionalData)) { - throw new \InvalidArgumentException('non-nullable additionalData cannot be null'); - } $this->container['additionalData'] = $additionalData; return $this; @@ -352,9 +349,6 @@ public function getPspReference() */ public function setPspReference($pspReference) { - if (is_null($pspReference)) { - throw new \InvalidArgumentException('non-nullable pspReference cannot be null'); - } $this->container['pspReference'] = $pspReference; return $this; @@ -379,9 +373,6 @@ public function getRecurringDetailReference() */ public function setRecurringDetailReference($recurringDetailReference) { - if (is_null($recurringDetailReference)) { - throw new \InvalidArgumentException('non-nullable recurringDetailReference cannot be null'); - } $this->container['recurringDetailReference'] = $recurringDetailReference; return $this; @@ -406,9 +397,6 @@ public function getResultCode() */ public function setResultCode($resultCode) { - if (is_null($resultCode)) { - throw new \InvalidArgumentException('non-nullable resultCode cannot be null'); - } $this->container['resultCode'] = $resultCode; return $this; diff --git a/src/Adyen/Model/Payout/SubmitRequest.php b/src/Adyen/Model/Payout/SubmitRequest.php index 4003130ad..59f09ded8 100644 --- a/src/Adyen/Model/Payout/SubmitRequest.php +++ b/src/Adyen/Model/Payout/SubmitRequest.php @@ -437,9 +437,6 @@ public function getAdditionalData() */ public function setAdditionalData($additionalData) { - if (is_null($additionalData)) { - throw new \InvalidArgumentException('non-nullable additionalData cannot be null'); - } $this->container['additionalData'] = $additionalData; return $this; @@ -464,9 +461,6 @@ public function getAmount() */ public function setAmount($amount) { - if (is_null($amount)) { - throw new \InvalidArgumentException('non-nullable amount cannot be null'); - } $this->container['amount'] = $amount; return $this; @@ -491,9 +485,6 @@ public function getDateOfBirth() */ public function setDateOfBirth($dateOfBirth) { - if (is_null($dateOfBirth)) { - throw new \InvalidArgumentException('non-nullable dateOfBirth cannot be null'); - } $this->container['dateOfBirth'] = $dateOfBirth; return $this; @@ -518,9 +509,6 @@ public function getEntityType() */ 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( @@ -555,7 +543,6 @@ public function getFraudOffset() */ public function setFraudOffset($fraudOffset) { - // Do nothing for nullable integers $this->container['fraudOffset'] = $fraudOffset; return $this; @@ -580,9 +567,6 @@ public function getMerchantAccount() */ public function setMerchantAccount($merchantAccount) { - if (is_null($merchantAccount)) { - throw new \InvalidArgumentException('non-nullable merchantAccount cannot be null'); - } $this->container['merchantAccount'] = $merchantAccount; return $this; @@ -607,9 +591,6 @@ public function getNationality() */ public function setNationality($nationality) { - if (is_null($nationality)) { - throw new \InvalidArgumentException('non-nullable nationality cannot be null'); - } $this->container['nationality'] = $nationality; return $this; @@ -634,9 +615,6 @@ public function getRecurring() */ public function setRecurring($recurring) { - if (is_null($recurring)) { - throw new \InvalidArgumentException('non-nullable recurring cannot be null'); - } $this->container['recurring'] = $recurring; return $this; @@ -661,9 +639,6 @@ public function getReference() */ public function setReference($reference) { - if (is_null($reference)) { - throw new \InvalidArgumentException('non-nullable reference cannot be null'); - } $this->container['reference'] = $reference; return $this; @@ -688,9 +663,6 @@ public function getSelectedRecurringDetailReference() */ public function setSelectedRecurringDetailReference($selectedRecurringDetailReference) { - if (is_null($selectedRecurringDetailReference)) { - throw new \InvalidArgumentException('non-nullable selectedRecurringDetailReference cannot be null'); - } $this->container['selectedRecurringDetailReference'] = $selectedRecurringDetailReference; return $this; @@ -715,9 +687,6 @@ public function getShopperEmail() */ public function setShopperEmail($shopperEmail) { - if (is_null($shopperEmail)) { - throw new \InvalidArgumentException('non-nullable shopperEmail cannot be null'); - } $this->container['shopperEmail'] = $shopperEmail; return $this; @@ -742,9 +711,6 @@ public function getShopperName() */ public function setShopperName($shopperName) { - if (is_null($shopperName)) { - throw new \InvalidArgumentException('non-nullable shopperName cannot be null'); - } $this->container['shopperName'] = $shopperName; return $this; @@ -769,9 +735,6 @@ public function getShopperReference() */ public function setShopperReference($shopperReference) { - if (is_null($shopperReference)) { - throw new \InvalidArgumentException('non-nullable shopperReference cannot be null'); - } $this->container['shopperReference'] = $shopperReference; return $this; @@ -796,9 +759,6 @@ public function getShopperStatement() */ public function setShopperStatement($shopperStatement) { - if (is_null($shopperStatement)) { - throw new \InvalidArgumentException('non-nullable shopperStatement cannot be null'); - } $this->container['shopperStatement'] = $shopperStatement; return $this; @@ -823,9 +783,6 @@ public function getSocialSecurityNumber() */ public function setSocialSecurityNumber($socialSecurityNumber) { - if (is_null($socialSecurityNumber)) { - throw new \InvalidArgumentException('non-nullable socialSecurityNumber cannot be null'); - } $this->container['socialSecurityNumber'] = $socialSecurityNumber; return $this; diff --git a/src/Adyen/Model/Payout/SubmitResponse.php b/src/Adyen/Model/Payout/SubmitResponse.php index 558c31d09..1e1669dcc 100644 --- a/src/Adyen/Model/Payout/SubmitResponse.php +++ b/src/Adyen/Model/Payout/SubmitResponse.php @@ -322,9 +322,6 @@ public function getAdditionalData() */ public function setAdditionalData($additionalData) { - if (is_null($additionalData)) { - throw new \InvalidArgumentException('non-nullable additionalData cannot be null'); - } $this->container['additionalData'] = $additionalData; return $this; @@ -349,9 +346,6 @@ public function getPspReference() */ public function setPspReference($pspReference) { - if (is_null($pspReference)) { - throw new \InvalidArgumentException('non-nullable pspReference cannot be null'); - } $this->container['pspReference'] = $pspReference; return $this; @@ -376,9 +370,6 @@ public function getRefusalReason() */ public function setRefusalReason($refusalReason) { - if (is_null($refusalReason)) { - throw new \InvalidArgumentException('non-nullable refusalReason cannot be null'); - } $this->container['refusalReason'] = $refusalReason; return $this; @@ -403,9 +394,6 @@ public function getResultCode() */ public function setResultCode($resultCode) { - if (is_null($resultCode)) { - throw new \InvalidArgumentException('non-nullable resultCode cannot be null'); - } $this->container['resultCode'] = $resultCode; return $this; diff --git a/src/Adyen/Model/PosMobile/CreateSessionRequest.php b/src/Adyen/Model/PosMobile/CreateSessionRequest.php index ad42f517e..6646bb562 100644 --- a/src/Adyen/Model/PosMobile/CreateSessionRequest.php +++ b/src/Adyen/Model/PosMobile/CreateSessionRequest.php @@ -315,9 +315,6 @@ public function getMerchantAccount() */ public function setMerchantAccount($merchantAccount) { - if (is_null($merchantAccount)) { - throw new \InvalidArgumentException('non-nullable merchantAccount cannot be null'); - } $this->container['merchantAccount'] = $merchantAccount; return $this; @@ -342,9 +339,6 @@ public function getSetupToken() */ public function setSetupToken($setupToken) { - if (is_null($setupToken)) { - throw new \InvalidArgumentException('non-nullable setupToken cannot be null'); - } $this->container['setupToken'] = $setupToken; return $this; @@ -369,9 +363,6 @@ public function getStore() */ public function setStore($store) { - if (is_null($store)) { - throw new \InvalidArgumentException('non-nullable store cannot be null'); - } $this->container['store'] = $store; return $this; diff --git a/src/Adyen/Model/PosMobile/CreateSessionResponse.php b/src/Adyen/Model/PosMobile/CreateSessionResponse.php index d08190994..16c6b075d 100644 --- a/src/Adyen/Model/PosMobile/CreateSessionResponse.php +++ b/src/Adyen/Model/PosMobile/CreateSessionResponse.php @@ -323,9 +323,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -350,9 +347,6 @@ public function getInstallationId() */ public function setInstallationId($installationId) { - if (is_null($installationId)) { - throw new \InvalidArgumentException('non-nullable installationId cannot be null'); - } $this->container['installationId'] = $installationId; return $this; @@ -377,9 +371,6 @@ public function getMerchantAccount() */ public function setMerchantAccount($merchantAccount) { - if (is_null($merchantAccount)) { - throw new \InvalidArgumentException('non-nullable merchantAccount cannot be null'); - } $this->container['merchantAccount'] = $merchantAccount; return $this; @@ -404,9 +395,6 @@ public function getSdkData() */ public function setSdkData($sdkData) { - if (is_null($sdkData)) { - throw new \InvalidArgumentException('non-nullable sdkData cannot be null'); - } $this->container['sdkData'] = $sdkData; return $this; @@ -431,9 +419,6 @@ public function getStore() */ public function setStore($store) { - if (is_null($store)) { - throw new \InvalidArgumentException('non-nullable store cannot be null'); - } $this->container['store'] = $store; return $this; diff --git a/src/Adyen/Model/PosMobile/ObjectSerializer.php b/src/Adyen/Model/PosMobile/ObjectSerializer.php index ae87baef9..ba0e91ceb 100644 --- a/src/Adyen/Model/PosMobile/ObjectSerializer.php +++ b/src/Adyen/Model/PosMobile/ObjectSerializer.php @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach ($data as $property => $value) { + foreach($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) { - return $timestamp; - } + if (!is_string($timestamp)) return $timestamp; return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/Recurring/Address.php b/src/Adyen/Model/Recurring/Address.php index 96b8a65ac..8babd3633 100644 --- a/src/Adyen/Model/Recurring/Address.php +++ b/src/Adyen/Model/Recurring/Address.php @@ -345,9 +345,6 @@ public function getCity() */ public function setCity($city) { - if (is_null($city)) { - throw new \InvalidArgumentException('non-nullable city cannot be null'); - } $this->container['city'] = $city; return $this; @@ -372,9 +369,6 @@ public function getCountry() */ public function setCountry($country) { - if (is_null($country)) { - throw new \InvalidArgumentException('non-nullable country cannot be null'); - } $this->container['country'] = $country; return $this; @@ -399,9 +393,6 @@ public function getHouseNumberOrName() */ public function setHouseNumberOrName($houseNumberOrName) { - if (is_null($houseNumberOrName)) { - throw new \InvalidArgumentException('non-nullable houseNumberOrName cannot be null'); - } $this->container['houseNumberOrName'] = $houseNumberOrName; return $this; @@ -426,9 +417,6 @@ public function getPostalCode() */ public function setPostalCode($postalCode) { - if (is_null($postalCode)) { - throw new \InvalidArgumentException('non-nullable postalCode cannot be null'); - } $this->container['postalCode'] = $postalCode; return $this; @@ -453,9 +441,6 @@ public function getStateOrProvince() */ public function setStateOrProvince($stateOrProvince) { - if (is_null($stateOrProvince)) { - throw new \InvalidArgumentException('non-nullable stateOrProvince cannot be null'); - } $this->container['stateOrProvince'] = $stateOrProvince; return $this; @@ -480,9 +465,6 @@ public function getStreet() */ public function setStreet($street) { - if (is_null($street)) { - throw new \InvalidArgumentException('non-nullable street cannot be null'); - } $this->container['street'] = $street; return $this; diff --git a/src/Adyen/Model/Recurring/Amount.php b/src/Adyen/Model/Recurring/Amount.php index dd2c4a906..2816ba55f 100644 --- a/src/Adyen/Model/Recurring/Amount.php +++ b/src/Adyen/Model/Recurring/Amount.php @@ -308,9 +308,6 @@ public function getCurrency() */ public function setCurrency($currency) { - if (is_null($currency)) { - throw new \InvalidArgumentException('non-nullable currency cannot be null'); - } $this->container['currency'] = $currency; return $this; @@ -335,9 +332,6 @@ public function getValue() */ public function setValue($value) { - if (is_null($value)) { - throw new \InvalidArgumentException('non-nullable value cannot be null'); - } $this->container['value'] = $value; return $this; diff --git a/src/Adyen/Model/Recurring/BankAccount.php b/src/Adyen/Model/Recurring/BankAccount.php index 1eaef0c73..73e56f0f1 100644 --- a/src/Adyen/Model/Recurring/BankAccount.php +++ b/src/Adyen/Model/Recurring/BankAccount.php @@ -351,9 +351,6 @@ public function getBankAccountNumber() */ public function setBankAccountNumber($bankAccountNumber) { - if (is_null($bankAccountNumber)) { - throw new \InvalidArgumentException('non-nullable bankAccountNumber cannot be null'); - } $this->container['bankAccountNumber'] = $bankAccountNumber; return $this; @@ -378,9 +375,6 @@ public function getBankCity() */ public function setBankCity($bankCity) { - if (is_null($bankCity)) { - throw new \InvalidArgumentException('non-nullable bankCity cannot be null'); - } $this->container['bankCity'] = $bankCity; return $this; @@ -405,9 +399,6 @@ public function getBankLocationId() */ public function setBankLocationId($bankLocationId) { - if (is_null($bankLocationId)) { - throw new \InvalidArgumentException('non-nullable bankLocationId cannot be null'); - } $this->container['bankLocationId'] = $bankLocationId; return $this; @@ -432,9 +423,6 @@ public function getBankName() */ public function setBankName($bankName) { - if (is_null($bankName)) { - throw new \InvalidArgumentException('non-nullable bankName cannot be null'); - } $this->container['bankName'] = $bankName; return $this; @@ -459,9 +447,6 @@ public function getBic() */ public function setBic($bic) { - if (is_null($bic)) { - throw new \InvalidArgumentException('non-nullable bic cannot be null'); - } $this->container['bic'] = $bic; return $this; @@ -486,9 +471,6 @@ public function getCountryCode() */ public function setCountryCode($countryCode) { - if (is_null($countryCode)) { - throw new \InvalidArgumentException('non-nullable countryCode cannot be null'); - } $this->container['countryCode'] = $countryCode; return $this; @@ -513,9 +495,6 @@ public function getIban() */ public function setIban($iban) { - if (is_null($iban)) { - throw new \InvalidArgumentException('non-nullable iban cannot be null'); - } $this->container['iban'] = $iban; return $this; @@ -540,9 +519,6 @@ public function getOwnerName() */ public function setOwnerName($ownerName) { - if (is_null($ownerName)) { - throw new \InvalidArgumentException('non-nullable ownerName cannot be null'); - } $this->container['ownerName'] = $ownerName; return $this; @@ -567,9 +543,6 @@ public function getTaxId() */ public function setTaxId($taxId) { - if (is_null($taxId)) { - throw new \InvalidArgumentException('non-nullable taxId cannot be null'); - } $this->container['taxId'] = $taxId; return $this; diff --git a/src/Adyen/Model/Recurring/Card.php b/src/Adyen/Model/Recurring/Card.php index 16abe5022..64bfb26ec 100644 --- a/src/Adyen/Model/Recurring/Card.php +++ b/src/Adyen/Model/Recurring/Card.php @@ -344,9 +344,6 @@ public function getCvc() */ public function setCvc($cvc) { - if (is_null($cvc)) { - throw new \InvalidArgumentException('non-nullable cvc cannot be null'); - } $this->container['cvc'] = $cvc; return $this; @@ -371,9 +368,6 @@ public function getExpiryMonth() */ public function setExpiryMonth($expiryMonth) { - if (is_null($expiryMonth)) { - throw new \InvalidArgumentException('non-nullable expiryMonth cannot be null'); - } $this->container['expiryMonth'] = $expiryMonth; return $this; @@ -398,9 +392,6 @@ public function getExpiryYear() */ public function setExpiryYear($expiryYear) { - if (is_null($expiryYear)) { - throw new \InvalidArgumentException('non-nullable expiryYear cannot be null'); - } $this->container['expiryYear'] = $expiryYear; return $this; @@ -425,9 +416,6 @@ public function getHolderName() */ public function setHolderName($holderName) { - if (is_null($holderName)) { - throw new \InvalidArgumentException('non-nullable holderName cannot be null'); - } $this->container['holderName'] = $holderName; return $this; @@ -452,9 +440,6 @@ public function getIssueNumber() */ public function setIssueNumber($issueNumber) { - if (is_null($issueNumber)) { - throw new \InvalidArgumentException('non-nullable issueNumber cannot be null'); - } $this->container['issueNumber'] = $issueNumber; return $this; @@ -479,9 +464,6 @@ public function getNumber() */ public function setNumber($number) { - if (is_null($number)) { - throw new \InvalidArgumentException('non-nullable number cannot be null'); - } $this->container['number'] = $number; return $this; @@ -506,9 +488,6 @@ public function getStartMonth() */ public function setStartMonth($startMonth) { - if (is_null($startMonth)) { - throw new \InvalidArgumentException('non-nullable startMonth cannot be null'); - } $this->container['startMonth'] = $startMonth; return $this; @@ -533,9 +512,6 @@ public function getStartYear() */ public function setStartYear($startYear) { - if (is_null($startYear)) { - throw new \InvalidArgumentException('non-nullable startYear cannot be null'); - } $this->container['startYear'] = $startYear; return $this; diff --git a/src/Adyen/Model/Recurring/CreatePermitRequest.php b/src/Adyen/Model/Recurring/CreatePermitRequest.php index e5d66d717..b83a9b390 100644 --- a/src/Adyen/Model/Recurring/CreatePermitRequest.php +++ b/src/Adyen/Model/Recurring/CreatePermitRequest.php @@ -328,9 +328,6 @@ public function getMerchantAccount() */ public function setMerchantAccount($merchantAccount) { - if (is_null($merchantAccount)) { - throw new \InvalidArgumentException('non-nullable merchantAccount cannot be null'); - } $this->container['merchantAccount'] = $merchantAccount; return $this; @@ -355,9 +352,6 @@ public function getPermits() */ public function setPermits($permits) { - if (is_null($permits)) { - throw new \InvalidArgumentException('non-nullable permits cannot be null'); - } $this->container['permits'] = $permits; return $this; @@ -382,9 +376,6 @@ public function getRecurringDetailReference() */ public function setRecurringDetailReference($recurringDetailReference) { - if (is_null($recurringDetailReference)) { - throw new \InvalidArgumentException('non-nullable recurringDetailReference cannot be null'); - } $this->container['recurringDetailReference'] = $recurringDetailReference; return $this; @@ -409,9 +400,6 @@ public function getShopperReference() */ public function setShopperReference($shopperReference) { - if (is_null($shopperReference)) { - throw new \InvalidArgumentException('non-nullable shopperReference cannot be null'); - } $this->container['shopperReference'] = $shopperReference; return $this; diff --git a/src/Adyen/Model/Recurring/CreatePermitResult.php b/src/Adyen/Model/Recurring/CreatePermitResult.php index 546361279..9e7eefdca 100644 --- a/src/Adyen/Model/Recurring/CreatePermitResult.php +++ b/src/Adyen/Model/Recurring/CreatePermitResult.php @@ -302,9 +302,6 @@ public function getPermitResultList() */ public function setPermitResultList($permitResultList) { - if (is_null($permitResultList)) { - throw new \InvalidArgumentException('non-nullable permitResultList cannot be null'); - } $this->container['permitResultList'] = $permitResultList; return $this; @@ -329,9 +326,6 @@ public function getPspReference() */ public function setPspReference($pspReference) { - if (is_null($pspReference)) { - throw new \InvalidArgumentException('non-nullable pspReference cannot be null'); - } $this->container['pspReference'] = $pspReference; return $this; diff --git a/src/Adyen/Model/Recurring/DisablePermitRequest.php b/src/Adyen/Model/Recurring/DisablePermitRequest.php index c24e12248..cf41e0d9e 100644 --- a/src/Adyen/Model/Recurring/DisablePermitRequest.php +++ b/src/Adyen/Model/Recurring/DisablePermitRequest.php @@ -308,9 +308,6 @@ public function getMerchantAccount() */ public function setMerchantAccount($merchantAccount) { - if (is_null($merchantAccount)) { - throw new \InvalidArgumentException('non-nullable merchantAccount cannot be null'); - } $this->container['merchantAccount'] = $merchantAccount; return $this; @@ -335,9 +332,6 @@ public function getToken() */ public function setToken($token) { - if (is_null($token)) { - throw new \InvalidArgumentException('non-nullable token cannot be null'); - } $this->container['token'] = $token; return $this; diff --git a/src/Adyen/Model/Recurring/DisablePermitResult.php b/src/Adyen/Model/Recurring/DisablePermitResult.php index d986e5592..7e6da46fd 100644 --- a/src/Adyen/Model/Recurring/DisablePermitResult.php +++ b/src/Adyen/Model/Recurring/DisablePermitResult.php @@ -302,9 +302,6 @@ public function getPspReference() */ public function setPspReference($pspReference) { - if (is_null($pspReference)) { - throw new \InvalidArgumentException('non-nullable pspReference cannot be null'); - } $this->container['pspReference'] = $pspReference; return $this; @@ -329,9 +326,6 @@ public function getStatus() */ public function setStatus($status) { - if (is_null($status)) { - throw new \InvalidArgumentException('non-nullable status cannot be null'); - } $this->container['status'] = $status; return $this; diff --git a/src/Adyen/Model/Recurring/DisableRequest.php b/src/Adyen/Model/Recurring/DisableRequest.php index b8a10047c..864871a02 100644 --- a/src/Adyen/Model/Recurring/DisableRequest.php +++ b/src/Adyen/Model/Recurring/DisableRequest.php @@ -322,9 +322,6 @@ public function getContract() */ public function setContract($contract) { - if (is_null($contract)) { - throw new \InvalidArgumentException('non-nullable contract cannot be null'); - } $this->container['contract'] = $contract; return $this; @@ -349,9 +346,6 @@ public function getMerchantAccount() */ public function setMerchantAccount($merchantAccount) { - if (is_null($merchantAccount)) { - throw new \InvalidArgumentException('non-nullable merchantAccount cannot be null'); - } $this->container['merchantAccount'] = $merchantAccount; return $this; @@ -376,9 +370,6 @@ public function getRecurringDetailReference() */ public function setRecurringDetailReference($recurringDetailReference) { - if (is_null($recurringDetailReference)) { - throw new \InvalidArgumentException('non-nullable recurringDetailReference cannot be null'); - } $this->container['recurringDetailReference'] = $recurringDetailReference; return $this; @@ -403,9 +394,6 @@ public function getShopperReference() */ public function setShopperReference($shopperReference) { - if (is_null($shopperReference)) { - throw new \InvalidArgumentException('non-nullable shopperReference cannot be null'); - } $this->container['shopperReference'] = $shopperReference; return $this; diff --git a/src/Adyen/Model/Recurring/DisableResult.php b/src/Adyen/Model/Recurring/DisableResult.php index 3e57403cb..6632aef94 100644 --- a/src/Adyen/Model/Recurring/DisableResult.php +++ b/src/Adyen/Model/Recurring/DisableResult.php @@ -295,9 +295,6 @@ public function getResponse() */ public function setResponse($response) { - if (is_null($response)) { - throw new \InvalidArgumentException('non-nullable response cannot be null'); - } $this->container['response'] = $response; return $this; diff --git a/src/Adyen/Model/Recurring/Name.php b/src/Adyen/Model/Recurring/Name.php index 351d8dbe6..bfa68b9c4 100644 --- a/src/Adyen/Model/Recurring/Name.php +++ b/src/Adyen/Model/Recurring/Name.php @@ -308,9 +308,6 @@ public function getFirstName() */ public function setFirstName($firstName) { - if (is_null($firstName)) { - throw new \InvalidArgumentException('non-nullable firstName cannot be null'); - } $this->container['firstName'] = $firstName; return $this; @@ -335,9 +332,6 @@ public function getLastName() */ public function setLastName($lastName) { - if (is_null($lastName)) { - throw new \InvalidArgumentException('non-nullable lastName cannot be null'); - } $this->container['lastName'] = $lastName; return $this; diff --git a/src/Adyen/Model/Recurring/NotifyShopperRequest.php b/src/Adyen/Model/Recurring/NotifyShopperRequest.php index eb6486326..f4fe18e34 100644 --- a/src/Adyen/Model/Recurring/NotifyShopperRequest.php +++ b/src/Adyen/Model/Recurring/NotifyShopperRequest.php @@ -363,9 +363,6 @@ public function getAmount() */ public function setAmount($amount) { - if (is_null($amount)) { - throw new \InvalidArgumentException('non-nullable amount cannot be null'); - } $this->container['amount'] = $amount; return $this; @@ -390,9 +387,6 @@ public function getBillingDate() */ public function setBillingDate($billingDate) { - if (is_null($billingDate)) { - throw new \InvalidArgumentException('non-nullable billingDate cannot be null'); - } $this->container['billingDate'] = $billingDate; return $this; @@ -417,9 +411,6 @@ public function getBillingSequenceNumber() */ public function setBillingSequenceNumber($billingSequenceNumber) { - if (is_null($billingSequenceNumber)) { - throw new \InvalidArgumentException('non-nullable billingSequenceNumber cannot be null'); - } $this->container['billingSequenceNumber'] = $billingSequenceNumber; return $this; @@ -444,9 +435,6 @@ public function getDisplayedReference() */ public function setDisplayedReference($displayedReference) { - if (is_null($displayedReference)) { - throw new \InvalidArgumentException('non-nullable displayedReference cannot be null'); - } $this->container['displayedReference'] = $displayedReference; return $this; @@ -471,9 +459,6 @@ public function getMerchantAccount() */ public function setMerchantAccount($merchantAccount) { - if (is_null($merchantAccount)) { - throw new \InvalidArgumentException('non-nullable merchantAccount cannot be null'); - } $this->container['merchantAccount'] = $merchantAccount; return $this; @@ -498,9 +483,6 @@ public function getRecurringDetailReference() */ public function setRecurringDetailReference($recurringDetailReference) { - if (is_null($recurringDetailReference)) { - throw new \InvalidArgumentException('non-nullable recurringDetailReference cannot be null'); - } $this->container['recurringDetailReference'] = $recurringDetailReference; return $this; @@ -525,9 +507,6 @@ public function getReference() */ public function setReference($reference) { - if (is_null($reference)) { - throw new \InvalidArgumentException('non-nullable reference cannot be null'); - } $this->container['reference'] = $reference; return $this; @@ -552,9 +531,6 @@ public function getShopperReference() */ public function setShopperReference($shopperReference) { - if (is_null($shopperReference)) { - throw new \InvalidArgumentException('non-nullable shopperReference cannot be null'); - } $this->container['shopperReference'] = $shopperReference; return $this; @@ -579,9 +555,6 @@ public function getStoredPaymentMethodId() */ public function setStoredPaymentMethodId($storedPaymentMethodId) { - if (is_null($storedPaymentMethodId)) { - throw new \InvalidArgumentException('non-nullable storedPaymentMethodId cannot be null'); - } $this->container['storedPaymentMethodId'] = $storedPaymentMethodId; return $this; diff --git a/src/Adyen/Model/Recurring/NotifyShopperResult.php b/src/Adyen/Model/Recurring/NotifyShopperResult.php index 11832fc27..0b92ffbaf 100644 --- a/src/Adyen/Model/Recurring/NotifyShopperResult.php +++ b/src/Adyen/Model/Recurring/NotifyShopperResult.php @@ -337,9 +337,6 @@ public function getDisplayedReference() */ public function setDisplayedReference($displayedReference) { - if (is_null($displayedReference)) { - throw new \InvalidArgumentException('non-nullable displayedReference cannot be null'); - } $this->container['displayedReference'] = $displayedReference; return $this; @@ -364,9 +361,6 @@ public function getMessage() */ public function setMessage($message) { - if (is_null($message)) { - throw new \InvalidArgumentException('non-nullable message cannot be null'); - } $this->container['message'] = $message; return $this; @@ -391,9 +385,6 @@ public function getPspReference() */ public function setPspReference($pspReference) { - if (is_null($pspReference)) { - throw new \InvalidArgumentException('non-nullable pspReference cannot be null'); - } $this->container['pspReference'] = $pspReference; return $this; @@ -418,9 +409,6 @@ public function getReference() */ public function setReference($reference) { - if (is_null($reference)) { - throw new \InvalidArgumentException('non-nullable reference cannot be null'); - } $this->container['reference'] = $reference; return $this; @@ -445,9 +433,6 @@ public function getResultCode() */ public function setResultCode($resultCode) { - if (is_null($resultCode)) { - throw new \InvalidArgumentException('non-nullable resultCode cannot be null'); - } $this->container['resultCode'] = $resultCode; return $this; @@ -472,9 +457,6 @@ public function getShopperNotificationReference() */ public function setShopperNotificationReference($shopperNotificationReference) { - if (is_null($shopperNotificationReference)) { - throw new \InvalidArgumentException('non-nullable shopperNotificationReference cannot be null'); - } $this->container['shopperNotificationReference'] = $shopperNotificationReference; return $this; @@ -499,9 +481,6 @@ public function getStoredPaymentMethodId() */ public function setStoredPaymentMethodId($storedPaymentMethodId) { - if (is_null($storedPaymentMethodId)) { - throw new \InvalidArgumentException('non-nullable storedPaymentMethodId cannot be null'); - } $this->container['storedPaymentMethodId'] = $storedPaymentMethodId; return $this; diff --git a/src/Adyen/Model/Recurring/ObjectSerializer.php b/src/Adyen/Model/Recurring/ObjectSerializer.php index 7adbf8e59..3b2a857bf 100644 --- a/src/Adyen/Model/Recurring/ObjectSerializer.php +++ b/src/Adyen/Model/Recurring/ObjectSerializer.php @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach ($data as $property => $value) { + foreach($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) { - return $timestamp; - } + if (!is_string($timestamp)) return $timestamp; return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/Recurring/Permit.php b/src/Adyen/Model/Recurring/Permit.php index 2d33373fa..ac17a19d7 100644 --- a/src/Adyen/Model/Recurring/Permit.php +++ b/src/Adyen/Model/Recurring/Permit.php @@ -323,9 +323,6 @@ public function getPartnerId() */ public function setPartnerId($partnerId) { - if (is_null($partnerId)) { - throw new \InvalidArgumentException('non-nullable partnerId cannot be null'); - } $this->container['partnerId'] = $partnerId; return $this; @@ -350,9 +347,6 @@ public function getProfileReference() */ public function setProfileReference($profileReference) { - if (is_null($profileReference)) { - throw new \InvalidArgumentException('non-nullable profileReference cannot be null'); - } $this->container['profileReference'] = $profileReference; return $this; @@ -377,9 +371,6 @@ public function getRestriction() */ public function setRestriction($restriction) { - if (is_null($restriction)) { - throw new \InvalidArgumentException('non-nullable restriction cannot be null'); - } $this->container['restriction'] = $restriction; return $this; @@ -404,9 +395,6 @@ public function getResultKey() */ public function setResultKey($resultKey) { - if (is_null($resultKey)) { - throw new \InvalidArgumentException('non-nullable resultKey cannot be null'); - } $this->container['resultKey'] = $resultKey; return $this; @@ -431,9 +419,6 @@ public function getValidTillDate() */ public function setValidTillDate($validTillDate) { - if (is_null($validTillDate)) { - throw new \InvalidArgumentException('non-nullable validTillDate cannot be null'); - } $this->container['validTillDate'] = $validTillDate; return $this; diff --git a/src/Adyen/Model/Recurring/PermitRestriction.php b/src/Adyen/Model/Recurring/PermitRestriction.php index 6e1f768cb..358161258 100644 --- a/src/Adyen/Model/Recurring/PermitRestriction.php +++ b/src/Adyen/Model/Recurring/PermitRestriction.php @@ -309,9 +309,6 @@ public function getMaxAmount() */ public function setMaxAmount($maxAmount) { - if (is_null($maxAmount)) { - throw new \InvalidArgumentException('non-nullable maxAmount cannot be null'); - } $this->container['maxAmount'] = $maxAmount; return $this; @@ -336,9 +333,6 @@ public function getSingleTransactionLimit() */ public function setSingleTransactionLimit($singleTransactionLimit) { - if (is_null($singleTransactionLimit)) { - throw new \InvalidArgumentException('non-nullable singleTransactionLimit cannot be null'); - } $this->container['singleTransactionLimit'] = $singleTransactionLimit; return $this; @@ -363,9 +357,6 @@ public function getSingleUse() */ public function setSingleUse($singleUse) { - if (is_null($singleUse)) { - throw new \InvalidArgumentException('non-nullable singleUse cannot be null'); - } $this->container['singleUse'] = $singleUse; return $this; diff --git a/src/Adyen/Model/Recurring/PermitResult.php b/src/Adyen/Model/Recurring/PermitResult.php index 18fe01562..5f442c242 100644 --- a/src/Adyen/Model/Recurring/PermitResult.php +++ b/src/Adyen/Model/Recurring/PermitResult.php @@ -302,9 +302,6 @@ public function getResultKey() */ public function setResultKey($resultKey) { - if (is_null($resultKey)) { - throw new \InvalidArgumentException('non-nullable resultKey cannot be null'); - } $this->container['resultKey'] = $resultKey; return $this; @@ -329,9 +326,6 @@ public function getToken() */ public function setToken($token) { - if (is_null($token)) { - throw new \InvalidArgumentException('non-nullable token cannot be null'); - } $this->container['token'] = $token; return $this; diff --git a/src/Adyen/Model/Recurring/Recurring.php b/src/Adyen/Model/Recurring/Recurring.php index dc0faa6ff..6725ae1b3 100644 --- a/src/Adyen/Model/Recurring/Recurring.php +++ b/src/Adyen/Model/Recurring/Recurring.php @@ -375,9 +375,6 @@ public function getContract() */ 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( @@ -412,9 +409,6 @@ public function getRecurringDetailName() */ public function setRecurringDetailName($recurringDetailName) { - if (is_null($recurringDetailName)) { - throw new \InvalidArgumentException('non-nullable recurringDetailName cannot be null'); - } $this->container['recurringDetailName'] = $recurringDetailName; return $this; @@ -439,9 +433,6 @@ public function getRecurringExpiry() */ public function setRecurringExpiry($recurringExpiry) { - if (is_null($recurringExpiry)) { - throw new \InvalidArgumentException('non-nullable recurringExpiry cannot be null'); - } $this->container['recurringExpiry'] = $recurringExpiry; return $this; @@ -466,9 +457,6 @@ public function getRecurringFrequency() */ public function setRecurringFrequency($recurringFrequency) { - if (is_null($recurringFrequency)) { - throw new \InvalidArgumentException('non-nullable recurringFrequency cannot be null'); - } $this->container['recurringFrequency'] = $recurringFrequency; return $this; @@ -493,9 +481,6 @@ public function getTokenService() */ 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( diff --git a/src/Adyen/Model/Recurring/RecurringDetail.php b/src/Adyen/Model/Recurring/RecurringDetail.php index 3234d2115..1ab688648 100644 --- a/src/Adyen/Model/Recurring/RecurringDetail.php +++ b/src/Adyen/Model/Recurring/RecurringDetail.php @@ -413,9 +413,6 @@ public function getAdditionalData() */ public function setAdditionalData($additionalData) { - if (is_null($additionalData)) { - throw new \InvalidArgumentException('non-nullable additionalData cannot be null'); - } $this->container['additionalData'] = $additionalData; return $this; @@ -440,9 +437,6 @@ public function getAlias() */ public function setAlias($alias) { - if (is_null($alias)) { - throw new \InvalidArgumentException('non-nullable alias cannot be null'); - } $this->container['alias'] = $alias; return $this; @@ -467,9 +461,6 @@ public function getAliasType() */ public function setAliasType($aliasType) { - if (is_null($aliasType)) { - throw new \InvalidArgumentException('non-nullable aliasType cannot be null'); - } $this->container['aliasType'] = $aliasType; return $this; @@ -494,9 +485,6 @@ public function getBank() */ public function setBank($bank) { - if (is_null($bank)) { - throw new \InvalidArgumentException('non-nullable bank cannot be null'); - } $this->container['bank'] = $bank; return $this; @@ -521,9 +509,6 @@ public function getBillingAddress() */ public function setBillingAddress($billingAddress) { - if (is_null($billingAddress)) { - throw new \InvalidArgumentException('non-nullable billingAddress cannot be null'); - } $this->container['billingAddress'] = $billingAddress; return $this; @@ -548,9 +533,6 @@ public function getCard() */ public function setCard($card) { - if (is_null($card)) { - throw new \InvalidArgumentException('non-nullable card cannot be null'); - } $this->container['card'] = $card; return $this; @@ -575,9 +557,6 @@ public function getContractTypes() */ public function setContractTypes($contractTypes) { - if (is_null($contractTypes)) { - throw new \InvalidArgumentException('non-nullable contractTypes cannot be null'); - } $this->container['contractTypes'] = $contractTypes; return $this; @@ -602,9 +581,6 @@ public function getCreationDate() */ public function setCreationDate($creationDate) { - if (is_null($creationDate)) { - throw new \InvalidArgumentException('non-nullable creationDate cannot be null'); - } $this->container['creationDate'] = $creationDate; return $this; @@ -629,9 +605,6 @@ public function getFirstPspReference() */ public function setFirstPspReference($firstPspReference) { - if (is_null($firstPspReference)) { - throw new \InvalidArgumentException('non-nullable firstPspReference cannot be null'); - } $this->container['firstPspReference'] = $firstPspReference; return $this; @@ -656,9 +629,6 @@ public function getName() */ public function setName($name) { - if (is_null($name)) { - throw new \InvalidArgumentException('non-nullable name cannot be null'); - } $this->container['name'] = $name; return $this; @@ -683,9 +653,6 @@ public function getNetworkTxReference() */ public function setNetworkTxReference($networkTxReference) { - if (is_null($networkTxReference)) { - throw new \InvalidArgumentException('non-nullable networkTxReference cannot be null'); - } $this->container['networkTxReference'] = $networkTxReference; return $this; @@ -710,9 +677,6 @@ public function getPaymentMethodVariant() */ public function setPaymentMethodVariant($paymentMethodVariant) { - if (is_null($paymentMethodVariant)) { - throw new \InvalidArgumentException('non-nullable paymentMethodVariant cannot be null'); - } $this->container['paymentMethodVariant'] = $paymentMethodVariant; return $this; @@ -737,9 +701,6 @@ public function getRecurringDetailReference() */ public function setRecurringDetailReference($recurringDetailReference) { - if (is_null($recurringDetailReference)) { - throw new \InvalidArgumentException('non-nullable recurringDetailReference cannot be null'); - } $this->container['recurringDetailReference'] = $recurringDetailReference; return $this; @@ -764,9 +725,6 @@ public function getShopperName() */ public function setShopperName($shopperName) { - if (is_null($shopperName)) { - throw new \InvalidArgumentException('non-nullable shopperName cannot be null'); - } $this->container['shopperName'] = $shopperName; return $this; @@ -791,9 +749,6 @@ public function getSocialSecurityNumber() */ public function setSocialSecurityNumber($socialSecurityNumber) { - if (is_null($socialSecurityNumber)) { - throw new \InvalidArgumentException('non-nullable socialSecurityNumber cannot be null'); - } $this->container['socialSecurityNumber'] = $socialSecurityNumber; return $this; @@ -818,9 +773,6 @@ public function getTokenDetails() */ public function setTokenDetails($tokenDetails) { - if (is_null($tokenDetails)) { - throw new \InvalidArgumentException('non-nullable tokenDetails cannot be null'); - } $this->container['tokenDetails'] = $tokenDetails; return $this; @@ -845,9 +797,6 @@ public function getVariant() */ public function setVariant($variant) { - if (is_null($variant)) { - throw new \InvalidArgumentException('non-nullable variant cannot be null'); - } $this->container['variant'] = $variant; return $this; diff --git a/src/Adyen/Model/Recurring/RecurringDetailWrapper.php b/src/Adyen/Model/Recurring/RecurringDetailWrapper.php index 52f3e2e4f..d0e361cf2 100644 --- a/src/Adyen/Model/Recurring/RecurringDetailWrapper.php +++ b/src/Adyen/Model/Recurring/RecurringDetailWrapper.php @@ -295,9 +295,6 @@ public function getRecurringDetail() */ public function setRecurringDetail($recurringDetail) { - if (is_null($recurringDetail)) { - throw new \InvalidArgumentException('non-nullable recurringDetail cannot be null'); - } $this->container['recurringDetail'] = $recurringDetail; return $this; diff --git a/src/Adyen/Model/Recurring/RecurringDetailsRequest.php b/src/Adyen/Model/Recurring/RecurringDetailsRequest.php index 94163254d..400948bbb 100644 --- a/src/Adyen/Model/Recurring/RecurringDetailsRequest.php +++ b/src/Adyen/Model/Recurring/RecurringDetailsRequest.php @@ -315,9 +315,6 @@ public function getMerchantAccount() */ public function setMerchantAccount($merchantAccount) { - if (is_null($merchantAccount)) { - throw new \InvalidArgumentException('non-nullable merchantAccount cannot be null'); - } $this->container['merchantAccount'] = $merchantAccount; return $this; @@ -342,9 +339,6 @@ public function getRecurring() */ public function setRecurring($recurring) { - if (is_null($recurring)) { - throw new \InvalidArgumentException('non-nullable recurring cannot be null'); - } $this->container['recurring'] = $recurring; return $this; @@ -369,9 +363,6 @@ public function getShopperReference() */ public function setShopperReference($shopperReference) { - if (is_null($shopperReference)) { - throw new \InvalidArgumentException('non-nullable shopperReference cannot be null'); - } $this->container['shopperReference'] = $shopperReference; return $this; diff --git a/src/Adyen/Model/Recurring/RecurringDetailsResult.php b/src/Adyen/Model/Recurring/RecurringDetailsResult.php index 9a0cba17b..7ae2c8989 100644 --- a/src/Adyen/Model/Recurring/RecurringDetailsResult.php +++ b/src/Adyen/Model/Recurring/RecurringDetailsResult.php @@ -316,9 +316,6 @@ public function getCreationDate() */ public function setCreationDate($creationDate) { - if (is_null($creationDate)) { - throw new \InvalidArgumentException('non-nullable creationDate cannot be null'); - } $this->container['creationDate'] = $creationDate; return $this; @@ -343,9 +340,6 @@ public function getDetails() */ public function setDetails($details) { - if (is_null($details)) { - throw new \InvalidArgumentException('non-nullable details cannot be null'); - } $this->container['details'] = $details; return $this; @@ -370,9 +364,6 @@ public function getLastKnownShopperEmail() */ public function setLastKnownShopperEmail($lastKnownShopperEmail) { - if (is_null($lastKnownShopperEmail)) { - throw new \InvalidArgumentException('non-nullable lastKnownShopperEmail cannot be null'); - } $this->container['lastKnownShopperEmail'] = $lastKnownShopperEmail; return $this; @@ -397,9 +388,6 @@ public function getShopperReference() */ public function setShopperReference($shopperReference) { - if (is_null($shopperReference)) { - throw new \InvalidArgumentException('non-nullable shopperReference cannot be null'); - } $this->container['shopperReference'] = $shopperReference; return $this; diff --git a/src/Adyen/Model/Recurring/ScheduleAccountUpdaterRequest.php b/src/Adyen/Model/Recurring/ScheduleAccountUpdaterRequest.php index 396a5910f..3a29172d3 100644 --- a/src/Adyen/Model/Recurring/ScheduleAccountUpdaterRequest.php +++ b/src/Adyen/Model/Recurring/ScheduleAccountUpdaterRequest.php @@ -336,9 +336,6 @@ public function getAdditionalData() */ public function setAdditionalData($additionalData) { - if (is_null($additionalData)) { - throw new \InvalidArgumentException('non-nullable additionalData cannot be null'); - } $this->container['additionalData'] = $additionalData; return $this; @@ -363,9 +360,6 @@ public function getCard() */ public function setCard($card) { - if (is_null($card)) { - throw new \InvalidArgumentException('non-nullable card cannot be null'); - } $this->container['card'] = $card; return $this; @@ -390,9 +384,6 @@ public function getMerchantAccount() */ public function setMerchantAccount($merchantAccount) { - if (is_null($merchantAccount)) { - throw new \InvalidArgumentException('non-nullable merchantAccount cannot be null'); - } $this->container['merchantAccount'] = $merchantAccount; return $this; @@ -417,9 +408,6 @@ public function getReference() */ public function setReference($reference) { - if (is_null($reference)) { - throw new \InvalidArgumentException('non-nullable reference cannot be null'); - } $this->container['reference'] = $reference; return $this; @@ -444,9 +432,6 @@ public function getSelectedRecurringDetailReference() */ public function setSelectedRecurringDetailReference($selectedRecurringDetailReference) { - if (is_null($selectedRecurringDetailReference)) { - throw new \InvalidArgumentException('non-nullable selectedRecurringDetailReference cannot be null'); - } $this->container['selectedRecurringDetailReference'] = $selectedRecurringDetailReference; return $this; @@ -471,9 +456,6 @@ public function getShopperReference() */ public function setShopperReference($shopperReference) { - if (is_null($shopperReference)) { - throw new \InvalidArgumentException('non-nullable shopperReference cannot be null'); - } $this->container['shopperReference'] = $shopperReference; return $this; diff --git a/src/Adyen/Model/Recurring/ScheduleAccountUpdaterResult.php b/src/Adyen/Model/Recurring/ScheduleAccountUpdaterResult.php index d31479264..c4562ca6e 100644 --- a/src/Adyen/Model/Recurring/ScheduleAccountUpdaterResult.php +++ b/src/Adyen/Model/Recurring/ScheduleAccountUpdaterResult.php @@ -308,9 +308,6 @@ public function getPspReference() */ public function setPspReference($pspReference) { - if (is_null($pspReference)) { - throw new \InvalidArgumentException('non-nullable pspReference cannot be null'); - } $this->container['pspReference'] = $pspReference; return $this; @@ -335,9 +332,6 @@ public function getResult() */ public function setResult($result) { - if (is_null($result)) { - throw new \InvalidArgumentException('non-nullable result cannot be null'); - } $this->container['result'] = $result; return $this; diff --git a/src/Adyen/Model/Recurring/ServiceError.php b/src/Adyen/Model/Recurring/ServiceError.php index dd438ef3a..e5177af82 100644 --- a/src/Adyen/Model/Recurring/ServiceError.php +++ b/src/Adyen/Model/Recurring/ServiceError.php @@ -330,9 +330,6 @@ public function getAdditionalData() */ public function setAdditionalData($additionalData) { - if (is_null($additionalData)) { - throw new \InvalidArgumentException('non-nullable additionalData cannot be null'); - } $this->container['additionalData'] = $additionalData; return $this; @@ -357,9 +354,6 @@ public function getErrorCode() */ public function setErrorCode($errorCode) { - if (is_null($errorCode)) { - throw new \InvalidArgumentException('non-nullable errorCode cannot be null'); - } $this->container['errorCode'] = $errorCode; return $this; @@ -384,9 +378,6 @@ public function getErrorType() */ public function setErrorType($errorType) { - if (is_null($errorType)) { - throw new \InvalidArgumentException('non-nullable errorType cannot be null'); - } $this->container['errorType'] = $errorType; return $this; @@ -411,9 +402,6 @@ public function getMessage() */ public function setMessage($message) { - if (is_null($message)) { - throw new \InvalidArgumentException('non-nullable message cannot be null'); - } $this->container['message'] = $message; return $this; @@ -438,9 +426,6 @@ public function getPspReference() */ public function setPspReference($pspReference) { - if (is_null($pspReference)) { - throw new \InvalidArgumentException('non-nullable pspReference cannot be null'); - } $this->container['pspReference'] = $pspReference; return $this; @@ -465,7 +450,6 @@ public function getStatus() */ public function setStatus($status) { - // Do nothing for nullable integers $this->container['status'] = $status; return $this; diff --git a/src/Adyen/Model/Recurring/TokenDetails.php b/src/Adyen/Model/Recurring/TokenDetails.php index 3c990e772..0210a180f 100644 --- a/src/Adyen/Model/Recurring/TokenDetails.php +++ b/src/Adyen/Model/Recurring/TokenDetails.php @@ -302,9 +302,6 @@ public function getTokenData() */ public function setTokenData($tokenData) { - if (is_null($tokenData)) { - throw new \InvalidArgumentException('non-nullable tokenData cannot be null'); - } $this->container['tokenData'] = $tokenData; return $this; @@ -329,9 +326,6 @@ public function getTokenDataType() */ public function setTokenDataType($tokenDataType) { - if (is_null($tokenDataType)) { - throw new \InvalidArgumentException('non-nullable tokenDataType cannot be null'); - } $this->container['tokenDataType'] = $tokenDataType; return $this; diff --git a/src/Adyen/Model/ReportWebhooks/BalancePlatformNotificationResponse.php b/src/Adyen/Model/ReportWebhooks/BalancePlatformNotificationResponse.php index 1d51fa657..a5fb2f68d 100644 --- a/src/Adyen/Model/ReportWebhooks/BalancePlatformNotificationResponse.php +++ b/src/Adyen/Model/ReportWebhooks/BalancePlatformNotificationResponse.php @@ -289,15 +289,12 @@ public function getNotificationResponse() /** * 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). + * @param string|null $notificationResponse Respond with any **2xx** HTTP status code 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; diff --git a/src/Adyen/Model/ReportWebhooks/ObjectSerializer.php b/src/Adyen/Model/ReportWebhooks/ObjectSerializer.php index 97f670389..a8a265ce9 100644 --- a/src/Adyen/Model/ReportWebhooks/ObjectSerializer.php +++ b/src/Adyen/Model/ReportWebhooks/ObjectSerializer.php @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach ($data as $property => $value) { + foreach($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) { - return $timestamp; - } + if (!is_string($timestamp)) return $timestamp; return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/ReportWebhooks/ReportNotificationData.php b/src/Adyen/Model/ReportWebhooks/ReportNotificationData.php index 70293c325..a64f86a99 100644 --- a/src/Adyen/Model/ReportWebhooks/ReportNotificationData.php +++ b/src/Adyen/Model/ReportWebhooks/ReportNotificationData.php @@ -346,9 +346,6 @@ public function getAccountHolder() */ public function setAccountHolder($accountHolder) { - if (is_null($accountHolder)) { - throw new \InvalidArgumentException('non-nullable accountHolder cannot be null'); - } $this->container['accountHolder'] = $accountHolder; return $this; @@ -373,9 +370,6 @@ public function getBalanceAccount() */ public function setBalanceAccount($balanceAccount) { - if (is_null($balanceAccount)) { - throw new \InvalidArgumentException('non-nullable balanceAccount cannot be null'); - } $this->container['balanceAccount'] = $balanceAccount; return $this; @@ -400,9 +394,6 @@ public function getBalancePlatform() */ public function setBalancePlatform($balancePlatform) { - if (is_null($balancePlatform)) { - throw new \InvalidArgumentException('non-nullable balancePlatform cannot be null'); - } $this->container['balancePlatform'] = $balancePlatform; return $this; @@ -427,9 +418,6 @@ public function getCreationDate() */ public function setCreationDate($creationDate) { - if (is_null($creationDate)) { - throw new \InvalidArgumentException('non-nullable creationDate cannot be null'); - } $this->container['creationDate'] = $creationDate; return $this; @@ -454,9 +442,6 @@ public function getDownloadUrl() */ public function setDownloadUrl($downloadUrl) { - if (is_null($downloadUrl)) { - throw new \InvalidArgumentException('non-nullable downloadUrl cannot be null'); - } $this->container['downloadUrl'] = $downloadUrl; return $this; @@ -481,9 +466,6 @@ public function getFileName() */ public function setFileName($fileName) { - if (is_null($fileName)) { - throw new \InvalidArgumentException('non-nullable fileName cannot be null'); - } $this->container['fileName'] = $fileName; return $this; @@ -508,9 +490,6 @@ public function getReportType() */ public function setReportType($reportType) { - if (is_null($reportType)) { - throw new \InvalidArgumentException('non-nullable reportType cannot be null'); - } $this->container['reportType'] = $reportType; return $this; diff --git a/src/Adyen/Model/ReportWebhooks/ReportNotificationRequest.php b/src/Adyen/Model/ReportWebhooks/ReportNotificationRequest.php index d3c23e923..998c9bf23 100644 --- a/src/Adyen/Model/ReportWebhooks/ReportNotificationRequest.php +++ b/src/Adyen/Model/ReportWebhooks/ReportNotificationRequest.php @@ -339,9 +339,6 @@ public function getData() */ public function setData($data) { - if (is_null($data)) { - throw new \InvalidArgumentException('non-nullable data cannot be null'); - } $this->container['data'] = $data; return $this; @@ -366,9 +363,6 @@ public function getEnvironment() */ public function setEnvironment($environment) { - if (is_null($environment)) { - throw new \InvalidArgumentException('non-nullable environment cannot be null'); - } $this->container['environment'] = $environment; return $this; @@ -393,9 +387,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/ReportWebhooks/Resource.php b/src/Adyen/Model/ReportWebhooks/Resource.php index 0419e7a00..5325c7169 100644 --- a/src/Adyen/Model/ReportWebhooks/Resource.php +++ b/src/Adyen/Model/ReportWebhooks/Resource.php @@ -309,9 +309,6 @@ public function getBalancePlatform() */ public function setBalancePlatform($balancePlatform) { - if (is_null($balancePlatform)) { - throw new \InvalidArgumentException('non-nullable balancePlatform cannot be null'); - } $this->container['balancePlatform'] = $balancePlatform; return $this; @@ -336,9 +333,6 @@ public function getCreationDate() */ public function setCreationDate($creationDate) { - if (is_null($creationDate)) { - throw new \InvalidArgumentException('non-nullable creationDate cannot be null'); - } $this->container['creationDate'] = $creationDate; return $this; @@ -363,9 +357,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; diff --git a/src/Adyen/Model/ReportWebhooks/ResourceReference.php b/src/Adyen/Model/ReportWebhooks/ResourceReference.php index db5557146..31db791b1 100644 --- a/src/Adyen/Model/ReportWebhooks/ResourceReference.php +++ b/src/Adyen/Model/ReportWebhooks/ResourceReference.php @@ -309,9 +309,6 @@ public function getDescription() */ public function setDescription($description) { - if (is_null($description)) { - throw new \InvalidArgumentException('non-nullable description cannot be null'); - } $this->container['description'] = $description; return $this; @@ -336,9 +333,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -363,9 +357,6 @@ public function getReference() */ public function setReference($reference) { - if (is_null($reference)) { - throw new \InvalidArgumentException('non-nullable reference cannot be null'); - } $this->container['reference'] = $reference; return $this; diff --git a/src/Adyen/Model/StoredValue/Amount.php b/src/Adyen/Model/StoredValue/Amount.php index 0b370a910..1a5086010 100644 --- a/src/Adyen/Model/StoredValue/Amount.php +++ b/src/Adyen/Model/StoredValue/Amount.php @@ -308,9 +308,6 @@ public function getCurrency() */ public function setCurrency($currency) { - if (is_null($currency)) { - throw new \InvalidArgumentException('non-nullable currency cannot be null'); - } $this->container['currency'] = $currency; return $this; @@ -335,9 +332,6 @@ public function getValue() */ public function setValue($value) { - if (is_null($value)) { - throw new \InvalidArgumentException('non-nullable value cannot be null'); - } $this->container['value'] = $value; return $this; diff --git a/src/Adyen/Model/StoredValue/ObjectSerializer.php b/src/Adyen/Model/StoredValue/ObjectSerializer.php index ed3372fb3..934975452 100644 --- a/src/Adyen/Model/StoredValue/ObjectSerializer.php +++ b/src/Adyen/Model/StoredValue/ObjectSerializer.php @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach ($data as $property => $value) { + foreach($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) { - return $timestamp; - } + if (!is_string($timestamp)) return $timestamp; return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/StoredValue/ServiceError.php b/src/Adyen/Model/StoredValue/ServiceError.php index eb1fab0bc..0783efc9b 100644 --- a/src/Adyen/Model/StoredValue/ServiceError.php +++ b/src/Adyen/Model/StoredValue/ServiceError.php @@ -330,9 +330,6 @@ public function getAdditionalData() */ public function setAdditionalData($additionalData) { - if (is_null($additionalData)) { - throw new \InvalidArgumentException('non-nullable additionalData cannot be null'); - } $this->container['additionalData'] = $additionalData; return $this; @@ -357,9 +354,6 @@ public function getErrorCode() */ public function setErrorCode($errorCode) { - if (is_null($errorCode)) { - throw new \InvalidArgumentException('non-nullable errorCode cannot be null'); - } $this->container['errorCode'] = $errorCode; return $this; @@ -384,9 +378,6 @@ public function getErrorType() */ public function setErrorType($errorType) { - if (is_null($errorType)) { - throw new \InvalidArgumentException('non-nullable errorType cannot be null'); - } $this->container['errorType'] = $errorType; return $this; @@ -411,9 +402,6 @@ public function getMessage() */ public function setMessage($message) { - if (is_null($message)) { - throw new \InvalidArgumentException('non-nullable message cannot be null'); - } $this->container['message'] = $message; return $this; @@ -438,9 +426,6 @@ public function getPspReference() */ public function setPspReference($pspReference) { - if (is_null($pspReference)) { - throw new \InvalidArgumentException('non-nullable pspReference cannot be null'); - } $this->container['pspReference'] = $pspReference; return $this; @@ -465,7 +450,6 @@ public function getStatus() */ public function setStatus($status) { - // Do nothing for nullable integers $this->container['status'] = $status; return $this; diff --git a/src/Adyen/Model/StoredValue/StoredValueBalanceCheckRequest.php b/src/Adyen/Model/StoredValue/StoredValueBalanceCheckRequest.php index 826093c0f..e62dc0efb 100644 --- a/src/Adyen/Model/StoredValue/StoredValueBalanceCheckRequest.php +++ b/src/Adyen/Model/StoredValue/StoredValueBalanceCheckRequest.php @@ -380,9 +380,6 @@ public function getAmount() */ public function setAmount($amount) { - if (is_null($amount)) { - throw new \InvalidArgumentException('non-nullable amount cannot be null'); - } $this->container['amount'] = $amount; return $this; @@ -407,9 +404,6 @@ public function getMerchantAccount() */ public function setMerchantAccount($merchantAccount) { - if (is_null($merchantAccount)) { - throw new \InvalidArgumentException('non-nullable merchantAccount cannot be null'); - } $this->container['merchantAccount'] = $merchantAccount; return $this; @@ -434,9 +428,6 @@ public function getPaymentMethod() */ public function setPaymentMethod($paymentMethod) { - if (is_null($paymentMethod)) { - throw new \InvalidArgumentException('non-nullable paymentMethod cannot be null'); - } $this->container['paymentMethod'] = $paymentMethod; return $this; @@ -461,9 +452,6 @@ public function getRecurringDetailReference() */ public function setRecurringDetailReference($recurringDetailReference) { - if (is_null($recurringDetailReference)) { - throw new \InvalidArgumentException('non-nullable recurringDetailReference cannot be null'); - } $this->container['recurringDetailReference'] = $recurringDetailReference; return $this; @@ -488,9 +476,6 @@ public function getReference() */ public function setReference($reference) { - if (is_null($reference)) { - throw new \InvalidArgumentException('non-nullable reference cannot be null'); - } $this->container['reference'] = $reference; return $this; @@ -515,9 +500,6 @@ public function getShopperInteraction() */ 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( @@ -552,9 +534,6 @@ public function getShopperReference() */ public function setShopperReference($shopperReference) { - if (is_null($shopperReference)) { - throw new \InvalidArgumentException('non-nullable shopperReference cannot be null'); - } $this->container['shopperReference'] = $shopperReference; return $this; @@ -579,9 +558,6 @@ public function getStore() */ public function setStore($store) { - if (is_null($store)) { - throw new \InvalidArgumentException('non-nullable store cannot be null'); - } $this->container['store'] = $store; return $this; diff --git a/src/Adyen/Model/StoredValue/StoredValueBalanceCheckResponse.php b/src/Adyen/Model/StoredValue/StoredValueBalanceCheckResponse.php index 9a1e34d00..dbb55d6cc 100644 --- a/src/Adyen/Model/StoredValue/StoredValueBalanceCheckResponse.php +++ b/src/Adyen/Model/StoredValue/StoredValueBalanceCheckResponse.php @@ -350,9 +350,6 @@ public function getCurrentBalance() */ public function setCurrentBalance($currentBalance) { - if (is_null($currentBalance)) { - throw new \InvalidArgumentException('non-nullable currentBalance cannot be null'); - } $this->container['currentBalance'] = $currentBalance; return $this; @@ -377,9 +374,6 @@ public function getPspReference() */ public function setPspReference($pspReference) { - if (is_null($pspReference)) { - throw new \InvalidArgumentException('non-nullable pspReference cannot be null'); - } $this->container['pspReference'] = $pspReference; return $this; @@ -404,9 +398,6 @@ public function getRefusalReason() */ public function setRefusalReason($refusalReason) { - if (is_null($refusalReason)) { - throw new \InvalidArgumentException('non-nullable refusalReason cannot be null'); - } $this->container['refusalReason'] = $refusalReason; return $this; @@ -431,9 +422,6 @@ public function getResultCode() */ 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( @@ -468,9 +456,6 @@ public function getThirdPartyRefusalReason() */ public function setThirdPartyRefusalReason($thirdPartyRefusalReason) { - if (is_null($thirdPartyRefusalReason)) { - throw new \InvalidArgumentException('non-nullable thirdPartyRefusalReason cannot be null'); - } $this->container['thirdPartyRefusalReason'] = $thirdPartyRefusalReason; return $this; diff --git a/src/Adyen/Model/StoredValue/StoredValueBalanceMergeRequest.php b/src/Adyen/Model/StoredValue/StoredValueBalanceMergeRequest.php index 668617d0d..db442b86b 100644 --- a/src/Adyen/Model/StoredValue/StoredValueBalanceMergeRequest.php +++ b/src/Adyen/Model/StoredValue/StoredValueBalanceMergeRequest.php @@ -390,9 +390,6 @@ public function getAmount() */ public function setAmount($amount) { - if (is_null($amount)) { - throw new \InvalidArgumentException('non-nullable amount cannot be null'); - } $this->container['amount'] = $amount; return $this; @@ -417,9 +414,6 @@ public function getMerchantAccount() */ public function setMerchantAccount($merchantAccount) { - if (is_null($merchantAccount)) { - throw new \InvalidArgumentException('non-nullable merchantAccount cannot be null'); - } $this->container['merchantAccount'] = $merchantAccount; return $this; @@ -444,9 +438,6 @@ public function getPaymentMethod() */ public function setPaymentMethod($paymentMethod) { - if (is_null($paymentMethod)) { - throw new \InvalidArgumentException('non-nullable paymentMethod cannot be null'); - } $this->container['paymentMethod'] = $paymentMethod; return $this; @@ -471,9 +462,6 @@ public function getRecurringDetailReference() */ public function setRecurringDetailReference($recurringDetailReference) { - if (is_null($recurringDetailReference)) { - throw new \InvalidArgumentException('non-nullable recurringDetailReference cannot be null'); - } $this->container['recurringDetailReference'] = $recurringDetailReference; return $this; @@ -498,9 +486,6 @@ public function getReference() */ public function setReference($reference) { - if (is_null($reference)) { - throw new \InvalidArgumentException('non-nullable reference cannot be null'); - } $this->container['reference'] = $reference; return $this; @@ -525,9 +510,6 @@ public function getShopperInteraction() */ 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( @@ -562,9 +544,6 @@ public function getShopperReference() */ public function setShopperReference($shopperReference) { - if (is_null($shopperReference)) { - throw new \InvalidArgumentException('non-nullable shopperReference cannot be null'); - } $this->container['shopperReference'] = $shopperReference; return $this; @@ -589,9 +568,6 @@ public function getSourcePaymentMethod() */ public function setSourcePaymentMethod($sourcePaymentMethod) { - if (is_null($sourcePaymentMethod)) { - throw new \InvalidArgumentException('non-nullable sourcePaymentMethod cannot be null'); - } $this->container['sourcePaymentMethod'] = $sourcePaymentMethod; return $this; @@ -616,9 +592,6 @@ public function getStore() */ public function setStore($store) { - if (is_null($store)) { - throw new \InvalidArgumentException('non-nullable store cannot be null'); - } $this->container['store'] = $store; return $this; diff --git a/src/Adyen/Model/StoredValue/StoredValueBalanceMergeResponse.php b/src/Adyen/Model/StoredValue/StoredValueBalanceMergeResponse.php index 6652e723a..57b3f64e7 100644 --- a/src/Adyen/Model/StoredValue/StoredValueBalanceMergeResponse.php +++ b/src/Adyen/Model/StoredValue/StoredValueBalanceMergeResponse.php @@ -357,9 +357,6 @@ public function getAuthCode() */ public function setAuthCode($authCode) { - if (is_null($authCode)) { - throw new \InvalidArgumentException('non-nullable authCode cannot be null'); - } $this->container['authCode'] = $authCode; return $this; @@ -384,9 +381,6 @@ public function getCurrentBalance() */ public function setCurrentBalance($currentBalance) { - if (is_null($currentBalance)) { - throw new \InvalidArgumentException('non-nullable currentBalance cannot be null'); - } $this->container['currentBalance'] = $currentBalance; return $this; @@ -411,9 +405,6 @@ public function getPspReference() */ public function setPspReference($pspReference) { - if (is_null($pspReference)) { - throw new \InvalidArgumentException('non-nullable pspReference cannot be null'); - } $this->container['pspReference'] = $pspReference; return $this; @@ -438,9 +429,6 @@ public function getRefusalReason() */ public function setRefusalReason($refusalReason) { - if (is_null($refusalReason)) { - throw new \InvalidArgumentException('non-nullable refusalReason cannot be null'); - } $this->container['refusalReason'] = $refusalReason; return $this; @@ -465,9 +453,6 @@ public function getResultCode() */ 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( @@ -502,9 +487,6 @@ public function getThirdPartyRefusalReason() */ public function setThirdPartyRefusalReason($thirdPartyRefusalReason) { - if (is_null($thirdPartyRefusalReason)) { - throw new \InvalidArgumentException('non-nullable thirdPartyRefusalReason cannot be null'); - } $this->container['thirdPartyRefusalReason'] = $thirdPartyRefusalReason; return $this; diff --git a/src/Adyen/Model/StoredValue/StoredValueIssueRequest.php b/src/Adyen/Model/StoredValue/StoredValueIssueRequest.php index 31eff04ee..0ec05449e 100644 --- a/src/Adyen/Model/StoredValue/StoredValueIssueRequest.php +++ b/src/Adyen/Model/StoredValue/StoredValueIssueRequest.php @@ -380,9 +380,6 @@ public function getAmount() */ public function setAmount($amount) { - if (is_null($amount)) { - throw new \InvalidArgumentException('non-nullable amount cannot be null'); - } $this->container['amount'] = $amount; return $this; @@ -407,9 +404,6 @@ public function getMerchantAccount() */ public function setMerchantAccount($merchantAccount) { - if (is_null($merchantAccount)) { - throw new \InvalidArgumentException('non-nullable merchantAccount cannot be null'); - } $this->container['merchantAccount'] = $merchantAccount; return $this; @@ -434,9 +428,6 @@ public function getPaymentMethod() */ public function setPaymentMethod($paymentMethod) { - if (is_null($paymentMethod)) { - throw new \InvalidArgumentException('non-nullable paymentMethod cannot be null'); - } $this->container['paymentMethod'] = $paymentMethod; return $this; @@ -461,9 +452,6 @@ public function getRecurringDetailReference() */ public function setRecurringDetailReference($recurringDetailReference) { - if (is_null($recurringDetailReference)) { - throw new \InvalidArgumentException('non-nullable recurringDetailReference cannot be null'); - } $this->container['recurringDetailReference'] = $recurringDetailReference; return $this; @@ -488,9 +476,6 @@ public function getReference() */ public function setReference($reference) { - if (is_null($reference)) { - throw new \InvalidArgumentException('non-nullable reference cannot be null'); - } $this->container['reference'] = $reference; return $this; @@ -515,9 +500,6 @@ public function getShopperInteraction() */ 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( @@ -552,9 +534,6 @@ public function getShopperReference() */ public function setShopperReference($shopperReference) { - if (is_null($shopperReference)) { - throw new \InvalidArgumentException('non-nullable shopperReference cannot be null'); - } $this->container['shopperReference'] = $shopperReference; return $this; @@ -579,9 +558,6 @@ public function getStore() */ public function setStore($store) { - if (is_null($store)) { - throw new \InvalidArgumentException('non-nullable store cannot be null'); - } $this->container['store'] = $store; return $this; diff --git a/src/Adyen/Model/StoredValue/StoredValueIssueResponse.php b/src/Adyen/Model/StoredValue/StoredValueIssueResponse.php index 0ee381b20..3cdcbdbe1 100644 --- a/src/Adyen/Model/StoredValue/StoredValueIssueResponse.php +++ b/src/Adyen/Model/StoredValue/StoredValueIssueResponse.php @@ -364,9 +364,6 @@ public function getAuthCode() */ public function setAuthCode($authCode) { - if (is_null($authCode)) { - throw new \InvalidArgumentException('non-nullable authCode cannot be null'); - } $this->container['authCode'] = $authCode; return $this; @@ -391,9 +388,6 @@ public function getCurrentBalance() */ public function setCurrentBalance($currentBalance) { - if (is_null($currentBalance)) { - throw new \InvalidArgumentException('non-nullable currentBalance cannot be null'); - } $this->container['currentBalance'] = $currentBalance; return $this; @@ -418,9 +412,6 @@ public function getPaymentMethod() */ public function setPaymentMethod($paymentMethod) { - if (is_null($paymentMethod)) { - throw new \InvalidArgumentException('non-nullable paymentMethod cannot be null'); - } $this->container['paymentMethod'] = $paymentMethod; return $this; @@ -445,9 +436,6 @@ public function getPspReference() */ public function setPspReference($pspReference) { - if (is_null($pspReference)) { - throw new \InvalidArgumentException('non-nullable pspReference cannot be null'); - } $this->container['pspReference'] = $pspReference; return $this; @@ -472,9 +460,6 @@ public function getRefusalReason() */ public function setRefusalReason($refusalReason) { - if (is_null($refusalReason)) { - throw new \InvalidArgumentException('non-nullable refusalReason cannot be null'); - } $this->container['refusalReason'] = $refusalReason; return $this; @@ -499,9 +484,6 @@ public function getResultCode() */ 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( @@ -536,9 +518,6 @@ public function getThirdPartyRefusalReason() */ public function setThirdPartyRefusalReason($thirdPartyRefusalReason) { - if (is_null($thirdPartyRefusalReason)) { - throw new \InvalidArgumentException('non-nullable thirdPartyRefusalReason cannot be null'); - } $this->container['thirdPartyRefusalReason'] = $thirdPartyRefusalReason; return $this; diff --git a/src/Adyen/Model/StoredValue/StoredValueLoadRequest.php b/src/Adyen/Model/StoredValue/StoredValueLoadRequest.php index 8776676ea..aef21b43c 100644 --- a/src/Adyen/Model/StoredValue/StoredValueLoadRequest.php +++ b/src/Adyen/Model/StoredValue/StoredValueLoadRequest.php @@ -413,9 +413,6 @@ public function getAmount() */ public function setAmount($amount) { - if (is_null($amount)) { - throw new \InvalidArgumentException('non-nullable amount cannot be null'); - } $this->container['amount'] = $amount; return $this; @@ -440,9 +437,6 @@ public function getLoadType() */ public function setLoadType($loadType) { - if (is_null($loadType)) { - throw new \InvalidArgumentException('non-nullable loadType cannot be null'); - } $allowedValues = $this->getLoadTypeAllowableValues(); if (!in_array($loadType, $allowedValues, true)) { throw new \InvalidArgumentException( @@ -477,9 +471,6 @@ public function getMerchantAccount() */ public function setMerchantAccount($merchantAccount) { - if (is_null($merchantAccount)) { - throw new \InvalidArgumentException('non-nullable merchantAccount cannot be null'); - } $this->container['merchantAccount'] = $merchantAccount; return $this; @@ -504,9 +495,6 @@ public function getPaymentMethod() */ public function setPaymentMethod($paymentMethod) { - if (is_null($paymentMethod)) { - throw new \InvalidArgumentException('non-nullable paymentMethod cannot be null'); - } $this->container['paymentMethod'] = $paymentMethod; return $this; @@ -531,9 +519,6 @@ public function getRecurringDetailReference() */ public function setRecurringDetailReference($recurringDetailReference) { - if (is_null($recurringDetailReference)) { - throw new \InvalidArgumentException('non-nullable recurringDetailReference cannot be null'); - } $this->container['recurringDetailReference'] = $recurringDetailReference; return $this; @@ -558,9 +543,6 @@ public function getReference() */ public function setReference($reference) { - if (is_null($reference)) { - throw new \InvalidArgumentException('non-nullable reference cannot be null'); - } $this->container['reference'] = $reference; return $this; @@ -585,9 +567,6 @@ public function getShopperInteraction() */ 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( @@ -622,9 +601,6 @@ public function getShopperReference() */ public function setShopperReference($shopperReference) { - if (is_null($shopperReference)) { - throw new \InvalidArgumentException('non-nullable shopperReference cannot be null'); - } $this->container['shopperReference'] = $shopperReference; return $this; @@ -649,9 +625,6 @@ public function getStore() */ public function setStore($store) { - if (is_null($store)) { - throw new \InvalidArgumentException('non-nullable store cannot be null'); - } $this->container['store'] = $store; return $this; diff --git a/src/Adyen/Model/StoredValue/StoredValueLoadResponse.php b/src/Adyen/Model/StoredValue/StoredValueLoadResponse.php index 4d4bed618..cc0b5b051 100644 --- a/src/Adyen/Model/StoredValue/StoredValueLoadResponse.php +++ b/src/Adyen/Model/StoredValue/StoredValueLoadResponse.php @@ -357,9 +357,6 @@ public function getAuthCode() */ public function setAuthCode($authCode) { - if (is_null($authCode)) { - throw new \InvalidArgumentException('non-nullable authCode cannot be null'); - } $this->container['authCode'] = $authCode; return $this; @@ -384,9 +381,6 @@ public function getCurrentBalance() */ public function setCurrentBalance($currentBalance) { - if (is_null($currentBalance)) { - throw new \InvalidArgumentException('non-nullable currentBalance cannot be null'); - } $this->container['currentBalance'] = $currentBalance; return $this; @@ -411,9 +405,6 @@ public function getPspReference() */ public function setPspReference($pspReference) { - if (is_null($pspReference)) { - throw new \InvalidArgumentException('non-nullable pspReference cannot be null'); - } $this->container['pspReference'] = $pspReference; return $this; @@ -438,9 +429,6 @@ public function getRefusalReason() */ public function setRefusalReason($refusalReason) { - if (is_null($refusalReason)) { - throw new \InvalidArgumentException('non-nullable refusalReason cannot be null'); - } $this->container['refusalReason'] = $refusalReason; return $this; @@ -465,9 +453,6 @@ public function getResultCode() */ 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( @@ -502,9 +487,6 @@ public function getThirdPartyRefusalReason() */ public function setThirdPartyRefusalReason($thirdPartyRefusalReason) { - if (is_null($thirdPartyRefusalReason)) { - throw new \InvalidArgumentException('non-nullable thirdPartyRefusalReason cannot be null'); - } $this->container['thirdPartyRefusalReason'] = $thirdPartyRefusalReason; return $this; diff --git a/src/Adyen/Model/StoredValue/StoredValueStatusChangeRequest.php b/src/Adyen/Model/StoredValue/StoredValueStatusChangeRequest.php index 19fc0a7cf..65415ac90 100644 --- a/src/Adyen/Model/StoredValue/StoredValueStatusChangeRequest.php +++ b/src/Adyen/Model/StoredValue/StoredValueStatusChangeRequest.php @@ -413,9 +413,6 @@ public function getAmount() */ public function setAmount($amount) { - if (is_null($amount)) { - throw new \InvalidArgumentException('non-nullable amount cannot be null'); - } $this->container['amount'] = $amount; return $this; @@ -440,9 +437,6 @@ public function getMerchantAccount() */ public function setMerchantAccount($merchantAccount) { - if (is_null($merchantAccount)) { - throw new \InvalidArgumentException('non-nullable merchantAccount cannot be null'); - } $this->container['merchantAccount'] = $merchantAccount; return $this; @@ -467,9 +461,6 @@ public function getPaymentMethod() */ public function setPaymentMethod($paymentMethod) { - if (is_null($paymentMethod)) { - throw new \InvalidArgumentException('non-nullable paymentMethod cannot be null'); - } $this->container['paymentMethod'] = $paymentMethod; return $this; @@ -494,9 +485,6 @@ public function getRecurringDetailReference() */ public function setRecurringDetailReference($recurringDetailReference) { - if (is_null($recurringDetailReference)) { - throw new \InvalidArgumentException('non-nullable recurringDetailReference cannot be null'); - } $this->container['recurringDetailReference'] = $recurringDetailReference; return $this; @@ -521,9 +509,6 @@ public function getReference() */ public function setReference($reference) { - if (is_null($reference)) { - throw new \InvalidArgumentException('non-nullable reference cannot be null'); - } $this->container['reference'] = $reference; return $this; @@ -548,9 +533,6 @@ public function getShopperInteraction() */ 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( @@ -585,9 +567,6 @@ public function getShopperReference() */ public function setShopperReference($shopperReference) { - if (is_null($shopperReference)) { - throw new \InvalidArgumentException('non-nullable shopperReference cannot be null'); - } $this->container['shopperReference'] = $shopperReference; return $this; @@ -612,9 +591,6 @@ public function getStatus() */ 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( @@ -649,9 +625,6 @@ public function getStore() */ public function setStore($store) { - if (is_null($store)) { - throw new \InvalidArgumentException('non-nullable store cannot be null'); - } $this->container['store'] = $store; return $this; diff --git a/src/Adyen/Model/StoredValue/StoredValueStatusChangeResponse.php b/src/Adyen/Model/StoredValue/StoredValueStatusChangeResponse.php index 3700f4e91..dd8346eaa 100644 --- a/src/Adyen/Model/StoredValue/StoredValueStatusChangeResponse.php +++ b/src/Adyen/Model/StoredValue/StoredValueStatusChangeResponse.php @@ -357,9 +357,6 @@ public function getAuthCode() */ public function setAuthCode($authCode) { - if (is_null($authCode)) { - throw new \InvalidArgumentException('non-nullable authCode cannot be null'); - } $this->container['authCode'] = $authCode; return $this; @@ -384,9 +381,6 @@ public function getCurrentBalance() */ public function setCurrentBalance($currentBalance) { - if (is_null($currentBalance)) { - throw new \InvalidArgumentException('non-nullable currentBalance cannot be null'); - } $this->container['currentBalance'] = $currentBalance; return $this; @@ -411,9 +405,6 @@ public function getPspReference() */ public function setPspReference($pspReference) { - if (is_null($pspReference)) { - throw new \InvalidArgumentException('non-nullable pspReference cannot be null'); - } $this->container['pspReference'] = $pspReference; return $this; @@ -438,9 +429,6 @@ public function getRefusalReason() */ public function setRefusalReason($refusalReason) { - if (is_null($refusalReason)) { - throw new \InvalidArgumentException('non-nullable refusalReason cannot be null'); - } $this->container['refusalReason'] = $refusalReason; return $this; @@ -465,9 +453,6 @@ public function getResultCode() */ 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( @@ -502,9 +487,6 @@ public function getThirdPartyRefusalReason() */ public function setThirdPartyRefusalReason($thirdPartyRefusalReason) { - if (is_null($thirdPartyRefusalReason)) { - throw new \InvalidArgumentException('non-nullable thirdPartyRefusalReason cannot be null'); - } $this->container['thirdPartyRefusalReason'] = $thirdPartyRefusalReason; return $this; diff --git a/src/Adyen/Model/StoredValue/StoredValueVoidRequest.php b/src/Adyen/Model/StoredValue/StoredValueVoidRequest.php index a792440e2..76d67016f 100644 --- a/src/Adyen/Model/StoredValue/StoredValueVoidRequest.php +++ b/src/Adyen/Model/StoredValue/StoredValueVoidRequest.php @@ -336,9 +336,6 @@ public function getMerchantAccount() */ public function setMerchantAccount($merchantAccount) { - if (is_null($merchantAccount)) { - throw new \InvalidArgumentException('non-nullable merchantAccount cannot be null'); - } $this->container['merchantAccount'] = $merchantAccount; return $this; @@ -363,9 +360,6 @@ public function getOriginalReference() */ public function setOriginalReference($originalReference) { - if (is_null($originalReference)) { - throw new \InvalidArgumentException('non-nullable originalReference cannot be null'); - } $this->container['originalReference'] = $originalReference; return $this; @@ -390,9 +384,6 @@ public function getReference() */ public function setReference($reference) { - if (is_null($reference)) { - throw new \InvalidArgumentException('non-nullable reference cannot be null'); - } $this->container['reference'] = $reference; return $this; @@ -417,9 +408,6 @@ public function getStore() */ public function setStore($store) { - if (is_null($store)) { - throw new \InvalidArgumentException('non-nullable store cannot be null'); - } $this->container['store'] = $store; return $this; @@ -444,9 +432,6 @@ public function getTenderReference() */ public function setTenderReference($tenderReference) { - if (is_null($tenderReference)) { - throw new \InvalidArgumentException('non-nullable tenderReference cannot be null'); - } $this->container['tenderReference'] = $tenderReference; return $this; @@ -471,9 +456,6 @@ public function getUniqueTerminalId() */ public function setUniqueTerminalId($uniqueTerminalId) { - if (is_null($uniqueTerminalId)) { - throw new \InvalidArgumentException('non-nullable uniqueTerminalId cannot be null'); - } $this->container['uniqueTerminalId'] = $uniqueTerminalId; return $this; diff --git a/src/Adyen/Model/StoredValue/StoredValueVoidResponse.php b/src/Adyen/Model/StoredValue/StoredValueVoidResponse.php index 50a6e1dcc..e4968522e 100644 --- a/src/Adyen/Model/StoredValue/StoredValueVoidResponse.php +++ b/src/Adyen/Model/StoredValue/StoredValueVoidResponse.php @@ -350,9 +350,6 @@ public function getCurrentBalance() */ public function setCurrentBalance($currentBalance) { - if (is_null($currentBalance)) { - throw new \InvalidArgumentException('non-nullable currentBalance cannot be null'); - } $this->container['currentBalance'] = $currentBalance; return $this; @@ -377,9 +374,6 @@ public function getPspReference() */ public function setPspReference($pspReference) { - if (is_null($pspReference)) { - throw new \InvalidArgumentException('non-nullable pspReference cannot be null'); - } $this->container['pspReference'] = $pspReference; return $this; @@ -404,9 +398,6 @@ public function getRefusalReason() */ public function setRefusalReason($refusalReason) { - if (is_null($refusalReason)) { - throw new \InvalidArgumentException('non-nullable refusalReason cannot be null'); - } $this->container['refusalReason'] = $refusalReason; return $this; @@ -431,9 +422,6 @@ public function getResultCode() */ 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( @@ -468,9 +456,6 @@ public function getThirdPartyRefusalReason() */ public function setThirdPartyRefusalReason($thirdPartyRefusalReason) { - if (is_null($thirdPartyRefusalReason)) { - throw new \InvalidArgumentException('non-nullable thirdPartyRefusalReason cannot be null'); - } $this->container['thirdPartyRefusalReason'] = $thirdPartyRefusalReason; return $this; diff --git a/src/Adyen/Model/TransactionWebhooks/Amount.php b/src/Adyen/Model/TransactionWebhooks/Amount.php index 13bffa6f5..31428b4cd 100644 --- a/src/Adyen/Model/TransactionWebhooks/Amount.php +++ b/src/Adyen/Model/TransactionWebhooks/Amount.php @@ -308,9 +308,6 @@ public function getCurrency() */ public function setCurrency($currency) { - if (is_null($currency)) { - throw new \InvalidArgumentException('non-nullable currency cannot be null'); - } $this->container['currency'] = $currency; return $this; @@ -335,9 +332,6 @@ public function getValue() */ public function setValue($value) { - if (is_null($value)) { - throw new \InvalidArgumentException('non-nullable value cannot be null'); - } $this->container['value'] = $value; return $this; diff --git a/src/Adyen/Model/TransactionWebhooks/BalancePlatformNotificationResponse.php b/src/Adyen/Model/TransactionWebhooks/BalancePlatformNotificationResponse.php index 7c4b9b229..65767d080 100644 --- a/src/Adyen/Model/TransactionWebhooks/BalancePlatformNotificationResponse.php +++ b/src/Adyen/Model/TransactionWebhooks/BalancePlatformNotificationResponse.php @@ -295,9 +295,6 @@ public function getNotificationResponse() */ public function setNotificationResponse($notificationResponse) { - if (is_null($notificationResponse)) { - throw new \InvalidArgumentException('non-nullable notificationResponse cannot be null'); - } $this->container['notificationResponse'] = $notificationResponse; return $this; diff --git a/src/Adyen/Model/TransactionWebhooks/ObjectSerializer.php b/src/Adyen/Model/TransactionWebhooks/ObjectSerializer.php index 6592bf84d..9ccc67586 100644 --- a/src/Adyen/Model/TransactionWebhooks/ObjectSerializer.php +++ b/src/Adyen/Model/TransactionWebhooks/ObjectSerializer.php @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach ($data as $property => $value) { + foreach($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) { - return $timestamp; - } + if (!is_string($timestamp)) return $timestamp; return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/TransactionWebhooks/Resource.php b/src/Adyen/Model/TransactionWebhooks/Resource.php index a81359b32..27af581dc 100644 --- a/src/Adyen/Model/TransactionWebhooks/Resource.php +++ b/src/Adyen/Model/TransactionWebhooks/Resource.php @@ -309,9 +309,6 @@ public function getBalancePlatform() */ public function setBalancePlatform($balancePlatform) { - if (is_null($balancePlatform)) { - throw new \InvalidArgumentException('non-nullable balancePlatform cannot be null'); - } $this->container['balancePlatform'] = $balancePlatform; return $this; @@ -336,9 +333,6 @@ public function getCreationDate() */ public function setCreationDate($creationDate) { - if (is_null($creationDate)) { - throw new \InvalidArgumentException('non-nullable creationDate cannot be null'); - } $this->container['creationDate'] = $creationDate; return $this; @@ -363,9 +357,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; diff --git a/src/Adyen/Model/TransactionWebhooks/ResourceReference.php b/src/Adyen/Model/TransactionWebhooks/ResourceReference.php index 4a378dacf..e66e32381 100644 --- a/src/Adyen/Model/TransactionWebhooks/ResourceReference.php +++ b/src/Adyen/Model/TransactionWebhooks/ResourceReference.php @@ -309,9 +309,6 @@ public function getDescription() */ public function setDescription($description) { - if (is_null($description)) { - throw new \InvalidArgumentException('non-nullable description cannot be null'); - } $this->container['description'] = $description; return $this; @@ -336,9 +333,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -363,9 +357,6 @@ public function getReference() */ public function setReference($reference) { - if (is_null($reference)) { - throw new \InvalidArgumentException('non-nullable reference cannot be null'); - } $this->container['reference'] = $reference; return $this; diff --git a/src/Adyen/Model/TransactionWebhooks/Transaction.php b/src/Adyen/Model/TransactionWebhooks/Transaction.php index dd7585401..d5ebf56d4 100644 --- a/src/Adyen/Model/TransactionWebhooks/Transaction.php +++ b/src/Adyen/Model/TransactionWebhooks/Transaction.php @@ -405,9 +405,6 @@ public function getAccountHolder() */ public function setAccountHolder($accountHolder) { - if (is_null($accountHolder)) { - throw new \InvalidArgumentException('non-nullable accountHolder cannot be null'); - } $this->container['accountHolder'] = $accountHolder; return $this; @@ -432,9 +429,6 @@ public function getAmount() */ public function setAmount($amount) { - if (is_null($amount)) { - throw new \InvalidArgumentException('non-nullable amount cannot be null'); - } $this->container['amount'] = $amount; return $this; @@ -459,9 +453,6 @@ public function getBalanceAccount() */ public function setBalanceAccount($balanceAccount) { - if (is_null($balanceAccount)) { - throw new \InvalidArgumentException('non-nullable balanceAccount cannot be null'); - } $this->container['balanceAccount'] = $balanceAccount; return $this; @@ -486,9 +477,6 @@ public function getBalancePlatform() */ public function setBalancePlatform($balancePlatform) { - if (is_null($balancePlatform)) { - throw new \InvalidArgumentException('non-nullable balancePlatform cannot be null'); - } $this->container['balancePlatform'] = $balancePlatform; return $this; @@ -513,9 +501,6 @@ public function getBookingDate() */ public function setBookingDate($bookingDate) { - if (is_null($bookingDate)) { - throw new \InvalidArgumentException('non-nullable bookingDate cannot be null'); - } $this->container['bookingDate'] = $bookingDate; return $this; @@ -540,9 +525,6 @@ public function getCreationDate() */ public function setCreationDate($creationDate) { - if (is_null($creationDate)) { - throw new \InvalidArgumentException('non-nullable creationDate cannot be null'); - } $this->container['creationDate'] = $creationDate; return $this; @@ -567,9 +549,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -594,9 +573,6 @@ public function getStatus() */ 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( @@ -631,9 +607,6 @@ public function getTransfer() */ public function setTransfer($transfer) { - if (is_null($transfer)) { - throw new \InvalidArgumentException('non-nullable transfer cannot be null'); - } $this->container['transfer'] = $transfer; return $this; @@ -658,9 +631,6 @@ public function getValueDate() */ public function setValueDate($valueDate) { - if (is_null($valueDate)) { - throw new \InvalidArgumentException('non-nullable valueDate cannot be null'); - } $this->container['valueDate'] = $valueDate; return $this; diff --git a/src/Adyen/Model/TransactionWebhooks/TransactionNotificationRequestV4.php b/src/Adyen/Model/TransactionWebhooks/TransactionNotificationRequestV4.php index 5078d509b..45a416170 100644 --- a/src/Adyen/Model/TransactionWebhooks/TransactionNotificationRequestV4.php +++ b/src/Adyen/Model/TransactionWebhooks/TransactionNotificationRequestV4.php @@ -336,9 +336,6 @@ public function getData() */ public function setData($data) { - if (is_null($data)) { - throw new \InvalidArgumentException('non-nullable data cannot be null'); - } $this->container['data'] = $data; return $this; @@ -363,9 +360,6 @@ public function getEnvironment() */ public function setEnvironment($environment) { - if (is_null($environment)) { - throw new \InvalidArgumentException('non-nullable environment cannot be null'); - } $this->container['environment'] = $environment; return $this; @@ -390,9 +384,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/TransactionWebhooks/TransferData.php b/src/Adyen/Model/TransactionWebhooks/TransferData.php index 0e27386a2..a2727536d 100644 --- a/src/Adyen/Model/TransactionWebhooks/TransferData.php +++ b/src/Adyen/Model/TransactionWebhooks/TransferData.php @@ -305,9 +305,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -332,9 +329,6 @@ public function getReference() */ public function setReference($reference) { - if (is_null($reference)) { - throw new \InvalidArgumentException('non-nullable reference cannot be null'); - } $this->container['reference'] = $reference; return $this; diff --git a/src/Adyen/Model/TransferWebhooks/AULocalAccountIdentification.php b/src/Adyen/Model/TransferWebhooks/AULocalAccountIdentification.php index f6f35db49..d5dcef8a7 100644 --- a/src/Adyen/Model/TransferWebhooks/AULocalAccountIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/AULocalAccountIdentification.php @@ -339,9 +339,6 @@ public function getAccountNumber() */ public function setAccountNumber($accountNumber) { - if (is_null($accountNumber)) { - throw new \InvalidArgumentException('non-nullable accountNumber cannot be null'); - } $this->container['accountNumber'] = $accountNumber; return $this; @@ -366,9 +363,6 @@ public function getBsbCode() */ public function setBsbCode($bsbCode) { - if (is_null($bsbCode)) { - throw new \InvalidArgumentException('non-nullable bsbCode cannot be null'); - } $this->container['bsbCode'] = $bsbCode; return $this; @@ -393,9 +387,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/TransferWebhooks/AdditionalBankIdentification.php b/src/Adyen/Model/TransferWebhooks/AdditionalBankIdentification.php index 7ef7e40e0..e8724ae0d 100644 --- a/src/Adyen/Model/TransferWebhooks/AdditionalBankIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/AdditionalBankIdentification.php @@ -325,9 +325,6 @@ public function getCode() */ public function setCode($code) { - if (is_null($code)) { - throw new \InvalidArgumentException('non-nullable code cannot be null'); - } $this->container['code'] = $code; return $this; @@ -352,9 +349,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/TransferWebhooks/Address.php b/src/Adyen/Model/TransferWebhooks/Address.php index 7bbd21d9e..9535bdcb4 100644 --- a/src/Adyen/Model/TransferWebhooks/Address.php +++ b/src/Adyen/Model/TransferWebhooks/Address.php @@ -333,9 +333,6 @@ public function getCity() */ public function setCity($city) { - if (is_null($city)) { - throw new \InvalidArgumentException('non-nullable city cannot be null'); - } $this->container['city'] = $city; return $this; @@ -360,9 +357,6 @@ public function getCountry() */ public function setCountry($country) { - if (is_null($country)) { - throw new \InvalidArgumentException('non-nullable country cannot be null'); - } $this->container['country'] = $country; return $this; @@ -387,9 +381,6 @@ public function getLine1() */ public function setLine1($line1) { - if (is_null($line1)) { - throw new \InvalidArgumentException('non-nullable line1 cannot be null'); - } $this->container['line1'] = $line1; return $this; @@ -414,9 +405,6 @@ public function getLine2() */ public function setLine2($line2) { - if (is_null($line2)) { - throw new \InvalidArgumentException('non-nullable line2 cannot be null'); - } $this->container['line2'] = $line2; return $this; @@ -441,9 +429,6 @@ public function getPostalCode() */ public function setPostalCode($postalCode) { - if (is_null($postalCode)) { - throw new \InvalidArgumentException('non-nullable postalCode cannot be null'); - } $this->container['postalCode'] = $postalCode; return $this; @@ -468,9 +453,6 @@ public function getStateOrProvince() */ public function setStateOrProvince($stateOrProvince) { - if (is_null($stateOrProvince)) { - throw new \InvalidArgumentException('non-nullable stateOrProvince cannot be null'); - } $this->container['stateOrProvince'] = $stateOrProvince; return $this; diff --git a/src/Adyen/Model/TransferWebhooks/Amount.php b/src/Adyen/Model/TransferWebhooks/Amount.php index a4a866d69..be11112e9 100644 --- a/src/Adyen/Model/TransferWebhooks/Amount.php +++ b/src/Adyen/Model/TransferWebhooks/Amount.php @@ -308,9 +308,6 @@ public function getCurrency() */ public function setCurrency($currency) { - if (is_null($currency)) { - throw new \InvalidArgumentException('non-nullable currency cannot be null'); - } $this->container['currency'] = $currency; return $this; @@ -335,9 +332,6 @@ public function getValue() */ public function setValue($value) { - if (is_null($value)) { - throw new \InvalidArgumentException('non-nullable value cannot be null'); - } $this->container['value'] = $value; return $this; diff --git a/src/Adyen/Model/TransferWebhooks/AmountAdjustment.php b/src/Adyen/Model/TransferWebhooks/AmountAdjustment.php index 1c34dbffc..b82881cc9 100644 --- a/src/Adyen/Model/TransferWebhooks/AmountAdjustment.php +++ b/src/Adyen/Model/TransferWebhooks/AmountAdjustment.php @@ -336,9 +336,6 @@ public function getAmount() */ public function setAmount($amount) { - if (is_null($amount)) { - throw new \InvalidArgumentException('non-nullable amount cannot be null'); - } $this->container['amount'] = $amount; return $this; @@ -363,9 +360,6 @@ public function getAmountAdjustmentType() */ 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( @@ -400,7 +394,6 @@ public function getBasepoints() */ public function setBasepoints($basepoints) { - // Do nothing for nullable integers $this->container['basepoints'] = $basepoints; return $this; diff --git a/src/Adyen/Model/TransferWebhooks/BRLocalAccountIdentification.php b/src/Adyen/Model/TransferWebhooks/BRLocalAccountIdentification.php index f50584c03..b44c21fc5 100644 --- a/src/Adyen/Model/TransferWebhooks/BRLocalAccountIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/BRLocalAccountIdentification.php @@ -356,9 +356,6 @@ public function getAccountNumber() */ public function setAccountNumber($accountNumber) { - if (is_null($accountNumber)) { - throw new \InvalidArgumentException('non-nullable accountNumber cannot be null'); - } $this->container['accountNumber'] = $accountNumber; return $this; @@ -383,9 +380,6 @@ public function getBankCode() */ public function setBankCode($bankCode) { - if (is_null($bankCode)) { - throw new \InvalidArgumentException('non-nullable bankCode cannot be null'); - } $this->container['bankCode'] = $bankCode; return $this; @@ -410,9 +404,6 @@ public function getBranchNumber() */ public function setBranchNumber($branchNumber) { - if (is_null($branchNumber)) { - throw new \InvalidArgumentException('non-nullable branchNumber cannot be null'); - } $this->container['branchNumber'] = $branchNumber; return $this; @@ -437,9 +428,6 @@ public function getIspb() */ public function setIspb($ispb) { - if (is_null($ispb)) { - throw new \InvalidArgumentException('non-nullable ispb cannot be null'); - } $this->container['ispb'] = $ispb; return $this; @@ -464,9 +452,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/TransferWebhooks/BalanceMutation.php b/src/Adyen/Model/TransferWebhooks/BalanceMutation.php index 5385f0db8..8b90772fb 100644 --- a/src/Adyen/Model/TransferWebhooks/BalanceMutation.php +++ b/src/Adyen/Model/TransferWebhooks/BalanceMutation.php @@ -316,9 +316,6 @@ public function getBalance() */ public function setBalance($balance) { - if (is_null($balance)) { - throw new \InvalidArgumentException('non-nullable balance cannot be null'); - } $this->container['balance'] = $balance; return $this; @@ -343,9 +340,6 @@ public function getCurrency() */ public function setCurrency($currency) { - if (is_null($currency)) { - throw new \InvalidArgumentException('non-nullable currency cannot be null'); - } $this->container['currency'] = $currency; return $this; @@ -370,9 +364,6 @@ public function getReceived() */ public function setReceived($received) { - if (is_null($received)) { - throw new \InvalidArgumentException('non-nullable received cannot be null'); - } $this->container['received'] = $received; return $this; @@ -397,9 +388,6 @@ public function getReserved() */ public function setReserved($reserved) { - if (is_null($reserved)) { - throw new \InvalidArgumentException('non-nullable reserved cannot be null'); - } $this->container['reserved'] = $reserved; return $this; diff --git a/src/Adyen/Model/TransferWebhooks/BalancePlatformNotificationResponse.php b/src/Adyen/Model/TransferWebhooks/BalancePlatformNotificationResponse.php index cb53d5b3b..4b2aac976 100644 --- a/src/Adyen/Model/TransferWebhooks/BalancePlatformNotificationResponse.php +++ b/src/Adyen/Model/TransferWebhooks/BalancePlatformNotificationResponse.php @@ -295,9 +295,6 @@ public function getNotificationResponse() */ public function setNotificationResponse($notificationResponse) { - if (is_null($notificationResponse)) { - throw new \InvalidArgumentException('non-nullable notificationResponse cannot be null'); - } $this->container['notificationResponse'] = $notificationResponse; return $this; diff --git a/src/Adyen/Model/TransferWebhooks/BankAccountV3.php b/src/Adyen/Model/TransferWebhooks/BankAccountV3.php index f312209a5..ff03875fd 100644 --- a/src/Adyen/Model/TransferWebhooks/BankAccountV3.php +++ b/src/Adyen/Model/TransferWebhooks/BankAccountV3.php @@ -308,9 +308,6 @@ public function getAccountHolder() */ public function setAccountHolder($accountHolder) { - if (is_null($accountHolder)) { - throw new \InvalidArgumentException('non-nullable accountHolder cannot be null'); - } $this->container['accountHolder'] = $accountHolder; return $this; @@ -335,9 +332,6 @@ public function getAccountIdentification() */ public function setAccountIdentification($accountIdentification) { - if (is_null($accountIdentification)) { - throw new \InvalidArgumentException('non-nullable accountIdentification cannot be null'); - } $this->container['accountIdentification'] = $accountIdentification; return $this; diff --git a/src/Adyen/Model/TransferWebhooks/BankAccountV3AccountIdentification.php b/src/Adyen/Model/TransferWebhooks/BankAccountV3AccountIdentification.php index ac344e88c..fca9b702f 100644 --- a/src/Adyen/Model/TransferWebhooks/BankAccountV3AccountIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/BankAccountV3AccountIdentification.php @@ -441,9 +441,6 @@ public function getAccountNumber() */ public function setAccountNumber($accountNumber) { - if (is_null($accountNumber)) { - throw new \InvalidArgumentException('non-nullable accountNumber cannot be null'); - } $this->container['accountNumber'] = $accountNumber; return $this; @@ -468,9 +465,6 @@ public function getBsbCode() */ public function setBsbCode($bsbCode) { - if (is_null($bsbCode)) { - throw new \InvalidArgumentException('non-nullable bsbCode cannot be null'); - } $this->container['bsbCode'] = $bsbCode; return $this; @@ -495,9 +489,6 @@ public function getType() */ public function setType($type) { - if (is_null($type)) { - throw new \InvalidArgumentException('non-nullable type cannot be null'); - } $this->container['type'] = $type; return $this; @@ -522,9 +513,6 @@ public function getBankCode() */ public function setBankCode($bankCode) { - if (is_null($bankCode)) { - throw new \InvalidArgumentException('non-nullable bankCode cannot be null'); - } $this->container['bankCode'] = $bankCode; return $this; @@ -549,9 +537,6 @@ public function getBranchNumber() */ public function setBranchNumber($branchNumber) { - if (is_null($branchNumber)) { - throw new \InvalidArgumentException('non-nullable branchNumber cannot be null'); - } $this->container['branchNumber'] = $branchNumber; return $this; @@ -576,9 +561,6 @@ public function getIspb() */ public function setIspb($ispb) { - if (is_null($ispb)) { - throw new \InvalidArgumentException('non-nullable ispb cannot be null'); - } $this->container['ispb'] = $ispb; return $this; @@ -603,9 +585,6 @@ public function getAccountType() */ public function setAccountType($accountType) { - if (is_null($accountType)) { - throw new \InvalidArgumentException('non-nullable accountType cannot be null'); - } $this->container['accountType'] = $accountType; return $this; @@ -630,9 +609,6 @@ public function getInstitutionNumber() */ public function setInstitutionNumber($institutionNumber) { - if (is_null($institutionNumber)) { - throw new \InvalidArgumentException('non-nullable institutionNumber cannot be null'); - } $this->container['institutionNumber'] = $institutionNumber; return $this; @@ -657,9 +633,6 @@ public function getTransitNumber() */ public function setTransitNumber($transitNumber) { - if (is_null($transitNumber)) { - throw new \InvalidArgumentException('non-nullable transitNumber cannot be null'); - } $this->container['transitNumber'] = $transitNumber; return $this; @@ -684,9 +657,6 @@ public function getClearingCode() */ public function setClearingCode($clearingCode) { - if (is_null($clearingCode)) { - throw new \InvalidArgumentException('non-nullable clearingCode cannot be null'); - } $this->container['clearingCode'] = $clearingCode; return $this; @@ -711,9 +681,6 @@ public function getIban() */ public function setIban($iban) { - if (is_null($iban)) { - throw new \InvalidArgumentException('non-nullable iban cannot be null'); - } $this->container['iban'] = $iban; return $this; @@ -738,9 +705,6 @@ public function getAdditionalBankIdentification() */ public function setAdditionalBankIdentification($additionalBankIdentification) { - if (is_null($additionalBankIdentification)) { - throw new \InvalidArgumentException('non-nullable additionalBankIdentification cannot be null'); - } $this->container['additionalBankIdentification'] = $additionalBankIdentification; return $this; @@ -765,9 +729,6 @@ public function getBic() */ public function setBic($bic) { - if (is_null($bic)) { - throw new \InvalidArgumentException('non-nullable bic cannot be null'); - } $this->container['bic'] = $bic; return $this; @@ -792,9 +753,6 @@ public function getClearingNumber() */ public function setClearingNumber($clearingNumber) { - if (is_null($clearingNumber)) { - throw new \InvalidArgumentException('non-nullable clearingNumber cannot be null'); - } $this->container['clearingNumber'] = $clearingNumber; return $this; @@ -819,9 +777,6 @@ public function getSortCode() */ public function setSortCode($sortCode) { - if (is_null($sortCode)) { - throw new \InvalidArgumentException('non-nullable sortCode cannot be null'); - } $this->container['sortCode'] = $sortCode; return $this; @@ -846,9 +801,6 @@ public function getRoutingNumber() */ public function setRoutingNumber($routingNumber) { - if (is_null($routingNumber)) { - throw new \InvalidArgumentException('non-nullable routingNumber cannot be null'); - } $this->container['routingNumber'] = $routingNumber; return $this; diff --git a/src/Adyen/Model/TransferWebhooks/BankCategoryData.php b/src/Adyen/Model/TransferWebhooks/BankCategoryData.php index 023dcdbd0..745e448a4 100644 --- a/src/Adyen/Model/TransferWebhooks/BankCategoryData.php +++ b/src/Adyen/Model/TransferWebhooks/BankCategoryData.php @@ -354,9 +354,6 @@ public function getPriority() */ 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( @@ -391,9 +388,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/TransferWebhooks/CALocalAccountIdentification.php b/src/Adyen/Model/TransferWebhooks/CALocalAccountIdentification.php index 5a55b7011..34df4878b 100644 --- a/src/Adyen/Model/TransferWebhooks/CALocalAccountIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/CALocalAccountIdentification.php @@ -379,9 +379,6 @@ public function getAccountNumber() */ public function setAccountNumber($accountNumber) { - if (is_null($accountNumber)) { - throw new \InvalidArgumentException('non-nullable accountNumber cannot be null'); - } $this->container['accountNumber'] = $accountNumber; return $this; @@ -406,9 +403,6 @@ public function getAccountType() */ 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( @@ -443,9 +437,6 @@ public function getInstitutionNumber() */ public function setInstitutionNumber($institutionNumber) { - if (is_null($institutionNumber)) { - throw new \InvalidArgumentException('non-nullable institutionNumber cannot be null'); - } $this->container['institutionNumber'] = $institutionNumber; return $this; @@ -470,9 +461,6 @@ public function getTransitNumber() */ public function setTransitNumber($transitNumber) { - if (is_null($transitNumber)) { - throw new \InvalidArgumentException('non-nullable transitNumber cannot be null'); - } $this->container['transitNumber'] = $transitNumber; return $this; @@ -497,9 +485,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/TransferWebhooks/CZLocalAccountIdentification.php b/src/Adyen/Model/TransferWebhooks/CZLocalAccountIdentification.php index 02388df89..d7203a312 100644 --- a/src/Adyen/Model/TransferWebhooks/CZLocalAccountIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/CZLocalAccountIdentification.php @@ -339,9 +339,6 @@ public function getAccountNumber() */ public function setAccountNumber($accountNumber) { - if (is_null($accountNumber)) { - throw new \InvalidArgumentException('non-nullable accountNumber cannot be null'); - } $this->container['accountNumber'] = $accountNumber; return $this; @@ -366,9 +363,6 @@ public function getBankCode() */ public function setBankCode($bankCode) { - if (is_null($bankCode)) { - throw new \InvalidArgumentException('non-nullable bankCode cannot be null'); - } $this->container['bankCode'] = $bankCode; return $this; @@ -393,9 +387,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/TransferWebhooks/ConfirmationTrackingData.php b/src/Adyen/Model/TransferWebhooks/ConfirmationTrackingData.php index 323408f74..3a14b8fa8 100644 --- a/src/Adyen/Model/TransferWebhooks/ConfirmationTrackingData.php +++ b/src/Adyen/Model/TransferWebhooks/ConfirmationTrackingData.php @@ -350,9 +350,6 @@ public function getStatus() */ 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( @@ -387,9 +384,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/TransferWebhooks/CounterpartyV3.php b/src/Adyen/Model/TransferWebhooks/CounterpartyV3.php index 50f120d32..91885776f 100644 --- a/src/Adyen/Model/TransferWebhooks/CounterpartyV3.php +++ b/src/Adyen/Model/TransferWebhooks/CounterpartyV3.php @@ -316,9 +316,6 @@ public function getBalanceAccountId() */ public function setBalanceAccountId($balanceAccountId) { - if (is_null($balanceAccountId)) { - throw new \InvalidArgumentException('non-nullable balanceAccountId cannot be null'); - } $this->container['balanceAccountId'] = $balanceAccountId; return $this; @@ -343,9 +340,6 @@ public function getBankAccount() */ public function setBankAccount($bankAccount) { - if (is_null($bankAccount)) { - throw new \InvalidArgumentException('non-nullable bankAccount cannot be null'); - } $this->container['bankAccount'] = $bankAccount; return $this; @@ -370,9 +364,6 @@ public function getMerchant() */ public function setMerchant($merchant) { - if (is_null($merchant)) { - throw new \InvalidArgumentException('non-nullable merchant cannot be null'); - } $this->container['merchant'] = $merchant; return $this; @@ -397,9 +388,6 @@ public function getTransferInstrumentId() */ public function setTransferInstrumentId($transferInstrumentId) { - if (is_null($transferInstrumentId)) { - throw new \InvalidArgumentException('non-nullable transferInstrumentId cannot be null'); - } $this->container['transferInstrumentId'] = $transferInstrumentId; return $this; diff --git a/src/Adyen/Model/TransferWebhooks/DKLocalAccountIdentification.php b/src/Adyen/Model/TransferWebhooks/DKLocalAccountIdentification.php index 23975a0d3..839421717 100644 --- a/src/Adyen/Model/TransferWebhooks/DKLocalAccountIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/DKLocalAccountIdentification.php @@ -339,9 +339,6 @@ public function getAccountNumber() */ public function setAccountNumber($accountNumber) { - if (is_null($accountNumber)) { - throw new \InvalidArgumentException('non-nullable accountNumber cannot be null'); - } $this->container['accountNumber'] = $accountNumber; return $this; @@ -366,9 +363,6 @@ public function getBankCode() */ public function setBankCode($bankCode) { - if (is_null($bankCode)) { - throw new \InvalidArgumentException('non-nullable bankCode cannot be null'); - } $this->container['bankCode'] = $bankCode; return $this; @@ -393,9 +387,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/TransferWebhooks/EstimationTrackingData.php b/src/Adyen/Model/TransferWebhooks/EstimationTrackingData.php index 58cff5a8b..49984832f 100644 --- a/src/Adyen/Model/TransferWebhooks/EstimationTrackingData.php +++ b/src/Adyen/Model/TransferWebhooks/EstimationTrackingData.php @@ -329,9 +329,6 @@ public function getEstimatedArrivalTime() */ public function setEstimatedArrivalTime($estimatedArrivalTime) { - if (is_null($estimatedArrivalTime)) { - throw new \InvalidArgumentException('non-nullable estimatedArrivalTime cannot be null'); - } $this->container['estimatedArrivalTime'] = $estimatedArrivalTime; return $this; @@ -356,9 +353,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/TransferWebhooks/ExternalReason.php b/src/Adyen/Model/TransferWebhooks/ExternalReason.php index 15412d81f..0ab3887af 100644 --- a/src/Adyen/Model/TransferWebhooks/ExternalReason.php +++ b/src/Adyen/Model/TransferWebhooks/ExternalReason.php @@ -309,9 +309,6 @@ public function getCode() */ public function setCode($code) { - if (is_null($code)) { - throw new \InvalidArgumentException('non-nullable code cannot be null'); - } $this->container['code'] = $code; return $this; @@ -336,9 +333,6 @@ public function getDescription() */ public function setDescription($description) { - if (is_null($description)) { - throw new \InvalidArgumentException('non-nullable description cannot be null'); - } $this->container['description'] = $description; return $this; @@ -363,9 +357,6 @@ public function getNamespace() */ public function setNamespace($namespace) { - if (is_null($namespace)) { - throw new \InvalidArgumentException('non-nullable namespace cannot be null'); - } $this->container['namespace'] = $namespace; return $this; diff --git a/src/Adyen/Model/TransferWebhooks/HKLocalAccountIdentification.php b/src/Adyen/Model/TransferWebhooks/HKLocalAccountIdentification.php index 8c044991e..666744eb8 100644 --- a/src/Adyen/Model/TransferWebhooks/HKLocalAccountIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/HKLocalAccountIdentification.php @@ -339,9 +339,6 @@ public function getAccountNumber() */ public function setAccountNumber($accountNumber) { - if (is_null($accountNumber)) { - throw new \InvalidArgumentException('non-nullable accountNumber cannot be null'); - } $this->container['accountNumber'] = $accountNumber; return $this; @@ -366,9 +363,6 @@ public function getClearingCode() */ public function setClearingCode($clearingCode) { - if (is_null($clearingCode)) { - throw new \InvalidArgumentException('non-nullable clearingCode cannot be null'); - } $this->container['clearingCode'] = $clearingCode; return $this; @@ -393,9 +387,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/TransferWebhooks/HULocalAccountIdentification.php b/src/Adyen/Model/TransferWebhooks/HULocalAccountIdentification.php index 1104d3a2a..717505890 100644 --- a/src/Adyen/Model/TransferWebhooks/HULocalAccountIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/HULocalAccountIdentification.php @@ -329,9 +329,6 @@ public function getAccountNumber() */ public function setAccountNumber($accountNumber) { - if (is_null($accountNumber)) { - throw new \InvalidArgumentException('non-nullable accountNumber cannot be null'); - } $this->container['accountNumber'] = $accountNumber; return $this; @@ -356,9 +353,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/TransferWebhooks/IbanAccountIdentification.php b/src/Adyen/Model/TransferWebhooks/IbanAccountIdentification.php index afdd5b7a1..1ef18c00d 100644 --- a/src/Adyen/Model/TransferWebhooks/IbanAccountIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/IbanAccountIdentification.php @@ -329,9 +329,6 @@ public function getIban() */ public function setIban($iban) { - if (is_null($iban)) { - throw new \InvalidArgumentException('non-nullable iban cannot be null'); - } $this->container['iban'] = $iban; return $this; @@ -356,9 +353,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/TransferWebhooks/InternalCategoryData.php b/src/Adyen/Model/TransferWebhooks/InternalCategoryData.php index 778756f35..b3237b802 100644 --- a/src/Adyen/Model/TransferWebhooks/InternalCategoryData.php +++ b/src/Adyen/Model/TransferWebhooks/InternalCategoryData.php @@ -330,9 +330,6 @@ public function getModificationMerchantReference() */ public function setModificationMerchantReference($modificationMerchantReference) { - if (is_null($modificationMerchantReference)) { - throw new \InvalidArgumentException('non-nullable modificationMerchantReference cannot be null'); - } $this->container['modificationMerchantReference'] = $modificationMerchantReference; return $this; @@ -357,9 +354,6 @@ public function getModificationPspReference() */ public function setModificationPspReference($modificationPspReference) { - if (is_null($modificationPspReference)) { - throw new \InvalidArgumentException('non-nullable modificationPspReference cannot be null'); - } $this->container['modificationPspReference'] = $modificationPspReference; return $this; @@ -384,9 +378,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/TransferWebhooks/InternalReviewTrackingData.php b/src/Adyen/Model/TransferWebhooks/InternalReviewTrackingData.php index e38ded969..b230b2260 100644 --- a/src/Adyen/Model/TransferWebhooks/InternalReviewTrackingData.php +++ b/src/Adyen/Model/TransferWebhooks/InternalReviewTrackingData.php @@ -380,9 +380,6 @@ public function getReason() */ 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( @@ -417,9 +414,6 @@ public function getStatus() */ 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( @@ -454,9 +448,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/TransferWebhooks/IssuedCard.php b/src/Adyen/Model/TransferWebhooks/IssuedCard.php index 5241c52b7..82b7204db 100644 --- a/src/Adyen/Model/TransferWebhooks/IssuedCard.php +++ b/src/Adyen/Model/TransferWebhooks/IssuedCard.php @@ -433,9 +433,6 @@ public function getAuthorisationType() */ public function setAuthorisationType($authorisationType) { - if (is_null($authorisationType)) { - throw new \InvalidArgumentException('non-nullable authorisationType cannot be null'); - } $this->container['authorisationType'] = $authorisationType; return $this; @@ -460,9 +457,6 @@ public function getPanEntryMode() */ 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( @@ -497,9 +491,6 @@ public function getProcessingType() */ 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( @@ -534,9 +525,6 @@ public function getRelayedAuthorisationData() */ public function setRelayedAuthorisationData($relayedAuthorisationData) { - if (is_null($relayedAuthorisationData)) { - throw new \InvalidArgumentException('non-nullable relayedAuthorisationData cannot be null'); - } $this->container['relayedAuthorisationData'] = $relayedAuthorisationData; return $this; @@ -561,9 +549,6 @@ public function getSchemeTraceId() */ public function setSchemeTraceId($schemeTraceId) { - if (is_null($schemeTraceId)) { - throw new \InvalidArgumentException('non-nullable schemeTraceId cannot be null'); - } $this->container['schemeTraceId'] = $schemeTraceId; return $this; @@ -588,9 +573,6 @@ public function getSchemeUniqueTransactionId() */ public function setSchemeUniqueTransactionId($schemeUniqueTransactionId) { - if (is_null($schemeUniqueTransactionId)) { - throw new \InvalidArgumentException('non-nullable schemeUniqueTransactionId cannot be null'); - } $this->container['schemeUniqueTransactionId'] = $schemeUniqueTransactionId; return $this; @@ -615,9 +597,6 @@ public function getType() */ 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( @@ -652,9 +631,6 @@ public function getValidationFacts() */ public function setValidationFacts($validationFacts) { - if (is_null($validationFacts)) { - throw new \InvalidArgumentException('non-nullable validationFacts cannot be null'); - } $this->container['validationFacts'] = $validationFacts; return $this; diff --git a/src/Adyen/Model/TransferWebhooks/MerchantData.php b/src/Adyen/Model/TransferWebhooks/MerchantData.php index a0c142590..fe92244f0 100644 --- a/src/Adyen/Model/TransferWebhooks/MerchantData.php +++ b/src/Adyen/Model/TransferWebhooks/MerchantData.php @@ -323,9 +323,6 @@ public function getAcquirerId() */ public function setAcquirerId($acquirerId) { - if (is_null($acquirerId)) { - throw new \InvalidArgumentException('non-nullable acquirerId cannot be null'); - } $this->container['acquirerId'] = $acquirerId; return $this; @@ -350,9 +347,6 @@ public function getMcc() */ public function setMcc($mcc) { - if (is_null($mcc)) { - throw new \InvalidArgumentException('non-nullable mcc cannot be null'); - } $this->container['mcc'] = $mcc; return $this; @@ -377,9 +371,6 @@ public function getMerchantId() */ public function setMerchantId($merchantId) { - if (is_null($merchantId)) { - throw new \InvalidArgumentException('non-nullable merchantId cannot be null'); - } $this->container['merchantId'] = $merchantId; return $this; @@ -404,9 +395,6 @@ public function getNameLocation() */ public function setNameLocation($nameLocation) { - if (is_null($nameLocation)) { - throw new \InvalidArgumentException('non-nullable nameLocation cannot be null'); - } $this->container['nameLocation'] = $nameLocation; return $this; @@ -431,9 +419,6 @@ public function getPostalCode() */ public function setPostalCode($postalCode) { - if (is_null($postalCode)) { - throw new \InvalidArgumentException('non-nullable postalCode cannot be null'); - } $this->container['postalCode'] = $postalCode; return $this; diff --git a/src/Adyen/Model/TransferWebhooks/Modification.php b/src/Adyen/Model/TransferWebhooks/Modification.php index 404d5cf39..41fadc1e8 100644 --- a/src/Adyen/Model/TransferWebhooks/Modification.php +++ b/src/Adyen/Model/TransferWebhooks/Modification.php @@ -472,9 +472,6 @@ public function getDirection() */ public function setDirection($direction) { - if (is_null($direction)) { - throw new \InvalidArgumentException('non-nullable direction cannot be null'); - } $this->container['direction'] = $direction; return $this; @@ -499,9 +496,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -526,9 +520,6 @@ public function getReference() */ public function setReference($reference) { - if (is_null($reference)) { - throw new \InvalidArgumentException('non-nullable reference cannot be null'); - } $this->container['reference'] = $reference; return $this; @@ -553,9 +544,6 @@ public function getStatus() */ 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( @@ -590,9 +578,6 @@ public function getType() */ public function setType($type) { - if (is_null($type)) { - throw new \InvalidArgumentException('non-nullable type cannot be null'); - } $this->container['type'] = $type; return $this; diff --git a/src/Adyen/Model/TransferWebhooks/NOLocalAccountIdentification.php b/src/Adyen/Model/TransferWebhooks/NOLocalAccountIdentification.php index 7d1585575..e15bda039 100644 --- a/src/Adyen/Model/TransferWebhooks/NOLocalAccountIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/NOLocalAccountIdentification.php @@ -329,9 +329,6 @@ public function getAccountNumber() */ public function setAccountNumber($accountNumber) { - if (is_null($accountNumber)) { - throw new \InvalidArgumentException('non-nullable accountNumber cannot be null'); - } $this->container['accountNumber'] = $accountNumber; return $this; @@ -356,9 +353,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/TransferWebhooks/NZLocalAccountIdentification.php b/src/Adyen/Model/TransferWebhooks/NZLocalAccountIdentification.php index 8217c1ff0..6760c287f 100644 --- a/src/Adyen/Model/TransferWebhooks/NZLocalAccountIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/NZLocalAccountIdentification.php @@ -329,9 +329,6 @@ public function getAccountNumber() */ public function setAccountNumber($accountNumber) { - if (is_null($accountNumber)) { - throw new \InvalidArgumentException('non-nullable accountNumber cannot be null'); - } $this->container['accountNumber'] = $accountNumber; return $this; @@ -356,9 +353,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/TransferWebhooks/NameLocation.php b/src/Adyen/Model/TransferWebhooks/NameLocation.php index a5ccf6c38..53acf5781 100644 --- a/src/Adyen/Model/TransferWebhooks/NameLocation.php +++ b/src/Adyen/Model/TransferWebhooks/NameLocation.php @@ -330,9 +330,6 @@ public function getCity() */ public function setCity($city) { - if (is_null($city)) { - throw new \InvalidArgumentException('non-nullable city cannot be null'); - } $this->container['city'] = $city; return $this; @@ -357,9 +354,6 @@ public function getCountry() */ public function setCountry($country) { - if (is_null($country)) { - throw new \InvalidArgumentException('non-nullable country cannot be null'); - } $this->container['country'] = $country; return $this; @@ -384,9 +378,6 @@ public function getCountryOfOrigin() */ public function setCountryOfOrigin($countryOfOrigin) { - if (is_null($countryOfOrigin)) { - throw new \InvalidArgumentException('non-nullable countryOfOrigin cannot be null'); - } $this->container['countryOfOrigin'] = $countryOfOrigin; return $this; @@ -411,9 +402,6 @@ public function getName() */ public function setName($name) { - if (is_null($name)) { - throw new \InvalidArgumentException('non-nullable name cannot be null'); - } $this->container['name'] = $name; return $this; @@ -438,9 +426,6 @@ public function getRawData() */ public function setRawData($rawData) { - if (is_null($rawData)) { - throw new \InvalidArgumentException('non-nullable rawData cannot be null'); - } $this->container['rawData'] = $rawData; return $this; @@ -465,9 +450,6 @@ public function getState() */ public function setState($state) { - if (is_null($state)) { - throw new \InvalidArgumentException('non-nullable state cannot be null'); - } $this->container['state'] = $state; return $this; diff --git a/src/Adyen/Model/TransferWebhooks/NumberAndBicAccountIdentification.php b/src/Adyen/Model/TransferWebhooks/NumberAndBicAccountIdentification.php index 83bc4aace..d821d183f 100644 --- a/src/Adyen/Model/TransferWebhooks/NumberAndBicAccountIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/NumberAndBicAccountIdentification.php @@ -346,9 +346,6 @@ public function getAccountNumber() */ public function setAccountNumber($accountNumber) { - if (is_null($accountNumber)) { - throw new \InvalidArgumentException('non-nullable accountNumber cannot be null'); - } $this->container['accountNumber'] = $accountNumber; return $this; @@ -373,9 +370,6 @@ public function getAdditionalBankIdentification() */ public function setAdditionalBankIdentification($additionalBankIdentification) { - if (is_null($additionalBankIdentification)) { - throw new \InvalidArgumentException('non-nullable additionalBankIdentification cannot be null'); - } $this->container['additionalBankIdentification'] = $additionalBankIdentification; return $this; @@ -400,9 +394,6 @@ public function getBic() */ public function setBic($bic) { - if (is_null($bic)) { - throw new \InvalidArgumentException('non-nullable bic cannot be null'); - } $this->container['bic'] = $bic; return $this; @@ -427,9 +418,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/TransferWebhooks/ObjectSerializer.php b/src/Adyen/Model/TransferWebhooks/ObjectSerializer.php index 01b25bf23..d05b26906 100644 --- a/src/Adyen/Model/TransferWebhooks/ObjectSerializer.php +++ b/src/Adyen/Model/TransferWebhooks/ObjectSerializer.php @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach ($data as $property => $value) { + foreach($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) { - return $timestamp; - } + if (!is_string($timestamp)) return $timestamp; return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/TransferWebhooks/PLLocalAccountIdentification.php b/src/Adyen/Model/TransferWebhooks/PLLocalAccountIdentification.php index 6127aedbb..faa3a5356 100644 --- a/src/Adyen/Model/TransferWebhooks/PLLocalAccountIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/PLLocalAccountIdentification.php @@ -329,9 +329,6 @@ public function getAccountNumber() */ public function setAccountNumber($accountNumber) { - if (is_null($accountNumber)) { - throw new \InvalidArgumentException('non-nullable accountNumber cannot be null'); - } $this->container['accountNumber'] = $accountNumber; return $this; @@ -356,9 +353,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/TransferWebhooks/PartyIdentification.php b/src/Adyen/Model/TransferWebhooks/PartyIdentification.php index 1a1bedc79..b7713d785 100644 --- a/src/Adyen/Model/TransferWebhooks/PartyIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/PartyIdentification.php @@ -365,9 +365,6 @@ public function getAddress() */ public function setAddress($address) { - if (is_null($address)) { - throw new \InvalidArgumentException('non-nullable address cannot be null'); - } $this->container['address'] = $address; return $this; @@ -392,9 +389,6 @@ public function getDateOfBirth() */ public function setDateOfBirth($dateOfBirth) { - if (is_null($dateOfBirth)) { - throw new \InvalidArgumentException('non-nullable dateOfBirth cannot be null'); - } $this->container['dateOfBirth'] = $dateOfBirth; return $this; @@ -419,9 +413,6 @@ public function getFirstName() */ public function setFirstName($firstName) { - if (is_null($firstName)) { - throw new \InvalidArgumentException('non-nullable firstName cannot be null'); - } $this->container['firstName'] = $firstName; return $this; @@ -446,9 +437,6 @@ public function getFullName() */ public function setFullName($fullName) { - if (is_null($fullName)) { - throw new \InvalidArgumentException('non-nullable fullName cannot be null'); - } $this->container['fullName'] = $fullName; return $this; @@ -473,9 +461,6 @@ public function getLastName() */ public function setLastName($lastName) { - if (is_null($lastName)) { - throw new \InvalidArgumentException('non-nullable lastName cannot be null'); - } $this->container['lastName'] = $lastName; return $this; @@ -500,9 +485,6 @@ public function getReference() */ public function setReference($reference) { - if (is_null($reference)) { - throw new \InvalidArgumentException('non-nullable reference cannot be null'); - } $this->container['reference'] = $reference; return $this; @@ -527,9 +509,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/TransferWebhooks/PaymentInstrument.php b/src/Adyen/Model/TransferWebhooks/PaymentInstrument.php index f229f7a97..daf4dbbba 100644 --- a/src/Adyen/Model/TransferWebhooks/PaymentInstrument.php +++ b/src/Adyen/Model/TransferWebhooks/PaymentInstrument.php @@ -316,9 +316,6 @@ public function getDescription() */ public function setDescription($description) { - if (is_null($description)) { - throw new \InvalidArgumentException('non-nullable description cannot be null'); - } $this->container['description'] = $description; return $this; @@ -343,9 +340,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -370,9 +364,6 @@ public function getReference() */ public function setReference($reference) { - if (is_null($reference)) { - throw new \InvalidArgumentException('non-nullable reference cannot be null'); - } $this->container['reference'] = $reference; return $this; @@ -397,9 +388,6 @@ public function getTokenType() */ public function setTokenType($tokenType) { - if (is_null($tokenType)) { - throw new \InvalidArgumentException('non-nullable tokenType cannot be null'); - } $this->container['tokenType'] = $tokenType; return $this; diff --git a/src/Adyen/Model/TransferWebhooks/PlatformPayment.php b/src/Adyen/Model/TransferWebhooks/PlatformPayment.php index e16fa09f6..54a01aca3 100644 --- a/src/Adyen/Model/TransferWebhooks/PlatformPayment.php +++ b/src/Adyen/Model/TransferWebhooks/PlatformPayment.php @@ -400,9 +400,6 @@ public function getModificationMerchantReference() */ public function setModificationMerchantReference($modificationMerchantReference) { - if (is_null($modificationMerchantReference)) { - throw new \InvalidArgumentException('non-nullable modificationMerchantReference cannot be null'); - } $this->container['modificationMerchantReference'] = $modificationMerchantReference; return $this; @@ -427,9 +424,6 @@ public function getModificationPspReference() */ public function setModificationPspReference($modificationPspReference) { - if (is_null($modificationPspReference)) { - throw new \InvalidArgumentException('non-nullable modificationPspReference cannot be null'); - } $this->container['modificationPspReference'] = $modificationPspReference; return $this; @@ -454,9 +448,6 @@ public function getPaymentMerchantReference() */ public function setPaymentMerchantReference($paymentMerchantReference) { - if (is_null($paymentMerchantReference)) { - throw new \InvalidArgumentException('non-nullable paymentMerchantReference cannot be null'); - } $this->container['paymentMerchantReference'] = $paymentMerchantReference; return $this; @@ -481,9 +472,6 @@ public function getPlatformPaymentType() */ 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( @@ -518,9 +506,6 @@ public function getPspPaymentReference() */ public function setPspPaymentReference($pspPaymentReference) { - if (is_null($pspPaymentReference)) { - throw new \InvalidArgumentException('non-nullable pspPaymentReference cannot be null'); - } $this->container['pspPaymentReference'] = $pspPaymentReference; return $this; @@ -545,9 +530,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/TransferWebhooks/RelayedAuthorisationData.php b/src/Adyen/Model/TransferWebhooks/RelayedAuthorisationData.php index ba6c5f72f..e2f49621d 100644 --- a/src/Adyen/Model/TransferWebhooks/RelayedAuthorisationData.php +++ b/src/Adyen/Model/TransferWebhooks/RelayedAuthorisationData.php @@ -302,9 +302,6 @@ public function getMetadata() */ public function setMetadata($metadata) { - if (is_null($metadata)) { - throw new \InvalidArgumentException('non-nullable metadata cannot be null'); - } $this->container['metadata'] = $metadata; return $this; @@ -329,9 +326,6 @@ public function getReference() */ public function setReference($reference) { - if (is_null($reference)) { - throw new \InvalidArgumentException('non-nullable reference cannot be null'); - } $this->container['reference'] = $reference; return $this; diff --git a/src/Adyen/Model/TransferWebhooks/Resource.php b/src/Adyen/Model/TransferWebhooks/Resource.php index 22ff41d7d..26ee1f5a4 100644 --- a/src/Adyen/Model/TransferWebhooks/Resource.php +++ b/src/Adyen/Model/TransferWebhooks/Resource.php @@ -309,9 +309,6 @@ public function getBalancePlatform() */ public function setBalancePlatform($balancePlatform) { - if (is_null($balancePlatform)) { - throw new \InvalidArgumentException('non-nullable balancePlatform cannot be null'); - } $this->container['balancePlatform'] = $balancePlatform; return $this; @@ -336,9 +333,6 @@ public function getCreationDate() */ public function setCreationDate($creationDate) { - if (is_null($creationDate)) { - throw new \InvalidArgumentException('non-nullable creationDate cannot be null'); - } $this->container['creationDate'] = $creationDate; return $this; @@ -363,9 +357,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; diff --git a/src/Adyen/Model/TransferWebhooks/ResourceReference.php b/src/Adyen/Model/TransferWebhooks/ResourceReference.php index b3785dd3f..3dbb69460 100644 --- a/src/Adyen/Model/TransferWebhooks/ResourceReference.php +++ b/src/Adyen/Model/TransferWebhooks/ResourceReference.php @@ -309,9 +309,6 @@ public function getDescription() */ public function setDescription($description) { - if (is_null($description)) { - throw new \InvalidArgumentException('non-nullable description cannot be null'); - } $this->container['description'] = $description; return $this; @@ -336,9 +333,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -363,9 +357,6 @@ public function getReference() */ public function setReference($reference) { - if (is_null($reference)) { - throw new \InvalidArgumentException('non-nullable reference cannot be null'); - } $this->container['reference'] = $reference; return $this; diff --git a/src/Adyen/Model/TransferWebhooks/SELocalAccountIdentification.php b/src/Adyen/Model/TransferWebhooks/SELocalAccountIdentification.php index c783c4484..2347db0b8 100644 --- a/src/Adyen/Model/TransferWebhooks/SELocalAccountIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/SELocalAccountIdentification.php @@ -339,9 +339,6 @@ public function getAccountNumber() */ public function setAccountNumber($accountNumber) { - if (is_null($accountNumber)) { - throw new \InvalidArgumentException('non-nullable accountNumber cannot be null'); - } $this->container['accountNumber'] = $accountNumber; return $this; @@ -366,9 +363,6 @@ public function getClearingNumber() */ public function setClearingNumber($clearingNumber) { - if (is_null($clearingNumber)) { - throw new \InvalidArgumentException('non-nullable clearingNumber cannot be null'); - } $this->container['clearingNumber'] = $clearingNumber; return $this; @@ -393,9 +387,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/TransferWebhooks/SGLocalAccountIdentification.php b/src/Adyen/Model/TransferWebhooks/SGLocalAccountIdentification.php index 3496821fd..ffa1afe4a 100644 --- a/src/Adyen/Model/TransferWebhooks/SGLocalAccountIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/SGLocalAccountIdentification.php @@ -336,9 +336,6 @@ public function getAccountNumber() */ public function setAccountNumber($accountNumber) { - if (is_null($accountNumber)) { - throw new \InvalidArgumentException('non-nullable accountNumber cannot be null'); - } $this->container['accountNumber'] = $accountNumber; return $this; @@ -363,9 +360,6 @@ public function getBic() */ public function setBic($bic) { - if (is_null($bic)) { - throw new \InvalidArgumentException('non-nullable bic cannot be null'); - } $this->container['bic'] = $bic; return $this; @@ -390,9 +384,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/TransferWebhooks/TransactionEventViolation.php b/src/Adyen/Model/TransferWebhooks/TransactionEventViolation.php index 8361e7791..de6407541 100644 --- a/src/Adyen/Model/TransferWebhooks/TransactionEventViolation.php +++ b/src/Adyen/Model/TransferWebhooks/TransactionEventViolation.php @@ -309,9 +309,6 @@ public function getReason() */ public function setReason($reason) { - if (is_null($reason)) { - throw new \InvalidArgumentException('non-nullable reason cannot be null'); - } $this->container['reason'] = $reason; return $this; @@ -336,9 +333,6 @@ public function getTransactionRule() */ public function setTransactionRule($transactionRule) { - if (is_null($transactionRule)) { - throw new \InvalidArgumentException('non-nullable transactionRule cannot be null'); - } $this->container['transactionRule'] = $transactionRule; return $this; @@ -363,9 +357,6 @@ public function getTransactionRuleSource() */ public function setTransactionRuleSource($transactionRuleSource) { - if (is_null($transactionRuleSource)) { - throw new \InvalidArgumentException('non-nullable transactionRuleSource cannot be null'); - } $this->container['transactionRuleSource'] = $transactionRuleSource; return $this; diff --git a/src/Adyen/Model/TransferWebhooks/TransactionRuleReference.php b/src/Adyen/Model/TransferWebhooks/TransactionRuleReference.php index 1b597654b..8d98793a6 100644 --- a/src/Adyen/Model/TransferWebhooks/TransactionRuleReference.php +++ b/src/Adyen/Model/TransferWebhooks/TransactionRuleReference.php @@ -323,9 +323,6 @@ public function getDescription() */ public function setDescription($description) { - if (is_null($description)) { - throw new \InvalidArgumentException('non-nullable description cannot be null'); - } $this->container['description'] = $description; return $this; @@ -350,9 +347,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -377,9 +371,6 @@ public function getOutcomeType() */ public function setOutcomeType($outcomeType) { - if (is_null($outcomeType)) { - throw new \InvalidArgumentException('non-nullable outcomeType cannot be null'); - } $this->container['outcomeType'] = $outcomeType; return $this; @@ -404,9 +395,6 @@ public function getReference() */ public function setReference($reference) { - if (is_null($reference)) { - throw new \InvalidArgumentException('non-nullable reference cannot be null'); - } $this->container['reference'] = $reference; return $this; @@ -431,7 +419,6 @@ public function getScore() */ public function setScore($score) { - // Do nothing for nullable integers $this->container['score'] = $score; return $this; diff --git a/src/Adyen/Model/TransferWebhooks/TransactionRuleSource.php b/src/Adyen/Model/TransferWebhooks/TransactionRuleSource.php index a23c36ede..2f4430dae 100644 --- a/src/Adyen/Model/TransferWebhooks/TransactionRuleSource.php +++ b/src/Adyen/Model/TransferWebhooks/TransactionRuleSource.php @@ -302,9 +302,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -329,9 +326,6 @@ public function getType() */ public function setType($type) { - if (is_null($type)) { - throw new \InvalidArgumentException('non-nullable type cannot be null'); - } $this->container['type'] = $type; return $this; diff --git a/src/Adyen/Model/TransferWebhooks/TransactionRulesResult.php b/src/Adyen/Model/TransferWebhooks/TransactionRulesResult.php index 22e9133b0..fc89dc64e 100644 --- a/src/Adyen/Model/TransferWebhooks/TransactionRulesResult.php +++ b/src/Adyen/Model/TransferWebhooks/TransactionRulesResult.php @@ -316,9 +316,6 @@ public function getAdvice() */ public function setAdvice($advice) { - if (is_null($advice)) { - throw new \InvalidArgumentException('non-nullable advice cannot be null'); - } $this->container['advice'] = $advice; return $this; @@ -343,9 +340,6 @@ public function getAllHardBlockRulesPassed() */ public function setAllHardBlockRulesPassed($allHardBlockRulesPassed) { - if (is_null($allHardBlockRulesPassed)) { - throw new \InvalidArgumentException('non-nullable allHardBlockRulesPassed cannot be null'); - } $this->container['allHardBlockRulesPassed'] = $allHardBlockRulesPassed; return $this; @@ -370,7 +364,6 @@ public function getScore() */ public function setScore($score) { - // Do nothing for nullable integers $this->container['score'] = $score; return $this; @@ -395,9 +388,6 @@ public function getTriggeredTransactionRules() */ public function setTriggeredTransactionRules($triggeredTransactionRules) { - if (is_null($triggeredTransactionRules)) { - throw new \InvalidArgumentException('non-nullable triggeredTransactionRules cannot be null'); - } $this->container['triggeredTransactionRules'] = $triggeredTransactionRules; return $this; diff --git a/src/Adyen/Model/TransferWebhooks/TransferData.php b/src/Adyen/Model/TransferWebhooks/TransferData.php index 8bf989ffc..cd7b1d901 100644 --- a/src/Adyen/Model/TransferWebhooks/TransferData.php +++ b/src/Adyen/Model/TransferWebhooks/TransferData.php @@ -356,6 +356,7 @@ public function getModelName() 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 = 'declined'; public const REASON_DECLINED_BY_TRANSACTION_RULE = 'declinedByTransactionRule'; public const REASON_ERROR = 'error'; public const REASON_NOT_ENOUGH_BALANCE = 'notEnoughBalance'; @@ -510,6 +511,7 @@ public function getReasonAllowableValues() self::REASON_COUNTERPARTY_ADDRESS_REQUIRED, self::REASON_COUNTERPARTY_BANK_TIMED_OUT, self::REASON_COUNTERPARTY_BANK_UNAVAILABLE, + self::REASON_DECLINED, self::REASON_DECLINED_BY_TRANSACTION_RULE, self::REASON_ERROR, self::REASON_NOT_ENOUGH_BALANCE, @@ -796,9 +798,6 @@ public function getAccountHolder() */ public function setAccountHolder($accountHolder) { - if (is_null($accountHolder)) { - throw new \InvalidArgumentException('non-nullable accountHolder cannot be null'); - } $this->container['accountHolder'] = $accountHolder; return $this; @@ -823,9 +822,6 @@ public function getAmount() */ public function setAmount($amount) { - if (is_null($amount)) { - throw new \InvalidArgumentException('non-nullable amount cannot be null'); - } $this->container['amount'] = $amount; return $this; @@ -850,9 +846,6 @@ public function getBalanceAccount() */ public function setBalanceAccount($balanceAccount) { - if (is_null($balanceAccount)) { - throw new \InvalidArgumentException('non-nullable balanceAccount cannot be null'); - } $this->container['balanceAccount'] = $balanceAccount; return $this; @@ -877,9 +870,6 @@ public function getBalancePlatform() */ public function setBalancePlatform($balancePlatform) { - if (is_null($balancePlatform)) { - throw new \InvalidArgumentException('non-nullable balancePlatform cannot be null'); - } $this->container['balancePlatform'] = $balancePlatform; return $this; @@ -904,9 +894,6 @@ public function getBalances() */ public function setBalances($balances) { - if (is_null($balances)) { - throw new \InvalidArgumentException('non-nullable balances cannot be null'); - } $this->container['balances'] = $balances; return $this; @@ -931,9 +918,6 @@ public function getCategory() */ 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( @@ -968,9 +952,6 @@ public function getCategoryData() */ public function setCategoryData($categoryData) { - if (is_null($categoryData)) { - throw new \InvalidArgumentException('non-nullable categoryData cannot be null'); - } $this->container['categoryData'] = $categoryData; return $this; @@ -995,9 +976,6 @@ public function getCounterparty() */ public function setCounterparty($counterparty) { - if (is_null($counterparty)) { - throw new \InvalidArgumentException('non-nullable counterparty cannot be null'); - } $this->container['counterparty'] = $counterparty; return $this; @@ -1022,9 +1000,6 @@ public function getCreationDate() */ public function setCreationDate($creationDate) { - if (is_null($creationDate)) { - throw new \InvalidArgumentException('non-nullable creationDate cannot be null'); - } $this->container['creationDate'] = $creationDate; return $this; @@ -1049,9 +1024,6 @@ public function getDescription() */ public function setDescription($description) { - if (is_null($description)) { - throw new \InvalidArgumentException('non-nullable description cannot be null'); - } $this->container['description'] = $description; return $this; @@ -1076,9 +1048,6 @@ public function getDirection() */ 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( @@ -1113,9 +1082,6 @@ public function getEvents() */ public function setEvents($events) { - if (is_null($events)) { - throw new \InvalidArgumentException('non-nullable events cannot be null'); - } $this->container['events'] = $events; return $this; @@ -1140,9 +1106,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -1167,9 +1130,6 @@ public function getPaymentInstrument() */ public function setPaymentInstrument($paymentInstrument) { - if (is_null($paymentInstrument)) { - throw new \InvalidArgumentException('non-nullable paymentInstrument cannot be null'); - } $this->container['paymentInstrument'] = $paymentInstrument; return $this; @@ -1194,9 +1154,6 @@ public function getReason() */ 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( @@ -1231,9 +1188,6 @@ public function getReference() */ public function setReference($reference) { - if (is_null($reference)) { - throw new \InvalidArgumentException('non-nullable reference cannot be null'); - } $this->container['reference'] = $reference; return $this; @@ -1258,9 +1212,6 @@ public function getReferenceForBeneficiary() */ public function setReferenceForBeneficiary($referenceForBeneficiary) { - if (is_null($referenceForBeneficiary)) { - throw new \InvalidArgumentException('non-nullable referenceForBeneficiary cannot be null'); - } $this->container['referenceForBeneficiary'] = $referenceForBeneficiary; return $this; @@ -1285,7 +1236,6 @@ public function getSequenceNumber() */ public function setSequenceNumber($sequenceNumber) { - // Do nothing for nullable integers $this->container['sequenceNumber'] = $sequenceNumber; return $this; @@ -1310,9 +1260,6 @@ public function getStatus() */ 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( @@ -1347,9 +1294,6 @@ public function getTracking() */ public function setTracking($tracking) { - if (is_null($tracking)) { - throw new \InvalidArgumentException('non-nullable tracking cannot be null'); - } $this->container['tracking'] = $tracking; return $this; @@ -1374,9 +1318,6 @@ public function getTransactionRulesResult() */ public function setTransactionRulesResult($transactionRulesResult) { - if (is_null($transactionRulesResult)) { - throw new \InvalidArgumentException('non-nullable transactionRulesResult cannot be null'); - } $this->container['transactionRulesResult'] = $transactionRulesResult; return $this; @@ -1401,9 +1342,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/TransferWebhooks/TransferDataCategoryData.php b/src/Adyen/Model/TransferWebhooks/TransferDataCategoryData.php index 0f244c84d..3de350782 100644 --- a/src/Adyen/Model/TransferWebhooks/TransferDataCategoryData.php +++ b/src/Adyen/Model/TransferWebhooks/TransferDataCategoryData.php @@ -391,9 +391,6 @@ public function getPriority() */ public function setPriority($priority) { - if (is_null($priority)) { - throw new \InvalidArgumentException('non-nullable priority cannot be null'); - } $this->container['priority'] = $priority; return $this; @@ -418,9 +415,6 @@ public function getType() */ public function setType($type) { - if (is_null($type)) { - throw new \InvalidArgumentException('non-nullable type cannot be null'); - } $this->container['type'] = $type; return $this; @@ -445,9 +439,6 @@ public function getModificationMerchantReference() */ public function setModificationMerchantReference($modificationMerchantReference) { - if (is_null($modificationMerchantReference)) { - throw new \InvalidArgumentException('non-nullable modificationMerchantReference cannot be null'); - } $this->container['modificationMerchantReference'] = $modificationMerchantReference; return $this; @@ -472,9 +463,6 @@ public function getModificationPspReference() */ public function setModificationPspReference($modificationPspReference) { - if (is_null($modificationPspReference)) { - throw new \InvalidArgumentException('non-nullable modificationPspReference cannot be null'); - } $this->container['modificationPspReference'] = $modificationPspReference; return $this; @@ -499,9 +487,6 @@ public function getAuthorisationType() */ public function setAuthorisationType($authorisationType) { - if (is_null($authorisationType)) { - throw new \InvalidArgumentException('non-nullable authorisationType cannot be null'); - } $this->container['authorisationType'] = $authorisationType; return $this; @@ -526,9 +511,6 @@ public function getPanEntryMode() */ public function setPanEntryMode($panEntryMode) { - if (is_null($panEntryMode)) { - throw new \InvalidArgumentException('non-nullable panEntryMode cannot be null'); - } $this->container['panEntryMode'] = $panEntryMode; return $this; @@ -553,9 +535,6 @@ public function getProcessingType() */ public function setProcessingType($processingType) { - if (is_null($processingType)) { - throw new \InvalidArgumentException('non-nullable processingType cannot be null'); - } $this->container['processingType'] = $processingType; return $this; @@ -580,9 +559,6 @@ public function getRelayedAuthorisationData() */ public function setRelayedAuthorisationData($relayedAuthorisationData) { - if (is_null($relayedAuthorisationData)) { - throw new \InvalidArgumentException('non-nullable relayedAuthorisationData cannot be null'); - } $this->container['relayedAuthorisationData'] = $relayedAuthorisationData; return $this; @@ -607,9 +583,6 @@ public function getSchemeTraceId() */ public function setSchemeTraceId($schemeTraceId) { - if (is_null($schemeTraceId)) { - throw new \InvalidArgumentException('non-nullable schemeTraceId cannot be null'); - } $this->container['schemeTraceId'] = $schemeTraceId; return $this; @@ -634,9 +607,6 @@ public function getSchemeUniqueTransactionId() */ public function setSchemeUniqueTransactionId($schemeUniqueTransactionId) { - if (is_null($schemeUniqueTransactionId)) { - throw new \InvalidArgumentException('non-nullable schemeUniqueTransactionId cannot be null'); - } $this->container['schemeUniqueTransactionId'] = $schemeUniqueTransactionId; return $this; @@ -661,9 +631,6 @@ public function getValidationFacts() */ public function setValidationFacts($validationFacts) { - if (is_null($validationFacts)) { - throw new \InvalidArgumentException('non-nullable validationFacts cannot be null'); - } $this->container['validationFacts'] = $validationFacts; return $this; @@ -688,9 +655,6 @@ public function getPaymentMerchantReference() */ public function setPaymentMerchantReference($paymentMerchantReference) { - if (is_null($paymentMerchantReference)) { - throw new \InvalidArgumentException('non-nullable paymentMerchantReference cannot be null'); - } $this->container['paymentMerchantReference'] = $paymentMerchantReference; return $this; @@ -715,9 +679,6 @@ public function getPlatformPaymentType() */ public function setPlatformPaymentType($platformPaymentType) { - if (is_null($platformPaymentType)) { - throw new \InvalidArgumentException('non-nullable platformPaymentType cannot be null'); - } $this->container['platformPaymentType'] = $platformPaymentType; return $this; @@ -742,9 +703,6 @@ public function getPspPaymentReference() */ public function setPspPaymentReference($pspPaymentReference) { - if (is_null($pspPaymentReference)) { - throw new \InvalidArgumentException('non-nullable pspPaymentReference cannot be null'); - } $this->container['pspPaymentReference'] = $pspPaymentReference; return $this; diff --git a/src/Adyen/Model/TransferWebhooks/TransferDataTracking.php b/src/Adyen/Model/TransferWebhooks/TransferDataTracking.php index bd6c72c8f..4b373ab46 100644 --- a/src/Adyen/Model/TransferWebhooks/TransferDataTracking.php +++ b/src/Adyen/Model/TransferWebhooks/TransferDataTracking.php @@ -328,9 +328,6 @@ public function getStatus() */ public function setStatus($status) { - if (is_null($status)) { - throw new \InvalidArgumentException('non-nullable status cannot be null'); - } $this->container['status'] = $status; return $this; @@ -355,9 +352,6 @@ public function getType() */ public function setType($type) { - if (is_null($type)) { - throw new \InvalidArgumentException('non-nullable type cannot be null'); - } $this->container['type'] = $type; return $this; @@ -382,9 +376,6 @@ public function getEstimatedArrivalTime() */ public function setEstimatedArrivalTime($estimatedArrivalTime) { - if (is_null($estimatedArrivalTime)) { - throw new \InvalidArgumentException('non-nullable estimatedArrivalTime cannot be null'); - } $this->container['estimatedArrivalTime'] = $estimatedArrivalTime; return $this; @@ -409,9 +400,6 @@ public function getReason() */ public function setReason($reason) { - if (is_null($reason)) { - throw new \InvalidArgumentException('non-nullable reason cannot be null'); - } $this->container['reason'] = $reason; return $this; diff --git a/src/Adyen/Model/TransferWebhooks/TransferEvent.php b/src/Adyen/Model/TransferWebhooks/TransferEvent.php index f7f7d02fe..cb7339370 100644 --- a/src/Adyen/Model/TransferWebhooks/TransferEvent.php +++ b/src/Adyen/Model/TransferWebhooks/TransferEvent.php @@ -46,6 +46,7 @@ class TransferEvent implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPITypes = [ 'amount' => '\Adyen\Model\TransferWebhooks\Amount', 'amountAdjustments' => '\Adyen\Model\TransferWebhooks\AmountAdjustment[]', + 'arn' => 'string', 'bookingDate' => '\DateTime', 'estimatedArrivalTime' => '\DateTime', 'externalReason' => '\Adyen\Model\TransferWebhooks\ExternalReason', @@ -72,6 +73,7 @@ class TransferEvent implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPIFormats = [ 'amount' => null, 'amountAdjustments' => null, + 'arn' => null, 'bookingDate' => 'date-time', 'estimatedArrivalTime' => 'date-time', 'externalReason' => null, @@ -96,6 +98,7 @@ class TransferEvent implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPINullables = [ 'amount' => false, 'amountAdjustments' => false, + 'arn' => false, 'bookingDate' => false, 'estimatedArrivalTime' => false, 'externalReason' => false, @@ -200,6 +203,7 @@ public function isNullableSetToNull(string $property): bool protected static $attributeMap = [ 'amount' => 'amount', 'amountAdjustments' => 'amountAdjustments', + 'arn' => 'arn', 'bookingDate' => 'bookingDate', 'estimatedArrivalTime' => 'estimatedArrivalTime', 'externalReason' => 'externalReason', @@ -224,6 +228,7 @@ public function isNullableSetToNull(string $property): bool protected static $setters = [ 'amount' => 'setAmount', 'amountAdjustments' => 'setAmountAdjustments', + 'arn' => 'setArn', 'bookingDate' => 'setBookingDate', 'estimatedArrivalTime' => 'setEstimatedArrivalTime', 'externalReason' => 'setExternalReason', @@ -248,6 +253,7 @@ public function isNullableSetToNull(string $property): bool protected static $getters = [ 'amount' => 'getAmount', 'amountAdjustments' => 'getAmountAdjustments', + 'arn' => 'getArn', 'bookingDate' => 'getBookingDate', 'estimatedArrivalTime' => 'getEstimatedArrivalTime', 'externalReason' => 'getExternalReason', @@ -314,6 +320,7 @@ public function getModelName() 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 = 'declined'; public const REASON_DECLINED_BY_TRANSACTION_RULE = 'declinedByTransactionRule'; public const REASON_ERROR = 'error'; public const REASON_NOT_ENOUGH_BALANCE = 'notEnoughBalance'; @@ -407,6 +414,7 @@ public function getReasonAllowableValues() self::REASON_COUNTERPARTY_ADDRESS_REQUIRED, self::REASON_COUNTERPARTY_BANK_TIMED_OUT, self::REASON_COUNTERPARTY_BANK_UNAVAILABLE, + self::REASON_DECLINED, self::REASON_DECLINED_BY_TRANSACTION_RULE, self::REASON_ERROR, self::REASON_NOT_ENOUGH_BALANCE, @@ -521,6 +529,7 @@ public function __construct(array $data = null) { $this->setIfExists('amount', $data ?? [], null); $this->setIfExists('amountAdjustments', $data ?? [], null); + $this->setIfExists('arn', $data ?? [], null); $this->setIfExists('bookingDate', $data ?? [], null); $this->setIfExists('estimatedArrivalTime', $data ?? [], null); $this->setIfExists('externalReason', $data ?? [], null); @@ -625,9 +634,6 @@ public function getAmount() */ public function setAmount($amount) { - if (is_null($amount)) { - throw new \InvalidArgumentException('non-nullable amount cannot be null'); - } $this->container['amount'] = $amount; return $this; @@ -652,14 +658,35 @@ public function getAmountAdjustments() */ public function setAmountAdjustments($amountAdjustments) { - if (is_null($amountAdjustments)) { - throw new \InvalidArgumentException('non-nullable amountAdjustments cannot be null'); - } $this->container['amountAdjustments'] = $amountAdjustments; return $this; } + /** + * Gets arn + * + * @return string|null + */ + public function getArn() + { + return $this->container['arn']; + } + + /** + * Sets arn + * + * @param string|null $arn Scheme unique arn identifier useful for tracing captures, chargebacks, refunds, etc. + * + * @return self + */ + public function setArn($arn) + { + $this->container['arn'] = $arn; + + return $this; + } + /** * Gets bookingDate * @@ -679,9 +706,6 @@ public function getBookingDate() */ public function setBookingDate($bookingDate) { - if (is_null($bookingDate)) { - throw new \InvalidArgumentException('non-nullable bookingDate cannot be null'); - } $this->container['bookingDate'] = $bookingDate; return $this; @@ -706,9 +730,6 @@ public function getEstimatedArrivalTime() */ public function setEstimatedArrivalTime($estimatedArrivalTime) { - if (is_null($estimatedArrivalTime)) { - throw new \InvalidArgumentException('non-nullable estimatedArrivalTime cannot be null'); - } $this->container['estimatedArrivalTime'] = $estimatedArrivalTime; return $this; @@ -733,9 +754,6 @@ public function getExternalReason() */ public function setExternalReason($externalReason) { - if (is_null($externalReason)) { - throw new \InvalidArgumentException('non-nullable externalReason cannot be null'); - } $this->container['externalReason'] = $externalReason; return $this; @@ -760,9 +778,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -787,9 +802,6 @@ public function getModification() */ public function setModification($modification) { - if (is_null($modification)) { - throw new \InvalidArgumentException('non-nullable modification cannot be null'); - } $this->container['modification'] = $modification; return $this; @@ -814,9 +826,6 @@ public function getMutations() */ public function setMutations($mutations) { - if (is_null($mutations)) { - throw new \InvalidArgumentException('non-nullable mutations cannot be null'); - } $this->container['mutations'] = $mutations; return $this; @@ -841,9 +850,6 @@ public function getOriginalAmount() */ public function setOriginalAmount($originalAmount) { - if (is_null($originalAmount)) { - throw new \InvalidArgumentException('non-nullable originalAmount cannot be null'); - } $this->container['originalAmount'] = $originalAmount; return $this; @@ -868,9 +874,6 @@ public function getReason() */ 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( @@ -905,9 +908,6 @@ public function getStatus() */ 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( @@ -942,9 +942,6 @@ public function getTrackingData() */ public function setTrackingData($trackingData) { - if (is_null($trackingData)) { - throw new \InvalidArgumentException('non-nullable trackingData cannot be null'); - } $this->container['trackingData'] = $trackingData; return $this; @@ -969,9 +966,6 @@ public function getTransactionId() */ public function setTransactionId($transactionId) { - if (is_null($transactionId)) { - throw new \InvalidArgumentException('non-nullable transactionId cannot be null'); - } $this->container['transactionId'] = $transactionId; return $this; @@ -996,9 +990,6 @@ public function getType() */ 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( @@ -1033,9 +1024,6 @@ public function getUpdateDate() */ public function setUpdateDate($updateDate) { - if (is_null($updateDate)) { - throw new \InvalidArgumentException('non-nullable updateDate cannot be null'); - } $this->container['updateDate'] = $updateDate; return $this; @@ -1060,9 +1048,6 @@ public function getValueDate() */ public function setValueDate($valueDate) { - if (is_null($valueDate)) { - throw new \InvalidArgumentException('non-nullable valueDate cannot be null'); - } $this->container['valueDate'] = $valueDate; return $this; diff --git a/src/Adyen/Model/TransferWebhooks/TransferEventTrackingData.php b/src/Adyen/Model/TransferWebhooks/TransferEventTrackingData.php index 3196460c3..acd68392d 100644 --- a/src/Adyen/Model/TransferWebhooks/TransferEventTrackingData.php +++ b/src/Adyen/Model/TransferWebhooks/TransferEventTrackingData.php @@ -328,9 +328,6 @@ public function getStatus() */ public function setStatus($status) { - if (is_null($status)) { - throw new \InvalidArgumentException('non-nullable status cannot be null'); - } $this->container['status'] = $status; return $this; @@ -355,9 +352,6 @@ public function getType() */ public function setType($type) { - if (is_null($type)) { - throw new \InvalidArgumentException('non-nullable type cannot be null'); - } $this->container['type'] = $type; return $this; @@ -382,9 +376,6 @@ public function getEstimatedArrivalTime() */ public function setEstimatedArrivalTime($estimatedArrivalTime) { - if (is_null($estimatedArrivalTime)) { - throw new \InvalidArgumentException('non-nullable estimatedArrivalTime cannot be null'); - } $this->container['estimatedArrivalTime'] = $estimatedArrivalTime; return $this; @@ -409,9 +400,6 @@ public function getReason() */ public function setReason($reason) { - if (is_null($reason)) { - throw new \InvalidArgumentException('non-nullable reason cannot be null'); - } $this->container['reason'] = $reason; return $this; diff --git a/src/Adyen/Model/TransferWebhooks/TransferNotificationCounterParty.php b/src/Adyen/Model/TransferWebhooks/TransferNotificationCounterParty.php index 909505170..68bf75ff8 100644 --- a/src/Adyen/Model/TransferWebhooks/TransferNotificationCounterParty.php +++ b/src/Adyen/Model/TransferWebhooks/TransferNotificationCounterParty.php @@ -316,9 +316,6 @@ public function getBalanceAccountId() */ public function setBalanceAccountId($balanceAccountId) { - if (is_null($balanceAccountId)) { - throw new \InvalidArgumentException('non-nullable balanceAccountId cannot be null'); - } $this->container['balanceAccountId'] = $balanceAccountId; return $this; @@ -343,9 +340,6 @@ public function getBankAccount() */ public function setBankAccount($bankAccount) { - if (is_null($bankAccount)) { - throw new \InvalidArgumentException('non-nullable bankAccount cannot be null'); - } $this->container['bankAccount'] = $bankAccount; return $this; @@ -370,9 +364,6 @@ public function getMerchant() */ public function setMerchant($merchant) { - if (is_null($merchant)) { - throw new \InvalidArgumentException('non-nullable merchant cannot be null'); - } $this->container['merchant'] = $merchant; return $this; @@ -397,9 +388,6 @@ public function getTransferInstrumentId() */ public function setTransferInstrumentId($transferInstrumentId) { - if (is_null($transferInstrumentId)) { - throw new \InvalidArgumentException('non-nullable transferInstrumentId cannot be null'); - } $this->container['transferInstrumentId'] = $transferInstrumentId; return $this; diff --git a/src/Adyen/Model/TransferWebhooks/TransferNotificationMerchantData.php b/src/Adyen/Model/TransferWebhooks/TransferNotificationMerchantData.php index 752c3e141..7f1cf5966 100644 --- a/src/Adyen/Model/TransferWebhooks/TransferNotificationMerchantData.php +++ b/src/Adyen/Model/TransferWebhooks/TransferNotificationMerchantData.php @@ -337,9 +337,6 @@ public function getAcquirerId() */ public function setAcquirerId($acquirerId) { - if (is_null($acquirerId)) { - throw new \InvalidArgumentException('non-nullable acquirerId cannot be null'); - } $this->container['acquirerId'] = $acquirerId; return $this; @@ -364,9 +361,6 @@ public function getCity() */ public function setCity($city) { - if (is_null($city)) { - throw new \InvalidArgumentException('non-nullable city cannot be null'); - } $this->container['city'] = $city; return $this; @@ -391,9 +385,6 @@ public function getCountry() */ public function setCountry($country) { - if (is_null($country)) { - throw new \InvalidArgumentException('non-nullable country cannot be null'); - } $this->container['country'] = $country; return $this; @@ -418,9 +409,6 @@ public function getMcc() */ public function setMcc($mcc) { - if (is_null($mcc)) { - throw new \InvalidArgumentException('non-nullable mcc cannot be null'); - } $this->container['mcc'] = $mcc; return $this; @@ -445,9 +433,6 @@ public function getMerchantId() */ public function setMerchantId($merchantId) { - if (is_null($merchantId)) { - throw new \InvalidArgumentException('non-nullable merchantId cannot be null'); - } $this->container['merchantId'] = $merchantId; return $this; @@ -472,9 +457,6 @@ public function getName() */ public function setName($name) { - if (is_null($name)) { - throw new \InvalidArgumentException('non-nullable name cannot be null'); - } $this->container['name'] = $name; return $this; @@ -499,9 +481,6 @@ public function getPostalCode() */ public function setPostalCode($postalCode) { - if (is_null($postalCode)) { - throw new \InvalidArgumentException('non-nullable postalCode cannot be null'); - } $this->container['postalCode'] = $postalCode; return $this; diff --git a/src/Adyen/Model/TransferWebhooks/TransferNotificationRequest.php b/src/Adyen/Model/TransferWebhooks/TransferNotificationRequest.php index ccf86af3a..c1b277064 100644 --- a/src/Adyen/Model/TransferWebhooks/TransferNotificationRequest.php +++ b/src/Adyen/Model/TransferWebhooks/TransferNotificationRequest.php @@ -338,9 +338,6 @@ public function getData() */ public function setData($data) { - if (is_null($data)) { - throw new \InvalidArgumentException('non-nullable data cannot be null'); - } $this->container['data'] = $data; return $this; @@ -365,9 +362,6 @@ public function getEnvironment() */ public function setEnvironment($environment) { - if (is_null($environment)) { - throw new \InvalidArgumentException('non-nullable environment cannot be null'); - } $this->container['environment'] = $environment; return $this; @@ -392,9 +386,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/TransferWebhooks/TransferNotificationValidationFact.php b/src/Adyen/Model/TransferWebhooks/TransferNotificationValidationFact.php index 702f08d6d..2121e69ac 100644 --- a/src/Adyen/Model/TransferWebhooks/TransferNotificationValidationFact.php +++ b/src/Adyen/Model/TransferWebhooks/TransferNotificationValidationFact.php @@ -302,9 +302,6 @@ public function getResult() */ public function setResult($result) { - if (is_null($result)) { - throw new \InvalidArgumentException('non-nullable result cannot be null'); - } $this->container['result'] = $result; return $this; @@ -329,9 +326,6 @@ public function getType() */ public function setType($type) { - if (is_null($type)) { - throw new \InvalidArgumentException('non-nullable type cannot be null'); - } $this->container['type'] = $type; return $this; diff --git a/src/Adyen/Model/TransferWebhooks/UKLocalAccountIdentification.php b/src/Adyen/Model/TransferWebhooks/UKLocalAccountIdentification.php index c9456a385..2684285ca 100644 --- a/src/Adyen/Model/TransferWebhooks/UKLocalAccountIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/UKLocalAccountIdentification.php @@ -339,9 +339,6 @@ public function getAccountNumber() */ public function setAccountNumber($accountNumber) { - if (is_null($accountNumber)) { - throw new \InvalidArgumentException('non-nullable accountNumber cannot be null'); - } $this->container['accountNumber'] = $accountNumber; return $this; @@ -366,9 +363,6 @@ public function getSortCode() */ public function setSortCode($sortCode) { - if (is_null($sortCode)) { - throw new \InvalidArgumentException('non-nullable sortCode cannot be null'); - } $this->container['sortCode'] = $sortCode; return $this; @@ -393,9 +387,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/TransferWebhooks/USLocalAccountIdentification.php b/src/Adyen/Model/TransferWebhooks/USLocalAccountIdentification.php index dc133729c..3a1d709da 100644 --- a/src/Adyen/Model/TransferWebhooks/USLocalAccountIdentification.php +++ b/src/Adyen/Model/TransferWebhooks/USLocalAccountIdentification.php @@ -369,9 +369,6 @@ public function getAccountNumber() */ public function setAccountNumber($accountNumber) { - if (is_null($accountNumber)) { - throw new \InvalidArgumentException('non-nullable accountNumber cannot be null'); - } $this->container['accountNumber'] = $accountNumber; return $this; @@ -396,9 +393,6 @@ public function getAccountType() */ 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( @@ -433,9 +427,6 @@ public function getRoutingNumber() */ public function setRoutingNumber($routingNumber) { - if (is_null($routingNumber)) { - throw new \InvalidArgumentException('non-nullable routingNumber cannot be null'); - } $this->container['routingNumber'] = $routingNumber; return $this; @@ -460,9 +451,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/Transfers/AULocalAccountIdentification.php b/src/Adyen/Model/Transfers/AULocalAccountIdentification.php index 7c2bf9262..b02c1d785 100644 --- a/src/Adyen/Model/Transfers/AULocalAccountIdentification.php +++ b/src/Adyen/Model/Transfers/AULocalAccountIdentification.php @@ -339,9 +339,6 @@ public function getAccountNumber() */ public function setAccountNumber($accountNumber) { - if (is_null($accountNumber)) { - throw new \InvalidArgumentException('non-nullable accountNumber cannot be null'); - } $this->container['accountNumber'] = $accountNumber; return $this; @@ -366,9 +363,6 @@ public function getBsbCode() */ public function setBsbCode($bsbCode) { - if (is_null($bsbCode)) { - throw new \InvalidArgumentException('non-nullable bsbCode cannot be null'); - } $this->container['bsbCode'] = $bsbCode; return $this; @@ -393,9 +387,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/Transfers/AdditionalBankIdentification.php b/src/Adyen/Model/Transfers/AdditionalBankIdentification.php index 1d3fff772..80543156c 100644 --- a/src/Adyen/Model/Transfers/AdditionalBankIdentification.php +++ b/src/Adyen/Model/Transfers/AdditionalBankIdentification.php @@ -325,9 +325,6 @@ public function getCode() */ public function setCode($code) { - if (is_null($code)) { - throw new \InvalidArgumentException('non-nullable code cannot be null'); - } $this->container['code'] = $code; return $this; @@ -352,9 +349,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/Transfers/Address.php b/src/Adyen/Model/Transfers/Address.php index 8e21e7008..ef4633b33 100644 --- a/src/Adyen/Model/Transfers/Address.php +++ b/src/Adyen/Model/Transfers/Address.php @@ -333,9 +333,6 @@ public function getCity() */ public function setCity($city) { - if (is_null($city)) { - throw new \InvalidArgumentException('non-nullable city cannot be null'); - } $this->container['city'] = $city; return $this; @@ -360,9 +357,6 @@ public function getCountry() */ public function setCountry($country) { - if (is_null($country)) { - throw new \InvalidArgumentException('non-nullable country cannot be null'); - } $this->container['country'] = $country; return $this; @@ -387,9 +381,6 @@ public function getLine1() */ public function setLine1($line1) { - if (is_null($line1)) { - throw new \InvalidArgumentException('non-nullable line1 cannot be null'); - } $this->container['line1'] = $line1; return $this; @@ -414,9 +405,6 @@ public function getLine2() */ public function setLine2($line2) { - if (is_null($line2)) { - throw new \InvalidArgumentException('non-nullable line2 cannot be null'); - } $this->container['line2'] = $line2; return $this; @@ -441,9 +429,6 @@ public function getPostalCode() */ public function setPostalCode($postalCode) { - if (is_null($postalCode)) { - throw new \InvalidArgumentException('non-nullable postalCode cannot be null'); - } $this->container['postalCode'] = $postalCode; return $this; @@ -468,9 +453,6 @@ public function getStateOrProvince() */ public function setStateOrProvince($stateOrProvince) { - if (is_null($stateOrProvince)) { - throw new \InvalidArgumentException('non-nullable stateOrProvince cannot be null'); - } $this->container['stateOrProvince'] = $stateOrProvince; return $this; diff --git a/src/Adyen/Model/Transfers/Amount.php b/src/Adyen/Model/Transfers/Amount.php index a1be006d7..f4bb0bd5e 100644 --- a/src/Adyen/Model/Transfers/Amount.php +++ b/src/Adyen/Model/Transfers/Amount.php @@ -308,9 +308,6 @@ public function getCurrency() */ public function setCurrency($currency) { - if (is_null($currency)) { - throw new \InvalidArgumentException('non-nullable currency cannot be null'); - } $this->container['currency'] = $currency; return $this; @@ -335,9 +332,6 @@ public function getValue() */ public function setValue($value) { - if (is_null($value)) { - throw new \InvalidArgumentException('non-nullable value cannot be null'); - } $this->container['value'] = $value; return $this; diff --git a/src/Adyen/Model/Transfers/AmountAdjustment.php b/src/Adyen/Model/Transfers/AmountAdjustment.php index 4332184fa..8e15c232f 100644 --- a/src/Adyen/Model/Transfers/AmountAdjustment.php +++ b/src/Adyen/Model/Transfers/AmountAdjustment.php @@ -336,9 +336,6 @@ public function getAmount() */ public function setAmount($amount) { - if (is_null($amount)) { - throw new \InvalidArgumentException('non-nullable amount cannot be null'); - } $this->container['amount'] = $amount; return $this; @@ -363,9 +360,6 @@ public function getAmountAdjustmentType() */ 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( @@ -400,7 +394,6 @@ public function getBasepoints() */ public function setBasepoints($basepoints) { - // Do nothing for nullable integers $this->container['basepoints'] = $basepoints; return $this; diff --git a/src/Adyen/Model/Transfers/BRLocalAccountIdentification.php b/src/Adyen/Model/Transfers/BRLocalAccountIdentification.php index 9a4c500f7..00211f4c5 100644 --- a/src/Adyen/Model/Transfers/BRLocalAccountIdentification.php +++ b/src/Adyen/Model/Transfers/BRLocalAccountIdentification.php @@ -356,9 +356,6 @@ public function getAccountNumber() */ public function setAccountNumber($accountNumber) { - if (is_null($accountNumber)) { - throw new \InvalidArgumentException('non-nullable accountNumber cannot be null'); - } $this->container['accountNumber'] = $accountNumber; return $this; @@ -383,9 +380,6 @@ public function getBankCode() */ public function setBankCode($bankCode) { - if (is_null($bankCode)) { - throw new \InvalidArgumentException('non-nullable bankCode cannot be null'); - } $this->container['bankCode'] = $bankCode; return $this; @@ -410,9 +404,6 @@ public function getBranchNumber() */ public function setBranchNumber($branchNumber) { - if (is_null($branchNumber)) { - throw new \InvalidArgumentException('non-nullable branchNumber cannot be null'); - } $this->container['branchNumber'] = $branchNumber; return $this; @@ -437,9 +428,6 @@ public function getIspb() */ public function setIspb($ispb) { - if (is_null($ispb)) { - throw new \InvalidArgumentException('non-nullable ispb cannot be null'); - } $this->container['ispb'] = $ispb; return $this; @@ -464,9 +452,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/Transfers/BalanceMutation.php b/src/Adyen/Model/Transfers/BalanceMutation.php index 746390ec9..8e0dcfd36 100644 --- a/src/Adyen/Model/Transfers/BalanceMutation.php +++ b/src/Adyen/Model/Transfers/BalanceMutation.php @@ -316,9 +316,6 @@ public function getBalance() */ public function setBalance($balance) { - if (is_null($balance)) { - throw new \InvalidArgumentException('non-nullable balance cannot be null'); - } $this->container['balance'] = $balance; return $this; @@ -343,9 +340,6 @@ public function getCurrency() */ public function setCurrency($currency) { - if (is_null($currency)) { - throw new \InvalidArgumentException('non-nullable currency cannot be null'); - } $this->container['currency'] = $currency; return $this; @@ -370,9 +364,6 @@ public function getReceived() */ public function setReceived($received) { - if (is_null($received)) { - throw new \InvalidArgumentException('non-nullable received cannot be null'); - } $this->container['received'] = $received; return $this; @@ -397,9 +388,6 @@ public function getReserved() */ public function setReserved($reserved) { - if (is_null($reserved)) { - throw new \InvalidArgumentException('non-nullable reserved cannot be null'); - } $this->container['reserved'] = $reserved; return $this; diff --git a/src/Adyen/Model/Transfers/BankAccountV3.php b/src/Adyen/Model/Transfers/BankAccountV3.php index d3026814b..b24414f95 100644 --- a/src/Adyen/Model/Transfers/BankAccountV3.php +++ b/src/Adyen/Model/Transfers/BankAccountV3.php @@ -308,9 +308,6 @@ public function getAccountHolder() */ public function setAccountHolder($accountHolder) { - if (is_null($accountHolder)) { - throw new \InvalidArgumentException('non-nullable accountHolder cannot be null'); - } $this->container['accountHolder'] = $accountHolder; return $this; @@ -335,9 +332,6 @@ public function getAccountIdentification() */ public function setAccountIdentification($accountIdentification) { - if (is_null($accountIdentification)) { - throw new \InvalidArgumentException('non-nullable accountIdentification cannot be null'); - } $this->container['accountIdentification'] = $accountIdentification; return $this; diff --git a/src/Adyen/Model/Transfers/BankAccountV3AccountIdentification.php b/src/Adyen/Model/Transfers/BankAccountV3AccountIdentification.php index e9909f254..adc78d0ec 100644 --- a/src/Adyen/Model/Transfers/BankAccountV3AccountIdentification.php +++ b/src/Adyen/Model/Transfers/BankAccountV3AccountIdentification.php @@ -441,9 +441,6 @@ public function getAccountNumber() */ public function setAccountNumber($accountNumber) { - if (is_null($accountNumber)) { - throw new \InvalidArgumentException('non-nullable accountNumber cannot be null'); - } $this->container['accountNumber'] = $accountNumber; return $this; @@ -468,9 +465,6 @@ public function getBsbCode() */ public function setBsbCode($bsbCode) { - if (is_null($bsbCode)) { - throw new \InvalidArgumentException('non-nullable bsbCode cannot be null'); - } $this->container['bsbCode'] = $bsbCode; return $this; @@ -495,9 +489,6 @@ public function getType() */ public function setType($type) { - if (is_null($type)) { - throw new \InvalidArgumentException('non-nullable type cannot be null'); - } $this->container['type'] = $type; return $this; @@ -522,9 +513,6 @@ public function getBankCode() */ public function setBankCode($bankCode) { - if (is_null($bankCode)) { - throw new \InvalidArgumentException('non-nullable bankCode cannot be null'); - } $this->container['bankCode'] = $bankCode; return $this; @@ -549,9 +537,6 @@ public function getBranchNumber() */ public function setBranchNumber($branchNumber) { - if (is_null($branchNumber)) { - throw new \InvalidArgumentException('non-nullable branchNumber cannot be null'); - } $this->container['branchNumber'] = $branchNumber; return $this; @@ -576,9 +561,6 @@ public function getIspb() */ public function setIspb($ispb) { - if (is_null($ispb)) { - throw new \InvalidArgumentException('non-nullable ispb cannot be null'); - } $this->container['ispb'] = $ispb; return $this; @@ -603,9 +585,6 @@ public function getAccountType() */ public function setAccountType($accountType) { - if (is_null($accountType)) { - throw new \InvalidArgumentException('non-nullable accountType cannot be null'); - } $this->container['accountType'] = $accountType; return $this; @@ -630,9 +609,6 @@ public function getInstitutionNumber() */ public function setInstitutionNumber($institutionNumber) { - if (is_null($institutionNumber)) { - throw new \InvalidArgumentException('non-nullable institutionNumber cannot be null'); - } $this->container['institutionNumber'] = $institutionNumber; return $this; @@ -657,9 +633,6 @@ public function getTransitNumber() */ public function setTransitNumber($transitNumber) { - if (is_null($transitNumber)) { - throw new \InvalidArgumentException('non-nullable transitNumber cannot be null'); - } $this->container['transitNumber'] = $transitNumber; return $this; @@ -684,9 +657,6 @@ public function getClearingCode() */ public function setClearingCode($clearingCode) { - if (is_null($clearingCode)) { - throw new \InvalidArgumentException('non-nullable clearingCode cannot be null'); - } $this->container['clearingCode'] = $clearingCode; return $this; @@ -711,9 +681,6 @@ public function getIban() */ public function setIban($iban) { - if (is_null($iban)) { - throw new \InvalidArgumentException('non-nullable iban cannot be null'); - } $this->container['iban'] = $iban; return $this; @@ -738,9 +705,6 @@ public function getAdditionalBankIdentification() */ public function setAdditionalBankIdentification($additionalBankIdentification) { - if (is_null($additionalBankIdentification)) { - throw new \InvalidArgumentException('non-nullable additionalBankIdentification cannot be null'); - } $this->container['additionalBankIdentification'] = $additionalBankIdentification; return $this; @@ -765,9 +729,6 @@ public function getBic() */ public function setBic($bic) { - if (is_null($bic)) { - throw new \InvalidArgumentException('non-nullable bic cannot be null'); - } $this->container['bic'] = $bic; return $this; @@ -792,9 +753,6 @@ public function getClearingNumber() */ public function setClearingNumber($clearingNumber) { - if (is_null($clearingNumber)) { - throw new \InvalidArgumentException('non-nullable clearingNumber cannot be null'); - } $this->container['clearingNumber'] = $clearingNumber; return $this; @@ -819,9 +777,6 @@ public function getSortCode() */ public function setSortCode($sortCode) { - if (is_null($sortCode)) { - throw new \InvalidArgumentException('non-nullable sortCode cannot be null'); - } $this->container['sortCode'] = $sortCode; return $this; @@ -846,9 +801,6 @@ public function getRoutingNumber() */ public function setRoutingNumber($routingNumber) { - if (is_null($routingNumber)) { - throw new \InvalidArgumentException('non-nullable routingNumber cannot be null'); - } $this->container['routingNumber'] = $routingNumber; return $this; diff --git a/src/Adyen/Model/Transfers/BankCategoryData.php b/src/Adyen/Model/Transfers/BankCategoryData.php index e65a7e450..a5fe030ac 100644 --- a/src/Adyen/Model/Transfers/BankCategoryData.php +++ b/src/Adyen/Model/Transfers/BankCategoryData.php @@ -354,9 +354,6 @@ public function getPriority() */ 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( @@ -391,9 +388,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/Transfers/CALocalAccountIdentification.php b/src/Adyen/Model/Transfers/CALocalAccountIdentification.php index f50937639..d704b8a61 100644 --- a/src/Adyen/Model/Transfers/CALocalAccountIdentification.php +++ b/src/Adyen/Model/Transfers/CALocalAccountIdentification.php @@ -379,9 +379,6 @@ public function getAccountNumber() */ public function setAccountNumber($accountNumber) { - if (is_null($accountNumber)) { - throw new \InvalidArgumentException('non-nullable accountNumber cannot be null'); - } $this->container['accountNumber'] = $accountNumber; return $this; @@ -406,9 +403,6 @@ public function getAccountType() */ 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( @@ -443,9 +437,6 @@ public function getInstitutionNumber() */ public function setInstitutionNumber($institutionNumber) { - if (is_null($institutionNumber)) { - throw new \InvalidArgumentException('non-nullable institutionNumber cannot be null'); - } $this->container['institutionNumber'] = $institutionNumber; return $this; @@ -470,9 +461,6 @@ public function getTransitNumber() */ public function setTransitNumber($transitNumber) { - if (is_null($transitNumber)) { - throw new \InvalidArgumentException('non-nullable transitNumber cannot be null'); - } $this->container['transitNumber'] = $transitNumber; return $this; @@ -497,9 +485,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/Transfers/CZLocalAccountIdentification.php b/src/Adyen/Model/Transfers/CZLocalAccountIdentification.php index b0f087366..49a0d2a45 100644 --- a/src/Adyen/Model/Transfers/CZLocalAccountIdentification.php +++ b/src/Adyen/Model/Transfers/CZLocalAccountIdentification.php @@ -339,9 +339,6 @@ public function getAccountNumber() */ public function setAccountNumber($accountNumber) { - if (is_null($accountNumber)) { - throw new \InvalidArgumentException('non-nullable accountNumber cannot be null'); - } $this->container['accountNumber'] = $accountNumber; return $this; @@ -366,9 +363,6 @@ public function getBankCode() */ public function setBankCode($bankCode) { - if (is_null($bankCode)) { - throw new \InvalidArgumentException('non-nullable bankCode cannot be null'); - } $this->container['bankCode'] = $bankCode; return $this; @@ -393,9 +387,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/Transfers/CapitalBalance.php b/src/Adyen/Model/Transfers/CapitalBalance.php index 391c2af0d..74e157118 100644 --- a/src/Adyen/Model/Transfers/CapitalBalance.php +++ b/src/Adyen/Model/Transfers/CapitalBalance.php @@ -328,9 +328,6 @@ public function getCurrency() */ public function setCurrency($currency) { - if (is_null($currency)) { - throw new \InvalidArgumentException('non-nullable currency cannot be null'); - } $this->container['currency'] = $currency; return $this; @@ -355,9 +352,6 @@ public function getFee() */ public function setFee($fee) { - if (is_null($fee)) { - throw new \InvalidArgumentException('non-nullable fee cannot be null'); - } $this->container['fee'] = $fee; return $this; @@ -382,9 +376,6 @@ public function getPrincipal() */ public function setPrincipal($principal) { - if (is_null($principal)) { - throw new \InvalidArgumentException('non-nullable principal cannot be null'); - } $this->container['principal'] = $principal; return $this; @@ -409,9 +400,6 @@ public function getTotal() */ public function setTotal($total) { - if (is_null($total)) { - throw new \InvalidArgumentException('non-nullable total cannot be null'); - } $this->container['total'] = $total; return $this; diff --git a/src/Adyen/Model/Transfers/CapitalGrant.php b/src/Adyen/Model/Transfers/CapitalGrant.php index 380091432..2824975e6 100644 --- a/src/Adyen/Model/Transfers/CapitalGrant.php +++ b/src/Adyen/Model/Transfers/CapitalGrant.php @@ -391,9 +391,6 @@ public function getAmount() */ public function setAmount($amount) { - if (is_null($amount)) { - throw new \InvalidArgumentException('non-nullable amount cannot be null'); - } $this->container['amount'] = $amount; return $this; @@ -418,9 +415,6 @@ public function getBalances() */ public function setBalances($balances) { - if (is_null($balances)) { - throw new \InvalidArgumentException('non-nullable balances cannot be null'); - } $this->container['balances'] = $balances; return $this; @@ -445,9 +439,6 @@ public function getCounterparty() */ public function setCounterparty($counterparty) { - if (is_null($counterparty)) { - throw new \InvalidArgumentException('non-nullable counterparty cannot be null'); - } $this->container['counterparty'] = $counterparty; return $this; @@ -472,9 +463,6 @@ public function getFee() */ public function setFee($fee) { - if (is_null($fee)) { - throw new \InvalidArgumentException('non-nullable fee cannot be null'); - } $this->container['fee'] = $fee; return $this; @@ -499,9 +487,6 @@ public function getGrantAccountId() */ public function setGrantAccountId($grantAccountId) { - if (is_null($grantAccountId)) { - throw new \InvalidArgumentException('non-nullable grantAccountId cannot be null'); - } $this->container['grantAccountId'] = $grantAccountId; return $this; @@ -526,9 +511,6 @@ public function getGrantOfferId() */ public function setGrantOfferId($grantOfferId) { - if (is_null($grantOfferId)) { - throw new \InvalidArgumentException('non-nullable grantOfferId cannot be null'); - } $this->container['grantOfferId'] = $grantOfferId; return $this; @@ -553,9 +535,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -580,9 +559,6 @@ public function getRepayment() */ public function setRepayment($repayment) { - if (is_null($repayment)) { - throw new \InvalidArgumentException('non-nullable repayment cannot be null'); - } $this->container['repayment'] = $repayment; return $this; @@ -607,9 +583,6 @@ public function getStatus() */ 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( diff --git a/src/Adyen/Model/Transfers/CapitalGrantInfo.php b/src/Adyen/Model/Transfers/CapitalGrantInfo.php index 522eafd64..0f06824d5 100644 --- a/src/Adyen/Model/Transfers/CapitalGrantInfo.php +++ b/src/Adyen/Model/Transfers/CapitalGrantInfo.php @@ -315,9 +315,6 @@ public function getCounterparty() */ public function setCounterparty($counterparty) { - if (is_null($counterparty)) { - throw new \InvalidArgumentException('non-nullable counterparty cannot be null'); - } $this->container['counterparty'] = $counterparty; return $this; @@ -342,9 +339,6 @@ public function getGrantAccountId() */ public function setGrantAccountId($grantAccountId) { - if (is_null($grantAccountId)) { - throw new \InvalidArgumentException('non-nullable grantAccountId cannot be null'); - } $this->container['grantAccountId'] = $grantAccountId; return $this; @@ -369,9 +363,6 @@ public function getGrantOfferId() */ public function setGrantOfferId($grantOfferId) { - if (is_null($grantOfferId)) { - throw new \InvalidArgumentException('non-nullable grantOfferId cannot be null'); - } $this->container['grantOfferId'] = $grantOfferId; return $this; diff --git a/src/Adyen/Model/Transfers/CapitalGrants.php b/src/Adyen/Model/Transfers/CapitalGrants.php index 2a18f1c6e..639636b36 100644 --- a/src/Adyen/Model/Transfers/CapitalGrants.php +++ b/src/Adyen/Model/Transfers/CapitalGrants.php @@ -298,9 +298,6 @@ public function getGrants() */ public function setGrants($grants) { - if (is_null($grants)) { - throw new \InvalidArgumentException('non-nullable grants cannot be null'); - } $this->container['grants'] = $grants; return $this; diff --git a/src/Adyen/Model/Transfers/ConfirmationTrackingData.php b/src/Adyen/Model/Transfers/ConfirmationTrackingData.php index 20ac4ec45..2a9c3cd5b 100644 --- a/src/Adyen/Model/Transfers/ConfirmationTrackingData.php +++ b/src/Adyen/Model/Transfers/ConfirmationTrackingData.php @@ -350,9 +350,6 @@ public function getStatus() */ 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( @@ -387,9 +384,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/Transfers/Counterparty.php b/src/Adyen/Model/Transfers/Counterparty.php index bac2a36b1..6587d3cdf 100644 --- a/src/Adyen/Model/Transfers/Counterparty.php +++ b/src/Adyen/Model/Transfers/Counterparty.php @@ -309,9 +309,6 @@ public function getAccountHolderId() */ public function setAccountHolderId($accountHolderId) { - if (is_null($accountHolderId)) { - throw new \InvalidArgumentException('non-nullable accountHolderId cannot be null'); - } $this->container['accountHolderId'] = $accountHolderId; return $this; @@ -336,9 +333,6 @@ public function getBalanceAccountId() */ public function setBalanceAccountId($balanceAccountId) { - if (is_null($balanceAccountId)) { - throw new \InvalidArgumentException('non-nullable balanceAccountId cannot be null'); - } $this->container['balanceAccountId'] = $balanceAccountId; return $this; @@ -363,9 +357,6 @@ public function getTransferInstrumentId() */ public function setTransferInstrumentId($transferInstrumentId) { - if (is_null($transferInstrumentId)) { - throw new \InvalidArgumentException('non-nullable transferInstrumentId cannot be null'); - } $this->container['transferInstrumentId'] = $transferInstrumentId; return $this; diff --git a/src/Adyen/Model/Transfers/CounterpartyInfoV3.php b/src/Adyen/Model/Transfers/CounterpartyInfoV3.php index 2d59227d5..f920c6fb6 100644 --- a/src/Adyen/Model/Transfers/CounterpartyInfoV3.php +++ b/src/Adyen/Model/Transfers/CounterpartyInfoV3.php @@ -309,9 +309,6 @@ public function getBalanceAccountId() */ public function setBalanceAccountId($balanceAccountId) { - if (is_null($balanceAccountId)) { - throw new \InvalidArgumentException('non-nullable balanceAccountId cannot be null'); - } $this->container['balanceAccountId'] = $balanceAccountId; return $this; @@ -336,9 +333,6 @@ public function getBankAccount() */ public function setBankAccount($bankAccount) { - if (is_null($bankAccount)) { - throw new \InvalidArgumentException('non-nullable bankAccount cannot be null'); - } $this->container['bankAccount'] = $bankAccount; return $this; @@ -363,9 +357,6 @@ public function getTransferInstrumentId() */ public function setTransferInstrumentId($transferInstrumentId) { - if (is_null($transferInstrumentId)) { - throw new \InvalidArgumentException('non-nullable transferInstrumentId cannot be null'); - } $this->container['transferInstrumentId'] = $transferInstrumentId; return $this; diff --git a/src/Adyen/Model/Transfers/CounterpartyV3.php b/src/Adyen/Model/Transfers/CounterpartyV3.php index 5ff81f4b3..720f72056 100644 --- a/src/Adyen/Model/Transfers/CounterpartyV3.php +++ b/src/Adyen/Model/Transfers/CounterpartyV3.php @@ -316,9 +316,6 @@ public function getBalanceAccountId() */ public function setBalanceAccountId($balanceAccountId) { - if (is_null($balanceAccountId)) { - throw new \InvalidArgumentException('non-nullable balanceAccountId cannot be null'); - } $this->container['balanceAccountId'] = $balanceAccountId; return $this; @@ -343,9 +340,6 @@ public function getBankAccount() */ public function setBankAccount($bankAccount) { - if (is_null($bankAccount)) { - throw new \InvalidArgumentException('non-nullable bankAccount cannot be null'); - } $this->container['bankAccount'] = $bankAccount; return $this; @@ -370,9 +364,6 @@ public function getMerchant() */ public function setMerchant($merchant) { - if (is_null($merchant)) { - throw new \InvalidArgumentException('non-nullable merchant cannot be null'); - } $this->container['merchant'] = $merchant; return $this; @@ -397,9 +388,6 @@ public function getTransferInstrumentId() */ public function setTransferInstrumentId($transferInstrumentId) { - if (is_null($transferInstrumentId)) { - throw new \InvalidArgumentException('non-nullable transferInstrumentId cannot be null'); - } $this->container['transferInstrumentId'] = $transferInstrumentId; return $this; diff --git a/src/Adyen/Model/Transfers/DKLocalAccountIdentification.php b/src/Adyen/Model/Transfers/DKLocalAccountIdentification.php index bc42edab5..7663ac753 100644 --- a/src/Adyen/Model/Transfers/DKLocalAccountIdentification.php +++ b/src/Adyen/Model/Transfers/DKLocalAccountIdentification.php @@ -339,9 +339,6 @@ public function getAccountNumber() */ public function setAccountNumber($accountNumber) { - if (is_null($accountNumber)) { - throw new \InvalidArgumentException('non-nullable accountNumber cannot be null'); - } $this->container['accountNumber'] = $accountNumber; return $this; @@ -366,9 +363,6 @@ public function getBankCode() */ public function setBankCode($bankCode) { - if (is_null($bankCode)) { - throw new \InvalidArgumentException('non-nullable bankCode cannot be null'); - } $this->container['bankCode'] = $bankCode; return $this; @@ -393,9 +387,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/Transfers/EstimationTrackingData.php b/src/Adyen/Model/Transfers/EstimationTrackingData.php index ce5101a65..8b0fc80c6 100644 --- a/src/Adyen/Model/Transfers/EstimationTrackingData.php +++ b/src/Adyen/Model/Transfers/EstimationTrackingData.php @@ -329,9 +329,6 @@ public function getEstimatedArrivalTime() */ public function setEstimatedArrivalTime($estimatedArrivalTime) { - if (is_null($estimatedArrivalTime)) { - throw new \InvalidArgumentException('non-nullable estimatedArrivalTime cannot be null'); - } $this->container['estimatedArrivalTime'] = $estimatedArrivalTime; return $this; @@ -356,9 +353,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/Transfers/ExternalReason.php b/src/Adyen/Model/Transfers/ExternalReason.php index d6ed31572..7bc7121f5 100644 --- a/src/Adyen/Model/Transfers/ExternalReason.php +++ b/src/Adyen/Model/Transfers/ExternalReason.php @@ -309,9 +309,6 @@ public function getCode() */ public function setCode($code) { - if (is_null($code)) { - throw new \InvalidArgumentException('non-nullable code cannot be null'); - } $this->container['code'] = $code; return $this; @@ -336,9 +333,6 @@ public function getDescription() */ public function setDescription($description) { - if (is_null($description)) { - throw new \InvalidArgumentException('non-nullable description cannot be null'); - } $this->container['description'] = $description; return $this; @@ -363,9 +357,6 @@ public function getNamespace() */ public function setNamespace($namespace) { - if (is_null($namespace)) { - throw new \InvalidArgumentException('non-nullable namespace cannot be null'); - } $this->container['namespace'] = $namespace; return $this; diff --git a/src/Adyen/Model/Transfers/Fee.php b/src/Adyen/Model/Transfers/Fee.php index 28fd34f5d..b4f707f36 100644 --- a/src/Adyen/Model/Transfers/Fee.php +++ b/src/Adyen/Model/Transfers/Fee.php @@ -298,9 +298,6 @@ public function getAmount() */ public function setAmount($amount) { - if (is_null($amount)) { - throw new \InvalidArgumentException('non-nullable amount cannot be null'); - } $this->container['amount'] = $amount; return $this; diff --git a/src/Adyen/Model/Transfers/FindTransfersResponse.php b/src/Adyen/Model/Transfers/FindTransfersResponse.php index b0277d601..4ec46cc73 100644 --- a/src/Adyen/Model/Transfers/FindTransfersResponse.php +++ b/src/Adyen/Model/Transfers/FindTransfersResponse.php @@ -302,9 +302,6 @@ public function getLinks() */ public function setLinks($links) { - if (is_null($links)) { - throw new \InvalidArgumentException('non-nullable links cannot be null'); - } $this->container['links'] = $links; return $this; @@ -329,9 +326,6 @@ public function getData() */ public function setData($data) { - if (is_null($data)) { - throw new \InvalidArgumentException('non-nullable data cannot be null'); - } $this->container['data'] = $data; return $this; diff --git a/src/Adyen/Model/Transfers/HKLocalAccountIdentification.php b/src/Adyen/Model/Transfers/HKLocalAccountIdentification.php index 92e3a65a4..798df9166 100644 --- a/src/Adyen/Model/Transfers/HKLocalAccountIdentification.php +++ b/src/Adyen/Model/Transfers/HKLocalAccountIdentification.php @@ -339,9 +339,6 @@ public function getAccountNumber() */ public function setAccountNumber($accountNumber) { - if (is_null($accountNumber)) { - throw new \InvalidArgumentException('non-nullable accountNumber cannot be null'); - } $this->container['accountNumber'] = $accountNumber; return $this; @@ -366,9 +363,6 @@ public function getClearingCode() */ public function setClearingCode($clearingCode) { - if (is_null($clearingCode)) { - throw new \InvalidArgumentException('non-nullable clearingCode cannot be null'); - } $this->container['clearingCode'] = $clearingCode; return $this; @@ -393,9 +387,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/Transfers/HULocalAccountIdentification.php b/src/Adyen/Model/Transfers/HULocalAccountIdentification.php index 68a24846d..783ef2b54 100644 --- a/src/Adyen/Model/Transfers/HULocalAccountIdentification.php +++ b/src/Adyen/Model/Transfers/HULocalAccountIdentification.php @@ -329,9 +329,6 @@ public function getAccountNumber() */ public function setAccountNumber($accountNumber) { - if (is_null($accountNumber)) { - throw new \InvalidArgumentException('non-nullable accountNumber cannot be null'); - } $this->container['accountNumber'] = $accountNumber; return $this; @@ -356,9 +353,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/Transfers/IbanAccountIdentification.php b/src/Adyen/Model/Transfers/IbanAccountIdentification.php index 915278dd7..95e2cf494 100644 --- a/src/Adyen/Model/Transfers/IbanAccountIdentification.php +++ b/src/Adyen/Model/Transfers/IbanAccountIdentification.php @@ -329,9 +329,6 @@ public function getIban() */ public function setIban($iban) { - if (is_null($iban)) { - throw new \InvalidArgumentException('non-nullable iban cannot be null'); - } $this->container['iban'] = $iban; return $this; @@ -356,9 +353,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/Transfers/InternalCategoryData.php b/src/Adyen/Model/Transfers/InternalCategoryData.php index 682141792..578aae61f 100644 --- a/src/Adyen/Model/Transfers/InternalCategoryData.php +++ b/src/Adyen/Model/Transfers/InternalCategoryData.php @@ -330,9 +330,6 @@ public function getModificationMerchantReference() */ public function setModificationMerchantReference($modificationMerchantReference) { - if (is_null($modificationMerchantReference)) { - throw new \InvalidArgumentException('non-nullable modificationMerchantReference cannot be null'); - } $this->container['modificationMerchantReference'] = $modificationMerchantReference; return $this; @@ -357,9 +354,6 @@ public function getModificationPspReference() */ public function setModificationPspReference($modificationPspReference) { - if (is_null($modificationPspReference)) { - throw new \InvalidArgumentException('non-nullable modificationPspReference cannot be null'); - } $this->container['modificationPspReference'] = $modificationPspReference; return $this; @@ -384,9 +378,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/Transfers/InternalReviewTrackingData.php b/src/Adyen/Model/Transfers/InternalReviewTrackingData.php index 4d1a647f7..c9a93cc0a 100644 --- a/src/Adyen/Model/Transfers/InternalReviewTrackingData.php +++ b/src/Adyen/Model/Transfers/InternalReviewTrackingData.php @@ -380,9 +380,6 @@ public function getReason() */ 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( @@ -417,9 +414,6 @@ public function getStatus() */ 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( @@ -454,9 +448,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/Transfers/InvalidField.php b/src/Adyen/Model/Transfers/InvalidField.php index 2ee47848e..c0cfebbca 100644 --- a/src/Adyen/Model/Transfers/InvalidField.php +++ b/src/Adyen/Model/Transfers/InvalidField.php @@ -318,9 +318,6 @@ public function getMessage() */ public function setMessage($message) { - if (is_null($message)) { - throw new \InvalidArgumentException('non-nullable message cannot be null'); - } $this->container['message'] = $message; return $this; @@ -345,9 +342,6 @@ public function getName() */ public function setName($name) { - if (is_null($name)) { - throw new \InvalidArgumentException('non-nullable name cannot be null'); - } $this->container['name'] = $name; return $this; @@ -372,9 +366,6 @@ public function getValue() */ public function setValue($value) { - if (is_null($value)) { - throw new \InvalidArgumentException('non-nullable value cannot be null'); - } $this->container['value'] = $value; return $this; diff --git a/src/Adyen/Model/Transfers/IssuedCard.php b/src/Adyen/Model/Transfers/IssuedCard.php index 978d9ba28..b68877fee 100644 --- a/src/Adyen/Model/Transfers/IssuedCard.php +++ b/src/Adyen/Model/Transfers/IssuedCard.php @@ -433,9 +433,6 @@ public function getAuthorisationType() */ public function setAuthorisationType($authorisationType) { - if (is_null($authorisationType)) { - throw new \InvalidArgumentException('non-nullable authorisationType cannot be null'); - } $this->container['authorisationType'] = $authorisationType; return $this; @@ -460,9 +457,6 @@ public function getPanEntryMode() */ 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( @@ -497,9 +491,6 @@ public function getProcessingType() */ 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( @@ -534,9 +525,6 @@ public function getRelayedAuthorisationData() */ public function setRelayedAuthorisationData($relayedAuthorisationData) { - if (is_null($relayedAuthorisationData)) { - throw new \InvalidArgumentException('non-nullable relayedAuthorisationData cannot be null'); - } $this->container['relayedAuthorisationData'] = $relayedAuthorisationData; return $this; @@ -561,9 +549,6 @@ public function getSchemeTraceId() */ public function setSchemeTraceId($schemeTraceId) { - if (is_null($schemeTraceId)) { - throw new \InvalidArgumentException('non-nullable schemeTraceId cannot be null'); - } $this->container['schemeTraceId'] = $schemeTraceId; return $this; @@ -588,9 +573,6 @@ public function getSchemeUniqueTransactionId() */ public function setSchemeUniqueTransactionId($schemeUniqueTransactionId) { - if (is_null($schemeUniqueTransactionId)) { - throw new \InvalidArgumentException('non-nullable schemeUniqueTransactionId cannot be null'); - } $this->container['schemeUniqueTransactionId'] = $schemeUniqueTransactionId; return $this; @@ -615,9 +597,6 @@ public function getType() */ 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( @@ -652,9 +631,6 @@ public function getValidationFacts() */ public function setValidationFacts($validationFacts) { - if (is_null($validationFacts)) { - throw new \InvalidArgumentException('non-nullable validationFacts cannot be null'); - } $this->container['validationFacts'] = $validationFacts; return $this; diff --git a/src/Adyen/Model/Transfers/Link.php b/src/Adyen/Model/Transfers/Link.php index bb578ac17..9e3733abe 100644 --- a/src/Adyen/Model/Transfers/Link.php +++ b/src/Adyen/Model/Transfers/Link.php @@ -295,9 +295,6 @@ public function getHref() */ public function setHref($href) { - if (is_null($href)) { - throw new \InvalidArgumentException('non-nullable href cannot be null'); - } $this->container['href'] = $href; return $this; diff --git a/src/Adyen/Model/Transfers/Links.php b/src/Adyen/Model/Transfers/Links.php index 3ce6a16b0..0c2a352a8 100644 --- a/src/Adyen/Model/Transfers/Links.php +++ b/src/Adyen/Model/Transfers/Links.php @@ -302,9 +302,6 @@ public function getNext() */ public function setNext($next) { - if (is_null($next)) { - throw new \InvalidArgumentException('non-nullable next cannot be null'); - } $this->container['next'] = $next; return $this; @@ -329,9 +326,6 @@ public function getPrev() */ public function setPrev($prev) { - if (is_null($prev)) { - throw new \InvalidArgumentException('non-nullable prev cannot be null'); - } $this->container['prev'] = $prev; return $this; diff --git a/src/Adyen/Model/Transfers/MerchantData.php b/src/Adyen/Model/Transfers/MerchantData.php index 5226a8063..0eade0ca7 100644 --- a/src/Adyen/Model/Transfers/MerchantData.php +++ b/src/Adyen/Model/Transfers/MerchantData.php @@ -323,9 +323,6 @@ public function getAcquirerId() */ public function setAcquirerId($acquirerId) { - if (is_null($acquirerId)) { - throw new \InvalidArgumentException('non-nullable acquirerId cannot be null'); - } $this->container['acquirerId'] = $acquirerId; return $this; @@ -350,9 +347,6 @@ public function getMcc() */ public function setMcc($mcc) { - if (is_null($mcc)) { - throw new \InvalidArgumentException('non-nullable mcc cannot be null'); - } $this->container['mcc'] = $mcc; return $this; @@ -377,9 +371,6 @@ public function getMerchantId() */ public function setMerchantId($merchantId) { - if (is_null($merchantId)) { - throw new \InvalidArgumentException('non-nullable merchantId cannot be null'); - } $this->container['merchantId'] = $merchantId; return $this; @@ -404,9 +395,6 @@ public function getNameLocation() */ public function setNameLocation($nameLocation) { - if (is_null($nameLocation)) { - throw new \InvalidArgumentException('non-nullable nameLocation cannot be null'); - } $this->container['nameLocation'] = $nameLocation; return $this; @@ -431,9 +419,6 @@ public function getPostalCode() */ public function setPostalCode($postalCode) { - if (is_null($postalCode)) { - throw new \InvalidArgumentException('non-nullable postalCode cannot be null'); - } $this->container['postalCode'] = $postalCode; return $this; diff --git a/src/Adyen/Model/Transfers/Modification.php b/src/Adyen/Model/Transfers/Modification.php index 4b76920c9..4ff147d04 100644 --- a/src/Adyen/Model/Transfers/Modification.php +++ b/src/Adyen/Model/Transfers/Modification.php @@ -472,9 +472,6 @@ public function getDirection() */ public function setDirection($direction) { - if (is_null($direction)) { - throw new \InvalidArgumentException('non-nullable direction cannot be null'); - } $this->container['direction'] = $direction; return $this; @@ -499,9 +496,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -526,9 +520,6 @@ public function getReference() */ public function setReference($reference) { - if (is_null($reference)) { - throw new \InvalidArgumentException('non-nullable reference cannot be null'); - } $this->container['reference'] = $reference; return $this; @@ -553,9 +544,6 @@ public function getStatus() */ 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( @@ -590,9 +578,6 @@ public function getType() */ public function setType($type) { - if (is_null($type)) { - throw new \InvalidArgumentException('non-nullable type cannot be null'); - } $this->container['type'] = $type; return $this; diff --git a/src/Adyen/Model/Transfers/NOLocalAccountIdentification.php b/src/Adyen/Model/Transfers/NOLocalAccountIdentification.php index 56eaaa8e4..eef7522f1 100644 --- a/src/Adyen/Model/Transfers/NOLocalAccountIdentification.php +++ b/src/Adyen/Model/Transfers/NOLocalAccountIdentification.php @@ -329,9 +329,6 @@ public function getAccountNumber() */ public function setAccountNumber($accountNumber) { - if (is_null($accountNumber)) { - throw new \InvalidArgumentException('non-nullable accountNumber cannot be null'); - } $this->container['accountNumber'] = $accountNumber; return $this; @@ -356,9 +353,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/Transfers/NZLocalAccountIdentification.php b/src/Adyen/Model/Transfers/NZLocalAccountIdentification.php index 3148ea4ee..01645f34d 100644 --- a/src/Adyen/Model/Transfers/NZLocalAccountIdentification.php +++ b/src/Adyen/Model/Transfers/NZLocalAccountIdentification.php @@ -329,9 +329,6 @@ public function getAccountNumber() */ public function setAccountNumber($accountNumber) { - if (is_null($accountNumber)) { - throw new \InvalidArgumentException('non-nullable accountNumber cannot be null'); - } $this->container['accountNumber'] = $accountNumber; return $this; @@ -356,9 +353,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/Transfers/NameLocation.php b/src/Adyen/Model/Transfers/NameLocation.php index b7d8dd6a6..709749529 100644 --- a/src/Adyen/Model/Transfers/NameLocation.php +++ b/src/Adyen/Model/Transfers/NameLocation.php @@ -330,9 +330,6 @@ public function getCity() */ public function setCity($city) { - if (is_null($city)) { - throw new \InvalidArgumentException('non-nullable city cannot be null'); - } $this->container['city'] = $city; return $this; @@ -357,9 +354,6 @@ public function getCountry() */ public function setCountry($country) { - if (is_null($country)) { - throw new \InvalidArgumentException('non-nullable country cannot be null'); - } $this->container['country'] = $country; return $this; @@ -384,9 +378,6 @@ public function getCountryOfOrigin() */ public function setCountryOfOrigin($countryOfOrigin) { - if (is_null($countryOfOrigin)) { - throw new \InvalidArgumentException('non-nullable countryOfOrigin cannot be null'); - } $this->container['countryOfOrigin'] = $countryOfOrigin; return $this; @@ -411,9 +402,6 @@ public function getName() */ public function setName($name) { - if (is_null($name)) { - throw new \InvalidArgumentException('non-nullable name cannot be null'); - } $this->container['name'] = $name; return $this; @@ -438,9 +426,6 @@ public function getRawData() */ public function setRawData($rawData) { - if (is_null($rawData)) { - throw new \InvalidArgumentException('non-nullable rawData cannot be null'); - } $this->container['rawData'] = $rawData; return $this; @@ -465,9 +450,6 @@ public function getState() */ public function setState($state) { - if (is_null($state)) { - throw new \InvalidArgumentException('non-nullable state cannot be null'); - } $this->container['state'] = $state; return $this; diff --git a/src/Adyen/Model/Transfers/NumberAndBicAccountIdentification.php b/src/Adyen/Model/Transfers/NumberAndBicAccountIdentification.php index 21da727ec..c261fe768 100644 --- a/src/Adyen/Model/Transfers/NumberAndBicAccountIdentification.php +++ b/src/Adyen/Model/Transfers/NumberAndBicAccountIdentification.php @@ -346,9 +346,6 @@ public function getAccountNumber() */ public function setAccountNumber($accountNumber) { - if (is_null($accountNumber)) { - throw new \InvalidArgumentException('non-nullable accountNumber cannot be null'); - } $this->container['accountNumber'] = $accountNumber; return $this; @@ -373,9 +370,6 @@ public function getAdditionalBankIdentification() */ public function setAdditionalBankIdentification($additionalBankIdentification) { - if (is_null($additionalBankIdentification)) { - throw new \InvalidArgumentException('non-nullable additionalBankIdentification cannot be null'); - } $this->container['additionalBankIdentification'] = $additionalBankIdentification; return $this; @@ -400,9 +394,6 @@ public function getBic() */ public function setBic($bic) { - if (is_null($bic)) { - throw new \InvalidArgumentException('non-nullable bic cannot be null'); - } $this->container['bic'] = $bic; return $this; @@ -427,9 +418,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/Transfers/ObjectSerializer.php b/src/Adyen/Model/Transfers/ObjectSerializer.php index b9cbe36bf..349b367b3 100644 --- a/src/Adyen/Model/Transfers/ObjectSerializer.php +++ b/src/Adyen/Model/Transfers/ObjectSerializer.php @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach ($data as $property => $value) { + foreach($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) { - return $timestamp; - } + if (!is_string($timestamp)) return $timestamp; return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/Transfers/PLLocalAccountIdentification.php b/src/Adyen/Model/Transfers/PLLocalAccountIdentification.php index 1a77dd379..3315550b4 100644 --- a/src/Adyen/Model/Transfers/PLLocalAccountIdentification.php +++ b/src/Adyen/Model/Transfers/PLLocalAccountIdentification.php @@ -329,9 +329,6 @@ public function getAccountNumber() */ public function setAccountNumber($accountNumber) { - if (is_null($accountNumber)) { - throw new \InvalidArgumentException('non-nullable accountNumber cannot be null'); - } $this->container['accountNumber'] = $accountNumber; return $this; @@ -356,9 +353,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/Transfers/PartyIdentification.php b/src/Adyen/Model/Transfers/PartyIdentification.php index aca8e771c..6ffc839e2 100644 --- a/src/Adyen/Model/Transfers/PartyIdentification.php +++ b/src/Adyen/Model/Transfers/PartyIdentification.php @@ -365,9 +365,6 @@ public function getAddress() */ public function setAddress($address) { - if (is_null($address)) { - throw new \InvalidArgumentException('non-nullable address cannot be null'); - } $this->container['address'] = $address; return $this; @@ -392,9 +389,6 @@ public function getDateOfBirth() */ public function setDateOfBirth($dateOfBirth) { - if (is_null($dateOfBirth)) { - throw new \InvalidArgumentException('non-nullable dateOfBirth cannot be null'); - } $this->container['dateOfBirth'] = $dateOfBirth; return $this; @@ -419,9 +413,6 @@ public function getFirstName() */ public function setFirstName($firstName) { - if (is_null($firstName)) { - throw new \InvalidArgumentException('non-nullable firstName cannot be null'); - } $this->container['firstName'] = $firstName; return $this; @@ -446,9 +437,6 @@ public function getFullName() */ public function setFullName($fullName) { - if (is_null($fullName)) { - throw new \InvalidArgumentException('non-nullable fullName cannot be null'); - } $this->container['fullName'] = $fullName; return $this; @@ -473,9 +461,6 @@ public function getLastName() */ public function setLastName($lastName) { - if (is_null($lastName)) { - throw new \InvalidArgumentException('non-nullable lastName cannot be null'); - } $this->container['lastName'] = $lastName; return $this; @@ -500,9 +485,6 @@ public function getReference() */ public function setReference($reference) { - if (is_null($reference)) { - throw new \InvalidArgumentException('non-nullable reference cannot be null'); - } $this->container['reference'] = $reference; return $this; @@ -527,9 +509,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/Transfers/PaymentInstrument.php b/src/Adyen/Model/Transfers/PaymentInstrument.php index 65a93a486..715fd4554 100644 --- a/src/Adyen/Model/Transfers/PaymentInstrument.php +++ b/src/Adyen/Model/Transfers/PaymentInstrument.php @@ -316,9 +316,6 @@ public function getDescription() */ public function setDescription($description) { - if (is_null($description)) { - throw new \InvalidArgumentException('non-nullable description cannot be null'); - } $this->container['description'] = $description; return $this; @@ -343,9 +340,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -370,9 +364,6 @@ public function getReference() */ public function setReference($reference) { - if (is_null($reference)) { - throw new \InvalidArgumentException('non-nullable reference cannot be null'); - } $this->container['reference'] = $reference; return $this; @@ -397,9 +388,6 @@ public function getTokenType() */ public function setTokenType($tokenType) { - if (is_null($tokenType)) { - throw new \InvalidArgumentException('non-nullable tokenType cannot be null'); - } $this->container['tokenType'] = $tokenType; return $this; diff --git a/src/Adyen/Model/Transfers/PlatformPayment.php b/src/Adyen/Model/Transfers/PlatformPayment.php index 86d6f6ee2..e07c95881 100644 --- a/src/Adyen/Model/Transfers/PlatformPayment.php +++ b/src/Adyen/Model/Transfers/PlatformPayment.php @@ -400,9 +400,6 @@ public function getModificationMerchantReference() */ public function setModificationMerchantReference($modificationMerchantReference) { - if (is_null($modificationMerchantReference)) { - throw new \InvalidArgumentException('non-nullable modificationMerchantReference cannot be null'); - } $this->container['modificationMerchantReference'] = $modificationMerchantReference; return $this; @@ -427,9 +424,6 @@ public function getModificationPspReference() */ public function setModificationPspReference($modificationPspReference) { - if (is_null($modificationPspReference)) { - throw new \InvalidArgumentException('non-nullable modificationPspReference cannot be null'); - } $this->container['modificationPspReference'] = $modificationPspReference; return $this; @@ -454,9 +448,6 @@ public function getPaymentMerchantReference() */ public function setPaymentMerchantReference($paymentMerchantReference) { - if (is_null($paymentMerchantReference)) { - throw new \InvalidArgumentException('non-nullable paymentMerchantReference cannot be null'); - } $this->container['paymentMerchantReference'] = $paymentMerchantReference; return $this; @@ -481,9 +472,6 @@ public function getPlatformPaymentType() */ 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( @@ -518,9 +506,6 @@ public function getPspPaymentReference() */ public function setPspPaymentReference($pspPaymentReference) { - if (is_null($pspPaymentReference)) { - throw new \InvalidArgumentException('non-nullable pspPaymentReference cannot be null'); - } $this->container['pspPaymentReference'] = $pspPaymentReference; return $this; @@ -545,9 +530,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/Transfers/RelayedAuthorisationData.php b/src/Adyen/Model/Transfers/RelayedAuthorisationData.php index 551380508..9ff9dec7a 100644 --- a/src/Adyen/Model/Transfers/RelayedAuthorisationData.php +++ b/src/Adyen/Model/Transfers/RelayedAuthorisationData.php @@ -302,9 +302,6 @@ public function getMetadata() */ public function setMetadata($metadata) { - if (is_null($metadata)) { - throw new \InvalidArgumentException('non-nullable metadata cannot be null'); - } $this->container['metadata'] = $metadata; return $this; @@ -329,9 +326,6 @@ public function getReference() */ public function setReference($reference) { - if (is_null($reference)) { - throw new \InvalidArgumentException('non-nullable reference cannot be null'); - } $this->container['reference'] = $reference; return $this; diff --git a/src/Adyen/Model/Transfers/Repayment.php b/src/Adyen/Model/Transfers/Repayment.php index 7ddeac0ab..14ad052ac 100644 --- a/src/Adyen/Model/Transfers/Repayment.php +++ b/src/Adyen/Model/Transfers/Repayment.php @@ -312,7 +312,6 @@ public function getBasisPoints() */ public function setBasisPoints($basisPoints) { - // Do nothing for nullable integers $this->container['basisPoints'] = $basisPoints; return $this; @@ -337,9 +336,6 @@ public function getTerm() */ public function setTerm($term) { - if (is_null($term)) { - throw new \InvalidArgumentException('non-nullable term cannot be null'); - } $this->container['term'] = $term; return $this; @@ -364,9 +360,6 @@ public function getThreshold() */ public function setThreshold($threshold) { - if (is_null($threshold)) { - throw new \InvalidArgumentException('non-nullable threshold cannot be null'); - } $this->container['threshold'] = $threshold; return $this; diff --git a/src/Adyen/Model/Transfers/RepaymentTerm.php b/src/Adyen/Model/Transfers/RepaymentTerm.php index 584cf14e4..c76feb424 100644 --- a/src/Adyen/Model/Transfers/RepaymentTerm.php +++ b/src/Adyen/Model/Transfers/RepaymentTerm.php @@ -305,7 +305,6 @@ public function getEstimatedDays() */ public function setEstimatedDays($estimatedDays) { - // Do nothing for nullable integers $this->container['estimatedDays'] = $estimatedDays; return $this; @@ -330,7 +329,6 @@ public function getMaximumDays() */ public function setMaximumDays($maximumDays) { - // Do nothing for nullable integers $this->container['maximumDays'] = $maximumDays; return $this; diff --git a/src/Adyen/Model/Transfers/ResourceReference.php b/src/Adyen/Model/Transfers/ResourceReference.php index cf6576af5..8e7841e3c 100644 --- a/src/Adyen/Model/Transfers/ResourceReference.php +++ b/src/Adyen/Model/Transfers/ResourceReference.php @@ -309,9 +309,6 @@ public function getDescription() */ public function setDescription($description) { - if (is_null($description)) { - throw new \InvalidArgumentException('non-nullable description cannot be null'); - } $this->container['description'] = $description; return $this; @@ -336,9 +333,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -363,9 +357,6 @@ public function getReference() */ public function setReference($reference) { - if (is_null($reference)) { - throw new \InvalidArgumentException('non-nullable reference cannot be null'); - } $this->container['reference'] = $reference; return $this; diff --git a/src/Adyen/Model/Transfers/RestServiceError.php b/src/Adyen/Model/Transfers/RestServiceError.php index 0c48eb9cb..f5be25cbe 100644 --- a/src/Adyen/Model/Transfers/RestServiceError.php +++ b/src/Adyen/Model/Transfers/RestServiceError.php @@ -366,9 +366,6 @@ public function getDetail() */ public function setDetail($detail) { - if (is_null($detail)) { - throw new \InvalidArgumentException('non-nullable detail cannot be null'); - } $this->container['detail'] = $detail; return $this; @@ -393,9 +390,6 @@ public function getErrorCode() */ public function setErrorCode($errorCode) { - if (is_null($errorCode)) { - throw new \InvalidArgumentException('non-nullable errorCode cannot be null'); - } $this->container['errorCode'] = $errorCode; return $this; @@ -420,9 +414,6 @@ public function getInstance() */ public function setInstance($instance) { - if (is_null($instance)) { - throw new \InvalidArgumentException('non-nullable instance cannot be null'); - } $this->container['instance'] = $instance; return $this; @@ -447,9 +438,6 @@ public function getInvalidFields() */ public function setInvalidFields($invalidFields) { - if (is_null($invalidFields)) { - throw new \InvalidArgumentException('non-nullable invalidFields cannot be null'); - } $this->container['invalidFields'] = $invalidFields; return $this; @@ -474,9 +462,6 @@ public function getRequestId() */ public function setRequestId($requestId) { - if (is_null($requestId)) { - throw new \InvalidArgumentException('non-nullable requestId cannot be null'); - } $this->container['requestId'] = $requestId; return $this; @@ -501,9 +486,6 @@ public function getResponse() */ public function setResponse($response) { - if (is_null($response)) { - throw new \InvalidArgumentException('non-nullable response cannot be null'); - } $this->container['response'] = $response; return $this; @@ -528,7 +510,6 @@ public function getStatus() */ public function setStatus($status) { - // Do nothing for nullable integers $this->container['status'] = $status; return $this; @@ -553,9 +534,6 @@ public function getTitle() */ public function setTitle($title) { - if (is_null($title)) { - throw new \InvalidArgumentException('non-nullable title cannot be null'); - } $this->container['title'] = $title; return $this; @@ -580,9 +558,6 @@ public function getType() */ public function setType($type) { - if (is_null($type)) { - throw new \InvalidArgumentException('non-nullable type cannot be null'); - } $this->container['type'] = $type; return $this; diff --git a/src/Adyen/Model/Transfers/ReturnTransferRequest.php b/src/Adyen/Model/Transfers/ReturnTransferRequest.php index c7fc40f91..7238ede7e 100644 --- a/src/Adyen/Model/Transfers/ReturnTransferRequest.php +++ b/src/Adyen/Model/Transfers/ReturnTransferRequest.php @@ -305,9 +305,6 @@ public function getAmount() */ public function setAmount($amount) { - if (is_null($amount)) { - throw new \InvalidArgumentException('non-nullable amount cannot be null'); - } $this->container['amount'] = $amount; return $this; @@ -332,9 +329,6 @@ public function getReference() */ public function setReference($reference) { - if (is_null($reference)) { - throw new \InvalidArgumentException('non-nullable reference cannot be null'); - } $this->container['reference'] = $reference; return $this; diff --git a/src/Adyen/Model/Transfers/ReturnTransferResponse.php b/src/Adyen/Model/Transfers/ReturnTransferResponse.php index 58dacfe76..12a0a4c9d 100644 --- a/src/Adyen/Model/Transfers/ReturnTransferResponse.php +++ b/src/Adyen/Model/Transfers/ReturnTransferResponse.php @@ -339,9 +339,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -366,9 +363,6 @@ public function getReference() */ public function setReference($reference) { - if (is_null($reference)) { - throw new \InvalidArgumentException('non-nullable reference cannot be null'); - } $this->container['reference'] = $reference; return $this; @@ -393,9 +387,6 @@ public function getStatus() */ 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( @@ -430,9 +421,6 @@ public function getTransferId() */ public function setTransferId($transferId) { - if (is_null($transferId)) { - throw new \InvalidArgumentException('non-nullable transferId cannot be null'); - } $this->container['transferId'] = $transferId; return $this; diff --git a/src/Adyen/Model/Transfers/RoutingDetails.php b/src/Adyen/Model/Transfers/RoutingDetails.php index 5b963782f..726a28b4a 100644 --- a/src/Adyen/Model/Transfers/RoutingDetails.php +++ b/src/Adyen/Model/Transfers/RoutingDetails.php @@ -347,9 +347,6 @@ public function getDetail() */ public function setDetail($detail) { - if (is_null($detail)) { - throw new \InvalidArgumentException('non-nullable detail cannot be null'); - } $this->container['detail'] = $detail; return $this; @@ -374,9 +371,6 @@ public function getErrorCode() */ public function setErrorCode($errorCode) { - if (is_null($errorCode)) { - throw new \InvalidArgumentException('non-nullable errorCode cannot be null'); - } $this->container['errorCode'] = $errorCode; return $this; @@ -401,9 +395,6 @@ public function getPriority() */ 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( @@ -438,9 +429,6 @@ public function getTitle() */ public function setTitle($title) { - if (is_null($title)) { - throw new \InvalidArgumentException('non-nullable title cannot be null'); - } $this->container['title'] = $title; return $this; diff --git a/src/Adyen/Model/Transfers/SELocalAccountIdentification.php b/src/Adyen/Model/Transfers/SELocalAccountIdentification.php index 294b68e36..89d9b2293 100644 --- a/src/Adyen/Model/Transfers/SELocalAccountIdentification.php +++ b/src/Adyen/Model/Transfers/SELocalAccountIdentification.php @@ -339,9 +339,6 @@ public function getAccountNumber() */ public function setAccountNumber($accountNumber) { - if (is_null($accountNumber)) { - throw new \InvalidArgumentException('non-nullable accountNumber cannot be null'); - } $this->container['accountNumber'] = $accountNumber; return $this; @@ -366,9 +363,6 @@ public function getClearingNumber() */ public function setClearingNumber($clearingNumber) { - if (is_null($clearingNumber)) { - throw new \InvalidArgumentException('non-nullable clearingNumber cannot be null'); - } $this->container['clearingNumber'] = $clearingNumber; return $this; @@ -393,9 +387,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/Transfers/SGLocalAccountIdentification.php b/src/Adyen/Model/Transfers/SGLocalAccountIdentification.php index 2ae4691ff..2915a8712 100644 --- a/src/Adyen/Model/Transfers/SGLocalAccountIdentification.php +++ b/src/Adyen/Model/Transfers/SGLocalAccountIdentification.php @@ -336,9 +336,6 @@ public function getAccountNumber() */ public function setAccountNumber($accountNumber) { - if (is_null($accountNumber)) { - throw new \InvalidArgumentException('non-nullable accountNumber cannot be null'); - } $this->container['accountNumber'] = $accountNumber; return $this; @@ -363,9 +360,6 @@ public function getBic() */ public function setBic($bic) { - if (is_null($bic)) { - throw new \InvalidArgumentException('non-nullable bic cannot be null'); - } $this->container['bic'] = $bic; return $this; @@ -390,9 +384,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/Transfers/ServiceError.php b/src/Adyen/Model/Transfers/ServiceError.php index 5219c284d..819558195 100644 --- a/src/Adyen/Model/Transfers/ServiceError.php +++ b/src/Adyen/Model/Transfers/ServiceError.php @@ -323,9 +323,6 @@ public function getErrorCode() */ public function setErrorCode($errorCode) { - if (is_null($errorCode)) { - throw new \InvalidArgumentException('non-nullable errorCode cannot be null'); - } $this->container['errorCode'] = $errorCode; return $this; @@ -350,9 +347,6 @@ public function getErrorType() */ public function setErrorType($errorType) { - if (is_null($errorType)) { - throw new \InvalidArgumentException('non-nullable errorType cannot be null'); - } $this->container['errorType'] = $errorType; return $this; @@ -377,9 +371,6 @@ public function getMessage() */ public function setMessage($message) { - if (is_null($message)) { - throw new \InvalidArgumentException('non-nullable message cannot be null'); - } $this->container['message'] = $message; return $this; @@ -404,9 +395,6 @@ public function getPspReference() */ public function setPspReference($pspReference) { - if (is_null($pspReference)) { - throw new \InvalidArgumentException('non-nullable pspReference cannot be null'); - } $this->container['pspReference'] = $pspReference; return $this; @@ -431,7 +419,6 @@ public function getStatus() */ public function setStatus($status) { - // Do nothing for nullable integers $this->container['status'] = $status; return $this; diff --git a/src/Adyen/Model/Transfers/ThresholdRepayment.php b/src/Adyen/Model/Transfers/ThresholdRepayment.php index 408b7b7e2..b7d0e10d5 100644 --- a/src/Adyen/Model/Transfers/ThresholdRepayment.php +++ b/src/Adyen/Model/Transfers/ThresholdRepayment.php @@ -298,9 +298,6 @@ public function getAmount() */ public function setAmount($amount) { - if (is_null($amount)) { - throw new \InvalidArgumentException('non-nullable amount cannot be null'); - } $this->container['amount'] = $amount; return $this; diff --git a/src/Adyen/Model/Transfers/Transaction.php b/src/Adyen/Model/Transfers/Transaction.php index b0b25d6c4..404e951be 100644 --- a/src/Adyen/Model/Transfers/Transaction.php +++ b/src/Adyen/Model/Transfers/Transaction.php @@ -426,9 +426,6 @@ public function getAccountHolder() */ public function setAccountHolder($accountHolder) { - if (is_null($accountHolder)) { - throw new \InvalidArgumentException('non-nullable accountHolder cannot be null'); - } $this->container['accountHolder'] = $accountHolder; return $this; @@ -453,9 +450,6 @@ public function getAmount() */ public function setAmount($amount) { - if (is_null($amount)) { - throw new \InvalidArgumentException('non-nullable amount cannot be null'); - } $this->container['amount'] = $amount; return $this; @@ -480,9 +474,6 @@ public function getBalanceAccount() */ public function setBalanceAccount($balanceAccount) { - if (is_null($balanceAccount)) { - throw new \InvalidArgumentException('non-nullable balanceAccount cannot be null'); - } $this->container['balanceAccount'] = $balanceAccount; return $this; @@ -507,9 +498,6 @@ public function getBalancePlatform() */ public function setBalancePlatform($balancePlatform) { - if (is_null($balancePlatform)) { - throw new \InvalidArgumentException('non-nullable balancePlatform cannot be null'); - } $this->container['balancePlatform'] = $balancePlatform; return $this; @@ -534,9 +522,6 @@ public function getBookingDate() */ public function setBookingDate($bookingDate) { - if (is_null($bookingDate)) { - throw new \InvalidArgumentException('non-nullable bookingDate cannot be null'); - } $this->container['bookingDate'] = $bookingDate; return $this; @@ -561,9 +546,6 @@ public function getCreationDate() */ public function setCreationDate($creationDate) { - if (is_null($creationDate)) { - throw new \InvalidArgumentException('non-nullable creationDate cannot be null'); - } $this->container['creationDate'] = $creationDate; return $this; @@ -588,9 +570,6 @@ public function getDescription() */ public function setDescription($description) { - if (is_null($description)) { - throw new \InvalidArgumentException('non-nullable description cannot be null'); - } $this->container['description'] = $description; return $this; @@ -615,9 +594,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -642,9 +618,6 @@ public function getPaymentInstrument() */ public function setPaymentInstrument($paymentInstrument) { - if (is_null($paymentInstrument)) { - throw new \InvalidArgumentException('non-nullable paymentInstrument cannot be null'); - } $this->container['paymentInstrument'] = $paymentInstrument; return $this; @@ -669,9 +642,6 @@ public function getReferenceForBeneficiary() */ public function setReferenceForBeneficiary($referenceForBeneficiary) { - if (is_null($referenceForBeneficiary)) { - throw new \InvalidArgumentException('non-nullable referenceForBeneficiary cannot be null'); - } $this->container['referenceForBeneficiary'] = $referenceForBeneficiary; return $this; @@ -696,9 +666,6 @@ public function getStatus() */ 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( @@ -733,9 +700,6 @@ public function getTransfer() */ public function setTransfer($transfer) { - if (is_null($transfer)) { - throw new \InvalidArgumentException('non-nullable transfer cannot be null'); - } $this->container['transfer'] = $transfer; return $this; @@ -760,9 +724,6 @@ public function getValueDate() */ public function setValueDate($valueDate) { - if (is_null($valueDate)) { - throw new \InvalidArgumentException('non-nullable valueDate cannot be null'); - } $this->container['valueDate'] = $valueDate; return $this; diff --git a/src/Adyen/Model/Transfers/TransactionEventViolation.php b/src/Adyen/Model/Transfers/TransactionEventViolation.php index e1914c5a5..22214d462 100644 --- a/src/Adyen/Model/Transfers/TransactionEventViolation.php +++ b/src/Adyen/Model/Transfers/TransactionEventViolation.php @@ -309,9 +309,6 @@ public function getReason() */ public function setReason($reason) { - if (is_null($reason)) { - throw new \InvalidArgumentException('non-nullable reason cannot be null'); - } $this->container['reason'] = $reason; return $this; @@ -336,9 +333,6 @@ public function getTransactionRule() */ public function setTransactionRule($transactionRule) { - if (is_null($transactionRule)) { - throw new \InvalidArgumentException('non-nullable transactionRule cannot be null'); - } $this->container['transactionRule'] = $transactionRule; return $this; @@ -363,9 +357,6 @@ public function getTransactionRuleSource() */ public function setTransactionRuleSource($transactionRuleSource) { - if (is_null($transactionRuleSource)) { - throw new \InvalidArgumentException('non-nullable transactionRuleSource cannot be null'); - } $this->container['transactionRuleSource'] = $transactionRuleSource; return $this; diff --git a/src/Adyen/Model/Transfers/TransactionRuleReference.php b/src/Adyen/Model/Transfers/TransactionRuleReference.php index 53af36812..3866b35e9 100644 --- a/src/Adyen/Model/Transfers/TransactionRuleReference.php +++ b/src/Adyen/Model/Transfers/TransactionRuleReference.php @@ -323,9 +323,6 @@ public function getDescription() */ public function setDescription($description) { - if (is_null($description)) { - throw new \InvalidArgumentException('non-nullable description cannot be null'); - } $this->container['description'] = $description; return $this; @@ -350,9 +347,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -377,9 +371,6 @@ public function getOutcomeType() */ public function setOutcomeType($outcomeType) { - if (is_null($outcomeType)) { - throw new \InvalidArgumentException('non-nullable outcomeType cannot be null'); - } $this->container['outcomeType'] = $outcomeType; return $this; @@ -404,9 +395,6 @@ public function getReference() */ public function setReference($reference) { - if (is_null($reference)) { - throw new \InvalidArgumentException('non-nullable reference cannot be null'); - } $this->container['reference'] = $reference; return $this; @@ -431,7 +419,6 @@ public function getScore() */ public function setScore($score) { - // Do nothing for nullable integers $this->container['score'] = $score; return $this; diff --git a/src/Adyen/Model/Transfers/TransactionRuleSource.php b/src/Adyen/Model/Transfers/TransactionRuleSource.php index 77fdee579..e11505747 100644 --- a/src/Adyen/Model/Transfers/TransactionRuleSource.php +++ b/src/Adyen/Model/Transfers/TransactionRuleSource.php @@ -302,9 +302,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -329,9 +326,6 @@ public function getType() */ public function setType($type) { - if (is_null($type)) { - throw new \InvalidArgumentException('non-nullable type cannot be null'); - } $this->container['type'] = $type; return $this; diff --git a/src/Adyen/Model/Transfers/TransactionRulesResult.php b/src/Adyen/Model/Transfers/TransactionRulesResult.php index c740d4556..2a3847230 100644 --- a/src/Adyen/Model/Transfers/TransactionRulesResult.php +++ b/src/Adyen/Model/Transfers/TransactionRulesResult.php @@ -316,9 +316,6 @@ public function getAdvice() */ public function setAdvice($advice) { - if (is_null($advice)) { - throw new \InvalidArgumentException('non-nullable advice cannot be null'); - } $this->container['advice'] = $advice; return $this; @@ -343,9 +340,6 @@ public function getAllHardBlockRulesPassed() */ public function setAllHardBlockRulesPassed($allHardBlockRulesPassed) { - if (is_null($allHardBlockRulesPassed)) { - throw new \InvalidArgumentException('non-nullable allHardBlockRulesPassed cannot be null'); - } $this->container['allHardBlockRulesPassed'] = $allHardBlockRulesPassed; return $this; @@ -370,7 +364,6 @@ public function getScore() */ public function setScore($score) { - // Do nothing for nullable integers $this->container['score'] = $score; return $this; @@ -395,9 +388,6 @@ public function getTriggeredTransactionRules() */ public function setTriggeredTransactionRules($triggeredTransactionRules) { - if (is_null($triggeredTransactionRules)) { - throw new \InvalidArgumentException('non-nullable triggeredTransactionRules cannot be null'); - } $this->container['triggeredTransactionRules'] = $triggeredTransactionRules; return $this; diff --git a/src/Adyen/Model/Transfers/TransactionSearchResponse.php b/src/Adyen/Model/Transfers/TransactionSearchResponse.php index 08b6fa163..b03daf091 100644 --- a/src/Adyen/Model/Transfers/TransactionSearchResponse.php +++ b/src/Adyen/Model/Transfers/TransactionSearchResponse.php @@ -302,9 +302,6 @@ public function getLinks() */ public function setLinks($links) { - if (is_null($links)) { - throw new \InvalidArgumentException('non-nullable links cannot be null'); - } $this->container['links'] = $links; return $this; @@ -329,9 +326,6 @@ public function getData() */ public function setData($data) { - if (is_null($data)) { - throw new \InvalidArgumentException('non-nullable data cannot be null'); - } $this->container['data'] = $data; return $this; diff --git a/src/Adyen/Model/Transfers/Transfer.php b/src/Adyen/Model/Transfers/Transfer.php index 6596a1234..d27001980 100644 --- a/src/Adyen/Model/Transfers/Transfer.php +++ b/src/Adyen/Model/Transfers/Transfer.php @@ -320,6 +320,7 @@ public function getModelName() 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 = 'declined'; public const REASON_DECLINED_BY_TRANSACTION_RULE = 'declinedByTransactionRule'; public const REASON_ERROR = 'error'; public const REASON_NOT_ENOUGH_BALANCE = 'notEnoughBalance'; @@ -474,6 +475,7 @@ public function getReasonAllowableValues() self::REASON_COUNTERPARTY_ADDRESS_REQUIRED, self::REASON_COUNTERPARTY_BANK_TIMED_OUT, self::REASON_COUNTERPARTY_BANK_UNAVAILABLE, + self::REASON_DECLINED, self::REASON_DECLINED_BY_TRANSACTION_RULE, self::REASON_ERROR, self::REASON_NOT_ENOUGH_BALANCE, @@ -757,9 +759,6 @@ public function getAccountHolder() */ public function setAccountHolder($accountHolder) { - if (is_null($accountHolder)) { - throw new \InvalidArgumentException('non-nullable accountHolder cannot be null'); - } $this->container['accountHolder'] = $accountHolder; return $this; @@ -784,9 +783,6 @@ public function getAmount() */ public function setAmount($amount) { - if (is_null($amount)) { - throw new \InvalidArgumentException('non-nullable amount cannot be null'); - } $this->container['amount'] = $amount; return $this; @@ -811,9 +807,6 @@ public function getBalanceAccount() */ public function setBalanceAccount($balanceAccount) { - if (is_null($balanceAccount)) { - throw new \InvalidArgumentException('non-nullable balanceAccount cannot be null'); - } $this->container['balanceAccount'] = $balanceAccount; return $this; @@ -838,9 +831,6 @@ public function getCategory() */ 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( @@ -875,9 +865,6 @@ public function getCategoryData() */ public function setCategoryData($categoryData) { - if (is_null($categoryData)) { - throw new \InvalidArgumentException('non-nullable categoryData cannot be null'); - } $this->container['categoryData'] = $categoryData; return $this; @@ -902,9 +889,6 @@ public function getCounterparty() */ public function setCounterparty($counterparty) { - if (is_null($counterparty)) { - throw new \InvalidArgumentException('non-nullable counterparty cannot be null'); - } $this->container['counterparty'] = $counterparty; return $this; @@ -929,9 +913,6 @@ public function getCreationDate() */ public function setCreationDate($creationDate) { - if (is_null($creationDate)) { - throw new \InvalidArgumentException('non-nullable creationDate cannot be null'); - } $this->container['creationDate'] = $creationDate; return $this; @@ -956,9 +937,6 @@ public function getDescription() */ public function setDescription($description) { - if (is_null($description)) { - throw new \InvalidArgumentException('non-nullable description cannot be null'); - } $this->container['description'] = $description; return $this; @@ -983,9 +961,6 @@ public function getDirection() */ 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( @@ -1020,9 +995,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -1047,9 +1019,6 @@ public function getPaymentInstrument() */ public function setPaymentInstrument($paymentInstrument) { - if (is_null($paymentInstrument)) { - throw new \InvalidArgumentException('non-nullable paymentInstrument cannot be null'); - } $this->container['paymentInstrument'] = $paymentInstrument; return $this; @@ -1074,9 +1043,6 @@ public function getReason() */ 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( @@ -1111,9 +1077,6 @@ public function getReference() */ public function setReference($reference) { - if (is_null($reference)) { - throw new \InvalidArgumentException('non-nullable reference cannot be null'); - } $this->container['reference'] = $reference; return $this; @@ -1138,9 +1101,6 @@ public function getReferenceForBeneficiary() */ public function setReferenceForBeneficiary($referenceForBeneficiary) { - if (is_null($referenceForBeneficiary)) { - throw new \InvalidArgumentException('non-nullable referenceForBeneficiary cannot be null'); - } $this->container['referenceForBeneficiary'] = $referenceForBeneficiary; return $this; @@ -1165,9 +1125,6 @@ public function getStatus() */ 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( @@ -1202,9 +1159,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/Transfers/TransferCategoryData.php b/src/Adyen/Model/Transfers/TransferCategoryData.php index b3bd3c278..3c2cc44b2 100644 --- a/src/Adyen/Model/Transfers/TransferCategoryData.php +++ b/src/Adyen/Model/Transfers/TransferCategoryData.php @@ -391,9 +391,6 @@ public function getPriority() */ public function setPriority($priority) { - if (is_null($priority)) { - throw new \InvalidArgumentException('non-nullable priority cannot be null'); - } $this->container['priority'] = $priority; return $this; @@ -418,9 +415,6 @@ public function getType() */ public function setType($type) { - if (is_null($type)) { - throw new \InvalidArgumentException('non-nullable type cannot be null'); - } $this->container['type'] = $type; return $this; @@ -445,9 +439,6 @@ public function getModificationMerchantReference() */ public function setModificationMerchantReference($modificationMerchantReference) { - if (is_null($modificationMerchantReference)) { - throw new \InvalidArgumentException('non-nullable modificationMerchantReference cannot be null'); - } $this->container['modificationMerchantReference'] = $modificationMerchantReference; return $this; @@ -472,9 +463,6 @@ public function getModificationPspReference() */ public function setModificationPspReference($modificationPspReference) { - if (is_null($modificationPspReference)) { - throw new \InvalidArgumentException('non-nullable modificationPspReference cannot be null'); - } $this->container['modificationPspReference'] = $modificationPspReference; return $this; @@ -499,9 +487,6 @@ public function getAuthorisationType() */ public function setAuthorisationType($authorisationType) { - if (is_null($authorisationType)) { - throw new \InvalidArgumentException('non-nullable authorisationType cannot be null'); - } $this->container['authorisationType'] = $authorisationType; return $this; @@ -526,9 +511,6 @@ public function getPanEntryMode() */ public function setPanEntryMode($panEntryMode) { - if (is_null($panEntryMode)) { - throw new \InvalidArgumentException('non-nullable panEntryMode cannot be null'); - } $this->container['panEntryMode'] = $panEntryMode; return $this; @@ -553,9 +535,6 @@ public function getProcessingType() */ public function setProcessingType($processingType) { - if (is_null($processingType)) { - throw new \InvalidArgumentException('non-nullable processingType cannot be null'); - } $this->container['processingType'] = $processingType; return $this; @@ -580,9 +559,6 @@ public function getRelayedAuthorisationData() */ public function setRelayedAuthorisationData($relayedAuthorisationData) { - if (is_null($relayedAuthorisationData)) { - throw new \InvalidArgumentException('non-nullable relayedAuthorisationData cannot be null'); - } $this->container['relayedAuthorisationData'] = $relayedAuthorisationData; return $this; @@ -607,9 +583,6 @@ public function getSchemeTraceId() */ public function setSchemeTraceId($schemeTraceId) { - if (is_null($schemeTraceId)) { - throw new \InvalidArgumentException('non-nullable schemeTraceId cannot be null'); - } $this->container['schemeTraceId'] = $schemeTraceId; return $this; @@ -634,9 +607,6 @@ public function getSchemeUniqueTransactionId() */ public function setSchemeUniqueTransactionId($schemeUniqueTransactionId) { - if (is_null($schemeUniqueTransactionId)) { - throw new \InvalidArgumentException('non-nullable schemeUniqueTransactionId cannot be null'); - } $this->container['schemeUniqueTransactionId'] = $schemeUniqueTransactionId; return $this; @@ -661,9 +631,6 @@ public function getValidationFacts() */ public function setValidationFacts($validationFacts) { - if (is_null($validationFacts)) { - throw new \InvalidArgumentException('non-nullable validationFacts cannot be null'); - } $this->container['validationFacts'] = $validationFacts; return $this; @@ -688,9 +655,6 @@ public function getPaymentMerchantReference() */ public function setPaymentMerchantReference($paymentMerchantReference) { - if (is_null($paymentMerchantReference)) { - throw new \InvalidArgumentException('non-nullable paymentMerchantReference cannot be null'); - } $this->container['paymentMerchantReference'] = $paymentMerchantReference; return $this; @@ -715,9 +679,6 @@ public function getPlatformPaymentType() */ public function setPlatformPaymentType($platformPaymentType) { - if (is_null($platformPaymentType)) { - throw new \InvalidArgumentException('non-nullable platformPaymentType cannot be null'); - } $this->container['platformPaymentType'] = $platformPaymentType; return $this; @@ -742,9 +703,6 @@ public function getPspPaymentReference() */ public function setPspPaymentReference($pspPaymentReference) { - if (is_null($pspPaymentReference)) { - throw new \InvalidArgumentException('non-nullable pspPaymentReference cannot be null'); - } $this->container['pspPaymentReference'] = $pspPaymentReference; return $this; diff --git a/src/Adyen/Model/Transfers/TransferData.php b/src/Adyen/Model/Transfers/TransferData.php index 5afb84193..6bb6ca8d6 100644 --- a/src/Adyen/Model/Transfers/TransferData.php +++ b/src/Adyen/Model/Transfers/TransferData.php @@ -356,6 +356,7 @@ public function getModelName() 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 = 'declined'; public const REASON_DECLINED_BY_TRANSACTION_RULE = 'declinedByTransactionRule'; public const REASON_ERROR = 'error'; public const REASON_NOT_ENOUGH_BALANCE = 'notEnoughBalance'; @@ -510,6 +511,7 @@ public function getReasonAllowableValues() self::REASON_COUNTERPARTY_ADDRESS_REQUIRED, self::REASON_COUNTERPARTY_BANK_TIMED_OUT, self::REASON_COUNTERPARTY_BANK_UNAVAILABLE, + self::REASON_DECLINED, self::REASON_DECLINED_BY_TRANSACTION_RULE, self::REASON_ERROR, self::REASON_NOT_ENOUGH_BALANCE, @@ -796,9 +798,6 @@ public function getAccountHolder() */ public function setAccountHolder($accountHolder) { - if (is_null($accountHolder)) { - throw new \InvalidArgumentException('non-nullable accountHolder cannot be null'); - } $this->container['accountHolder'] = $accountHolder; return $this; @@ -823,9 +822,6 @@ public function getAmount() */ public function setAmount($amount) { - if (is_null($amount)) { - throw new \InvalidArgumentException('non-nullable amount cannot be null'); - } $this->container['amount'] = $amount; return $this; @@ -850,9 +846,6 @@ public function getBalanceAccount() */ public function setBalanceAccount($balanceAccount) { - if (is_null($balanceAccount)) { - throw new \InvalidArgumentException('non-nullable balanceAccount cannot be null'); - } $this->container['balanceAccount'] = $balanceAccount; return $this; @@ -877,9 +870,6 @@ public function getBalancePlatform() */ public function setBalancePlatform($balancePlatform) { - if (is_null($balancePlatform)) { - throw new \InvalidArgumentException('non-nullable balancePlatform cannot be null'); - } $this->container['balancePlatform'] = $balancePlatform; return $this; @@ -904,9 +894,6 @@ public function getBalances() */ public function setBalances($balances) { - if (is_null($balances)) { - throw new \InvalidArgumentException('non-nullable balances cannot be null'); - } $this->container['balances'] = $balances; return $this; @@ -931,9 +918,6 @@ public function getCategory() */ 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( @@ -968,9 +952,6 @@ public function getCategoryData() */ public function setCategoryData($categoryData) { - if (is_null($categoryData)) { - throw new \InvalidArgumentException('non-nullable categoryData cannot be null'); - } $this->container['categoryData'] = $categoryData; return $this; @@ -995,9 +976,6 @@ public function getCounterparty() */ public function setCounterparty($counterparty) { - if (is_null($counterparty)) { - throw new \InvalidArgumentException('non-nullable counterparty cannot be null'); - } $this->container['counterparty'] = $counterparty; return $this; @@ -1022,9 +1000,6 @@ public function getCreationDate() */ public function setCreationDate($creationDate) { - if (is_null($creationDate)) { - throw new \InvalidArgumentException('non-nullable creationDate cannot be null'); - } $this->container['creationDate'] = $creationDate; return $this; @@ -1049,9 +1024,6 @@ public function getDescription() */ public function setDescription($description) { - if (is_null($description)) { - throw new \InvalidArgumentException('non-nullable description cannot be null'); - } $this->container['description'] = $description; return $this; @@ -1076,9 +1048,6 @@ public function getDirection() */ 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( @@ -1113,9 +1082,6 @@ public function getEvents() */ public function setEvents($events) { - if (is_null($events)) { - throw new \InvalidArgumentException('non-nullable events cannot be null'); - } $this->container['events'] = $events; return $this; @@ -1140,9 +1106,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -1167,9 +1130,6 @@ public function getPaymentInstrument() */ public function setPaymentInstrument($paymentInstrument) { - if (is_null($paymentInstrument)) { - throw new \InvalidArgumentException('non-nullable paymentInstrument cannot be null'); - } $this->container['paymentInstrument'] = $paymentInstrument; return $this; @@ -1194,9 +1154,6 @@ public function getReason() */ 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( @@ -1231,9 +1188,6 @@ public function getReference() */ public function setReference($reference) { - if (is_null($reference)) { - throw new \InvalidArgumentException('non-nullable reference cannot be null'); - } $this->container['reference'] = $reference; return $this; @@ -1258,9 +1212,6 @@ public function getReferenceForBeneficiary() */ public function setReferenceForBeneficiary($referenceForBeneficiary) { - if (is_null($referenceForBeneficiary)) { - throw new \InvalidArgumentException('non-nullable referenceForBeneficiary cannot be null'); - } $this->container['referenceForBeneficiary'] = $referenceForBeneficiary; return $this; @@ -1285,7 +1236,6 @@ public function getSequenceNumber() */ public function setSequenceNumber($sequenceNumber) { - // Do nothing for nullable integers $this->container['sequenceNumber'] = $sequenceNumber; return $this; @@ -1310,9 +1260,6 @@ public function getStatus() */ 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( @@ -1347,9 +1294,6 @@ public function getTracking() */ public function setTracking($tracking) { - if (is_null($tracking)) { - throw new \InvalidArgumentException('non-nullable tracking cannot be null'); - } $this->container['tracking'] = $tracking; return $this; @@ -1374,9 +1318,6 @@ public function getTransactionRulesResult() */ public function setTransactionRulesResult($transactionRulesResult) { - if (is_null($transactionRulesResult)) { - throw new \InvalidArgumentException('non-nullable transactionRulesResult cannot be null'); - } $this->container['transactionRulesResult'] = $transactionRulesResult; return $this; @@ -1401,9 +1342,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/Transfers/TransferDataTracking.php b/src/Adyen/Model/Transfers/TransferDataTracking.php index c610fcbe8..2ca6b56e5 100644 --- a/src/Adyen/Model/Transfers/TransferDataTracking.php +++ b/src/Adyen/Model/Transfers/TransferDataTracking.php @@ -328,9 +328,6 @@ public function getStatus() */ public function setStatus($status) { - if (is_null($status)) { - throw new \InvalidArgumentException('non-nullable status cannot be null'); - } $this->container['status'] = $status; return $this; @@ -355,9 +352,6 @@ public function getType() */ public function setType($type) { - if (is_null($type)) { - throw new \InvalidArgumentException('non-nullable type cannot be null'); - } $this->container['type'] = $type; return $this; @@ -382,9 +376,6 @@ public function getEstimatedArrivalTime() */ public function setEstimatedArrivalTime($estimatedArrivalTime) { - if (is_null($estimatedArrivalTime)) { - throw new \InvalidArgumentException('non-nullable estimatedArrivalTime cannot be null'); - } $this->container['estimatedArrivalTime'] = $estimatedArrivalTime; return $this; @@ -409,9 +400,6 @@ public function getReason() */ public function setReason($reason) { - if (is_null($reason)) { - throw new \InvalidArgumentException('non-nullable reason cannot be null'); - } $this->container['reason'] = $reason; return $this; diff --git a/src/Adyen/Model/Transfers/TransferEvent.php b/src/Adyen/Model/Transfers/TransferEvent.php index e915890f9..99daa1c7e 100644 --- a/src/Adyen/Model/Transfers/TransferEvent.php +++ b/src/Adyen/Model/Transfers/TransferEvent.php @@ -46,6 +46,7 @@ class TransferEvent implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPITypes = [ 'amount' => '\Adyen\Model\Transfers\Amount', 'amountAdjustments' => '\Adyen\Model\Transfers\AmountAdjustment[]', + 'arn' => 'string', 'bookingDate' => '\DateTime', 'estimatedArrivalTime' => '\DateTime', 'externalReason' => '\Adyen\Model\Transfers\ExternalReason', @@ -72,6 +73,7 @@ class TransferEvent implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPIFormats = [ 'amount' => null, 'amountAdjustments' => null, + 'arn' => null, 'bookingDate' => 'date-time', 'estimatedArrivalTime' => 'date-time', 'externalReason' => null, @@ -96,6 +98,7 @@ class TransferEvent implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPINullables = [ 'amount' => false, 'amountAdjustments' => false, + 'arn' => false, 'bookingDate' => false, 'estimatedArrivalTime' => false, 'externalReason' => false, @@ -200,6 +203,7 @@ public function isNullableSetToNull(string $property): bool protected static $attributeMap = [ 'amount' => 'amount', 'amountAdjustments' => 'amountAdjustments', + 'arn' => 'arn', 'bookingDate' => 'bookingDate', 'estimatedArrivalTime' => 'estimatedArrivalTime', 'externalReason' => 'externalReason', @@ -224,6 +228,7 @@ public function isNullableSetToNull(string $property): bool protected static $setters = [ 'amount' => 'setAmount', 'amountAdjustments' => 'setAmountAdjustments', + 'arn' => 'setArn', 'bookingDate' => 'setBookingDate', 'estimatedArrivalTime' => 'setEstimatedArrivalTime', 'externalReason' => 'setExternalReason', @@ -248,6 +253,7 @@ public function isNullableSetToNull(string $property): bool protected static $getters = [ 'amount' => 'getAmount', 'amountAdjustments' => 'getAmountAdjustments', + 'arn' => 'getArn', 'bookingDate' => 'getBookingDate', 'estimatedArrivalTime' => 'getEstimatedArrivalTime', 'externalReason' => 'getExternalReason', @@ -314,6 +320,7 @@ public function getModelName() 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 = 'declined'; public const REASON_DECLINED_BY_TRANSACTION_RULE = 'declinedByTransactionRule'; public const REASON_ERROR = 'error'; public const REASON_NOT_ENOUGH_BALANCE = 'notEnoughBalance'; @@ -407,6 +414,7 @@ public function getReasonAllowableValues() self::REASON_COUNTERPARTY_ADDRESS_REQUIRED, self::REASON_COUNTERPARTY_BANK_TIMED_OUT, self::REASON_COUNTERPARTY_BANK_UNAVAILABLE, + self::REASON_DECLINED, self::REASON_DECLINED_BY_TRANSACTION_RULE, self::REASON_ERROR, self::REASON_NOT_ENOUGH_BALANCE, @@ -521,6 +529,7 @@ public function __construct(array $data = null) { $this->setIfExists('amount', $data ?? [], null); $this->setIfExists('amountAdjustments', $data ?? [], null); + $this->setIfExists('arn', $data ?? [], null); $this->setIfExists('bookingDate', $data ?? [], null); $this->setIfExists('estimatedArrivalTime', $data ?? [], null); $this->setIfExists('externalReason', $data ?? [], null); @@ -625,9 +634,6 @@ public function getAmount() */ public function setAmount($amount) { - if (is_null($amount)) { - throw new \InvalidArgumentException('non-nullable amount cannot be null'); - } $this->container['amount'] = $amount; return $this; @@ -652,14 +658,35 @@ public function getAmountAdjustments() */ public function setAmountAdjustments($amountAdjustments) { - if (is_null($amountAdjustments)) { - throw new \InvalidArgumentException('non-nullable amountAdjustments cannot be null'); - } $this->container['amountAdjustments'] = $amountAdjustments; return $this; } + /** + * Gets arn + * + * @return string|null + */ + public function getArn() + { + return $this->container['arn']; + } + + /** + * Sets arn + * + * @param string|null $arn Scheme unique arn identifier useful for tracing captures, chargebacks, refunds, etc. + * + * @return self + */ + public function setArn($arn) + { + $this->container['arn'] = $arn; + + return $this; + } + /** * Gets bookingDate * @@ -679,9 +706,6 @@ public function getBookingDate() */ public function setBookingDate($bookingDate) { - if (is_null($bookingDate)) { - throw new \InvalidArgumentException('non-nullable bookingDate cannot be null'); - } $this->container['bookingDate'] = $bookingDate; return $this; @@ -706,9 +730,6 @@ public function getEstimatedArrivalTime() */ public function setEstimatedArrivalTime($estimatedArrivalTime) { - if (is_null($estimatedArrivalTime)) { - throw new \InvalidArgumentException('non-nullable estimatedArrivalTime cannot be null'); - } $this->container['estimatedArrivalTime'] = $estimatedArrivalTime; return $this; @@ -733,9 +754,6 @@ public function getExternalReason() */ public function setExternalReason($externalReason) { - if (is_null($externalReason)) { - throw new \InvalidArgumentException('non-nullable externalReason cannot be null'); - } $this->container['externalReason'] = $externalReason; return $this; @@ -760,9 +778,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -787,9 +802,6 @@ public function getModification() */ public function setModification($modification) { - if (is_null($modification)) { - throw new \InvalidArgumentException('non-nullable modification cannot be null'); - } $this->container['modification'] = $modification; return $this; @@ -814,9 +826,6 @@ public function getMutations() */ public function setMutations($mutations) { - if (is_null($mutations)) { - throw new \InvalidArgumentException('non-nullable mutations cannot be null'); - } $this->container['mutations'] = $mutations; return $this; @@ -841,9 +850,6 @@ public function getOriginalAmount() */ public function setOriginalAmount($originalAmount) { - if (is_null($originalAmount)) { - throw new \InvalidArgumentException('non-nullable originalAmount cannot be null'); - } $this->container['originalAmount'] = $originalAmount; return $this; @@ -868,9 +874,6 @@ public function getReason() */ 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( @@ -905,9 +908,6 @@ public function getStatus() */ 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( @@ -942,9 +942,6 @@ public function getTrackingData() */ public function setTrackingData($trackingData) { - if (is_null($trackingData)) { - throw new \InvalidArgumentException('non-nullable trackingData cannot be null'); - } $this->container['trackingData'] = $trackingData; return $this; @@ -969,9 +966,6 @@ public function getTransactionId() */ public function setTransactionId($transactionId) { - if (is_null($transactionId)) { - throw new \InvalidArgumentException('non-nullable transactionId cannot be null'); - } $this->container['transactionId'] = $transactionId; return $this; @@ -996,9 +990,6 @@ public function getType() */ 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( @@ -1033,9 +1024,6 @@ public function getUpdateDate() */ public function setUpdateDate($updateDate) { - if (is_null($updateDate)) { - throw new \InvalidArgumentException('non-nullable updateDate cannot be null'); - } $this->container['updateDate'] = $updateDate; return $this; @@ -1060,9 +1048,6 @@ public function getValueDate() */ public function setValueDate($valueDate) { - if (is_null($valueDate)) { - throw new \InvalidArgumentException('non-nullable valueDate cannot be null'); - } $this->container['valueDate'] = $valueDate; return $this; diff --git a/src/Adyen/Model/Transfers/TransferEventTrackingData.php b/src/Adyen/Model/Transfers/TransferEventTrackingData.php index b21083cc5..e35f59d22 100644 --- a/src/Adyen/Model/Transfers/TransferEventTrackingData.php +++ b/src/Adyen/Model/Transfers/TransferEventTrackingData.php @@ -328,9 +328,6 @@ public function getStatus() */ public function setStatus($status) { - if (is_null($status)) { - throw new \InvalidArgumentException('non-nullable status cannot be null'); - } $this->container['status'] = $status; return $this; @@ -355,9 +352,6 @@ public function getType() */ public function setType($type) { - if (is_null($type)) { - throw new \InvalidArgumentException('non-nullable type cannot be null'); - } $this->container['type'] = $type; return $this; @@ -382,9 +376,6 @@ public function getEstimatedArrivalTime() */ public function setEstimatedArrivalTime($estimatedArrivalTime) { - if (is_null($estimatedArrivalTime)) { - throw new \InvalidArgumentException('non-nullable estimatedArrivalTime cannot be null'); - } $this->container['estimatedArrivalTime'] = $estimatedArrivalTime; return $this; @@ -409,9 +400,6 @@ public function getReason() */ public function setReason($reason) { - if (is_null($reason)) { - throw new \InvalidArgumentException('non-nullable reason cannot be null'); - } $this->container['reason'] = $reason; return $this; diff --git a/src/Adyen/Model/Transfers/TransferInfo.php b/src/Adyen/Model/Transfers/TransferInfo.php index 1e7f405ab..b1b6b9807 100644 --- a/src/Adyen/Model/Transfers/TransferInfo.php +++ b/src/Adyen/Model/Transfers/TransferInfo.php @@ -53,6 +53,7 @@ class TransferInfo implements ModelInterface, ArrayAccess, \JsonSerializable 'priority' => 'string', 'reference' => 'string', 'referenceForBeneficiary' => 'string', + 'type' => 'string', 'ultimateParty' => '\Adyen\Model\Transfers\UltimatePartyIdentification' ]; @@ -73,6 +74,7 @@ class TransferInfo implements ModelInterface, ArrayAccess, \JsonSerializable 'priority' => null, 'reference' => null, 'referenceForBeneficiary' => null, + 'type' => null, 'ultimateParty' => null ]; @@ -91,6 +93,7 @@ class TransferInfo implements ModelInterface, ArrayAccess, \JsonSerializable 'priority' => false, 'reference' => false, 'referenceForBeneficiary' => false, + 'type' => false, 'ultimateParty' => false ]; @@ -189,6 +192,7 @@ public function isNullableSetToNull(string $property): bool 'priority' => 'priority', 'reference' => 'reference', 'referenceForBeneficiary' => 'referenceForBeneficiary', + 'type' => 'type', 'ultimateParty' => 'ultimateParty' ]; @@ -207,6 +211,7 @@ public function isNullableSetToNull(string $property): bool 'priority' => 'setPriority', 'reference' => 'setReference', 'referenceForBeneficiary' => 'setReferenceForBeneficiary', + 'type' => 'setType', 'ultimateParty' => 'setUltimateParty' ]; @@ -225,6 +230,7 @@ public function isNullableSetToNull(string $property): bool 'priority' => 'getPriority', 'reference' => 'getReference', 'referenceForBeneficiary' => 'getReferenceForBeneficiary', + 'type' => 'getType', 'ultimateParty' => 'getUltimateParty' ]; @@ -280,6 +286,9 @@ public function getModelName() public const PRIORITY_INTERNAL = 'internal'; public const PRIORITY_REGULAR = 'regular'; public const PRIORITY_WIRE = 'wire'; + public const TYPE_BANK_TRANSFER = 'bankTransfer'; + public const TYPE_INTERNAL_TRANSFER = 'internalTransfer'; + public const TYPE_INTERNAL_DIRECT_DEBIT = 'internalDirectDebit'; /** * Gets allowable values of the enum @@ -312,6 +321,19 @@ public function getPriorityAllowableValues() self::PRIORITY_WIRE, ]; } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_BANK_TRANSFER, + self::TYPE_INTERNAL_TRANSFER, + self::TYPE_INTERNAL_DIRECT_DEBIT, + ]; + } /** * Associative array for storing property values * @@ -336,6 +358,7 @@ public function __construct(array $data = null) $this->setIfExists('priority', $data ?? [], null); $this->setIfExists('reference', $data ?? [], null); $this->setIfExists('referenceForBeneficiary', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); $this->setIfExists('ultimateParty', $data ?? [], null); } @@ -393,6 +416,15 @@ public function listInvalidProperties() ); } + $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; } @@ -427,9 +459,6 @@ public function getAmount() */ public function setAmount($amount) { - if (is_null($amount)) { - throw new \InvalidArgumentException('non-nullable amount cannot be null'); - } $this->container['amount'] = $amount; return $this; @@ -448,15 +477,12 @@ public function getBalanceAccountId() /** * Sets balanceAccountId * - * @param string|null $balanceAccountId The unique identifier of the source [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id). + * @param string|null $balanceAccountId The unique identifier of the source [balance account](https://docs.adyen.com/api-explorer/balanceplatform/latest/post/balanceAccounts#responses-200-id). If you want to make a transfer using a **virtual** **bankAccount** assigned to the balance account, you must specify the [payment instrument ID](https://docs.adyen.com/api-explorer/balanceplatform/latest/post/paymentInstruments#responses-200-id) of the **virtual** **bankAccount**. If you only specify a balance account ID, Adyen uses the default **physical** **bankAccount** payment instrument assigned to the balance account. * * @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; @@ -481,9 +507,6 @@ public function getCategory() */ 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( @@ -518,9 +541,6 @@ public function getCounterparty() */ public function setCounterparty($counterparty) { - if (is_null($counterparty)) { - throw new \InvalidArgumentException('non-nullable counterparty cannot be null'); - } $this->container['counterparty'] = $counterparty; return $this; @@ -545,9 +565,6 @@ public function getDescription() */ public function setDescription($description) { - if (is_null($description)) { - throw new \InvalidArgumentException('non-nullable description cannot be null'); - } $this->container['description'] = $description; return $this; @@ -566,15 +583,12 @@ public function getPaymentInstrumentId() /** * Sets paymentInstrumentId * - * @param string|null $paymentInstrumentId The unique identifier of the source [payment instrument](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/paymentInstruments__resParam_id). + * @param string|null $paymentInstrumentId The unique identifier of the source [payment instrument](https://docs.adyen.com/api-explorer/balanceplatform/latest/post/paymentInstruments#responses-200-id). If you want to make a transfer using a **virtual** **bankAccount**, you must specify the payment instrument ID of the **virtual** **bankAccount**. If you only specify a balance account ID, Adyen uses the default **physical** **bankAccount** payment instrument assigned to the balance account. * * @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; @@ -599,9 +613,6 @@ public function getPriority() */ 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( @@ -636,9 +647,6 @@ public function getReference() */ public function setReference($reference) { - if (is_null($reference)) { - throw new \InvalidArgumentException('non-nullable reference cannot be null'); - } $this->container['reference'] = $reference; return $this; @@ -663,14 +671,45 @@ public function getReferenceForBeneficiary() */ public function setReferenceForBeneficiary($referenceForBeneficiary) { - if (is_null($referenceForBeneficiary)) { - throw new \InvalidArgumentException('non-nullable referenceForBeneficiary cannot be null'); - } $this->container['referenceForBeneficiary'] = $referenceForBeneficiary; return $this; } + /** + * Gets type + * + * @return string|null + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type The type of transfer. Possible values: - **bankTransfer**: for push transfers to a transfer instrument or a bank account. The `category` must be **bank**. - **internalTransfer**: for push transfers between balance accounts. The `category` must be **internal**. - **internalDirectDebit**: for pull transfers (direct debits) between balance accounts. The `category` must be **internal**. + * + * @return self + */ + public function setType($type) + { + $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 ultimateParty * @@ -690,9 +729,6 @@ public function getUltimateParty() */ public function setUltimateParty($ultimateParty) { - if (is_null($ultimateParty)) { - throw new \InvalidArgumentException('non-nullable ultimateParty cannot be null'); - } $this->container['ultimateParty'] = $ultimateParty; return $this; diff --git a/src/Adyen/Model/Transfers/TransferNotificationCounterParty.php b/src/Adyen/Model/Transfers/TransferNotificationCounterParty.php index 7dba673dd..c2441402d 100644 --- a/src/Adyen/Model/Transfers/TransferNotificationCounterParty.php +++ b/src/Adyen/Model/Transfers/TransferNotificationCounterParty.php @@ -316,9 +316,6 @@ public function getBalanceAccountId() */ public function setBalanceAccountId($balanceAccountId) { - if (is_null($balanceAccountId)) { - throw new \InvalidArgumentException('non-nullable balanceAccountId cannot be null'); - } $this->container['balanceAccountId'] = $balanceAccountId; return $this; @@ -343,9 +340,6 @@ public function getBankAccount() */ public function setBankAccount($bankAccount) { - if (is_null($bankAccount)) { - throw new \InvalidArgumentException('non-nullable bankAccount cannot be null'); - } $this->container['bankAccount'] = $bankAccount; return $this; @@ -370,9 +364,6 @@ public function getMerchant() */ public function setMerchant($merchant) { - if (is_null($merchant)) { - throw new \InvalidArgumentException('non-nullable merchant cannot be null'); - } $this->container['merchant'] = $merchant; return $this; @@ -397,9 +388,6 @@ public function getTransferInstrumentId() */ public function setTransferInstrumentId($transferInstrumentId) { - if (is_null($transferInstrumentId)) { - throw new \InvalidArgumentException('non-nullable transferInstrumentId cannot be null'); - } $this->container['transferInstrumentId'] = $transferInstrumentId; return $this; diff --git a/src/Adyen/Model/Transfers/TransferNotificationMerchantData.php b/src/Adyen/Model/Transfers/TransferNotificationMerchantData.php index a9c570b20..5791b4af6 100644 --- a/src/Adyen/Model/Transfers/TransferNotificationMerchantData.php +++ b/src/Adyen/Model/Transfers/TransferNotificationMerchantData.php @@ -337,9 +337,6 @@ public function getAcquirerId() */ public function setAcquirerId($acquirerId) { - if (is_null($acquirerId)) { - throw new \InvalidArgumentException('non-nullable acquirerId cannot be null'); - } $this->container['acquirerId'] = $acquirerId; return $this; @@ -364,9 +361,6 @@ public function getCity() */ public function setCity($city) { - if (is_null($city)) { - throw new \InvalidArgumentException('non-nullable city cannot be null'); - } $this->container['city'] = $city; return $this; @@ -391,9 +385,6 @@ public function getCountry() */ public function setCountry($country) { - if (is_null($country)) { - throw new \InvalidArgumentException('non-nullable country cannot be null'); - } $this->container['country'] = $country; return $this; @@ -418,9 +409,6 @@ public function getMcc() */ public function setMcc($mcc) { - if (is_null($mcc)) { - throw new \InvalidArgumentException('non-nullable mcc cannot be null'); - } $this->container['mcc'] = $mcc; return $this; @@ -445,9 +433,6 @@ public function getMerchantId() */ public function setMerchantId($merchantId) { - if (is_null($merchantId)) { - throw new \InvalidArgumentException('non-nullable merchantId cannot be null'); - } $this->container['merchantId'] = $merchantId; return $this; @@ -472,9 +457,6 @@ public function getName() */ public function setName($name) { - if (is_null($name)) { - throw new \InvalidArgumentException('non-nullable name cannot be null'); - } $this->container['name'] = $name; return $this; @@ -499,9 +481,6 @@ public function getPostalCode() */ public function setPostalCode($postalCode) { - if (is_null($postalCode)) { - throw new \InvalidArgumentException('non-nullable postalCode cannot be null'); - } $this->container['postalCode'] = $postalCode; return $this; diff --git a/src/Adyen/Model/Transfers/TransferNotificationValidationFact.php b/src/Adyen/Model/Transfers/TransferNotificationValidationFact.php index 5a1ddf4d7..307418531 100644 --- a/src/Adyen/Model/Transfers/TransferNotificationValidationFact.php +++ b/src/Adyen/Model/Transfers/TransferNotificationValidationFact.php @@ -302,9 +302,6 @@ public function getResult() */ public function setResult($result) { - if (is_null($result)) { - throw new \InvalidArgumentException('non-nullable result cannot be null'); - } $this->container['result'] = $result; return $this; @@ -329,9 +326,6 @@ public function getType() */ public function setType($type) { - if (is_null($type)) { - throw new \InvalidArgumentException('non-nullable type cannot be null'); - } $this->container['type'] = $type; return $this; diff --git a/src/Adyen/Model/Transfers/TransferServiceRestServiceError.php b/src/Adyen/Model/Transfers/TransferServiceRestServiceError.php index d4495168e..18c13f22b 100644 --- a/src/Adyen/Model/Transfers/TransferServiceRestServiceError.php +++ b/src/Adyen/Model/Transfers/TransferServiceRestServiceError.php @@ -373,9 +373,6 @@ public function getDetail() */ public function setDetail($detail) { - if (is_null($detail)) { - throw new \InvalidArgumentException('non-nullable detail cannot be null'); - } $this->container['detail'] = $detail; return $this; @@ -400,9 +397,6 @@ public function getErrorCode() */ public function setErrorCode($errorCode) { - if (is_null($errorCode)) { - throw new \InvalidArgumentException('non-nullable errorCode cannot be null'); - } $this->container['errorCode'] = $errorCode; return $this; @@ -427,9 +421,6 @@ public function getInstance() */ public function setInstance($instance) { - if (is_null($instance)) { - throw new \InvalidArgumentException('non-nullable instance cannot be null'); - } $this->container['instance'] = $instance; return $this; @@ -454,9 +445,6 @@ public function getInvalidFields() */ public function setInvalidFields($invalidFields) { - if (is_null($invalidFields)) { - throw new \InvalidArgumentException('non-nullable invalidFields cannot be null'); - } $this->container['invalidFields'] = $invalidFields; return $this; @@ -481,9 +469,6 @@ public function getRequestId() */ public function setRequestId($requestId) { - if (is_null($requestId)) { - throw new \InvalidArgumentException('non-nullable requestId cannot be null'); - } $this->container['requestId'] = $requestId; return $this; @@ -508,9 +493,6 @@ public function getResponse() */ public function setResponse($response) { - if (is_null($response)) { - throw new \InvalidArgumentException('non-nullable response cannot be null'); - } $this->container['response'] = $response; return $this; @@ -535,9 +517,6 @@ public function getRoutingDetails() */ public function setRoutingDetails($routingDetails) { - if (is_null($routingDetails)) { - throw new \InvalidArgumentException('non-nullable routingDetails cannot be null'); - } $this->container['routingDetails'] = $routingDetails; return $this; @@ -562,7 +541,6 @@ public function getStatus() */ public function setStatus($status) { - // Do nothing for nullable integers $this->container['status'] = $status; return $this; @@ -587,9 +565,6 @@ public function getTitle() */ public function setTitle($title) { - if (is_null($title)) { - throw new \InvalidArgumentException('non-nullable title cannot be null'); - } $this->container['title'] = $title; return $this; @@ -614,9 +589,6 @@ public function getType() */ public function setType($type) { - if (is_null($type)) { - throw new \InvalidArgumentException('non-nullable type cannot be null'); - } $this->container['type'] = $type; return $this; diff --git a/src/Adyen/Model/Transfers/TransferView.php b/src/Adyen/Model/Transfers/TransferView.php index 0d76753c1..69016dc6a 100644 --- a/src/Adyen/Model/Transfers/TransferView.php +++ b/src/Adyen/Model/Transfers/TransferView.php @@ -312,9 +312,6 @@ public function getCategoryData() */ public function setCategoryData($categoryData) { - if (is_null($categoryData)) { - throw new \InvalidArgumentException('non-nullable categoryData cannot be null'); - } $this->container['categoryData'] = $categoryData; return $this; @@ -339,9 +336,6 @@ public function getId() */ public function setId($id) { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } $this->container['id'] = $id; return $this; @@ -366,9 +360,6 @@ public function getReference() */ public function setReference($reference) { - if (is_null($reference)) { - throw new \InvalidArgumentException('non-nullable reference cannot be null'); - } $this->container['reference'] = $reference; return $this; diff --git a/src/Adyen/Model/Transfers/UKLocalAccountIdentification.php b/src/Adyen/Model/Transfers/UKLocalAccountIdentification.php index 0b91b793b..387b2b88e 100644 --- a/src/Adyen/Model/Transfers/UKLocalAccountIdentification.php +++ b/src/Adyen/Model/Transfers/UKLocalAccountIdentification.php @@ -339,9 +339,6 @@ public function getAccountNumber() */ public function setAccountNumber($accountNumber) { - if (is_null($accountNumber)) { - throw new \InvalidArgumentException('non-nullable accountNumber cannot be null'); - } $this->container['accountNumber'] = $accountNumber; return $this; @@ -366,9 +363,6 @@ public function getSortCode() */ public function setSortCode($sortCode) { - if (is_null($sortCode)) { - throw new \InvalidArgumentException('non-nullable sortCode cannot be null'); - } $this->container['sortCode'] = $sortCode; return $this; @@ -393,9 +387,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/Transfers/USLocalAccountIdentification.php b/src/Adyen/Model/Transfers/USLocalAccountIdentification.php index 0c0d823b8..f97b4afab 100644 --- a/src/Adyen/Model/Transfers/USLocalAccountIdentification.php +++ b/src/Adyen/Model/Transfers/USLocalAccountIdentification.php @@ -369,9 +369,6 @@ public function getAccountNumber() */ public function setAccountNumber($accountNumber) { - if (is_null($accountNumber)) { - throw new \InvalidArgumentException('non-nullable accountNumber cannot be null'); - } $this->container['accountNumber'] = $accountNumber; return $this; @@ -396,9 +393,6 @@ public function getAccountType() */ 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( @@ -433,9 +427,6 @@ public function getRoutingNumber() */ public function setRoutingNumber($routingNumber) { - if (is_null($routingNumber)) { - throw new \InvalidArgumentException('non-nullable routingNumber cannot be null'); - } $this->container['routingNumber'] = $routingNumber; return $this; @@ -460,9 +451,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Model/Transfers/UltimatePartyIdentification.php b/src/Adyen/Model/Transfers/UltimatePartyIdentification.php index 68a90fd07..c6c1ed2c8 100644 --- a/src/Adyen/Model/Transfers/UltimatePartyIdentification.php +++ b/src/Adyen/Model/Transfers/UltimatePartyIdentification.php @@ -365,9 +365,6 @@ public function getAddress() */ public function setAddress($address) { - if (is_null($address)) { - throw new \InvalidArgumentException('non-nullable address cannot be null'); - } $this->container['address'] = $address; return $this; @@ -392,9 +389,6 @@ public function getDateOfBirth() */ public function setDateOfBirth($dateOfBirth) { - if (is_null($dateOfBirth)) { - throw new \InvalidArgumentException('non-nullable dateOfBirth cannot be null'); - } $this->container['dateOfBirth'] = $dateOfBirth; return $this; @@ -419,9 +413,6 @@ public function getFirstName() */ public function setFirstName($firstName) { - if (is_null($firstName)) { - throw new \InvalidArgumentException('non-nullable firstName cannot be null'); - } $this->container['firstName'] = $firstName; return $this; @@ -446,9 +437,6 @@ public function getFullName() */ public function setFullName($fullName) { - if (is_null($fullName)) { - throw new \InvalidArgumentException('non-nullable fullName cannot be null'); - } $this->container['fullName'] = $fullName; return $this; @@ -473,9 +461,6 @@ public function getLastName() */ public function setLastName($lastName) { - if (is_null($lastName)) { - throw new \InvalidArgumentException('non-nullable lastName cannot be null'); - } $this->container['lastName'] = $lastName; return $this; @@ -500,9 +485,6 @@ public function getReference() */ public function setReference($reference) { - if (is_null($reference)) { - throw new \InvalidArgumentException('non-nullable reference cannot be null'); - } $this->container['reference'] = $reference; return $this; @@ -527,9 +509,6 @@ public function getType() */ 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( diff --git a/src/Adyen/Service/BalancePlatform/BalanceAccountsApi.php b/src/Adyen/Service/BalancePlatform/BalanceAccountsApi.php index 980edd95b..bcb0276b3 100644 --- a/src/Adyen/Service/BalancePlatform/BalanceAccountsApi.php +++ b/src/Adyen/Service/BalancePlatform/BalanceAccountsApi.php @@ -76,13 +76,14 @@ public function createSweep(string $balanceAccountId, \Adyen\Model\BalancePlatfo * @param string $balanceAccountId * @param string $sweepId * @param array|null $requestOptions - + * @throws AdyenException */ public function deleteSweep(string $balanceAccountId, string $sweepId, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{balanceAccountId}', '{sweepId}'], [$balanceAccountId, $sweepId], "/balanceAccounts/{balanceAccountId}/sweeps/{sweepId}"); $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); + } /** diff --git a/src/Adyen/Service/BalancePlatform/BankAccountValidationApi.php b/src/Adyen/Service/BalancePlatform/BankAccountValidationApi.php index c61143563..99bc3b6bd 100644 --- a/src/Adyen/Service/BalancePlatform/BankAccountValidationApi.php +++ b/src/Adyen/Service/BalancePlatform/BankAccountValidationApi.php @@ -44,12 +44,13 @@ public function __construct(Client $client) * * @param \Adyen\Model\BalancePlatform\BankAccountIdentificationValidationRequest $bankAccountIdentificationValidationRequest * @param array|null $requestOptions - + * @throws AdyenException */ public function validateBankAccountIdentification(\Adyen\Model\BalancePlatform\BankAccountIdentificationValidationRequest $bankAccountIdentificationValidationRequest, array $requestOptions = null) { $endpoint = $this->baseURL . "/validateBankAccountIdentification"; $this->requestHttp($endpoint, strtolower('POST'), (array) $bankAccountIdentificationValidationRequest->jsonSerialize(), $requestOptions); + } } diff --git a/src/Adyen/Service/BalancePlatform/ManageSCADevicesApi.php b/src/Adyen/Service/BalancePlatform/ManageSCADevicesApi.php index df3b7a28a..50ba91f10 100644 --- a/src/Adyen/Service/BalancePlatform/ManageSCADevicesApi.php +++ b/src/Adyen/Service/BalancePlatform/ManageSCADevicesApi.php @@ -60,13 +60,14 @@ public function completeRegistrationOfScaDevice(string $id, \Adyen\Model\Balance * * @param string $id * @param array|null $requestOptions ['queryParams' => ['paymentInstrumentId'=> string]] - + * @throws AdyenException */ public function deleteRegistrationOfScaDevice(string $id, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{id}'], [$id], "/registeredDevices/{id}"); $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); + } /** diff --git a/src/Adyen/Service/BalancePlatform/NetworkTokensApi.php b/src/Adyen/Service/BalancePlatform/NetworkTokensApi.php index ad86f1206..2e704599b 100644 --- a/src/Adyen/Service/BalancePlatform/NetworkTokensApi.php +++ b/src/Adyen/Service/BalancePlatform/NetworkTokensApi.php @@ -60,12 +60,13 @@ public function getNetworkToken(string $networkTokenId, array $requestOptions = * @param string $networkTokenId * @param \Adyen\Model\BalancePlatform\UpdateNetworkTokenRequest $updateNetworkTokenRequest * @param array|null $requestOptions - + * @throws AdyenException */ public function updateNetworkToken(string $networkTokenId, \Adyen\Model\BalancePlatform\UpdateNetworkTokenRequest $updateNetworkTokenRequest, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{networkTokenId}'], [$networkTokenId], "/networkTokens/{networkTokenId}"); $this->requestHttp($endpoint, strtolower('PATCH'), (array) $updateNetworkTokenRequest->jsonSerialize(), $requestOptions); + } } diff --git a/src/Adyen/Service/Checkout/ModificationsApi.php b/src/Adyen/Service/Checkout/ModificationsApi.php index 315fca754..98a2271fd 100644 --- a/src/Adyen/Service/Checkout/ModificationsApi.php +++ b/src/Adyen/Service/Checkout/ModificationsApi.php @@ -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 b99d6437c..fe4513ce3 100644 --- a/src/Adyen/Service/Checkout/OrdersApi.php +++ b/src/Adyen/Service/Checkout/OrdersApi.php @@ -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 15f0ac7ec..0deba7e73 100644 --- a/src/Adyen/Service/Checkout/PaymentLinksApi.php +++ b/src/Adyen/Service/Checkout/PaymentLinksApi.php @@ -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 34371a4b2..f91aeb65e 100644 --- a/src/Adyen/Service/Checkout/PaymentsApi.php +++ b/src/Adyen/Service/Checkout/PaymentsApi.php @@ -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 * @@ -69,6 +54,21 @@ public function cardDetails(\Adyen\Model\Checkout\CardDetailsRequest $cardDetail return ObjectSerializer::deserialize($response, \Adyen\Model\Checkout\CardDetailsResponse::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 233c09180..72b257fdc 100644 --- a/src/Adyen/Service/Checkout/RecurringApi.php +++ b/src/Adyen/Service/Checkout/RecurringApi.php @@ -44,13 +44,14 @@ public function __construct(Client $client) * * @param string $storedPaymentMethodId * @param array|null $requestOptions ['queryParams' => ['shopperReference'=> string, 'merchantAccount'=> string]] - + * @throws AdyenException */ public function deleteTokenForStoredPaymentDetails(string $storedPaymentMethodId, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{storedPaymentMethodId}'], [$storedPaymentMethodId], "/storedPaymentMethods/{storedPaymentMethodId}"); $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); + } /** diff --git a/src/Adyen/Service/LegalEntityManagement/BusinessLinesApi.php b/src/Adyen/Service/LegalEntityManagement/BusinessLinesApi.php index f94b39ed9..2551bbc54 100644 --- a/src/Adyen/Service/LegalEntityManagement/BusinessLinesApi.php +++ b/src/Adyen/Service/LegalEntityManagement/BusinessLinesApi.php @@ -59,13 +59,14 @@ public function createBusinessLine(\Adyen\Model\LegalEntityManagement\BusinessLi * * @param string $id * @param array|null $requestOptions - + * @throws AdyenException */ public function deleteBusinessLine(string $id, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{id}'], [$id], "/businessLines/{id}"); $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); + } /** diff --git a/src/Adyen/Service/LegalEntityManagement/DocumentsApi.php b/src/Adyen/Service/LegalEntityManagement/DocumentsApi.php index d834bf550..9a6ea1756 100644 --- a/src/Adyen/Service/LegalEntityManagement/DocumentsApi.php +++ b/src/Adyen/Service/LegalEntityManagement/DocumentsApi.php @@ -44,13 +44,14 @@ public function __construct(Client $client) * * @param string $id * @param array|null $requestOptions - + * @throws AdyenException */ public function deleteDocument(string $id, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{id}'], [$id], "/documents/{id}"); $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); + } /** diff --git a/src/Adyen/Service/LegalEntityManagement/TransferInstrumentsApi.php b/src/Adyen/Service/LegalEntityManagement/TransferInstrumentsApi.php index 70c2e0769..3bf8aeaa4 100644 --- a/src/Adyen/Service/LegalEntityManagement/TransferInstrumentsApi.php +++ b/src/Adyen/Service/LegalEntityManagement/TransferInstrumentsApi.php @@ -59,13 +59,14 @@ public function createTransferInstrument(\Adyen\Model\LegalEntityManagement\Tran * * @param string $id * @param array|null $requestOptions - + * @throws AdyenException */ public function deleteTransferInstrument(string $id, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{id}'], [$id], "/transferInstruments/{id}"); $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); + } /** diff --git a/src/Adyen/Service/Management/AllowedOriginsCompanyLevelApi.php b/src/Adyen/Service/Management/AllowedOriginsCompanyLevelApi.php index c2557d39d..608130253 100644 --- a/src/Adyen/Service/Management/AllowedOriginsCompanyLevelApi.php +++ b/src/Adyen/Service/Management/AllowedOriginsCompanyLevelApi.php @@ -63,13 +63,14 @@ public function createAllowedOrigin(string $companyId, string $apiCredentialId, * @param string $apiCredentialId * @param string $originId * @param array|null $requestOptions - + * @throws AdyenException */ public function deleteAllowedOrigin(string $companyId, string $apiCredentialId, string $originId, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{companyId}', '{apiCredentialId}', '{originId}'], [$companyId, $apiCredentialId, $originId], "/companies/{companyId}/apiCredentials/{apiCredentialId}/allowedOrigins/{originId}"); $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); + } /** diff --git a/src/Adyen/Service/Management/AllowedOriginsMerchantLevelApi.php b/src/Adyen/Service/Management/AllowedOriginsMerchantLevelApi.php index 1b40d271f..ec0d042af 100644 --- a/src/Adyen/Service/Management/AllowedOriginsMerchantLevelApi.php +++ b/src/Adyen/Service/Management/AllowedOriginsMerchantLevelApi.php @@ -63,13 +63,14 @@ public function createAllowedOrigin(string $merchantId, string $apiCredentialId, * @param string $apiCredentialId * @param string $originId * @param array|null $requestOptions - + * @throws AdyenException */ public function deleteAllowedOrigin(string $merchantId, string $apiCredentialId, string $originId, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{merchantId}', '{apiCredentialId}', '{originId}'], [$merchantId, $apiCredentialId, $originId], "/merchants/{merchantId}/apiCredentials/{apiCredentialId}/allowedOrigins/{originId}"); $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); + } /** diff --git a/src/Adyen/Service/Management/MyAPICredentialApi.php b/src/Adyen/Service/Management/MyAPICredentialApi.php index 54005b35b..65cdadc59 100644 --- a/src/Adyen/Service/Management/MyAPICredentialApi.php +++ b/src/Adyen/Service/Management/MyAPICredentialApi.php @@ -116,12 +116,13 @@ public function getApiCredentialDetails(array $requestOptions = null): \Adyen\Mo * * @param string $originId * @param array|null $requestOptions - + * @throws AdyenException */ public function removeAllowedOrigin(string $originId, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{originId}'], [$originId], "/me/allowedOrigins/{originId}"); $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); + } } diff --git a/src/Adyen/Service/Management/PaymentMethodsMerchantLevelApi.php b/src/Adyen/Service/Management/PaymentMethodsMerchantLevelApi.php index f8b7cc0b0..4f955b8ba 100644 --- a/src/Adyen/Service/Management/PaymentMethodsMerchantLevelApi.php +++ b/src/Adyen/Service/Management/PaymentMethodsMerchantLevelApi.php @@ -46,13 +46,14 @@ public function __construct(Client $client) * @param string $paymentMethodId * @param \Adyen\Model\Management\ApplePayInfo $applePayInfo * @param array|null $requestOptions - + * @throws AdyenException */ public function addApplePayDomain(string $merchantId, string $paymentMethodId, \Adyen\Model\Management\ApplePayInfo $applePayInfo, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{merchantId}', '{paymentMethodId}'], [$merchantId, $paymentMethodId], "/merchants/{merchantId}/paymentMethodSettings/{paymentMethodId}/addApplePayDomains"); $this->requestHttp($endpoint, strtolower('POST'), (array) $applePayInfo->jsonSerialize(), $requestOptions); + } /** diff --git a/src/Adyen/Service/Management/PayoutSettingsMerchantLevelApi.php b/src/Adyen/Service/Management/PayoutSettingsMerchantLevelApi.php index efff80b67..499e78957 100644 --- a/src/Adyen/Service/Management/PayoutSettingsMerchantLevelApi.php +++ b/src/Adyen/Service/Management/PayoutSettingsMerchantLevelApi.php @@ -61,13 +61,14 @@ public function addPayoutSetting(string $merchantId, \Adyen\Model\Management\Pay * @param string $merchantId * @param string $payoutSettingsId * @param array|null $requestOptions - + * @throws AdyenException */ public function deletePayoutSetting(string $merchantId, string $payoutSettingsId, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{merchantId}', '{payoutSettingsId}'], [$merchantId, $payoutSettingsId], "/merchants/{merchantId}/payoutSettings/{payoutSettingsId}"); $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); + } /** diff --git a/src/Adyen/Service/Management/TerminalsTerminalLevelApi.php b/src/Adyen/Service/Management/TerminalsTerminalLevelApi.php index 8a7c5e731..8b6d78c7f 100644 --- a/src/Adyen/Service/Management/TerminalsTerminalLevelApi.php +++ b/src/Adyen/Service/Management/TerminalsTerminalLevelApi.php @@ -59,12 +59,13 @@ public function listTerminals(array $requestOptions = null): \Adyen\Model\Manage * @param string $terminalId * @param \Adyen\Model\Management\TerminalReassignmentRequest $terminalReassignmentRequest * @param array|null $requestOptions - + * @throws AdyenException */ public function reassignTerminal(string $terminalId, \Adyen\Model\Management\TerminalReassignmentRequest $terminalReassignmentRequest, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{terminalId}'], [$terminalId], "/terminals/{terminalId}/reassign"); $this->requestHttp($endpoint, strtolower('POST'), (array) $terminalReassignmentRequest->jsonSerialize(), $requestOptions); + } } diff --git a/src/Adyen/Service/Management/WebhooksCompanyLevelApi.php b/src/Adyen/Service/Management/WebhooksCompanyLevelApi.php index cfe85a383..6caa292a6 100644 --- a/src/Adyen/Service/Management/WebhooksCompanyLevelApi.php +++ b/src/Adyen/Service/Management/WebhooksCompanyLevelApi.php @@ -92,13 +92,14 @@ public function listAllWebhooks(string $companyId, array $requestOptions = null) * @param string $companyId * @param string $webhookId * @param array|null $requestOptions - + * @throws AdyenException */ public function removeWebhook(string $companyId, string $webhookId, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{companyId}', '{webhookId}'], [$companyId, $webhookId], "/companies/{companyId}/webhooks/{webhookId}"); $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); + } /** diff --git a/src/Adyen/Service/Management/WebhooksMerchantLevelApi.php b/src/Adyen/Service/Management/WebhooksMerchantLevelApi.php index 968e9c614..7113c9c39 100644 --- a/src/Adyen/Service/Management/WebhooksMerchantLevelApi.php +++ b/src/Adyen/Service/Management/WebhooksMerchantLevelApi.php @@ -92,13 +92,14 @@ public function listAllWebhooks(string $merchantId, array $requestOptions = null * @param string $merchantId * @param string $webhookId * @param array|null $requestOptions - + * @throws AdyenException */ public function removeWebhook(string $merchantId, string $webhookId, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{merchantId}', '{webhookId}'], [$merchantId, $webhookId], "/merchants/{merchantId}/webhooks/{webhookId}"); $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); + } /** From c9001b430149f5b602793cc81cb6923bc838d232 Mon Sep 17 00:00:00 2001 From: AdyenAutomationBot Date: Wed, 3 Jul 2024 09:12:06 +0000 Subject: [PATCH 2/2] style(fmt): code formatted --- src/Adyen/Model/AcsWebhooks/ObjectSerializer.php | 9 +++++---- src/Adyen/Model/BalanceControl/ObjectSerializer.php | 9 +++++---- src/Adyen/Model/BalancePlatform/CapabilitySettings.php | 8 ++++---- src/Adyen/Model/BalancePlatform/ObjectSerializer.php | 9 +++++---- src/Adyen/Model/BinLookup/ObjectSerializer.php | 9 +++++---- src/Adyen/Model/Checkout/CheckoutPaymentMethod.php | 4 ++-- src/Adyen/Model/Checkout/MbwayDetails.php | 4 ++-- src/Adyen/Model/Checkout/ObjectSerializer.php | 9 +++++---- src/Adyen/Model/Checkout/VippsDetails.php | 2 +- .../Model/ConfigurationWebhooks/CapabilitySettings.php | 8 ++++---- .../Model/ConfigurationWebhooks/ObjectSerializer.php | 9 +++++---- src/Adyen/Model/DataProtection/ObjectSerializer.php | 9 +++++---- src/Adyen/Model/Disputes/ObjectSerializer.php | 9 +++++---- .../Model/LegalEntityManagement/ObjectSerializer.php | 9 +++++---- src/Adyen/Model/Management/ObjectSerializer.php | 9 +++++---- src/Adyen/Model/ManagementWebhooks/ObjectSerializer.php | 9 +++++---- .../Model/POSTerminalManagement/ObjectSerializer.php | 9 +++++---- src/Adyen/Model/Payments/ObjectSerializer.php | 9 +++++---- src/Adyen/Model/Payout/ObjectSerializer.php | 9 +++++---- src/Adyen/Model/PosMobile/ObjectSerializer.php | 9 +++++---- src/Adyen/Model/Recurring/ObjectSerializer.php | 9 +++++---- src/Adyen/Model/ReportWebhooks/ObjectSerializer.php | 9 +++++---- src/Adyen/Model/StoredValue/ObjectSerializer.php | 9 +++++---- src/Adyen/Model/TransactionWebhooks/ObjectSerializer.php | 9 +++++---- src/Adyen/Model/TransferWebhooks/ObjectSerializer.php | 9 +++++---- src/Adyen/Model/Transfers/ObjectSerializer.php | 9 +++++---- src/Adyen/Service/BalancePlatform/BalanceAccountsApi.php | 3 +-- .../Service/BalancePlatform/BankAccountValidationApi.php | 3 +-- .../Service/BalancePlatform/ManageSCADevicesApi.php | 3 +-- src/Adyen/Service/BalancePlatform/NetworkTokensApi.php | 3 +-- src/Adyen/Service/Checkout/RecurringApi.php | 3 +-- .../Service/LegalEntityManagement/BusinessLinesApi.php | 3 +-- src/Adyen/Service/LegalEntityManagement/DocumentsApi.php | 3 +-- .../LegalEntityManagement/TransferInstrumentsApi.php | 3 +-- .../Service/Management/AllowedOriginsCompanyLevelApi.php | 3 +-- .../Management/AllowedOriginsMerchantLevelApi.php | 3 +-- src/Adyen/Service/Management/MyAPICredentialApi.php | 3 +-- .../Management/PaymentMethodsMerchantLevelApi.php | 3 +-- .../Management/PayoutSettingsMerchantLevelApi.php | 3 +-- .../Service/Management/TerminalsTerminalLevelApi.php | 3 +-- src/Adyen/Service/Management/WebhooksCompanyLevelApi.php | 3 +-- .../Service/Management/WebhooksMerchantLevelApi.php | 3 +-- 42 files changed, 134 insertions(+), 129 deletions(-) diff --git a/src/Adyen/Model/AcsWebhooks/ObjectSerializer.php b/src/Adyen/Model/AcsWebhooks/ObjectSerializer.php index e14421342..755ed1ce8 100644 --- a/src/Adyen/Model/AcsWebhooks/ObjectSerializer.php +++ b/src/Adyen/Model/AcsWebhooks/ObjectSerializer.php @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach($data as $property => $value) { + foreach ($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,7 +117,9 @@ 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); } @@ -240,8 +242,7 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if ( - is_array($httpHeaders) + if (is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/BalanceControl/ObjectSerializer.php b/src/Adyen/Model/BalanceControl/ObjectSerializer.php index 2ed0eb3a0..b5ae3313d 100644 --- a/src/Adyen/Model/BalanceControl/ObjectSerializer.php +++ b/src/Adyen/Model/BalanceControl/ObjectSerializer.php @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach($data as $property => $value) { + foreach ($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,7 +117,9 @@ 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); } @@ -240,8 +242,7 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if ( - is_array($httpHeaders) + if (is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/BalancePlatform/CapabilitySettings.php b/src/Adyen/Model/BalancePlatform/CapabilitySettings.php index ada0db0b3..67e88b5f9 100644 --- a/src/Adyen/Model/BalancePlatform/CapabilitySettings.php +++ b/src/Adyen/Model/BalancePlatform/CapabilitySettings.php @@ -358,7 +358,7 @@ public function getAmountPerIndustry() /** * Sets amountPerIndustry * - * @param array|null $amountPerIndustry + * @param array|null $amountPerIndustry * * @return self */ @@ -382,7 +382,7 @@ public function getAuthorizedCardUsers() /** * Sets authorizedCardUsers * - * @param bool|null $authorizedCardUsers + * @param bool|null $authorizedCardUsers * * @return self */ @@ -406,7 +406,7 @@ public function getFundingSource() /** * Sets fundingSource * - * @param string[]|null $fundingSource + * @param string[]|null $fundingSource * * @return self */ @@ -439,7 +439,7 @@ public function getInterval() /** * Sets interval * - * @param string|null $interval + * @param string|null $interval * * @return self */ diff --git a/src/Adyen/Model/BalancePlatform/ObjectSerializer.php b/src/Adyen/Model/BalancePlatform/ObjectSerializer.php index fa9af7e82..141ec623e 100644 --- a/src/Adyen/Model/BalancePlatform/ObjectSerializer.php +++ b/src/Adyen/Model/BalancePlatform/ObjectSerializer.php @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach($data as $property => $value) { + foreach ($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,7 +117,9 @@ 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); } @@ -240,8 +242,7 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if ( - is_array($httpHeaders) + if (is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/BinLookup/ObjectSerializer.php b/src/Adyen/Model/BinLookup/ObjectSerializer.php index 09437b7d8..4bdfceeda 100644 --- a/src/Adyen/Model/BinLookup/ObjectSerializer.php +++ b/src/Adyen/Model/BinLookup/ObjectSerializer.php @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach($data as $property => $value) { + foreach ($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,7 +117,9 @@ 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); } @@ -240,8 +242,7 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if ( - is_array($httpHeaders) + if (is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/Checkout/CheckoutPaymentMethod.php b/src/Adyen/Model/Checkout/CheckoutPaymentMethod.php index 2162d249e..8bfe4064d 100644 --- a/src/Adyen/Model/Checkout/CheckoutPaymentMethod.php +++ b/src/Adyen/Model/Checkout/CheckoutPaymentMethod.php @@ -1846,7 +1846,7 @@ public function getShopperEmail() /** * Sets shopperEmail * - * @param string $shopperEmail + * @param string $shopperEmail * * @return self */ @@ -1870,7 +1870,7 @@ public function getTelephoneNumber() /** * Sets telephoneNumber * - * @param string $telephoneNumber + * @param string $telephoneNumber * * @return self */ diff --git a/src/Adyen/Model/Checkout/MbwayDetails.php b/src/Adyen/Model/Checkout/MbwayDetails.php index becc716f0..dc73d3c30 100644 --- a/src/Adyen/Model/Checkout/MbwayDetails.php +++ b/src/Adyen/Model/Checkout/MbwayDetails.php @@ -361,7 +361,7 @@ public function getShopperEmail() /** * Sets shopperEmail * - * @param string $shopperEmail + * @param string $shopperEmail * * @return self */ @@ -385,7 +385,7 @@ public function getTelephoneNumber() /** * Sets telephoneNumber * - * @param string $telephoneNumber + * @param string $telephoneNumber * * @return self */ diff --git a/src/Adyen/Model/Checkout/ObjectSerializer.php b/src/Adyen/Model/Checkout/ObjectSerializer.php index 628f63adc..2b682c18f 100644 --- a/src/Adyen/Model/Checkout/ObjectSerializer.php +++ b/src/Adyen/Model/Checkout/ObjectSerializer.php @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach($data as $property => $value) { + foreach ($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,7 +117,9 @@ 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); } @@ -240,8 +242,7 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if ( - is_array($httpHeaders) + if (is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/Checkout/VippsDetails.php b/src/Adyen/Model/Checkout/VippsDetails.php index a5087a929..6787fd034 100644 --- a/src/Adyen/Model/Checkout/VippsDetails.php +++ b/src/Adyen/Model/Checkout/VippsDetails.php @@ -415,7 +415,7 @@ public function getTelephoneNumber() /** * Sets telephoneNumber * - * @param string $telephoneNumber + * @param string $telephoneNumber * * @return self */ diff --git a/src/Adyen/Model/ConfigurationWebhooks/CapabilitySettings.php b/src/Adyen/Model/ConfigurationWebhooks/CapabilitySettings.php index 478ff8914..77bba385d 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/CapabilitySettings.php +++ b/src/Adyen/Model/ConfigurationWebhooks/CapabilitySettings.php @@ -358,7 +358,7 @@ public function getAmountPerIndustry() /** * Sets amountPerIndustry * - * @param array|null $amountPerIndustry + * @param array|null $amountPerIndustry * * @return self */ @@ -382,7 +382,7 @@ public function getAuthorizedCardUsers() /** * Sets authorizedCardUsers * - * @param bool|null $authorizedCardUsers + * @param bool|null $authorizedCardUsers * * @return self */ @@ -406,7 +406,7 @@ public function getFundingSource() /** * Sets fundingSource * - * @param string[]|null $fundingSource + * @param string[]|null $fundingSource * * @return self */ @@ -439,7 +439,7 @@ public function getInterval() /** * Sets interval * - * @param string|null $interval + * @param string|null $interval * * @return self */ diff --git a/src/Adyen/Model/ConfigurationWebhooks/ObjectSerializer.php b/src/Adyen/Model/ConfigurationWebhooks/ObjectSerializer.php index 2d912cd58..6629bee4b 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/ObjectSerializer.php +++ b/src/Adyen/Model/ConfigurationWebhooks/ObjectSerializer.php @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach($data as $property => $value) { + foreach ($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,7 +117,9 @@ 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); } @@ -240,8 +242,7 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if ( - is_array($httpHeaders) + if (is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/DataProtection/ObjectSerializer.php b/src/Adyen/Model/DataProtection/ObjectSerializer.php index fe8491817..1b86733ae 100644 --- a/src/Adyen/Model/DataProtection/ObjectSerializer.php +++ b/src/Adyen/Model/DataProtection/ObjectSerializer.php @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach($data as $property => $value) { + foreach ($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,7 +117,9 @@ 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); } @@ -240,8 +242,7 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if ( - is_array($httpHeaders) + if (is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/Disputes/ObjectSerializer.php b/src/Adyen/Model/Disputes/ObjectSerializer.php index d363f9e2a..5ef9f66af 100644 --- a/src/Adyen/Model/Disputes/ObjectSerializer.php +++ b/src/Adyen/Model/Disputes/ObjectSerializer.php @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach($data as $property => $value) { + foreach ($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,7 +117,9 @@ 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); } @@ -240,8 +242,7 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if ( - is_array($httpHeaders) + if (is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/LegalEntityManagement/ObjectSerializer.php b/src/Adyen/Model/LegalEntityManagement/ObjectSerializer.php index 66642b915..d25ad19d7 100644 --- a/src/Adyen/Model/LegalEntityManagement/ObjectSerializer.php +++ b/src/Adyen/Model/LegalEntityManagement/ObjectSerializer.php @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach($data as $property => $value) { + foreach ($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,7 +117,9 @@ 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); } @@ -240,8 +242,7 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if ( - is_array($httpHeaders) + if (is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/Management/ObjectSerializer.php b/src/Adyen/Model/Management/ObjectSerializer.php index 2ff0b7ef6..cc5272bf9 100644 --- a/src/Adyen/Model/Management/ObjectSerializer.php +++ b/src/Adyen/Model/Management/ObjectSerializer.php @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach($data as $property => $value) { + foreach ($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,7 +117,9 @@ 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); } @@ -240,8 +242,7 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if ( - is_array($httpHeaders) + if (is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/ManagementWebhooks/ObjectSerializer.php b/src/Adyen/Model/ManagementWebhooks/ObjectSerializer.php index a3626e45d..9c73e94b9 100644 --- a/src/Adyen/Model/ManagementWebhooks/ObjectSerializer.php +++ b/src/Adyen/Model/ManagementWebhooks/ObjectSerializer.php @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach($data as $property => $value) { + foreach ($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,7 +117,9 @@ 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); } @@ -240,8 +242,7 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if ( - is_array($httpHeaders) + if (is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/POSTerminalManagement/ObjectSerializer.php b/src/Adyen/Model/POSTerminalManagement/ObjectSerializer.php index b6a5027ee..8032f208b 100644 --- a/src/Adyen/Model/POSTerminalManagement/ObjectSerializer.php +++ b/src/Adyen/Model/POSTerminalManagement/ObjectSerializer.php @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach($data as $property => $value) { + foreach ($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,7 +117,9 @@ 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); } @@ -240,8 +242,7 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if ( - is_array($httpHeaders) + if (is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/Payments/ObjectSerializer.php b/src/Adyen/Model/Payments/ObjectSerializer.php index ae7a870cb..4e217461d 100644 --- a/src/Adyen/Model/Payments/ObjectSerializer.php +++ b/src/Adyen/Model/Payments/ObjectSerializer.php @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach($data as $property => $value) { + foreach ($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,7 +117,9 @@ 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); } @@ -240,8 +242,7 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if ( - is_array($httpHeaders) + if (is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/Payout/ObjectSerializer.php b/src/Adyen/Model/Payout/ObjectSerializer.php index 0d50f4363..ad1c991ab 100644 --- a/src/Adyen/Model/Payout/ObjectSerializer.php +++ b/src/Adyen/Model/Payout/ObjectSerializer.php @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach($data as $property => $value) { + foreach ($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,7 +117,9 @@ 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); } @@ -240,8 +242,7 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if ( - is_array($httpHeaders) + if (is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/PosMobile/ObjectSerializer.php b/src/Adyen/Model/PosMobile/ObjectSerializer.php index ba0e91ceb..ae87baef9 100644 --- a/src/Adyen/Model/PosMobile/ObjectSerializer.php +++ b/src/Adyen/Model/PosMobile/ObjectSerializer.php @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach($data as $property => $value) { + foreach ($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,7 +117,9 @@ 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); } @@ -240,8 +242,7 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if ( - is_array($httpHeaders) + if (is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/Recurring/ObjectSerializer.php b/src/Adyen/Model/Recurring/ObjectSerializer.php index 3b2a857bf..7adbf8e59 100644 --- a/src/Adyen/Model/Recurring/ObjectSerializer.php +++ b/src/Adyen/Model/Recurring/ObjectSerializer.php @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach($data as $property => $value) { + foreach ($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,7 +117,9 @@ 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); } @@ -240,8 +242,7 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if ( - is_array($httpHeaders) + if (is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/ReportWebhooks/ObjectSerializer.php b/src/Adyen/Model/ReportWebhooks/ObjectSerializer.php index a8a265ce9..97f670389 100644 --- a/src/Adyen/Model/ReportWebhooks/ObjectSerializer.php +++ b/src/Adyen/Model/ReportWebhooks/ObjectSerializer.php @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach($data as $property => $value) { + foreach ($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,7 +117,9 @@ 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); } @@ -240,8 +242,7 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if ( - is_array($httpHeaders) + if (is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/StoredValue/ObjectSerializer.php b/src/Adyen/Model/StoredValue/ObjectSerializer.php index 934975452..ed3372fb3 100644 --- a/src/Adyen/Model/StoredValue/ObjectSerializer.php +++ b/src/Adyen/Model/StoredValue/ObjectSerializer.php @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach($data as $property => $value) { + foreach ($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,7 +117,9 @@ 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); } @@ -240,8 +242,7 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if ( - is_array($httpHeaders) + if (is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/TransactionWebhooks/ObjectSerializer.php b/src/Adyen/Model/TransactionWebhooks/ObjectSerializer.php index 9ccc67586..6592bf84d 100644 --- a/src/Adyen/Model/TransactionWebhooks/ObjectSerializer.php +++ b/src/Adyen/Model/TransactionWebhooks/ObjectSerializer.php @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach($data as $property => $value) { + foreach ($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,7 +117,9 @@ 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); } @@ -240,8 +242,7 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if ( - is_array($httpHeaders) + if (is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/TransferWebhooks/ObjectSerializer.php b/src/Adyen/Model/TransferWebhooks/ObjectSerializer.php index d05b26906..01b25bf23 100644 --- a/src/Adyen/Model/TransferWebhooks/ObjectSerializer.php +++ b/src/Adyen/Model/TransferWebhooks/ObjectSerializer.php @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach($data as $property => $value) { + foreach ($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,7 +117,9 @@ 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); } @@ -240,8 +242,7 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if ( - is_array($httpHeaders) + if (is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/Transfers/ObjectSerializer.php b/src/Adyen/Model/Transfers/ObjectSerializer.php index 349b367b3..b9cbe36bf 100644 --- a/src/Adyen/Model/Transfers/ObjectSerializer.php +++ b/src/Adyen/Model/Transfers/ObjectSerializer.php @@ -81,7 +81,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach($data as $property => $value) { + foreach ($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } @@ -117,7 +117,9 @@ 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); } @@ -240,8 +242,7 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if ( - is_array($httpHeaders) + if (is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Service/BalancePlatform/BalanceAccountsApi.php b/src/Adyen/Service/BalancePlatform/BalanceAccountsApi.php index bcb0276b3..980edd95b 100644 --- a/src/Adyen/Service/BalancePlatform/BalanceAccountsApi.php +++ b/src/Adyen/Service/BalancePlatform/BalanceAccountsApi.php @@ -76,14 +76,13 @@ public function createSweep(string $balanceAccountId, \Adyen\Model\BalancePlatfo * @param string $balanceAccountId * @param string $sweepId * @param array|null $requestOptions - + * @throws AdyenException */ public function deleteSweep(string $balanceAccountId, string $sweepId, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{balanceAccountId}', '{sweepId}'], [$balanceAccountId, $sweepId], "/balanceAccounts/{balanceAccountId}/sweeps/{sweepId}"); $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); - } /** diff --git a/src/Adyen/Service/BalancePlatform/BankAccountValidationApi.php b/src/Adyen/Service/BalancePlatform/BankAccountValidationApi.php index 99bc3b6bd..c61143563 100644 --- a/src/Adyen/Service/BalancePlatform/BankAccountValidationApi.php +++ b/src/Adyen/Service/BalancePlatform/BankAccountValidationApi.php @@ -44,13 +44,12 @@ public function __construct(Client $client) * * @param \Adyen\Model\BalancePlatform\BankAccountIdentificationValidationRequest $bankAccountIdentificationValidationRequest * @param array|null $requestOptions - + * @throws AdyenException */ public function validateBankAccountIdentification(\Adyen\Model\BalancePlatform\BankAccountIdentificationValidationRequest $bankAccountIdentificationValidationRequest, array $requestOptions = null) { $endpoint = $this->baseURL . "/validateBankAccountIdentification"; $this->requestHttp($endpoint, strtolower('POST'), (array) $bankAccountIdentificationValidationRequest->jsonSerialize(), $requestOptions); - } } diff --git a/src/Adyen/Service/BalancePlatform/ManageSCADevicesApi.php b/src/Adyen/Service/BalancePlatform/ManageSCADevicesApi.php index 50ba91f10..df3b7a28a 100644 --- a/src/Adyen/Service/BalancePlatform/ManageSCADevicesApi.php +++ b/src/Adyen/Service/BalancePlatform/ManageSCADevicesApi.php @@ -60,14 +60,13 @@ public function completeRegistrationOfScaDevice(string $id, \Adyen\Model\Balance * * @param string $id * @param array|null $requestOptions ['queryParams' => ['paymentInstrumentId'=> string]] - + * @throws AdyenException */ public function deleteRegistrationOfScaDevice(string $id, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{id}'], [$id], "/registeredDevices/{id}"); $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); - } /** diff --git a/src/Adyen/Service/BalancePlatform/NetworkTokensApi.php b/src/Adyen/Service/BalancePlatform/NetworkTokensApi.php index 2e704599b..ad86f1206 100644 --- a/src/Adyen/Service/BalancePlatform/NetworkTokensApi.php +++ b/src/Adyen/Service/BalancePlatform/NetworkTokensApi.php @@ -60,13 +60,12 @@ public function getNetworkToken(string $networkTokenId, array $requestOptions = * @param string $networkTokenId * @param \Adyen\Model\BalancePlatform\UpdateNetworkTokenRequest $updateNetworkTokenRequest * @param array|null $requestOptions - + * @throws AdyenException */ public function updateNetworkToken(string $networkTokenId, \Adyen\Model\BalancePlatform\UpdateNetworkTokenRequest $updateNetworkTokenRequest, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{networkTokenId}'], [$networkTokenId], "/networkTokens/{networkTokenId}"); $this->requestHttp($endpoint, strtolower('PATCH'), (array) $updateNetworkTokenRequest->jsonSerialize(), $requestOptions); - } } diff --git a/src/Adyen/Service/Checkout/RecurringApi.php b/src/Adyen/Service/Checkout/RecurringApi.php index 72b257fdc..233c09180 100644 --- a/src/Adyen/Service/Checkout/RecurringApi.php +++ b/src/Adyen/Service/Checkout/RecurringApi.php @@ -44,14 +44,13 @@ public function __construct(Client $client) * * @param string $storedPaymentMethodId * @param array|null $requestOptions ['queryParams' => ['shopperReference'=> string, 'merchantAccount'=> string]] - + * @throws AdyenException */ public function deleteTokenForStoredPaymentDetails(string $storedPaymentMethodId, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{storedPaymentMethodId}'], [$storedPaymentMethodId], "/storedPaymentMethods/{storedPaymentMethodId}"); $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); - } /** diff --git a/src/Adyen/Service/LegalEntityManagement/BusinessLinesApi.php b/src/Adyen/Service/LegalEntityManagement/BusinessLinesApi.php index 2551bbc54..f94b39ed9 100644 --- a/src/Adyen/Service/LegalEntityManagement/BusinessLinesApi.php +++ b/src/Adyen/Service/LegalEntityManagement/BusinessLinesApi.php @@ -59,14 +59,13 @@ public function createBusinessLine(\Adyen\Model\LegalEntityManagement\BusinessLi * * @param string $id * @param array|null $requestOptions - + * @throws AdyenException */ public function deleteBusinessLine(string $id, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{id}'], [$id], "/businessLines/{id}"); $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); - } /** diff --git a/src/Adyen/Service/LegalEntityManagement/DocumentsApi.php b/src/Adyen/Service/LegalEntityManagement/DocumentsApi.php index 9a6ea1756..d834bf550 100644 --- a/src/Adyen/Service/LegalEntityManagement/DocumentsApi.php +++ b/src/Adyen/Service/LegalEntityManagement/DocumentsApi.php @@ -44,14 +44,13 @@ public function __construct(Client $client) * * @param string $id * @param array|null $requestOptions - + * @throws AdyenException */ public function deleteDocument(string $id, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{id}'], [$id], "/documents/{id}"); $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); - } /** diff --git a/src/Adyen/Service/LegalEntityManagement/TransferInstrumentsApi.php b/src/Adyen/Service/LegalEntityManagement/TransferInstrumentsApi.php index 3bf8aeaa4..70c2e0769 100644 --- a/src/Adyen/Service/LegalEntityManagement/TransferInstrumentsApi.php +++ b/src/Adyen/Service/LegalEntityManagement/TransferInstrumentsApi.php @@ -59,14 +59,13 @@ public function createTransferInstrument(\Adyen\Model\LegalEntityManagement\Tran * * @param string $id * @param array|null $requestOptions - + * @throws AdyenException */ public function deleteTransferInstrument(string $id, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{id}'], [$id], "/transferInstruments/{id}"); $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); - } /** diff --git a/src/Adyen/Service/Management/AllowedOriginsCompanyLevelApi.php b/src/Adyen/Service/Management/AllowedOriginsCompanyLevelApi.php index 608130253..c2557d39d 100644 --- a/src/Adyen/Service/Management/AllowedOriginsCompanyLevelApi.php +++ b/src/Adyen/Service/Management/AllowedOriginsCompanyLevelApi.php @@ -63,14 +63,13 @@ public function createAllowedOrigin(string $companyId, string $apiCredentialId, * @param string $apiCredentialId * @param string $originId * @param array|null $requestOptions - + * @throws AdyenException */ public function deleteAllowedOrigin(string $companyId, string $apiCredentialId, string $originId, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{companyId}', '{apiCredentialId}', '{originId}'], [$companyId, $apiCredentialId, $originId], "/companies/{companyId}/apiCredentials/{apiCredentialId}/allowedOrigins/{originId}"); $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); - } /** diff --git a/src/Adyen/Service/Management/AllowedOriginsMerchantLevelApi.php b/src/Adyen/Service/Management/AllowedOriginsMerchantLevelApi.php index ec0d042af..1b40d271f 100644 --- a/src/Adyen/Service/Management/AllowedOriginsMerchantLevelApi.php +++ b/src/Adyen/Service/Management/AllowedOriginsMerchantLevelApi.php @@ -63,14 +63,13 @@ public function createAllowedOrigin(string $merchantId, string $apiCredentialId, * @param string $apiCredentialId * @param string $originId * @param array|null $requestOptions - + * @throws AdyenException */ public function deleteAllowedOrigin(string $merchantId, string $apiCredentialId, string $originId, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{merchantId}', '{apiCredentialId}', '{originId}'], [$merchantId, $apiCredentialId, $originId], "/merchants/{merchantId}/apiCredentials/{apiCredentialId}/allowedOrigins/{originId}"); $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); - } /** diff --git a/src/Adyen/Service/Management/MyAPICredentialApi.php b/src/Adyen/Service/Management/MyAPICredentialApi.php index 65cdadc59..54005b35b 100644 --- a/src/Adyen/Service/Management/MyAPICredentialApi.php +++ b/src/Adyen/Service/Management/MyAPICredentialApi.php @@ -116,13 +116,12 @@ public function getApiCredentialDetails(array $requestOptions = null): \Adyen\Mo * * @param string $originId * @param array|null $requestOptions - + * @throws AdyenException */ public function removeAllowedOrigin(string $originId, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{originId}'], [$originId], "/me/allowedOrigins/{originId}"); $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); - } } diff --git a/src/Adyen/Service/Management/PaymentMethodsMerchantLevelApi.php b/src/Adyen/Service/Management/PaymentMethodsMerchantLevelApi.php index 4f955b8ba..f8b7cc0b0 100644 --- a/src/Adyen/Service/Management/PaymentMethodsMerchantLevelApi.php +++ b/src/Adyen/Service/Management/PaymentMethodsMerchantLevelApi.php @@ -46,14 +46,13 @@ public function __construct(Client $client) * @param string $paymentMethodId * @param \Adyen\Model\Management\ApplePayInfo $applePayInfo * @param array|null $requestOptions - + * @throws AdyenException */ public function addApplePayDomain(string $merchantId, string $paymentMethodId, \Adyen\Model\Management\ApplePayInfo $applePayInfo, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{merchantId}', '{paymentMethodId}'], [$merchantId, $paymentMethodId], "/merchants/{merchantId}/paymentMethodSettings/{paymentMethodId}/addApplePayDomains"); $this->requestHttp($endpoint, strtolower('POST'), (array) $applePayInfo->jsonSerialize(), $requestOptions); - } /** diff --git a/src/Adyen/Service/Management/PayoutSettingsMerchantLevelApi.php b/src/Adyen/Service/Management/PayoutSettingsMerchantLevelApi.php index 499e78957..efff80b67 100644 --- a/src/Adyen/Service/Management/PayoutSettingsMerchantLevelApi.php +++ b/src/Adyen/Service/Management/PayoutSettingsMerchantLevelApi.php @@ -61,14 +61,13 @@ public function addPayoutSetting(string $merchantId, \Adyen\Model\Management\Pay * @param string $merchantId * @param string $payoutSettingsId * @param array|null $requestOptions - + * @throws AdyenException */ public function deletePayoutSetting(string $merchantId, string $payoutSettingsId, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{merchantId}', '{payoutSettingsId}'], [$merchantId, $payoutSettingsId], "/merchants/{merchantId}/payoutSettings/{payoutSettingsId}"); $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); - } /** diff --git a/src/Adyen/Service/Management/TerminalsTerminalLevelApi.php b/src/Adyen/Service/Management/TerminalsTerminalLevelApi.php index 8b6d78c7f..8a7c5e731 100644 --- a/src/Adyen/Service/Management/TerminalsTerminalLevelApi.php +++ b/src/Adyen/Service/Management/TerminalsTerminalLevelApi.php @@ -59,13 +59,12 @@ public function listTerminals(array $requestOptions = null): \Adyen\Model\Manage * @param string $terminalId * @param \Adyen\Model\Management\TerminalReassignmentRequest $terminalReassignmentRequest * @param array|null $requestOptions - + * @throws AdyenException */ public function reassignTerminal(string $terminalId, \Adyen\Model\Management\TerminalReassignmentRequest $terminalReassignmentRequest, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{terminalId}'], [$terminalId], "/terminals/{terminalId}/reassign"); $this->requestHttp($endpoint, strtolower('POST'), (array) $terminalReassignmentRequest->jsonSerialize(), $requestOptions); - } } diff --git a/src/Adyen/Service/Management/WebhooksCompanyLevelApi.php b/src/Adyen/Service/Management/WebhooksCompanyLevelApi.php index 6caa292a6..cfe85a383 100644 --- a/src/Adyen/Service/Management/WebhooksCompanyLevelApi.php +++ b/src/Adyen/Service/Management/WebhooksCompanyLevelApi.php @@ -92,14 +92,13 @@ public function listAllWebhooks(string $companyId, array $requestOptions = null) * @param string $companyId * @param string $webhookId * @param array|null $requestOptions - + * @throws AdyenException */ public function removeWebhook(string $companyId, string $webhookId, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{companyId}', '{webhookId}'], [$companyId, $webhookId], "/companies/{companyId}/webhooks/{webhookId}"); $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); - } /** diff --git a/src/Adyen/Service/Management/WebhooksMerchantLevelApi.php b/src/Adyen/Service/Management/WebhooksMerchantLevelApi.php index 7113c9c39..968e9c614 100644 --- a/src/Adyen/Service/Management/WebhooksMerchantLevelApi.php +++ b/src/Adyen/Service/Management/WebhooksMerchantLevelApi.php @@ -92,14 +92,13 @@ public function listAllWebhooks(string $merchantId, array $requestOptions = null * @param string $merchantId * @param string $webhookId * @param array|null $requestOptions - + * @throws AdyenException */ public function removeWebhook(string $merchantId, string $webhookId, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{merchantId}', '{webhookId}'], [$merchantId, $webhookId], "/merchants/{merchantId}/webhooks/{webhookId}"); $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); - } /**