diff --git a/src/services/balancePlatform/accountHoldersApi.ts b/src/services/balancePlatform/accountHoldersApi.ts index 2e1a9e645..b61a5aba1 100644 --- a/src/services/balancePlatform/accountHoldersApi.ts +++ b/src/services/balancePlatform/accountHoldersApi.ts @@ -16,6 +16,7 @@ import { AccountHolderUpdateRequest, GetTaxFormResponse, PaginatedBalanceAccountsResponse, + RestServiceError, TransactionRulesResponse, ObjectSerializer } from "../../typings/balancePlatform/models"; @@ -121,7 +122,7 @@ export class AccountHoldersApi extends Service { * @param year {@link number } The tax year in YYYY format for the tax form you want to retrieve * @return {@link GetTaxFormResponse } */ - public async getTaxForm(id: string, formType?: "US1099k" | "US1099nec", year?: number, requestOptions?: IRequest.Options): Promise { + public async getTaxForm(id: string, formType?: 'US1099k' | 'US1099nec', year?: number, requestOptions?: IRequest.Options): Promise { const endpoint = `${this.baseUrl}/accountHolders/{id}/taxForms` .replace("{" + "id" + "}", encodeURIComponent(String(id))); const resource = new Resource(this, endpoint); diff --git a/src/services/balancePlatform/balanceAccountsApi.ts b/src/services/balancePlatform/balanceAccountsApi.ts index 1c4c09c34..3d8249f10 100644 --- a/src/services/balancePlatform/balanceAccountsApi.ts +++ b/src/services/balancePlatform/balanceAccountsApi.ts @@ -17,6 +17,7 @@ import { BalanceSweepConfigurationsResponse, CreateSweepConfigurationV2, PaginatedPaymentInstrumentsResponse, + RestServiceError, SweepConfigurationV2, TransactionRulesResponse, UpdateSweepConfigurationV2, diff --git a/src/services/balancePlatform/bankAccountValidationApi.ts b/src/services/balancePlatform/bankAccountValidationApi.ts index cb5f174f8..e58593d70 100644 --- a/src/services/balancePlatform/bankAccountValidationApi.ts +++ b/src/services/balancePlatform/bankAccountValidationApi.ts @@ -12,6 +12,7 @@ import Service from "../../service"; import Client from "../../client"; import { BankAccountIdentificationValidationRequest, + RestServiceError, ObjectSerializer } from "../../typings/balancePlatform/models"; import { IRequest } from "../../typings/requestOptions"; diff --git a/src/services/balancePlatform/cardOrdersApi.ts b/src/services/balancePlatform/cardOrdersApi.ts index cb95622e0..990c03d5c 100644 --- a/src/services/balancePlatform/cardOrdersApi.ts +++ b/src/services/balancePlatform/cardOrdersApi.ts @@ -13,6 +13,7 @@ import Client from "../../client"; import { PaginatedGetCardOrderItemResponse, PaginatedGetCardOrderResponse, + RestServiceError, ObjectSerializer } from "../../typings/balancePlatform/models"; import { IRequest } from "../../typings/requestOptions"; diff --git a/src/services/balancePlatform/grantAccountsApi.ts b/src/services/balancePlatform/grantAccountsApi.ts index c798c5604..c07dca090 100644 --- a/src/services/balancePlatform/grantAccountsApi.ts +++ b/src/services/balancePlatform/grantAccountsApi.ts @@ -12,6 +12,7 @@ import Service from "../../service"; import Client from "../../client"; import { CapitalGrantAccount, + RestServiceError, ObjectSerializer } from "../../typings/balancePlatform/models"; import { IRequest } from "../../typings/requestOptions"; diff --git a/src/services/balancePlatform/grantOffersApi.ts b/src/services/balancePlatform/grantOffersApi.ts index ee20a2a26..b9c440f72 100644 --- a/src/services/balancePlatform/grantOffersApi.ts +++ b/src/services/balancePlatform/grantOffersApi.ts @@ -13,6 +13,7 @@ import Client from "../../client"; import { GrantOffer, GrantOffers, + RestServiceError, ObjectSerializer } from "../../typings/balancePlatform/models"; import { IRequest } from "../../typings/requestOptions"; diff --git a/src/services/balancePlatform/manageCardPINApi.ts b/src/services/balancePlatform/manageCardPINApi.ts index d550c4ece..c94f194b0 100644 --- a/src/services/balancePlatform/manageCardPINApi.ts +++ b/src/services/balancePlatform/manageCardPINApi.ts @@ -14,6 +14,7 @@ import { PinChangeRequest, PinChangeResponse, PublicKeyResponse, + RestServiceError, RevealPinRequest, RevealPinResponse, ObjectSerializer diff --git a/src/services/balancePlatform/manageSCADevicesApi.ts b/src/services/balancePlatform/manageSCADevicesApi.ts index a84457a3b..064461398 100644 --- a/src/services/balancePlatform/manageSCADevicesApi.ts +++ b/src/services/balancePlatform/manageSCADevicesApi.ts @@ -18,6 +18,7 @@ import { RegisterSCAFinalResponse, RegisterSCARequest, RegisterSCAResponse, + RestServiceError, SearchRegisteredDevicesResponse, ObjectSerializer } from "../../typings/balancePlatform/models"; diff --git a/src/services/balancePlatform/networkTokensApi.ts b/src/services/balancePlatform/networkTokensApi.ts index b30105e81..8620e5b5a 100644 --- a/src/services/balancePlatform/networkTokensApi.ts +++ b/src/services/balancePlatform/networkTokensApi.ts @@ -12,6 +12,7 @@ import Service from "../../service"; import Client from "../../client"; import { GetNetworkTokenResponse, + RestServiceError, UpdateNetworkTokenRequest, ObjectSerializer } from "../../typings/balancePlatform/models"; diff --git a/src/services/balancePlatform/paymentInstrumentGroupsApi.ts b/src/services/balancePlatform/paymentInstrumentGroupsApi.ts index 934568c13..603d1b874 100644 --- a/src/services/balancePlatform/paymentInstrumentGroupsApi.ts +++ b/src/services/balancePlatform/paymentInstrumentGroupsApi.ts @@ -13,6 +13,7 @@ import Client from "../../client"; import { PaymentInstrumentGroup, PaymentInstrumentGroupInfo, + RestServiceError, TransactionRulesResponse, ObjectSerializer } from "../../typings/balancePlatform/models"; diff --git a/src/services/balancePlatform/paymentInstrumentsApi.ts b/src/services/balancePlatform/paymentInstrumentsApi.ts index 9f9a68fea..78536c29c 100644 --- a/src/services/balancePlatform/paymentInstrumentsApi.ts +++ b/src/services/balancePlatform/paymentInstrumentsApi.ts @@ -18,6 +18,7 @@ import { PaymentInstrumentRevealRequest, PaymentInstrumentRevealResponse, PaymentInstrumentUpdateRequest, + RestServiceError, TransactionRulesResponse, UpdatePaymentInstrument, ObjectSerializer diff --git a/src/services/balancePlatform/platformApi.ts b/src/services/balancePlatform/platformApi.ts index 0b4128ab8..7f909fc60 100644 --- a/src/services/balancePlatform/platformApi.ts +++ b/src/services/balancePlatform/platformApi.ts @@ -13,6 +13,7 @@ import Client from "../../client"; import { BalancePlatform, PaginatedAccountHoldersResponse, + RestServiceError, TransactionRulesResponse, ObjectSerializer } from "../../typings/balancePlatform/models"; diff --git a/src/services/balancePlatform/transactionRulesApi.ts b/src/services/balancePlatform/transactionRulesApi.ts index b76f5687c..2a0cf66a5 100644 --- a/src/services/balancePlatform/transactionRulesApi.ts +++ b/src/services/balancePlatform/transactionRulesApi.ts @@ -10,7 +10,8 @@ import getJsonResponse from "../../helpers/getJsonResponse"; import Service from "../../service"; import Client from "../../client"; -import { +import { + RestServiceError, TransactionRule, TransactionRuleInfo, TransactionRuleResponse, diff --git a/src/services/balancePlatform/transferRoutesApi.ts b/src/services/balancePlatform/transferRoutesApi.ts index 8121a3ab6..585e29eaa 100644 --- a/src/services/balancePlatform/transferRoutesApi.ts +++ b/src/services/balancePlatform/transferRoutesApi.ts @@ -10,7 +10,8 @@ import getJsonResponse from "../../helpers/getJsonResponse"; import Service from "../../service"; import Client from "../../client"; -import { +import { + RestServiceError, TransferRouteRequest, TransferRouteResponse, ObjectSerializer diff --git a/src/services/binLookupApi.ts b/src/services/binLookupApi.ts index e65887989..f5ae3df91 100644 --- a/src/services/binLookupApi.ts +++ b/src/services/binLookupApi.ts @@ -12,6 +12,7 @@ import getJsonResponse from "../helpers/getJsonResponse"; import Service from "../service"; import { CostEstimateRequest } from "../typings/binLookup/models"; import { CostEstimateResponse } from "../typings/binLookup/models"; +import { ServiceError } from "../typings/binLookup/models"; import { ThreeDSAvailabilityRequest } from "../typings/binLookup/models"; import { ThreeDSAvailabilityResponse } from "../typings/binLookup/models"; import { IRequest } from "../typings/requestOptions"; diff --git a/src/services/checkout/donationsApi.ts b/src/services/checkout/donationsApi.ts index b85b89a07..e53db3720 100644 --- a/src/services/checkout/donationsApi.ts +++ b/src/services/checkout/donationsApi.ts @@ -15,6 +15,7 @@ import { DonationCampaignsResponse, DonationPaymentRequest, DonationPaymentResponse, + ServiceError, ObjectSerializer } from "../../typings/checkout/models"; import { IRequest } from "../../typings/requestOptions"; diff --git a/src/services/checkout/modificationsApi.ts b/src/services/checkout/modificationsApi.ts index 1b79c9297..ac7d1e267 100644 --- a/src/services/checkout/modificationsApi.ts +++ b/src/services/checkout/modificationsApi.ts @@ -21,6 +21,7 @@ import { PaymentRefundResponse, PaymentReversalRequest, PaymentReversalResponse, + ServiceError, StandalonePaymentCancelRequest, StandalonePaymentCancelResponse, ObjectSerializer diff --git a/src/services/checkout/ordersApi.ts b/src/services/checkout/ordersApi.ts index 530fc30a1..4ae182408 100644 --- a/src/services/checkout/ordersApi.ts +++ b/src/services/checkout/ordersApi.ts @@ -17,6 +17,7 @@ import { CancelOrderResponse, CreateOrderRequest, CreateOrderResponse, + ServiceError, ObjectSerializer } from "../../typings/checkout/models"; import { IRequest } from "../../typings/requestOptions"; diff --git a/src/services/checkout/paymentLinksApi.ts b/src/services/checkout/paymentLinksApi.ts index 6fcad85cf..548d781a8 100644 --- a/src/services/checkout/paymentLinksApi.ts +++ b/src/services/checkout/paymentLinksApi.ts @@ -13,6 +13,7 @@ import Client from "../../client"; import { PaymentLinkRequest, PaymentLinkResponse, + ServiceError, UpdatePaymentLinkRequest, ObjectSerializer } from "../../typings/checkout/models"; diff --git a/src/services/checkout/paymentsApi.ts b/src/services/checkout/paymentsApi.ts index 57e2fb3f6..bd6850aca 100644 --- a/src/services/checkout/paymentsApi.ts +++ b/src/services/checkout/paymentsApi.ts @@ -21,6 +21,7 @@ import { PaymentMethodsResponse, PaymentRequest, PaymentResponse, + ServiceError, SessionResultResponse, ObjectSerializer } from "../../typings/checkout/models"; diff --git a/src/services/checkout/utilityApi.ts b/src/services/checkout/utilityApi.ts index 95a0582aa..156549273 100644 --- a/src/services/checkout/utilityApi.ts +++ b/src/services/checkout/utilityApi.ts @@ -15,6 +15,7 @@ import { ApplePaySessionResponse, PaypalUpdateOrderRequest, PaypalUpdateOrderResponse, + ServiceError, UtilityRequest, UtilityResponse, ObjectSerializer diff --git a/src/services/legalEntityManagement/businessLinesApi.ts b/src/services/legalEntityManagement/businessLinesApi.ts index 45ce6adaa..6c7796f6f 100644 --- a/src/services/legalEntityManagement/businessLinesApi.ts +++ b/src/services/legalEntityManagement/businessLinesApi.ts @@ -14,6 +14,7 @@ import { BusinessLine, BusinessLineInfo, BusinessLineInfoUpdate, + ServiceError, ObjectSerializer } from "../../typings/legalEntityManagement/models"; import { IRequest } from "../../typings/requestOptions"; diff --git a/src/services/legalEntityManagement/documentsApi.ts b/src/services/legalEntityManagement/documentsApi.ts index dbd3cb953..3a25c7d8a 100644 --- a/src/services/legalEntityManagement/documentsApi.ts +++ b/src/services/legalEntityManagement/documentsApi.ts @@ -12,6 +12,7 @@ import Service from "../../service"; import Client from "../../client"; import { Document, + ServiceError, ObjectSerializer } from "../../typings/legalEntityManagement/models"; import { IRequest } from "../../typings/requestOptions"; diff --git a/src/services/legalEntityManagement/hostedOnboardingApi.ts b/src/services/legalEntityManagement/hostedOnboardingApi.ts index a217be595..8467218db 100644 --- a/src/services/legalEntityManagement/hostedOnboardingApi.ts +++ b/src/services/legalEntityManagement/hostedOnboardingApi.ts @@ -15,6 +15,7 @@ import { OnboardingLinkInfo, OnboardingTheme, OnboardingThemes, + ServiceError, ObjectSerializer } from "../../typings/legalEntityManagement/models"; import { IRequest } from "../../typings/requestOptions"; diff --git a/src/services/legalEntityManagement/legalEntitiesApi.ts b/src/services/legalEntityManagement/legalEntitiesApi.ts index 1fc9b48e3..fb12a96a2 100644 --- a/src/services/legalEntityManagement/legalEntitiesApi.ts +++ b/src/services/legalEntityManagement/legalEntitiesApi.ts @@ -16,6 +16,7 @@ import { LegalEntity, LegalEntityInfo, LegalEntityInfoRequiredType, + ServiceError, VerificationErrors, ObjectSerializer } from "../../typings/legalEntityManagement/models"; diff --git a/src/services/legalEntityManagement/pCIQuestionnairesApi.ts b/src/services/legalEntityManagement/pCIQuestionnairesApi.ts index 82dd39283..e04ff6f70 100644 --- a/src/services/legalEntityManagement/pCIQuestionnairesApi.ts +++ b/src/services/legalEntityManagement/pCIQuestionnairesApi.ts @@ -19,6 +19,7 @@ import { GetPciQuestionnaireResponse, PciSigningRequest, PciSigningResponse, + ServiceError, ObjectSerializer } from "../../typings/legalEntityManagement/models"; import { IRequest } from "../../typings/requestOptions"; diff --git a/src/services/legalEntityManagement/taxEDeliveryConsentApi.ts b/src/services/legalEntityManagement/taxEDeliveryConsentApi.ts index 8dc4a1011..288149b2e 100644 --- a/src/services/legalEntityManagement/taxEDeliveryConsentApi.ts +++ b/src/services/legalEntityManagement/taxEDeliveryConsentApi.ts @@ -12,6 +12,7 @@ import Service from "../../service"; import Client from "../../client"; import { CheckTaxElectronicDeliveryConsentResponse, + ServiceError, SetTaxElectronicDeliveryConsentRequest, ObjectSerializer } from "../../typings/legalEntityManagement/models"; diff --git a/src/services/legalEntityManagement/termsOfServiceApi.ts b/src/services/legalEntityManagement/termsOfServiceApi.ts index 38d4df809..102d9ba26 100644 --- a/src/services/legalEntityManagement/termsOfServiceApi.ts +++ b/src/services/legalEntityManagement/termsOfServiceApi.ts @@ -18,6 +18,7 @@ import { GetTermsOfServiceAcceptanceInfosResponse, GetTermsOfServiceDocumentRequest, GetTermsOfServiceDocumentResponse, + ServiceError, ObjectSerializer } from "../../typings/legalEntityManagement/models"; import { IRequest } from "../../typings/requestOptions"; diff --git a/src/services/legalEntityManagement/transferInstrumentsApi.ts b/src/services/legalEntityManagement/transferInstrumentsApi.ts index 8e58ae184..7f6073adf 100644 --- a/src/services/legalEntityManagement/transferInstrumentsApi.ts +++ b/src/services/legalEntityManagement/transferInstrumentsApi.ts @@ -10,7 +10,8 @@ import getJsonResponse from "../../helpers/getJsonResponse"; import Service from "../../service"; import Client from "../../client"; -import { +import { + ServiceError, TransferInstrument, TransferInstrumentInfo, ObjectSerializer diff --git a/src/services/management/aPICredentialsCompanyLevelApi.ts b/src/services/management/aPICredentialsCompanyLevelApi.ts index 2822cbbce..9bdb6cb02 100644 --- a/src/services/management/aPICredentialsCompanyLevelApi.ts +++ b/src/services/management/aPICredentialsCompanyLevelApi.ts @@ -15,6 +15,7 @@ import { CreateCompanyApiCredentialRequest, CreateCompanyApiCredentialResponse, ListCompanyApiCredentialsResponse, + RestServiceError, UpdateCompanyApiCredentialRequest, ObjectSerializer } from "../../typings/management/models"; diff --git a/src/services/management/aPICredentialsMerchantLevelApi.ts b/src/services/management/aPICredentialsMerchantLevelApi.ts index 6dccd370c..86830c0d6 100644 --- a/src/services/management/aPICredentialsMerchantLevelApi.ts +++ b/src/services/management/aPICredentialsMerchantLevelApi.ts @@ -15,6 +15,7 @@ import { CreateApiCredentialResponse, CreateMerchantApiCredentialRequest, ListMerchantApiCredentialsResponse, + RestServiceError, UpdateMerchantApiCredentialRequest, ObjectSerializer } from "../../typings/management/models"; diff --git a/src/services/management/aPIKeyCompanyLevelApi.ts b/src/services/management/aPIKeyCompanyLevelApi.ts index c8a128d6e..0a1070979 100644 --- a/src/services/management/aPIKeyCompanyLevelApi.ts +++ b/src/services/management/aPIKeyCompanyLevelApi.ts @@ -12,6 +12,7 @@ import Service from "../../service"; import Client from "../../client"; import { GenerateApiKeyResponse, + RestServiceError, ObjectSerializer } from "../../typings/management/models"; import { IRequest } from "../../typings/requestOptions"; diff --git a/src/services/management/aPIKeyMerchantLevelApi.ts b/src/services/management/aPIKeyMerchantLevelApi.ts index a1f23dd3a..6b8740ab2 100644 --- a/src/services/management/aPIKeyMerchantLevelApi.ts +++ b/src/services/management/aPIKeyMerchantLevelApi.ts @@ -12,6 +12,7 @@ import Service from "../../service"; import Client from "../../client"; import { GenerateApiKeyResponse, + RestServiceError, ObjectSerializer } from "../../typings/management/models"; import { IRequest } from "../../typings/requestOptions"; diff --git a/src/services/management/accountCompanyLevelApi.ts b/src/services/management/accountCompanyLevelApi.ts index 21d1c5c42..1caa3bc7e 100644 --- a/src/services/management/accountCompanyLevelApi.ts +++ b/src/services/management/accountCompanyLevelApi.ts @@ -14,6 +14,7 @@ import { Company, ListCompanyResponse, ListMerchantResponse, + RestServiceError, ObjectSerializer } from "../../typings/management/models"; import { IRequest } from "../../typings/requestOptions"; diff --git a/src/services/management/accountMerchantLevelApi.ts b/src/services/management/accountMerchantLevelApi.ts index f8a1dee7d..3bd650245 100644 --- a/src/services/management/accountMerchantLevelApi.ts +++ b/src/services/management/accountMerchantLevelApi.ts @@ -16,6 +16,7 @@ import { ListMerchantResponse, Merchant, RequestActivationResponse, + RestServiceError, ObjectSerializer } from "../../typings/management/models"; import { IRequest } from "../../typings/requestOptions"; diff --git a/src/services/management/accountStoreLevelApi.ts b/src/services/management/accountStoreLevelApi.ts index 545afe5eb..b3d6c4d8c 100644 --- a/src/services/management/accountStoreLevelApi.ts +++ b/src/services/management/accountStoreLevelApi.ts @@ -12,6 +12,7 @@ import Service from "../../service"; import Client from "../../client"; import { ListStoresResponse, + RestServiceError, Store, StoreCreationRequest, StoreCreationWithMerchantCodeRequest, diff --git a/src/services/management/allowedOriginsCompanyLevelApi.ts b/src/services/management/allowedOriginsCompanyLevelApi.ts index 46489f6f5..cd220b1b6 100644 --- a/src/services/management/allowedOriginsCompanyLevelApi.ts +++ b/src/services/management/allowedOriginsCompanyLevelApi.ts @@ -13,6 +13,7 @@ import Client from "../../client"; import { AllowedOrigin, AllowedOriginsResponse, + RestServiceError, ObjectSerializer } from "../../typings/management/models"; import { IRequest } from "../../typings/requestOptions"; diff --git a/src/services/management/allowedOriginsMerchantLevelApi.ts b/src/services/management/allowedOriginsMerchantLevelApi.ts index be538d69b..c26620af1 100644 --- a/src/services/management/allowedOriginsMerchantLevelApi.ts +++ b/src/services/management/allowedOriginsMerchantLevelApi.ts @@ -13,6 +13,7 @@ import Client from "../../client"; import { AllowedOrigin, AllowedOriginsResponse, + RestServiceError, ObjectSerializer } from "../../typings/management/models"; import { IRequest } from "../../typings/requestOptions"; diff --git a/src/services/management/androidFilesCompanyLevelApi.ts b/src/services/management/androidFilesCompanyLevelApi.ts index b2c6ac73b..cb47700f1 100644 --- a/src/services/management/androidFilesCompanyLevelApi.ts +++ b/src/services/management/androidFilesCompanyLevelApi.ts @@ -15,6 +15,7 @@ import { AndroidAppsResponse, AndroidCertificatesResponse, ReprocessAndroidAppResponse, + RestServiceError, UploadAndroidAppResponse, UploadAndroidCertificateResponse, ObjectSerializer diff --git a/src/services/management/clientKeyCompanyLevelApi.ts b/src/services/management/clientKeyCompanyLevelApi.ts index ac6dd07b4..3369429bb 100644 --- a/src/services/management/clientKeyCompanyLevelApi.ts +++ b/src/services/management/clientKeyCompanyLevelApi.ts @@ -12,6 +12,7 @@ import Service from "../../service"; import Client from "../../client"; import { GenerateClientKeyResponse, + RestServiceError, ObjectSerializer } from "../../typings/management/models"; import { IRequest } from "../../typings/requestOptions"; diff --git a/src/services/management/clientKeyMerchantLevelApi.ts b/src/services/management/clientKeyMerchantLevelApi.ts index 4e4f9c4a0..eb2c13d28 100644 --- a/src/services/management/clientKeyMerchantLevelApi.ts +++ b/src/services/management/clientKeyMerchantLevelApi.ts @@ -12,6 +12,7 @@ import Service from "../../service"; import Client from "../../client"; import { GenerateClientKeyResponse, + RestServiceError, ObjectSerializer } from "../../typings/management/models"; import { IRequest } from "../../typings/requestOptions"; diff --git a/src/services/management/myAPICredentialApi.ts b/src/services/management/myAPICredentialApi.ts index e01f51baa..4d80fd02f 100644 --- a/src/services/management/myAPICredentialApi.ts +++ b/src/services/management/myAPICredentialApi.ts @@ -16,6 +16,7 @@ import { CreateAllowedOriginRequest, GenerateClientKeyResponse, MeApiCredential, + RestServiceError, ObjectSerializer } from "../../typings/management/models"; import { IRequest } from "../../typings/requestOptions"; diff --git a/src/services/management/paymentMethodsMerchantLevelApi.ts b/src/services/management/paymentMethodsMerchantLevelApi.ts index 210b8134f..4953f5af4 100644 --- a/src/services/management/paymentMethodsMerchantLevelApi.ts +++ b/src/services/management/paymentMethodsMerchantLevelApi.ts @@ -15,6 +15,7 @@ import { PaymentMethod, PaymentMethodResponse, PaymentMethodSetupInfo, + RestServiceError, UpdatePaymentMethodInfo, ObjectSerializer } from "../../typings/management/models"; diff --git a/src/services/management/payoutSettingsMerchantLevelApi.ts b/src/services/management/payoutSettingsMerchantLevelApi.ts index 6574022ee..b70bce7f8 100644 --- a/src/services/management/payoutSettingsMerchantLevelApi.ts +++ b/src/services/management/payoutSettingsMerchantLevelApi.ts @@ -14,6 +14,7 @@ import { PayoutSettings, PayoutSettingsRequest, PayoutSettingsResponse, + RestServiceError, UpdatePayoutSettingsRequest, ObjectSerializer } from "../../typings/management/models"; diff --git a/src/services/management/splitConfigurationMerchantLevelApi.ts b/src/services/management/splitConfigurationMerchantLevelApi.ts index 202d77de0..a266ee9be 100644 --- a/src/services/management/splitConfigurationMerchantLevelApi.ts +++ b/src/services/management/splitConfigurationMerchantLevelApi.ts @@ -10,7 +10,8 @@ import getJsonResponse from "../../helpers/getJsonResponse"; import Service from "../../service"; import Client from "../../client"; -import { +import { + RestServiceError, SplitConfiguration, SplitConfigurationList, SplitConfigurationRule, diff --git a/src/services/management/terminalActionsCompanyLevelApi.ts b/src/services/management/terminalActionsCompanyLevelApi.ts index ff1903e73..5cdad0cac 100644 --- a/src/services/management/terminalActionsCompanyLevelApi.ts +++ b/src/services/management/terminalActionsCompanyLevelApi.ts @@ -13,6 +13,7 @@ import Client from "../../client"; import { ExternalTerminalAction, ListExternalTerminalActionsResponse, + RestServiceError, ObjectSerializer } from "../../typings/management/models"; import { IRequest } from "../../typings/requestOptions"; diff --git a/src/services/management/terminalActionsTerminalLevelApi.ts b/src/services/management/terminalActionsTerminalLevelApi.ts index b9e729cf2..783686fe0 100644 --- a/src/services/management/terminalActionsTerminalLevelApi.ts +++ b/src/services/management/terminalActionsTerminalLevelApi.ts @@ -10,7 +10,8 @@ import getJsonResponse from "../../helpers/getJsonResponse"; import Service from "../../service"; import Client from "../../client"; -import { +import { + RestServiceError, ScheduleTerminalActionsRequest, ScheduleTerminalActionsResponse, ObjectSerializer diff --git a/src/services/management/terminalOrdersCompanyLevelApi.ts b/src/services/management/terminalOrdersCompanyLevelApi.ts index f444bb764..6b353199d 100644 --- a/src/services/management/terminalOrdersCompanyLevelApi.ts +++ b/src/services/management/terminalOrdersCompanyLevelApi.ts @@ -12,6 +12,7 @@ import Service from "../../service"; import Client from "../../client"; import { BillingEntitiesResponse, + RestServiceError, ShippingLocation, ShippingLocationsResponse, TerminalModelsResponse, diff --git a/src/services/management/terminalOrdersMerchantLevelApi.ts b/src/services/management/terminalOrdersMerchantLevelApi.ts index 06e39cea5..6caf70726 100644 --- a/src/services/management/terminalOrdersMerchantLevelApi.ts +++ b/src/services/management/terminalOrdersMerchantLevelApi.ts @@ -12,6 +12,7 @@ import Service from "../../service"; import Client from "../../client"; import { BillingEntitiesResponse, + RestServiceError, ShippingLocation, ShippingLocationsResponse, TerminalModelsResponse, diff --git a/src/services/management/terminalSettingsCompanyLevelApi.ts b/src/services/management/terminalSettingsCompanyLevelApi.ts index e56221a1e..5fb48db84 100644 --- a/src/services/management/terminalSettingsCompanyLevelApi.ts +++ b/src/services/management/terminalSettingsCompanyLevelApi.ts @@ -12,6 +12,7 @@ import Service from "../../service"; import Client from "../../client"; import { Logo, + RestServiceError, TerminalSettings, ObjectSerializer } from "../../typings/management/models"; diff --git a/src/services/management/terminalSettingsMerchantLevelApi.ts b/src/services/management/terminalSettingsMerchantLevelApi.ts index 6c41e12fd..cf97028e8 100644 --- a/src/services/management/terminalSettingsMerchantLevelApi.ts +++ b/src/services/management/terminalSettingsMerchantLevelApi.ts @@ -12,6 +12,7 @@ import Service from "../../service"; import Client from "../../client"; import { Logo, + RestServiceError, TerminalSettings, ObjectSerializer } from "../../typings/management/models"; diff --git a/src/services/management/terminalSettingsStoreLevelApi.ts b/src/services/management/terminalSettingsStoreLevelApi.ts index 89b2f4373..7f8711311 100644 --- a/src/services/management/terminalSettingsStoreLevelApi.ts +++ b/src/services/management/terminalSettingsStoreLevelApi.ts @@ -12,6 +12,7 @@ import Service from "../../service"; import Client from "../../client"; import { Logo, + RestServiceError, TerminalSettings, ObjectSerializer } from "../../typings/management/models"; diff --git a/src/services/management/terminalSettingsTerminalLevelApi.ts b/src/services/management/terminalSettingsTerminalLevelApi.ts index 1893a17c6..0e706e759 100644 --- a/src/services/management/terminalSettingsTerminalLevelApi.ts +++ b/src/services/management/terminalSettingsTerminalLevelApi.ts @@ -12,6 +12,7 @@ import Service from "../../service"; import Client from "../../client"; import { Logo, + RestServiceError, TerminalSettings, ObjectSerializer } from "../../typings/management/models"; diff --git a/src/services/management/terminalsTerminalLevelApi.ts b/src/services/management/terminalsTerminalLevelApi.ts index c0ef8f83f..b230c217b 100644 --- a/src/services/management/terminalsTerminalLevelApi.ts +++ b/src/services/management/terminalsTerminalLevelApi.ts @@ -12,6 +12,7 @@ import Service from "../../service"; import Client from "../../client"; import { ListTerminalsResponse, + RestServiceError, TerminalReassignmentRequest, ObjectSerializer } from "../../typings/management/models"; diff --git a/src/services/management/usersCompanyLevelApi.ts b/src/services/management/usersCompanyLevelApi.ts index 9af238a0a..55f9a62c4 100644 --- a/src/services/management/usersCompanyLevelApi.ts +++ b/src/services/management/usersCompanyLevelApi.ts @@ -15,6 +15,7 @@ import { CreateCompanyUserRequest, CreateCompanyUserResponse, ListCompanyUsersResponse, + RestServiceError, UpdateCompanyUserRequest, ObjectSerializer } from "../../typings/management/models"; diff --git a/src/services/management/usersMerchantLevelApi.ts b/src/services/management/usersMerchantLevelApi.ts index 7726040e5..ebb82d2bc 100644 --- a/src/services/management/usersMerchantLevelApi.ts +++ b/src/services/management/usersMerchantLevelApi.ts @@ -14,6 +14,7 @@ import { CreateMerchantUserRequest, CreateUserResponse, ListMerchantUsersResponse, + RestServiceError, UpdateMerchantUserRequest, User, ObjectSerializer diff --git a/src/services/management/webhooksCompanyLevelApi.ts b/src/services/management/webhooksCompanyLevelApi.ts index 802aebf34..c3c85c61d 100644 --- a/src/services/management/webhooksCompanyLevelApi.ts +++ b/src/services/management/webhooksCompanyLevelApi.ts @@ -14,6 +14,7 @@ import { CreateCompanyWebhookRequest, GenerateHmacKeyResponse, ListWebhooksResponse, + RestServiceError, TestCompanyWebhookRequest, TestWebhookResponse, UpdateCompanyWebhookRequest, diff --git a/src/services/management/webhooksMerchantLevelApi.ts b/src/services/management/webhooksMerchantLevelApi.ts index e41f15630..9b0b2dc52 100644 --- a/src/services/management/webhooksMerchantLevelApi.ts +++ b/src/services/management/webhooksMerchantLevelApi.ts @@ -14,6 +14,7 @@ import { CreateMerchantWebhookRequest, GenerateHmacKeyResponse, ListWebhooksResponse, + RestServiceError, TestWebhookRequest, TestWebhookResponse, UpdateMerchantWebhookRequest, diff --git a/src/services/payout/initializationApi.ts b/src/services/payout/initializationApi.ts index 03fce51d8..d4441c599 100644 --- a/src/services/payout/initializationApi.ts +++ b/src/services/payout/initializationApi.ts @@ -10,7 +10,8 @@ import getJsonResponse from "../../helpers/getJsonResponse"; import Service from "../../service"; import Client from "../../client"; -import { +import { + ServiceError, StoreDetailAndSubmitRequest, StoreDetailAndSubmitResponse, StoreDetailRequest, diff --git a/src/services/payout/instantPayoutsApi.ts b/src/services/payout/instantPayoutsApi.ts index 421a4147f..2b58a4edd 100644 --- a/src/services/payout/instantPayoutsApi.ts +++ b/src/services/payout/instantPayoutsApi.ts @@ -13,6 +13,7 @@ import Client from "../../client"; import { PayoutRequest, PayoutResponse, + ServiceError, ObjectSerializer } from "../../typings/payout/models"; import { IRequest } from "../../typings/requestOptions"; diff --git a/src/services/payout/reviewingApi.ts b/src/services/payout/reviewingApi.ts index a5e014232..e1903496a 100644 --- a/src/services/payout/reviewingApi.ts +++ b/src/services/payout/reviewingApi.ts @@ -13,6 +13,7 @@ import Client from "../../client"; import { ModifyRequest, ModifyResponse, + ServiceError, ObjectSerializer } from "../../typings/payout/models"; import { IRequest } from "../../typings/requestOptions"; diff --git a/src/services/sessionAuthentication/index.ts b/src/services/sessionAuthentication/index.ts new file mode 100644 index 000000000..9aea09860 --- /dev/null +++ b/src/services/sessionAuthentication/index.ts @@ -0,0 +1,24 @@ +/* + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { SessionAuthenticationApi } from "./sessionAuthenticationApi"; + +import Service from "../../service"; +import Client from "../../client"; + +export default class SessionAuthenticationAPI extends Service { + + public constructor(client: Client) { + super(client); + } + + public get SessionAuthenticationApi() { + return new SessionAuthenticationApi(this.client); + } +} diff --git a/src/services/sessionAuthentication/sessionAuthenticationApi.ts b/src/services/sessionAuthentication/sessionAuthenticationApi.ts new file mode 100644 index 000000000..070d0cfed --- /dev/null +++ b/src/services/sessionAuthentication/sessionAuthenticationApi.ts @@ -0,0 +1,49 @@ +/* + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import getJsonResponse from "../../helpers/getJsonResponse"; +import Service from "../../service"; +import Client from "../../client"; +import { + AuthenticationSessionRequest, + AuthenticationSessionResponse, + DefaultErrorResponseEntity, + ObjectSerializer +} from "../../typings/sessionAuthentication/models"; +import { IRequest } from "../../typings/requestOptions"; +import Resource from "../resource"; + +export class SessionAuthenticationApi extends Service { + + private readonly API_BASEPATH: string = "https://test.adyen.com/authe/api/v1"; + private baseUrl: string; + + public constructor(client: Client){ + super(client); + this.baseUrl = this.createBaseUrl(this.API_BASEPATH); + } + + /** + * @summary Create a session token + * @param authenticationSessionRequest {@link AuthenticationSessionRequest } + * @param requestOptions {@link IRequest.Options } + * @return {@link AuthenticationSessionResponse } + */ + public async createAuthenticationSession(authenticationSessionRequest: AuthenticationSessionRequest, requestOptions?: IRequest.Options): Promise { + const endpoint = `${this.baseUrl}/sessions`; + const resource = new Resource(this, endpoint); + const request: AuthenticationSessionRequest = ObjectSerializer.serialize(authenticationSessionRequest, "AuthenticationSessionRequest"); + const response = await getJsonResponse( + resource, + request, + { ...requestOptions, method: "POST" } + ); + return ObjectSerializer.deserialize(response, "AuthenticationSessionResponse"); + } +} diff --git a/src/services/transfers/capitalApi.ts b/src/services/transfers/capitalApi.ts index acdd72b3a..ef8b82891 100644 --- a/src/services/transfers/capitalApi.ts +++ b/src/services/transfers/capitalApi.ts @@ -14,6 +14,7 @@ import { CapitalGrant, CapitalGrantInfo, CapitalGrants, + RestServiceError, ObjectSerializer } from "../../typings/transfers/models"; import { IRequest } from "../../typings/requestOptions"; diff --git a/src/services/transfers/transactionsApi.ts b/src/services/transfers/transactionsApi.ts index 3146cedb6..18a397b64 100644 --- a/src/services/transfers/transactionsApi.ts +++ b/src/services/transfers/transactionsApi.ts @@ -10,7 +10,8 @@ import getJsonResponse from "../../helpers/getJsonResponse"; import Service from "../../service"; import Client from "../../client"; -import { +import { + RestServiceError, Transaction, TransactionSearchResponse, ObjectSerializer diff --git a/src/services/transfers/transfersApi.ts b/src/services/transfers/transfersApi.ts index 1d51f9e68..1a6bcea2e 100644 --- a/src/services/transfers/transfersApi.ts +++ b/src/services/transfers/transfersApi.ts @@ -16,9 +16,11 @@ import { FindTransfersResponse, ReturnTransferRequest, ReturnTransferResponse, + ServiceError, Transfer, TransferData, TransferInfo, + TransferServiceRestServiceError, ObjectSerializer } from "../../typings/transfers/models"; import { IRequest } from "../../typings/requestOptions"; @@ -81,7 +83,7 @@ export class TransfersApi extends Service { * @param limit {@link number } The number of items returned per page, maximum of 100 items. By default, the response returns 10 items per page. * @return {@link FindTransfersResponse } */ - public async getAllTransfers(balancePlatform?: string, accountHolderId?: string, balanceAccountId?: string, paymentInstrumentId?: string, reference?: string, category?: "bank" | "card" | "grants" | "internal" | "issuedCard" | "migration" | "platformPayment" | "topUp" | "upgrade", createdSince?: Date, createdUntil?: Date, cursor?: string, limit?: number, requestOptions?: IRequest.Options): Promise { + public async getAllTransfers(balancePlatform?: string, accountHolderId?: string, balanceAccountId?: string, paymentInstrumentId?: string, reference?: string, category?: 'bank' | 'card' | 'grants' | 'internal' | 'issuedCard' | 'migration' | 'platformPayment' | 'topUp' | 'upgrade', createdSince?: Date, createdUntil?: Date, cursor?: string, limit?: number, requestOptions?: IRequest.Options): Promise { const endpoint = `${this.baseUrl}/transfers`; const resource = new Resource(this, endpoint); const hasDefinedQueryParams = balancePlatform ?? accountHolderId ?? balanceAccountId ?? paymentInstrumentId ?? reference ?? category ?? createdSince ?? createdUntil ?? cursor ?? limit; diff --git a/src/typings/acsWebhooks/authenticationDecision.ts b/src/typings/acsWebhooks/authenticationDecision.ts new file mode 100644 index 000000000..20750aa7b --- /dev/null +++ b/src/typings/acsWebhooks/authenticationDecision.ts @@ -0,0 +1,36 @@ +/* + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + + +export class AuthenticationDecision { + /** + * The status of the authentication. Possible values: * **refused** * **proceed** For more information, refer to [Authenticate cardholders using the Authentication SDK](https://docs.adyen.com/issuing/3d-secure/oob-auth-sdk/authenticate-cardholders/). + */ + 'status': AuthenticationDecision.StatusEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "status", + "baseName": "status", + "type": "AuthenticationDecision.StatusEnum" + } ]; + + static getAttributeTypeMap() { + return AuthenticationDecision.attributeTypeMap; + } +} + +export namespace AuthenticationDecision { + export enum StatusEnum { + Proceed = 'proceed', + Refused = 'refused' + } +} diff --git a/src/typings/acsWebhooks/authenticationInfo.ts b/src/typings/acsWebhooks/authenticationInfo.ts index 87ca26a44..30374fff3 100644 --- a/src/typings/acsWebhooks/authenticationInfo.ts +++ b/src/typings/acsWebhooks/authenticationInfo.ts @@ -14,7 +14,7 @@ export class AuthenticationInfo { * Universally unique transaction identifier assigned by the Access Control Server (ACS) to identify a single transaction. */ 'acsTransId': string; - 'challenge'?: ChallengeInfo | null; + 'challenge'?: ChallengeInfo; /** * Specifies a preference for receiving a challenge. Possible values: * **01**: No preference * **02**: No challenge requested * **03**: Challenge requested (preference) * **04**: Challenge requested (mandate) * **05**: No challenge requested (transactional risk analysis is already performed) * **07**: No challenge requested (SCA is already performed) * **08**: No challenge requested (trusted beneficiaries exemption of no challenge required) * **09**: Challenge requested (trusted beneficiaries prompt requested if challenge required) * **80**: No challenge requested (secure corporate payment with Mastercard) * **82**: No challenge requested (secure corporate payment with Visa) */ @@ -79,7 +79,7 @@ export class AuthenticationInfo { { "name": "challenge", "baseName": "challenge", - "type": "ChallengeInfo | null" + "type": "ChallengeInfo" }, { "name": "challengeIndicator", @@ -154,81 +154,81 @@ export class AuthenticationInfo { export namespace AuthenticationInfo { export enum ChallengeIndicatorEnum { - _01 = '01', - _02 = '02', - _03 = '03', - _04 = '04', - _05 = '05', - _07 = '07', - _08 = '08', - _09 = '09', - _80 = '80', - _82 = '82' + _01 = '01', + _02 = '02', + _03 = '03', + _04 = '04', + _05 = '05', + _07 = '07', + _08 = '08', + _09 = '09', + _80 = '80', + _82 = '82' } export enum DeviceChannelEnum { - App = 'app', - Browser = 'browser', - ThreeDsRequestorInitiated = 'ThreeDSRequestorInitiated' + App = 'app', + Browser = 'browser', + ThreeDsRequestorInitiated = 'ThreeDSRequestorInitiated' } export enum ExemptionIndicatorEnum { - LowValue = 'lowValue', - SecureCorporate = 'secureCorporate', - TrustedBeneficiary = 'trustedBeneficiary', - TransactionRiskAnalysis = 'transactionRiskAnalysis', - AcquirerExemption = 'acquirerExemption', - NoExemptionApplied = 'noExemptionApplied', - VisaDafExemption = 'visaDAFExemption' + LowValue = 'lowValue', + SecureCorporate = 'secureCorporate', + TrustedBeneficiary = 'trustedBeneficiary', + TransactionRiskAnalysis = 'transactionRiskAnalysis', + AcquirerExemption = 'acquirerExemption', + NoExemptionApplied = 'noExemptionApplied', + VisaDafExemption = 'visaDAFExemption' } export enum MessageCategoryEnum { - Payment = 'payment', - NonPayment = 'nonPayment' + Payment = 'payment', + NonPayment = 'nonPayment' } export enum TransStatusEnum { - Y = 'Y', - N = 'N', - R = 'R', - I = 'I', - U = 'U' + Y = 'Y', + N = 'N', + R = 'R', + I = 'I', + U = 'U' } export enum TransStatusReasonEnum { - _01 = '01', - _02 = '02', - _03 = '03', - _04 = '04', - _05 = '05', - _06 = '06', - _07 = '07', - _08 = '08', - _09 = '09', - _10 = '10', - _11 = '11', - _12 = '12', - _13 = '13', - _14 = '14', - _15 = '15', - _16 = '16', - _17 = '17', - _18 = '18', - _19 = '19', - _20 = '20', - _21 = '21', - _22 = '22', - _23 = '23', - _24 = '24', - _25 = '25', - _26 = '26', - _80 = '80', - _81 = '81', - _82 = '82', - _83 = '83', - _84 = '84', - _85 = '85', - _86 = '86', - _87 = '87', - _88 = '88' + _01 = '01', + _02 = '02', + _03 = '03', + _04 = '04', + _05 = '05', + _06 = '06', + _07 = '07', + _08 = '08', + _09 = '09', + _10 = '10', + _11 = '11', + _12 = '12', + _13 = '13', + _14 = '14', + _15 = '15', + _16 = '16', + _17 = '17', + _18 = '18', + _19 = '19', + _20 = '20', + _21 = '21', + _22 = '22', + _23 = '23', + _24 = '24', + _25 = '25', + _26 = '26', + _80 = '80', + _81 = '81', + _82 = '82', + _83 = '83', + _84 = '84', + _85 = '85', + _86 = '86', + _87 = '87', + _88 = '88' } export enum TypeEnum { - Frictionless = 'frictionless', - Challenge = 'challenge' + Frictionless = 'frictionless', + Challenge = 'challenge' } } diff --git a/src/typings/acsWebhooks/authenticationNotificationData.ts b/src/typings/acsWebhooks/authenticationNotificationData.ts index bcb308566..2dcdae72c 100644 --- a/src/typings/acsWebhooks/authenticationNotificationData.ts +++ b/src/typings/acsWebhooks/authenticationNotificationData.ts @@ -71,8 +71,8 @@ export class AuthenticationNotificationData { export namespace AuthenticationNotificationData { export enum StatusEnum { - Authenticated = 'authenticated', - Rejected = 'rejected', - Error = 'error' + Authenticated = 'authenticated', + Rejected = 'rejected', + Error = 'error' } } diff --git a/src/typings/acsWebhooks/authenticationNotificationRequest.ts b/src/typings/acsWebhooks/authenticationNotificationRequest.ts index 1964b4d29..6950afe66 100644 --- a/src/typings/acsWebhooks/authenticationNotificationRequest.ts +++ b/src/typings/acsWebhooks/authenticationNotificationRequest.ts @@ -55,6 +55,6 @@ export class AuthenticationNotificationRequest { export namespace AuthenticationNotificationRequest { export enum TypeEnum { - BalancePlatformAuthenticationCreated = 'balancePlatform.authentication.created' + BalancePlatformAuthenticationCreated = 'balancePlatform.authentication.created' } } diff --git a/src/typings/acsWebhooks/challengeInfo.ts b/src/typings/acsWebhooks/challengeInfo.ts index 6e57c8019..896619c77 100644 --- a/src/typings/acsWebhooks/challengeInfo.ts +++ b/src/typings/acsWebhooks/challengeInfo.ts @@ -75,18 +75,18 @@ export class ChallengeInfo { export namespace ChallengeInfo { export enum ChallengeCancelEnum { - _00 = '00', - _01 = '01', - _02 = '02', - _03 = '03', - _04 = '04', - _05 = '05', - _06 = '06', - _07 = '07', - _08 = '08' + _00 = '00', + _01 = '01', + _02 = '02', + _03 = '03', + _04 = '04', + _05 = '05', + _06 = '06', + _07 = '07', + _08 = '08' } export enum FlowEnum { - OtpSms = 'OTP_SMS', - Oob = 'OOB' + OtpSms = 'OTP_SMS', + Oob = 'OOB' } } diff --git a/src/typings/acsWebhooks/models.ts b/src/typings/acsWebhooks/models.ts index 0fc14398c..52138a36f 100644 --- a/src/typings/acsWebhooks/models.ts +++ b/src/typings/acsWebhooks/models.ts @@ -1,31 +1,45 @@ -/* - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - +import localVarRequest from 'request'; export * from './amount'; +export * from './authenticationDecision'; export * from './authenticationInfo'; export * from './authenticationNotificationData'; export * from './authenticationNotificationRequest'; export * from './balancePlatformNotificationResponse'; export * from './challengeInfo'; +export * from './purchase'; export * from './purchaseInfo'; +export * from './relayedAuthenticationRequest'; +export * from './relayedAuthenticationResponse'; export * from './resource'; +export * from './serviceError'; + +import * as fs from 'fs'; + +export interface RequestDetailedFile { + value: Buffer; + options?: { + filename?: string; + contentType?: string; + } +} + +export type RequestFile = string | Buffer | fs.ReadStream | RequestDetailedFile; import { Amount } from './amount'; +import { AuthenticationDecision } from './authenticationDecision'; import { AuthenticationInfo } from './authenticationInfo'; import { AuthenticationNotificationData } from './authenticationNotificationData'; import { AuthenticationNotificationRequest } from './authenticationNotificationRequest'; import { BalancePlatformNotificationResponse } from './balancePlatformNotificationResponse'; import { ChallengeInfo } from './challengeInfo'; +import { Purchase } from './purchase'; import { PurchaseInfo } from './purchaseInfo'; +import { RelayedAuthenticationRequest } from './relayedAuthenticationRequest'; +import { RelayedAuthenticationResponse } from './relayedAuthenticationResponse'; import { Resource } from './resource'; +import { ServiceError } from './serviceError'; /* tslint:disable:no-unused-variable */ let primitives = [ @@ -40,6 +54,7 @@ let primitives = [ ]; let enumsMap: {[index: string]: any} = { + "AuthenticationDecision.StatusEnum": AuthenticationDecision.StatusEnum, "AuthenticationInfo.ChallengeIndicatorEnum": AuthenticationInfo.ChallengeIndicatorEnum, "AuthenticationInfo.DeviceChannelEnum": AuthenticationInfo.DeviceChannelEnum, "AuthenticationInfo.ExemptionIndicatorEnum": AuthenticationInfo.ExemptionIndicatorEnum, @@ -55,15 +70,37 @@ let enumsMap: {[index: string]: any} = { let typeMap: {[index: string]: any} = { "Amount": Amount, + "AuthenticationDecision": AuthenticationDecision, "AuthenticationInfo": AuthenticationInfo, "AuthenticationNotificationData": AuthenticationNotificationData, "AuthenticationNotificationRequest": AuthenticationNotificationRequest, "BalancePlatformNotificationResponse": BalancePlatformNotificationResponse, "ChallengeInfo": ChallengeInfo, + "Purchase": Purchase, "PurchaseInfo": PurchaseInfo, + "RelayedAuthenticationRequest": RelayedAuthenticationRequest, + "RelayedAuthenticationResponse": RelayedAuthenticationResponse, "Resource": Resource, + "ServiceError": ServiceError, } +// Check if a string starts with another string without using es6 features +function startsWith(str: string, match: string): boolean { + return str.substring(0, match.length) === match; +} + +// Check if a string ends with another string without using es6 features +function endsWith(str: string, match: string): boolean { + return str.length >= match.length && str.substring(str.length - match.length) === match; +} + +const nullableSuffix = " | null"; +const optionalSuffix = " | undefined"; +const arrayPrefix = "Array<"; +const arraySuffix = ">"; +const mapPrefix = "{ [key: string]: "; +const mapSuffix = "; }"; + export class ObjectSerializer { public static findCorrectType(data: any, expectedType: string) { if (data == undefined) { @@ -100,25 +137,37 @@ export class ObjectSerializer { } } - public static serialize(data: any, type: string) { + public static serialize(data: any, type: string): any { if (data == undefined) { return data; } else if (primitives.indexOf(type.toLowerCase()) !== -1) { return data; - } else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6 - let subType: string = type.replace("Array<", ""); // Array => Type> - subType = subType.substring(0, subType.length - 1); // Type> => Type + } else if (endsWith(type, nullableSuffix)) { + let subType: string = type.slice(0, -nullableSuffix.length); // Type | null => Type + return ObjectSerializer.serialize(data, subType); + } else if (endsWith(type, optionalSuffix)) { + let subType: string = type.slice(0, -optionalSuffix.length); // Type | undefined => Type + return ObjectSerializer.serialize(data, subType); + } else if (startsWith(type, arrayPrefix)) { + let subType: string = type.slice(arrayPrefix.length, -arraySuffix.length); // Array => Type let transformedData: any[] = []; for (let index = 0; index < data.length; index++) { let datum = data[index]; transformedData.push(ObjectSerializer.serialize(datum, subType)); } return transformedData; + } else if (startsWith(type, mapPrefix)) { + let subType: string = type.slice(mapPrefix.length, -mapSuffix.length); // { [key: string]: Type; } => Type + let transformedData: { [key: string]: any } = {}; + for (let key in data) { + transformedData[key] = ObjectSerializer.serialize( + data[key], + subType, + ); + } + return transformedData; } else if (type === "Date") { return data.toISOString(); - } else if (type === "SaleToAcquirerData") { - const dataString = JSON.stringify(data); - return Buffer.from(dataString).toString("base64"); } else { if (enumsMap[type]) { return data; @@ -141,22 +190,37 @@ export class ObjectSerializer { } } - public static deserialize(data: any, type: string) { + public static deserialize(data: any, type: string): any { // polymorphism may change the actual type. type = ObjectSerializer.findCorrectType(data, type); if (data == undefined) { return data; } else if (primitives.indexOf(type.toLowerCase()) !== -1) { return data; - } else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6 - let subType: string = type.replace("Array<", ""); // Array => Type> - subType = subType.substring(0, subType.length - 1); // Type> => Type + } else if (endsWith(type, nullableSuffix)) { + let subType: string = type.slice(0, -nullableSuffix.length); // Type | null => Type + return ObjectSerializer.deserialize(data, subType); + } else if (endsWith(type, optionalSuffix)) { + let subType: string = type.slice(0, -optionalSuffix.length); // Type | undefined => Type + return ObjectSerializer.deserialize(data, subType); + } else if (startsWith(type, arrayPrefix)) { + let subType: string = type.slice(arrayPrefix.length, -arraySuffix.length); // Array => Type let transformedData: any[] = []; for (let index = 0; index < data.length; index++) { let datum = data[index]; transformedData.push(ObjectSerializer.deserialize(datum, subType)); } return transformedData; + } else if (startsWith(type, mapPrefix)) { + let subType: string = type.slice(mapPrefix.length, -mapSuffix.length); // { [key: string]: Type; } => Type + let transformedData: { [key: string]: any } = {}; + for (let key in data) { + transformedData[key] = ObjectSerializer.deserialize( + data[key], + subType, + ); + } + return transformedData; } else if (type === "Date") { return new Date(data); } else { @@ -177,3 +241,77 @@ export class ObjectSerializer { } } } + +export interface Authentication { + /** + * Apply authentication settings to header and query params. + */ + applyToRequest(requestOptions: localVarRequest.Options): Promise | void; +} + +export class HttpBasicAuth implements Authentication { + public username: string = ''; + public password: string = ''; + + applyToRequest(requestOptions: localVarRequest.Options): void { + requestOptions.auth = { + username: this.username, password: this.password + } + } +} + +export class HttpBearerAuth implements Authentication { + public accessToken: string | (() => string) = ''; + + applyToRequest(requestOptions: localVarRequest.Options): void { + if (requestOptions && requestOptions.headers) { + const accessToken = typeof this.accessToken === 'function' + ? this.accessToken() + : this.accessToken; + requestOptions.headers["Authorization"] = "Bearer " + accessToken; + } + } +} + +export class ApiKeyAuth implements Authentication { + public apiKey: string = ''; + + constructor(private location: string, private paramName: string) { + } + + applyToRequest(requestOptions: localVarRequest.Options): void { + if (this.location == "query") { + (requestOptions.qs)[this.paramName] = this.apiKey; + } else if (this.location == "header" && requestOptions && requestOptions.headers) { + requestOptions.headers[this.paramName] = this.apiKey; + } else if (this.location == 'cookie' && requestOptions && requestOptions.headers) { + if (requestOptions.headers['Cookie']) { + requestOptions.headers['Cookie'] += '; ' + this.paramName + '=' + encodeURIComponent(this.apiKey); + } + else { + requestOptions.headers['Cookie'] = this.paramName + '=' + encodeURIComponent(this.apiKey); + } + } + } +} + +export class OAuth implements Authentication { + public accessToken: string = ''; + + applyToRequest(requestOptions: localVarRequest.Options): void { + if (requestOptions && requestOptions.headers) { + requestOptions.headers["Authorization"] = "Bearer " + this.accessToken; + } + } +} + +export class VoidAuth implements Authentication { + public username: string = ''; + public password: string = ''; + + applyToRequest(_: localVarRequest.Options): void { + // Do nothing + } +} + +export type Interceptor = (requestOptions: localVarRequest.Options) => (Promise | void); diff --git a/src/typings/acsWebhooks/purchase.ts b/src/typings/acsWebhooks/purchase.ts new file mode 100644 index 000000000..4cd37a714 --- /dev/null +++ b/src/typings/acsWebhooks/purchase.ts @@ -0,0 +1,46 @@ +/* + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { Amount } from './amount'; + +export class Purchase { + /** + * The time of the purchase. + */ + 'date': Date; + /** + * The name of the merchant. + */ + 'merchantName': string; + 'originalAmount': Amount; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "date", + "baseName": "date", + "type": "Date" + }, + { + "name": "merchantName", + "baseName": "merchantName", + "type": "string" + }, + { + "name": "originalAmount", + "baseName": "originalAmount", + "type": "Amount" + } ]; + + static getAttributeTypeMap() { + return Purchase.attributeTypeMap; + } +} + diff --git a/src/typings/acsWebhooks/relayedAuthenticationRequest.ts b/src/typings/acsWebhooks/relayedAuthenticationRequest.ts new file mode 100644 index 000000000..bb4763945 --- /dev/null +++ b/src/typings/acsWebhooks/relayedAuthenticationRequest.ts @@ -0,0 +1,46 @@ +/* + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { Purchase } from './purchase'; + +export class RelayedAuthenticationRequest { + /** + * The unique identifier of the challenge. + */ + 'id': string; + /** + * The unique identifier of the [payment instrument](https://docs.adyen.com/api-explorer/balanceplatform/latest/get/paymentInstruments/_id_) used for the purchase. + */ + 'paymentInstrumentId': string; + 'purchase': Purchase; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "id", + "baseName": "id", + "type": "string" + }, + { + "name": "paymentInstrumentId", + "baseName": "paymentInstrumentId", + "type": "string" + }, + { + "name": "purchase", + "baseName": "purchase", + "type": "Purchase" + } ]; + + static getAttributeTypeMap() { + return RelayedAuthenticationRequest.attributeTypeMap; + } +} + diff --git a/src/typings/acsWebhooks/relayedAuthenticationResponse.ts b/src/typings/acsWebhooks/relayedAuthenticationResponse.ts new file mode 100644 index 000000000..eb644579c --- /dev/null +++ b/src/typings/acsWebhooks/relayedAuthenticationResponse.ts @@ -0,0 +1,28 @@ +/* + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { AuthenticationDecision } from './authenticationDecision'; + +export class RelayedAuthenticationResponse { + 'authenticationDecision': AuthenticationDecision; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "authenticationDecision", + "baseName": "authenticationDecision", + "type": "AuthenticationDecision" + } ]; + + static getAttributeTypeMap() { + return RelayedAuthenticationResponse.attributeTypeMap; + } +} + diff --git a/src/typings/acsWebhooks/serviceError.ts b/src/typings/acsWebhooks/serviceError.ts new file mode 100644 index 000000000..f372a4a4e --- /dev/null +++ b/src/typings/acsWebhooks/serviceError.ts @@ -0,0 +1,66 @@ +/* + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + + +export class ServiceError { + /** + * The error code mapped to the error message. + */ + 'errorCode'?: string; + /** + * The category of the error. + */ + 'errorType'?: string; + /** + * A short explanation of the issue. + */ + 'message'?: string; + /** + * The PSP reference of the payment. + */ + 'pspReference'?: string; + /** + * The HTTP response status. + */ + 'status'?: number; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "errorCode", + "baseName": "errorCode", + "type": "string" + }, + { + "name": "errorType", + "baseName": "errorType", + "type": "string" + }, + { + "name": "message", + "baseName": "message", + "type": "string" + }, + { + "name": "pspReference", + "baseName": "pspReference", + "type": "string" + }, + { + "name": "status", + "baseName": "status", + "type": "number" + } ]; + + static getAttributeTypeMap() { + return ServiceError.attributeTypeMap; + } +} + diff --git a/src/typings/balanceControl/amount.ts b/src/typings/balanceControl/amount.ts index 1a703c2a4..a52ca2bdb 100644 --- a/src/typings/balanceControl/amount.ts +++ b/src/typings/balanceControl/amount.ts @@ -10,11 +10,11 @@ export class Amount { /** - * The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes). + * The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes#currency-codes). */ 'currency': string; /** - * The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes). + * The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes#minor-units). */ 'value': number; diff --git a/src/typings/balanceControl/balanceTransferRequest.ts b/src/typings/balanceControl/balanceTransferRequest.ts index deebaa2f4..3f9fc8680 100644 --- a/src/typings/balanceControl/balanceTransferRequest.ts +++ b/src/typings/balanceControl/balanceTransferRequest.ts @@ -73,11 +73,11 @@ export class BalanceTransferRequest { export namespace BalanceTransferRequest { export enum TypeEnum { - Tax = 'tax', - Fee = 'fee', - TerminalSale = 'terminalSale', - Credit = 'credit', - Debit = 'debit', - Adjustment = 'adjustment' + Tax = 'tax', + Fee = 'fee', + TerminalSale = 'terminalSale', + Credit = 'credit', + Debit = 'debit', + Adjustment = 'adjustment' } } diff --git a/src/typings/balanceControl/balanceTransferResponse.ts b/src/typings/balanceControl/balanceTransferResponse.ts index 9d7c4bd4d..076f7fa47 100644 --- a/src/typings/balanceControl/balanceTransferResponse.ts +++ b/src/typings/balanceControl/balanceTransferResponse.ts @@ -100,17 +100,17 @@ export class BalanceTransferResponse { export namespace BalanceTransferResponse { export enum StatusEnum { - Error = 'error', - Failed = 'failed', - NotEnoughBalance = 'notEnoughBalance', - Transferred = 'transferred' + Error = 'error', + Failed = 'failed', + NotEnoughBalance = 'notEnoughBalance', + Transferred = 'transferred' } export enum TypeEnum { - Tax = 'tax', - Fee = 'fee', - TerminalSale = 'terminalSale', - Credit = 'credit', - Debit = 'debit', - Adjustment = 'adjustment' + Tax = 'tax', + Fee = 'fee', + TerminalSale = 'terminalSale', + Credit = 'credit', + Debit = 'debit', + Adjustment = 'adjustment' } } diff --git a/src/typings/balanceControl/models.ts b/src/typings/balanceControl/models.ts index 34d83cf95..de0b4f789 100644 --- a/src/typings/balanceControl/models.ts +++ b/src/typings/balanceControl/models.ts @@ -1,17 +1,21 @@ -/* - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - +import localVarRequest from 'request'; export * from './amount'; export * from './balanceTransferRequest'; export * from './balanceTransferResponse'; +import * as fs from 'fs'; + +export interface RequestDetailedFile { + value: Buffer; + options?: { + filename?: string; + contentType?: string; + } +} + +export type RequestFile = string | Buffer | fs.ReadStream | RequestDetailedFile; + import { Amount } from './amount'; import { BalanceTransferRequest } from './balanceTransferRequest'; @@ -41,6 +45,23 @@ let typeMap: {[index: string]: any} = { "BalanceTransferResponse": BalanceTransferResponse, } +// Check if a string starts with another string without using es6 features +function startsWith(str: string, match: string): boolean { + return str.substring(0, match.length) === match; +} + +// Check if a string ends with another string without using es6 features +function endsWith(str: string, match: string): boolean { + return str.length >= match.length && str.substring(str.length - match.length) === match; +} + +const nullableSuffix = " | null"; +const optionalSuffix = " | undefined"; +const arrayPrefix = "Array<"; +const arraySuffix = ">"; +const mapPrefix = "{ [key: string]: "; +const mapSuffix = "; }"; + export class ObjectSerializer { public static findCorrectType(data: any, expectedType: string) { if (data == undefined) { @@ -77,25 +98,37 @@ export class ObjectSerializer { } } - public static serialize(data: any, type: string) { + public static serialize(data: any, type: string): any { if (data == undefined) { return data; } else if (primitives.indexOf(type.toLowerCase()) !== -1) { return data; - } else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6 - let subType: string = type.replace("Array<", ""); // Array => Type> - subType = subType.substring(0, subType.length - 1); // Type> => Type + } else if (endsWith(type, nullableSuffix)) { + let subType: string = type.slice(0, -nullableSuffix.length); // Type | null => Type + return ObjectSerializer.serialize(data, subType); + } else if (endsWith(type, optionalSuffix)) { + let subType: string = type.slice(0, -optionalSuffix.length); // Type | undefined => Type + return ObjectSerializer.serialize(data, subType); + } else if (startsWith(type, arrayPrefix)) { + let subType: string = type.slice(arrayPrefix.length, -arraySuffix.length); // Array => Type let transformedData: any[] = []; for (let index = 0; index < data.length; index++) { let datum = data[index]; transformedData.push(ObjectSerializer.serialize(datum, subType)); } return transformedData; + } else if (startsWith(type, mapPrefix)) { + let subType: string = type.slice(mapPrefix.length, -mapSuffix.length); // { [key: string]: Type; } => Type + let transformedData: { [key: string]: any } = {}; + for (let key in data) { + transformedData[key] = ObjectSerializer.serialize( + data[key], + subType, + ); + } + return transformedData; } else if (type === "Date") { return data.toISOString(); - } else if (type === "SaleToAcquirerData") { - const dataString = JSON.stringify(data); - return Buffer.from(dataString).toString("base64"); } else { if (enumsMap[type]) { return data; @@ -118,22 +151,37 @@ export class ObjectSerializer { } } - public static deserialize(data: any, type: string) { + public static deserialize(data: any, type: string): any { // polymorphism may change the actual type. type = ObjectSerializer.findCorrectType(data, type); if (data == undefined) { return data; } else if (primitives.indexOf(type.toLowerCase()) !== -1) { return data; - } else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6 - let subType: string = type.replace("Array<", ""); // Array => Type> - subType = subType.substring(0, subType.length - 1); // Type> => Type + } else if (endsWith(type, nullableSuffix)) { + let subType: string = type.slice(0, -nullableSuffix.length); // Type | null => Type + return ObjectSerializer.deserialize(data, subType); + } else if (endsWith(type, optionalSuffix)) { + let subType: string = type.slice(0, -optionalSuffix.length); // Type | undefined => Type + return ObjectSerializer.deserialize(data, subType); + } else if (startsWith(type, arrayPrefix)) { + let subType: string = type.slice(arrayPrefix.length, -arraySuffix.length); // Array => Type let transformedData: any[] = []; for (let index = 0; index < data.length; index++) { let datum = data[index]; transformedData.push(ObjectSerializer.deserialize(datum, subType)); } return transformedData; + } else if (startsWith(type, mapPrefix)) { + let subType: string = type.slice(mapPrefix.length, -mapSuffix.length); // { [key: string]: Type; } => Type + let transformedData: { [key: string]: any } = {}; + for (let key in data) { + transformedData[key] = ObjectSerializer.deserialize( + data[key], + subType, + ); + } + return transformedData; } else if (type === "Date") { return new Date(data); } else { @@ -154,3 +202,77 @@ export class ObjectSerializer { } } } + +export interface Authentication { + /** + * Apply authentication settings to header and query params. + */ + applyToRequest(requestOptions: localVarRequest.Options): Promise | void; +} + +export class HttpBasicAuth implements Authentication { + public username: string = ''; + public password: string = ''; + + applyToRequest(requestOptions: localVarRequest.Options): void { + requestOptions.auth = { + username: this.username, password: this.password + } + } +} + +export class HttpBearerAuth implements Authentication { + public accessToken: string | (() => string) = ''; + + applyToRequest(requestOptions: localVarRequest.Options): void { + if (requestOptions && requestOptions.headers) { + const accessToken = typeof this.accessToken === 'function' + ? this.accessToken() + : this.accessToken; + requestOptions.headers["Authorization"] = "Bearer " + accessToken; + } + } +} + +export class ApiKeyAuth implements Authentication { + public apiKey: string = ''; + + constructor(private location: string, private paramName: string) { + } + + applyToRequest(requestOptions: localVarRequest.Options): void { + if (this.location == "query") { + (requestOptions.qs)[this.paramName] = this.apiKey; + } else if (this.location == "header" && requestOptions && requestOptions.headers) { + requestOptions.headers[this.paramName] = this.apiKey; + } else if (this.location == 'cookie' && requestOptions && requestOptions.headers) { + if (requestOptions.headers['Cookie']) { + requestOptions.headers['Cookie'] += '; ' + this.paramName + '=' + encodeURIComponent(this.apiKey); + } + else { + requestOptions.headers['Cookie'] = this.paramName + '=' + encodeURIComponent(this.apiKey); + } + } + } +} + +export class OAuth implements Authentication { + public accessToken: string = ''; + + applyToRequest(requestOptions: localVarRequest.Options): void { + if (requestOptions && requestOptions.headers) { + requestOptions.headers["Authorization"] = "Bearer " + this.accessToken; + } + } +} + +export class VoidAuth implements Authentication { + public username: string = ''; + public password: string = ''; + + applyToRequest(_: localVarRequest.Options): void { + // Do nothing + } +} + +export type Interceptor = (requestOptions: localVarRequest.Options) => (Promise | void); diff --git a/src/typings/balancePlatform/aULocalAccountIdentification.ts b/src/typings/balancePlatform/aULocalAccountIdentification.ts index 60c75b0f0..74dde8e3c 100644 --- a/src/typings/balancePlatform/aULocalAccountIdentification.ts +++ b/src/typings/balancePlatform/aULocalAccountIdentification.ts @@ -20,7 +20,7 @@ export class AULocalAccountIdentification { /** * **auLocal** */ - 'type': AULocalAccountIdentification.TypeEnum; + 'type': AULocalAccountIdentification.TypeEnum = AULocalAccountIdentification.TypeEnum.AuLocal; static discriminator: string | undefined = undefined; @@ -48,6 +48,6 @@ export class AULocalAccountIdentification { export namespace AULocalAccountIdentification { export enum TypeEnum { - AuLocal = 'auLocal' + AuLocal = 'auLocal' } } diff --git a/src/typings/balancePlatform/accountHolder.ts b/src/typings/balancePlatform/accountHolder.ts index e9f475128..2526ad5ac 100644 --- a/src/typings/balancePlatform/accountHolder.ts +++ b/src/typings/balancePlatform/accountHolder.ts @@ -23,7 +23,7 @@ export class AccountHolder { /** * @deprecated */ - 'contactDetails'?: ContactDetails | null; + 'contactDetails'?: ContactDetails; /** * Your description for the account holder. */ @@ -81,7 +81,7 @@ export class AccountHolder { { "name": "contactDetails", "baseName": "contactDetails", - "type": "ContactDetails | null" + "type": "ContactDetails" }, { "name": "description", @@ -141,8 +141,8 @@ export class AccountHolder { export namespace AccountHolder { export enum StatusEnum { - Active = 'active', - Closed = 'closed', - Suspended = 'suspended' + Active = 'active', + Closed = 'closed', + Suspended = 'suspended' } } diff --git a/src/typings/balancePlatform/accountHolderCapability.ts b/src/typings/balancePlatform/accountHolderCapability.ts index eaccb94ae..4496a3b55 100644 --- a/src/typings/balancePlatform/accountHolderCapability.ts +++ b/src/typings/balancePlatform/accountHolderCapability.ts @@ -20,7 +20,7 @@ export class AccountHolderCapability { * The capability level that is allowed for the account holder. Possible values: **notApplicable**, **low**, **medium**, **high**. */ 'allowedLevel'?: AccountHolderCapability.AllowedLevelEnum; - 'allowedSettings'?: CapabilitySettings | null; + 'allowedSettings'?: CapabilitySettings; /** * Indicates whether the capability is enabled. If **false**, the capability is temporarily disabled for the account holder. */ @@ -37,7 +37,7 @@ export class AccountHolderCapability { * The requested level of the capability. Some capabilities, such as those used in [card issuing](https://docs.adyen.com/issuing/add-capabilities#capability-levels), have different levels. Levels increase the capability, but also require additional checks and increased monitoring. Possible values: **notApplicable**, **low**, **medium**, **high**. */ 'requestedLevel'?: AccountHolderCapability.RequestedLevelEnum; - 'requestedSettings'?: CapabilitySettings | null; + 'requestedSettings'?: CapabilitySettings; /** * Contains the status of the transfer instruments associated with this capability. */ @@ -63,7 +63,7 @@ export class AccountHolderCapability { { "name": "allowedSettings", "baseName": "allowedSettings", - "type": "CapabilitySettings | null" + "type": "CapabilitySettings" }, { "name": "enabled", @@ -88,7 +88,7 @@ export class AccountHolderCapability { { "name": "requestedSettings", "baseName": "requestedSettings", - "type": "CapabilitySettings | null" + "type": "CapabilitySettings" }, { "name": "transferInstruments", @@ -108,21 +108,21 @@ export class AccountHolderCapability { export namespace AccountHolderCapability { export enum AllowedLevelEnum { - High = 'high', - Low = 'low', - Medium = 'medium', - NotApplicable = 'notApplicable' + High = 'high', + Low = 'low', + Medium = 'medium', + NotApplicable = 'notApplicable' } export enum RequestedLevelEnum { - High = 'high', - Low = 'low', - Medium = 'medium', - NotApplicable = 'notApplicable' + High = 'high', + Low = 'low', + Medium = 'medium', + NotApplicable = 'notApplicable' } export enum VerificationStatusEnum { - Invalid = 'invalid', - Pending = 'pending', - Rejected = 'rejected', - Valid = 'valid' + Invalid = 'invalid', + Pending = 'pending', + Rejected = 'rejected', + Valid = 'valid' } } diff --git a/src/typings/balancePlatform/accountHolderInfo.ts b/src/typings/balancePlatform/accountHolderInfo.ts index a2bfdfdb0..b6e015ccd 100644 --- a/src/typings/balancePlatform/accountHolderInfo.ts +++ b/src/typings/balancePlatform/accountHolderInfo.ts @@ -22,7 +22,7 @@ export class AccountHolderInfo { /** * @deprecated */ - 'contactDetails'?: ContactDetails | null; + 'contactDetails'?: ContactDetails; /** * Your description for the account holder. */ @@ -64,7 +64,7 @@ export class AccountHolderInfo { { "name": "contactDetails", "baseName": "contactDetails", - "type": "ContactDetails | null" + "type": "ContactDetails" }, { "name": "description", diff --git a/src/typings/balancePlatform/accountHolderUpdateRequest.ts b/src/typings/balancePlatform/accountHolderUpdateRequest.ts index 4a9c47c5e..ef867a330 100644 --- a/src/typings/balancePlatform/accountHolderUpdateRequest.ts +++ b/src/typings/balancePlatform/accountHolderUpdateRequest.ts @@ -23,7 +23,7 @@ export class AccountHolderUpdateRequest { /** * @deprecated */ - 'contactDetails'?: ContactDetails | null; + 'contactDetails'?: ContactDetails; /** * Your description for the account holder. */ @@ -73,7 +73,7 @@ export class AccountHolderUpdateRequest { { "name": "contactDetails", "baseName": "contactDetails", - "type": "ContactDetails | null" + "type": "ContactDetails" }, { "name": "description", @@ -123,8 +123,8 @@ export class AccountHolderUpdateRequest { export namespace AccountHolderUpdateRequest { export enum StatusEnum { - Active = 'active', - Closed = 'closed', - Suspended = 'suspended' + Active = 'active', + Closed = 'closed', + Suspended = 'suspended' } } diff --git a/src/typings/balancePlatform/accountSupportingEntityCapability.ts b/src/typings/balancePlatform/accountSupportingEntityCapability.ts index ce3dd89dc..8d82054e8 100644 --- a/src/typings/balancePlatform/accountSupportingEntityCapability.ts +++ b/src/typings/balancePlatform/accountSupportingEntityCapability.ts @@ -84,21 +84,21 @@ export class AccountSupportingEntityCapability { export namespace AccountSupportingEntityCapability { export enum AllowedLevelEnum { - High = 'high', - Low = 'low', - Medium = 'medium', - NotApplicable = 'notApplicable' + High = 'high', + Low = 'low', + Medium = 'medium', + NotApplicable = 'notApplicable' } export enum RequestedLevelEnum { - High = 'high', - Low = 'low', - Medium = 'medium', - NotApplicable = 'notApplicable' + High = 'high', + Low = 'low', + Medium = 'medium', + NotApplicable = 'notApplicable' } export enum VerificationStatusEnum { - Invalid = 'invalid', - Pending = 'pending', - Rejected = 'rejected', - Valid = 'valid' + Invalid = 'invalid', + Pending = 'pending', + Rejected = 'rejected', + Valid = 'valid' } } diff --git a/src/typings/balancePlatform/additionalBankIdentification.ts b/src/typings/balancePlatform/additionalBankIdentification.ts index 0d8f29932..3cb2a96d9 100644 --- a/src/typings/balancePlatform/additionalBankIdentification.ts +++ b/src/typings/balancePlatform/additionalBankIdentification.ts @@ -39,7 +39,7 @@ export class AdditionalBankIdentification { export namespace AdditionalBankIdentification { export enum TypeEnum { - GbSortCode = 'gbSortCode', - UsRoutingNumber = 'usRoutingNumber' + GbSortCode = 'gbSortCode', + UsRoutingNumber = 'usRoutingNumber' } } diff --git a/src/typings/balancePlatform/addressRequirement.ts b/src/typings/balancePlatform/addressRequirement.ts index 9885754b6..a6ac54caf 100644 --- a/src/typings/balancePlatform/addressRequirement.ts +++ b/src/typings/balancePlatform/addressRequirement.ts @@ -20,7 +20,7 @@ export class AddressRequirement { /** * **addressRequirement** */ - 'type': AddressRequirement.TypeEnum; + 'type': AddressRequirement.TypeEnum = AddressRequirement.TypeEnum.AddressRequirement; static discriminator: string | undefined = undefined; @@ -48,13 +48,13 @@ export class AddressRequirement { export namespace AddressRequirement { export enum RequiredAddressFieldsEnum { - City = 'city', - Country = 'country', - Line1 = 'line1', - PostalCode = 'postalCode', - StateOrProvince = 'stateOrProvince' + City = 'city', + Country = 'country', + Line1 = 'line1', + PostalCode = 'postalCode', + StateOrProvince = 'stateOrProvince' } export enum TypeEnum { - AddressRequirement = 'addressRequirement' + AddressRequirement = 'addressRequirement' } } diff --git a/src/typings/balancePlatform/amountMinMaxRequirement.ts b/src/typings/balancePlatform/amountMinMaxRequirement.ts index bce601d81..cd9baefb8 100644 --- a/src/typings/balancePlatform/amountMinMaxRequirement.ts +++ b/src/typings/balancePlatform/amountMinMaxRequirement.ts @@ -24,7 +24,7 @@ export class AmountMinMaxRequirement { /** * **amountMinMaxRequirement** */ - 'type': AmountMinMaxRequirement.TypeEnum; + 'type': AmountMinMaxRequirement.TypeEnum = AmountMinMaxRequirement.TypeEnum.AmountMinMaxRequirement; static discriminator: string | undefined = undefined; @@ -57,6 +57,6 @@ export class AmountMinMaxRequirement { export namespace AmountMinMaxRequirement { export enum TypeEnum { - AmountMinMaxRequirement = 'amountMinMaxRequirement' + AmountMinMaxRequirement = 'amountMinMaxRequirement' } } diff --git a/src/typings/balancePlatform/amountNonZeroDecimalsRequirement.ts b/src/typings/balancePlatform/amountNonZeroDecimalsRequirement.ts index a60c0e1f0..4e4182515 100644 --- a/src/typings/balancePlatform/amountNonZeroDecimalsRequirement.ts +++ b/src/typings/balancePlatform/amountNonZeroDecimalsRequirement.ts @@ -16,7 +16,7 @@ export class AmountNonZeroDecimalsRequirement { /** * **amountNonZeroDecimalsRequirement** */ - 'type': AmountNonZeroDecimalsRequirement.TypeEnum; + 'type': AmountNonZeroDecimalsRequirement.TypeEnum = AmountNonZeroDecimalsRequirement.TypeEnum.AmountNonZeroDecimalsRequirement; static discriminator: string | undefined = undefined; @@ -39,6 +39,6 @@ export class AmountNonZeroDecimalsRequirement { export namespace AmountNonZeroDecimalsRequirement { export enum TypeEnum { - AmountNonZeroDecimalsRequirement = 'amountNonZeroDecimalsRequirement' + AmountNonZeroDecimalsRequirement = 'amountNonZeroDecimalsRequirement' } } diff --git a/src/typings/balancePlatform/associationFinaliseRequest.ts b/src/typings/balancePlatform/associationFinaliseRequest.ts index e3c164e54..d01738a17 100644 --- a/src/typings/balancePlatform/associationFinaliseRequest.ts +++ b/src/typings/balancePlatform/associationFinaliseRequest.ts @@ -46,6 +46,6 @@ export class AssociationFinaliseRequest { export namespace AssociationFinaliseRequest { export enum TypeEnum { - PaymentInstrument = 'PaymentInstrument' + PaymentInstrument = 'PaymentInstrument' } } diff --git a/src/typings/balancePlatform/associationFinaliseResponse.ts b/src/typings/balancePlatform/associationFinaliseResponse.ts index a8ef779d4..a85f37366 100644 --- a/src/typings/balancePlatform/associationFinaliseResponse.ts +++ b/src/typings/balancePlatform/associationFinaliseResponse.ts @@ -48,6 +48,6 @@ export class AssociationFinaliseResponse { export namespace AssociationFinaliseResponse { export enum TypeEnum { - PaymentInstrument = 'PAYMENT_INSTRUMENT' + PaymentInstrument = 'PAYMENT_INSTRUMENT' } } diff --git a/src/typings/balancePlatform/associationInitiateRequest.ts b/src/typings/balancePlatform/associationInitiateRequest.ts index ac4ca497c..651c11b1c 100644 --- a/src/typings/balancePlatform/associationInitiateRequest.ts +++ b/src/typings/balancePlatform/associationInitiateRequest.ts @@ -39,6 +39,6 @@ export class AssociationInitiateRequest { export namespace AssociationInitiateRequest { export enum TypeEnum { - PaymentInstrument = 'PaymentInstrument' + PaymentInstrument = 'PaymentInstrument' } } diff --git a/src/typings/balancePlatform/authentication.ts b/src/typings/balancePlatform/authentication.ts index 843cf933c..0a6a62203 100644 --- a/src/typings/balancePlatform/authentication.ts +++ b/src/typings/balancePlatform/authentication.ts @@ -18,7 +18,7 @@ export class Authentication { * The password used for 3D Secure password-based authentication. The value must be between 1 to 30 characters and must only contain the following supported characters. * Characters between **a-z**, **A-Z**, and **0-9** * Special characters: **äöüßÄÖÜ+-*_/ç%()=?!~#\'\",;:$&àùòâôûáúó** */ 'password'?: string; - 'phone'?: Phone | null; + 'phone'?: Phone; static discriminator: string | undefined = undefined; @@ -36,7 +36,7 @@ export class Authentication { { "name": "phone", "baseName": "phone", - "type": "Phone | null" + "type": "Phone" } ]; static getAttributeTypeMap() { diff --git a/src/typings/balancePlatform/bRLocalAccountIdentification.ts b/src/typings/balancePlatform/bRLocalAccountIdentification.ts index e577aadf6..2d160d061 100644 --- a/src/typings/balancePlatform/bRLocalAccountIdentification.ts +++ b/src/typings/balancePlatform/bRLocalAccountIdentification.ts @@ -28,7 +28,7 @@ export class BRLocalAccountIdentification { /** * **brLocal** */ - 'type': BRLocalAccountIdentification.TypeEnum; + 'type': BRLocalAccountIdentification.TypeEnum = BRLocalAccountIdentification.TypeEnum.BrLocal; static discriminator: string | undefined = undefined; @@ -66,6 +66,6 @@ export class BRLocalAccountIdentification { export namespace BRLocalAccountIdentification { export enum TypeEnum { - BrLocal = 'brLocal' + BrLocal = 'brLocal' } } diff --git a/src/typings/balancePlatform/balanceAccount.ts b/src/typings/balancePlatform/balanceAccount.ts index 6fcb17368..ea874bdf0 100644 --- a/src/typings/balancePlatform/balanceAccount.ts +++ b/src/typings/balancePlatform/balanceAccount.ts @@ -39,7 +39,7 @@ export class BalanceAccount { * The unique identifier of the account of the migrated account holder in the classic integration. */ 'migratedAccountCode'?: string; - 'platformPaymentConfiguration'?: PlatformPaymentConfiguration | null; + 'platformPaymentConfiguration'?: PlatformPaymentConfiguration; /** * Your reference for the balance account, maximum 150 characters. */ @@ -94,7 +94,7 @@ export class BalanceAccount { { "name": "platformPaymentConfiguration", "baseName": "platformPaymentConfiguration", - "type": "PlatformPaymentConfiguration | null" + "type": "PlatformPaymentConfiguration" }, { "name": "reference", @@ -119,9 +119,9 @@ export class BalanceAccount { export namespace BalanceAccount { export enum StatusEnum { - Active = 'active', - Closed = 'closed', - Inactive = 'inactive', - Suspended = 'suspended' + Active = 'active', + Closed = 'closed', + Inactive = 'inactive', + Suspended = 'suspended' } } diff --git a/src/typings/balancePlatform/balanceAccountBase.ts b/src/typings/balancePlatform/balanceAccountBase.ts index 2dbccb7ce..94683189d 100644 --- a/src/typings/balancePlatform/balanceAccountBase.ts +++ b/src/typings/balancePlatform/balanceAccountBase.ts @@ -34,7 +34,7 @@ export class BalanceAccountBase { * The unique identifier of the account of the migrated account holder in the classic integration. */ 'migratedAccountCode'?: string; - 'platformPaymentConfiguration'?: PlatformPaymentConfiguration | null; + 'platformPaymentConfiguration'?: PlatformPaymentConfiguration; /** * Your reference for the balance account, maximum 150 characters. */ @@ -84,7 +84,7 @@ export class BalanceAccountBase { { "name": "platformPaymentConfiguration", "baseName": "platformPaymentConfiguration", - "type": "PlatformPaymentConfiguration | null" + "type": "PlatformPaymentConfiguration" }, { "name": "reference", @@ -109,9 +109,9 @@ export class BalanceAccountBase { export namespace BalanceAccountBase { export enum StatusEnum { - Active = 'active', - Closed = 'closed', - Inactive = 'inactive', - Suspended = 'suspended' + Active = 'active', + Closed = 'closed', + Inactive = 'inactive', + Suspended = 'suspended' } } diff --git a/src/typings/balancePlatform/balanceAccountInfo.ts b/src/typings/balancePlatform/balanceAccountInfo.ts index 59f3ad042..38096aa21 100644 --- a/src/typings/balancePlatform/balanceAccountInfo.ts +++ b/src/typings/balancePlatform/balanceAccountInfo.ts @@ -30,7 +30,7 @@ export class BalanceAccountInfo { * The unique identifier of the account of the migrated account holder in the classic integration. */ 'migratedAccountCode'?: string; - 'platformPaymentConfiguration'?: PlatformPaymentConfiguration | null; + 'platformPaymentConfiguration'?: PlatformPaymentConfiguration; /** * Your reference for the balance account, maximum 150 characters. */ @@ -71,7 +71,7 @@ export class BalanceAccountInfo { { "name": "platformPaymentConfiguration", "baseName": "platformPaymentConfiguration", - "type": "PlatformPaymentConfiguration | null" + "type": "PlatformPaymentConfiguration" }, { "name": "reference", diff --git a/src/typings/balancePlatform/balanceAccountUpdateRequest.ts b/src/typings/balancePlatform/balanceAccountUpdateRequest.ts index ddb759ffc..10b7030fb 100644 --- a/src/typings/balancePlatform/balanceAccountUpdateRequest.ts +++ b/src/typings/balancePlatform/balanceAccountUpdateRequest.ts @@ -22,7 +22,7 @@ export class BalanceAccountUpdateRequest { * A set of key and value pairs for general use. The keys do not have specific names and may be used for storing miscellaneous data as desired. > Note that during an update of metadata, the omission of existing key-value pairs will result in the deletion of those key-value pairs. */ 'metadata'?: { [key: string]: string; }; - 'platformPaymentConfiguration'?: PlatformPaymentConfiguration | null; + 'platformPaymentConfiguration'?: PlatformPaymentConfiguration; /** * Your reference to the balance account. */ @@ -57,7 +57,7 @@ export class BalanceAccountUpdateRequest { { "name": "platformPaymentConfiguration", "baseName": "platformPaymentConfiguration", - "type": "PlatformPaymentConfiguration | null" + "type": "PlatformPaymentConfiguration" }, { "name": "reference", @@ -82,9 +82,9 @@ export class BalanceAccountUpdateRequest { export namespace BalanceAccountUpdateRequest { export enum StatusEnum { - Active = 'active', - Closed = 'closed', - Inactive = 'inactive', - Suspended = 'suspended' + Active = 'active', + Closed = 'closed', + Inactive = 'inactive', + Suspended = 'suspended' } } diff --git a/src/typings/balancePlatform/bankAccount.ts b/src/typings/balancePlatform/bankAccount.ts index c2dbb54c3..06a789045 100644 --- a/src/typings/balancePlatform/bankAccount.ts +++ b/src/typings/balancePlatform/bankAccount.ts @@ -7,28 +7,10 @@ * Do not edit this class manually. */ -import { AULocalAccountIdentification } from './aULocalAccountIdentification'; -import { BRLocalAccountIdentification } from './bRLocalAccountIdentification'; -import { CALocalAccountIdentification } from './cALocalAccountIdentification'; -import { CZLocalAccountIdentification } from './cZLocalAccountIdentification'; -import { DKLocalAccountIdentification } from './dKLocalAccountIdentification'; -import { HKLocalAccountIdentification } from './hKLocalAccountIdentification'; -import { HULocalAccountIdentification } from './hULocalAccountIdentification'; -import { IbanAccountIdentification } from './ibanAccountIdentification'; -import { NOLocalAccountIdentification } from './nOLocalAccountIdentification'; -import { NZLocalAccountIdentification } from './nZLocalAccountIdentification'; -import { NumberAndBicAccountIdentification } from './numberAndBicAccountIdentification'; -import { PLLocalAccountIdentification } from './pLLocalAccountIdentification'; -import { SELocalAccountIdentification } from './sELocalAccountIdentification'; -import { SGLocalAccountIdentification } from './sGLocalAccountIdentification'; -import { UKLocalAccountIdentification } from './uKLocalAccountIdentification'; -import { USLocalAccountIdentification } from './uSLocalAccountIdentification'; +import { BankAccountAccountIdentification } from './bankAccountAccountIdentification'; export class BankAccount { - /** - * Contains the bank account details. The fields required in this object depend on the country of the bank account and the currency of the transfer. - */ - 'accountIdentification': AULocalAccountIdentification | BRLocalAccountIdentification | CALocalAccountIdentification | CZLocalAccountIdentification | DKLocalAccountIdentification | HKLocalAccountIdentification | HULocalAccountIdentification | IbanAccountIdentification | NOLocalAccountIdentification | NZLocalAccountIdentification | NumberAndBicAccountIdentification | PLLocalAccountIdentification | SELocalAccountIdentification | SGLocalAccountIdentification | UKLocalAccountIdentification | USLocalAccountIdentification; + 'accountIdentification': BankAccountAccountIdentification; static discriminator: string | undefined = undefined; @@ -36,7 +18,7 @@ export class BankAccount { { "name": "accountIdentification", "baseName": "accountIdentification", - "type": "AULocalAccountIdentification | BRLocalAccountIdentification | CALocalAccountIdentification | CZLocalAccountIdentification | DKLocalAccountIdentification | HKLocalAccountIdentification | HULocalAccountIdentification | IbanAccountIdentification | NOLocalAccountIdentification | NZLocalAccountIdentification | NumberAndBicAccountIdentification | PLLocalAccountIdentification | SELocalAccountIdentification | SGLocalAccountIdentification | UKLocalAccountIdentification | USLocalAccountIdentification" + "type": "BankAccountAccountIdentification" } ]; static getAttributeTypeMap() { diff --git a/src/typings/balancePlatform/bankAccountAccountIdentification.ts b/src/typings/balancePlatform/bankAccountAccountIdentification.ts new file mode 100644 index 000000000..5fd9f4594 --- /dev/null +++ b/src/typings/balancePlatform/bankAccountAccountIdentification.ts @@ -0,0 +1,206 @@ +/* + * The version of the OpenAPI document: v2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { AULocalAccountIdentification } from './aULocalAccountIdentification'; +import { AdditionalBankIdentification } from './additionalBankIdentification'; +import { BRLocalAccountIdentification } from './bRLocalAccountIdentification'; +import { CALocalAccountIdentification } from './cALocalAccountIdentification'; +import { CZLocalAccountIdentification } from './cZLocalAccountIdentification'; +import { DKLocalAccountIdentification } from './dKLocalAccountIdentification'; +import { HKLocalAccountIdentification } from './hKLocalAccountIdentification'; +import { HULocalAccountIdentification } from './hULocalAccountIdentification'; +import { IbanAccountIdentification } from './ibanAccountIdentification'; +import { NOLocalAccountIdentification } from './nOLocalAccountIdentification'; +import { NZLocalAccountIdentification } from './nZLocalAccountIdentification'; +import { NumberAndBicAccountIdentification } from './numberAndBicAccountIdentification'; +import { PLLocalAccountIdentification } from './pLLocalAccountIdentification'; +import { SELocalAccountIdentification } from './sELocalAccountIdentification'; +import { SGLocalAccountIdentification } from './sGLocalAccountIdentification'; +import { UKLocalAccountIdentification } from './uKLocalAccountIdentification'; +import { USLocalAccountIdentification } from './uSLocalAccountIdentification'; + +/** +* Contains the bank account details. The fields required in this object depend on the country of the bank account and the currency of the transfer. +*/ +export class BankAccountAccountIdentification { + /** + * The bank account number, without separators or whitespace. + */ + 'accountNumber': string; + /** + * The 6-digit [Bank State Branch (BSB) code](https://en.wikipedia.org/wiki/Bank_state_branch), without separators or whitespace. + */ + 'bsbCode': string; + /** + * **auLocal** + */ + 'type': BankAccountAccountIdentification.TypeEnum = BankAccountAccountIdentification.TypeEnum.AuLocal; + /** + * The 4-digit bank code (Registreringsnummer) (without separators or whitespace). + */ + 'bankCode': string; + /** + * The bank account branch number, without separators or whitespace. + */ + 'branchNumber': string; + /** + * The 8-digit ISPB, with leading zeros. + */ + 'ispb'?: string; + /** + * The bank account type. Possible values: **checking** or **savings**. Defaults to **checking**. + */ + 'accountType'?: BankAccountAccountIdentification.AccountTypeEnum = BankAccountAccountIdentification.AccountTypeEnum.Checking; + /** + * The 3-digit institution number, without separators or whitespace. + */ + 'institutionNumber': string; + /** + * The 5-digit transit number, without separators or whitespace. + */ + 'transitNumber': string; + /** + * The 3-digit clearing code, without separators or whitespace. + */ + 'clearingCode': string; + /** + * The international bank account number as defined in the [ISO-13616](https://www.iso.org/standard/81090.html) standard. + */ + 'iban': string; + 'additionalBankIdentification'?: AdditionalBankIdentification; + /** + * The bank\'s 8- or 11-character BIC or SWIFT code. + */ + 'bic': string; + /** + * The 4- to 5-digit clearing number ([Clearingnummer](https://sv.wikipedia.org/wiki/Clearingnummer)), without separators or whitespace. + */ + 'clearingNumber': string; + /** + * The 6-digit [sort code](https://en.wikipedia.org/wiki/Sort_code), without separators or whitespace. + */ + 'sortCode': string; + /** + * The 9-digit [routing number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without separators or whitespace. + */ + 'routingNumber': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "accountNumber", + "baseName": "accountNumber", + "type": "string" + }, + { + "name": "bsbCode", + "baseName": "bsbCode", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "BankAccountAccountIdentification.TypeEnum" + }, + { + "name": "bankCode", + "baseName": "bankCode", + "type": "string" + }, + { + "name": "branchNumber", + "baseName": "branchNumber", + "type": "string" + }, + { + "name": "ispb", + "baseName": "ispb", + "type": "string" + }, + { + "name": "accountType", + "baseName": "accountType", + "type": "BankAccountAccountIdentification.AccountTypeEnum" + }, + { + "name": "institutionNumber", + "baseName": "institutionNumber", + "type": "string" + }, + { + "name": "transitNumber", + "baseName": "transitNumber", + "type": "string" + }, + { + "name": "clearingCode", + "baseName": "clearingCode", + "type": "string" + }, + { + "name": "iban", + "baseName": "iban", + "type": "string" + }, + { + "name": "additionalBankIdentification", + "baseName": "additionalBankIdentification", + "type": "AdditionalBankIdentification" + }, + { + "name": "bic", + "baseName": "bic", + "type": "string" + }, + { + "name": "clearingNumber", + "baseName": "clearingNumber", + "type": "string" + }, + { + "name": "sortCode", + "baseName": "sortCode", + "type": "string" + }, + { + "name": "routingNumber", + "baseName": "routingNumber", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return BankAccountAccountIdentification.attributeTypeMap; + } +} + +export namespace BankAccountAccountIdentification { + export enum TypeEnum { + AuLocal = 'auLocal', + BrLocal = 'brLocal', + CaLocal = 'caLocal', + CzLocal = 'czLocal', + DkLocal = 'dkLocal', + HkLocal = 'hkLocal', + HuLocal = 'huLocal', + Iban = 'iban', + NoLocal = 'noLocal', + NzLocal = 'nzLocal', + NumberAndBic = 'numberAndBic', + PlLocal = 'plLocal', + SeLocal = 'seLocal', + SgLocal = 'sgLocal', + UkLocal = 'ukLocal', + UsLocal = 'usLocal' + } + export enum AccountTypeEnum { + Checking = 'checking', + Savings = 'savings' + } +} diff --git a/src/typings/balancePlatform/bankAccountDetails.ts b/src/typings/balancePlatform/bankAccountDetails.ts index bbd62559b..d205db499 100644 --- a/src/typings/balancePlatform/bankAccountDetails.ts +++ b/src/typings/balancePlatform/bankAccountDetails.ts @@ -16,7 +16,7 @@ export class BankAccountDetails { /** * The bank account type. Possible values: **checking** or **savings**. Defaults to **checking**. */ - 'accountType'?: string; + 'accountType'?: string = 'checking'; /** * The bank account branch number, without separators or whitespace */ @@ -24,7 +24,7 @@ export class BankAccountDetails { /** * Business accounts with a `formFactor` value of **physical** are business accounts issued under the central bank of that country. The default value is **physical** for NL, US, and UK business accounts. Adyen creates a local IBAN for business accounts when the `formFactor` value is set to **virtual**. The local IBANs that are supported are for DE and FR, which reference a physical NL account, with funds being routed through the central bank of NL. */ - 'formFactor'?: string; + 'formFactor'?: string = 'physical'; /** * The international bank account number as defined in the [ISO-13616](https://www.iso.org/standard/81090.html) standard. */ @@ -40,7 +40,7 @@ export class BankAccountDetails { /** * **iban** or **usLocal** or **ukLocal** */ - 'type': string; + 'type': string = 'iban'; static discriminator: string | undefined = undefined; diff --git a/src/typings/balancePlatform/bankAccountIdentificationTypeRequirement.ts b/src/typings/balancePlatform/bankAccountIdentificationTypeRequirement.ts index 1e07af742..848ea2f49 100644 --- a/src/typings/balancePlatform/bankAccountIdentificationTypeRequirement.ts +++ b/src/typings/balancePlatform/bankAccountIdentificationTypeRequirement.ts @@ -20,7 +20,7 @@ export class BankAccountIdentificationTypeRequirement { /** * **bankAccountIdentificationTypeRequirement** */ - 'type': BankAccountIdentificationTypeRequirement.TypeEnum; + 'type': BankAccountIdentificationTypeRequirement.TypeEnum = BankAccountIdentificationTypeRequirement.TypeEnum.BankAccountIdentificationTypeRequirement; static discriminator: string | undefined = undefined; @@ -48,25 +48,25 @@ export class BankAccountIdentificationTypeRequirement { export namespace BankAccountIdentificationTypeRequirement { export enum BankAccountIdentificationTypesEnum { - AuLocal = 'auLocal', - BrLocal = 'brLocal', - CaLocal = 'caLocal', - CzLocal = 'czLocal', - DkLocal = 'dkLocal', - HkLocal = 'hkLocal', - HuLocal = 'huLocal', - Iban = 'iban', - Legacy = 'legacy', - NoLocal = 'noLocal', - NumberAndBic = 'numberAndBic', - NzLocal = 'nzLocal', - PlLocal = 'plLocal', - SeLocal = 'seLocal', - SgLocal = 'sgLocal', - UkLocal = 'ukLocal', - UsLocal = 'usLocal' + AuLocal = 'auLocal', + BrLocal = 'brLocal', + CaLocal = 'caLocal', + CzLocal = 'czLocal', + DkLocal = 'dkLocal', + HkLocal = 'hkLocal', + HuLocal = 'huLocal', + Iban = 'iban', + Legacy = 'legacy', + NoLocal = 'noLocal', + NumberAndBic = 'numberAndBic', + NzLocal = 'nzLocal', + PlLocal = 'plLocal', + SeLocal = 'seLocal', + SgLocal = 'sgLocal', + UkLocal = 'ukLocal', + UsLocal = 'usLocal' } export enum TypeEnum { - BankAccountIdentificationTypeRequirement = 'bankAccountIdentificationTypeRequirement' + BankAccountIdentificationTypeRequirement = 'bankAccountIdentificationTypeRequirement' } } diff --git a/src/typings/balancePlatform/bankAccountIdentificationValidationRequest.ts b/src/typings/balancePlatform/bankAccountIdentificationValidationRequest.ts index 1962bbd42..8408f138d 100644 --- a/src/typings/balancePlatform/bankAccountIdentificationValidationRequest.ts +++ b/src/typings/balancePlatform/bankAccountIdentificationValidationRequest.ts @@ -7,28 +7,10 @@ * Do not edit this class manually. */ -import { AULocalAccountIdentification } from './aULocalAccountIdentification'; -import { BRLocalAccountIdentification } from './bRLocalAccountIdentification'; -import { CALocalAccountIdentification } from './cALocalAccountIdentification'; -import { CZLocalAccountIdentification } from './cZLocalAccountIdentification'; -import { DKLocalAccountIdentification } from './dKLocalAccountIdentification'; -import { HKLocalAccountIdentification } from './hKLocalAccountIdentification'; -import { HULocalAccountIdentification } from './hULocalAccountIdentification'; -import { IbanAccountIdentification } from './ibanAccountIdentification'; -import { NOLocalAccountIdentification } from './nOLocalAccountIdentification'; -import { NZLocalAccountIdentification } from './nZLocalAccountIdentification'; -import { NumberAndBicAccountIdentification } from './numberAndBicAccountIdentification'; -import { PLLocalAccountIdentification } from './pLLocalAccountIdentification'; -import { SELocalAccountIdentification } from './sELocalAccountIdentification'; -import { SGLocalAccountIdentification } from './sGLocalAccountIdentification'; -import { UKLocalAccountIdentification } from './uKLocalAccountIdentification'; -import { USLocalAccountIdentification } from './uSLocalAccountIdentification'; +import { BankAccountIdentificationValidationRequestAccountIdentification } from './bankAccountIdentificationValidationRequestAccountIdentification'; export class BankAccountIdentificationValidationRequest { - /** - * Bank account identification. - */ - 'accountIdentification': AULocalAccountIdentification | BRLocalAccountIdentification | CALocalAccountIdentification | CZLocalAccountIdentification | DKLocalAccountIdentification | HKLocalAccountIdentification | HULocalAccountIdentification | IbanAccountIdentification | NOLocalAccountIdentification | NZLocalAccountIdentification | NumberAndBicAccountIdentification | PLLocalAccountIdentification | SELocalAccountIdentification | SGLocalAccountIdentification | UKLocalAccountIdentification | USLocalAccountIdentification; + 'accountIdentification': BankAccountIdentificationValidationRequestAccountIdentification; static discriminator: string | undefined = undefined; @@ -36,7 +18,7 @@ export class BankAccountIdentificationValidationRequest { { "name": "accountIdentification", "baseName": "accountIdentification", - "type": "AULocalAccountIdentification | BRLocalAccountIdentification | CALocalAccountIdentification | CZLocalAccountIdentification | DKLocalAccountIdentification | HKLocalAccountIdentification | HULocalAccountIdentification | IbanAccountIdentification | NOLocalAccountIdentification | NZLocalAccountIdentification | NumberAndBicAccountIdentification | PLLocalAccountIdentification | SELocalAccountIdentification | SGLocalAccountIdentification | UKLocalAccountIdentification | USLocalAccountIdentification" + "type": "BankAccountIdentificationValidationRequestAccountIdentification" } ]; static getAttributeTypeMap() { diff --git a/src/typings/balancePlatform/bankAccountIdentificationValidationRequestAccountIdentification.ts b/src/typings/balancePlatform/bankAccountIdentificationValidationRequestAccountIdentification.ts new file mode 100644 index 000000000..3647e1988 --- /dev/null +++ b/src/typings/balancePlatform/bankAccountIdentificationValidationRequestAccountIdentification.ts @@ -0,0 +1,206 @@ +/* + * The version of the OpenAPI document: v2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { AULocalAccountIdentification } from './aULocalAccountIdentification'; +import { AdditionalBankIdentification } from './additionalBankIdentification'; +import { BRLocalAccountIdentification } from './bRLocalAccountIdentification'; +import { CALocalAccountIdentification } from './cALocalAccountIdentification'; +import { CZLocalAccountIdentification } from './cZLocalAccountIdentification'; +import { DKLocalAccountIdentification } from './dKLocalAccountIdentification'; +import { HKLocalAccountIdentification } from './hKLocalAccountIdentification'; +import { HULocalAccountIdentification } from './hULocalAccountIdentification'; +import { IbanAccountIdentification } from './ibanAccountIdentification'; +import { NOLocalAccountIdentification } from './nOLocalAccountIdentification'; +import { NZLocalAccountIdentification } from './nZLocalAccountIdentification'; +import { NumberAndBicAccountIdentification } from './numberAndBicAccountIdentification'; +import { PLLocalAccountIdentification } from './pLLocalAccountIdentification'; +import { SELocalAccountIdentification } from './sELocalAccountIdentification'; +import { SGLocalAccountIdentification } from './sGLocalAccountIdentification'; +import { UKLocalAccountIdentification } from './uKLocalAccountIdentification'; +import { USLocalAccountIdentification } from './uSLocalAccountIdentification'; + +/** +* Bank account identification. +*/ +export class BankAccountIdentificationValidationRequestAccountIdentification { + /** + * The bank account number, without separators or whitespace. + */ + 'accountNumber': string; + /** + * The 6-digit [Bank State Branch (BSB) code](https://en.wikipedia.org/wiki/Bank_state_branch), without separators or whitespace. + */ + 'bsbCode': string; + /** + * **auLocal** + */ + 'type': BankAccountIdentificationValidationRequestAccountIdentification.TypeEnum = BankAccountIdentificationValidationRequestAccountIdentification.TypeEnum.AuLocal; + /** + * The 4-digit bank code (Registreringsnummer) (without separators or whitespace). + */ + 'bankCode': string; + /** + * The bank account branch number, without separators or whitespace. + */ + 'branchNumber': string; + /** + * The 8-digit ISPB, with leading zeros. + */ + 'ispb'?: string; + /** + * The bank account type. Possible values: **checking** or **savings**. Defaults to **checking**. + */ + 'accountType'?: BankAccountIdentificationValidationRequestAccountIdentification.AccountTypeEnum = BankAccountIdentificationValidationRequestAccountIdentification.AccountTypeEnum.Checking; + /** + * The 3-digit institution number, without separators or whitespace. + */ + 'institutionNumber': string; + /** + * The 5-digit transit number, without separators or whitespace. + */ + 'transitNumber': string; + /** + * The 3-digit clearing code, without separators or whitespace. + */ + 'clearingCode': string; + /** + * The international bank account number as defined in the [ISO-13616](https://www.iso.org/standard/81090.html) standard. + */ + 'iban': string; + 'additionalBankIdentification'?: AdditionalBankIdentification; + /** + * The bank\'s 8- or 11-character BIC or SWIFT code. + */ + 'bic': string; + /** + * The 4- to 5-digit clearing number ([Clearingnummer](https://sv.wikipedia.org/wiki/Clearingnummer)), without separators or whitespace. + */ + 'clearingNumber': string; + /** + * The 6-digit [sort code](https://en.wikipedia.org/wiki/Sort_code), without separators or whitespace. + */ + 'sortCode': string; + /** + * The 9-digit [routing number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without separators or whitespace. + */ + 'routingNumber': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "accountNumber", + "baseName": "accountNumber", + "type": "string" + }, + { + "name": "bsbCode", + "baseName": "bsbCode", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "BankAccountIdentificationValidationRequestAccountIdentification.TypeEnum" + }, + { + "name": "bankCode", + "baseName": "bankCode", + "type": "string" + }, + { + "name": "branchNumber", + "baseName": "branchNumber", + "type": "string" + }, + { + "name": "ispb", + "baseName": "ispb", + "type": "string" + }, + { + "name": "accountType", + "baseName": "accountType", + "type": "BankAccountIdentificationValidationRequestAccountIdentification.AccountTypeEnum" + }, + { + "name": "institutionNumber", + "baseName": "institutionNumber", + "type": "string" + }, + { + "name": "transitNumber", + "baseName": "transitNumber", + "type": "string" + }, + { + "name": "clearingCode", + "baseName": "clearingCode", + "type": "string" + }, + { + "name": "iban", + "baseName": "iban", + "type": "string" + }, + { + "name": "additionalBankIdentification", + "baseName": "additionalBankIdentification", + "type": "AdditionalBankIdentification" + }, + { + "name": "bic", + "baseName": "bic", + "type": "string" + }, + { + "name": "clearingNumber", + "baseName": "clearingNumber", + "type": "string" + }, + { + "name": "sortCode", + "baseName": "sortCode", + "type": "string" + }, + { + "name": "routingNumber", + "baseName": "routingNumber", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return BankAccountIdentificationValidationRequestAccountIdentification.attributeTypeMap; + } +} + +export namespace BankAccountIdentificationValidationRequestAccountIdentification { + export enum TypeEnum { + AuLocal = 'auLocal', + BrLocal = 'brLocal', + CaLocal = 'caLocal', + CzLocal = 'czLocal', + DkLocal = 'dkLocal', + HkLocal = 'hkLocal', + HuLocal = 'huLocal', + Iban = 'iban', + NoLocal = 'noLocal', + NzLocal = 'nzLocal', + NumberAndBic = 'numberAndBic', + PlLocal = 'plLocal', + SeLocal = 'seLocal', + SgLocal = 'sgLocal', + UkLocal = 'ukLocal', + UsLocal = 'usLocal' + } + export enum AccountTypeEnum { + Checking = 'checking', + Savings = 'savings' + } +} diff --git a/src/typings/balancePlatform/bankAccountModel.ts b/src/typings/balancePlatform/bankAccountModel.ts index 5a63b2a36..0ad8193a5 100644 --- a/src/typings/balancePlatform/bankAccountModel.ts +++ b/src/typings/balancePlatform/bankAccountModel.ts @@ -12,7 +12,7 @@ export class BankAccountModel { /** * Business accounts with a `formFactor` value of **physical** are business accounts issued under the central bank of that country. The default value is **physical** for NL, US, and UK business accounts. Adyen creates a local IBAN for business accounts when the `formFactor` value is set to **virtual**. The local IBANs that are supported are for DE and FR, which reference a physical NL account, with funds being routed through the central bank of NL. */ - 'formFactor'?: BankAccountModel.FormFactorEnum | null; + 'formFactor'?: BankAccountModel.FormFactorEnum = BankAccountModel.FormFactorEnum.Physical; static discriminator: string | undefined = undefined; @@ -20,7 +20,7 @@ export class BankAccountModel { { "name": "formFactor", "baseName": "formFactor", - "type": "BankAccountModel.FormFactorEnum | null" + "type": "BankAccountModel.FormFactorEnum" } ]; static getAttributeTypeMap() { @@ -30,8 +30,8 @@ export class BankAccountModel { export namespace BankAccountModel { export enum FormFactorEnum { - Physical = 'physical', - Unknown = 'unknown', - Virtual = 'virtual' + Physical = 'physical', + Unknown = 'unknown', + Virtual = 'virtual' } } diff --git a/src/typings/balancePlatform/bankIdentification.ts b/src/typings/balancePlatform/bankIdentification.ts index 580bd622e..508e5f3ce 100644 --- a/src/typings/balancePlatform/bankIdentification.ts +++ b/src/typings/balancePlatform/bankIdentification.ts @@ -48,8 +48,8 @@ export class BankIdentification { export namespace BankIdentification { export enum IdentificationTypeEnum { - Iban = 'iban', - RoutingNumber = 'routingNumber', - SortCode = 'sortCode' + Iban = 'iban', + RoutingNumber = 'routingNumber', + SortCode = 'sortCode' } } diff --git a/src/typings/balancePlatform/cALocalAccountIdentification.ts b/src/typings/balancePlatform/cALocalAccountIdentification.ts index 8ac0e800e..daa9ba685 100644 --- a/src/typings/balancePlatform/cALocalAccountIdentification.ts +++ b/src/typings/balancePlatform/cALocalAccountIdentification.ts @@ -16,7 +16,7 @@ export class CALocalAccountIdentification { /** * The bank account type. Possible values: **checking** or **savings**. Defaults to **checking**. */ - 'accountType'?: CALocalAccountIdentification.AccountTypeEnum; + 'accountType'?: CALocalAccountIdentification.AccountTypeEnum = CALocalAccountIdentification.AccountTypeEnum.Checking; /** * The 3-digit institution number, without separators or whitespace. */ @@ -28,7 +28,7 @@ export class CALocalAccountIdentification { /** * **caLocal** */ - 'type': CALocalAccountIdentification.TypeEnum; + 'type': CALocalAccountIdentification.TypeEnum = CALocalAccountIdentification.TypeEnum.CaLocal; static discriminator: string | undefined = undefined; @@ -66,10 +66,10 @@ export class CALocalAccountIdentification { export namespace CALocalAccountIdentification { export enum AccountTypeEnum { - Checking = 'checking', - Savings = 'savings' + Checking = 'checking', + Savings = 'savings' } export enum TypeEnum { - CaLocal = 'caLocal' + CaLocal = 'caLocal' } } diff --git a/src/typings/balancePlatform/cZLocalAccountIdentification.ts b/src/typings/balancePlatform/cZLocalAccountIdentification.ts index b12a8cd71..bb239af94 100644 --- a/src/typings/balancePlatform/cZLocalAccountIdentification.ts +++ b/src/typings/balancePlatform/cZLocalAccountIdentification.ts @@ -20,7 +20,7 @@ export class CZLocalAccountIdentification { /** * **czLocal** */ - 'type': CZLocalAccountIdentification.TypeEnum; + 'type': CZLocalAccountIdentification.TypeEnum = CZLocalAccountIdentification.TypeEnum.CzLocal; static discriminator: string | undefined = undefined; @@ -48,6 +48,6 @@ export class CZLocalAccountIdentification { export namespace CZLocalAccountIdentification { export enum TypeEnum { - CzLocal = 'czLocal' + CzLocal = 'czLocal' } } diff --git a/src/typings/balancePlatform/capabilityProblem.ts b/src/typings/balancePlatform/capabilityProblem.ts index 41cd5fe6c..539cda4dc 100644 --- a/src/typings/balancePlatform/capabilityProblem.ts +++ b/src/typings/balancePlatform/capabilityProblem.ts @@ -11,7 +11,7 @@ import { CapabilityProblemEntity } from './capabilityProblemEntity'; import { VerificationError } from './verificationError'; export class CapabilityProblem { - 'entity'?: CapabilityProblemEntity | null; + 'entity'?: CapabilityProblemEntity; /** * Contains information about the verification error. */ @@ -23,7 +23,7 @@ export class CapabilityProblem { { "name": "entity", "baseName": "entity", - "type": "CapabilityProblemEntity | null" + "type": "CapabilityProblemEntity" }, { "name": "verificationErrors", diff --git a/src/typings/balancePlatform/capabilityProblemEntity.ts b/src/typings/balancePlatform/capabilityProblemEntity.ts index b022a757f..2b1bbadba 100644 --- a/src/typings/balancePlatform/capabilityProblemEntity.ts +++ b/src/typings/balancePlatform/capabilityProblemEntity.ts @@ -18,7 +18,7 @@ export class CapabilityProblemEntity { * The ID of the entity. */ 'id'?: string; - 'owner'?: CapabilityProblemEntityRecursive | null; + 'owner'?: CapabilityProblemEntityRecursive; /** * Type of entity. Possible values: **LegalEntity**, **BankAccount**, **Document**. */ @@ -40,7 +40,7 @@ export class CapabilityProblemEntity { { "name": "owner", "baseName": "owner", - "type": "CapabilityProblemEntityRecursive | null" + "type": "CapabilityProblemEntityRecursive" }, { "name": "type", @@ -55,8 +55,8 @@ export class CapabilityProblemEntity { export namespace CapabilityProblemEntity { export enum TypeEnum { - BankAccount = 'BankAccount', - Document = 'Document', - LegalEntity = 'LegalEntity' + BankAccount = 'BankAccount', + Document = 'Document', + LegalEntity = 'LegalEntity' } } diff --git a/src/typings/balancePlatform/capabilityProblemEntityRecursive.ts b/src/typings/balancePlatform/capabilityProblemEntityRecursive.ts index 6280b7e7b..01e787cdf 100644 --- a/src/typings/balancePlatform/capabilityProblemEntityRecursive.ts +++ b/src/typings/balancePlatform/capabilityProblemEntityRecursive.ts @@ -48,8 +48,8 @@ export class CapabilityProblemEntityRecursive { export namespace CapabilityProblemEntityRecursive { export enum TypeEnum { - BankAccount = 'BankAccount', - Document = 'Document', - LegalEntity = 'LegalEntity' + BankAccount = 'BankAccount', + Document = 'Document', + LegalEntity = 'LegalEntity' } } diff --git a/src/typings/balancePlatform/capabilitySettings.ts b/src/typings/balancePlatform/capabilitySettings.ts index 4a1bd904a..4ca74aca7 100644 --- a/src/typings/balancePlatform/capabilitySettings.ts +++ b/src/typings/balancePlatform/capabilitySettings.ts @@ -10,11 +10,23 @@ import { Amount } from './amount'; export class CapabilitySettings { + /** + * + */ 'amountPerIndustry'?: { [key: string]: Amount; }; + /** + * + */ 'authorizedCardUsers'?: boolean; + /** + * + */ 'fundingSource'?: Array; + /** + * + */ 'interval'?: CapabilitySettings.IntervalEnum; - 'maxAmount'?: Amount | null; + 'maxAmount'?: Amount; static discriminator: string | undefined = undefined; @@ -42,7 +54,7 @@ export class CapabilitySettings { { "name": "maxAmount", "baseName": "maxAmount", - "type": "Amount | null" + "type": "Amount" } ]; static getAttributeTypeMap() { @@ -52,13 +64,13 @@ export class CapabilitySettings { export namespace CapabilitySettings { export enum FundingSourceEnum { - Credit = 'credit', - Debit = 'debit', - Prepaid = 'prepaid' + Credit = 'credit', + Debit = 'debit', + Prepaid = 'prepaid' } export enum IntervalEnum { - Daily = 'daily', - Monthly = 'monthly', - Weekly = 'weekly' + Daily = 'daily', + Monthly = 'monthly', + Weekly = 'weekly' } } diff --git a/src/typings/balancePlatform/card.ts b/src/typings/balancePlatform/card.ts index 2d386cbda..bdbc5fe76 100644 --- a/src/typings/balancePlatform/card.ts +++ b/src/typings/balancePlatform/card.ts @@ -13,7 +13,7 @@ import { DeliveryContact } from './deliveryContact'; import { Expiry } from './expiry'; export class Card { - 'authentication'?: Authentication | null; + 'authentication'?: Authentication; /** * The bank identification number (BIN) of the card number. */ @@ -30,13 +30,13 @@ export class Card { * The name of the cardholder. Maximum length: 26 characters. */ 'cardholderName': string; - 'configuration'?: CardConfiguration | null; + 'configuration'?: CardConfiguration; /** * The CVC2 value of the card. > The CVC2 is not sent by default. This is only returned in the `POST` response for single-use virtual cards. */ 'cvc'?: string; - 'deliveryContact'?: DeliveryContact | null; - 'expiration'?: Expiry | null; + 'deliveryContact'?: DeliveryContact; + 'expiration'?: Expiry; /** * The form factor of the card. Possible values: **virtual**, **physical**. */ @@ -60,7 +60,7 @@ export class Card { { "name": "authentication", "baseName": "authentication", - "type": "Authentication | null" + "type": "Authentication" }, { "name": "bin", @@ -85,7 +85,7 @@ export class Card { { "name": "configuration", "baseName": "configuration", - "type": "CardConfiguration | null" + "type": "CardConfiguration" }, { "name": "cvc", @@ -95,12 +95,12 @@ export class Card { { "name": "deliveryContact", "baseName": "deliveryContact", - "type": "DeliveryContact | null" + "type": "DeliveryContact" }, { "name": "expiration", "baseName": "expiration", - "type": "Expiry | null" + "type": "Expiry" }, { "name": "formFactor", @@ -130,8 +130,8 @@ export class Card { export namespace Card { export enum FormFactorEnum { - Physical = 'physical', - Unknown = 'unknown', - Virtual = 'virtual' + Physical = 'physical', + Unknown = 'unknown', + Virtual = 'virtual' } } diff --git a/src/typings/balancePlatform/cardConfiguration.ts b/src/typings/balancePlatform/cardConfiguration.ts index 79d7502dd..833894ecf 100644 --- a/src/typings/balancePlatform/cardConfiguration.ts +++ b/src/typings/balancePlatform/cardConfiguration.ts @@ -18,7 +18,7 @@ export class CardConfiguration { * Your app\'s URL, if you want to activate cards through your app. For example, **my-app://ref1236a7d**. A QR code is created based on this URL, and is included in the carrier. Before you use this field, reach out to your Adyen contact to set up the QR code process. Maximum length: 255 characters. */ 'activationUrl'?: string; - 'bulkAddress'?: BulkAddress | null; + 'bulkAddress'?: BulkAddress; /** * The ID of the card image. This is the image that will be printed on the full front of the card. */ @@ -80,7 +80,7 @@ export class CardConfiguration { { "name": "bulkAddress", "baseName": "bulkAddress", - "type": "BulkAddress | null" + "type": "BulkAddress" }, { "name": "cardImageId", diff --git a/src/typings/balancePlatform/cardInfo.ts b/src/typings/balancePlatform/cardInfo.ts index 26849f0d1..819d103d4 100644 --- a/src/typings/balancePlatform/cardInfo.ts +++ b/src/typings/balancePlatform/cardInfo.ts @@ -12,7 +12,7 @@ import { CardConfiguration } from './cardConfiguration'; import { DeliveryContact } from './deliveryContact'; export class CardInfo { - 'authentication'?: Authentication | null; + 'authentication'?: Authentication; /** * The brand of the physical or the virtual card. Possible values: **visa**, **mc**. */ @@ -25,8 +25,8 @@ export class CardInfo { * The name of the cardholder. Maximum length: 26 characters. */ 'cardholderName': string; - 'configuration'?: CardConfiguration | null; - 'deliveryContact'?: DeliveryContact | null; + 'configuration'?: CardConfiguration; + 'deliveryContact'?: DeliveryContact; /** * The form factor of the card. Possible values: **virtual**, **physical**. */ @@ -42,7 +42,7 @@ export class CardInfo { { "name": "authentication", "baseName": "authentication", - "type": "Authentication | null" + "type": "Authentication" }, { "name": "brand", @@ -62,12 +62,12 @@ export class CardInfo { { "name": "configuration", "baseName": "configuration", - "type": "CardConfiguration | null" + "type": "CardConfiguration" }, { "name": "deliveryContact", "baseName": "deliveryContact", - "type": "DeliveryContact | null" + "type": "DeliveryContact" }, { "name": "formFactor", @@ -87,8 +87,8 @@ export class CardInfo { export namespace CardInfo { export enum FormFactorEnum { - Physical = 'physical', - Unknown = 'unknown', - Virtual = 'virtual' + Physical = 'physical', + Unknown = 'unknown', + Virtual = 'virtual' } } diff --git a/src/typings/balancePlatform/cardOrder.ts b/src/typings/balancePlatform/cardOrder.ts index 1d499441a..e718d33eb 100644 --- a/src/typings/balancePlatform/cardOrder.ts +++ b/src/typings/balancePlatform/cardOrder.ts @@ -93,7 +93,7 @@ export class CardOrder { export namespace CardOrder { export enum StatusEnum { - Closed = 'closed', - Open = 'open' + Closed = 'closed', + Open = 'open' } } diff --git a/src/typings/balancePlatform/cardOrderItem.ts b/src/typings/balancePlatform/cardOrderItem.ts index 2d6cd1223..0cafa4c38 100644 --- a/src/typings/balancePlatform/cardOrderItem.ts +++ b/src/typings/balancePlatform/cardOrderItem.ts @@ -14,7 +14,7 @@ export class CardOrderItem { * The unique identifier of the balance platform. */ 'balancePlatform'?: string; - 'card'?: CardOrderItemDeliveryStatus | null; + 'card'?: CardOrderItemDeliveryStatus; /** * The unique identifier of the card order item. */ @@ -31,7 +31,7 @@ export class CardOrderItem { * The unique identifier of the payment instrument related to the card order item. */ 'paymentInstrumentId'?: string; - 'pin'?: CardOrderItemDeliveryStatus | null; + 'pin'?: CardOrderItemDeliveryStatus; /** * The shipping method used to deliver the card or the PIN. */ @@ -48,7 +48,7 @@ export class CardOrderItem { { "name": "card", "baseName": "card", - "type": "CardOrderItemDeliveryStatus | null" + "type": "CardOrderItemDeliveryStatus" }, { "name": "cardOrderItemId", @@ -73,7 +73,7 @@ export class CardOrderItem { { "name": "pin", "baseName": "pin", - "type": "CardOrderItemDeliveryStatus | null" + "type": "CardOrderItemDeliveryStatus" }, { "name": "shippingMethod", diff --git a/src/typings/balancePlatform/cardOrderItemDeliveryStatus.ts b/src/typings/balancePlatform/cardOrderItemDeliveryStatus.ts index fe077645f..7f780c049 100644 --- a/src/typings/balancePlatform/cardOrderItemDeliveryStatus.ts +++ b/src/typings/balancePlatform/cardOrderItemDeliveryStatus.ts @@ -48,13 +48,13 @@ export class CardOrderItemDeliveryStatus { export namespace CardOrderItemDeliveryStatus { export enum StatusEnum { - Created = 'created', - Delivered = 'delivered', - NotApplicable = 'notApplicable', - Processing = 'processing', - Produced = 'produced', - Rejected = 'rejected', - Shipped = 'shipped', - Unknown = 'unknown' + Created = 'created', + Delivered = 'delivered', + NotApplicable = 'notApplicable', + Processing = 'processing', + Produced = 'produced', + Rejected = 'rejected', + Shipped = 'shipped', + Unknown = 'unknown' } } diff --git a/src/typings/balancePlatform/counterparty.ts b/src/typings/balancePlatform/counterparty.ts index 1dfb62aea..3b0917217 100644 --- a/src/typings/balancePlatform/counterparty.ts +++ b/src/typings/balancePlatform/counterparty.ts @@ -10,7 +10,7 @@ import { BankAccount } from './bankAccount'; export class Counterparty { - 'bankAccount'?: BankAccount | null; + 'bankAccount'?: BankAccount; /** * The unique identifier of the [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id). */ @@ -22,7 +22,7 @@ export class Counterparty { { "name": "bankAccount", "baseName": "bankAccount", - "type": "BankAccount | null" + "type": "BankAccount" }, { "name": "transferInstrumentId", diff --git a/src/typings/balancePlatform/counterpartyTypesRestriction.ts b/src/typings/balancePlatform/counterpartyTypesRestriction.ts index 5f785c23d..1475ffa3f 100644 --- a/src/typings/balancePlatform/counterpartyTypesRestriction.ts +++ b/src/typings/balancePlatform/counterpartyTypesRestriction.ts @@ -39,9 +39,9 @@ export class CounterpartyTypesRestriction { export namespace CounterpartyTypesRestriction { export enum ValueEnum { - BalanceAccount = 'balanceAccount', - BankAccount = 'bankAccount', - Card = 'card', - TransferInstrument = 'transferInstrument' + BalanceAccount = 'balanceAccount', + BankAccount = 'bankAccount', + Card = 'card', + TransferInstrument = 'transferInstrument' } } diff --git a/src/typings/balancePlatform/createSweepConfigurationV2.ts b/src/typings/balancePlatform/createSweepConfigurationV2.ts index 26953e1c0..f725ae647 100644 --- a/src/typings/balancePlatform/createSweepConfigurationV2.ts +++ b/src/typings/balancePlatform/createSweepConfigurationV2.ts @@ -50,13 +50,13 @@ export class CreateSweepConfigurationV2 { * The status of the sweep. If not provided, by default, this is set to **active**. Possible values: * **active**: the sweep is enabled and funds will be pulled in or pushed out based on the defined configuration. * **inactive**: the sweep is disabled and cannot be triggered. */ 'status'?: CreateSweepConfigurationV2.StatusEnum; - 'sweepAmount'?: Amount | null; - 'targetAmount'?: Amount | null; - 'triggerAmount'?: Amount | null; + 'sweepAmount'?: Amount; + 'targetAmount'?: Amount; + 'triggerAmount'?: Amount; /** * The direction of sweep, whether pushing out or pulling in funds to the balance account. If not provided, by default, this is set to **push**. Possible values: * **push**: _push out funds_ to a destination balance account or transfer instrument. * **pull**: _pull in funds_ from a source merchant account, transfer instrument, or balance account. */ - 'type'?: CreateSweepConfigurationV2.TypeEnum; + 'type'?: CreateSweepConfigurationV2.TypeEnum = CreateSweepConfigurationV2.TypeEnum.Push; static discriminator: string | undefined = undefined; @@ -119,17 +119,17 @@ export class CreateSweepConfigurationV2 { { "name": "sweepAmount", "baseName": "sweepAmount", - "type": "Amount | null" + "type": "Amount" }, { "name": "targetAmount", "baseName": "targetAmount", - "type": "Amount | null" + "type": "Amount" }, { "name": "triggerAmount", "baseName": "triggerAmount", - "type": "Amount | null" + "type": "Amount" }, { "name": "type", @@ -144,49 +144,49 @@ export class CreateSweepConfigurationV2 { export namespace CreateSweepConfigurationV2 { export enum CategoryEnum { - Bank = 'bank', - Internal = 'internal', - PlatformPayment = 'platformPayment' + Bank = 'bank', + Internal = 'internal', + PlatformPayment = 'platformPayment' } export enum PrioritiesEnum { - CrossBorder = 'crossBorder', - Fast = 'fast', - Instant = 'instant', - Internal = 'internal', - Regular = 'regular', - Wire = 'wire' + CrossBorder = 'crossBorder', + Fast = 'fast', + Instant = 'instant', + Internal = 'internal', + Regular = 'regular', + Wire = 'wire' } export enum ReasonEnum { - AccountHierarchyNotActive = 'accountHierarchyNotActive', - AmountLimitExceeded = 'amountLimitExceeded', - Approved = 'approved', - BalanceAccountTemporarilyBlockedByTransactionRule = 'balanceAccountTemporarilyBlockedByTransactionRule', - CounterpartyAccountBlocked = 'counterpartyAccountBlocked', - CounterpartyAccountClosed = 'counterpartyAccountClosed', - CounterpartyAccountNotFound = 'counterpartyAccountNotFound', - CounterpartyAddressRequired = 'counterpartyAddressRequired', - CounterpartyBankTimedOut = 'counterpartyBankTimedOut', - CounterpartyBankUnavailable = 'counterpartyBankUnavailable', - Declined = 'declined', - DeclinedByTransactionRule = 'declinedByTransactionRule', - DirectDebitNotSupported = 'directDebitNotSupported', - Error = 'error', - NotEnoughBalance = 'notEnoughBalance', - PendingApproval = 'pendingApproval', - PendingExecution = 'pendingExecution', - RefusedByCounterpartyBank = 'refusedByCounterpartyBank', - RefusedByCustomer = 'refusedByCustomer', - RouteNotFound = 'routeNotFound', - ScaFailed = 'scaFailed', - TransferInstrumentDoesNotExist = 'transferInstrumentDoesNotExist', - Unknown = 'unknown' + AccountHierarchyNotActive = 'accountHierarchyNotActive', + AmountLimitExceeded = 'amountLimitExceeded', + Approved = 'approved', + BalanceAccountTemporarilyBlockedByTransactionRule = 'balanceAccountTemporarilyBlockedByTransactionRule', + CounterpartyAccountBlocked = 'counterpartyAccountBlocked', + CounterpartyAccountClosed = 'counterpartyAccountClosed', + CounterpartyAccountNotFound = 'counterpartyAccountNotFound', + CounterpartyAddressRequired = 'counterpartyAddressRequired', + CounterpartyBankTimedOut = 'counterpartyBankTimedOut', + CounterpartyBankUnavailable = 'counterpartyBankUnavailable', + Declined = 'declined', + DeclinedByTransactionRule = 'declinedByTransactionRule', + DirectDebitNotSupported = 'directDebitNotSupported', + Error = 'error', + NotEnoughBalance = 'notEnoughBalance', + PendingApproval = 'pendingApproval', + PendingExecution = 'pendingExecution', + RefusedByCounterpartyBank = 'refusedByCounterpartyBank', + RefusedByCustomer = 'refusedByCustomer', + RouteNotFound = 'routeNotFound', + ScaFailed = 'scaFailed', + TransferInstrumentDoesNotExist = 'transferInstrumentDoesNotExist', + Unknown = 'unknown' } export enum StatusEnum { - Active = 'active', - Inactive = 'inactive' + Active = 'active', + Inactive = 'inactive' } export enum TypeEnum { - Pull = 'pull', - Push = 'push' + Pull = 'pull', + Push = 'push' } } diff --git a/src/typings/balancePlatform/dKLocalAccountIdentification.ts b/src/typings/balancePlatform/dKLocalAccountIdentification.ts index 897a66c3f..9c8d6d653 100644 --- a/src/typings/balancePlatform/dKLocalAccountIdentification.ts +++ b/src/typings/balancePlatform/dKLocalAccountIdentification.ts @@ -20,7 +20,7 @@ export class DKLocalAccountIdentification { /** * **dkLocal** */ - 'type': DKLocalAccountIdentification.TypeEnum; + 'type': DKLocalAccountIdentification.TypeEnum = DKLocalAccountIdentification.TypeEnum.DkLocal; static discriminator: string | undefined = undefined; @@ -48,6 +48,6 @@ export class DKLocalAccountIdentification { export namespace DKLocalAccountIdentification { export enum TypeEnum { - DkLocal = 'dkLocal' + DkLocal = 'dkLocal' } } diff --git a/src/typings/balancePlatform/dayOfWeekRestriction.ts b/src/typings/balancePlatform/dayOfWeekRestriction.ts index 38e60c2fb..91106d560 100644 --- a/src/typings/balancePlatform/dayOfWeekRestriction.ts +++ b/src/typings/balancePlatform/dayOfWeekRestriction.ts @@ -39,12 +39,12 @@ export class DayOfWeekRestriction { export namespace DayOfWeekRestriction { export enum ValueEnum { - Friday = 'friday', - Monday = 'monday', - Saturday = 'saturday', - Sunday = 'sunday', - Thursday = 'thursday', - Tuesday = 'tuesday', - Wednesday = 'wednesday' + Friday = 'friday', + Monday = 'monday', + Saturday = 'saturday', + Sunday = 'sunday', + Thursday = 'thursday', + Tuesday = 'tuesday', + Wednesday = 'wednesday' } } diff --git a/src/typings/balancePlatform/deliveryContact.ts b/src/typings/balancePlatform/deliveryContact.ts index f60009f14..c01f2b4a0 100644 --- a/src/typings/balancePlatform/deliveryContact.ts +++ b/src/typings/balancePlatform/deliveryContact.ts @@ -26,7 +26,7 @@ export class DeliveryContact { */ 'fullPhoneNumber'?: string; 'name': Name; - 'phoneNumber'?: PhoneNumber | null; + 'phoneNumber'?: PhoneNumber; /** * The URL of the contact\'s website. */ @@ -63,7 +63,7 @@ export class DeliveryContact { { "name": "phoneNumber", "baseName": "phoneNumber", - "type": "PhoneNumber | null" + "type": "PhoneNumber" }, { "name": "webAddress", diff --git a/src/typings/balancePlatform/device.ts b/src/typings/balancePlatform/device.ts index eda003b62..d3da2f5fa 100644 --- a/src/typings/balancePlatform/device.ts +++ b/src/typings/balancePlatform/device.ts @@ -57,8 +57,8 @@ export class Device { export namespace Device { export enum TypeEnum { - Ios = 'ios', - Android = 'android', - Browser = 'browser' + Ios = 'ios', + Android = 'android', + Browser = 'browser' } } diff --git a/src/typings/balancePlatform/duration.ts b/src/typings/balancePlatform/duration.ts index ec83a64a6..4d7de282a 100644 --- a/src/typings/balancePlatform/duration.ts +++ b/src/typings/balancePlatform/duration.ts @@ -39,10 +39,10 @@ export class Duration { export namespace Duration { export enum UnitEnum { - Days = 'days', - Hours = 'hours', - Minutes = 'minutes', - Months = 'months', - Weeks = 'weeks' + Days = 'days', + Hours = 'hours', + Minutes = 'minutes', + Months = 'months', + Weeks = 'weeks' } } diff --git a/src/typings/balancePlatform/entryModesRestriction.ts b/src/typings/balancePlatform/entryModesRestriction.ts index f4e88deb7..567196bd8 100644 --- a/src/typings/balancePlatform/entryModesRestriction.ts +++ b/src/typings/balancePlatform/entryModesRestriction.ts @@ -39,14 +39,14 @@ export class EntryModesRestriction { export namespace EntryModesRestriction { export enum ValueEnum { - Barcode = 'barcode', - Chip = 'chip', - Cof = 'cof', - Contactless = 'contactless', - Magstripe = 'magstripe', - Manual = 'manual', - Ocr = 'ocr', - Server = 'server', - Unknown = 'unknown' + Barcode = 'barcode', + Chip = 'chip', + Cof = 'cof', + Contactless = 'contactless', + Magstripe = 'magstripe', + Manual = 'manual', + Ocr = 'ocr', + Server = 'server', + Unknown = 'unknown' } } diff --git a/src/typings/balancePlatform/getTaxFormResponse.ts b/src/typings/balancePlatform/getTaxFormResponse.ts index b055a7321..af6ea8041 100644 --- a/src/typings/balancePlatform/getTaxFormResponse.ts +++ b/src/typings/balancePlatform/getTaxFormResponse.ts @@ -39,6 +39,6 @@ export class GetTaxFormResponse { export namespace GetTaxFormResponse { export enum ContentTypeEnum { - ApplicationPdf = 'application/pdf' + ApplicationPdf = 'application/pdf' } } diff --git a/src/typings/balancePlatform/grantLimit.ts b/src/typings/balancePlatform/grantLimit.ts index 89f6908b3..aed646197 100644 --- a/src/typings/balancePlatform/grantLimit.ts +++ b/src/typings/balancePlatform/grantLimit.ts @@ -10,7 +10,7 @@ import { Amount } from './amount'; export class GrantLimit { - 'amount'?: Amount | null; + 'amount'?: Amount; static discriminator: string | undefined = undefined; @@ -18,7 +18,7 @@ export class GrantLimit { { "name": "amount", "baseName": "amount", - "type": "Amount | null" + "type": "Amount" } ]; static getAttributeTypeMap() { diff --git a/src/typings/balancePlatform/grantOffer.ts b/src/typings/balancePlatform/grantOffer.ts index 24ba1a3ee..414306011 100644 --- a/src/typings/balancePlatform/grantOffer.ts +++ b/src/typings/balancePlatform/grantOffer.ts @@ -16,7 +16,7 @@ export class GrantOffer { * The identifier of the account holder to which the grant is offered. */ 'accountHolderId': string; - 'amount'?: Amount | null; + 'amount'?: Amount; /** * The contract type of the grant offer. Possible value: **cashAdvance**, **loan**. */ @@ -25,12 +25,12 @@ export class GrantOffer { * The end date of the grant offer validity period. */ 'expiresAt'?: Date; - 'fee'?: Fee | null; + 'fee'?: Fee; /** * The unique identifier of the grant offer. */ 'id'?: string; - 'repayment'?: Repayment | null; + 'repayment'?: Repayment; /** * The starting date of the grant offer validity period. */ @@ -47,7 +47,7 @@ export class GrantOffer { { "name": "amount", "baseName": "amount", - "type": "Amount | null" + "type": "Amount" }, { "name": "contractType", @@ -62,7 +62,7 @@ export class GrantOffer { { "name": "fee", "baseName": "fee", - "type": "Fee | null" + "type": "Fee" }, { "name": "id", @@ -72,7 +72,7 @@ export class GrantOffer { { "name": "repayment", "baseName": "repayment", - "type": "Repayment | null" + "type": "Repayment" }, { "name": "startsAt", @@ -87,7 +87,7 @@ export class GrantOffer { export namespace GrantOffer { export enum ContractTypeEnum { - CashAdvance = 'cashAdvance', - Loan = 'loan' + CashAdvance = 'cashAdvance', + Loan = 'loan' } } diff --git a/src/typings/balancePlatform/hKLocalAccountIdentification.ts b/src/typings/balancePlatform/hKLocalAccountIdentification.ts index 2ace1aed9..e98720328 100644 --- a/src/typings/balancePlatform/hKLocalAccountIdentification.ts +++ b/src/typings/balancePlatform/hKLocalAccountIdentification.ts @@ -20,7 +20,7 @@ export class HKLocalAccountIdentification { /** * **hkLocal** */ - 'type': HKLocalAccountIdentification.TypeEnum; + 'type': HKLocalAccountIdentification.TypeEnum = HKLocalAccountIdentification.TypeEnum.HkLocal; static discriminator: string | undefined = undefined; @@ -48,6 +48,6 @@ export class HKLocalAccountIdentification { export namespace HKLocalAccountIdentification { export enum TypeEnum { - HkLocal = 'hkLocal' + HkLocal = 'hkLocal' } } diff --git a/src/typings/balancePlatform/hULocalAccountIdentification.ts b/src/typings/balancePlatform/hULocalAccountIdentification.ts index 559026523..544d20ddd 100644 --- a/src/typings/balancePlatform/hULocalAccountIdentification.ts +++ b/src/typings/balancePlatform/hULocalAccountIdentification.ts @@ -16,7 +16,7 @@ export class HULocalAccountIdentification { /** * **huLocal** */ - 'type': HULocalAccountIdentification.TypeEnum; + 'type': HULocalAccountIdentification.TypeEnum = HULocalAccountIdentification.TypeEnum.HuLocal; static discriminator: string | undefined = undefined; @@ -39,6 +39,6 @@ export class HULocalAccountIdentification { export namespace HULocalAccountIdentification { export enum TypeEnum { - HuLocal = 'huLocal' + HuLocal = 'huLocal' } } diff --git a/src/typings/balancePlatform/ibanAccountIdentification.ts b/src/typings/balancePlatform/ibanAccountIdentification.ts index 583392194..f4dc2a88c 100644 --- a/src/typings/balancePlatform/ibanAccountIdentification.ts +++ b/src/typings/balancePlatform/ibanAccountIdentification.ts @@ -16,7 +16,7 @@ export class IbanAccountIdentification { /** * **iban** */ - 'type': IbanAccountIdentification.TypeEnum; + 'type': IbanAccountIdentification.TypeEnum = IbanAccountIdentification.TypeEnum.Iban; static discriminator: string | undefined = undefined; @@ -39,6 +39,6 @@ export class IbanAccountIdentification { export namespace IbanAccountIdentification { export enum TypeEnum { - Iban = 'iban' + Iban = 'iban' } } diff --git a/src/typings/balancePlatform/ibanAccountIdentificationRequirement.ts b/src/typings/balancePlatform/ibanAccountIdentificationRequirement.ts index 0af36ada1..116a5c561 100644 --- a/src/typings/balancePlatform/ibanAccountIdentificationRequirement.ts +++ b/src/typings/balancePlatform/ibanAccountIdentificationRequirement.ts @@ -20,7 +20,7 @@ export class IbanAccountIdentificationRequirement { /** * **ibanAccountIdentificationRequirement** */ - 'type': IbanAccountIdentificationRequirement.TypeEnum; + 'type': IbanAccountIdentificationRequirement.TypeEnum = IbanAccountIdentificationRequirement.TypeEnum.IbanAccountIdentificationRequirement; static discriminator: string | undefined = undefined; @@ -48,6 +48,6 @@ export class IbanAccountIdentificationRequirement { export namespace IbanAccountIdentificationRequirement { export enum TypeEnum { - IbanAccountIdentificationRequirement = 'ibanAccountIdentificationRequirement' + IbanAccountIdentificationRequirement = 'ibanAccountIdentificationRequirement' } } diff --git a/src/typings/balancePlatform/link.ts b/src/typings/balancePlatform/link.ts index 9c95a205c..b1731980f 100644 --- a/src/typings/balancePlatform/link.ts +++ b/src/typings/balancePlatform/link.ts @@ -10,11 +10,11 @@ import { Href } from './href'; export class Link { - 'first'?: Href | null; - 'last'?: Href | null; - 'next'?: Href | null; - 'previous'?: Href | null; - 'self'?: Href | null; + 'first'?: Href; + 'last'?: Href; + 'next'?: Href; + 'previous'?: Href; + 'self'?: Href; static discriminator: string | undefined = undefined; @@ -22,27 +22,27 @@ export class Link { { "name": "first", "baseName": "first", - "type": "Href | null" + "type": "Href" }, { "name": "last", "baseName": "last", - "type": "Href | null" + "type": "Href" }, { "name": "next", "baseName": "next", - "type": "Href | null" + "type": "Href" }, { "name": "previous", "baseName": "previous", - "type": "Href | null" + "type": "Href" }, { "name": "self", "baseName": "self", - "type": "Href | null" + "type": "Href" } ]; static getAttributeTypeMap() { diff --git a/src/typings/balancePlatform/matchingValuesRestriction.ts b/src/typings/balancePlatform/matchingValuesRestriction.ts index c990312ba..4164882b5 100644 --- a/src/typings/balancePlatform/matchingValuesRestriction.ts +++ b/src/typings/balancePlatform/matchingValuesRestriction.ts @@ -36,10 +36,10 @@ export class MatchingValuesRestriction { export namespace MatchingValuesRestriction { export enum ValueEnum { - AcquirerId = 'acquirerId', - Amount = 'amount', - Currency = 'currency', - MerchantId = 'merchantId', - MerchantName = 'merchantName' + AcquirerId = 'acquirerId', + Amount = 'amount', + Currency = 'currency', + MerchantId = 'merchantId', + MerchantName = 'merchantName' } } diff --git a/src/typings/balancePlatform/models.ts b/src/typings/balancePlatform/models.ts index 77319186a..d4ea003da 100644 --- a/src/typings/balancePlatform/models.ts +++ b/src/typings/balancePlatform/models.ts @@ -1,12 +1,4 @@ -/* - * The version of the OpenAPI document: v2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - +import localVarRequest from 'request'; export * from './aULocalAccountIdentification'; export * from './accountHolder'; @@ -36,9 +28,11 @@ export * from './balanceAccountUpdateRequest'; export * from './balancePlatform'; export * from './balanceSweepConfigurationsResponse'; export * from './bankAccount'; +export * from './bankAccountAccountIdentification'; export * from './bankAccountDetails'; export * from './bankAccountIdentificationTypeRequirement'; export * from './bankAccountIdentificationValidationRequest'; +export * from './bankAccountIdentificationValidationRequestAccountIdentification'; export * from './bankAccountModel'; export * from './bankIdentification'; export * from './brandVariantsRestriction'; @@ -107,6 +101,7 @@ export * from './paginatedGetCardOrderItemResponse'; export * from './paginatedGetCardOrderResponse'; export * from './paginatedPaymentInstrumentsResponse'; export * from './paymentInstrument'; +export * from './paymentInstrumentAdditionalBankAccountIdentificationsInner'; export * from './paymentInstrumentGroup'; export * from './paymentInstrumentGroupInfo'; export * from './paymentInstrumentInfo'; @@ -157,6 +152,7 @@ export * from './transactionRuleRestrictions'; export * from './transactionRulesResponse'; export * from './transferRoute'; export * from './transferRouteRequest'; +export * from './transferRouteRequirementsInner'; export * from './transferRouteResponse'; export * from './uKLocalAccountIdentification'; export * from './uSInternationalAchAddressRequirement'; @@ -168,6 +164,18 @@ export * from './verificationDeadline'; export * from './verificationError'; export * from './verificationErrorRecursive'; +import * as fs from 'fs'; + +export interface RequestDetailedFile { + value: Buffer; + options?: { + filename?: string; + contentType?: string; + } +} + +export type RequestFile = string | Buffer | fs.ReadStream | RequestDetailedFile; + import { AULocalAccountIdentification } from './aULocalAccountIdentification'; import { AccountHolder } from './accountHolder'; @@ -197,9 +205,11 @@ import { BalanceAccountUpdateRequest } from './balanceAccountUpdateRequest'; import { BalancePlatform } from './balancePlatform'; import { BalanceSweepConfigurationsResponse } from './balanceSweepConfigurationsResponse'; import { BankAccount } from './bankAccount'; +import { BankAccountAccountIdentification } from './bankAccountAccountIdentification'; import { BankAccountDetails } from './bankAccountDetails'; import { BankAccountIdentificationTypeRequirement } from './bankAccountIdentificationTypeRequirement'; import { BankAccountIdentificationValidationRequest } from './bankAccountIdentificationValidationRequest'; +import { BankAccountIdentificationValidationRequestAccountIdentification } from './bankAccountIdentificationValidationRequestAccountIdentification'; import { BankAccountModel } from './bankAccountModel'; import { BankIdentification } from './bankIdentification'; import { BrandVariantsRestriction } from './brandVariantsRestriction'; @@ -268,6 +278,7 @@ import { PaginatedGetCardOrderItemResponse } from './paginatedGetCardOrderItemRe import { PaginatedGetCardOrderResponse } from './paginatedGetCardOrderResponse'; import { PaginatedPaymentInstrumentsResponse } from './paginatedPaymentInstrumentsResponse'; import { PaymentInstrument } from './paymentInstrument'; +import { PaymentInstrumentAdditionalBankAccountIdentificationsInner } from './paymentInstrumentAdditionalBankAccountIdentificationsInner'; import { PaymentInstrumentGroup } from './paymentInstrumentGroup'; import { PaymentInstrumentGroupInfo } from './paymentInstrumentGroupInfo'; import { PaymentInstrumentInfo } from './paymentInstrumentInfo'; @@ -318,6 +329,7 @@ import { TransactionRuleRestrictions } from './transactionRuleRestrictions'; import { TransactionRulesResponse } from './transactionRulesResponse'; import { TransferRoute } from './transferRoute'; import { TransferRouteRequest } from './transferRouteRequest'; +import { TransferRouteRequirementsInner } from './transferRouteRequirementsInner'; import { TransferRouteResponse } from './transferRouteResponse'; import { UKLocalAccountIdentification } from './uKLocalAccountIdentification'; import { USInternationalAchAddressRequirement } from './uSInternationalAchAddressRequirement'; @@ -363,8 +375,12 @@ let enumsMap: {[index: string]: any} = { "BalanceAccount.StatusEnum": BalanceAccount.StatusEnum, "BalanceAccountBase.StatusEnum": BalanceAccountBase.StatusEnum, "BalanceAccountUpdateRequest.StatusEnum": BalanceAccountUpdateRequest.StatusEnum, + "BankAccountAccountIdentification.TypeEnum": BankAccountAccountIdentification.TypeEnum, + "BankAccountAccountIdentification.AccountTypeEnum": BankAccountAccountIdentification.AccountTypeEnum, "BankAccountIdentificationTypeRequirement.BankAccountIdentificationTypesEnum": BankAccountIdentificationTypeRequirement.BankAccountIdentificationTypesEnum, "BankAccountIdentificationTypeRequirement.TypeEnum": BankAccountIdentificationTypeRequirement.TypeEnum, + "BankAccountIdentificationValidationRequestAccountIdentification.TypeEnum": BankAccountIdentificationValidationRequestAccountIdentification.TypeEnum, + "BankAccountIdentificationValidationRequestAccountIdentification.AccountTypeEnum": BankAccountIdentificationValidationRequestAccountIdentification.AccountTypeEnum, "BankAccountModel.FormFactorEnum": BankAccountModel.FormFactorEnum, "BankIdentification.IdentificationTypeEnum": BankIdentification.IdentificationTypeEnum, "CALocalAccountIdentification.AccountTypeEnum": CALocalAccountIdentification.AccountTypeEnum, @@ -404,6 +420,7 @@ let enumsMap: {[index: string]: any} = { "PaymentInstrument.StatusEnum": PaymentInstrument.StatusEnum, "PaymentInstrument.StatusReasonEnum": PaymentInstrument.StatusReasonEnum, "PaymentInstrument.TypeEnum": PaymentInstrument.TypeEnum, + "PaymentInstrumentAdditionalBankAccountIdentificationsInner.TypeEnum": PaymentInstrumentAdditionalBankAccountIdentificationsInner.TypeEnum, "PaymentInstrumentInfo.StatusEnum": PaymentInstrumentInfo.StatusEnum, "PaymentInstrumentInfo.StatusReasonEnum": PaymentInstrumentInfo.StatusReasonEnum, "PaymentInstrumentInfo.TypeEnum": PaymentInstrumentInfo.TypeEnum, @@ -439,6 +456,10 @@ let enumsMap: {[index: string]: any} = { "TransferRoute.PriorityEnum": TransferRoute.PriorityEnum, "TransferRouteRequest.CategoryEnum": TransferRouteRequest.CategoryEnum, "TransferRouteRequest.PrioritiesEnum": TransferRouteRequest.PrioritiesEnum, + "TransferRouteRequirementsInner.RequiredAddressFieldsEnum": TransferRouteRequirementsInner.RequiredAddressFieldsEnum, + "TransferRouteRequirementsInner.TypeEnum": TransferRouteRequirementsInner.TypeEnum, + "TransferRouteRequirementsInner.BankAccountIdentificationTypesEnum": TransferRouteRequirementsInner.BankAccountIdentificationTypesEnum, + "TransferRouteRequirementsInner.PaymentInstrumentTypeEnum": TransferRouteRequirementsInner.PaymentInstrumentTypeEnum, "UKLocalAccountIdentification.TypeEnum": UKLocalAccountIdentification.TypeEnum, "USInternationalAchAddressRequirement.TypeEnum": USInternationalAchAddressRequirement.TypeEnum, "USLocalAccountIdentification.AccountTypeEnum": USLocalAccountIdentification.AccountTypeEnum, @@ -488,9 +509,11 @@ let typeMap: {[index: string]: any} = { "BalancePlatform": BalancePlatform, "BalanceSweepConfigurationsResponse": BalanceSweepConfigurationsResponse, "BankAccount": BankAccount, + "BankAccountAccountIdentification": BankAccountAccountIdentification, "BankAccountDetails": BankAccountDetails, "BankAccountIdentificationTypeRequirement": BankAccountIdentificationTypeRequirement, "BankAccountIdentificationValidationRequest": BankAccountIdentificationValidationRequest, + "BankAccountIdentificationValidationRequestAccountIdentification": BankAccountIdentificationValidationRequestAccountIdentification, "BankAccountModel": BankAccountModel, "BankIdentification": BankIdentification, "BrandVariantsRestriction": BrandVariantsRestriction, @@ -559,6 +582,7 @@ let typeMap: {[index: string]: any} = { "PaginatedGetCardOrderResponse": PaginatedGetCardOrderResponse, "PaginatedPaymentInstrumentsResponse": PaginatedPaymentInstrumentsResponse, "PaymentInstrument": PaymentInstrument, + "PaymentInstrumentAdditionalBankAccountIdentificationsInner": PaymentInstrumentAdditionalBankAccountIdentificationsInner, "PaymentInstrumentGroup": PaymentInstrumentGroup, "PaymentInstrumentGroupInfo": PaymentInstrumentGroupInfo, "PaymentInstrumentInfo": PaymentInstrumentInfo, @@ -609,6 +633,7 @@ let typeMap: {[index: string]: any} = { "TransactionRulesResponse": TransactionRulesResponse, "TransferRoute": TransferRoute, "TransferRouteRequest": TransferRouteRequest, + "TransferRouteRequirementsInner": TransferRouteRequirementsInner, "TransferRouteResponse": TransferRouteResponse, "UKLocalAccountIdentification": UKLocalAccountIdentification, "USInternationalAchAddressRequirement": USInternationalAchAddressRequirement, @@ -621,6 +646,23 @@ let typeMap: {[index: string]: any} = { "VerificationErrorRecursive": VerificationErrorRecursive, } +// Check if a string starts with another string without using es6 features +function startsWith(str: string, match: string): boolean { + return str.substring(0, match.length) === match; +} + +// Check if a string ends with another string without using es6 features +function endsWith(str: string, match: string): boolean { + return str.length >= match.length && str.substring(str.length - match.length) === match; +} + +const nullableSuffix = " | null"; +const optionalSuffix = " | undefined"; +const arrayPrefix = "Array<"; +const arraySuffix = ">"; +const mapPrefix = "{ [key: string]: "; +const mapSuffix = "; }"; + export class ObjectSerializer { public static findCorrectType(data: any, expectedType: string) { if (data == undefined) { @@ -657,25 +699,37 @@ export class ObjectSerializer { } } - public static serialize(data: any, type: string) { + public static serialize(data: any, type: string): any { if (data == undefined) { return data; } else if (primitives.indexOf(type.toLowerCase()) !== -1) { return data; - } else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6 - let subType: string = type.replace("Array<", ""); // Array => Type> - subType = subType.substring(0, subType.length - 1); // Type> => Type + } else if (endsWith(type, nullableSuffix)) { + let subType: string = type.slice(0, -nullableSuffix.length); // Type | null => Type + return ObjectSerializer.serialize(data, subType); + } else if (endsWith(type, optionalSuffix)) { + let subType: string = type.slice(0, -optionalSuffix.length); // Type | undefined => Type + return ObjectSerializer.serialize(data, subType); + } else if (startsWith(type, arrayPrefix)) { + let subType: string = type.slice(arrayPrefix.length, -arraySuffix.length); // Array => Type let transformedData: any[] = []; for (let index = 0; index < data.length; index++) { let datum = data[index]; transformedData.push(ObjectSerializer.serialize(datum, subType)); } return transformedData; + } else if (startsWith(type, mapPrefix)) { + let subType: string = type.slice(mapPrefix.length, -mapSuffix.length); // { [key: string]: Type; } => Type + let transformedData: { [key: string]: any } = {}; + for (let key in data) { + transformedData[key] = ObjectSerializer.serialize( + data[key], + subType, + ); + } + return transformedData; } else if (type === "Date") { return data.toISOString(); - } else if (type === "SaleToAcquirerData") { - const dataString = JSON.stringify(data); - return Buffer.from(dataString).toString("base64"); } else { if (enumsMap[type]) { return data; @@ -698,22 +752,37 @@ export class ObjectSerializer { } } - public static deserialize(data: any, type: string) { + public static deserialize(data: any, type: string): any { // polymorphism may change the actual type. type = ObjectSerializer.findCorrectType(data, type); if (data == undefined) { return data; } else if (primitives.indexOf(type.toLowerCase()) !== -1) { return data; - } else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6 - let subType: string = type.replace("Array<", ""); // Array => Type> - subType = subType.substring(0, subType.length - 1); // Type> => Type + } else if (endsWith(type, nullableSuffix)) { + let subType: string = type.slice(0, -nullableSuffix.length); // Type | null => Type + return ObjectSerializer.deserialize(data, subType); + } else if (endsWith(type, optionalSuffix)) { + let subType: string = type.slice(0, -optionalSuffix.length); // Type | undefined => Type + return ObjectSerializer.deserialize(data, subType); + } else if (startsWith(type, arrayPrefix)) { + let subType: string = type.slice(arrayPrefix.length, -arraySuffix.length); // Array => Type let transformedData: any[] = []; for (let index = 0; index < data.length; index++) { let datum = data[index]; transformedData.push(ObjectSerializer.deserialize(datum, subType)); } return transformedData; + } else if (startsWith(type, mapPrefix)) { + let subType: string = type.slice(mapPrefix.length, -mapSuffix.length); // { [key: string]: Type; } => Type + let transformedData: { [key: string]: any } = {}; + for (let key in data) { + transformedData[key] = ObjectSerializer.deserialize( + data[key], + subType, + ); + } + return transformedData; } else if (type === "Date") { return new Date(data); } else { @@ -734,3 +803,77 @@ export class ObjectSerializer { } } } + +export interface Authentication { + /** + * Apply authentication settings to header and query params. + */ + applyToRequest(requestOptions: localVarRequest.Options): Promise | void; +} + +export class HttpBasicAuth implements Authentication { + public username: string = ''; + public password: string = ''; + + applyToRequest(requestOptions: localVarRequest.Options): void { + requestOptions.auth = { + username: this.username, password: this.password + } + } +} + +export class HttpBearerAuth implements Authentication { + public accessToken: string | (() => string) = ''; + + applyToRequest(requestOptions: localVarRequest.Options): void { + if (requestOptions && requestOptions.headers) { + const accessToken = typeof this.accessToken === 'function' + ? this.accessToken() + : this.accessToken; + requestOptions.headers["Authorization"] = "Bearer " + accessToken; + } + } +} + +export class ApiKeyAuth implements Authentication { + public apiKey: string = ''; + + constructor(private location: string, private paramName: string) { + } + + applyToRequest(requestOptions: localVarRequest.Options): void { + if (this.location == "query") { + (requestOptions.qs)[this.paramName] = this.apiKey; + } else if (this.location == "header" && requestOptions && requestOptions.headers) { + requestOptions.headers[this.paramName] = this.apiKey; + } else if (this.location == 'cookie' && requestOptions && requestOptions.headers) { + if (requestOptions.headers['Cookie']) { + requestOptions.headers['Cookie'] += '; ' + this.paramName + '=' + encodeURIComponent(this.apiKey); + } + else { + requestOptions.headers['Cookie'] = this.paramName + '=' + encodeURIComponent(this.apiKey); + } + } + } +} + +export class OAuth implements Authentication { + public accessToken: string = ''; + + applyToRequest(requestOptions: localVarRequest.Options): void { + if (requestOptions && requestOptions.headers) { + requestOptions.headers["Authorization"] = "Bearer " + this.accessToken; + } + } +} + +export class VoidAuth implements Authentication { + public username: string = ''; + public password: string = ''; + + applyToRequest(_: localVarRequest.Options): void { + // Do nothing + } +} + +export type Interceptor = (requestOptions: localVarRequest.Options) => (Promise | void); diff --git a/src/typings/balancePlatform/nOLocalAccountIdentification.ts b/src/typings/balancePlatform/nOLocalAccountIdentification.ts index 96c8d3068..4af0bfb89 100644 --- a/src/typings/balancePlatform/nOLocalAccountIdentification.ts +++ b/src/typings/balancePlatform/nOLocalAccountIdentification.ts @@ -16,7 +16,7 @@ export class NOLocalAccountIdentification { /** * **noLocal** */ - 'type': NOLocalAccountIdentification.TypeEnum; + 'type': NOLocalAccountIdentification.TypeEnum = NOLocalAccountIdentification.TypeEnum.NoLocal; static discriminator: string | undefined = undefined; @@ -39,6 +39,6 @@ export class NOLocalAccountIdentification { export namespace NOLocalAccountIdentification { export enum TypeEnum { - NoLocal = 'noLocal' + NoLocal = 'noLocal' } } diff --git a/src/typings/balancePlatform/nZLocalAccountIdentification.ts b/src/typings/balancePlatform/nZLocalAccountIdentification.ts index 6142ff305..458add30c 100644 --- a/src/typings/balancePlatform/nZLocalAccountIdentification.ts +++ b/src/typings/balancePlatform/nZLocalAccountIdentification.ts @@ -16,7 +16,7 @@ export class NZLocalAccountIdentification { /** * **nzLocal** */ - 'type': NZLocalAccountIdentification.TypeEnum; + 'type': NZLocalAccountIdentification.TypeEnum = NZLocalAccountIdentification.TypeEnum.NzLocal; static discriminator: string | undefined = undefined; @@ -39,6 +39,6 @@ export class NZLocalAccountIdentification { export namespace NZLocalAccountIdentification { export enum TypeEnum { - NzLocal = 'nzLocal' + NzLocal = 'nzLocal' } } diff --git a/src/typings/balancePlatform/networkToken.ts b/src/typings/balancePlatform/networkToken.ts index 181914866..25438fa2a 100644 --- a/src/typings/balancePlatform/networkToken.ts +++ b/src/typings/balancePlatform/networkToken.ts @@ -18,7 +18,7 @@ export class NetworkToken { * Date and time when the network token was created, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) extended format. For example, **2020-12-18T10:15:30+01:00**.. */ 'creationDate'?: Date; - 'device'?: DeviceInfo | null; + 'device'?: DeviceInfo; /** * The unique identifier of the network token. */ @@ -56,7 +56,7 @@ export class NetworkToken { { "name": "device", "baseName": "device", - "type": "DeviceInfo | null" + "type": "DeviceInfo" }, { "name": "id", @@ -91,9 +91,9 @@ export class NetworkToken { export namespace NetworkToken { export enum StatusEnum { - Active = 'active', - Inactive = 'inactive', - Suspended = 'suspended', - Closed = 'closed' + Active = 'active', + Inactive = 'inactive', + Suspended = 'suspended', + Closed = 'closed' } } diff --git a/src/typings/balancePlatform/numberAndBicAccountIdentification.ts b/src/typings/balancePlatform/numberAndBicAccountIdentification.ts index b72d72143..bf5493e18 100644 --- a/src/typings/balancePlatform/numberAndBicAccountIdentification.ts +++ b/src/typings/balancePlatform/numberAndBicAccountIdentification.ts @@ -14,7 +14,7 @@ export class NumberAndBicAccountIdentification { * The bank account number, without separators or whitespace. The length and format depends on the bank or country. */ 'accountNumber': string; - 'additionalBankIdentification'?: AdditionalBankIdentification | null; + 'additionalBankIdentification'?: AdditionalBankIdentification; /** * The bank\'s 8- or 11-character BIC or SWIFT code. */ @@ -22,7 +22,7 @@ export class NumberAndBicAccountIdentification { /** * **numberAndBic** */ - 'type': NumberAndBicAccountIdentification.TypeEnum; + 'type': NumberAndBicAccountIdentification.TypeEnum = NumberAndBicAccountIdentification.TypeEnum.NumberAndBic; static discriminator: string | undefined = undefined; @@ -35,7 +35,7 @@ export class NumberAndBicAccountIdentification { { "name": "additionalBankIdentification", "baseName": "additionalBankIdentification", - "type": "AdditionalBankIdentification | null" + "type": "AdditionalBankIdentification" }, { "name": "bic", @@ -55,6 +55,6 @@ export class NumberAndBicAccountIdentification { export namespace NumberAndBicAccountIdentification { export enum TypeEnum { - NumberAndBic = 'numberAndBic' + NumberAndBic = 'numberAndBic' } } diff --git a/src/typings/balancePlatform/pLLocalAccountIdentification.ts b/src/typings/balancePlatform/pLLocalAccountIdentification.ts index a1e5d16f5..afa354446 100644 --- a/src/typings/balancePlatform/pLLocalAccountIdentification.ts +++ b/src/typings/balancePlatform/pLLocalAccountIdentification.ts @@ -16,7 +16,7 @@ export class PLLocalAccountIdentification { /** * **plLocal** */ - 'type': PLLocalAccountIdentification.TypeEnum; + 'type': PLLocalAccountIdentification.TypeEnum = PLLocalAccountIdentification.TypeEnum.PlLocal; static discriminator: string | undefined = undefined; @@ -39,6 +39,6 @@ export class PLLocalAccountIdentification { export namespace PLLocalAccountIdentification { export enum TypeEnum { - PlLocal = 'plLocal' + PlLocal = 'plLocal' } } diff --git a/src/typings/balancePlatform/paymentInstrument.ts b/src/typings/balancePlatform/paymentInstrument.ts index 1c156b43b..f56cbd46a 100644 --- a/src/typings/balancePlatform/paymentInstrument.ts +++ b/src/typings/balancePlatform/paymentInstrument.ts @@ -9,7 +9,7 @@ import { BankAccountDetails } from './bankAccountDetails'; import { Card } from './card'; -import { IbanAccountIdentification } from './ibanAccountIdentification'; +import { PaymentInstrumentAdditionalBankAccountIdentificationsInner } from './paymentInstrumentAdditionalBankAccountIdentificationsInner'; export class PaymentInstrument { /** @@ -18,13 +18,13 @@ export class PaymentInstrument { * @deprecated since Configuration API v2 * Please use `bankAccount` object instead */ - 'additionalBankAccountIdentifications'?: Array; + 'additionalBankAccountIdentifications'?: Array; /** * The unique identifier of the [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/v1/post/balanceAccounts__resParam_id) associated with the payment instrument. */ 'balanceAccountId': string; - 'bankAccount'?: BankAccountDetails | null; - 'card'?: Card | null; + 'bankAccount'?: BankAccountDetails; + 'card'?: Card; /** * Your description for the payment instrument, maximum 300 characters. */ @@ -68,7 +68,7 @@ export class PaymentInstrument { { "name": "additionalBankAccountIdentifications", "baseName": "additionalBankAccountIdentifications", - "type": "Array" + "type": "Array" }, { "name": "balanceAccountId", @@ -78,12 +78,12 @@ export class PaymentInstrument { { "name": "bankAccount", "baseName": "bankAccount", - "type": "BankAccountDetails | null" + "type": "BankAccountDetails" }, { "name": "card", "baseName": "card", - "type": "Card | null" + "type": "Card" }, { "name": "description", @@ -138,24 +138,24 @@ export class PaymentInstrument { export namespace PaymentInstrument { export enum StatusEnum { - Active = 'active', - Closed = 'closed', - Inactive = 'inactive', - Suspended = 'suspended' + Active = 'active', + Closed = 'closed', + Inactive = 'inactive', + Suspended = 'suspended' } export enum StatusReasonEnum { - AccountClosure = 'accountClosure', - Damaged = 'damaged', - EndOfLife = 'endOfLife', - Expired = 'expired', - Lost = 'lost', - Other = 'other', - Stolen = 'stolen', - SuspectedFraud = 'suspectedFraud', - TransactionRule = 'transactionRule' + AccountClosure = 'accountClosure', + Damaged = 'damaged', + EndOfLife = 'endOfLife', + Expired = 'expired', + Lost = 'lost', + Other = 'other', + Stolen = 'stolen', + SuspectedFraud = 'suspectedFraud', + TransactionRule = 'transactionRule' } export enum TypeEnum { - BankAccount = 'bankAccount', - Card = 'card' + BankAccount = 'bankAccount', + Card = 'card' } } diff --git a/src/typings/balancePlatform/paymentInstrumentAdditionalBankAccountIdentificationsInner.ts b/src/typings/balancePlatform/paymentInstrumentAdditionalBankAccountIdentificationsInner.ts new file mode 100644 index 000000000..a9bc2c537 --- /dev/null +++ b/src/typings/balancePlatform/paymentInstrumentAdditionalBankAccountIdentificationsInner.ts @@ -0,0 +1,45 @@ +/* + * The version of the OpenAPI document: v2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { IbanAccountIdentification } from './ibanAccountIdentification'; + +export class PaymentInstrumentAdditionalBankAccountIdentificationsInner { + /** + * The international bank account number as defined in the [ISO-13616](https://www.iso.org/standard/81090.html) standard. + */ + 'iban': string; + /** + * **iban** + */ + 'type': PaymentInstrumentAdditionalBankAccountIdentificationsInner.TypeEnum = PaymentInstrumentAdditionalBankAccountIdentificationsInner.TypeEnum.Iban; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "iban", + "baseName": "iban", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "PaymentInstrumentAdditionalBankAccountIdentificationsInner.TypeEnum" + } ]; + + static getAttributeTypeMap() { + return PaymentInstrumentAdditionalBankAccountIdentificationsInner.attributeTypeMap; + } +} + +export namespace PaymentInstrumentAdditionalBankAccountIdentificationsInner { + export enum TypeEnum { + Iban = 'iban' + } +} diff --git a/src/typings/balancePlatform/paymentInstrumentInfo.ts b/src/typings/balancePlatform/paymentInstrumentInfo.ts index 048eba9d4..8e54a9889 100644 --- a/src/typings/balancePlatform/paymentInstrumentInfo.ts +++ b/src/typings/balancePlatform/paymentInstrumentInfo.ts @@ -15,8 +15,8 @@ export class PaymentInstrumentInfo { * The unique identifier of the [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/v1/post/balanceAccounts__resParam_id) associated with the payment instrument. */ 'balanceAccountId': string; - 'bankAccount'?: BankAccountModel | null; - 'card'?: CardInfo | null; + 'bankAccount'?: BankAccountModel; + 'card'?: CardInfo; /** * Your description for the payment instrument, maximum 300 characters. */ @@ -61,12 +61,12 @@ export class PaymentInstrumentInfo { { "name": "bankAccount", "baseName": "bankAccount", - "type": "BankAccountModel | null" + "type": "BankAccountModel" }, { "name": "card", "baseName": "card", - "type": "CardInfo | null" + "type": "CardInfo" }, { "name": "description", @@ -116,24 +116,24 @@ export class PaymentInstrumentInfo { export namespace PaymentInstrumentInfo { export enum StatusEnum { - Active = 'active', - Closed = 'closed', - Inactive = 'inactive', - Suspended = 'suspended' + Active = 'active', + Closed = 'closed', + Inactive = 'inactive', + Suspended = 'suspended' } export enum StatusReasonEnum { - AccountClosure = 'accountClosure', - Damaged = 'damaged', - EndOfLife = 'endOfLife', - Expired = 'expired', - Lost = 'lost', - Other = 'other', - Stolen = 'stolen', - SuspectedFraud = 'suspectedFraud', - TransactionRule = 'transactionRule' + AccountClosure = 'accountClosure', + Damaged = 'damaged', + EndOfLife = 'endOfLife', + Expired = 'expired', + Lost = 'lost', + Other = 'other', + Stolen = 'stolen', + SuspectedFraud = 'suspectedFraud', + TransactionRule = 'transactionRule' } export enum TypeEnum { - BankAccount = 'bankAccount', - Card = 'card' + BankAccount = 'bankAccount', + Card = 'card' } } diff --git a/src/typings/balancePlatform/paymentInstrumentRequirement.ts b/src/typings/balancePlatform/paymentInstrumentRequirement.ts index 3213748f6..b6bb80c69 100644 --- a/src/typings/balancePlatform/paymentInstrumentRequirement.ts +++ b/src/typings/balancePlatform/paymentInstrumentRequirement.ts @@ -32,7 +32,7 @@ export class PaymentInstrumentRequirement { /** * **paymentInstrumentRequirement** */ - 'type': PaymentInstrumentRequirement.TypeEnum; + 'type': PaymentInstrumentRequirement.TypeEnum = PaymentInstrumentRequirement.TypeEnum.PaymentInstrumentRequirement; static discriminator: string | undefined = undefined; @@ -75,10 +75,10 @@ export class PaymentInstrumentRequirement { export namespace PaymentInstrumentRequirement { export enum PaymentInstrumentTypeEnum { - BankAccount = 'BankAccount', - Card = 'Card' + BankAccount = 'BankAccount', + Card = 'Card' } export enum TypeEnum { - PaymentInstrumentRequirement = 'paymentInstrumentRequirement' + PaymentInstrumentRequirement = 'paymentInstrumentRequirement' } } diff --git a/src/typings/balancePlatform/paymentInstrumentUpdateRequest.ts b/src/typings/balancePlatform/paymentInstrumentUpdateRequest.ts index ee43abb50..dd0a4dcd3 100644 --- a/src/typings/balancePlatform/paymentInstrumentUpdateRequest.ts +++ b/src/typings/balancePlatform/paymentInstrumentUpdateRequest.ts @@ -14,7 +14,7 @@ export class PaymentInstrumentUpdateRequest { * The unique identifier of the balance account associated with this payment instrument. >You can only change the balance account ID if the payment instrument has **inactive** status. */ 'balanceAccountId'?: string; - 'card'?: CardInfo | null; + 'card'?: CardInfo; /** * The status of the payment instrument. If a status is not specified when creating a payment instrument, it is set to **active** by default. However, there can be exceptions for cards based on the `card.formFactor` and the `issuingCountryCode`. For example, when issuing physical cards in the US, the default status is **inactive**. Possible values: * **active**: The payment instrument is active and can be used to make payments. * **inactive**: The payment instrument is inactive and cannot be used to make payments. * **suspended**: The payment instrument is suspended, either because it was stolen or lost. * **closed**: The payment instrument is permanently closed. This action cannot be undone. */ @@ -39,7 +39,7 @@ export class PaymentInstrumentUpdateRequest { { "name": "card", "baseName": "card", - "type": "CardInfo | null" + "type": "CardInfo" }, { "name": "status", @@ -64,20 +64,20 @@ export class PaymentInstrumentUpdateRequest { export namespace PaymentInstrumentUpdateRequest { export enum StatusEnum { - Active = 'active', - Closed = 'closed', - Inactive = 'inactive', - Suspended = 'suspended' + Active = 'active', + Closed = 'closed', + Inactive = 'inactive', + Suspended = 'suspended' } export enum StatusReasonEnum { - AccountClosure = 'accountClosure', - Damaged = 'damaged', - EndOfLife = 'endOfLife', - Expired = 'expired', - Lost = 'lost', - Other = 'other', - Stolen = 'stolen', - SuspectedFraud = 'suspectedFraud', - TransactionRule = 'transactionRule' + AccountClosure = 'accountClosure', + Damaged = 'damaged', + EndOfLife = 'endOfLife', + Expired = 'expired', + Lost = 'lost', + Other = 'other', + Stolen = 'stolen', + SuspectedFraud = 'suspectedFraud', + TransactionRule = 'transactionRule' } } diff --git a/src/typings/balancePlatform/phone.ts b/src/typings/balancePlatform/phone.ts index 7fb4c66b9..52b2220bd 100644 --- a/src/typings/balancePlatform/phone.ts +++ b/src/typings/balancePlatform/phone.ts @@ -39,7 +39,7 @@ export class Phone { export namespace Phone { export enum TypeEnum { - Landline = 'landline', - Mobile = 'mobile' + Landline = 'landline', + Mobile = 'mobile' } } diff --git a/src/typings/balancePlatform/phoneNumber.ts b/src/typings/balancePlatform/phoneNumber.ts index aa414d703..a3a99e2f7 100644 --- a/src/typings/balancePlatform/phoneNumber.ts +++ b/src/typings/balancePlatform/phoneNumber.ts @@ -48,9 +48,9 @@ export class PhoneNumber { export namespace PhoneNumber { export enum PhoneTypeEnum { - Fax = 'Fax', - Landline = 'Landline', - Mobile = 'Mobile', - Sip = 'SIP' + Fax = 'Fax', + Landline = 'Landline', + Mobile = 'Mobile', + Sip = 'SIP' } } diff --git a/src/typings/balancePlatform/pinChangeResponse.ts b/src/typings/balancePlatform/pinChangeResponse.ts index 0f7d18b56..a7b8de8e2 100644 --- a/src/typings/balancePlatform/pinChangeResponse.ts +++ b/src/typings/balancePlatform/pinChangeResponse.ts @@ -30,8 +30,8 @@ export class PinChangeResponse { export namespace PinChangeResponse { export enum StatusEnum { - Completed = 'completed', - Pending = 'pending', - Unavailable = 'unavailable' + Completed = 'completed', + Pending = 'pending', + Unavailable = 'unavailable' } } diff --git a/src/typings/balancePlatform/processingTypesRestriction.ts b/src/typings/balancePlatform/processingTypesRestriction.ts index 66298fae8..7384219a9 100644 --- a/src/typings/balancePlatform/processingTypesRestriction.ts +++ b/src/typings/balancePlatform/processingTypesRestriction.ts @@ -39,13 +39,13 @@ export class ProcessingTypesRestriction { export namespace ProcessingTypesRestriction { export enum ValueEnum { - AtmWithdraw = 'atmWithdraw', - BalanceInquiry = 'balanceInquiry', - Ecommerce = 'ecommerce', - Moto = 'moto', - Pos = 'pos', - Recurring = 'recurring', - Token = 'token', - Unknown = 'unknown' + AtmWithdraw = 'atmWithdraw', + BalanceInquiry = 'balanceInquiry', + Ecommerce = 'ecommerce', + Moto = 'moto', + Pos = 'pos', + Recurring = 'recurring', + Token = 'token', + Unknown = 'unknown' } } diff --git a/src/typings/balancePlatform/repayment.ts b/src/typings/balancePlatform/repayment.ts index 1288eab0a..25e740574 100644 --- a/src/typings/balancePlatform/repayment.ts +++ b/src/typings/balancePlatform/repayment.ts @@ -15,8 +15,8 @@ export class Repayment { * The repayment that is deducted daily from incoming net volume, in [basis points](https://www.investopedia.com/terms/b/basispoint.asp). */ 'basisPoints': number; - 'term'?: RepaymentTerm | null; - 'threshold'?: ThresholdRepayment | null; + 'term'?: RepaymentTerm; + 'threshold'?: ThresholdRepayment; static discriminator: string | undefined = undefined; @@ -29,12 +29,12 @@ export class Repayment { { "name": "term", "baseName": "term", - "type": "RepaymentTerm | null" + "type": "RepaymentTerm" }, { "name": "threshold", "baseName": "threshold", - "type": "ThresholdRepayment | null" + "type": "ThresholdRepayment" } ]; static getAttributeTypeMap() { diff --git a/src/typings/balancePlatform/riskScoresRestriction.ts b/src/typings/balancePlatform/riskScoresRestriction.ts index 816973909..032bc6f2e 100644 --- a/src/typings/balancePlatform/riskScoresRestriction.ts +++ b/src/typings/balancePlatform/riskScoresRestriction.ts @@ -14,7 +14,7 @@ export class RiskScoresRestriction { * Defines how the condition must be evaluated. */ 'operation': string; - 'value'?: RiskScores | null; + 'value'?: RiskScores; static discriminator: string | undefined = undefined; @@ -27,7 +27,7 @@ export class RiskScoresRestriction { { "name": "value", "baseName": "value", - "type": "RiskScores | null" + "type": "RiskScores" } ]; static getAttributeTypeMap() { diff --git a/src/typings/balancePlatform/sELocalAccountIdentification.ts b/src/typings/balancePlatform/sELocalAccountIdentification.ts index ad111bcdc..5c91b202f 100644 --- a/src/typings/balancePlatform/sELocalAccountIdentification.ts +++ b/src/typings/balancePlatform/sELocalAccountIdentification.ts @@ -20,7 +20,7 @@ export class SELocalAccountIdentification { /** * **seLocal** */ - 'type': SELocalAccountIdentification.TypeEnum; + 'type': SELocalAccountIdentification.TypeEnum = SELocalAccountIdentification.TypeEnum.SeLocal; static discriminator: string | undefined = undefined; @@ -48,6 +48,6 @@ export class SELocalAccountIdentification { export namespace SELocalAccountIdentification { export enum TypeEnum { - SeLocal = 'seLocal' + SeLocal = 'seLocal' } } diff --git a/src/typings/balancePlatform/sGLocalAccountIdentification.ts b/src/typings/balancePlatform/sGLocalAccountIdentification.ts index 647028a50..c7067bf07 100644 --- a/src/typings/balancePlatform/sGLocalAccountIdentification.ts +++ b/src/typings/balancePlatform/sGLocalAccountIdentification.ts @@ -20,7 +20,7 @@ export class SGLocalAccountIdentification { /** * **sgLocal** */ - 'type'?: SGLocalAccountIdentification.TypeEnum; + 'type'?: SGLocalAccountIdentification.TypeEnum = SGLocalAccountIdentification.TypeEnum.SgLocal; static discriminator: string | undefined = undefined; @@ -48,6 +48,6 @@ export class SGLocalAccountIdentification { export namespace SGLocalAccountIdentification { export enum TypeEnum { - SgLocal = 'sgLocal' + SgLocal = 'sgLocal' } } diff --git a/src/typings/balancePlatform/searchRegisteredDevicesResponse.ts b/src/typings/balancePlatform/searchRegisteredDevicesResponse.ts index fbcb7e9de..a99077f30 100644 --- a/src/typings/balancePlatform/searchRegisteredDevicesResponse.ts +++ b/src/typings/balancePlatform/searchRegisteredDevicesResponse.ts @@ -19,7 +19,7 @@ export class SearchRegisteredDevicesResponse { * The total amount of registered SCA devices that match the query parameters. */ 'itemsTotal'?: number; - 'link'?: Link | null; + 'link'?: Link; /** * The total amount of list pages. */ @@ -41,7 +41,7 @@ export class SearchRegisteredDevicesResponse { { "name": "link", "baseName": "link", - "type": "Link | null" + "type": "Link" }, { "name": "pagesTotal", diff --git a/src/typings/balancePlatform/sourceAccountTypesRestriction.ts b/src/typings/balancePlatform/sourceAccountTypesRestriction.ts index 78a64d3fd..89697fc10 100644 --- a/src/typings/balancePlatform/sourceAccountTypesRestriction.ts +++ b/src/typings/balancePlatform/sourceAccountTypesRestriction.ts @@ -39,7 +39,7 @@ export class SourceAccountTypesRestriction { export namespace SourceAccountTypesRestriction { export enum ValueEnum { - BalanceAccount = 'balanceAccount', - BusinessAccount = 'businessAccount' + BalanceAccount = 'balanceAccount', + BusinessAccount = 'businessAccount' } } diff --git a/src/typings/balancePlatform/stringMatch.ts b/src/typings/balancePlatform/stringMatch.ts index 64dd39441..e2999c92c 100644 --- a/src/typings/balancePlatform/stringMatch.ts +++ b/src/typings/balancePlatform/stringMatch.ts @@ -39,9 +39,9 @@ export class StringMatch { export namespace StringMatch { export enum OperationEnum { - Contains = 'contains', - EndsWith = 'endsWith', - IsEqualTo = 'isEqualTo', - StartsWith = 'startsWith' + Contains = 'contains', + EndsWith = 'endsWith', + IsEqualTo = 'isEqualTo', + StartsWith = 'startsWith' } } diff --git a/src/typings/balancePlatform/sweepConfigurationV2.ts b/src/typings/balancePlatform/sweepConfigurationV2.ts index 3bd2d7584..b8731d448 100644 --- a/src/typings/balancePlatform/sweepConfigurationV2.ts +++ b/src/typings/balancePlatform/sweepConfigurationV2.ts @@ -54,13 +54,13 @@ export class SweepConfigurationV2 { * The status of the sweep. If not provided, by default, this is set to **active**. Possible values: * **active**: the sweep is enabled and funds will be pulled in or pushed out based on the defined configuration. * **inactive**: the sweep is disabled and cannot be triggered. */ 'status'?: SweepConfigurationV2.StatusEnum; - 'sweepAmount'?: Amount | null; - 'targetAmount'?: Amount | null; - 'triggerAmount'?: Amount | null; + 'sweepAmount'?: Amount; + 'targetAmount'?: Amount; + 'triggerAmount'?: Amount; /** * The direction of sweep, whether pushing out or pulling in funds to the balance account. If not provided, by default, this is set to **push**. Possible values: * **push**: _push out funds_ to a destination balance account or transfer instrument. * **pull**: _pull in funds_ from a source merchant account, transfer instrument, or balance account. */ - 'type'?: SweepConfigurationV2.TypeEnum; + 'type'?: SweepConfigurationV2.TypeEnum = SweepConfigurationV2.TypeEnum.Push; static discriminator: string | undefined = undefined; @@ -128,17 +128,17 @@ export class SweepConfigurationV2 { { "name": "sweepAmount", "baseName": "sweepAmount", - "type": "Amount | null" + "type": "Amount" }, { "name": "targetAmount", "baseName": "targetAmount", - "type": "Amount | null" + "type": "Amount" }, { "name": "triggerAmount", "baseName": "triggerAmount", - "type": "Amount | null" + "type": "Amount" }, { "name": "type", @@ -153,49 +153,49 @@ export class SweepConfigurationV2 { export namespace SweepConfigurationV2 { export enum CategoryEnum { - Bank = 'bank', - Internal = 'internal', - PlatformPayment = 'platformPayment' + Bank = 'bank', + Internal = 'internal', + PlatformPayment = 'platformPayment' } export enum PrioritiesEnum { - CrossBorder = 'crossBorder', - Fast = 'fast', - Instant = 'instant', - Internal = 'internal', - Regular = 'regular', - Wire = 'wire' + CrossBorder = 'crossBorder', + Fast = 'fast', + Instant = 'instant', + Internal = 'internal', + Regular = 'regular', + Wire = 'wire' } export enum ReasonEnum { - AccountHierarchyNotActive = 'accountHierarchyNotActive', - AmountLimitExceeded = 'amountLimitExceeded', - Approved = 'approved', - BalanceAccountTemporarilyBlockedByTransactionRule = 'balanceAccountTemporarilyBlockedByTransactionRule', - CounterpartyAccountBlocked = 'counterpartyAccountBlocked', - CounterpartyAccountClosed = 'counterpartyAccountClosed', - CounterpartyAccountNotFound = 'counterpartyAccountNotFound', - CounterpartyAddressRequired = 'counterpartyAddressRequired', - CounterpartyBankTimedOut = 'counterpartyBankTimedOut', - CounterpartyBankUnavailable = 'counterpartyBankUnavailable', - Declined = 'declined', - DeclinedByTransactionRule = 'declinedByTransactionRule', - DirectDebitNotSupported = 'directDebitNotSupported', - Error = 'error', - NotEnoughBalance = 'notEnoughBalance', - PendingApproval = 'pendingApproval', - PendingExecution = 'pendingExecution', - RefusedByCounterpartyBank = 'refusedByCounterpartyBank', - RefusedByCustomer = 'refusedByCustomer', - RouteNotFound = 'routeNotFound', - ScaFailed = 'scaFailed', - TransferInstrumentDoesNotExist = 'transferInstrumentDoesNotExist', - Unknown = 'unknown' + AccountHierarchyNotActive = 'accountHierarchyNotActive', + AmountLimitExceeded = 'amountLimitExceeded', + Approved = 'approved', + BalanceAccountTemporarilyBlockedByTransactionRule = 'balanceAccountTemporarilyBlockedByTransactionRule', + CounterpartyAccountBlocked = 'counterpartyAccountBlocked', + CounterpartyAccountClosed = 'counterpartyAccountClosed', + CounterpartyAccountNotFound = 'counterpartyAccountNotFound', + CounterpartyAddressRequired = 'counterpartyAddressRequired', + CounterpartyBankTimedOut = 'counterpartyBankTimedOut', + CounterpartyBankUnavailable = 'counterpartyBankUnavailable', + Declined = 'declined', + DeclinedByTransactionRule = 'declinedByTransactionRule', + DirectDebitNotSupported = 'directDebitNotSupported', + Error = 'error', + NotEnoughBalance = 'notEnoughBalance', + PendingApproval = 'pendingApproval', + PendingExecution = 'pendingExecution', + RefusedByCounterpartyBank = 'refusedByCounterpartyBank', + RefusedByCustomer = 'refusedByCustomer', + RouteNotFound = 'routeNotFound', + ScaFailed = 'scaFailed', + TransferInstrumentDoesNotExist = 'transferInstrumentDoesNotExist', + Unknown = 'unknown' } export enum StatusEnum { - Active = 'active', - Inactive = 'inactive' + Active = 'active', + Inactive = 'inactive' } export enum TypeEnum { - Pull = 'pull', - Push = 'push' + Pull = 'pull', + Push = 'push' } } diff --git a/src/typings/balancePlatform/sweepSchedule.ts b/src/typings/balancePlatform/sweepSchedule.ts index 3aa2fe3fd..df9aaaf5d 100644 --- a/src/typings/balancePlatform/sweepSchedule.ts +++ b/src/typings/balancePlatform/sweepSchedule.ts @@ -39,10 +39,10 @@ export class SweepSchedule { export namespace SweepSchedule { export enum TypeEnum { - Daily = 'daily', - Weekly = 'weekly', - Monthly = 'monthly', - Balance = 'balance', - Cron = 'cron' + Daily = 'daily', + Weekly = 'weekly', + Monthly = 'monthly', + Balance = 'balance', + Cron = 'cron' } } diff --git a/src/typings/balancePlatform/timeOfDayRestriction.ts b/src/typings/balancePlatform/timeOfDayRestriction.ts index e5ba5199a..22b717b35 100644 --- a/src/typings/balancePlatform/timeOfDayRestriction.ts +++ b/src/typings/balancePlatform/timeOfDayRestriction.ts @@ -14,7 +14,7 @@ export class TimeOfDayRestriction { * Defines how the condition must be evaluated. */ 'operation': string; - 'value'?: TimeOfDay | null; + 'value'?: TimeOfDay; static discriminator: string | undefined = undefined; @@ -27,7 +27,7 @@ export class TimeOfDayRestriction { { "name": "value", "baseName": "value", - "type": "TimeOfDay | null" + "type": "TimeOfDay" } ]; static getAttributeTypeMap() { diff --git a/src/typings/balancePlatform/totalAmountRestriction.ts b/src/typings/balancePlatform/totalAmountRestriction.ts index d0065cfe2..2d5b2c423 100644 --- a/src/typings/balancePlatform/totalAmountRestriction.ts +++ b/src/typings/balancePlatform/totalAmountRestriction.ts @@ -14,7 +14,7 @@ export class TotalAmountRestriction { * Defines how the condition must be evaluated. */ 'operation': string; - 'value'?: Amount | null; + 'value'?: Amount; static discriminator: string | undefined = undefined; @@ -27,7 +27,7 @@ export class TotalAmountRestriction { { "name": "value", "baseName": "value", - "type": "Amount | null" + "type": "Amount" } ]; static getAttributeTypeMap() { diff --git a/src/typings/balancePlatform/transactionRule.ts b/src/typings/balancePlatform/transactionRule.ts index 0f59d2425..2a70ea162 100644 --- a/src/typings/balancePlatform/transactionRule.ts +++ b/src/typings/balancePlatform/transactionRule.ts @@ -141,25 +141,25 @@ export class TransactionRule { export namespace TransactionRule { export enum OutcomeTypeEnum { - EnforceSca = 'enforceSCA', - HardBlock = 'hardBlock', - ScoreBased = 'scoreBased', - TimedBlock = 'timedBlock' + EnforceSca = 'enforceSCA', + HardBlock = 'hardBlock', + ScoreBased = 'scoreBased', + TimedBlock = 'timedBlock' } export enum RequestTypeEnum { - Authentication = 'authentication', - Authorization = 'authorization', - BankTransfer = 'bankTransfer', - Tokenization = 'tokenization' + Authentication = 'authentication', + Authorization = 'authorization', + BankTransfer = 'bankTransfer', + Tokenization = 'tokenization' } export enum StatusEnum { - Active = 'active', - Inactive = 'inactive' + Active = 'active', + Inactive = 'inactive' } export enum TypeEnum { - AllowList = 'allowList', - BlockList = 'blockList', - MaxUsage = 'maxUsage', - Velocity = 'velocity' + AllowList = 'allowList', + BlockList = 'blockList', + MaxUsage = 'maxUsage', + Velocity = 'velocity' } } diff --git a/src/typings/balancePlatform/transactionRuleInfo.ts b/src/typings/balancePlatform/transactionRuleInfo.ts index b75b0b7e5..20914ffb1 100644 --- a/src/typings/balancePlatform/transactionRuleInfo.ts +++ b/src/typings/balancePlatform/transactionRuleInfo.ts @@ -132,25 +132,25 @@ export class TransactionRuleInfo { export namespace TransactionRuleInfo { export enum OutcomeTypeEnum { - EnforceSca = 'enforceSCA', - HardBlock = 'hardBlock', - ScoreBased = 'scoreBased', - TimedBlock = 'timedBlock' + EnforceSca = 'enforceSCA', + HardBlock = 'hardBlock', + ScoreBased = 'scoreBased', + TimedBlock = 'timedBlock' } export enum RequestTypeEnum { - Authentication = 'authentication', - Authorization = 'authorization', - BankTransfer = 'bankTransfer', - Tokenization = 'tokenization' + Authentication = 'authentication', + Authorization = 'authorization', + BankTransfer = 'bankTransfer', + Tokenization = 'tokenization' } export enum StatusEnum { - Active = 'active', - Inactive = 'inactive' + Active = 'active', + Inactive = 'inactive' } export enum TypeEnum { - AllowList = 'allowList', - BlockList = 'blockList', - MaxUsage = 'maxUsage', - Velocity = 'velocity' + AllowList = 'allowList', + BlockList = 'blockList', + MaxUsage = 'maxUsage', + Velocity = 'velocity' } } diff --git a/src/typings/balancePlatform/transactionRuleInterval.ts b/src/typings/balancePlatform/transactionRuleInterval.ts index d3cb3f96f..5b5abd504 100644 --- a/src/typings/balancePlatform/transactionRuleInterval.ts +++ b/src/typings/balancePlatform/transactionRuleInterval.ts @@ -18,7 +18,7 @@ export class TransactionRuleInterval { * The day of week, used when the `duration.unit` is **weeks**. If not provided, by default, this is set to **monday**. Possible values: **sunday**, **monday**, **tuesday**, **wednesday**, **thursday**, **friday**. */ 'dayOfWeek'?: TransactionRuleInterval.DayOfWeekEnum; - 'duration'?: Duration | null; + 'duration'?: Duration; /** * The time of day, in **hh:mm:ss** format, used when the `duration.unit` is **hours**. If not provided, by default, this is set to **00:00:00**. */ @@ -48,7 +48,7 @@ export class TransactionRuleInterval { { "name": "duration", "baseName": "duration", - "type": "Duration | null" + "type": "Duration" }, { "name": "timeOfDay", @@ -73,21 +73,21 @@ export class TransactionRuleInterval { export namespace TransactionRuleInterval { export enum DayOfWeekEnum { - Friday = 'friday', - Monday = 'monday', - Saturday = 'saturday', - Sunday = 'sunday', - Thursday = 'thursday', - Tuesday = 'tuesday', - Wednesday = 'wednesday' + Friday = 'friday', + Monday = 'monday', + Saturday = 'saturday', + Sunday = 'sunday', + Thursday = 'thursday', + Tuesday = 'tuesday', + Wednesday = 'wednesday' } export enum TypeEnum { - Daily = 'daily', - Lifetime = 'lifetime', - Monthly = 'monthly', - PerTransaction = 'perTransaction', - Rolling = 'rolling', - Sliding = 'sliding', - Weekly = 'weekly' + Daily = 'daily', + Lifetime = 'lifetime', + Monthly = 'monthly', + PerTransaction = 'perTransaction', + Rolling = 'rolling', + Sliding = 'sliding', + Weekly = 'weekly' } } diff --git a/src/typings/balancePlatform/transactionRuleResponse.ts b/src/typings/balancePlatform/transactionRuleResponse.ts index ca9a9c41f..a0ee4b0c2 100644 --- a/src/typings/balancePlatform/transactionRuleResponse.ts +++ b/src/typings/balancePlatform/transactionRuleResponse.ts @@ -10,7 +10,7 @@ import { TransactionRule } from './transactionRule'; export class TransactionRuleResponse { - 'transactionRule'?: TransactionRule | null; + 'transactionRule'?: TransactionRule; static discriminator: string | undefined = undefined; @@ -18,7 +18,7 @@ export class TransactionRuleResponse { { "name": "transactionRule", "baseName": "transactionRule", - "type": "TransactionRule | null" + "type": "TransactionRule" } ]; static getAttributeTypeMap() { diff --git a/src/typings/balancePlatform/transactionRuleRestrictions.ts b/src/typings/balancePlatform/transactionRuleRestrictions.ts index 1172c8312..3372e88ae 100644 --- a/src/typings/balancePlatform/transactionRuleRestrictions.ts +++ b/src/typings/balancePlatform/transactionRuleRestrictions.ts @@ -31,28 +31,28 @@ import { TokenRequestorsRestriction } from './tokenRequestorsRestriction'; import { TotalAmountRestriction } from './totalAmountRestriction'; export class TransactionRuleRestrictions { - 'activeNetworkTokens'?: ActiveNetworkTokensRestriction | null; - 'brandVariants'?: BrandVariantsRestriction | null; - 'counterpartyBank'?: CounterpartyBankRestriction | null; - 'counterpartyTypes'?: CounterpartyTypesRestriction | null; - 'countries'?: CountriesRestriction | null; - 'dayOfWeek'?: DayOfWeekRestriction | null; - 'differentCurrencies'?: DifferentCurrenciesRestriction | null; - 'entryModes'?: EntryModesRestriction | null; - 'internationalTransaction'?: InternationalTransactionRestriction | null; - 'matchingTransactions'?: MatchingTransactionsRestriction | null; - 'matchingValues'?: MatchingValuesRestriction | null; - 'mccs'?: MccsRestriction | null; - 'merchantNames'?: MerchantNamesRestriction | null; - 'merchants'?: MerchantsRestriction | null; - 'processingTypes'?: ProcessingTypesRestriction | null; - 'riskScores'?: RiskScoresRestriction | null; - 'sameAmountRestriction'?: SameAmountRestriction | null; - 'sameCounterpartyRestriction'?: SameCounterpartyRestriction | null; - 'sourceAccountTypes'?: SourceAccountTypesRestriction | null; - 'timeOfDay'?: TimeOfDayRestriction | null; - 'tokenRequestors'?: TokenRequestorsRestriction | null; - 'totalAmount'?: TotalAmountRestriction | null; + 'activeNetworkTokens'?: ActiveNetworkTokensRestriction; + 'brandVariants'?: BrandVariantsRestriction; + 'counterpartyBank'?: CounterpartyBankRestriction; + 'counterpartyTypes'?: CounterpartyTypesRestriction; + 'countries'?: CountriesRestriction; + 'dayOfWeek'?: DayOfWeekRestriction; + 'differentCurrencies'?: DifferentCurrenciesRestriction; + 'entryModes'?: EntryModesRestriction; + 'internationalTransaction'?: InternationalTransactionRestriction; + 'matchingTransactions'?: MatchingTransactionsRestriction; + 'matchingValues'?: MatchingValuesRestriction; + 'mccs'?: MccsRestriction; + 'merchantNames'?: MerchantNamesRestriction; + 'merchants'?: MerchantsRestriction; + 'processingTypes'?: ProcessingTypesRestriction; + 'riskScores'?: RiskScoresRestriction; + 'sameAmountRestriction'?: SameAmountRestriction; + 'sameCounterpartyRestriction'?: SameCounterpartyRestriction; + 'sourceAccountTypes'?: SourceAccountTypesRestriction; + 'timeOfDay'?: TimeOfDayRestriction; + 'tokenRequestors'?: TokenRequestorsRestriction; + 'totalAmount'?: TotalAmountRestriction; static discriminator: string | undefined = undefined; @@ -60,112 +60,112 @@ export class TransactionRuleRestrictions { { "name": "activeNetworkTokens", "baseName": "activeNetworkTokens", - "type": "ActiveNetworkTokensRestriction | null" + "type": "ActiveNetworkTokensRestriction" }, { "name": "brandVariants", "baseName": "brandVariants", - "type": "BrandVariantsRestriction | null" + "type": "BrandVariantsRestriction" }, { "name": "counterpartyBank", "baseName": "counterpartyBank", - "type": "CounterpartyBankRestriction | null" + "type": "CounterpartyBankRestriction" }, { "name": "counterpartyTypes", "baseName": "counterpartyTypes", - "type": "CounterpartyTypesRestriction | null" + "type": "CounterpartyTypesRestriction" }, { "name": "countries", "baseName": "countries", - "type": "CountriesRestriction | null" + "type": "CountriesRestriction" }, { "name": "dayOfWeek", "baseName": "dayOfWeek", - "type": "DayOfWeekRestriction | null" + "type": "DayOfWeekRestriction" }, { "name": "differentCurrencies", "baseName": "differentCurrencies", - "type": "DifferentCurrenciesRestriction | null" + "type": "DifferentCurrenciesRestriction" }, { "name": "entryModes", "baseName": "entryModes", - "type": "EntryModesRestriction | null" + "type": "EntryModesRestriction" }, { "name": "internationalTransaction", "baseName": "internationalTransaction", - "type": "InternationalTransactionRestriction | null" + "type": "InternationalTransactionRestriction" }, { "name": "matchingTransactions", "baseName": "matchingTransactions", - "type": "MatchingTransactionsRestriction | null" + "type": "MatchingTransactionsRestriction" }, { "name": "matchingValues", "baseName": "matchingValues", - "type": "MatchingValuesRestriction | null" + "type": "MatchingValuesRestriction" }, { "name": "mccs", "baseName": "mccs", - "type": "MccsRestriction | null" + "type": "MccsRestriction" }, { "name": "merchantNames", "baseName": "merchantNames", - "type": "MerchantNamesRestriction | null" + "type": "MerchantNamesRestriction" }, { "name": "merchants", "baseName": "merchants", - "type": "MerchantsRestriction | null" + "type": "MerchantsRestriction" }, { "name": "processingTypes", "baseName": "processingTypes", - "type": "ProcessingTypesRestriction | null" + "type": "ProcessingTypesRestriction" }, { "name": "riskScores", "baseName": "riskScores", - "type": "RiskScoresRestriction | null" + "type": "RiskScoresRestriction" }, { "name": "sameAmountRestriction", "baseName": "sameAmountRestriction", - "type": "SameAmountRestriction | null" + "type": "SameAmountRestriction" }, { "name": "sameCounterpartyRestriction", "baseName": "sameCounterpartyRestriction", - "type": "SameCounterpartyRestriction | null" + "type": "SameCounterpartyRestriction" }, { "name": "sourceAccountTypes", "baseName": "sourceAccountTypes", - "type": "SourceAccountTypesRestriction | null" + "type": "SourceAccountTypesRestriction" }, { "name": "timeOfDay", "baseName": "timeOfDay", - "type": "TimeOfDayRestriction | null" + "type": "TimeOfDayRestriction" }, { "name": "tokenRequestors", "baseName": "tokenRequestors", - "type": "TokenRequestorsRestriction | null" + "type": "TokenRequestorsRestriction" }, { "name": "totalAmount", "baseName": "totalAmount", - "type": "TotalAmountRestriction | null" + "type": "TotalAmountRestriction" } ]; static getAttributeTypeMap() { diff --git a/src/typings/balancePlatform/transferRoute.ts b/src/typings/balancePlatform/transferRoute.ts index 2b8862ae9..1622cffc7 100644 --- a/src/typings/balancePlatform/transferRoute.ts +++ b/src/typings/balancePlatform/transferRoute.ts @@ -7,13 +7,7 @@ * Do not edit this class manually. */ -import { AddressRequirement } from './addressRequirement'; -import { AmountMinMaxRequirement } from './amountMinMaxRequirement'; -import { AmountNonZeroDecimalsRequirement } from './amountNonZeroDecimalsRequirement'; -import { BankAccountIdentificationTypeRequirement } from './bankAccountIdentificationTypeRequirement'; -import { IbanAccountIdentificationRequirement } from './ibanAccountIdentificationRequirement'; -import { PaymentInstrumentRequirement } from './paymentInstrumentRequirement'; -import { USInternationalAchAddressRequirement } from './uSInternationalAchAddressRequirement'; +import { TransferRouteRequirementsInner } from './transferRouteRequirementsInner'; export class TransferRoute { /** @@ -35,7 +29,7 @@ export class TransferRoute { /** * A set of rules defined by clearing houses and banking partners. Your transfer request must adhere to these rules to ensure successful initiation of transfer. Based on the priority, one or more requirements may be returned. Each requirement is defined with a `type` and `description`. */ - 'requirements'?: Array; + 'requirements'?: Array; static discriminator: string | undefined = undefined; @@ -63,7 +57,7 @@ export class TransferRoute { { "name": "requirements", "baseName": "requirements", - "type": "Array" + "type": "Array" } ]; static getAttributeTypeMap() { @@ -73,22 +67,22 @@ export class TransferRoute { export namespace TransferRoute { export enum CategoryEnum { - Bank = 'bank', - Card = 'card', - Grants = 'grants', - Internal = 'internal', - IssuedCard = 'issuedCard', - Migration = 'migration', - PlatformPayment = 'platformPayment', - TopUp = 'topUp', - Upgrade = 'upgrade' + Bank = 'bank', + Card = 'card', + Grants = 'grants', + Internal = 'internal', + IssuedCard = 'issuedCard', + Migration = 'migration', + PlatformPayment = 'platformPayment', + TopUp = 'topUp', + Upgrade = 'upgrade' } export enum PriorityEnum { - CrossBorder = 'crossBorder', - Fast = 'fast', - Instant = 'instant', - Internal = 'internal', - Regular = 'regular', - Wire = 'wire' + CrossBorder = 'crossBorder', + Fast = 'fast', + Instant = 'instant', + Internal = 'internal', + Regular = 'regular', + Wire = 'wire' } } diff --git a/src/typings/balancePlatform/transferRouteRequest.ts b/src/typings/balancePlatform/transferRouteRequest.ts index d2dfd8ac0..c1ab3a671 100644 --- a/src/typings/balancePlatform/transferRouteRequest.ts +++ b/src/typings/balancePlatform/transferRouteRequest.ts @@ -22,7 +22,7 @@ export class TransferRouteRequest { * The type of transfer. Possible values: - **bank**: Transfer to a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. */ 'category': TransferRouteRequest.CategoryEnum; - 'counterparty'?: Counterparty | null; + 'counterparty'?: Counterparty; /** * The two-character ISO-3166-1 alpha-2 country code of the counterparty. For example, **US** or **NL**. > Either `counterparty` or `country` field must be provided in a transfer route request. */ @@ -57,7 +57,7 @@ export class TransferRouteRequest { { "name": "counterparty", "baseName": "counterparty", - "type": "Counterparty | null" + "type": "Counterparty" }, { "name": "country", @@ -82,14 +82,14 @@ export class TransferRouteRequest { export namespace TransferRouteRequest { export enum CategoryEnum { - Bank = 'bank' + Bank = 'bank' } export enum PrioritiesEnum { - CrossBorder = 'crossBorder', - Fast = 'fast', - Instant = 'instant', - Internal = 'internal', - Regular = 'regular', - Wire = 'wire' + CrossBorder = 'crossBorder', + Fast = 'fast', + Instant = 'instant', + Internal = 'internal', + Regular = 'regular', + Wire = 'wire' } } diff --git a/src/typings/balancePlatform/transferRouteRequirementsInner.ts b/src/typings/balancePlatform/transferRouteRequirementsInner.ts new file mode 100644 index 000000000..e1d782826 --- /dev/null +++ b/src/typings/balancePlatform/transferRouteRequirementsInner.ts @@ -0,0 +1,168 @@ +/* + * The version of the OpenAPI document: v2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { AddressRequirement } from './addressRequirement'; +import { AmountMinMaxRequirement } from './amountMinMaxRequirement'; +import { AmountNonZeroDecimalsRequirement } from './amountNonZeroDecimalsRequirement'; +import { BankAccountIdentificationTypeRequirement } from './bankAccountIdentificationTypeRequirement'; +import { IbanAccountIdentificationRequirement } from './ibanAccountIdentificationRequirement'; +import { PaymentInstrumentRequirement } from './paymentInstrumentRequirement'; +import { USInternationalAchAddressRequirement } from './uSInternationalAchAddressRequirement'; + +export class TransferRouteRequirementsInner { + /** + * Specifies that you must provide a complete street address for International ACH (IAT) transactions. + */ + 'description'?: string; + /** + * List of address fields. + */ + 'requiredAddressFields'?: Array; + /** + * **addressRequirement** + */ + 'type': TransferRouteRequirementsInner.TypeEnum = TransferRouteRequirementsInner.TypeEnum.AddressRequirement; + /** + * Maximum amount. + */ + 'max'?: number; + /** + * Minimum amount. + */ + 'min'?: number; + /** + * List of bank account identification types: eg.; [iban , numberAndBic] + */ + 'bankAccountIdentificationTypes'?: Array; + /** + * Contains the list of allowed prefixes for international bank accounts. For example: NL, US, UK. + */ + 'ibanPrefixes'?: Array; + /** + * The two-character [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code where the payment instrument is issued. For example, **NL** or **US**. + */ + 'issuingCountryCode'?: string; + /** + * The two-character ISO-3166-1 alpha-2 country code list for payment instruments. + */ + 'issuingCountryCodes'?: Array; + /** + * Specifies if the requirement only applies to transfers to another balance platform. + */ + 'onlyForCrossBalancePlatform'?: boolean; + /** + * The type of the payment instrument. For example, \"BankAccount\" or \"Card\". + */ + 'paymentInstrumentType'?: TransferRouteRequirementsInner.PaymentInstrumentTypeEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "description", + "baseName": "description", + "type": "string" + }, + { + "name": "requiredAddressFields", + "baseName": "requiredAddressFields", + "type": "Array" + }, + { + "name": "type", + "baseName": "type", + "type": "TransferRouteRequirementsInner.TypeEnum" + }, + { + "name": "max", + "baseName": "max", + "type": "number" + }, + { + "name": "min", + "baseName": "min", + "type": "number" + }, + { + "name": "bankAccountIdentificationTypes", + "baseName": "bankAccountIdentificationTypes", + "type": "Array" + }, + { + "name": "ibanPrefixes", + "baseName": "ibanPrefixes", + "type": "Array" + }, + { + "name": "issuingCountryCode", + "baseName": "issuingCountryCode", + "type": "string" + }, + { + "name": "issuingCountryCodes", + "baseName": "issuingCountryCodes", + "type": "Array" + }, + { + "name": "onlyForCrossBalancePlatform", + "baseName": "onlyForCrossBalancePlatform", + "type": "boolean" + }, + { + "name": "paymentInstrumentType", + "baseName": "paymentInstrumentType", + "type": "TransferRouteRequirementsInner.PaymentInstrumentTypeEnum" + } ]; + + static getAttributeTypeMap() { + return TransferRouteRequirementsInner.attributeTypeMap; + } +} + +export namespace TransferRouteRequirementsInner { + export enum RequiredAddressFieldsEnum { + City = 'city', + Country = 'country', + Line1 = 'line1', + PostalCode = 'postalCode', + StateOrProvince = 'stateOrProvince' + } + export enum TypeEnum { + AddressRequirement = 'addressRequirement', + AmountMinMaxRequirement = 'amountMinMaxRequirement', + AmountNonZeroDecimalsRequirement = 'amountNonZeroDecimalsRequirement', + BankAccountIdentificationTypeRequirement = 'bankAccountIdentificationTypeRequirement', + IbanAccountIdentificationRequirement = 'ibanAccountIdentificationRequirement', + PaymentInstrumentRequirement = 'paymentInstrumentRequirement', + UsInternationalAchAddressRequirement = 'usInternationalAchAddressRequirement' + } + export enum BankAccountIdentificationTypesEnum { + AuLocal = 'auLocal', + BrLocal = 'brLocal', + CaLocal = 'caLocal', + CzLocal = 'czLocal', + DkLocal = 'dkLocal', + HkLocal = 'hkLocal', + HuLocal = 'huLocal', + Iban = 'iban', + Legacy = 'legacy', + NoLocal = 'noLocal', + NumberAndBic = 'numberAndBic', + NzLocal = 'nzLocal', + PlLocal = 'plLocal', + SeLocal = 'seLocal', + SgLocal = 'sgLocal', + UkLocal = 'ukLocal', + UsLocal = 'usLocal' + } + export enum PaymentInstrumentTypeEnum { + BankAccount = 'BankAccount', + Card = 'Card' + } +} diff --git a/src/typings/balancePlatform/uKLocalAccountIdentification.ts b/src/typings/balancePlatform/uKLocalAccountIdentification.ts index dc7fd2267..4381da803 100644 --- a/src/typings/balancePlatform/uKLocalAccountIdentification.ts +++ b/src/typings/balancePlatform/uKLocalAccountIdentification.ts @@ -20,7 +20,7 @@ export class UKLocalAccountIdentification { /** * **ukLocal** */ - 'type': UKLocalAccountIdentification.TypeEnum; + 'type': UKLocalAccountIdentification.TypeEnum = UKLocalAccountIdentification.TypeEnum.UkLocal; static discriminator: string | undefined = undefined; @@ -48,6 +48,6 @@ export class UKLocalAccountIdentification { export namespace UKLocalAccountIdentification { export enum TypeEnum { - UkLocal = 'ukLocal' + UkLocal = 'ukLocal' } } diff --git a/src/typings/balancePlatform/uSInternationalAchAddressRequirement.ts b/src/typings/balancePlatform/uSInternationalAchAddressRequirement.ts index f9e7a0b3b..63af208f6 100644 --- a/src/typings/balancePlatform/uSInternationalAchAddressRequirement.ts +++ b/src/typings/balancePlatform/uSInternationalAchAddressRequirement.ts @@ -16,7 +16,7 @@ export class USInternationalAchAddressRequirement { /** * **usInternationalAchAddressRequirement** */ - 'type': USInternationalAchAddressRequirement.TypeEnum; + 'type': USInternationalAchAddressRequirement.TypeEnum = USInternationalAchAddressRequirement.TypeEnum.UsInternationalAchAddressRequirement; static discriminator: string | undefined = undefined; @@ -39,6 +39,6 @@ export class USInternationalAchAddressRequirement { export namespace USInternationalAchAddressRequirement { export enum TypeEnum { - UsInternationalAchAddressRequirement = 'usInternationalAchAddressRequirement' + UsInternationalAchAddressRequirement = 'usInternationalAchAddressRequirement' } } diff --git a/src/typings/balancePlatform/uSLocalAccountIdentification.ts b/src/typings/balancePlatform/uSLocalAccountIdentification.ts index af0ddefd0..389699391 100644 --- a/src/typings/balancePlatform/uSLocalAccountIdentification.ts +++ b/src/typings/balancePlatform/uSLocalAccountIdentification.ts @@ -16,7 +16,7 @@ export class USLocalAccountIdentification { /** * The bank account type. Possible values: **checking** or **savings**. Defaults to **checking**. */ - 'accountType'?: USLocalAccountIdentification.AccountTypeEnum; + 'accountType'?: USLocalAccountIdentification.AccountTypeEnum = USLocalAccountIdentification.AccountTypeEnum.Checking; /** * The 9-digit [routing number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without separators or whitespace. */ @@ -24,7 +24,7 @@ export class USLocalAccountIdentification { /** * **usLocal** */ - 'type': USLocalAccountIdentification.TypeEnum; + 'type': USLocalAccountIdentification.TypeEnum = USLocalAccountIdentification.TypeEnum.UsLocal; static discriminator: string | undefined = undefined; @@ -57,10 +57,10 @@ export class USLocalAccountIdentification { export namespace USLocalAccountIdentification { export enum AccountTypeEnum { - Checking = 'checking', - Savings = 'savings' + Checking = 'checking', + Savings = 'savings' } export enum TypeEnum { - UsLocal = 'usLocal' + UsLocal = 'usLocal' } } diff --git a/src/typings/balancePlatform/updateNetworkTokenRequest.ts b/src/typings/balancePlatform/updateNetworkTokenRequest.ts index d5e827f4c..e6de3b163 100644 --- a/src/typings/balancePlatform/updateNetworkTokenRequest.ts +++ b/src/typings/balancePlatform/updateNetworkTokenRequest.ts @@ -30,8 +30,8 @@ export class UpdateNetworkTokenRequest { export namespace UpdateNetworkTokenRequest { export enum StatusEnum { - Active = 'active', - Suspended = 'suspended', - Closed = 'closed' + Active = 'active', + Suspended = 'suspended', + Closed = 'closed' } } diff --git a/src/typings/balancePlatform/updatePaymentInstrument.ts b/src/typings/balancePlatform/updatePaymentInstrument.ts index 57842bc71..9d929f1fd 100644 --- a/src/typings/balancePlatform/updatePaymentInstrument.ts +++ b/src/typings/balancePlatform/updatePaymentInstrument.ts @@ -9,7 +9,7 @@ import { BankAccountDetails } from './bankAccountDetails'; import { Card } from './card'; -import { IbanAccountIdentification } from './ibanAccountIdentification'; +import { PaymentInstrumentAdditionalBankAccountIdentificationsInner } from './paymentInstrumentAdditionalBankAccountIdentificationsInner'; export class UpdatePaymentInstrument { /** @@ -18,13 +18,13 @@ export class UpdatePaymentInstrument { * @deprecated since Configuration API v2 * Please use `bankAccount` object instead */ - 'additionalBankAccountIdentifications'?: Array; + 'additionalBankAccountIdentifications'?: Array; /** * The unique identifier of the [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/v1/post/balanceAccounts__resParam_id) associated with the payment instrument. */ 'balanceAccountId': string; - 'bankAccount'?: BankAccountDetails | null; - 'card'?: Card | null; + 'bankAccount'?: BankAccountDetails; + 'card'?: Card; /** * Your description for the payment instrument, maximum 300 characters. */ @@ -68,7 +68,7 @@ export class UpdatePaymentInstrument { { "name": "additionalBankAccountIdentifications", "baseName": "additionalBankAccountIdentifications", - "type": "Array" + "type": "Array" }, { "name": "balanceAccountId", @@ -78,12 +78,12 @@ export class UpdatePaymentInstrument { { "name": "bankAccount", "baseName": "bankAccount", - "type": "BankAccountDetails | null" + "type": "BankAccountDetails" }, { "name": "card", "baseName": "card", - "type": "Card | null" + "type": "Card" }, { "name": "description", @@ -138,24 +138,24 @@ export class UpdatePaymentInstrument { export namespace UpdatePaymentInstrument { export enum StatusEnum { - Active = 'active', - Closed = 'closed', - Inactive = 'inactive', - Suspended = 'suspended' + Active = 'active', + Closed = 'closed', + Inactive = 'inactive', + Suspended = 'suspended' } export enum StatusReasonEnum { - AccountClosure = 'accountClosure', - Damaged = 'damaged', - EndOfLife = 'endOfLife', - Expired = 'expired', - Lost = 'lost', - Other = 'other', - Stolen = 'stolen', - SuspectedFraud = 'suspectedFraud', - TransactionRule = 'transactionRule' + AccountClosure = 'accountClosure', + Damaged = 'damaged', + EndOfLife = 'endOfLife', + Expired = 'expired', + Lost = 'lost', + Other = 'other', + Stolen = 'stolen', + SuspectedFraud = 'suspectedFraud', + TransactionRule = 'transactionRule' } export enum TypeEnum { - BankAccount = 'bankAccount', - Card = 'card' + BankAccount = 'bankAccount', + Card = 'card' } } diff --git a/src/typings/balancePlatform/updateSweepConfigurationV2.ts b/src/typings/balancePlatform/updateSweepConfigurationV2.ts index d74461c0b..40de6c200 100644 --- a/src/typings/balancePlatform/updateSweepConfigurationV2.ts +++ b/src/typings/balancePlatform/updateSweepConfigurationV2.ts @@ -16,7 +16,7 @@ export class UpdateSweepConfigurationV2 { * The type of transfer that results from the sweep. Possible values: - **bank**: Sweep to a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id). - **internal**: Transfer to another [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. Required when setting `priorities`. */ 'category'?: UpdateSweepConfigurationV2.CategoryEnum; - 'counterparty'?: SweepCounterparty | null; + 'counterparty'?: SweepCounterparty; /** * The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes) in uppercase. For example, **EUR**. The sweep currency must match any of the [balances currencies](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/balanceAccounts/{id}__resParam_balances). */ @@ -49,18 +49,18 @@ export class UpdateSweepConfigurationV2 { * The reference sent to or received from the counterparty. Only alphanumeric characters are allowed. */ 'referenceForBeneficiary'?: string; - 'schedule'?: SweepSchedule | null; + 'schedule'?: SweepSchedule; /** * The status of the sweep. If not provided, by default, this is set to **active**. Possible values: * **active**: the sweep is enabled and funds will be pulled in or pushed out based on the defined configuration. * **inactive**: the sweep is disabled and cannot be triggered. */ 'status'?: UpdateSweepConfigurationV2.StatusEnum; - 'sweepAmount'?: Amount | null; - 'targetAmount'?: Amount | null; - 'triggerAmount'?: Amount | null; + 'sweepAmount'?: Amount; + 'targetAmount'?: Amount; + 'triggerAmount'?: Amount; /** * The direction of sweep, whether pushing out or pulling in funds to the balance account. If not provided, by default, this is set to **push**. Possible values: * **push**: _push out funds_ to a destination balance account or transfer instrument. * **pull**: _pull in funds_ from a source merchant account, transfer instrument, or balance account. */ - 'type'?: UpdateSweepConfigurationV2.TypeEnum; + 'type'?: UpdateSweepConfigurationV2.TypeEnum = UpdateSweepConfigurationV2.TypeEnum.Push; static discriminator: string | undefined = undefined; @@ -73,7 +73,7 @@ export class UpdateSweepConfigurationV2 { { "name": "counterparty", "baseName": "counterparty", - "type": "SweepCounterparty | null" + "type": "SweepCounterparty" }, { "name": "currency", @@ -118,7 +118,7 @@ export class UpdateSweepConfigurationV2 { { "name": "schedule", "baseName": "schedule", - "type": "SweepSchedule | null" + "type": "SweepSchedule" }, { "name": "status", @@ -128,17 +128,17 @@ export class UpdateSweepConfigurationV2 { { "name": "sweepAmount", "baseName": "sweepAmount", - "type": "Amount | null" + "type": "Amount" }, { "name": "targetAmount", "baseName": "targetAmount", - "type": "Amount | null" + "type": "Amount" }, { "name": "triggerAmount", "baseName": "triggerAmount", - "type": "Amount | null" + "type": "Amount" }, { "name": "type", @@ -153,49 +153,49 @@ export class UpdateSweepConfigurationV2 { export namespace UpdateSweepConfigurationV2 { export enum CategoryEnum { - Bank = 'bank', - Internal = 'internal', - PlatformPayment = 'platformPayment' + Bank = 'bank', + Internal = 'internal', + PlatformPayment = 'platformPayment' } export enum PrioritiesEnum { - CrossBorder = 'crossBorder', - Fast = 'fast', - Instant = 'instant', - Internal = 'internal', - Regular = 'regular', - Wire = 'wire' + CrossBorder = 'crossBorder', + Fast = 'fast', + Instant = 'instant', + Internal = 'internal', + Regular = 'regular', + Wire = 'wire' } export enum ReasonEnum { - AccountHierarchyNotActive = 'accountHierarchyNotActive', - AmountLimitExceeded = 'amountLimitExceeded', - Approved = 'approved', - BalanceAccountTemporarilyBlockedByTransactionRule = 'balanceAccountTemporarilyBlockedByTransactionRule', - CounterpartyAccountBlocked = 'counterpartyAccountBlocked', - CounterpartyAccountClosed = 'counterpartyAccountClosed', - CounterpartyAccountNotFound = 'counterpartyAccountNotFound', - CounterpartyAddressRequired = 'counterpartyAddressRequired', - CounterpartyBankTimedOut = 'counterpartyBankTimedOut', - CounterpartyBankUnavailable = 'counterpartyBankUnavailable', - Declined = 'declined', - DeclinedByTransactionRule = 'declinedByTransactionRule', - DirectDebitNotSupported = 'directDebitNotSupported', - Error = 'error', - NotEnoughBalance = 'notEnoughBalance', - PendingApproval = 'pendingApproval', - PendingExecution = 'pendingExecution', - RefusedByCounterpartyBank = 'refusedByCounterpartyBank', - RefusedByCustomer = 'refusedByCustomer', - RouteNotFound = 'routeNotFound', - ScaFailed = 'scaFailed', - TransferInstrumentDoesNotExist = 'transferInstrumentDoesNotExist', - Unknown = 'unknown' + AccountHierarchyNotActive = 'accountHierarchyNotActive', + AmountLimitExceeded = 'amountLimitExceeded', + Approved = 'approved', + BalanceAccountTemporarilyBlockedByTransactionRule = 'balanceAccountTemporarilyBlockedByTransactionRule', + CounterpartyAccountBlocked = 'counterpartyAccountBlocked', + CounterpartyAccountClosed = 'counterpartyAccountClosed', + CounterpartyAccountNotFound = 'counterpartyAccountNotFound', + CounterpartyAddressRequired = 'counterpartyAddressRequired', + CounterpartyBankTimedOut = 'counterpartyBankTimedOut', + CounterpartyBankUnavailable = 'counterpartyBankUnavailable', + Declined = 'declined', + DeclinedByTransactionRule = 'declinedByTransactionRule', + DirectDebitNotSupported = 'directDebitNotSupported', + Error = 'error', + NotEnoughBalance = 'notEnoughBalance', + PendingApproval = 'pendingApproval', + PendingExecution = 'pendingExecution', + RefusedByCounterpartyBank = 'refusedByCounterpartyBank', + RefusedByCustomer = 'refusedByCustomer', + RouteNotFound = 'routeNotFound', + ScaFailed = 'scaFailed', + TransferInstrumentDoesNotExist = 'transferInstrumentDoesNotExist', + Unknown = 'unknown' } export enum StatusEnum { - Active = 'active', - Inactive = 'inactive' + Active = 'active', + Inactive = 'inactive' } export enum TypeEnum { - Pull = 'pull', - Push = 'push' + Pull = 'pull', + Push = 'push' } } diff --git a/src/typings/balancePlatform/verificationDeadline.ts b/src/typings/balancePlatform/verificationDeadline.ts index 169e3f154..8d7afea1c 100644 --- a/src/typings/balancePlatform/verificationDeadline.ts +++ b/src/typings/balancePlatform/verificationDeadline.ts @@ -48,60 +48,60 @@ export class VerificationDeadline { export namespace VerificationDeadline { export enum CapabilitiesEnum { - AcceptExternalFunding = 'acceptExternalFunding', - AcceptPspFunding = 'acceptPspFunding', - AcceptTransactionInRestrictedCountries = 'acceptTransactionInRestrictedCountries', - AcceptTransactionInRestrictedCountriesCommercial = 'acceptTransactionInRestrictedCountriesCommercial', - AcceptTransactionInRestrictedCountriesConsumer = 'acceptTransactionInRestrictedCountriesConsumer', - AcceptTransactionInRestrictedIndustries = 'acceptTransactionInRestrictedIndustries', - AcceptTransactionInRestrictedIndustriesCommercial = 'acceptTransactionInRestrictedIndustriesCommercial', - AcceptTransactionInRestrictedIndustriesConsumer = 'acceptTransactionInRestrictedIndustriesConsumer', - Acquiring = 'acquiring', - AtmWithdrawal = 'atmWithdrawal', - AtmWithdrawalCommercial = 'atmWithdrawalCommercial', - AtmWithdrawalConsumer = 'atmWithdrawalConsumer', - AtmWithdrawalInRestrictedCountries = 'atmWithdrawalInRestrictedCountries', - AtmWithdrawalInRestrictedCountriesCommercial = 'atmWithdrawalInRestrictedCountriesCommercial', - AtmWithdrawalInRestrictedCountriesConsumer = 'atmWithdrawalInRestrictedCountriesConsumer', - AuthorisedPaymentInstrumentUser = 'authorisedPaymentInstrumentUser', - GetGrantOffers = 'getGrantOffers', - IssueBankAccount = 'issueBankAccount', - IssueCard = 'issueCard', - IssueCardCommercial = 'issueCardCommercial', - IssueCardConsumer = 'issueCardConsumer', - IssueChargeCard = 'issueChargeCard', - IssueChargeCardCommercial = 'issueChargeCardCommercial', - IssueCreditLimit = 'issueCreditLimit', - LocalAcceptance = 'localAcceptance', - Payout = 'payout', - PayoutToTransferInstrument = 'payoutToTransferInstrument', - Processing = 'processing', - ReceiveFromBalanceAccount = 'receiveFromBalanceAccount', - ReceiveFromPlatformPayments = 'receiveFromPlatformPayments', - ReceiveFromThirdParty = 'receiveFromThirdParty', - ReceiveFromTransferInstrument = 'receiveFromTransferInstrument', - ReceiveGrants = 'receiveGrants', - ReceivePayments = 'receivePayments', - SendToBalanceAccount = 'sendToBalanceAccount', - SendToThirdParty = 'sendToThirdParty', - SendToTransferInstrument = 'sendToTransferInstrument', - ThirdPartyFunding = 'thirdPartyFunding', - UseCard = 'useCard', - UseCardCommercial = 'useCardCommercial', - UseCardConsumer = 'useCardConsumer', - UseCardInRestrictedCountries = 'useCardInRestrictedCountries', - UseCardInRestrictedCountriesCommercial = 'useCardInRestrictedCountriesCommercial', - UseCardInRestrictedCountriesConsumer = 'useCardInRestrictedCountriesConsumer', - UseCardInRestrictedIndustries = 'useCardInRestrictedIndustries', - UseCardInRestrictedIndustriesCommercial = 'useCardInRestrictedIndustriesCommercial', - UseCardInRestrictedIndustriesConsumer = 'useCardInRestrictedIndustriesConsumer', - UseChargeCard = 'useChargeCard', - UseChargeCardCommercial = 'useChargeCardCommercial', - WithdrawFromAtm = 'withdrawFromAtm', - WithdrawFromAtmCommercial = 'withdrawFromAtmCommercial', - WithdrawFromAtmConsumer = 'withdrawFromAtmConsumer', - WithdrawFromAtmInRestrictedCountries = 'withdrawFromAtmInRestrictedCountries', - WithdrawFromAtmInRestrictedCountriesCommercial = 'withdrawFromAtmInRestrictedCountriesCommercial', - WithdrawFromAtmInRestrictedCountriesConsumer = 'withdrawFromAtmInRestrictedCountriesConsumer' + AcceptExternalFunding = 'acceptExternalFunding', + AcceptPspFunding = 'acceptPspFunding', + AcceptTransactionInRestrictedCountries = 'acceptTransactionInRestrictedCountries', + AcceptTransactionInRestrictedCountriesCommercial = 'acceptTransactionInRestrictedCountriesCommercial', + AcceptTransactionInRestrictedCountriesConsumer = 'acceptTransactionInRestrictedCountriesConsumer', + AcceptTransactionInRestrictedIndustries = 'acceptTransactionInRestrictedIndustries', + AcceptTransactionInRestrictedIndustriesCommercial = 'acceptTransactionInRestrictedIndustriesCommercial', + AcceptTransactionInRestrictedIndustriesConsumer = 'acceptTransactionInRestrictedIndustriesConsumer', + Acquiring = 'acquiring', + AtmWithdrawal = 'atmWithdrawal', + AtmWithdrawalCommercial = 'atmWithdrawalCommercial', + AtmWithdrawalConsumer = 'atmWithdrawalConsumer', + AtmWithdrawalInRestrictedCountries = 'atmWithdrawalInRestrictedCountries', + AtmWithdrawalInRestrictedCountriesCommercial = 'atmWithdrawalInRestrictedCountriesCommercial', + AtmWithdrawalInRestrictedCountriesConsumer = 'atmWithdrawalInRestrictedCountriesConsumer', + AuthorisedPaymentInstrumentUser = 'authorisedPaymentInstrumentUser', + GetGrantOffers = 'getGrantOffers', + IssueBankAccount = 'issueBankAccount', + IssueCard = 'issueCard', + IssueCardCommercial = 'issueCardCommercial', + IssueCardConsumer = 'issueCardConsumer', + IssueChargeCard = 'issueChargeCard', + IssueChargeCardCommercial = 'issueChargeCardCommercial', + IssueCreditLimit = 'issueCreditLimit', + LocalAcceptance = 'localAcceptance', + Payout = 'payout', + PayoutToTransferInstrument = 'payoutToTransferInstrument', + Processing = 'processing', + ReceiveFromBalanceAccount = 'receiveFromBalanceAccount', + ReceiveFromPlatformPayments = 'receiveFromPlatformPayments', + ReceiveFromThirdParty = 'receiveFromThirdParty', + ReceiveFromTransferInstrument = 'receiveFromTransferInstrument', + ReceiveGrants = 'receiveGrants', + ReceivePayments = 'receivePayments', + SendToBalanceAccount = 'sendToBalanceAccount', + SendToThirdParty = 'sendToThirdParty', + SendToTransferInstrument = 'sendToTransferInstrument', + ThirdPartyFunding = 'thirdPartyFunding', + UseCard = 'useCard', + UseCardCommercial = 'useCardCommercial', + UseCardConsumer = 'useCardConsumer', + UseCardInRestrictedCountries = 'useCardInRestrictedCountries', + UseCardInRestrictedCountriesCommercial = 'useCardInRestrictedCountriesCommercial', + UseCardInRestrictedCountriesConsumer = 'useCardInRestrictedCountriesConsumer', + UseCardInRestrictedIndustries = 'useCardInRestrictedIndustries', + UseCardInRestrictedIndustriesCommercial = 'useCardInRestrictedIndustriesCommercial', + UseCardInRestrictedIndustriesConsumer = 'useCardInRestrictedIndustriesConsumer', + UseChargeCard = 'useChargeCard', + UseChargeCardCommercial = 'useChargeCardCommercial', + WithdrawFromAtm = 'withdrawFromAtm', + WithdrawFromAtmCommercial = 'withdrawFromAtmCommercial', + WithdrawFromAtmConsumer = 'withdrawFromAtmConsumer', + WithdrawFromAtmInRestrictedCountries = 'withdrawFromAtmInRestrictedCountries', + WithdrawFromAtmInRestrictedCountriesCommercial = 'withdrawFromAtmInRestrictedCountriesCommercial', + WithdrawFromAtmInRestrictedCountriesConsumer = 'withdrawFromAtmInRestrictedCountriesConsumer' } } diff --git a/src/typings/balancePlatform/verificationError.ts b/src/typings/balancePlatform/verificationError.ts index dad217dce..5d7917853 100644 --- a/src/typings/balancePlatform/verificationError.ts +++ b/src/typings/balancePlatform/verificationError.ts @@ -77,65 +77,65 @@ export class VerificationError { export namespace VerificationError { export enum CapabilitiesEnum { - AcceptExternalFunding = 'acceptExternalFunding', - AcceptPspFunding = 'acceptPspFunding', - AcceptTransactionInRestrictedCountries = 'acceptTransactionInRestrictedCountries', - AcceptTransactionInRestrictedCountriesCommercial = 'acceptTransactionInRestrictedCountriesCommercial', - AcceptTransactionInRestrictedCountriesConsumer = 'acceptTransactionInRestrictedCountriesConsumer', - AcceptTransactionInRestrictedIndustries = 'acceptTransactionInRestrictedIndustries', - AcceptTransactionInRestrictedIndustriesCommercial = 'acceptTransactionInRestrictedIndustriesCommercial', - AcceptTransactionInRestrictedIndustriesConsumer = 'acceptTransactionInRestrictedIndustriesConsumer', - Acquiring = 'acquiring', - AtmWithdrawal = 'atmWithdrawal', - AtmWithdrawalCommercial = 'atmWithdrawalCommercial', - AtmWithdrawalConsumer = 'atmWithdrawalConsumer', - AtmWithdrawalInRestrictedCountries = 'atmWithdrawalInRestrictedCountries', - AtmWithdrawalInRestrictedCountriesCommercial = 'atmWithdrawalInRestrictedCountriesCommercial', - AtmWithdrawalInRestrictedCountriesConsumer = 'atmWithdrawalInRestrictedCountriesConsumer', - AuthorisedPaymentInstrumentUser = 'authorisedPaymentInstrumentUser', - GetGrantOffers = 'getGrantOffers', - IssueBankAccount = 'issueBankAccount', - IssueCard = 'issueCard', - IssueCardCommercial = 'issueCardCommercial', - IssueCardConsumer = 'issueCardConsumer', - IssueChargeCard = 'issueChargeCard', - IssueChargeCardCommercial = 'issueChargeCardCommercial', - IssueCreditLimit = 'issueCreditLimit', - LocalAcceptance = 'localAcceptance', - Payout = 'payout', - PayoutToTransferInstrument = 'payoutToTransferInstrument', - Processing = 'processing', - ReceiveFromBalanceAccount = 'receiveFromBalanceAccount', - ReceiveFromPlatformPayments = 'receiveFromPlatformPayments', - ReceiveFromThirdParty = 'receiveFromThirdParty', - ReceiveFromTransferInstrument = 'receiveFromTransferInstrument', - ReceiveGrants = 'receiveGrants', - ReceivePayments = 'receivePayments', - SendToBalanceAccount = 'sendToBalanceAccount', - SendToThirdParty = 'sendToThirdParty', - SendToTransferInstrument = 'sendToTransferInstrument', - ThirdPartyFunding = 'thirdPartyFunding', - UseCard = 'useCard', - UseCardCommercial = 'useCardCommercial', - UseCardConsumer = 'useCardConsumer', - UseCardInRestrictedCountries = 'useCardInRestrictedCountries', - UseCardInRestrictedCountriesCommercial = 'useCardInRestrictedCountriesCommercial', - UseCardInRestrictedCountriesConsumer = 'useCardInRestrictedCountriesConsumer', - UseCardInRestrictedIndustries = 'useCardInRestrictedIndustries', - UseCardInRestrictedIndustriesCommercial = 'useCardInRestrictedIndustriesCommercial', - UseCardInRestrictedIndustriesConsumer = 'useCardInRestrictedIndustriesConsumer', - UseChargeCard = 'useChargeCard', - UseChargeCardCommercial = 'useChargeCardCommercial', - WithdrawFromAtm = 'withdrawFromAtm', - WithdrawFromAtmCommercial = 'withdrawFromAtmCommercial', - WithdrawFromAtmConsumer = 'withdrawFromAtmConsumer', - WithdrawFromAtmInRestrictedCountries = 'withdrawFromAtmInRestrictedCountries', - WithdrawFromAtmInRestrictedCountriesCommercial = 'withdrawFromAtmInRestrictedCountriesCommercial', - WithdrawFromAtmInRestrictedCountriesConsumer = 'withdrawFromAtmInRestrictedCountriesConsumer' + AcceptExternalFunding = 'acceptExternalFunding', + AcceptPspFunding = 'acceptPspFunding', + AcceptTransactionInRestrictedCountries = 'acceptTransactionInRestrictedCountries', + AcceptTransactionInRestrictedCountriesCommercial = 'acceptTransactionInRestrictedCountriesCommercial', + AcceptTransactionInRestrictedCountriesConsumer = 'acceptTransactionInRestrictedCountriesConsumer', + AcceptTransactionInRestrictedIndustries = 'acceptTransactionInRestrictedIndustries', + AcceptTransactionInRestrictedIndustriesCommercial = 'acceptTransactionInRestrictedIndustriesCommercial', + AcceptTransactionInRestrictedIndustriesConsumer = 'acceptTransactionInRestrictedIndustriesConsumer', + Acquiring = 'acquiring', + AtmWithdrawal = 'atmWithdrawal', + AtmWithdrawalCommercial = 'atmWithdrawalCommercial', + AtmWithdrawalConsumer = 'atmWithdrawalConsumer', + AtmWithdrawalInRestrictedCountries = 'atmWithdrawalInRestrictedCountries', + AtmWithdrawalInRestrictedCountriesCommercial = 'atmWithdrawalInRestrictedCountriesCommercial', + AtmWithdrawalInRestrictedCountriesConsumer = 'atmWithdrawalInRestrictedCountriesConsumer', + AuthorisedPaymentInstrumentUser = 'authorisedPaymentInstrumentUser', + GetGrantOffers = 'getGrantOffers', + IssueBankAccount = 'issueBankAccount', + IssueCard = 'issueCard', + IssueCardCommercial = 'issueCardCommercial', + IssueCardConsumer = 'issueCardConsumer', + IssueChargeCard = 'issueChargeCard', + IssueChargeCardCommercial = 'issueChargeCardCommercial', + IssueCreditLimit = 'issueCreditLimit', + LocalAcceptance = 'localAcceptance', + Payout = 'payout', + PayoutToTransferInstrument = 'payoutToTransferInstrument', + Processing = 'processing', + ReceiveFromBalanceAccount = 'receiveFromBalanceAccount', + ReceiveFromPlatformPayments = 'receiveFromPlatformPayments', + ReceiveFromThirdParty = 'receiveFromThirdParty', + ReceiveFromTransferInstrument = 'receiveFromTransferInstrument', + ReceiveGrants = 'receiveGrants', + ReceivePayments = 'receivePayments', + SendToBalanceAccount = 'sendToBalanceAccount', + SendToThirdParty = 'sendToThirdParty', + SendToTransferInstrument = 'sendToTransferInstrument', + ThirdPartyFunding = 'thirdPartyFunding', + UseCard = 'useCard', + UseCardCommercial = 'useCardCommercial', + UseCardConsumer = 'useCardConsumer', + UseCardInRestrictedCountries = 'useCardInRestrictedCountries', + UseCardInRestrictedCountriesCommercial = 'useCardInRestrictedCountriesCommercial', + UseCardInRestrictedCountriesConsumer = 'useCardInRestrictedCountriesConsumer', + UseCardInRestrictedIndustries = 'useCardInRestrictedIndustries', + UseCardInRestrictedIndustriesCommercial = 'useCardInRestrictedIndustriesCommercial', + UseCardInRestrictedIndustriesConsumer = 'useCardInRestrictedIndustriesConsumer', + UseChargeCard = 'useChargeCard', + UseChargeCardCommercial = 'useChargeCardCommercial', + WithdrawFromAtm = 'withdrawFromAtm', + WithdrawFromAtmCommercial = 'withdrawFromAtmCommercial', + WithdrawFromAtmConsumer = 'withdrawFromAtmConsumer', + WithdrawFromAtmInRestrictedCountries = 'withdrawFromAtmInRestrictedCountries', + WithdrawFromAtmInRestrictedCountriesCommercial = 'withdrawFromAtmInRestrictedCountriesCommercial', + WithdrawFromAtmInRestrictedCountriesConsumer = 'withdrawFromAtmInRestrictedCountriesConsumer' } export enum TypeEnum { - DataMissing = 'dataMissing', - InvalidInput = 'invalidInput', - PendingStatus = 'pendingStatus' + DataMissing = 'dataMissing', + InvalidInput = 'invalidInput', + PendingStatus = 'pendingStatus' } } diff --git a/src/typings/balancePlatform/verificationErrorRecursive.ts b/src/typings/balancePlatform/verificationErrorRecursive.ts index 7fc379fad..0acaa1ac2 100644 --- a/src/typings/balancePlatform/verificationErrorRecursive.ts +++ b/src/typings/balancePlatform/verificationErrorRecursive.ts @@ -67,65 +67,65 @@ export class VerificationErrorRecursive { export namespace VerificationErrorRecursive { export enum CapabilitiesEnum { - AcceptExternalFunding = 'acceptExternalFunding', - AcceptPspFunding = 'acceptPspFunding', - AcceptTransactionInRestrictedCountries = 'acceptTransactionInRestrictedCountries', - AcceptTransactionInRestrictedCountriesCommercial = 'acceptTransactionInRestrictedCountriesCommercial', - AcceptTransactionInRestrictedCountriesConsumer = 'acceptTransactionInRestrictedCountriesConsumer', - AcceptTransactionInRestrictedIndustries = 'acceptTransactionInRestrictedIndustries', - AcceptTransactionInRestrictedIndustriesCommercial = 'acceptTransactionInRestrictedIndustriesCommercial', - AcceptTransactionInRestrictedIndustriesConsumer = 'acceptTransactionInRestrictedIndustriesConsumer', - Acquiring = 'acquiring', - AtmWithdrawal = 'atmWithdrawal', - AtmWithdrawalCommercial = 'atmWithdrawalCommercial', - AtmWithdrawalConsumer = 'atmWithdrawalConsumer', - AtmWithdrawalInRestrictedCountries = 'atmWithdrawalInRestrictedCountries', - AtmWithdrawalInRestrictedCountriesCommercial = 'atmWithdrawalInRestrictedCountriesCommercial', - AtmWithdrawalInRestrictedCountriesConsumer = 'atmWithdrawalInRestrictedCountriesConsumer', - AuthorisedPaymentInstrumentUser = 'authorisedPaymentInstrumentUser', - GetGrantOffers = 'getGrantOffers', - IssueBankAccount = 'issueBankAccount', - IssueCard = 'issueCard', - IssueCardCommercial = 'issueCardCommercial', - IssueCardConsumer = 'issueCardConsumer', - IssueChargeCard = 'issueChargeCard', - IssueChargeCardCommercial = 'issueChargeCardCommercial', - IssueCreditLimit = 'issueCreditLimit', - LocalAcceptance = 'localAcceptance', - Payout = 'payout', - PayoutToTransferInstrument = 'payoutToTransferInstrument', - Processing = 'processing', - ReceiveFromBalanceAccount = 'receiveFromBalanceAccount', - ReceiveFromPlatformPayments = 'receiveFromPlatformPayments', - ReceiveFromThirdParty = 'receiveFromThirdParty', - ReceiveFromTransferInstrument = 'receiveFromTransferInstrument', - ReceiveGrants = 'receiveGrants', - ReceivePayments = 'receivePayments', - SendToBalanceAccount = 'sendToBalanceAccount', - SendToThirdParty = 'sendToThirdParty', - SendToTransferInstrument = 'sendToTransferInstrument', - ThirdPartyFunding = 'thirdPartyFunding', - UseCard = 'useCard', - UseCardCommercial = 'useCardCommercial', - UseCardConsumer = 'useCardConsumer', - UseCardInRestrictedCountries = 'useCardInRestrictedCountries', - UseCardInRestrictedCountriesCommercial = 'useCardInRestrictedCountriesCommercial', - UseCardInRestrictedCountriesConsumer = 'useCardInRestrictedCountriesConsumer', - UseCardInRestrictedIndustries = 'useCardInRestrictedIndustries', - UseCardInRestrictedIndustriesCommercial = 'useCardInRestrictedIndustriesCommercial', - UseCardInRestrictedIndustriesConsumer = 'useCardInRestrictedIndustriesConsumer', - UseChargeCard = 'useChargeCard', - UseChargeCardCommercial = 'useChargeCardCommercial', - WithdrawFromAtm = 'withdrawFromAtm', - WithdrawFromAtmCommercial = 'withdrawFromAtmCommercial', - WithdrawFromAtmConsumer = 'withdrawFromAtmConsumer', - WithdrawFromAtmInRestrictedCountries = 'withdrawFromAtmInRestrictedCountries', - WithdrawFromAtmInRestrictedCountriesCommercial = 'withdrawFromAtmInRestrictedCountriesCommercial', - WithdrawFromAtmInRestrictedCountriesConsumer = 'withdrawFromAtmInRestrictedCountriesConsumer' + AcceptExternalFunding = 'acceptExternalFunding', + AcceptPspFunding = 'acceptPspFunding', + AcceptTransactionInRestrictedCountries = 'acceptTransactionInRestrictedCountries', + AcceptTransactionInRestrictedCountriesCommercial = 'acceptTransactionInRestrictedCountriesCommercial', + AcceptTransactionInRestrictedCountriesConsumer = 'acceptTransactionInRestrictedCountriesConsumer', + AcceptTransactionInRestrictedIndustries = 'acceptTransactionInRestrictedIndustries', + AcceptTransactionInRestrictedIndustriesCommercial = 'acceptTransactionInRestrictedIndustriesCommercial', + AcceptTransactionInRestrictedIndustriesConsumer = 'acceptTransactionInRestrictedIndustriesConsumer', + Acquiring = 'acquiring', + AtmWithdrawal = 'atmWithdrawal', + AtmWithdrawalCommercial = 'atmWithdrawalCommercial', + AtmWithdrawalConsumer = 'atmWithdrawalConsumer', + AtmWithdrawalInRestrictedCountries = 'atmWithdrawalInRestrictedCountries', + AtmWithdrawalInRestrictedCountriesCommercial = 'atmWithdrawalInRestrictedCountriesCommercial', + AtmWithdrawalInRestrictedCountriesConsumer = 'atmWithdrawalInRestrictedCountriesConsumer', + AuthorisedPaymentInstrumentUser = 'authorisedPaymentInstrumentUser', + GetGrantOffers = 'getGrantOffers', + IssueBankAccount = 'issueBankAccount', + IssueCard = 'issueCard', + IssueCardCommercial = 'issueCardCommercial', + IssueCardConsumer = 'issueCardConsumer', + IssueChargeCard = 'issueChargeCard', + IssueChargeCardCommercial = 'issueChargeCardCommercial', + IssueCreditLimit = 'issueCreditLimit', + LocalAcceptance = 'localAcceptance', + Payout = 'payout', + PayoutToTransferInstrument = 'payoutToTransferInstrument', + Processing = 'processing', + ReceiveFromBalanceAccount = 'receiveFromBalanceAccount', + ReceiveFromPlatformPayments = 'receiveFromPlatformPayments', + ReceiveFromThirdParty = 'receiveFromThirdParty', + ReceiveFromTransferInstrument = 'receiveFromTransferInstrument', + ReceiveGrants = 'receiveGrants', + ReceivePayments = 'receivePayments', + SendToBalanceAccount = 'sendToBalanceAccount', + SendToThirdParty = 'sendToThirdParty', + SendToTransferInstrument = 'sendToTransferInstrument', + ThirdPartyFunding = 'thirdPartyFunding', + UseCard = 'useCard', + UseCardCommercial = 'useCardCommercial', + UseCardConsumer = 'useCardConsumer', + UseCardInRestrictedCountries = 'useCardInRestrictedCountries', + UseCardInRestrictedCountriesCommercial = 'useCardInRestrictedCountriesCommercial', + UseCardInRestrictedCountriesConsumer = 'useCardInRestrictedCountriesConsumer', + UseCardInRestrictedIndustries = 'useCardInRestrictedIndustries', + UseCardInRestrictedIndustriesCommercial = 'useCardInRestrictedIndustriesCommercial', + UseCardInRestrictedIndustriesConsumer = 'useCardInRestrictedIndustriesConsumer', + UseChargeCard = 'useChargeCard', + UseChargeCardCommercial = 'useChargeCardCommercial', + WithdrawFromAtm = 'withdrawFromAtm', + WithdrawFromAtmCommercial = 'withdrawFromAtmCommercial', + WithdrawFromAtmConsumer = 'withdrawFromAtmConsumer', + WithdrawFromAtmInRestrictedCountries = 'withdrawFromAtmInRestrictedCountries', + WithdrawFromAtmInRestrictedCountriesCommercial = 'withdrawFromAtmInRestrictedCountriesCommercial', + WithdrawFromAtmInRestrictedCountriesConsumer = 'withdrawFromAtmInRestrictedCountriesConsumer' } export enum TypeEnum { - DataMissing = 'dataMissing', - InvalidInput = 'invalidInput', - PendingStatus = 'pendingStatus' + DataMissing = 'dataMissing', + InvalidInput = 'invalidInput', + PendingStatus = 'pendingStatus' } } diff --git a/src/typings/binLookup/costEstimateRequest.ts b/src/typings/binLookup/costEstimateRequest.ts index 2d41310e4..8132b2471 100644 --- a/src/typings/binLookup/costEstimateRequest.ts +++ b/src/typings/binLookup/costEstimateRequest.ts @@ -14,7 +14,7 @@ import { Recurring } from './recurring'; export class CostEstimateRequest { 'amount': Amount; - 'assumptions'?: CostEstimateAssumptions | null; + 'assumptions'?: CostEstimateAssumptions; /** * The card number (4-19 characters) for PCI compliant use cases. Do not use any separators. > Either the `cardNumber` or `encryptedCardNumber` field must be provided in a payment request. */ @@ -27,8 +27,8 @@ export class CostEstimateRequest { * The merchant account identifier you want to process the (transaction) request with. */ 'merchantAccount': string; - 'merchantDetails'?: MerchantDetails | null; - 'recurring'?: Recurring | null; + 'merchantDetails'?: MerchantDetails; + 'recurring'?: Recurring; /** * The `recurringDetailReference` you want to use for this cost estimate. The value `LATEST` can be used to select the most recently stored recurring detail. */ @@ -53,7 +53,7 @@ export class CostEstimateRequest { { "name": "assumptions", "baseName": "assumptions", - "type": "CostEstimateAssumptions | null" + "type": "CostEstimateAssumptions" }, { "name": "cardNumber", @@ -73,12 +73,12 @@ export class CostEstimateRequest { { "name": "merchantDetails", "baseName": "merchantDetails", - "type": "MerchantDetails | null" + "type": "MerchantDetails" }, { "name": "recurring", "baseName": "recurring", - "type": "Recurring | null" + "type": "Recurring" }, { "name": "selectedRecurringDetailReference", @@ -103,9 +103,9 @@ export class CostEstimateRequest { export namespace CostEstimateRequest { export enum ShopperInteractionEnum { - Ecommerce = 'Ecommerce', - ContAuth = 'ContAuth', - Moto = 'Moto', - Pos = 'POS' + Ecommerce = 'Ecommerce', + ContAuth = 'ContAuth', + Moto = 'Moto', + Pos = 'POS' } } diff --git a/src/typings/binLookup/costEstimateResponse.ts b/src/typings/binLookup/costEstimateResponse.ts index 002cbba49..8138cc58e 100644 --- a/src/typings/binLookup/costEstimateResponse.ts +++ b/src/typings/binLookup/costEstimateResponse.ts @@ -11,8 +11,8 @@ import { Amount } from './amount'; import { CardBin } from './cardBin'; export class CostEstimateResponse { - 'cardBin'?: CardBin | null; - 'costEstimateAmount'?: Amount | null; + 'cardBin'?: CardBin; + 'costEstimateAmount'?: Amount; /** * Adyen\'s 16-character reference associated with the request. */ @@ -28,12 +28,12 @@ export class CostEstimateResponse { { "name": "cardBin", "baseName": "cardBin", - "type": "CardBin | null" + "type": "CardBin" }, { "name": "costEstimateAmount", "baseName": "costEstimateAmount", - "type": "Amount | null" + "type": "Amount" }, { "name": "costEstimateReference", diff --git a/src/typings/binLookup/models.ts b/src/typings/binLookup/models.ts index 2460db20f..572e4b297 100644 --- a/src/typings/binLookup/models.ts +++ b/src/typings/binLookup/models.ts @@ -1,12 +1,4 @@ -/* - * The version of the OpenAPI document: v54 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - +import localVarRequest from 'request'; export * from './amount'; export * from './binDetail'; @@ -22,6 +14,18 @@ export * from './threeDS2CardRangeDetail'; export * from './threeDSAvailabilityRequest'; export * from './threeDSAvailabilityResponse'; +import * as fs from 'fs'; + +export interface RequestDetailedFile { + value: Buffer; + options?: { + filename?: string; + contentType?: string; + } +} + +export type RequestFile = string | Buffer | fs.ReadStream | RequestDetailedFile; + import { Amount } from './amount'; import { BinDetail } from './binDetail'; @@ -71,6 +75,23 @@ let typeMap: {[index: string]: any} = { "ThreeDSAvailabilityResponse": ThreeDSAvailabilityResponse, } +// Check if a string starts with another string without using es6 features +function startsWith(str: string, match: string): boolean { + return str.substring(0, match.length) === match; +} + +// Check if a string ends with another string without using es6 features +function endsWith(str: string, match: string): boolean { + return str.length >= match.length && str.substring(str.length - match.length) === match; +} + +const nullableSuffix = " | null"; +const optionalSuffix = " | undefined"; +const arrayPrefix = "Array<"; +const arraySuffix = ">"; +const mapPrefix = "{ [key: string]: "; +const mapSuffix = "; }"; + export class ObjectSerializer { public static findCorrectType(data: any, expectedType: string) { if (data == undefined) { @@ -107,25 +128,37 @@ export class ObjectSerializer { } } - public static serialize(data: any, type: string) { + public static serialize(data: any, type: string): any { if (data == undefined) { return data; } else if (primitives.indexOf(type.toLowerCase()) !== -1) { return data; - } else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6 - let subType: string = type.replace("Array<", ""); // Array => Type> - subType = subType.substring(0, subType.length - 1); // Type> => Type + } else if (endsWith(type, nullableSuffix)) { + let subType: string = type.slice(0, -nullableSuffix.length); // Type | null => Type + return ObjectSerializer.serialize(data, subType); + } else if (endsWith(type, optionalSuffix)) { + let subType: string = type.slice(0, -optionalSuffix.length); // Type | undefined => Type + return ObjectSerializer.serialize(data, subType); + } else if (startsWith(type, arrayPrefix)) { + let subType: string = type.slice(arrayPrefix.length, -arraySuffix.length); // Array => Type let transformedData: any[] = []; for (let index = 0; index < data.length; index++) { let datum = data[index]; transformedData.push(ObjectSerializer.serialize(datum, subType)); } return transformedData; + } else if (startsWith(type, mapPrefix)) { + let subType: string = type.slice(mapPrefix.length, -mapSuffix.length); // { [key: string]: Type; } => Type + let transformedData: { [key: string]: any } = {}; + for (let key in data) { + transformedData[key] = ObjectSerializer.serialize( + data[key], + subType, + ); + } + return transformedData; } else if (type === "Date") { return data.toISOString(); - } else if (type === "SaleToAcquirerData") { - const dataString = JSON.stringify(data); - return Buffer.from(dataString).toString("base64"); } else { if (enumsMap[type]) { return data; @@ -148,22 +181,37 @@ export class ObjectSerializer { } } - public static deserialize(data: any, type: string) { + public static deserialize(data: any, type: string): any { // polymorphism may change the actual type. type = ObjectSerializer.findCorrectType(data, type); if (data == undefined) { return data; } else if (primitives.indexOf(type.toLowerCase()) !== -1) { return data; - } else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6 - let subType: string = type.replace("Array<", ""); // Array => Type> - subType = subType.substring(0, subType.length - 1); // Type> => Type + } else if (endsWith(type, nullableSuffix)) { + let subType: string = type.slice(0, -nullableSuffix.length); // Type | null => Type + return ObjectSerializer.deserialize(data, subType); + } else if (endsWith(type, optionalSuffix)) { + let subType: string = type.slice(0, -optionalSuffix.length); // Type | undefined => Type + return ObjectSerializer.deserialize(data, subType); + } else if (startsWith(type, arrayPrefix)) { + let subType: string = type.slice(arrayPrefix.length, -arraySuffix.length); // Array => Type let transformedData: any[] = []; for (let index = 0; index < data.length; index++) { let datum = data[index]; transformedData.push(ObjectSerializer.deserialize(datum, subType)); } return transformedData; + } else if (startsWith(type, mapPrefix)) { + let subType: string = type.slice(mapPrefix.length, -mapSuffix.length); // { [key: string]: Type; } => Type + let transformedData: { [key: string]: any } = {}; + for (let key in data) { + transformedData[key] = ObjectSerializer.deserialize( + data[key], + subType, + ); + } + return transformedData; } else if (type === "Date") { return new Date(data); } else { @@ -184,3 +232,77 @@ export class ObjectSerializer { } } } + +export interface Authentication { + /** + * Apply authentication settings to header and query params. + */ + applyToRequest(requestOptions: localVarRequest.Options): Promise | void; +} + +export class HttpBasicAuth implements Authentication { + public username: string = ''; + public password: string = ''; + + applyToRequest(requestOptions: localVarRequest.Options): void { + requestOptions.auth = { + username: this.username, password: this.password + } + } +} + +export class HttpBearerAuth implements Authentication { + public accessToken: string | (() => string) = ''; + + applyToRequest(requestOptions: localVarRequest.Options): void { + if (requestOptions && requestOptions.headers) { + const accessToken = typeof this.accessToken === 'function' + ? this.accessToken() + : this.accessToken; + requestOptions.headers["Authorization"] = "Bearer " + accessToken; + } + } +} + +export class ApiKeyAuth implements Authentication { + public apiKey: string = ''; + + constructor(private location: string, private paramName: string) { + } + + applyToRequest(requestOptions: localVarRequest.Options): void { + if (this.location == "query") { + (requestOptions.qs)[this.paramName] = this.apiKey; + } else if (this.location == "header" && requestOptions && requestOptions.headers) { + requestOptions.headers[this.paramName] = this.apiKey; + } else if (this.location == 'cookie' && requestOptions && requestOptions.headers) { + if (requestOptions.headers['Cookie']) { + requestOptions.headers['Cookie'] += '; ' + this.paramName + '=' + encodeURIComponent(this.apiKey); + } + else { + requestOptions.headers['Cookie'] = this.paramName + '=' + encodeURIComponent(this.apiKey); + } + } + } +} + +export class OAuth implements Authentication { + public accessToken: string = ''; + + applyToRequest(requestOptions: localVarRequest.Options): void { + if (requestOptions && requestOptions.headers) { + requestOptions.headers["Authorization"] = "Bearer " + this.accessToken; + } + } +} + +export class VoidAuth implements Authentication { + public username: string = ''; + public password: string = ''; + + applyToRequest(_: localVarRequest.Options): void { + // Do nothing + } +} + +export type Interceptor = (requestOptions: localVarRequest.Options) => (Promise | void); diff --git a/src/typings/binLookup/recurring.ts b/src/typings/binLookup/recurring.ts index 06eb738ab..7bd97cacf 100644 --- a/src/typings/binLookup/recurring.ts +++ b/src/typings/binLookup/recurring.ts @@ -66,14 +66,14 @@ export class Recurring { export namespace Recurring { export enum ContractEnum { - Oneclick = 'ONECLICK', - Recurring = 'RECURRING', - Payout = 'PAYOUT' + Oneclick = 'ONECLICK', + Recurring = 'RECURRING', + Payout = 'PAYOUT' } export enum TokenServiceEnum { - Visatokenservice = 'VISATOKENSERVICE', - Mctokenservice = 'MCTOKENSERVICE', - Amextokenservice = 'AMEXTOKENSERVICE', - TokenSharing = 'TOKEN_SHARING' + Visatokenservice = 'VISATOKENSERVICE', + Mctokenservice = 'MCTOKENSERVICE', + Amextokenservice = 'AMEXTOKENSERVICE', + TokenSharing = 'TOKEN_SHARING' } } diff --git a/src/typings/binLookup/threeDSAvailabilityResponse.ts b/src/typings/binLookup/threeDSAvailabilityResponse.ts index 7af1392a7..643d883c9 100644 --- a/src/typings/binLookup/threeDSAvailabilityResponse.ts +++ b/src/typings/binLookup/threeDSAvailabilityResponse.ts @@ -12,7 +12,7 @@ import { DSPublicKeyDetail } from './dSPublicKeyDetail'; import { ThreeDS2CardRangeDetail } from './threeDS2CardRangeDetail'; export class ThreeDSAvailabilityResponse { - 'binDetails'?: BinDetail | null; + 'binDetails'?: BinDetail; /** * List of Directory Server (DS) public keys. */ @@ -36,7 +36,7 @@ export class ThreeDSAvailabilityResponse { { "name": "binDetails", "baseName": "binDetails", - "type": "BinDetail | null" + "type": "BinDetail" }, { "name": "dsPublicKeys", diff --git a/src/typings/checkout/accountInfo.ts b/src/typings/checkout/accountInfo.ts index b4b679574..d4a458517 100644 --- a/src/typings/checkout/accountInfo.ts +++ b/src/typings/checkout/accountInfo.ts @@ -201,41 +201,41 @@ export class AccountInfo { export namespace AccountInfo { export enum AccountAgeIndicatorEnum { - NotApplicable = 'notApplicable', - ThisTransaction = 'thisTransaction', - LessThan30Days = 'lessThan30Days', - From30To60Days = 'from30To60Days', - MoreThan60Days = 'moreThan60Days' + NotApplicable = 'notApplicable', + ThisTransaction = 'thisTransaction', + LessThan30Days = 'lessThan30Days', + From30To60Days = 'from30To60Days', + MoreThan60Days = 'moreThan60Days' } export enum AccountChangeIndicatorEnum { - ThisTransaction = 'thisTransaction', - LessThan30Days = 'lessThan30Days', - From30To60Days = 'from30To60Days', - MoreThan60Days = 'moreThan60Days' + ThisTransaction = 'thisTransaction', + LessThan30Days = 'lessThan30Days', + From30To60Days = 'from30To60Days', + MoreThan60Days = 'moreThan60Days' } export enum AccountTypeEnum { - NotApplicable = 'notApplicable', - Credit = 'credit', - Debit = 'debit' + NotApplicable = 'notApplicable', + Credit = 'credit', + Debit = 'debit' } export enum DeliveryAddressUsageIndicatorEnum { - ThisTransaction = 'thisTransaction', - LessThan30Days = 'lessThan30Days', - From30To60Days = 'from30To60Days', - MoreThan60Days = 'moreThan60Days' + ThisTransaction = 'thisTransaction', + LessThan30Days = 'lessThan30Days', + From30To60Days = 'from30To60Days', + MoreThan60Days = 'moreThan60Days' } export enum PasswordChangeIndicatorEnum { - NotApplicable = 'notApplicable', - ThisTransaction = 'thisTransaction', - LessThan30Days = 'lessThan30Days', - From30To60Days = 'from30To60Days', - MoreThan60Days = 'moreThan60Days' + NotApplicable = 'notApplicable', + ThisTransaction = 'thisTransaction', + LessThan30Days = 'lessThan30Days', + From30To60Days = 'from30To60Days', + MoreThan60Days = 'moreThan60Days' } export enum PaymentAccountIndicatorEnum { - NotApplicable = 'notApplicable', - ThisTransaction = 'thisTransaction', - LessThan30Days = 'lessThan30Days', - From30To60Days = 'from30To60Days', - MoreThan60Days = 'moreThan60Days' + NotApplicable = 'notApplicable', + ThisTransaction = 'thisTransaction', + LessThan30Days = 'lessThan30Days', + From30To60Days = 'from30To60Days', + MoreThan60Days = 'moreThan60Days' } } diff --git a/src/typings/checkout/acctInfo.ts b/src/typings/checkout/acctInfo.ts index 57025cc94..4d19fe529 100644 --- a/src/typings/checkout/acctInfo.ts +++ b/src/typings/checkout/acctInfo.ts @@ -165,44 +165,44 @@ export class AcctInfo { export namespace AcctInfo { export enum ChAccAgeIndEnum { - _01 = '01', - _02 = '02', - _03 = '03', - _04 = '04', - _05 = '05' + _01 = '01', + _02 = '02', + _03 = '03', + _04 = '04', + _05 = '05' } export enum ChAccChangeIndEnum { - _01 = '01', - _02 = '02', - _03 = '03', - _04 = '04' + _01 = '01', + _02 = '02', + _03 = '03', + _04 = '04' } export enum ChAccPwChangeIndEnum { - _01 = '01', - _02 = '02', - _03 = '03', - _04 = '04', - _05 = '05' + _01 = '01', + _02 = '02', + _03 = '03', + _04 = '04', + _05 = '05' } export enum PaymentAccIndEnum { - _01 = '01', - _02 = '02', - _03 = '03', - _04 = '04', - _05 = '05' + _01 = '01', + _02 = '02', + _03 = '03', + _04 = '04', + _05 = '05' } export enum ShipAddressUsageIndEnum { - _01 = '01', - _02 = '02', - _03 = '03', - _04 = '04' + _01 = '01', + _02 = '02', + _03 = '03', + _04 = '04' } export enum ShipNameIndicatorEnum { - _01 = '01', - _02 = '02' + _01 = '01', + _02 = '02' } export enum SuspiciousAccActivityEnum { - _01 = '01', - _02 = '02' + _01 = '01', + _02 = '02' } } diff --git a/src/typings/checkout/achDetails.ts b/src/typings/checkout/achDetails.ts index 0d6013e6d..b5607ce25 100644 --- a/src/typings/checkout/achDetails.ts +++ b/src/typings/checkout/achDetails.ts @@ -9,6 +9,10 @@ export class AchDetails { + /** + * The account holder type (personal or business). + */ + 'accountHolderType'?: AchDetails.AccountHolderTypeEnum; /** * The bank account number (without separators). */ @@ -55,11 +59,16 @@ export class AchDetails { /** * **ach** */ - 'type'?: AchDetails.TypeEnum; + 'type'?: AchDetails.TypeEnum = AchDetails.TypeEnum.Ach; static discriminator: string | undefined = undefined; static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "accountHolderType", + "baseName": "accountHolderType", + "type": "AchDetails.AccountHolderTypeEnum" + }, { "name": "bankAccountNumber", "baseName": "bankAccountNumber", @@ -122,17 +131,21 @@ export class AchDetails { } export namespace AchDetails { + export enum AccountHolderTypeEnum { + Business = 'business', + Personal = 'personal' + } export enum BankAccountTypeEnum { - Balance = 'balance', - Checking = 'checking', - Deposit = 'deposit', - General = 'general', - Other = 'other', - Payment = 'payment', - Savings = 'savings' + Balance = 'balance', + Checking = 'checking', + Deposit = 'deposit', + General = 'general', + Other = 'other', + Payment = 'payment', + Savings = 'savings' } export enum TypeEnum { - Ach = 'ach', - AchPlaid = 'ach_plaid' + Ach = 'ach', + AchPlaid = 'ach_plaid' } } diff --git a/src/typings/checkout/additionalData3DSecure.ts b/src/typings/checkout/additionalData3DSecure.ts index 4316b655d..6b69a322f 100644 --- a/src/typings/checkout/additionalData3DSecure.ts +++ b/src/typings/checkout/additionalData3DSecure.ts @@ -81,10 +81,10 @@ export class AdditionalData3DSecure { export namespace AdditionalData3DSecure { export enum ChallengeWindowSizeEnum { - _01 = '01', - _02 = '02', - _03 = '03', - _04 = '04', - _05 = '05' + _01 = '01', + _02 = '02', + _03 = '03', + _04 = '04', + _05 = '05' } } diff --git a/src/typings/checkout/additionalDataCommon.ts b/src/typings/checkout/additionalDataCommon.ts index af754f1d7..610b847d6 100644 --- a/src/typings/checkout/additionalDataCommon.ts +++ b/src/typings/checkout/additionalDataCommon.ts @@ -9,6 +9,10 @@ export class AdditionalDataCommon { + /** + * Triggers test scenarios that allow to replicate certain acquirer response codes. See [Testing result codes and refusal reasons](https://docs.adyen.com/development-resources/testing/result-codes/) to learn about the possible values, and the `refusalReason` values you can trigger. + */ + 'RequestedTestAcquirerResponseCode'?: string; /** * Triggers test scenarios that allow to replicate certain communication errors. Allowed values: * **NO_CONNECTION_AVAILABLE** – There wasn\'t a connection available to service the outgoing communication. This is a transient, retriable error since no messaging could be initiated to an issuing system (or third-party acquiring system). Therefore, the header Transient-Error: true is returned in the response. A subsequent request using the same idempotency key will be processed as if it was the first request. * **IOEXCEPTION_RECEIVED** – Something went wrong during transmission of the message or receiving the response. This is a classified as non-transient because the message could have been received by the issuing party and been acted upon. No transient error header is returned. If using idempotency, the (error) response is stored as the final result for the idempotency key. Subsequent messages with the same idempotency key not be processed beyond returning the stored response. */ @@ -58,6 +62,10 @@ export class AdditionalDataCommon { */ 'subMerchantCountry'?: string; /** + * This field is required for transactions performed by registered payment facilitators. This field contains the email address of the sub-merchant. * Format: Alphanumeric * Maximum length: 40 characters + */ + 'subMerchantEmail'?: string; + /** * This field contains an identifier of the actual merchant when a transaction is submitted via a payment facilitator. The payment facilitator must send in this unique ID. A unique identifier per submerchant that is required if the transaction is performed by a registered payment facilitator. * Format: alpha-numeric. * Fixed length: 15 characters. */ 'subMerchantID'?: string; @@ -66,6 +74,10 @@ export class AdditionalDataCommon { */ 'subMerchantName'?: string; /** + * This field is required for transactions performed by registered payment facilitators. This field contains the phone number of the sub-merchant.* Format: Alphanumeric * Maximum length: 20 characters + */ + 'subMerchantPhoneNumber'?: string; + /** * This field is required if the transaction is performed by a registered payment facilitator. This field must contain the postal code of the actual merchant\'s address. * Format: alpha-numeric. * Maximum length: 10 characters. */ 'subMerchantPostalCode'?: string; @@ -85,6 +97,11 @@ export class AdditionalDataCommon { static discriminator: string | undefined = undefined; static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "RequestedTestAcquirerResponseCode", + "baseName": "RequestedTestAcquirerResponseCode", + "type": "string" + }, { "name": "RequestedTestErrorResponseCode", "baseName": "RequestedTestErrorResponseCode", @@ -145,6 +162,11 @@ export class AdditionalDataCommon { "baseName": "subMerchantCountry", "type": "string" }, + { + "name": "subMerchantEmail", + "baseName": "subMerchantEmail", + "type": "string" + }, { "name": "subMerchantID", "baseName": "subMerchantID", @@ -155,6 +177,11 @@ export class AdditionalDataCommon { "baseName": "subMerchantName", "type": "string" }, + { + "name": "subMerchantPhoneNumber", + "baseName": "subMerchantPhoneNumber", + "type": "string" + }, { "name": "subMerchantPostalCode", "baseName": "subMerchantPostalCode", @@ -183,7 +210,7 @@ export class AdditionalDataCommon { export namespace AdditionalDataCommon { export enum IndustryUsageEnum { - NoShow = 'NoShow', - DelayedCharge = 'DelayedCharge' + NoShow = 'NoShow', + DelayedCharge = 'DelayedCharge' } } diff --git a/src/typings/checkout/additionalDataLevel23.ts b/src/typings/checkout/additionalDataLevel23.ts index 0cf298c90..2782bd466 100644 --- a/src/typings/checkout/additionalDataLevel23.ts +++ b/src/typings/checkout/additionalDataLevel23.ts @@ -10,7 +10,7 @@ export class AdditionalDataLevel23 { /** - * The customer code. * Encoding: ASCII * Max length: 25 characters * Must not start with a space or be all spaces * Must not be all zeros. + * The reference number to identify the customer and their order. * Encoding: ASCII * Max length: 25 characters * Must not start with a space or be all spaces. * Must not be all zeros. */ 'enhancedSchemeData_customerReference'?: string; /** @@ -18,27 +18,27 @@ export class AdditionalDataLevel23 { */ 'enhancedSchemeData_destinationCountryCode'?: string; /** - * The postal code of the destination address. * Encoding: ASCII * Max length: 10 characters * Must not start with a space + * The postal code of the destination address. * Encoding: ASCII * Max length: 10 characters * Must not start with a space. * For the US, it must be in five or nine digits format. For example, 10001 or 10001-0000. * For Canada, it must be in 6 digits format. For example, M4B 1G5. */ 'enhancedSchemeData_destinationPostalCode'?: string; /** - * Destination state or province code. * Encoding: ASCII * Max length: 3 characters * Must not start with a space + * The state or province code of the destination address. * Encoding: ASCII * Max length: 3 characters * Must not start with a space. */ 'enhancedSchemeData_destinationStateProvinceCode'?: string; /** - * The duty amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means USD 20.00. * Encoding: Numeric * Max length: 12 characters + * The duty tax amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means USD 20.00. * Encoding: Numeric * Max length: 12 characters */ 'enhancedSchemeData_dutyAmount'?: string; /** - * The shipping amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means USD 20.00. * Encoding: Numeric *Max length: 12 characters + * The shipping amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means USD 20.00. * Encoding: Numeric * Max length: 12 characters */ 'enhancedSchemeData_freightAmount'?: string; /** - * The [UNSPC commodity code](https://www.unspsc.org/) of the item. * Encoding: ASCII * Max length: 12 characters * Must not start with a space or be all spaces * Must not be all zeros. + * The code that identifies the item in a standardized commodity coding scheme. There are different commodity coding schemes: * [UNSPSC commodity codes](https://www.unspsc.org/) * [HS commodity codes](https://www.wcoomd.org/en/topics/nomenclature/overview.aspx) * [NAICS commodity codes](https://www.census.gov/naics/) * [NAPCS commodity codes](https://www.census.gov/naics/napcs/) * Encoding: ASCII * Max length: 12 characters * Must not start with a space or be all spaces. * Must not be all zeros. */ 'enhancedSchemeData_itemDetailLine_itemNr_commodityCode'?: string; /** - * A description of the item. * Encoding: ASCII * Max length: 26 characters * Must not start with a space or be all spaces * Must not be all zeros. + * A description of the item. * Encoding: ASCII * Max length: 26 characters * Must not be a single character. * Must not be blank. * Must not start with a space or be all spaces. * Must not be all zeros. */ 'enhancedSchemeData_itemDetailLine_itemNr_description'?: string; /** @@ -46,19 +46,19 @@ export class AdditionalDataLevel23 { */ 'enhancedSchemeData_itemDetailLine_itemNr_discountAmount'?: string; /** - * The product code. * Encoding: ASCII. * Max length: 12 characters * Must not start with a space or be all spaces * Must not be all zeros. + * The product code. Must be a unique product code associated with the item or service. This can be your unique code for the item, or the manufacturer\'s product code. * Encoding: ASCII. * Max length: 12 characters * Must not start with a space or be all spaces. * Must not be all zeros. */ 'enhancedSchemeData_itemDetailLine_itemNr_productCode'?: string; /** - * The number of items. Must be an integer greater than zero. * Encoding: Numeric * Max length: 12 characters * Must not start with a space or be all spaces + * The number of items. Must be an integer greater than zero. * Encoding: Numeric * Max length: 12 characters * Must not start with a space or be all spaces. */ 'enhancedSchemeData_itemDetailLine_itemNr_quantity'?: string; /** - * The total amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means USD 20.00. * Max length: 12 characters * Must not start with a space or be all spaces * Must not be all zeros. + * The total amount for the line item, in [minor units](https://docs.adyen.com/development-resources/currency-codes). See [Amount requirements for level 2/3 ESD](https://docs.adyen.com//payment-methods/cards/enhanced-scheme-data/l2-l3#amount-requirements) to learn more about how to calculate the line item total. * For example, 2000 means USD 20.00. * Max length: 12 characters * Must not start with a space or be all spaces. * Must not be all zeros. */ 'enhancedSchemeData_itemDetailLine_itemNr_totalAmount'?: string; /** - * The unit of measurement for an item. * Encoding: ASCII Max length: 3 characters * Must not start with a space or be all spaces * Must not be all zeros. + * The unit of measurement for an item. * Encoding: ASCII * Max length: 3 characters * Must not start with a space or be all spaces. * Must not be all zeros. */ 'enhancedSchemeData_itemDetailLine_itemNr_unitOfMeasure'?: string; /** @@ -70,11 +70,11 @@ export class AdditionalDataLevel23 { */ 'enhancedSchemeData_orderDate'?: string; /** - * The postal code of the address the item is shipped from. * Encoding: ASCII * Max length: 10 characters * Must not start with a space or be all spaces * Must not be all zeros. + * The postal code of the address where the item is shipped from. * Encoding: ASCII * Max length: 10 characters * Must not start with a space or be all spaces. * Must not be all zeros.For the US, it must be in five or nine digits format. For example, 10001 or 10001-0000. * For Canada, it must be in 6 digits format. For example, M4B 1G5. */ 'enhancedSchemeData_shipFromPostalCode'?: string; /** - * The total tax amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means USD 20.00. *Encoding: Numeric *Max length: 12 characters * Must not be all zeros. + * The amount of state or provincial [tax included in the total transaction amount](https://docs.adyen.com/payment-methods/cards/enhanced-scheme-data/l2-l3#requirements-to-send-level-2-3-esd), in [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means USD 20.00. * Encoding: Numeric * Max length: 12 characters * Must not be all zeros. */ 'enhancedSchemeData_totalTaxAmount'?: string; diff --git a/src/typings/checkout/additionalDataSubMerchant.ts b/src/typings/checkout/additionalDataSubMerchant.ts index 4d048df31..07f167bc4 100644 --- a/src/typings/checkout/additionalDataSubMerchant.ts +++ b/src/typings/checkout/additionalDataSubMerchant.ts @@ -22,6 +22,10 @@ export class AdditionalDataSubMerchant { */ 'subMerchant_subSeller_subSellerNr_country'?: string; /** + * Required for transactions performed by registered payment facilitators. The email address of the sub-merchant. * Format: Alphanumeric * Maximum length: 40 characters + */ + 'subMerchant_subSeller_subSellerNr_email'?: string; + /** * Required for transactions performed by registered payment facilitators. A unique identifier that you create for the sub-merchant, used by schemes to identify the sub-merchant. * Format: Alphanumeric * Maximum length: 15 characters */ 'subMerchant_subSeller_subSellerNr_id'?: string; @@ -34,6 +38,10 @@ export class AdditionalDataSubMerchant { */ 'subMerchant_subSeller_subSellerNr_name'?: string; /** + * Required for transactions performed by registered payment facilitators. The phone number of the sub-merchant.* Format: Alphanumeric * Maximum length: 20 characters + */ + 'subMerchant_subSeller_subSellerNr_phoneNumber'?: string; + /** * Required for transactions performed by registered payment facilitators. The postal code of the sub-merchant\'s address, without dashes. * Format: Numeric * Fixed length: 8 digits */ 'subMerchant_subSeller_subSellerNr_postalCode'?: string; @@ -68,6 +76,11 @@ export class AdditionalDataSubMerchant { "baseName": "subMerchant.subSeller[subSellerNr].country", "type": "string" }, + { + "name": "subMerchant_subSeller_subSellerNr_email", + "baseName": "subMerchant.subSeller[subSellerNr].email", + "type": "string" + }, { "name": "subMerchant_subSeller_subSellerNr_id", "baseName": "subMerchant.subSeller[subSellerNr].id", @@ -83,6 +96,11 @@ export class AdditionalDataSubMerchant { "baseName": "subMerchant.subSeller[subSellerNr].name", "type": "string" }, + { + "name": "subMerchant_subSeller_subSellerNr_phoneNumber", + "baseName": "subMerchant.subSeller[subSellerNr].phoneNumber", + "type": "string" + }, { "name": "subMerchant_subSeller_subSellerNr_postalCode", "baseName": "subMerchant.subSeller[subSellerNr].postalCode", diff --git a/src/typings/checkout/affirmDetails.ts b/src/typings/checkout/affirmDetails.ts index 49d3df670..de6edbfc7 100644 --- a/src/typings/checkout/affirmDetails.ts +++ b/src/typings/checkout/affirmDetails.ts @@ -16,7 +16,7 @@ export class AffirmDetails { /** * **affirm** */ - 'type'?: AffirmDetails.TypeEnum; + 'type'?: AffirmDetails.TypeEnum = AffirmDetails.TypeEnum.Affirm; static discriminator: string | undefined = undefined; @@ -39,6 +39,6 @@ export class AffirmDetails { export namespace AffirmDetails { export enum TypeEnum { - Affirm = 'affirm' + Affirm = 'affirm' } } diff --git a/src/typings/checkout/afterpayDetails.ts b/src/typings/checkout/afterpayDetails.ts index 405fc327d..81084a2b7 100644 --- a/src/typings/checkout/afterpayDetails.ts +++ b/src/typings/checkout/afterpayDetails.ts @@ -39,7 +39,7 @@ export class AfterpayDetails { /** * **afterpay_default** */ - 'type': AfterpayDetails.TypeEnum; + 'type': AfterpayDetails.TypeEnum = AfterpayDetails.TypeEnum.AfterpayDefault; static discriminator: string | undefined = undefined; @@ -87,9 +87,9 @@ export class AfterpayDetails { export namespace AfterpayDetails { export enum TypeEnum { - AfterpayDefault = 'afterpay_default', - Afterpaytouch = 'afterpaytouch', - AfterpayB2b = 'afterpay_b2b', - Clearpay = 'clearpay' + AfterpayDefault = 'afterpay_default', + Afterpaytouch = 'afterpaytouch', + AfterpayB2b = 'afterpay_b2b', + Clearpay = 'clearpay' } } diff --git a/src/typings/checkout/amazonPayDetails.ts b/src/typings/checkout/amazonPayDetails.ts index fd748cbbe..c546043cb 100644 --- a/src/typings/checkout/amazonPayDetails.ts +++ b/src/typings/checkout/amazonPayDetails.ts @@ -24,7 +24,7 @@ export class AmazonPayDetails { /** * **amazonpay** */ - 'type'?: AmazonPayDetails.TypeEnum; + 'type'?: AmazonPayDetails.TypeEnum = AmazonPayDetails.TypeEnum.Amazonpay; static discriminator: string | undefined = undefined; @@ -57,6 +57,6 @@ export class AmazonPayDetails { export namespace AmazonPayDetails { export enum TypeEnum { - Amazonpay = 'amazonpay' + Amazonpay = 'amazonpay' } } diff --git a/src/typings/checkout/ancvDetails.ts b/src/typings/checkout/ancvDetails.ts index 8d288639f..e5f634a5f 100644 --- a/src/typings/checkout/ancvDetails.ts +++ b/src/typings/checkout/ancvDetails.ts @@ -69,6 +69,6 @@ export class AncvDetails { export namespace AncvDetails { export enum TypeEnum { - Ancv = 'ancv' + Ancv = 'ancv' } } diff --git a/src/typings/checkout/androidPayDetails.ts b/src/typings/checkout/androidPayDetails.ts index f2be6740c..f181fd539 100644 --- a/src/typings/checkout/androidPayDetails.ts +++ b/src/typings/checkout/androidPayDetails.ts @@ -16,7 +16,7 @@ export class AndroidPayDetails { /** * **androidpay** */ - 'type'?: AndroidPayDetails.TypeEnum; + 'type'?: AndroidPayDetails.TypeEnum = AndroidPayDetails.TypeEnum.Androidpay; static discriminator: string | undefined = undefined; @@ -39,6 +39,6 @@ export class AndroidPayDetails { export namespace AndroidPayDetails { export enum TypeEnum { - Androidpay = 'androidpay' + Androidpay = 'androidpay' } } diff --git a/src/typings/checkout/applePayDetails.ts b/src/typings/checkout/applePayDetails.ts index 4c920996d..cca53cbba 100644 --- a/src/typings/checkout/applePayDetails.ts +++ b/src/typings/checkout/applePayDetails.ts @@ -35,7 +35,7 @@ export class ApplePayDetails { /** * **applepay** */ - 'type'?: ApplePayDetails.TypeEnum; + 'type'?: ApplePayDetails.TypeEnum = ApplePayDetails.TypeEnum.Applepay; static discriminator: string | undefined = undefined; @@ -78,10 +78,10 @@ export class ApplePayDetails { export namespace ApplePayDetails { export enum FundingSourceEnum { - Credit = 'credit', - Debit = 'debit' + Credit = 'credit', + Debit = 'debit' } export enum TypeEnum { - Applepay = 'applepay' + Applepay = 'applepay' } } diff --git a/src/typings/checkout/applePayDonations.ts b/src/typings/checkout/applePayDonations.ts index 337f8169c..28ae67510 100644 --- a/src/typings/checkout/applePayDonations.ts +++ b/src/typings/checkout/applePayDonations.ts @@ -35,7 +35,7 @@ export class ApplePayDonations { /** * **applepay** */ - 'type'?: ApplePayDonations.TypeEnum; + 'type'?: ApplePayDonations.TypeEnum = ApplePayDonations.TypeEnum.Applepay; static discriminator: string | undefined = undefined; @@ -78,10 +78,10 @@ export class ApplePayDonations { export namespace ApplePayDonations { export enum FundingSourceEnum { - Credit = 'credit', - Debit = 'debit' + Credit = 'credit', + Debit = 'debit' } export enum TypeEnum { - Applepay = 'applepay' + Applepay = 'applepay' } } diff --git a/src/typings/checkout/applicationInfo.ts b/src/typings/checkout/applicationInfo.ts index e926e01cb..f5bda9224 100644 --- a/src/typings/checkout/applicationInfo.ts +++ b/src/typings/checkout/applicationInfo.ts @@ -13,12 +13,12 @@ import { MerchantDevice } from './merchantDevice'; import { ShopperInteractionDevice } from './shopperInteractionDevice'; export class ApplicationInfo { - 'adyenLibrary'?: CommonField | null; - 'adyenPaymentSource'?: CommonField | null; - 'externalPlatform'?: ExternalPlatform | null; - 'merchantApplication'?: CommonField | null; - 'merchantDevice'?: MerchantDevice | null; - 'shopperInteractionDevice'?: ShopperInteractionDevice | null; + 'adyenLibrary'?: CommonField; + 'adyenPaymentSource'?: CommonField; + 'externalPlatform'?: ExternalPlatform; + 'merchantApplication'?: CommonField; + 'merchantDevice'?: MerchantDevice; + 'shopperInteractionDevice'?: ShopperInteractionDevice; static discriminator: string | undefined = undefined; @@ -26,32 +26,32 @@ export class ApplicationInfo { { "name": "adyenLibrary", "baseName": "adyenLibrary", - "type": "CommonField | null" + "type": "CommonField" }, { "name": "adyenPaymentSource", "baseName": "adyenPaymentSource", - "type": "CommonField | null" + "type": "CommonField" }, { "name": "externalPlatform", "baseName": "externalPlatform", - "type": "ExternalPlatform | null" + "type": "ExternalPlatform" }, { "name": "merchantApplication", "baseName": "merchantApplication", - "type": "CommonField | null" + "type": "CommonField" }, { "name": "merchantDevice", "baseName": "merchantDevice", - "type": "MerchantDevice | null" + "type": "MerchantDevice" }, { "name": "shopperInteractionDevice", "baseName": "shopperInteractionDevice", - "type": "ShopperInteractionDevice | null" + "type": "ShopperInteractionDevice" } ]; static getAttributeTypeMap() { diff --git a/src/typings/checkout/authenticationData.ts b/src/typings/checkout/authenticationData.ts index c48142dca..e5aa1978f 100644 --- a/src/typings/checkout/authenticationData.ts +++ b/src/typings/checkout/authenticationData.ts @@ -17,8 +17,8 @@ export class AuthenticationData { /** * If set to true, you will only perform the [3D Secure 2 authentication](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only), and not the payment authorisation. Default: **false**. */ - 'authenticationOnly'?: boolean; - 'threeDSRequestData'?: ThreeDSRequestData | null; + 'authenticationOnly'?: boolean = false; + 'threeDSRequestData'?: ThreeDSRequestData; static discriminator: string | undefined = undefined; @@ -36,7 +36,7 @@ export class AuthenticationData { { "name": "threeDSRequestData", "baseName": "threeDSRequestData", - "type": "ThreeDSRequestData | null" + "type": "ThreeDSRequestData" } ]; static getAttributeTypeMap() { @@ -46,7 +46,7 @@ export class AuthenticationData { export namespace AuthenticationData { export enum AttemptAuthenticationEnum { - Always = 'always', - Never = 'never' + Always = 'always', + Never = 'never' } } diff --git a/src/typings/checkout/bacsDirectDebitDetails.ts b/src/typings/checkout/bacsDirectDebitDetails.ts index 51861dc76..7098f8f49 100644 --- a/src/typings/checkout/bacsDirectDebitDetails.ts +++ b/src/typings/checkout/bacsDirectDebitDetails.ts @@ -43,7 +43,7 @@ export class BacsDirectDebitDetails { /** * **directdebit_GB** */ - 'type'?: BacsDirectDebitDetails.TypeEnum; + 'type'?: BacsDirectDebitDetails.TypeEnum = BacsDirectDebitDetails.TypeEnum.DirectdebitGb; static discriminator: string | undefined = undefined; @@ -96,6 +96,6 @@ export class BacsDirectDebitDetails { export namespace BacsDirectDebitDetails { export enum TypeEnum { - DirectdebitGb = 'directdebit_GB' + DirectdebitGb = 'directdebit_GB' } } diff --git a/src/typings/checkout/balanceCheckRequest.ts b/src/typings/checkout/balanceCheckRequest.ts index 8318dd70e..91de1bb39 100644 --- a/src/typings/checkout/balanceCheckRequest.ts +++ b/src/typings/checkout/balanceCheckRequest.ts @@ -21,16 +21,16 @@ import { Split } from './split'; import { ThreeDS2RequestData } from './threeDS2RequestData'; export class BalanceCheckRequest { - 'accountInfo'?: AccountInfo | null; - 'additionalAmount'?: Amount | null; + 'accountInfo'?: AccountInfo; + 'additionalAmount'?: Amount; /** * This field contains additional data, which may be required for a particular payment request. The `additionalData` object consists of entries, each of which includes the key and value. */ 'additionalData'?: { [key: string]: string; }; 'amount': Amount; - 'applicationInfo'?: ApplicationInfo | null; - 'billingAddress'?: Address | null; - 'browserInfo'?: BrowserInfo | null; + 'applicationInfo'?: ApplicationInfo; + 'billingAddress'?: Address; + 'browserInfo'?: BrowserInfo; /** * The delay between the authorisation and scheduled auto-capture, specified in hours. */ @@ -39,8 +39,8 @@ export class BalanceCheckRequest { * The shopper\'s date of birth. Format [ISO-8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DD */ 'dateOfBirth'?: string; - 'dccQuote'?: ForexQuote | null; - 'deliveryAddress'?: Address | null; + 'dccQuote'?: ForexQuote; + 'deliveryAddress'?: Address; /** * The date and time the purchased goods should be delivered. Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DDThh:mm:ss.sssTZD Example: 2017-07-17T13:42:40.428+01:00 */ @@ -53,7 +53,7 @@ export class BalanceCheckRequest { * An integer value that is added to the normal fraud score. The value can be either positive or negative. */ 'fraudOffset'?: number; - 'installments'?: Installments | null; + 'installments'?: Installments; /** * The `localizedShopperStatement` field lets you use dynamic values for your shopper statement in a local character set. If not supplied, left empty, or for cross-border transactions, **shopperStatement** is used. Adyen currently supports the ja-Kana character set for Visa and Mastercard payments in Japan using Japanese cards. This character set supports: * UTF-8 based Katakana, capital letters, numbers and special characters. * Half-width or full-width characters. */ @@ -70,7 +70,7 @@ export class BalanceCheckRequest { * This reference allows linking multiple transactions to each other for reporting purposes (i.e. order auth-rate). The reference should be unique per billing cycle. The same merchant order reference should never be reused after the first authorised attempt. If used, this field should be supplied for all incoming authorisations. > We strongly recommend you send the `merchantOrderReference` value to benefit from linking payment requests when authorisation retries take place. In addition, we recommend you provide `retry.orderAttemptNumber`, `retry.chainAttemptNumber`, and `retry.skipRetry` values in `PaymentRequest.additionalData`. */ 'merchantOrderReference'?: string; - 'merchantRiskIndicator'?: MerchantRiskIndicator | null; + 'merchantRiskIndicator'?: MerchantRiskIndicator; /** * Metadata consists of entries, each of which includes a key and a value. Limits: * Maximum 20 key-value pairs per request. When exceeding, the \"177\" error occurs: \"Metadata size exceeds limit\". * Maximum 20 characters per key. * Maximum 80 characters per value. */ @@ -83,7 +83,7 @@ export class BalanceCheckRequest { * The collection that contains the type of the payment method and its specific information. */ 'paymentMethod': { [key: string]: string; }; - 'recurring'?: Recurring | null; + 'recurring'?: Recurring; /** * Defines a recurring payment type. Required when creating a token to store payment details or using stored payment details. Allowed values: * `Subscription` – A transaction for a fixed or variable amount, which follows a fixed schedule. * `CardOnFile` – With a card-on-file (CoF) transaction, card details are stored to enable one-click or omnichannel journeys, or simply to streamline the checkout process. Any subscription not following a fixed schedule is also considered a card-on-file transaction. * `UnscheduledCardOnFile` – An unscheduled card-on-file (UCoF) transaction is a transaction that occurs on a non-fixed schedule and/or have variable amounts. For example, automatic top-ups when a cardholder\'s balance drops below a certain amount. */ @@ -120,7 +120,7 @@ export class BalanceCheckRequest { * The combination of a language code and a country code to specify the language to be used in the payment. */ 'shopperLocale'?: string; - 'shopperName'?: Name | null; + 'shopperName'?: Name; /** * Required for recurring payments. Your reference to uniquely identify this shopper, for example user ID or account ID. The value is case-sensitive and must be at least three characters. > Your reference must not include personally identifiable information (PII) such as name or email address. */ @@ -134,7 +134,7 @@ export class BalanceCheckRequest { */ 'socialSecurityNumber'?: string; /** - * An array of objects specifying how the payment should be split when using either Adyen for Platforms for [marketplaces](https://docs.adyen.com/marketplaces/split-payments) or [platforms]((https://docs.adyen.com/platforms/split-payments), or standalone [Issuing](https://docs.adyen.com/issuing/add-manage-funds#split). + * An array of objects specifying how the payment should be split when using either Adyen for Platforms for [marketplaces](https://docs.adyen.com/marketplaces/split-payments) or [platforms](https://docs.adyen.com/platforms/split-payments), or standalone [Issuing](https://docs.adyen.com/issuing/add-manage-funds#split). */ 'splits'?: Array; /** @@ -145,14 +145,14 @@ export class BalanceCheckRequest { * The shopper\'s telephone number. */ 'telephoneNumber'?: string; - 'threeDS2RequestData'?: ThreeDS2RequestData | null; + 'threeDS2RequestData'?: ThreeDS2RequestData; /** * If set to true, you will only perform the [3D Secure 2 authentication](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only), and not the payment authorisation. * * @deprecated since Adyen Checkout API v69 * Use `authenticationData.authenticationOnly` instead. */ - 'threeDSAuthenticationOnly'?: boolean; + 'threeDSAuthenticationOnly'?: boolean = false; /** * The reference value to aggregate sales totals in reporting. When not specified, the store field is used (if available). */ @@ -168,12 +168,12 @@ export class BalanceCheckRequest { { "name": "accountInfo", "baseName": "accountInfo", - "type": "AccountInfo | null" + "type": "AccountInfo" }, { "name": "additionalAmount", "baseName": "additionalAmount", - "type": "Amount | null" + "type": "Amount" }, { "name": "additionalData", @@ -188,17 +188,17 @@ export class BalanceCheckRequest { { "name": "applicationInfo", "baseName": "applicationInfo", - "type": "ApplicationInfo | null" + "type": "ApplicationInfo" }, { "name": "billingAddress", "baseName": "billingAddress", - "type": "Address | null" + "type": "Address" }, { "name": "browserInfo", "baseName": "browserInfo", - "type": "BrowserInfo | null" + "type": "BrowserInfo" }, { "name": "captureDelayHours", @@ -213,12 +213,12 @@ export class BalanceCheckRequest { { "name": "dccQuote", "baseName": "dccQuote", - "type": "ForexQuote | null" + "type": "ForexQuote" }, { "name": "deliveryAddress", "baseName": "deliveryAddress", - "type": "Address | null" + "type": "Address" }, { "name": "deliveryDate", @@ -238,7 +238,7 @@ export class BalanceCheckRequest { { "name": "installments", "baseName": "installments", - "type": "Installments | null" + "type": "Installments" }, { "name": "localizedShopperStatement", @@ -263,7 +263,7 @@ export class BalanceCheckRequest { { "name": "merchantRiskIndicator", "baseName": "merchantRiskIndicator", - "type": "MerchantRiskIndicator | null" + "type": "MerchantRiskIndicator" }, { "name": "metadata", @@ -283,7 +283,7 @@ export class BalanceCheckRequest { { "name": "recurring", "baseName": "recurring", - "type": "Recurring | null" + "type": "Recurring" }, { "name": "recurringProcessingModel", @@ -333,7 +333,7 @@ export class BalanceCheckRequest { { "name": "shopperName", "baseName": "shopperName", - "type": "Name | null" + "type": "Name" }, { "name": "shopperReference", @@ -368,7 +368,7 @@ export class BalanceCheckRequest { { "name": "threeDS2RequestData", "baseName": "threeDS2RequestData", - "type": "ThreeDS2RequestData | null" + "type": "ThreeDS2RequestData" }, { "name": "threeDSAuthenticationOnly", @@ -393,14 +393,14 @@ export class BalanceCheckRequest { export namespace BalanceCheckRequest { export enum RecurringProcessingModelEnum { - CardOnFile = 'CardOnFile', - Subscription = 'Subscription', - UnscheduledCardOnFile = 'UnscheduledCardOnFile' + CardOnFile = 'CardOnFile', + Subscription = 'Subscription', + UnscheduledCardOnFile = 'UnscheduledCardOnFile' } export enum ShopperInteractionEnum { - Ecommerce = 'Ecommerce', - ContAuth = 'ContAuth', - Moto = 'Moto', - Pos = 'POS' + Ecommerce = 'Ecommerce', + ContAuth = 'ContAuth', + Moto = 'Moto', + Pos = 'POS' } } diff --git a/src/typings/checkout/balanceCheckResponse.ts b/src/typings/checkout/balanceCheckResponse.ts index 59654dc73..968e05910 100644 --- a/src/typings/checkout/balanceCheckResponse.ts +++ b/src/typings/checkout/balanceCheckResponse.ts @@ -16,7 +16,7 @@ export class BalanceCheckResponse { */ 'additionalData'?: { [key: string]: string; }; 'balance': Amount; - 'fraudResult'?: FraudResult | null; + 'fraudResult'?: FraudResult; /** * Adyen\'s 16-character reference associated with the transaction/request. This value is globally unique; quote it when communicating with us about this request. */ @@ -29,7 +29,7 @@ export class BalanceCheckResponse { * The result of the cancellation request. Possible values: * **Success** – Indicates that the balance check was successful. * **NotEnoughBalance** – Commonly indicates that the card did not have enough balance to pay the amount in the request, or that the currency of the balance on the card did not match the currency of the requested amount. * **Failed** – Indicates that the balance check failed. */ 'resultCode': BalanceCheckResponse.ResultCodeEnum; - 'transactionLimit'?: Amount | null; + 'transactionLimit'?: Amount; static discriminator: string | undefined = undefined; @@ -47,7 +47,7 @@ export class BalanceCheckResponse { { "name": "fraudResult", "baseName": "fraudResult", - "type": "FraudResult | null" + "type": "FraudResult" }, { "name": "pspReference", @@ -67,7 +67,7 @@ export class BalanceCheckResponse { { "name": "transactionLimit", "baseName": "transactionLimit", - "type": "Amount | null" + "type": "Amount" } ]; static getAttributeTypeMap() { @@ -77,8 +77,8 @@ export class BalanceCheckResponse { export namespace BalanceCheckResponse { export enum ResultCodeEnum { - Success = 'Success', - NotEnoughBalance = 'NotEnoughBalance', - Failed = 'Failed' + Success = 'Success', + NotEnoughBalance = 'NotEnoughBalance', + Failed = 'Failed' } } diff --git a/src/typings/checkout/billDeskDetails.ts b/src/typings/checkout/billDeskDetails.ts index a291bc1e3..e0fc09b2a 100644 --- a/src/typings/checkout/billDeskDetails.ts +++ b/src/typings/checkout/billDeskDetails.ts @@ -48,7 +48,7 @@ export class BillDeskDetails { export namespace BillDeskDetails { export enum TypeEnum { - Online = 'billdesk_online', - Wallet = 'billdesk_wallet' + BilldeskOnline = 'billdesk_online', + BilldeskWallet = 'billdesk_wallet' } } diff --git a/src/typings/checkout/blikDetails.ts b/src/typings/checkout/blikDetails.ts index ef8a9abb1..074f38c3a 100644 --- a/src/typings/checkout/blikDetails.ts +++ b/src/typings/checkout/blikDetails.ts @@ -69,6 +69,6 @@ export class BlikDetails { export namespace BlikDetails { export enum TypeEnum { - Blik = 'blik' + Blik = 'blik' } } diff --git a/src/typings/checkout/browserInfo.ts b/src/typings/checkout/browserInfo.ts index 5c3afcbb5..9a65c3cdf 100644 --- a/src/typings/checkout/browserInfo.ts +++ b/src/typings/checkout/browserInfo.ts @@ -24,7 +24,7 @@ export class BrowserInfo { /** * Boolean value indicating if the shopper\'s browser is able to execute JavaScript. A default \'true\' value is assumed if the field is not present. */ - 'javaScriptEnabled'?: boolean; + 'javaScriptEnabled'?: boolean = true; /** * The `navigator.language` value of the shopper\'s browser (as defined in IETF BCP 47). */ diff --git a/src/typings/checkout/cancelOrderResponse.ts b/src/typings/checkout/cancelOrderResponse.ts index c382b05b1..fe69886f4 100644 --- a/src/typings/checkout/cancelOrderResponse.ts +++ b/src/typings/checkout/cancelOrderResponse.ts @@ -39,6 +39,6 @@ export class CancelOrderResponse { export namespace CancelOrderResponse { export enum ResultCodeEnum { - Received = 'Received' + Received = 'Received' } } diff --git a/src/typings/checkout/cardDetails.ts b/src/typings/checkout/cardDetails.ts index 88ebec954..c4113f66b 100644 --- a/src/typings/checkout/cardDetails.ts +++ b/src/typings/checkout/cardDetails.ts @@ -111,7 +111,7 @@ export class CardDetails { /** * Default payment method details. Common for scheme payment methods, and for simple payment method details. */ - 'type'?: CardDetails.TypeEnum; + 'type'?: CardDetails.TypeEnum = CardDetails.TypeEnum.Scheme; static discriminator: string | undefined = undefined; @@ -249,15 +249,15 @@ export class CardDetails { export namespace CardDetails { export enum FundingSourceEnum { - Credit = 'credit', - Debit = 'debit' + Credit = 'credit', + Debit = 'debit' } export enum TypeEnum { - Bcmc = 'bcmc', - Scheme = 'scheme', - NetworkToken = 'networkToken', - Giftcard = 'giftcard', - Card = 'card', - Clicktopay = 'clicktopay' + Bcmc = 'bcmc', + Scheme = 'scheme', + NetworkToken = 'networkToken', + Giftcard = 'giftcard', + Card = 'card', + Clicktopay = 'clicktopay' } } diff --git a/src/typings/checkout/cardDonations.ts b/src/typings/checkout/cardDonations.ts index 35f2c8743..bd6f1cf04 100644 --- a/src/typings/checkout/cardDonations.ts +++ b/src/typings/checkout/cardDonations.ts @@ -111,7 +111,7 @@ export class CardDonations { /** * Default payment method details. Common for scheme payment methods, and for simple payment method details. */ - 'type'?: CardDonations.TypeEnum; + 'type'?: CardDonations.TypeEnum = CardDonations.TypeEnum.Scheme; static discriminator: string | undefined = undefined; @@ -249,15 +249,15 @@ export class CardDonations { export namespace CardDonations { export enum FundingSourceEnum { - Credit = 'credit', - Debit = 'debit' + Credit = 'credit', + Debit = 'debit' } export enum TypeEnum { - Bcmc = 'bcmc', - Scheme = 'scheme', - NetworkToken = 'networkToken', - Giftcard = 'giftcard', - Card = 'card', - Clicktopay = 'clicktopay' + Bcmc = 'bcmc', + Scheme = 'scheme', + NetworkToken = 'networkToken', + Giftcard = 'giftcard', + Card = 'card', + Clicktopay = 'clicktopay' } } diff --git a/src/typings/checkout/cashAppDetails.ts b/src/typings/checkout/cashAppDetails.ts index 754500b4d..9989ec98a 100644 --- a/src/typings/checkout/cashAppDetails.ts +++ b/src/typings/checkout/cashAppDetails.ts @@ -51,7 +51,7 @@ export class CashAppDetails { /** * cashapp */ - 'type'?: CashAppDetails.TypeEnum; + 'type'?: CashAppDetails.TypeEnum = CashAppDetails.TypeEnum.Cashapp; static discriminator: string | undefined = undefined; @@ -114,6 +114,6 @@ export class CashAppDetails { export namespace CashAppDetails { export enum TypeEnum { - Cashapp = 'cashapp' + Cashapp = 'cashapp' } } diff --git a/src/typings/checkout/cellulantDetails.ts b/src/typings/checkout/cellulantDetails.ts index 49785df50..f7e93287c 100644 --- a/src/typings/checkout/cellulantDetails.ts +++ b/src/typings/checkout/cellulantDetails.ts @@ -20,7 +20,7 @@ export class CellulantDetails { /** * **Cellulant** */ - 'type'?: CellulantDetails.TypeEnum; + 'type'?: CellulantDetails.TypeEnum = CellulantDetails.TypeEnum.Cellulant; static discriminator: string | undefined = undefined; @@ -48,6 +48,6 @@ export class CellulantDetails { export namespace CellulantDetails { export enum TypeEnum { - Cellulant = 'cellulant' + Cellulant = 'cellulant' } } diff --git a/src/typings/checkout/checkoutAwaitAction.ts b/src/typings/checkout/checkoutAwaitAction.ts index 9d438b5ac..4c576bf76 100644 --- a/src/typings/checkout/checkoutAwaitAction.ts +++ b/src/typings/checkout/checkoutAwaitAction.ts @@ -57,6 +57,6 @@ export class CheckoutAwaitAction { export namespace CheckoutAwaitAction { export enum TypeEnum { - Await = 'await' + Await = 'await' } } diff --git a/src/typings/checkout/checkoutBankAccount.ts b/src/typings/checkout/checkoutBankAccount.ts index bc8e094fe..e8ff942b1 100644 --- a/src/typings/checkout/checkoutBankAccount.ts +++ b/src/typings/checkout/checkoutBankAccount.ts @@ -111,12 +111,12 @@ export class CheckoutBankAccount { export namespace CheckoutBankAccount { export enum AccountTypeEnum { - Balance = 'balance', - Checking = 'checking', - Deposit = 'deposit', - General = 'general', - Other = 'other', - Payment = 'payment', - Savings = 'savings' + Balance = 'balance', + Checking = 'checking', + Deposit = 'deposit', + General = 'general', + Other = 'other', + Payment = 'payment', + Savings = 'savings' } } diff --git a/src/typings/checkout/checkoutBankTransferAction.ts b/src/typings/checkout/checkoutBankTransferAction.ts index b788fdf5b..75cc58ea2 100644 --- a/src/typings/checkout/checkoutBankTransferAction.ts +++ b/src/typings/checkout/checkoutBankTransferAction.ts @@ -50,7 +50,7 @@ export class CheckoutBankTransferAction { * The sort code of the bank transfer. */ 'sortCode'?: string; - 'totalAmount'?: Amount | null; + 'totalAmount'?: Amount; /** * The type of the action. */ @@ -116,7 +116,7 @@ export class CheckoutBankTransferAction { { "name": "totalAmount", "baseName": "totalAmount", - "type": "Amount | null" + "type": "Amount" }, { "name": "type", @@ -136,6 +136,6 @@ export class CheckoutBankTransferAction { export namespace CheckoutBankTransferAction { export enum TypeEnum { - BankTransfer = 'bankTransfer' + BankTransfer = 'bankTransfer' } } diff --git a/src/typings/checkout/checkoutDelegatedAuthenticationAction.ts b/src/typings/checkout/checkoutDelegatedAuthenticationAction.ts index 7e6130c03..77c6ac6e6 100644 --- a/src/typings/checkout/checkoutDelegatedAuthenticationAction.ts +++ b/src/typings/checkout/checkoutDelegatedAuthenticationAction.ts @@ -75,6 +75,6 @@ export class CheckoutDelegatedAuthenticationAction { export namespace CheckoutDelegatedAuthenticationAction { export enum TypeEnum { - DelegatedAuthentication = 'delegatedAuthentication' + DelegatedAuthentication = 'delegatedAuthentication' } } diff --git a/src/typings/checkout/checkoutNativeRedirectAction.ts b/src/typings/checkout/checkoutNativeRedirectAction.ts index 98e36b2d0..ed2965da3 100644 --- a/src/typings/checkout/checkoutNativeRedirectAction.ts +++ b/src/typings/checkout/checkoutNativeRedirectAction.ts @@ -75,6 +75,6 @@ export class CheckoutNativeRedirectAction { export namespace CheckoutNativeRedirectAction { export enum TypeEnum { - NativeRedirect = 'nativeRedirect' + NativeRedirect = 'nativeRedirect' } } diff --git a/src/typings/checkout/checkoutOrderResponse.ts b/src/typings/checkout/checkoutOrderResponse.ts index 7a30f402b..a14efa50b 100644 --- a/src/typings/checkout/checkoutOrderResponse.ts +++ b/src/typings/checkout/checkoutOrderResponse.ts @@ -10,7 +10,7 @@ import { Amount } from './amount'; export class CheckoutOrderResponse { - 'amount'?: Amount | null; + 'amount'?: Amount; /** * The expiry date for the order. */ @@ -27,7 +27,7 @@ export class CheckoutOrderResponse { * The merchant reference for the order. */ 'reference'?: string; - 'remainingAmount'?: Amount | null; + 'remainingAmount'?: Amount; static discriminator: string | undefined = undefined; @@ -35,7 +35,7 @@ export class CheckoutOrderResponse { { "name": "amount", "baseName": "amount", - "type": "Amount | null" + "type": "Amount" }, { "name": "expiresAt", @@ -60,7 +60,7 @@ export class CheckoutOrderResponse { { "name": "remainingAmount", "baseName": "remainingAmount", - "type": "Amount | null" + "type": "Amount" } ]; static getAttributeTypeMap() { diff --git a/src/typings/checkout/checkoutQrCodeAction.ts b/src/typings/checkout/checkoutQrCodeAction.ts index 7b3f595de..616dd5b2f 100644 --- a/src/typings/checkout/checkoutQrCodeAction.ts +++ b/src/typings/checkout/checkoutQrCodeAction.ts @@ -75,6 +75,6 @@ export class CheckoutQrCodeAction { export namespace CheckoutQrCodeAction { export enum TypeEnum { - QrCode = 'qrCode' + QrCode = 'qrCode' } } diff --git a/src/typings/checkout/checkoutRedirectAction.ts b/src/typings/checkout/checkoutRedirectAction.ts index 151573529..b4a2e8b62 100644 --- a/src/typings/checkout/checkoutRedirectAction.ts +++ b/src/typings/checkout/checkoutRedirectAction.ts @@ -66,6 +66,6 @@ export class CheckoutRedirectAction { export namespace CheckoutRedirectAction { export enum TypeEnum { - Redirect = 'redirect' + Redirect = 'redirect' } } diff --git a/src/typings/checkout/checkoutSDKAction.ts b/src/typings/checkout/checkoutSDKAction.ts index ca15ad282..3457d1f78 100644 --- a/src/typings/checkout/checkoutSDKAction.ts +++ b/src/typings/checkout/checkoutSDKAction.ts @@ -66,7 +66,7 @@ export class CheckoutSDKAction { export namespace CheckoutSDKAction { export enum TypeEnum { - Sdk = 'sdk', - WechatpaySdk = 'wechatpaySDK' + Sdk = 'sdk', + WechatpaySdk = 'wechatpaySDK' } } diff --git a/src/typings/checkout/checkoutSessionInstallmentOption.ts b/src/typings/checkout/checkoutSessionInstallmentOption.ts index 46ff4967f..971634a4f 100644 --- a/src/typings/checkout/checkoutSessionInstallmentOption.ts +++ b/src/typings/checkout/checkoutSessionInstallmentOption.ts @@ -10,7 +10,7 @@ export class CheckoutSessionInstallmentOption { /** - * Defines the type of installment plan. If not set, defaults to **regular**. Possible values: * **regular** * **revolving** + * Defines the type of installment plan. If not set, defaults to **regular**. Possible values: * **regular** * **revolving*** **bonus** * **with_interest** * **buynow_paylater** * **nointerest_bonus** * **interest_bonus** * **refund_prctg** * **nointeres_refund_prctg** * **interes_refund_prctg** */ 'plans'?: Array; /** @@ -48,14 +48,15 @@ export class CheckoutSessionInstallmentOption { export namespace CheckoutSessionInstallmentOption { export enum PlansEnum { - BuynowPaylater = 'buynow_paylater', - InteresRefundPrctg = 'interes_refund_prctg', - InterestBonus = 'interest_bonus', - NointeresRefundPrctg = 'nointeres_refund_prctg', - NointerestBonus = 'nointerest_bonus', - RefundPrctg = 'refund_prctg', - Regular = 'regular', - Revolving = 'revolving', - WithInterest = 'with_interest' + Bonus = 'bonus', + BuynowPaylater = 'buynow_paylater', + InteresRefundPrctg = 'interes_refund_prctg', + InterestBonus = 'interest_bonus', + NointeresRefundPrctg = 'nointeres_refund_prctg', + NointerestBonus = 'nointerest_bonus', + RefundPrctg = 'refund_prctg', + Regular = 'regular', + Revolving = 'revolving', + WithInterest = 'with_interest' } } diff --git a/src/typings/checkout/checkoutSessionThreeDS2RequestData.ts b/src/typings/checkout/checkoutSessionThreeDS2RequestData.ts index 265e37b9c..f9ac74127 100644 --- a/src/typings/checkout/checkoutSessionThreeDS2RequestData.ts +++ b/src/typings/checkout/checkoutSessionThreeDS2RequestData.ts @@ -10,13 +10,13 @@ import { Phone } from './phone'; export class CheckoutSessionThreeDS2RequestData { - 'homePhone'?: Phone | null; - 'mobilePhone'?: Phone | null; + 'homePhone'?: Phone; + 'mobilePhone'?: Phone; /** * Indicates whether a challenge is requested for this transaction. Possible values: * **01** — No preference * **02** — No challenge requested * **03** — Challenge requested (3DS Requestor preference) * **04** — Challenge requested (Mandate) * **05** — No challenge (transactional risk analysis is already performed) * **06** — Data Only */ 'threeDSRequestorChallengeInd'?: CheckoutSessionThreeDS2RequestData.ThreeDSRequestorChallengeIndEnum; - 'workPhone'?: Phone | null; + 'workPhone'?: Phone; static discriminator: string | undefined = undefined; @@ -24,12 +24,12 @@ export class CheckoutSessionThreeDS2RequestData { { "name": "homePhone", "baseName": "homePhone", - "type": "Phone | null" + "type": "Phone" }, { "name": "mobilePhone", "baseName": "mobilePhone", - "type": "Phone | null" + "type": "Phone" }, { "name": "threeDSRequestorChallengeInd", @@ -39,7 +39,7 @@ export class CheckoutSessionThreeDS2RequestData { { "name": "workPhone", "baseName": "workPhone", - "type": "Phone | null" + "type": "Phone" } ]; static getAttributeTypeMap() { @@ -49,11 +49,11 @@ export class CheckoutSessionThreeDS2RequestData { export namespace CheckoutSessionThreeDS2RequestData { export enum ThreeDSRequestorChallengeIndEnum { - _01 = '01', - _02 = '02', - _03 = '03', - _04 = '04', - _05 = '05', - _06 = '06' + _01 = '01', + _02 = '02', + _03 = '03', + _04 = '04', + _05 = '05', + _06 = '06' } } diff --git a/src/typings/checkout/checkoutThreeDS2Action.ts b/src/typings/checkout/checkoutThreeDS2Action.ts index fea988cab..08a6a46e3 100644 --- a/src/typings/checkout/checkoutThreeDS2Action.ts +++ b/src/typings/checkout/checkoutThreeDS2Action.ts @@ -84,6 +84,6 @@ export class CheckoutThreeDS2Action { export namespace CheckoutThreeDS2Action { export enum TypeEnum { - ThreeDs2 = 'threeDS2' + ThreeDs2 = 'threeDS2' } } diff --git a/src/typings/checkout/checkoutVoucherAction.ts b/src/typings/checkout/checkoutVoucherAction.ts index 4f4cf6d7e..faf870968 100644 --- a/src/typings/checkout/checkoutVoucherAction.ts +++ b/src/typings/checkout/checkoutVoucherAction.ts @@ -30,7 +30,7 @@ export class CheckoutVoucherAction { * The date time of the voucher expiry. */ 'expiresAt'?: string; - 'initialAmount'?: Amount | null; + 'initialAmount'?: Amount; /** * The URL to the detailed instructions to make payment using the voucher. */ @@ -75,8 +75,8 @@ export class CheckoutVoucherAction { * The shopper name. */ 'shopperName'?: string; - 'surcharge'?: Amount | null; - 'totalAmount'?: Amount | null; + 'surcharge'?: Amount; + 'totalAmount'?: Amount; /** * **voucher** */ @@ -117,7 +117,7 @@ export class CheckoutVoucherAction { { "name": "initialAmount", "baseName": "initialAmount", - "type": "Amount | null" + "type": "Amount" }, { "name": "instructionsUrl", @@ -177,12 +177,12 @@ export class CheckoutVoucherAction { { "name": "surcharge", "baseName": "surcharge", - "type": "Amount | null" + "type": "Amount" }, { "name": "totalAmount", "baseName": "totalAmount", - "type": "Amount | null" + "type": "Amount" }, { "name": "type", @@ -202,6 +202,6 @@ export class CheckoutVoucherAction { export namespace CheckoutVoucherAction { export enum TypeEnum { - Voucher = 'voucher' + Voucher = 'voucher' } } diff --git a/src/typings/checkout/createCheckoutSessionRequest.ts b/src/typings/checkout/createCheckoutSessionRequest.ts index 7ea8b68b0..3ba826933 100644 --- a/src/typings/checkout/createCheckoutSessionRequest.ts +++ b/src/typings/checkout/createCheckoutSessionRequest.ts @@ -27,8 +27,8 @@ import { Split } from './split'; import { ThreeDSecureData } from './threeDSecureData'; export class CreateCheckoutSessionRequest { - 'accountInfo'?: AccountInfo | null; - 'additionalAmount'?: Amount | null; + 'accountInfo'?: AccountInfo; + 'additionalAmount'?: Amount; /** * This field contains additional data, which may be required for a particular payment request. The `additionalData` object consists of entries, each of which includes the key and value. */ @@ -38,9 +38,9 @@ export class CreateCheckoutSessionRequest { */ 'allowedPaymentMethods'?: Array; 'amount': Amount; - 'applicationInfo'?: ApplicationInfo | null; - 'authenticationData'?: AuthenticationData | null; - 'billingAddress'?: BillingAddress | null; + 'applicationInfo'?: ApplicationInfo; + 'authenticationData'?: AuthenticationData; + 'billingAddress'?: BillingAddress; /** * List of payment methods to be hidden from the shopper. To refer to payment methods, use their [payment method type](https://docs.adyen.com/payment-methods/payment-method-types). Example: `\"blockedPaymentMethods\":[\"ideal\",\"giropay\"]` */ @@ -53,7 +53,7 @@ export class CreateCheckoutSessionRequest { * The platform where a payment transaction takes place. This field is optional for filtering out payment methods that are only available on specific platforms. If this value is not set, then we will try to infer it from the `sdkVersion` or `token`. Possible values: * **iOS** * **Android** * **Web** */ 'channel'?: CreateCheckoutSessionRequest.ChannelEnum; - 'company'?: Company | null; + 'company'?: Company; /** * The shopper\'s two-letter country code. */ @@ -66,7 +66,7 @@ export class CreateCheckoutSessionRequest { * The date and time when the purchased goods should be delivered. [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format: YYYY-MM-DDThh:mm:ss+TZD, for example, **2020-12-18T10:15:30+01:00**. */ 'deliverAt'?: Date; - 'deliveryAddress'?: DeliveryAddress | null; + 'deliveryAddress'?: DeliveryAddress; /** * When true and `shopperReference` is provided, the shopper will be asked if the payment details should be stored for future [one-click payments](https://docs.adyen.com/get-started-with-adyen/payment-glossary/#one-click-payments-definition). */ @@ -83,8 +83,8 @@ export class CreateCheckoutSessionRequest { * The date the session expires in [ISO8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. When not specified, the expiry date is set to 1 hour after session creation. You cannot set the session expiry to more than 24 hours after session creation. */ 'expiresAt'?: Date; - 'fundOrigin'?: FundOrigin | null; - 'fundRecipient'?: FundRecipient | null; + 'fundOrigin'?: FundOrigin; + 'fundRecipient'?: FundRecipient; /** * A set of key-value pairs that specifies the installment options available per payment method. The key must be a payment method name in lowercase. For example, **card** to specify installment options for all cards, or **visa** or **mc**. The value must be an object containing the installment options. */ @@ -93,7 +93,7 @@ export class CreateCheckoutSessionRequest { * Price and product information about the purchased items, to be included on the invoice sent to the shopper. > This field is required for 3x 4x Oney, Affirm, Afterpay, Clearpay, Klarna, Ratepay, Riverty, and Zip. */ 'lineItems'?: Array; - 'mandate'?: Mandate | null; + 'mandate'?: Mandate; /** * The [merchant category code](https://en.wikipedia.org/wiki/Merchant_category_code) (MCC) is a four-digit number, which relates to a particular market segment. This code reflects the predominant activity that is conducted by the merchant. */ @@ -113,9 +113,9 @@ export class CreateCheckoutSessionRequest { /** * Indicates the type of front end integration. Possible values: * **embedded** (default): Drop-in or Components integration * **hosted**: Hosted Checkout integration */ - 'mode'?: CreateCheckoutSessionRequest.ModeEnum; - 'mpiData'?: ThreeDSecureData | null; - 'platformChargebackLogic'?: PlatformChargebackLogic | null; + 'mode'?: CreateCheckoutSessionRequest.ModeEnum = CreateCheckoutSessionRequest.ModeEnum.Embedded; + 'mpiData'?: ThreeDSecureData; + 'platformChargebackLogic'?: PlatformChargebackLogic; /** * Date after which no further authorisations shall be performed. Only for 3D Secure 2. */ @@ -144,7 +144,7 @@ export class CreateCheckoutSessionRequest { * The URL to return to in case of a redirection. The format depends on the channel. * For web, include the protocol `http://` or `https://`. You can also include your own additional query parameters, for example, shopper ID or order reference number. Example: `https://your-company.com/checkout?shopperOrder=12xy` * For iOS, use the custom URL for your app. To know more about setting custom URL schemes, refer to the [Apple Developer documentation](https://developer.apple.com/documentation/uikit/inter-process_communication/allowing_apps_and_websites_to_link_to_your_content/defining_a_custom_url_scheme_for_your_app). Example: `my-app://` * For Android, use a custom URL handled by an Activity on your app. You can configure it with an [intent filter](https://developer.android.com/guide/components/intents-filters). Example: `my-app://your.package.name` If the URL to return to includes non-ASCII characters, like spaces or special letters, URL encode the value. > The URL must not include personally identifiable information (PII), for example name or email address. */ 'returnUrl': string; - 'riskData'?: RiskData | null; + 'riskData'?: RiskData; /** * The shopper\'s email address. */ @@ -161,7 +161,7 @@ export class CreateCheckoutSessionRequest { * The combination of a language code and a country code to specify the language to be used in the payment. */ 'shopperLocale'?: string; - 'shopperName'?: Name | null; + 'shopperName'?: Name; /** * Your reference to uniquely identify this shopper, for example user ID or account ID. The value is case-sensitive and must be at least three characters. > Your reference must not include personally identifiable information (PII) such as name or email address. */ @@ -185,7 +185,7 @@ export class CreateCheckoutSessionRequest { /** * Boolean value indicating whether the card payment method should be split into separate debit and credit options. */ - 'splitCardFundingSources'?: boolean; + 'splitCardFundingSources'?: boolean = false; /** * An array of objects specifying how to split a payment when using [Adyen for Platforms](https://docs.adyen.com/platforms/process-payments#providing-split-information), [Classic Platforms integration](https://docs.adyen.com/classic-platforms/processing-payments#providing-split-information), or [Issuing](https://docs.adyen.com/issuing/manage-funds#split). */ @@ -214,14 +214,14 @@ export class CreateCheckoutSessionRequest { * Sets a custom theme for [Hosted Checkout](https://docs.adyen.com/online-payments/build-your-integration/?platform=Web&integration=Hosted+Checkout). The value can be any of the **Theme ID** values from your Customer Area. */ 'themeId'?: string; - 'threeDS2RequestData'?: CheckoutSessionThreeDS2RequestData | null; + 'threeDS2RequestData'?: CheckoutSessionThreeDS2RequestData; /** * If set to true, you will only perform the [3D Secure 2 authentication](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only), and not the payment authorisation. * * @deprecated since Adyen Checkout API v69 * Use `authenticationData.authenticationOnly` instead. */ - 'threeDSAuthenticationOnly'?: boolean; + 'threeDSAuthenticationOnly'?: boolean = false; /** * Set to true if the payment should be routed to a trusted MID. */ @@ -233,12 +233,12 @@ export class CreateCheckoutSessionRequest { { "name": "accountInfo", "baseName": "accountInfo", - "type": "AccountInfo | null" + "type": "AccountInfo" }, { "name": "additionalAmount", "baseName": "additionalAmount", - "type": "Amount | null" + "type": "Amount" }, { "name": "additionalData", @@ -258,17 +258,17 @@ export class CreateCheckoutSessionRequest { { "name": "applicationInfo", "baseName": "applicationInfo", - "type": "ApplicationInfo | null" + "type": "ApplicationInfo" }, { "name": "authenticationData", "baseName": "authenticationData", - "type": "AuthenticationData | null" + "type": "AuthenticationData" }, { "name": "billingAddress", "baseName": "billingAddress", - "type": "BillingAddress | null" + "type": "BillingAddress" }, { "name": "blockedPaymentMethods", @@ -288,7 +288,7 @@ export class CreateCheckoutSessionRequest { { "name": "company", "baseName": "company", - "type": "Company | null" + "type": "Company" }, { "name": "countryCode", @@ -308,7 +308,7 @@ export class CreateCheckoutSessionRequest { { "name": "deliveryAddress", "baseName": "deliveryAddress", - "type": "DeliveryAddress | null" + "type": "DeliveryAddress" }, { "name": "enableOneClick", @@ -333,12 +333,12 @@ export class CreateCheckoutSessionRequest { { "name": "fundOrigin", "baseName": "fundOrigin", - "type": "FundOrigin | null" + "type": "FundOrigin" }, { "name": "fundRecipient", "baseName": "fundRecipient", - "type": "FundRecipient | null" + "type": "FundRecipient" }, { "name": "installmentOptions", @@ -353,7 +353,7 @@ export class CreateCheckoutSessionRequest { { "name": "mandate", "baseName": "mandate", - "type": "Mandate | null" + "type": "Mandate" }, { "name": "mcc", @@ -383,12 +383,12 @@ export class CreateCheckoutSessionRequest { { "name": "mpiData", "baseName": "mpiData", - "type": "ThreeDSecureData | null" + "type": "ThreeDSecureData" }, { "name": "platformChargebackLogic", "baseName": "platformChargebackLogic", - "type": "PlatformChargebackLogic | null" + "type": "PlatformChargebackLogic" }, { "name": "recurringExpiry", @@ -428,7 +428,7 @@ export class CreateCheckoutSessionRequest { { "name": "riskData", "baseName": "riskData", - "type": "RiskData | null" + "type": "RiskData" }, { "name": "shopperEmail", @@ -453,7 +453,7 @@ export class CreateCheckoutSessionRequest { { "name": "shopperName", "baseName": "shopperName", - "type": "Name | null" + "type": "Name" }, { "name": "shopperReference", @@ -523,7 +523,7 @@ export class CreateCheckoutSessionRequest { { "name": "threeDS2RequestData", "baseName": "threeDS2RequestData", - "type": "CheckoutSessionThreeDS2RequestData | null" + "type": "CheckoutSessionThreeDS2RequestData" }, { "name": "threeDSAuthenticationOnly", @@ -543,33 +543,33 @@ export class CreateCheckoutSessionRequest { export namespace CreateCheckoutSessionRequest { export enum ChannelEnum { - IOs = 'iOS', - Android = 'Android', - Web = 'Web' + IOs = 'iOS', + Android = 'Android', + Web = 'Web' } export enum ModeEnum { - Embedded = 'embedded', - Hosted = 'hosted' + Embedded = 'embedded', + Hosted = 'hosted' } export enum RecurringProcessingModelEnum { - CardOnFile = 'CardOnFile', - Subscription = 'Subscription', - UnscheduledCardOnFile = 'UnscheduledCardOnFile' + CardOnFile = 'CardOnFile', + Subscription = 'Subscription', + UnscheduledCardOnFile = 'UnscheduledCardOnFile' } export enum ShopperInteractionEnum { - Ecommerce = 'Ecommerce', - ContAuth = 'ContAuth', - Moto = 'Moto', - Pos = 'POS' + Ecommerce = 'Ecommerce', + ContAuth = 'ContAuth', + Moto = 'Moto', + Pos = 'POS' } export enum StoreFiltrationModeEnum { - Exclusive = 'exclusive', - Inclusive = 'inclusive', - SkipFilter = 'skipFilter' + Exclusive = 'exclusive', + Inclusive = 'inclusive', + SkipFilter = 'skipFilter' } export enum StorePaymentMethodModeEnum { - AskForConsent = 'askForConsent', - Disabled = 'disabled', - Enabled = 'enabled' + AskForConsent = 'askForConsent', + Disabled = 'disabled', + Enabled = 'enabled' } } diff --git a/src/typings/checkout/createCheckoutSessionResponse.ts b/src/typings/checkout/createCheckoutSessionResponse.ts index df1db81c1..2625f9f53 100644 --- a/src/typings/checkout/createCheckoutSessionResponse.ts +++ b/src/typings/checkout/createCheckoutSessionResponse.ts @@ -27,8 +27,8 @@ import { Split } from './split'; import { ThreeDSecureData } from './threeDSecureData'; export class CreateCheckoutSessionResponse { - 'accountInfo'?: AccountInfo | null; - 'additionalAmount'?: Amount | null; + 'accountInfo'?: AccountInfo; + 'additionalAmount'?: Amount; /** * This field contains additional data, which may be required for a particular payment request. The `additionalData` object consists of entries, each of which includes the key and value. */ @@ -38,9 +38,9 @@ export class CreateCheckoutSessionResponse { */ 'allowedPaymentMethods'?: Array; 'amount': Amount; - 'applicationInfo'?: ApplicationInfo | null; - 'authenticationData'?: AuthenticationData | null; - 'billingAddress'?: BillingAddress | null; + 'applicationInfo'?: ApplicationInfo; + 'authenticationData'?: AuthenticationData; + 'billingAddress'?: BillingAddress; /** * List of payment methods to be hidden from the shopper. To refer to payment methods, use their [payment method type](https://docs.adyen.com/payment-methods/payment-method-types). Example: `\"blockedPaymentMethods\":[\"ideal\",\"giropay\"]` */ @@ -53,7 +53,7 @@ export class CreateCheckoutSessionResponse { * The platform where a payment transaction takes place. This field is optional for filtering out payment methods that are only available on specific platforms. If this value is not set, then we will try to infer it from the `sdkVersion` or `token`. Possible values: * **iOS** * **Android** * **Web** */ 'channel'?: CreateCheckoutSessionResponse.ChannelEnum; - 'company'?: Company | null; + 'company'?: Company; /** * The shopper\'s two-letter country code. */ @@ -66,7 +66,7 @@ export class CreateCheckoutSessionResponse { * The date and time when the purchased goods should be delivered. [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format: YYYY-MM-DDThh:mm:ss+TZD, for example, **2020-12-18T10:15:30+01:00**. */ 'deliverAt'?: Date; - 'deliveryAddress'?: DeliveryAddress | null; + 'deliveryAddress'?: DeliveryAddress; /** * When true and `shopperReference` is provided, the shopper will be asked if the payment details should be stored for future [one-click payments](https://docs.adyen.com/get-started-with-adyen/payment-glossary/#one-click-payments-definition). */ @@ -83,8 +83,8 @@ export class CreateCheckoutSessionResponse { * The date the session expires in [ISO8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. When not specified, the expiry date is set to 1 hour after session creation. You cannot set the session expiry to more than 24 hours after session creation. */ 'expiresAt': Date; - 'fundOrigin'?: FundOrigin | null; - 'fundRecipient'?: FundRecipient | null; + 'fundOrigin'?: FundOrigin; + 'fundRecipient'?: FundRecipient; /** * A unique identifier of the session. */ @@ -97,7 +97,7 @@ export class CreateCheckoutSessionResponse { * Price and product information about the purchased items, to be included on the invoice sent to the shopper. > This field is required for 3x 4x Oney, Affirm, Afterpay, Clearpay, Klarna, Ratepay, Riverty, and Zip. */ 'lineItems'?: Array; - 'mandate'?: Mandate | null; + 'mandate'?: Mandate; /** * The [merchant category code](https://en.wikipedia.org/wiki/Merchant_category_code) (MCC) is a four-digit number, which relates to a particular market segment. This code reflects the predominant activity that is conducted by the merchant. */ @@ -117,9 +117,9 @@ export class CreateCheckoutSessionResponse { /** * Indicates the type of front end integration. Possible values: * **embedded** (default): Drop-in or Components integration * **hosted**: Hosted Checkout integration */ - 'mode'?: CreateCheckoutSessionResponse.ModeEnum; - 'mpiData'?: ThreeDSecureData | null; - 'platformChargebackLogic'?: PlatformChargebackLogic | null; + 'mode'?: CreateCheckoutSessionResponse.ModeEnum = CreateCheckoutSessionResponse.ModeEnum.Embedded; + 'mpiData'?: ThreeDSecureData; + 'platformChargebackLogic'?: PlatformChargebackLogic; /** * Date after which no further authorisations shall be performed. Only for 3D Secure 2. */ @@ -148,7 +148,7 @@ export class CreateCheckoutSessionResponse { * The URL to return to in case of a redirection. The format depends on the channel. * For web, include the protocol `http://` or `https://`. You can also include your own additional query parameters, for example, shopper ID or order reference number. Example: `https://your-company.com/checkout?shopperOrder=12xy` * For iOS, use the custom URL for your app. To know more about setting custom URL schemes, refer to the [Apple Developer documentation](https://developer.apple.com/documentation/uikit/inter-process_communication/allowing_apps_and_websites_to_link_to_your_content/defining_a_custom_url_scheme_for_your_app). Example: `my-app://` * For Android, use a custom URL handled by an Activity on your app. You can configure it with an [intent filter](https://developer.android.com/guide/components/intents-filters). Example: `my-app://your.package.name` If the URL to return to includes non-ASCII characters, like spaces or special letters, URL encode the value. > The URL must not include personally identifiable information (PII), for example name or email address. */ 'returnUrl': string; - 'riskData'?: RiskData | null; + 'riskData'?: RiskData; /** * The payment session data you need to pass to your front end. */ @@ -169,7 +169,7 @@ export class CreateCheckoutSessionResponse { * The combination of a language code and a country code to specify the language to be used in the payment. */ 'shopperLocale'?: string; - 'shopperName'?: Name | null; + 'shopperName'?: Name; /** * Your reference to uniquely identify this shopper, for example user ID or account ID. The value is case-sensitive and must be at least three characters. > Your reference must not include personally identifiable information (PII) such as name or email address. */ @@ -193,7 +193,7 @@ export class CreateCheckoutSessionResponse { /** * Boolean value indicating whether the card payment method should be split into separate debit and credit options. */ - 'splitCardFundingSources'?: boolean; + 'splitCardFundingSources'?: boolean = false; /** * An array of objects specifying how to split a payment when using [Adyen for Platforms](https://docs.adyen.com/platforms/process-payments#providing-split-information), [Classic Platforms integration](https://docs.adyen.com/classic-platforms/processing-payments#providing-split-information), or [Issuing](https://docs.adyen.com/issuing/manage-funds#split). */ @@ -222,14 +222,14 @@ export class CreateCheckoutSessionResponse { * Sets a custom theme for [Hosted Checkout](https://docs.adyen.com/online-payments/build-your-integration/?platform=Web&integration=Hosted+Checkout). The value can be any of the **Theme ID** values from your Customer Area. */ 'themeId'?: string; - 'threeDS2RequestData'?: CheckoutSessionThreeDS2RequestData | null; + 'threeDS2RequestData'?: CheckoutSessionThreeDS2RequestData; /** * If set to true, you will only perform the [3D Secure 2 authentication](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only), and not the payment authorisation. * * @deprecated since Adyen Checkout API v69 * Use `authenticationData.authenticationOnly` instead. */ - 'threeDSAuthenticationOnly'?: boolean; + 'threeDSAuthenticationOnly'?: boolean = false; /** * Set to true if the payment should be routed to a trusted MID. */ @@ -245,12 +245,12 @@ export class CreateCheckoutSessionResponse { { "name": "accountInfo", "baseName": "accountInfo", - "type": "AccountInfo | null" + "type": "AccountInfo" }, { "name": "additionalAmount", "baseName": "additionalAmount", - "type": "Amount | null" + "type": "Amount" }, { "name": "additionalData", @@ -270,17 +270,17 @@ export class CreateCheckoutSessionResponse { { "name": "applicationInfo", "baseName": "applicationInfo", - "type": "ApplicationInfo | null" + "type": "ApplicationInfo" }, { "name": "authenticationData", "baseName": "authenticationData", - "type": "AuthenticationData | null" + "type": "AuthenticationData" }, { "name": "billingAddress", "baseName": "billingAddress", - "type": "BillingAddress | null" + "type": "BillingAddress" }, { "name": "blockedPaymentMethods", @@ -300,7 +300,7 @@ export class CreateCheckoutSessionResponse { { "name": "company", "baseName": "company", - "type": "Company | null" + "type": "Company" }, { "name": "countryCode", @@ -320,7 +320,7 @@ export class CreateCheckoutSessionResponse { { "name": "deliveryAddress", "baseName": "deliveryAddress", - "type": "DeliveryAddress | null" + "type": "DeliveryAddress" }, { "name": "enableOneClick", @@ -345,12 +345,12 @@ export class CreateCheckoutSessionResponse { { "name": "fundOrigin", "baseName": "fundOrigin", - "type": "FundOrigin | null" + "type": "FundOrigin" }, { "name": "fundRecipient", "baseName": "fundRecipient", - "type": "FundRecipient | null" + "type": "FundRecipient" }, { "name": "id", @@ -370,7 +370,7 @@ export class CreateCheckoutSessionResponse { { "name": "mandate", "baseName": "mandate", - "type": "Mandate | null" + "type": "Mandate" }, { "name": "mcc", @@ -400,12 +400,12 @@ export class CreateCheckoutSessionResponse { { "name": "mpiData", "baseName": "mpiData", - "type": "ThreeDSecureData | null" + "type": "ThreeDSecureData" }, { "name": "platformChargebackLogic", "baseName": "platformChargebackLogic", - "type": "PlatformChargebackLogic | null" + "type": "PlatformChargebackLogic" }, { "name": "recurringExpiry", @@ -445,7 +445,7 @@ export class CreateCheckoutSessionResponse { { "name": "riskData", "baseName": "riskData", - "type": "RiskData | null" + "type": "RiskData" }, { "name": "sessionData", @@ -475,7 +475,7 @@ export class CreateCheckoutSessionResponse { { "name": "shopperName", "baseName": "shopperName", - "type": "Name | null" + "type": "Name" }, { "name": "shopperReference", @@ -545,7 +545,7 @@ export class CreateCheckoutSessionResponse { { "name": "threeDS2RequestData", "baseName": "threeDS2RequestData", - "type": "CheckoutSessionThreeDS2RequestData | null" + "type": "CheckoutSessionThreeDS2RequestData" }, { "name": "threeDSAuthenticationOnly", @@ -570,33 +570,33 @@ export class CreateCheckoutSessionResponse { export namespace CreateCheckoutSessionResponse { export enum ChannelEnum { - IOs = 'iOS', - Android = 'Android', - Web = 'Web' + IOs = 'iOS', + Android = 'Android', + Web = 'Web' } export enum ModeEnum { - Embedded = 'embedded', - Hosted = 'hosted' + Embedded = 'embedded', + Hosted = 'hosted' } export enum RecurringProcessingModelEnum { - CardOnFile = 'CardOnFile', - Subscription = 'Subscription', - UnscheduledCardOnFile = 'UnscheduledCardOnFile' + CardOnFile = 'CardOnFile', + Subscription = 'Subscription', + UnscheduledCardOnFile = 'UnscheduledCardOnFile' } export enum ShopperInteractionEnum { - Ecommerce = 'Ecommerce', - ContAuth = 'ContAuth', - Moto = 'Moto', - Pos = 'POS' + Ecommerce = 'Ecommerce', + ContAuth = 'ContAuth', + Moto = 'Moto', + Pos = 'POS' } export enum StoreFiltrationModeEnum { - Exclusive = 'exclusive', - Inclusive = 'inclusive', - SkipFilter = 'skipFilter' + Exclusive = 'exclusive', + Inclusive = 'inclusive', + SkipFilter = 'skipFilter' } export enum StorePaymentMethodModeEnum { - AskForConsent = 'askForConsent', - Disabled = 'disabled', - Enabled = 'enabled' + AskForConsent = 'askForConsent', + Disabled = 'disabled', + Enabled = 'enabled' } } diff --git a/src/typings/checkout/createOrderResponse.ts b/src/typings/checkout/createOrderResponse.ts index 76e77ace8..5951c25ea 100644 --- a/src/typings/checkout/createOrderResponse.ts +++ b/src/typings/checkout/createOrderResponse.ts @@ -20,7 +20,7 @@ export class CreateOrderResponse { * The date that the order will expire. */ 'expiresAt': string; - 'fraudResult'?: FraudResult | null; + 'fraudResult'?: FraudResult; /** * The encrypted data that will be used by merchant for adding payments to the order. */ @@ -64,7 +64,7 @@ export class CreateOrderResponse { { "name": "fraudResult", "baseName": "fraudResult", - "type": "FraudResult | null" + "type": "FraudResult" }, { "name": "orderData", @@ -104,6 +104,6 @@ export class CreateOrderResponse { export namespace CreateOrderResponse { export enum ResultCodeEnum { - Success = 'Success' + Success = 'Success' } } diff --git a/src/typings/checkout/deliveryMethod.ts b/src/typings/checkout/deliveryMethod.ts index 0beb2f5d9..8af34656c 100644 --- a/src/typings/checkout/deliveryMethod.ts +++ b/src/typings/checkout/deliveryMethod.ts @@ -10,7 +10,7 @@ import { Amount } from './amount'; export class DeliveryMethod { - 'amount'?: Amount | null; + 'amount'?: Amount; /** * The name of the delivery method as shown to the shopper. */ @@ -34,7 +34,7 @@ export class DeliveryMethod { { "name": "amount", "baseName": "amount", - "type": "Amount | null" + "type": "Amount" }, { "name": "description", @@ -64,6 +64,6 @@ export class DeliveryMethod { export namespace DeliveryMethod { export enum TypeEnum { - Shipping = 'Shipping' + Shipping = 'Shipping' } } diff --git a/src/typings/checkout/detailsRequestAuthenticationData.ts b/src/typings/checkout/detailsRequestAuthenticationData.ts index fa86768ef..82f2021a1 100644 --- a/src/typings/checkout/detailsRequestAuthenticationData.ts +++ b/src/typings/checkout/detailsRequestAuthenticationData.ts @@ -12,7 +12,7 @@ export class DetailsRequestAuthenticationData { /** * If set to true, you will only perform the [3D Secure 2 authentication](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only), and not the payment authorisation. Default: *false**. */ - 'authenticationOnly'?: boolean; + 'authenticationOnly'?: boolean = false; static discriminator: string | undefined = undefined; diff --git a/src/typings/checkout/deviceRenderOptions.ts b/src/typings/checkout/deviceRenderOptions.ts index a6f03bd53..ed10a49a6 100644 --- a/src/typings/checkout/deviceRenderOptions.ts +++ b/src/typings/checkout/deviceRenderOptions.ts @@ -12,7 +12,7 @@ export class DeviceRenderOptions { /** * Supported SDK interface types. Allowed values: * native * html * both */ - 'sdkInterface'?: DeviceRenderOptions.SdkInterfaceEnum; + 'sdkInterface'?: DeviceRenderOptions.SdkInterfaceEnum = DeviceRenderOptions.SdkInterfaceEnum.Both; /** * UI types supported for displaying specific challenges. Allowed values: * text * singleSelect * outOfBand * otherHtml * multiSelect */ @@ -39,15 +39,15 @@ export class DeviceRenderOptions { export namespace DeviceRenderOptions { export enum SdkInterfaceEnum { - Native = 'native', - Html = 'html', - Both = 'both' + Native = 'native', + Html = 'html', + Both = 'both' } export enum SdkUiTypeEnum { - MultiSelect = 'multiSelect', - OtherHtml = 'otherHtml', - OutOfBand = 'outOfBand', - SingleSelect = 'singleSelect', - Text = 'text' + MultiSelect = 'multiSelect', + OtherHtml = 'otherHtml', + OutOfBand = 'outOfBand', + SingleSelect = 'singleSelect', + Text = 'text' } } diff --git a/src/typings/checkout/dokuDetails.ts b/src/typings/checkout/dokuDetails.ts index b6331d2d7..1099e7d16 100644 --- a/src/typings/checkout/dokuDetails.ts +++ b/src/typings/checkout/dokuDetails.ts @@ -66,16 +66,16 @@ export class DokuDetails { export namespace DokuDetails { export enum TypeEnum { - MandiriVa = 'doku_mandiri_va', - CimbVa = 'doku_cimb_va', - DanamonVa = 'doku_danamon_va', - BniVa = 'doku_bni_va', - PermataLiteAtm = 'doku_permata_lite_atm', - BriVa = 'doku_bri_va', - BcaVa = 'doku_bca_va', - Alfamart = 'doku_alfamart', - Indomaret = 'doku_indomaret', - Wallet = 'doku_wallet', - Ovo = 'doku_ovo' + DokuMandiriVa = 'doku_mandiri_va', + DokuCimbVa = 'doku_cimb_va', + DokuDanamonVa = 'doku_danamon_va', + DokuBniVa = 'doku_bni_va', + DokuPermataLiteAtm = 'doku_permata_lite_atm', + DokuBriVa = 'doku_bri_va', + DokuBcaVa = 'doku_bca_va', + DokuAlfamart = 'doku_alfamart', + DokuIndomaret = 'doku_indomaret', + DokuWallet = 'doku_wallet', + DokuOvo = 'doku_ovo' } } diff --git a/src/typings/checkout/donation.ts b/src/typings/checkout/donation.ts index 3c394c030..7334a3a2b 100644 --- a/src/typings/checkout/donation.ts +++ b/src/typings/checkout/donation.ts @@ -22,6 +22,10 @@ export class Donation { */ 'maxRoundupAmount'?: number; /** + * The [type of donation](https://docs.adyen.com/online-payments/donations/#donation-types). Possible values: * **roundup**: a donation where the original transaction amount is rounded up as a donation. * **fixedAmounts**: a donation where you show fixed donation amounts that the shopper can select from. + */ + 'type': string; + /** * The fixed donation amounts in [minor units](https://docs.adyen.com/development-resources/currency-codes//#minor-units). This field is only present when `donationType` is **fixedAmounts**. */ 'values'?: Array; @@ -44,6 +48,11 @@ export class Donation { "baseName": "maxRoundupAmount", "type": "number" }, + { + "name": "type", + "baseName": "type", + "type": "string" + }, { "name": "values", "baseName": "values", diff --git a/src/typings/checkout/donationCampaign.ts b/src/typings/checkout/donationCampaign.ts index e31a4fca6..92094b116 100644 --- a/src/typings/checkout/donationCampaign.ts +++ b/src/typings/checkout/donationCampaign.ts @@ -11,7 +11,7 @@ import { Amounts } from './amounts'; import { Donation } from './donation'; export class DonationCampaign { - 'amounts'?: Amounts | null; + 'amounts'?: Amounts; /** * The URL for the banner of the nonprofit or campaign. */ @@ -24,7 +24,7 @@ export class DonationCampaign { * The cause of the nonprofit. */ 'causeName'?: string; - 'donation'?: Donation | null; + 'donation'?: Donation; /** * The unique campaign ID of the donation campaign. */ @@ -56,7 +56,7 @@ export class DonationCampaign { { "name": "amounts", "baseName": "amounts", - "type": "Amounts | null" + "type": "Amounts" }, { "name": "bannerUrl", @@ -76,7 +76,7 @@ export class DonationCampaign { { "name": "donation", "baseName": "donation", - "type": "Donation | null" + "type": "Donation" }, { "name": "id", diff --git a/src/typings/checkout/donationPaymentRequest.ts b/src/typings/checkout/donationPaymentRequest.ts index 22fb1ae1e..b4e6d643c 100644 --- a/src/typings/checkout/donationPaymentRequest.ts +++ b/src/typings/checkout/donationPaymentRequest.ts @@ -9,33 +9,29 @@ import { AccountInfo } from './accountInfo'; import { Amount } from './amount'; -import { ApplePayDonations } from './applePayDonations'; import { ApplicationInfo } from './applicationInfo'; import { AuthenticationData } from './authenticationData'; import { BillingAddress } from './billingAddress'; import { BrowserInfo } from './browserInfo'; -import { CardDonations } from './cardDonations'; import { DeliveryAddress } from './deliveryAddress'; -import { GooglePayDonations } from './googlePayDonations'; -import { IdealDonations } from './idealDonations'; +import { DonationPaymentRequestPaymentMethod } from './donationPaymentRequestPaymentMethod'; import { LineItem } from './lineItem'; import { MerchantRiskIndicator } from './merchantRiskIndicator'; import { Name } from './name'; -import { PayWithGoogleDonations } from './payWithGoogleDonations'; import { ThreeDS2RequestFields } from './threeDS2RequestFields'; import { ThreeDSecureData } from './threeDSecureData'; export class DonationPaymentRequest { - 'accountInfo'?: AccountInfo | null; + 'accountInfo'?: AccountInfo; /** * This field contains additional data, which may be required for a particular payment request. The `additionalData` object consists of entries, each of which includes the key and value. */ 'additionalData'?: { [key: string]: string; }; 'amount': Amount; - 'applicationInfo'?: ApplicationInfo | null; - 'authenticationData'?: AuthenticationData | null; - 'billingAddress'?: BillingAddress | null; - 'browserInfo'?: BrowserInfo | null; + 'applicationInfo'?: ApplicationInfo; + 'authenticationData'?: AuthenticationData; + 'billingAddress'?: BillingAddress; + 'browserInfo'?: BrowserInfo; /** * The platform where a payment transaction takes place. This field is optional for filtering out payment methods that are only available on specific platforms. If this value is not set, then we will try to infer it from the `sdkVersion` or `token`. Possible values: * iOS * Android * Web */ @@ -63,7 +59,7 @@ export class DonationPaymentRequest { * The date and time the purchased goods should be delivered. Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DDThh:mm:ss.sssTZD Example: 2017-07-17T13:42:40.428+01:00 */ 'deliverAt'?: Date; - 'deliveryAddress'?: DeliveryAddress | null; + 'deliveryAddress'?: DeliveryAddress; /** * A string containing the shopper\'s device fingerprint. For more information, refer to [Device fingerprinting](https://docs.adyen.com/risk-management/device-fingerprinting). */ @@ -92,20 +88,17 @@ export class DonationPaymentRequest { * The merchant account identifier, with which you want to process the transaction. */ 'merchantAccount': string; - 'merchantRiskIndicator'?: MerchantRiskIndicator | null; + 'merchantRiskIndicator'?: MerchantRiskIndicator; /** * Metadata consists of entries, each of which includes a key and a value. Limits: * Maximum 20 key-value pairs per request. When exceeding, the \"177\" error occurs: \"Metadata size exceeds limit\". * Maximum 20 characters per key. * Maximum 80 characters per value. */ 'metadata'?: { [key: string]: string; }; - 'mpiData'?: ThreeDSecureData | null; + 'mpiData'?: ThreeDSecureData; /** * Required for the 3D Secure 2 `channel` **Web** integration. Set this parameter to the origin URL of the page that you are loading the 3D Secure Component from. */ 'origin'?: string; - /** - * The type and required details of a payment method to use. - */ - 'paymentMethod': ApplePayDonations | CardDonations | GooglePayDonations | IdealDonations | PayWithGoogleDonations; + 'paymentMethod': DonationPaymentRequestPaymentMethod; /** * Defines a recurring payment type. Required when creating a token to store payment details or using stored payment details. Allowed values: * `Subscription` – A transaction for a fixed or variable amount, which follows a fixed schedule. * `CardOnFile` – With a card-on-file (CoF) transaction, card details are stored to enable one-click or omnichannel journeys, or simply to streamline the checkout process. Any subscription not following a fixed schedule is also considered a card-on-file transaction. * `UnscheduledCardOnFile` – An unscheduled card-on-file (UCoF) transaction is a transaction that occurs on a non-fixed schedule and/or have variable amounts. For example, automatic top-ups when a cardholder\'s balance drops below a certain amount. */ @@ -146,7 +139,7 @@ export class DonationPaymentRequest { * The combination of a language code and a country code to specify the language to be used in the payment. */ 'shopperLocale'?: string; - 'shopperName'?: Name | null; + 'shopperName'?: Name; /** * Required for recurring payments. Your reference to uniquely identify this shopper, for example user ID or account ID. Minimum length: 3 characters. > Your reference must not include personally identifiable information (PII), for example name or email address. */ @@ -159,14 +152,14 @@ export class DonationPaymentRequest { * The shopper\'s telephone number. */ 'telephoneNumber'?: string; - 'threeDS2RequestData'?: ThreeDS2RequestFields | null; + 'threeDS2RequestData'?: ThreeDS2RequestFields; /** * If set to true, you will only perform the [3D Secure 2 authentication](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only), and not the payment authorisation. * * @deprecated since Adyen Checkout API v69 * Use `authenticationData.authenticationOnly` instead. */ - 'threeDSAuthenticationOnly'?: boolean; + 'threeDSAuthenticationOnly'?: boolean = false; static discriminator: string | undefined = undefined; @@ -174,7 +167,7 @@ export class DonationPaymentRequest { { "name": "accountInfo", "baseName": "accountInfo", - "type": "AccountInfo | null" + "type": "AccountInfo" }, { "name": "additionalData", @@ -189,22 +182,22 @@ export class DonationPaymentRequest { { "name": "applicationInfo", "baseName": "applicationInfo", - "type": "ApplicationInfo | null" + "type": "ApplicationInfo" }, { "name": "authenticationData", "baseName": "authenticationData", - "type": "AuthenticationData | null" + "type": "AuthenticationData" }, { "name": "billingAddress", "baseName": "billingAddress", - "type": "BillingAddress | null" + "type": "BillingAddress" }, { "name": "browserInfo", "baseName": "browserInfo", - "type": "BrowserInfo | null" + "type": "BrowserInfo" }, { "name": "channel", @@ -239,7 +232,7 @@ export class DonationPaymentRequest { { "name": "deliveryAddress", "baseName": "deliveryAddress", - "type": "DeliveryAddress | null" + "type": "DeliveryAddress" }, { "name": "deviceFingerprint", @@ -279,7 +272,7 @@ export class DonationPaymentRequest { { "name": "merchantRiskIndicator", "baseName": "merchantRiskIndicator", - "type": "MerchantRiskIndicator | null" + "type": "MerchantRiskIndicator" }, { "name": "metadata", @@ -289,7 +282,7 @@ export class DonationPaymentRequest { { "name": "mpiData", "baseName": "mpiData", - "type": "ThreeDSecureData | null" + "type": "ThreeDSecureData" }, { "name": "origin", @@ -299,7 +292,7 @@ export class DonationPaymentRequest { { "name": "paymentMethod", "baseName": "paymentMethod", - "type": "ApplePayDonations | CardDonations | GooglePayDonations | IdealDonations | PayWithGoogleDonations" + "type": "DonationPaymentRequestPaymentMethod" }, { "name": "recurringProcessingModel", @@ -354,7 +347,7 @@ export class DonationPaymentRequest { { "name": "shopperName", "baseName": "shopperName", - "type": "Name | null" + "type": "Name" }, { "name": "shopperReference", @@ -374,7 +367,7 @@ export class DonationPaymentRequest { { "name": "threeDS2RequestData", "baseName": "threeDS2RequestData", - "type": "ThreeDS2RequestFields | null" + "type": "ThreeDS2RequestFields" }, { "name": "threeDSAuthenticationOnly", @@ -389,19 +382,19 @@ export class DonationPaymentRequest { export namespace DonationPaymentRequest { export enum ChannelEnum { - IOs = 'iOS', - Android = 'Android', - Web = 'Web' + IOs = 'iOS', + Android = 'Android', + Web = 'Web' } export enum RecurringProcessingModelEnum { - CardOnFile = 'CardOnFile', - Subscription = 'Subscription', - UnscheduledCardOnFile = 'UnscheduledCardOnFile' + CardOnFile = 'CardOnFile', + Subscription = 'Subscription', + UnscheduledCardOnFile = 'UnscheduledCardOnFile' } export enum ShopperInteractionEnum { - Ecommerce = 'Ecommerce', - ContAuth = 'ContAuth', - Moto = 'Moto', - Pos = 'POS' + Ecommerce = 'Ecommerce', + ContAuth = 'ContAuth', + Moto = 'Moto', + Pos = 'POS' } } diff --git a/src/typings/checkout/donationPaymentRequestPaymentMethod.ts b/src/typings/checkout/donationPaymentRequestPaymentMethod.ts new file mode 100644 index 000000000..1f1d4e9dc --- /dev/null +++ b/src/typings/checkout/donationPaymentRequestPaymentMethod.ts @@ -0,0 +1,311 @@ +/* + * The version of the OpenAPI document: v71 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { ApplePayDonations } from './applePayDonations'; +import { CardDonations } from './cardDonations'; +import { GooglePayDonations } from './googlePayDonations'; +import { IdealDonations } from './idealDonations'; +import { PayWithGoogleDonations } from './payWithGoogleDonations'; + +/** +* The type and required details of a payment method to use. +*/ +export class DonationPaymentRequestPaymentMethod { + /** + * The stringified and base64 encoded `paymentData` you retrieved from the Apple framework. + */ + 'applePayToken': string; + /** + * The checkout attempt identifier. + */ + 'checkoutAttemptId'?: string; + /** + * The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**. + */ + 'fundingSource'?: DonationPaymentRequestPaymentMethod.FundingSourceEnum; + /** + * This is the `recurringDetailReference` returned in the response when you created the token. + * + * @deprecated since Adyen Checkout API v49 + * Use `storedPaymentMethodId` instead. + */ + 'recurringDetailReference'?: string; + /** + * This is the `recurringDetailReference` returned in the response when you created the token. + */ + 'storedPaymentMethodId'?: string; + /** + * **applepay** + */ + 'type'?: DonationPaymentRequestPaymentMethod.TypeEnum = DonationPaymentRequestPaymentMethod.TypeEnum.Applepay; + /** + * Secondary brand of the card. For example: **plastix**, **hmclub**. + */ + 'brand'?: string; + /** + * @deprecated + */ + 'cupsecureplus_smscode'?: string; + /** + * The card verification code. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide). + */ + 'cvc'?: string; + /** + * Only include this for JSON Web Encryption (JWE) implementations. The JWE-encrypted card details. + */ + 'encryptedCard'?: string; + /** + * The encrypted card number. + */ + 'encryptedCardNumber'?: string; + /** + * The encrypted card expiry month. + */ + 'encryptedExpiryMonth'?: string; + /** + * The encrypted card expiry year. + */ + 'encryptedExpiryYear'?: string; + /** + * The encrypted card verification code. + */ + 'encryptedSecurityCode'?: string; + /** + * The card expiry month. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide). + */ + 'expiryMonth'?: string; + /** + * The card expiry year. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide). + */ + 'expiryYear'?: string; + /** + * The encoded fastlane data blob + */ + 'fastlaneData'?: string; + /** + * The name of the card holder. + */ + 'holderName'?: string; + /** + * The transaction identifier from card schemes. This is the [`networkTxReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__resParam_additionalData-ResponseAdditionalDataCommon-networkTxReference) from the response to the first payment. + */ + 'networkPaymentReference'?: string; + /** + * The card number. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide). + */ + 'number'?: string; + /** + * The `shopperNotificationReference` returned in the response when you requested to notify the shopper. Used only for recurring payments in India. + */ + 'shopperNotificationReference'?: string; + /** + * An identifier used for the Click to Pay transaction. + */ + 'srcCorrelationId'?: string; + /** + * The SRC reference for the Click to Pay token. + */ + 'srcDigitalCardId'?: string; + /** + * The scheme that is being used for Click to Pay. + */ + 'srcScheme'?: string; + /** + * The reference for the Click to Pay token. + */ + 'srcTokenReference'?: string; + /** + * Required for mobile integrations. Version of the 3D Secure 2 mobile SDK. + */ + 'threeDS2SdkVersion'?: string; + /** + * The selected payment card network. + */ + 'googlePayCardNetwork'?: string; + /** + * The `token` that you obtained from the [Google Pay API](https://developers.google.com/pay/api/web/reference/response-objects#PaymentData) `PaymentData` response. + */ + 'googlePayToken': string; + /** + * The iDEAL issuer value of the shopper\'s selected bank. Set this to an **id** of an iDEAL issuer to preselect it. + */ + 'issuer'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "applePayToken", + "baseName": "applePayToken", + "type": "string" + }, + { + "name": "checkoutAttemptId", + "baseName": "checkoutAttemptId", + "type": "string" + }, + { + "name": "fundingSource", + "baseName": "fundingSource", + "type": "DonationPaymentRequestPaymentMethod.FundingSourceEnum" + }, + { + "name": "recurringDetailReference", + "baseName": "recurringDetailReference", + "type": "string" + }, + { + "name": "storedPaymentMethodId", + "baseName": "storedPaymentMethodId", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "DonationPaymentRequestPaymentMethod.TypeEnum" + }, + { + "name": "brand", + "baseName": "brand", + "type": "string" + }, + { + "name": "cupsecureplus_smscode", + "baseName": "cupsecureplus.smscode", + "type": "string" + }, + { + "name": "cvc", + "baseName": "cvc", + "type": "string" + }, + { + "name": "encryptedCard", + "baseName": "encryptedCard", + "type": "string" + }, + { + "name": "encryptedCardNumber", + "baseName": "encryptedCardNumber", + "type": "string" + }, + { + "name": "encryptedExpiryMonth", + "baseName": "encryptedExpiryMonth", + "type": "string" + }, + { + "name": "encryptedExpiryYear", + "baseName": "encryptedExpiryYear", + "type": "string" + }, + { + "name": "encryptedSecurityCode", + "baseName": "encryptedSecurityCode", + "type": "string" + }, + { + "name": "expiryMonth", + "baseName": "expiryMonth", + "type": "string" + }, + { + "name": "expiryYear", + "baseName": "expiryYear", + "type": "string" + }, + { + "name": "fastlaneData", + "baseName": "fastlaneData", + "type": "string" + }, + { + "name": "holderName", + "baseName": "holderName", + "type": "string" + }, + { + "name": "networkPaymentReference", + "baseName": "networkPaymentReference", + "type": "string" + }, + { + "name": "number", + "baseName": "number", + "type": "string" + }, + { + "name": "shopperNotificationReference", + "baseName": "shopperNotificationReference", + "type": "string" + }, + { + "name": "srcCorrelationId", + "baseName": "srcCorrelationId", + "type": "string" + }, + { + "name": "srcDigitalCardId", + "baseName": "srcDigitalCardId", + "type": "string" + }, + { + "name": "srcScheme", + "baseName": "srcScheme", + "type": "string" + }, + { + "name": "srcTokenReference", + "baseName": "srcTokenReference", + "type": "string" + }, + { + "name": "threeDS2SdkVersion", + "baseName": "threeDS2SdkVersion", + "type": "string" + }, + { + "name": "googlePayCardNetwork", + "baseName": "googlePayCardNetwork", + "type": "string" + }, + { + "name": "googlePayToken", + "baseName": "googlePayToken", + "type": "string" + }, + { + "name": "issuer", + "baseName": "issuer", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return DonationPaymentRequestPaymentMethod.attributeTypeMap; + } +} + +export namespace DonationPaymentRequestPaymentMethod { + export enum FundingSourceEnum { + Credit = 'credit', + Debit = 'debit' + } + export enum TypeEnum { + Applepay = 'applepay', + Bcmc = 'bcmc', + Scheme = 'scheme', + NetworkToken = 'networkToken', + Giftcard = 'giftcard', + Card = 'card', + Clicktopay = 'clicktopay', + Googlepay = 'googlepay', + Ideal = 'ideal', + Paywithgoogle = 'paywithgoogle' + } +} diff --git a/src/typings/checkout/donationPaymentResponse.ts b/src/typings/checkout/donationPaymentResponse.ts index 84281bb59..e7303ff7f 100644 --- a/src/typings/checkout/donationPaymentResponse.ts +++ b/src/typings/checkout/donationPaymentResponse.ts @@ -11,7 +11,7 @@ import { Amount } from './amount'; import { PaymentResponse } from './paymentResponse'; export class DonationPaymentResponse { - 'amount'?: Amount | null; + 'amount'?: Amount; /** * The Adyen account name of your charity. We will provide you with this account name once your chosen charity has been [onboarded](https://docs.adyen.com/online-payments/donations#onboarding). */ @@ -24,7 +24,7 @@ export class DonationPaymentResponse { * The merchant account identifier, with which you want to process the transaction. */ 'merchantAccount'?: string; - 'payment'?: PaymentResponse | null; + 'payment'?: PaymentResponse; /** * The reference to uniquely identify a payment. This reference is used in all communication with you about the payment status. We recommend using a unique value per payment; however, it is not a requirement. If you need to provide multiple references for a transaction, separate them with hyphens (\"-\"). Maximum length: 80 characters. */ @@ -40,7 +40,7 @@ export class DonationPaymentResponse { { "name": "amount", "baseName": "amount", - "type": "Amount | null" + "type": "Amount" }, { "name": "donationAccount", @@ -60,7 +60,7 @@ export class DonationPaymentResponse { { "name": "payment", "baseName": "payment", - "type": "PaymentResponse | null" + "type": "PaymentResponse" }, { "name": "reference", @@ -80,8 +80,8 @@ export class DonationPaymentResponse { export namespace DonationPaymentResponse { export enum StatusEnum { - Completed = 'completed', - Pending = 'pending', - Refused = 'refused' + Completed = 'completed', + Pending = 'pending', + Refused = 'refused' } } diff --git a/src/typings/checkout/dotpayDetails.ts b/src/typings/checkout/dotpayDetails.ts index 733123c5b..2d5e2ab92 100644 --- a/src/typings/checkout/dotpayDetails.ts +++ b/src/typings/checkout/dotpayDetails.ts @@ -20,7 +20,7 @@ export class DotpayDetails { /** * **dotpay** */ - 'type'?: DotpayDetails.TypeEnum; + 'type'?: DotpayDetails.TypeEnum = DotpayDetails.TypeEnum.Dotpay; static discriminator: string | undefined = undefined; @@ -48,6 +48,6 @@ export class DotpayDetails { export namespace DotpayDetails { export enum TypeEnum { - Dotpay = 'dotpay' + Dotpay = 'dotpay' } } diff --git a/src/typings/checkout/dragonpayDetails.ts b/src/typings/checkout/dragonpayDetails.ts index f8212c4e4..8de3cbdf8 100644 --- a/src/typings/checkout/dragonpayDetails.ts +++ b/src/typings/checkout/dragonpayDetails.ts @@ -57,9 +57,9 @@ export class DragonpayDetails { export namespace DragonpayDetails { export enum TypeEnum { - Ebanking = 'dragonpay_ebanking', - OtcBanking = 'dragonpay_otc_banking', - OtcNonBanking = 'dragonpay_otc_non_banking', - OtcPhilippines = 'dragonpay_otc_philippines' + DragonpayEbanking = 'dragonpay_ebanking', + DragonpayOtcBanking = 'dragonpay_otc_banking', + DragonpayOtcNonBanking = 'dragonpay_otc_non_banking', + DragonpayOtcPhilippines = 'dragonpay_otc_philippines' } } diff --git a/src/typings/checkout/eBankingFinlandDetails.ts b/src/typings/checkout/eBankingFinlandDetails.ts index 7d6108fd5..9a5d134df 100644 --- a/src/typings/checkout/eBankingFinlandDetails.ts +++ b/src/typings/checkout/eBankingFinlandDetails.ts @@ -20,7 +20,7 @@ export class EBankingFinlandDetails { /** * **ebanking_FI** */ - 'type': EBankingFinlandDetails.TypeEnum; + 'type': EBankingFinlandDetails.TypeEnum = EBankingFinlandDetails.TypeEnum.EbankingFi; static discriminator: string | undefined = undefined; @@ -48,6 +48,6 @@ export class EBankingFinlandDetails { export namespace EBankingFinlandDetails { export enum TypeEnum { - EbankingFi = 'ebanking_FI' + EbankingFi = 'ebanking_FI' } } diff --git a/src/typings/checkout/econtextVoucherDetails.ts b/src/typings/checkout/econtextVoucherDetails.ts index 46ddd81f7..b9b962f04 100644 --- a/src/typings/checkout/econtextVoucherDetails.ts +++ b/src/typings/checkout/econtextVoucherDetails.ts @@ -75,10 +75,10 @@ export class EcontextVoucherDetails { export namespace EcontextVoucherDetails { export enum TypeEnum { - EcontextSevenEleven = 'econtext_seven_eleven', - EcontextOnline = 'econtext_online', - Econtext = 'econtext', - EcontextStores = 'econtext_stores', - EcontextAtm = 'econtext_atm' + EcontextSevenEleven = 'econtext_seven_eleven', + EcontextOnline = 'econtext_online', + Econtext = 'econtext', + EcontextStores = 'econtext_stores', + EcontextAtm = 'econtext_atm' } } diff --git a/src/typings/checkout/eftDetails.ts b/src/typings/checkout/eftDetails.ts index 30399a40c..ff7f35166 100644 --- a/src/typings/checkout/eftDetails.ts +++ b/src/typings/checkout/eftDetails.ts @@ -43,7 +43,7 @@ export class EftDetails { /** * **eft** */ - 'type'?: EftDetails.TypeEnum; + 'type'?: EftDetails.TypeEnum = EftDetails.TypeEnum.EftDirectdebitCa; static discriminator: string | undefined = undefined; @@ -96,6 +96,6 @@ export class EftDetails { export namespace EftDetails { export enum TypeEnum { - EftDirectdebitCa = 'eft_directdebit_CA' + EftDirectdebitCa = 'eft_directdebit_CA' } } diff --git a/src/typings/checkout/fastlaneDetails.ts b/src/typings/checkout/fastlaneDetails.ts index bf733e80f..bff564d0b 100644 --- a/src/typings/checkout/fastlaneDetails.ts +++ b/src/typings/checkout/fastlaneDetails.ts @@ -31,7 +31,7 @@ export class FastlaneDetails { /** * **fastlane** */ - 'type': FastlaneDetails.TypeEnum; + 'type': FastlaneDetails.TypeEnum = FastlaneDetails.TypeEnum.Fastlane; static discriminator: string | undefined = undefined; @@ -69,6 +69,6 @@ export class FastlaneDetails { export namespace FastlaneDetails { export enum TypeEnum { - Fastlane = 'fastlane' + Fastlane = 'fastlane' } } diff --git a/src/typings/checkout/forexQuote.ts b/src/typings/checkout/forexQuote.ts index 9b4ccfcda..3e306696b 100644 --- a/src/typings/checkout/forexQuote.ts +++ b/src/typings/checkout/forexQuote.ts @@ -18,18 +18,18 @@ export class ForexQuote { * The account type. */ 'accountType'?: string; - 'baseAmount'?: Amount | null; + 'baseAmount'?: Amount; /** * The base points. */ 'basePoints': number; - 'buy'?: Amount | null; - 'interbank'?: Amount | null; + 'buy'?: Amount; + 'interbank'?: Amount; /** * The reference assigned to the forex quote request. */ 'reference'?: string; - 'sell'?: Amount | null; + 'sell'?: Amount; /** * The signature to validate the integrity. */ @@ -63,7 +63,7 @@ export class ForexQuote { { "name": "baseAmount", "baseName": "baseAmount", - "type": "Amount | null" + "type": "Amount" }, { "name": "basePoints", @@ -73,12 +73,12 @@ export class ForexQuote { { "name": "buy", "baseName": "buy", - "type": "Amount | null" + "type": "Amount" }, { "name": "interbank", "baseName": "interbank", - "type": "Amount | null" + "type": "Amount" }, { "name": "reference", @@ -88,7 +88,7 @@ export class ForexQuote { { "name": "sell", "baseName": "sell", - "type": "Amount | null" + "type": "Amount" }, { "name": "signature", diff --git a/src/typings/checkout/fundOrigin.ts b/src/typings/checkout/fundOrigin.ts index b0854ca4c..9cc19553f 100644 --- a/src/typings/checkout/fundOrigin.ts +++ b/src/typings/checkout/fundOrigin.ts @@ -11,12 +11,12 @@ import { Address } from './address'; import { Name } from './name'; export class FundOrigin { - 'billingAddress'?: Address | null; + 'billingAddress'?: Address; /** * The email address of the person funding the money. */ 'shopperEmail'?: string; - 'shopperName'?: Name | null; + 'shopperName'?: Name; /** * The phone number of the person funding the money. */ @@ -32,7 +32,7 @@ export class FundOrigin { { "name": "billingAddress", "baseName": "billingAddress", - "type": "Address | null" + "type": "Address" }, { "name": "shopperEmail", @@ -42,7 +42,7 @@ export class FundOrigin { { "name": "shopperName", "baseName": "shopperName", - "type": "Name | null" + "type": "Name" }, { "name": "telephoneNumber", diff --git a/src/typings/checkout/fundRecipient.ts b/src/typings/checkout/fundRecipient.ts index b5eb4df3e..bf4ad0a2e 100644 --- a/src/typings/checkout/fundRecipient.ts +++ b/src/typings/checkout/fundRecipient.ts @@ -17,13 +17,13 @@ export class FundRecipient { * The IBAN of the bank account where the funds are being transferred to. */ 'IBAN'?: string; - 'billingAddress'?: Address | null; - 'paymentMethod'?: CardDetails | null; + 'billingAddress'?: Address; + 'paymentMethod'?: CardDetails; /** * The email address of the shopper. */ 'shopperEmail'?: string; - 'shopperName'?: Name | null; + 'shopperName'?: Name; /** * Required for recurring payments. Your reference to uniquely identify this shopper, for example user ID or account ID. The value is case-sensitive and must be at least three characters. > Your reference must not include personally identifiable information (PII) such as name or email address. */ @@ -32,7 +32,7 @@ export class FundRecipient { * This is the `recurringDetailReference` returned in the response when you created the token. */ 'storedPaymentMethodId'?: string; - 'subMerchant'?: SubMerchant | null; + 'subMerchant'?: SubMerchant; /** * The telephone number of the shopper. */ @@ -61,12 +61,12 @@ export class FundRecipient { { "name": "billingAddress", "baseName": "billingAddress", - "type": "Address | null" + "type": "Address" }, { "name": "paymentMethod", "baseName": "paymentMethod", - "type": "CardDetails | null" + "type": "CardDetails" }, { "name": "shopperEmail", @@ -76,7 +76,7 @@ export class FundRecipient { { "name": "shopperName", "baseName": "shopperName", - "type": "Name | null" + "type": "Name" }, { "name": "shopperReference", @@ -91,7 +91,7 @@ export class FundRecipient { { "name": "subMerchant", "baseName": "subMerchant", - "type": "SubMerchant | null" + "type": "SubMerchant" }, { "name": "telephoneNumber", @@ -121,10 +121,10 @@ export class FundRecipient { export namespace FundRecipient { export enum WalletPurposeEnum { - IdentifiedBoleto = 'identifiedBoleto', - TransferDifferentWallet = 'transferDifferentWallet', - TransferOwnWallet = 'transferOwnWallet', - TransferSameWallet = 'transferSameWallet', - UnidentifiedBoleto = 'unidentifiedBoleto' + IdentifiedBoleto = 'identifiedBoleto', + TransferDifferentWallet = 'transferDifferentWallet', + TransferOwnWallet = 'transferOwnWallet', + TransferSameWallet = 'transferSameWallet', + UnidentifiedBoleto = 'unidentifiedBoleto' } } diff --git a/src/typings/checkout/genericIssuerPaymentMethodDetails.ts b/src/typings/checkout/genericIssuerPaymentMethodDetails.ts index 9d1278680..695b0e4b9 100644 --- a/src/typings/checkout/genericIssuerPaymentMethodDetails.ts +++ b/src/typings/checkout/genericIssuerPaymentMethodDetails.ts @@ -69,9 +69,9 @@ export class GenericIssuerPaymentMethodDetails { export namespace GenericIssuerPaymentMethodDetails { export enum TypeEnum { - OnlineBankingPl = 'onlineBanking_PL', - Eps = 'eps', - OnlineBankingSk = 'onlineBanking_SK', - OnlineBankingCz = 'onlineBanking_CZ' + OnlineBankingPl = 'onlineBanking_PL', + Eps = 'eps', + OnlineBankingSk = 'onlineBanking_SK', + OnlineBankingCz = 'onlineBanking_CZ' } } diff --git a/src/typings/checkout/giropayDetails.ts b/src/typings/checkout/giropayDetails.ts index ca17d10bf..e1027366b 100644 --- a/src/typings/checkout/giropayDetails.ts +++ b/src/typings/checkout/giropayDetails.ts @@ -27,7 +27,7 @@ export class GiropayDetails { /** * **giropay** */ - 'type'?: GiropayDetails.TypeEnum; + 'type'?: GiropayDetails.TypeEnum = GiropayDetails.TypeEnum.Giropay; static discriminator: string | undefined = undefined; @@ -60,6 +60,6 @@ export class GiropayDetails { export namespace GiropayDetails { export enum TypeEnum { - Giropay = 'giropay' + Giropay = 'giropay' } } diff --git a/src/typings/checkout/googlePayDetails.ts b/src/typings/checkout/googlePayDetails.ts index d58dc100f..8397dade6 100644 --- a/src/typings/checkout/googlePayDetails.ts +++ b/src/typings/checkout/googlePayDetails.ts @@ -43,7 +43,7 @@ export class GooglePayDetails { /** * **googlepay**, **paywithgoogle** */ - 'type'?: GooglePayDetails.TypeEnum; + 'type'?: GooglePayDetails.TypeEnum = GooglePayDetails.TypeEnum.Googlepay; static discriminator: string | undefined = undefined; @@ -96,10 +96,10 @@ export class GooglePayDetails { export namespace GooglePayDetails { export enum FundingSourceEnum { - Credit = 'credit', - Debit = 'debit' + Credit = 'credit', + Debit = 'debit' } export enum TypeEnum { - Googlepay = 'googlepay' + Googlepay = 'googlepay' } } diff --git a/src/typings/checkout/googlePayDonations.ts b/src/typings/checkout/googlePayDonations.ts index 8a47f3259..b257eb240 100644 --- a/src/typings/checkout/googlePayDonations.ts +++ b/src/typings/checkout/googlePayDonations.ts @@ -43,7 +43,7 @@ export class GooglePayDonations { /** * **googlepay**, **paywithgoogle** */ - 'type'?: GooglePayDonations.TypeEnum; + 'type'?: GooglePayDonations.TypeEnum = GooglePayDonations.TypeEnum.Googlepay; static discriminator: string | undefined = undefined; @@ -96,10 +96,10 @@ export class GooglePayDonations { export namespace GooglePayDonations { export enum FundingSourceEnum { - Credit = 'credit', - Debit = 'debit' + Credit = 'credit', + Debit = 'debit' } export enum TypeEnum { - Googlepay = 'googlepay' + Googlepay = 'googlepay' } } diff --git a/src/typings/checkout/idealDetails.ts b/src/typings/checkout/idealDetails.ts index 5d7190dd3..d747af0df 100644 --- a/src/typings/checkout/idealDetails.ts +++ b/src/typings/checkout/idealDetails.ts @@ -31,7 +31,7 @@ export class IdealDetails { /** * **ideal** */ - 'type'?: IdealDetails.TypeEnum; + 'type'?: IdealDetails.TypeEnum = IdealDetails.TypeEnum.Ideal; static discriminator: string | undefined = undefined; @@ -69,6 +69,6 @@ export class IdealDetails { export namespace IdealDetails { export enum TypeEnum { - Ideal = 'ideal' + Ideal = 'ideal' } } diff --git a/src/typings/checkout/idealDonations.ts b/src/typings/checkout/idealDonations.ts index fb8f13554..1bf9daf5f 100644 --- a/src/typings/checkout/idealDonations.ts +++ b/src/typings/checkout/idealDonations.ts @@ -31,7 +31,7 @@ export class IdealDonations { /** * **ideal** */ - 'type'?: IdealDonations.TypeEnum; + 'type'?: IdealDonations.TypeEnum = IdealDonations.TypeEnum.Ideal; static discriminator: string | undefined = undefined; @@ -69,6 +69,6 @@ export class IdealDonations { export namespace IdealDonations { export enum TypeEnum { - Ideal = 'ideal' + Ideal = 'ideal' } } diff --git a/src/typings/checkout/installmentOption.ts b/src/typings/checkout/installmentOption.ts index 14e1964b5..0c501ad59 100644 --- a/src/typings/checkout/installmentOption.ts +++ b/src/typings/checkout/installmentOption.ts @@ -57,14 +57,15 @@ export class InstallmentOption { export namespace InstallmentOption { export enum PlansEnum { - BuynowPaylater = 'buynow_paylater', - InteresRefundPrctg = 'interes_refund_prctg', - InterestBonus = 'interest_bonus', - NointeresRefundPrctg = 'nointeres_refund_prctg', - NointerestBonus = 'nointerest_bonus', - RefundPrctg = 'refund_prctg', - Regular = 'regular', - Revolving = 'revolving', - WithInterest = 'with_interest' + Bonus = 'bonus', + BuynowPaylater = 'buynow_paylater', + InteresRefundPrctg = 'interes_refund_prctg', + InterestBonus = 'interest_bonus', + NointeresRefundPrctg = 'nointeres_refund_prctg', + NointerestBonus = 'nointerest_bonus', + RefundPrctg = 'refund_prctg', + Regular = 'regular', + Revolving = 'revolving', + WithInterest = 'with_interest' } } diff --git a/src/typings/checkout/installments.ts b/src/typings/checkout/installments.ts index 379c4a0c9..f739d17e9 100644 --- a/src/typings/checkout/installments.ts +++ b/src/typings/checkout/installments.ts @@ -48,14 +48,15 @@ export class Installments { export namespace Installments { export enum PlanEnum { - BuynowPaylater = 'buynow_paylater', - InteresRefundPrctg = 'interes_refund_prctg', - InterestBonus = 'interest_bonus', - NointeresRefundPrctg = 'nointeres_refund_prctg', - NointerestBonus = 'nointerest_bonus', - RefundPrctg = 'refund_prctg', - Regular = 'regular', - Revolving = 'revolving', - WithInterest = 'with_interest' + Bonus = 'bonus', + BuynowPaylater = 'buynow_paylater', + InteresRefundPrctg = 'interes_refund_prctg', + InterestBonus = 'interest_bonus', + NointeresRefundPrctg = 'nointeres_refund_prctg', + NointerestBonus = 'nointerest_bonus', + RefundPrctg = 'refund_prctg', + Regular = 'regular', + Revolving = 'revolving', + WithInterest = 'with_interest' } } diff --git a/src/typings/checkout/klarnaDetails.ts b/src/typings/checkout/klarnaDetails.ts index 7f02bcd5e..4877c7cfa 100644 --- a/src/typings/checkout/klarnaDetails.ts +++ b/src/typings/checkout/klarnaDetails.ts @@ -43,7 +43,7 @@ export class KlarnaDetails { /** * **klarna** */ - 'type': KlarnaDetails.TypeEnum; + 'type': KlarnaDetails.TypeEnum = KlarnaDetails.TypeEnum.Klarna; static discriminator: string | undefined = undefined; @@ -96,12 +96,12 @@ export class KlarnaDetails { export namespace KlarnaDetails { export enum TypeEnum { - Klarna = 'klarna', - Klarnapayments = 'klarnapayments', - KlarnapaymentsAccount = 'klarnapayments_account', - KlarnapaymentsB2b = 'klarnapayments_b2b', - KlarnaPaynow = 'klarna_paynow', - KlarnaAccount = 'klarna_account', - KlarnaB2b = 'klarna_b2b' + Klarna = 'klarna', + Klarnapayments = 'klarnapayments', + KlarnapaymentsAccount = 'klarnapayments_account', + KlarnapaymentsB2b = 'klarnapayments_b2b', + KlarnaPaynow = 'klarna_paynow', + KlarnaAccount = 'klarna_account', + KlarnaB2b = 'klarna_b2b' } } diff --git a/src/typings/checkout/mandate.ts b/src/typings/checkout/mandate.ts index 82887eff6..bf6556c98 100644 --- a/src/typings/checkout/mandate.ts +++ b/src/typings/checkout/mandate.ts @@ -102,22 +102,22 @@ export class Mandate { export namespace Mandate { export enum AmountRuleEnum { - Max = 'max', - Exact = 'exact' + Max = 'max', + Exact = 'exact' } export enum BillingAttemptsRuleEnum { - On = 'on', - Before = 'before', - After = 'after' + On = 'on', + Before = 'before', + After = 'after' } export enum FrequencyEnum { - Adhoc = 'adhoc', - Daily = 'daily', - Weekly = 'weekly', - BiWeekly = 'biWeekly', - Monthly = 'monthly', - Quarterly = 'quarterly', - HalfYearly = 'halfYearly', - Yearly = 'yearly' + Adhoc = 'adhoc', + Daily = 'daily', + Weekly = 'weekly', + BiWeekly = 'biWeekly', + Monthly = 'monthly', + Quarterly = 'quarterly', + HalfYearly = 'halfYearly', + Yearly = 'yearly' } } diff --git a/src/typings/checkout/masterpassDetails.ts b/src/typings/checkout/masterpassDetails.ts index 916ca134a..2e779c3ea 100644 --- a/src/typings/checkout/masterpassDetails.ts +++ b/src/typings/checkout/masterpassDetails.ts @@ -24,7 +24,7 @@ export class MasterpassDetails { /** * **masterpass** */ - 'type'?: MasterpassDetails.TypeEnum; + 'type'?: MasterpassDetails.TypeEnum = MasterpassDetails.TypeEnum.Masterpass; static discriminator: string | undefined = undefined; @@ -57,10 +57,10 @@ export class MasterpassDetails { export namespace MasterpassDetails { export enum FundingSourceEnum { - Credit = 'credit', - Debit = 'debit' + Credit = 'credit', + Debit = 'debit' } export enum TypeEnum { - Masterpass = 'masterpass' + Masterpass = 'masterpass' } } diff --git a/src/typings/checkout/mbwayDetails.ts b/src/typings/checkout/mbwayDetails.ts index 79141f4c9..3d9b3a2b4 100644 --- a/src/typings/checkout/mbwayDetails.ts +++ b/src/typings/checkout/mbwayDetails.ts @@ -13,12 +13,18 @@ export class MbwayDetails { * The checkout attempt identifier. */ 'checkoutAttemptId'?: string; + /** + * + */ 'shopperEmail': string; + /** + * + */ 'telephoneNumber': string; /** * **mbway** */ - 'type'?: MbwayDetails.TypeEnum; + 'type'?: MbwayDetails.TypeEnum = MbwayDetails.TypeEnum.Mbway; static discriminator: string | undefined = undefined; @@ -51,6 +57,6 @@ export class MbwayDetails { export namespace MbwayDetails { export enum TypeEnum { - Mbway = 'mbway' + Mbway = 'mbway' } } diff --git a/src/typings/checkout/merchantRiskIndicator.ts b/src/typings/checkout/merchantRiskIndicator.ts index 2d698d520..4678189a9 100644 --- a/src/typings/checkout/merchantRiskIndicator.ts +++ b/src/typings/checkout/merchantRiskIndicator.ts @@ -33,7 +33,7 @@ export class MerchantRiskIndicator { * The estimated delivery time for the shopper to receive the goods. Allowed values: * `electronicDelivery` * `sameDayShipping` * `overnightShipping` * `twoOrMoreDaysShipping` */ 'deliveryTimeframe'?: MerchantRiskIndicator.DeliveryTimeframeEnum; - 'giftCardAmount'?: Amount | null; + 'giftCardAmount'?: Amount; /** * For prepaid or gift card purchase, total count of individual prepaid or gift cards/codes purchased. */ @@ -98,7 +98,7 @@ export class MerchantRiskIndicator { { "name": "giftCardAmount", "baseName": "giftCardAmount", - "type": "Amount | null" + "type": "Amount" }, { "name": "giftCardCount", @@ -148,18 +148,18 @@ export class MerchantRiskIndicator { export namespace MerchantRiskIndicator { export enum DeliveryAddressIndicatorEnum { - ShipToBillingAddress = 'shipToBillingAddress', - ShipToVerifiedAddress = 'shipToVerifiedAddress', - ShipToNewAddress = 'shipToNewAddress', - ShipToStore = 'shipToStore', - DigitalGoods = 'digitalGoods', - GoodsNotShipped = 'goodsNotShipped', - Other = 'other' + ShipToBillingAddress = 'shipToBillingAddress', + ShipToVerifiedAddress = 'shipToVerifiedAddress', + ShipToNewAddress = 'shipToNewAddress', + ShipToStore = 'shipToStore', + DigitalGoods = 'digitalGoods', + GoodsNotShipped = 'goodsNotShipped', + Other = 'other' } export enum DeliveryTimeframeEnum { - ElectronicDelivery = 'electronicDelivery', - SameDayShipping = 'sameDayShipping', - OvernightShipping = 'overnightShipping', - TwoOrMoreDaysShipping = 'twoOrMoreDaysShipping' + ElectronicDelivery = 'electronicDelivery', + SameDayShipping = 'sameDayShipping', + OvernightShipping = 'overnightShipping', + TwoOrMoreDaysShipping = 'twoOrMoreDaysShipping' } } diff --git a/src/typings/checkout/mobilePayDetails.ts b/src/typings/checkout/mobilePayDetails.ts index f5d4fd566..deca072a7 100644 --- a/src/typings/checkout/mobilePayDetails.ts +++ b/src/typings/checkout/mobilePayDetails.ts @@ -16,7 +16,7 @@ export class MobilePayDetails { /** * **mobilepay** */ - 'type'?: MobilePayDetails.TypeEnum; + 'type'?: MobilePayDetails.TypeEnum = MobilePayDetails.TypeEnum.Mobilepay; static discriminator: string | undefined = undefined; @@ -39,6 +39,6 @@ export class MobilePayDetails { export namespace MobilePayDetails { export enum TypeEnum { - Mobilepay = 'mobilepay' + Mobilepay = 'mobilepay' } } diff --git a/src/typings/checkout/models.ts b/src/typings/checkout/models.ts index 1111ffb1b..0ee774d74 100644 --- a/src/typings/checkout/models.ts +++ b/src/typings/checkout/models.ts @@ -1,12 +1,4 @@ -/* - * The version of the OpenAPI document: v71 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - +import localVarRequest from 'request'; export * from './accountInfo'; export * from './acctInfo'; @@ -85,6 +77,7 @@ export * from './donationCampaign'; export * from './donationCampaignsRequest'; export * from './donationCampaignsResponse'; export * from './donationPaymentRequest'; +export * from './donationPaymentRequestPaymentMethod'; export * from './donationPaymentResponse'; export * from './dotpayDetails'; export * from './dragonpayDetails'; @@ -148,10 +141,13 @@ export * from './paymentMethodToStore'; export * from './paymentMethodUPIApps'; export * from './paymentMethodsRequest'; export * from './paymentMethodsResponse'; +export * from './paymentMethodsResponseStoredPaymentMethodsInner'; export * from './paymentRefundRequest'; export * from './paymentRefundResponse'; export * from './paymentRequest'; +export * from './paymentRequestPaymentMethod'; export * from './paymentResponse'; +export * from './paymentResponseAction'; export * from './paymentReversalRequest'; export * from './paymentReversalResponse'; export * from './paypalUpdateOrderRequest'; @@ -159,8 +155,10 @@ export * from './paypalUpdateOrderResponse'; export * from './phone'; export * from './pixDetails'; export * from './pixRecurring'; +export * from './pixStoredPaymentMethod'; export * from './platformChargebackLogic'; export * from './pseDetails'; +export * from './rakutenPayDetails'; export * from './ratepayDetails'; export * from './recurring'; export * from './responseAdditionalData3DSecure'; @@ -213,6 +211,18 @@ export * from './weChatPayDetails'; export * from './weChatPayMiniProgramDetails'; export * from './zipDetails'; +import * as fs from 'fs'; + +export interface RequestDetailedFile { + value: Buffer; + options?: { + filename?: string; + contentType?: string; + } +} + +export type RequestFile = string | Buffer | fs.ReadStream | RequestDetailedFile; + import { AccountInfo } from './accountInfo'; import { AcctInfo } from './acctInfo'; @@ -291,6 +301,7 @@ import { DonationCampaign } from './donationCampaign'; import { DonationCampaignsRequest } from './donationCampaignsRequest'; import { DonationCampaignsResponse } from './donationCampaignsResponse'; import { DonationPaymentRequest } from './donationPaymentRequest'; +import { DonationPaymentRequestPaymentMethod } from './donationPaymentRequestPaymentMethod'; import { DonationPaymentResponse } from './donationPaymentResponse'; import { DotpayDetails } from './dotpayDetails'; import { DragonpayDetails } from './dragonpayDetails'; @@ -354,10 +365,13 @@ import { PaymentMethodToStore } from './paymentMethodToStore'; import { PaymentMethodUPIApps } from './paymentMethodUPIApps'; import { PaymentMethodsRequest } from './paymentMethodsRequest'; import { PaymentMethodsResponse } from './paymentMethodsResponse'; +import { PaymentMethodsResponseStoredPaymentMethodsInner } from './paymentMethodsResponseStoredPaymentMethodsInner'; import { PaymentRefundRequest } from './paymentRefundRequest'; import { PaymentRefundResponse } from './paymentRefundResponse'; import { PaymentRequest } from './paymentRequest'; +import { PaymentRequestPaymentMethod } from './paymentRequestPaymentMethod'; import { PaymentResponse } from './paymentResponse'; +import { PaymentResponseAction } from './paymentResponseAction'; import { PaymentReversalRequest } from './paymentReversalRequest'; import { PaymentReversalResponse } from './paymentReversalResponse'; import { PaypalUpdateOrderRequest } from './paypalUpdateOrderRequest'; @@ -365,8 +379,10 @@ import { PaypalUpdateOrderResponse } from './paypalUpdateOrderResponse'; import { Phone } from './phone'; import { PixDetails } from './pixDetails'; import { PixRecurring } from './pixRecurring'; +import { PixStoredPaymentMethod } from './pixStoredPaymentMethod'; import { PlatformChargebackLogic } from './platformChargebackLogic'; import { PseDetails } from './pseDetails'; +import { RakutenPayDetails } from './rakutenPayDetails'; import { RatepayDetails } from './ratepayDetails'; import { Recurring } from './recurring'; import { ResponseAdditionalData3DSecure } from './responseAdditionalData3DSecure'; @@ -445,6 +461,7 @@ let enumsMap: {[index: string]: any} = { "AcctInfo.ShipAddressUsageIndEnum": AcctInfo.ShipAddressUsageIndEnum, "AcctInfo.ShipNameIndicatorEnum": AcctInfo.ShipNameIndicatorEnum, "AcctInfo.SuspiciousAccActivityEnum": AcctInfo.SuspiciousAccActivityEnum, + "AchDetails.AccountHolderTypeEnum": AchDetails.AccountHolderTypeEnum, "AchDetails.BankAccountTypeEnum": AchDetails.BankAccountTypeEnum, "AchDetails.TypeEnum": AchDetails.TypeEnum, "AdditionalData3DSecure.ChallengeWindowSizeEnum": AdditionalData3DSecure.ChallengeWindowSizeEnum, @@ -504,6 +521,8 @@ let enumsMap: {[index: string]: any} = { "DonationPaymentRequest.ChannelEnum": DonationPaymentRequest.ChannelEnum, "DonationPaymentRequest.RecurringProcessingModelEnum": DonationPaymentRequest.RecurringProcessingModelEnum, "DonationPaymentRequest.ShopperInteractionEnum": DonationPaymentRequest.ShopperInteractionEnum, + "DonationPaymentRequestPaymentMethod.FundingSourceEnum": DonationPaymentRequestPaymentMethod.FundingSourceEnum, + "DonationPaymentRequestPaymentMethod.TypeEnum": DonationPaymentRequestPaymentMethod.TypeEnum, "DonationPaymentResponse.StatusEnum": DonationPaymentResponse.StatusEnum, "DotpayDetails.TypeEnum": DotpayDetails.TypeEnum, "DragonpayDetails.TypeEnum": DragonpayDetails.TypeEnum, @@ -570,13 +589,20 @@ let enumsMap: {[index: string]: any} = { "PaymentRequest.IndustryUsageEnum": PaymentRequest.IndustryUsageEnum, "PaymentRequest.RecurringProcessingModelEnum": PaymentRequest.RecurringProcessingModelEnum, "PaymentRequest.ShopperInteractionEnum": PaymentRequest.ShopperInteractionEnum, + "PaymentRequestPaymentMethod.AccountHolderTypeEnum": PaymentRequestPaymentMethod.AccountHolderTypeEnum, + "PaymentRequestPaymentMethod.BankAccountTypeEnum": PaymentRequestPaymentMethod.BankAccountTypeEnum, + "PaymentRequestPaymentMethod.TypeEnum": PaymentRequestPaymentMethod.TypeEnum, + "PaymentRequestPaymentMethod.FundingSourceEnum": PaymentRequestPaymentMethod.FundingSourceEnum, "PaymentResponse.ResultCodeEnum": PaymentResponse.ResultCodeEnum, + "PaymentResponseAction.TypeEnum": PaymentResponseAction.TypeEnum, "PaymentReversalResponse.StatusEnum": PaymentReversalResponse.StatusEnum, "PaypalUpdateOrderResponse.StatusEnum": PaypalUpdateOrderResponse.StatusEnum, "PixDetails.TypeEnum": PixDetails.TypeEnum, "PixRecurring.FrequencyEnum": PixRecurring.FrequencyEnum, + "PixStoredPaymentMethod.TypeEnum": PixStoredPaymentMethod.TypeEnum, "PlatformChargebackLogic.BehaviorEnum": PlatformChargebackLogic.BehaviorEnum, "PseDetails.TypeEnum": PseDetails.TypeEnum, + "RakutenPayDetails.TypeEnum": RakutenPayDetails.TypeEnum, "RatepayDetails.TypeEnum": RatepayDetails.TypeEnum, "Recurring.ContractEnum": Recurring.ContractEnum, "Recurring.TokenServiceEnum": Recurring.TokenServiceEnum, @@ -707,6 +733,7 @@ let typeMap: {[index: string]: any} = { "DonationCampaignsRequest": DonationCampaignsRequest, "DonationCampaignsResponse": DonationCampaignsResponse, "DonationPaymentRequest": DonationPaymentRequest, + "DonationPaymentRequestPaymentMethod": DonationPaymentRequestPaymentMethod, "DonationPaymentResponse": DonationPaymentResponse, "DotpayDetails": DotpayDetails, "DragonpayDetails": DragonpayDetails, @@ -770,10 +797,13 @@ let typeMap: {[index: string]: any} = { "PaymentMethodUPIApps": PaymentMethodUPIApps, "PaymentMethodsRequest": PaymentMethodsRequest, "PaymentMethodsResponse": PaymentMethodsResponse, + "PaymentMethodsResponseStoredPaymentMethodsInner": PaymentMethodsResponseStoredPaymentMethodsInner, "PaymentRefundRequest": PaymentRefundRequest, "PaymentRefundResponse": PaymentRefundResponse, "PaymentRequest": PaymentRequest, + "PaymentRequestPaymentMethod": PaymentRequestPaymentMethod, "PaymentResponse": PaymentResponse, + "PaymentResponseAction": PaymentResponseAction, "PaymentReversalRequest": PaymentReversalRequest, "PaymentReversalResponse": PaymentReversalResponse, "PaypalUpdateOrderRequest": PaypalUpdateOrderRequest, @@ -781,8 +811,10 @@ let typeMap: {[index: string]: any} = { "Phone": Phone, "PixDetails": PixDetails, "PixRecurring": PixRecurring, + "PixStoredPaymentMethod": PixStoredPaymentMethod, "PlatformChargebackLogic": PlatformChargebackLogic, "PseDetails": PseDetails, + "RakutenPayDetails": RakutenPayDetails, "RatepayDetails": RatepayDetails, "Recurring": Recurring, "ResponseAdditionalData3DSecure": ResponseAdditionalData3DSecure, @@ -836,6 +868,23 @@ let typeMap: {[index: string]: any} = { "ZipDetails": ZipDetails, } +// Check if a string starts with another string without using es6 features +function startsWith(str: string, match: string): boolean { + return str.substring(0, match.length) === match; +} + +// Check if a string ends with another string without using es6 features +function endsWith(str: string, match: string): boolean { + return str.length >= match.length && str.substring(str.length - match.length) === match; +} + +const nullableSuffix = " | null"; +const optionalSuffix = " | undefined"; +const arrayPrefix = "Array<"; +const arraySuffix = ">"; +const mapPrefix = "{ [key: string]: "; +const mapSuffix = "; }"; + export class ObjectSerializer { public static findCorrectType(data: any, expectedType: string) { if (data == undefined) { @@ -872,25 +921,37 @@ export class ObjectSerializer { } } - public static serialize(data: any, type: string) { + public static serialize(data: any, type: string): any { if (data == undefined) { return data; } else if (primitives.indexOf(type.toLowerCase()) !== -1) { return data; - } else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6 - let subType: string = type.replace("Array<", ""); // Array => Type> - subType = subType.substring(0, subType.length - 1); // Type> => Type + } else if (endsWith(type, nullableSuffix)) { + let subType: string = type.slice(0, -nullableSuffix.length); // Type | null => Type + return ObjectSerializer.serialize(data, subType); + } else if (endsWith(type, optionalSuffix)) { + let subType: string = type.slice(0, -optionalSuffix.length); // Type | undefined => Type + return ObjectSerializer.serialize(data, subType); + } else if (startsWith(type, arrayPrefix)) { + let subType: string = type.slice(arrayPrefix.length, -arraySuffix.length); // Array => Type let transformedData: any[] = []; for (let index = 0; index < data.length; index++) { let datum = data[index]; transformedData.push(ObjectSerializer.serialize(datum, subType)); } return transformedData; + } else if (startsWith(type, mapPrefix)) { + let subType: string = type.slice(mapPrefix.length, -mapSuffix.length); // { [key: string]: Type; } => Type + let transformedData: { [key: string]: any } = {}; + for (let key in data) { + transformedData[key] = ObjectSerializer.serialize( + data[key], + subType, + ); + } + return transformedData; } else if (type === "Date") { return data.toISOString(); - } else if (type === "SaleToAcquirerData") { - const dataString = JSON.stringify(data); - return Buffer.from(dataString).toString("base64"); } else { if (enumsMap[type]) { return data; @@ -913,22 +974,37 @@ export class ObjectSerializer { } } - public static deserialize(data: any, type: string) { + public static deserialize(data: any, type: string): any { // polymorphism may change the actual type. type = ObjectSerializer.findCorrectType(data, type); if (data == undefined) { return data; } else if (primitives.indexOf(type.toLowerCase()) !== -1) { return data; - } else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6 - let subType: string = type.replace("Array<", ""); // Array => Type> - subType = subType.substring(0, subType.length - 1); // Type> => Type + } else if (endsWith(type, nullableSuffix)) { + let subType: string = type.slice(0, -nullableSuffix.length); // Type | null => Type + return ObjectSerializer.deserialize(data, subType); + } else if (endsWith(type, optionalSuffix)) { + let subType: string = type.slice(0, -optionalSuffix.length); // Type | undefined => Type + return ObjectSerializer.deserialize(data, subType); + } else if (startsWith(type, arrayPrefix)) { + let subType: string = type.slice(arrayPrefix.length, -arraySuffix.length); // Array => Type let transformedData: any[] = []; for (let index = 0; index < data.length; index++) { let datum = data[index]; transformedData.push(ObjectSerializer.deserialize(datum, subType)); } return transformedData; + } else if (startsWith(type, mapPrefix)) { + let subType: string = type.slice(mapPrefix.length, -mapSuffix.length); // { [key: string]: Type; } => Type + let transformedData: { [key: string]: any } = {}; + for (let key in data) { + transformedData[key] = ObjectSerializer.deserialize( + data[key], + subType, + ); + } + return transformedData; } else if (type === "Date") { return new Date(data); } else { @@ -949,3 +1025,77 @@ export class ObjectSerializer { } } } + +export interface Authentication { + /** + * Apply authentication settings to header and query params. + */ + applyToRequest(requestOptions: localVarRequest.Options): Promise | void; +} + +export class HttpBasicAuth implements Authentication { + public username: string = ''; + public password: string = ''; + + applyToRequest(requestOptions: localVarRequest.Options): void { + requestOptions.auth = { + username: this.username, password: this.password + } + } +} + +export class HttpBearerAuth implements Authentication { + public accessToken: string | (() => string) = ''; + + applyToRequest(requestOptions: localVarRequest.Options): void { + if (requestOptions && requestOptions.headers) { + const accessToken = typeof this.accessToken === 'function' + ? this.accessToken() + : this.accessToken; + requestOptions.headers["Authorization"] = "Bearer " + accessToken; + } + } +} + +export class ApiKeyAuth implements Authentication { + public apiKey: string = ''; + + constructor(private location: string, private paramName: string) { + } + + applyToRequest(requestOptions: localVarRequest.Options): void { + if (this.location == "query") { + (requestOptions.qs)[this.paramName] = this.apiKey; + } else if (this.location == "header" && requestOptions && requestOptions.headers) { + requestOptions.headers[this.paramName] = this.apiKey; + } else if (this.location == 'cookie' && requestOptions && requestOptions.headers) { + if (requestOptions.headers['Cookie']) { + requestOptions.headers['Cookie'] += '; ' + this.paramName + '=' + encodeURIComponent(this.apiKey); + } + else { + requestOptions.headers['Cookie'] = this.paramName + '=' + encodeURIComponent(this.apiKey); + } + } + } +} + +export class OAuth implements Authentication { + public accessToken: string = ''; + + applyToRequest(requestOptions: localVarRequest.Options): void { + if (requestOptions && requestOptions.headers) { + requestOptions.headers["Authorization"] = "Bearer " + this.accessToken; + } + } +} + +export class VoidAuth implements Authentication { + public username: string = ''; + public password: string = ''; + + applyToRequest(_: localVarRequest.Options): void { + // Do nothing + } +} + +export type Interceptor = (requestOptions: localVarRequest.Options) => (Promise | void); diff --git a/src/typings/checkout/molPayDetails.ts b/src/typings/checkout/molPayDetails.ts index 5f76fce07..cf5cb57be 100644 --- a/src/typings/checkout/molPayDetails.ts +++ b/src/typings/checkout/molPayDetails.ts @@ -48,7 +48,7 @@ export class MolPayDetails { export namespace MolPayDetails { export enum TypeEnum { - FpxMy = 'molpay_ebanking_fpx_MY', - Th = 'molpay_ebanking_TH' + MolpayEbankingFpxMy = 'molpay_ebanking_fpx_MY', + MolpayEbankingTh = 'molpay_ebanking_TH' } } diff --git a/src/typings/checkout/openInvoiceDetails.ts b/src/typings/checkout/openInvoiceDetails.ts index e13d78e3e..ac78c58cd 100644 --- a/src/typings/checkout/openInvoiceDetails.ts +++ b/src/typings/checkout/openInvoiceDetails.ts @@ -39,7 +39,7 @@ export class OpenInvoiceDetails { /** * **openinvoice** */ - 'type'?: OpenInvoiceDetails.TypeEnum; + 'type'?: OpenInvoiceDetails.TypeEnum = OpenInvoiceDetails.TypeEnum.Openinvoice; static discriminator: string | undefined = undefined; @@ -87,8 +87,8 @@ export class OpenInvoiceDetails { export namespace OpenInvoiceDetails { export enum TypeEnum { - Openinvoice = 'openinvoice', - AfterpayDirectdebit = 'afterpay_directdebit', - AtomePos = 'atome_pos' + Openinvoice = 'openinvoice', + AfterpayDirectdebit = 'afterpay_directdebit', + AtomePos = 'atome_pos' } } diff --git a/src/typings/checkout/payByBankAISDirectDebitDetails.ts b/src/typings/checkout/payByBankAISDirectDebitDetails.ts index e7e13f378..44f56d3c2 100644 --- a/src/typings/checkout/payByBankAISDirectDebitDetails.ts +++ b/src/typings/checkout/payByBankAISDirectDebitDetails.ts @@ -27,7 +27,7 @@ export class PayByBankAISDirectDebitDetails { /** * **paybybank_** */ - 'type': PayByBankAISDirectDebitDetails.TypeEnum; + 'type': PayByBankAISDirectDebitDetails.TypeEnum = PayByBankAISDirectDebitDetails.TypeEnum.PaybybankAisDd; static discriminator: string | undefined = undefined; @@ -60,6 +60,6 @@ export class PayByBankAISDirectDebitDetails { export namespace PayByBankAISDirectDebitDetails { export enum TypeEnum { - PaybybankAisDd = 'paybybank_AIS_DD' + PaybybankAisDd = 'paybybank_AIS_DD' } } diff --git a/src/typings/checkout/payByBankDetails.ts b/src/typings/checkout/payByBankDetails.ts index 1a7b01133..d97a98eca 100644 --- a/src/typings/checkout/payByBankDetails.ts +++ b/src/typings/checkout/payByBankDetails.ts @@ -20,7 +20,7 @@ export class PayByBankDetails { /** * **paybybank** */ - 'type': PayByBankDetails.TypeEnum; + 'type': PayByBankDetails.TypeEnum = PayByBankDetails.TypeEnum.Paybybank; static discriminator: string | undefined = undefined; @@ -48,6 +48,6 @@ export class PayByBankDetails { export namespace PayByBankDetails { export enum TypeEnum { - Paybybank = 'paybybank' + Paybybank = 'paybybank' } } diff --git a/src/typings/checkout/payPalDetails.ts b/src/typings/checkout/payPalDetails.ts index 4cab58140..2c0c96019 100644 --- a/src/typings/checkout/payPalDetails.ts +++ b/src/typings/checkout/payPalDetails.ts @@ -47,7 +47,7 @@ export class PayPalDetails { /** * **paypal** */ - 'type': PayPalDetails.TypeEnum; + 'type': PayPalDetails.TypeEnum = PayPalDetails.TypeEnum.Paypal; static discriminator: string | undefined = undefined; @@ -105,11 +105,11 @@ export class PayPalDetails { export namespace PayPalDetails { export enum SubtypeEnum { - Express = 'express', - Redirect = 'redirect', - Sdk = 'sdk' + Express = 'express', + Redirect = 'redirect', + Sdk = 'sdk' } export enum TypeEnum { - Paypal = 'paypal' + Paypal = 'paypal' } } diff --git a/src/typings/checkout/payPayDetails.ts b/src/typings/checkout/payPayDetails.ts index 22b2c0bee..60ff3ff80 100644 --- a/src/typings/checkout/payPayDetails.ts +++ b/src/typings/checkout/payPayDetails.ts @@ -27,7 +27,7 @@ export class PayPayDetails { /** * **paypay** */ - 'type'?: PayPayDetails.TypeEnum; + 'type'?: PayPayDetails.TypeEnum = PayPayDetails.TypeEnum.Paypay; static discriminator: string | undefined = undefined; @@ -60,6 +60,6 @@ export class PayPayDetails { export namespace PayPayDetails { export enum TypeEnum { - Paypay = 'paypay' + Paypay = 'paypay' } } diff --git a/src/typings/checkout/payToDetails.ts b/src/typings/checkout/payToDetails.ts index 5e8220961..cd1033181 100644 --- a/src/typings/checkout/payToDetails.ts +++ b/src/typings/checkout/payToDetails.ts @@ -31,7 +31,7 @@ export class PayToDetails { /** * **payto** */ - 'type'?: PayToDetails.TypeEnum; + 'type'?: PayToDetails.TypeEnum = PayToDetails.TypeEnum.Payto; static discriminator: string | undefined = undefined; @@ -69,6 +69,6 @@ export class PayToDetails { export namespace PayToDetails { export enum TypeEnum { - Payto = 'payto' + Payto = 'payto' } } diff --git a/src/typings/checkout/payUUpiDetails.ts b/src/typings/checkout/payUUpiDetails.ts index 755118179..ab485fc65 100644 --- a/src/typings/checkout/payUUpiDetails.ts +++ b/src/typings/checkout/payUUpiDetails.ts @@ -31,7 +31,7 @@ export class PayUUpiDetails { /** * **payu_IN_upi** */ - 'type': PayUUpiDetails.TypeEnum; + 'type': PayUUpiDetails.TypeEnum = PayUUpiDetails.TypeEnum.PayuInUpi; /** * The virtual payment address for UPI. */ @@ -78,6 +78,6 @@ export class PayUUpiDetails { export namespace PayUUpiDetails { export enum TypeEnum { - PayuInUpi = 'payu_IN_upi' + PayuInUpi = 'payu_IN_upi' } } diff --git a/src/typings/checkout/payWithGoogleDetails.ts b/src/typings/checkout/payWithGoogleDetails.ts index 371f61884..61ddf6a52 100644 --- a/src/typings/checkout/payWithGoogleDetails.ts +++ b/src/typings/checkout/payWithGoogleDetails.ts @@ -39,7 +39,7 @@ export class PayWithGoogleDetails { /** * **paywithgoogle** */ - 'type'?: PayWithGoogleDetails.TypeEnum; + 'type'?: PayWithGoogleDetails.TypeEnum = PayWithGoogleDetails.TypeEnum.Paywithgoogle; static discriminator: string | undefined = undefined; @@ -87,10 +87,10 @@ export class PayWithGoogleDetails { export namespace PayWithGoogleDetails { export enum FundingSourceEnum { - Credit = 'credit', - Debit = 'debit' + Credit = 'credit', + Debit = 'debit' } export enum TypeEnum { - Paywithgoogle = 'paywithgoogle' + Paywithgoogle = 'paywithgoogle' } } diff --git a/src/typings/checkout/payWithGoogleDonations.ts b/src/typings/checkout/payWithGoogleDonations.ts index 63a8d699e..591aa6b81 100644 --- a/src/typings/checkout/payWithGoogleDonations.ts +++ b/src/typings/checkout/payWithGoogleDonations.ts @@ -39,7 +39,7 @@ export class PayWithGoogleDonations { /** * **paywithgoogle** */ - 'type'?: PayWithGoogleDonations.TypeEnum; + 'type'?: PayWithGoogleDonations.TypeEnum = PayWithGoogleDonations.TypeEnum.Paywithgoogle; static discriminator: string | undefined = undefined; @@ -87,10 +87,10 @@ export class PayWithGoogleDonations { export namespace PayWithGoogleDonations { export enum FundingSourceEnum { - Credit = 'credit', - Debit = 'debit' + Credit = 'credit', + Debit = 'debit' } export enum TypeEnum { - Paywithgoogle = 'paywithgoogle' + Paywithgoogle = 'paywithgoogle' } } diff --git a/src/typings/checkout/paymentAmountUpdateRequest.ts b/src/typings/checkout/paymentAmountUpdateRequest.ts index 41cca2313..01741055e 100644 --- a/src/typings/checkout/paymentAmountUpdateRequest.ts +++ b/src/typings/checkout/paymentAmountUpdateRequest.ts @@ -14,7 +14,7 @@ import { Split } from './split'; export class PaymentAmountUpdateRequest { 'amount': Amount; - 'applicationInfo'?: ApplicationInfo | null; + 'applicationInfo'?: ApplicationInfo; /** * The reason for the amount update. Possible values: * **delayedCharge** * **noShow** * **installment** */ @@ -47,7 +47,7 @@ export class PaymentAmountUpdateRequest { { "name": "applicationInfo", "baseName": "applicationInfo", - "type": "ApplicationInfo | null" + "type": "ApplicationInfo" }, { "name": "industryUsage", @@ -82,8 +82,8 @@ export class PaymentAmountUpdateRequest { export namespace PaymentAmountUpdateRequest { export enum IndustryUsageEnum { - DelayedCharge = 'delayedCharge', - Installment = 'installment', - NoShow = 'noShow' + DelayedCharge = 'delayedCharge', + Installment = 'installment', + NoShow = 'noShow' } } diff --git a/src/typings/checkout/paymentAmountUpdateResponse.ts b/src/typings/checkout/paymentAmountUpdateResponse.ts index 471afc34f..ae0292778 100644 --- a/src/typings/checkout/paymentAmountUpdateResponse.ts +++ b/src/typings/checkout/paymentAmountUpdateResponse.ts @@ -102,11 +102,11 @@ export class PaymentAmountUpdateResponse { export namespace PaymentAmountUpdateResponse { export enum IndustryUsageEnum { - DelayedCharge = 'delayedCharge', - Installment = 'installment', - NoShow = 'noShow' + DelayedCharge = 'delayedCharge', + Installment = 'installment', + NoShow = 'noShow' } export enum StatusEnum { - Received = 'received' + Received = 'received' } } diff --git a/src/typings/checkout/paymentCancelRequest.ts b/src/typings/checkout/paymentCancelRequest.ts index cdb4f5ea3..50c3480ee 100644 --- a/src/typings/checkout/paymentCancelRequest.ts +++ b/src/typings/checkout/paymentCancelRequest.ts @@ -10,7 +10,7 @@ import { ApplicationInfo } from './applicationInfo'; export class PaymentCancelRequest { - 'applicationInfo'?: ApplicationInfo | null; + 'applicationInfo'?: ApplicationInfo; /** * The merchant account that is used to process the payment. */ @@ -26,7 +26,7 @@ export class PaymentCancelRequest { { "name": "applicationInfo", "baseName": "applicationInfo", - "type": "ApplicationInfo | null" + "type": "ApplicationInfo" }, { "name": "merchantAccount", diff --git a/src/typings/checkout/paymentCancelResponse.ts b/src/typings/checkout/paymentCancelResponse.ts index 1eef74cbd..2ab4e5589 100644 --- a/src/typings/checkout/paymentCancelResponse.ts +++ b/src/typings/checkout/paymentCancelResponse.ts @@ -66,6 +66,6 @@ export class PaymentCancelResponse { export namespace PaymentCancelResponse { export enum StatusEnum { - Received = 'received' + Received = 'received' } } diff --git a/src/typings/checkout/paymentCaptureRequest.ts b/src/typings/checkout/paymentCaptureRequest.ts index cea76b74a..71f109212 100644 --- a/src/typings/checkout/paymentCaptureRequest.ts +++ b/src/typings/checkout/paymentCaptureRequest.ts @@ -16,7 +16,7 @@ import { SubMerchantInfo } from './subMerchantInfo'; export class PaymentCaptureRequest { 'amount': Amount; - 'applicationInfo'?: ApplicationInfo | null; + 'applicationInfo'?: ApplicationInfo; /** * Price and product information of the refunded items, required for [partial refunds](https://docs.adyen.com/online-payments/refund#refund-a-payment). > This field is required for partial refunds with 3x 4x Oney, Affirm, Afterpay, Atome, Clearpay, Klarna, Ratepay, Walley, and Zip. */ @@ -25,7 +25,7 @@ export class PaymentCaptureRequest { * The merchant account that is used to process the payment. */ 'merchantAccount': string; - 'platformChargebackLogic'?: PlatformChargebackLogic | null; + 'platformChargebackLogic'?: PlatformChargebackLogic; /** * Your reference for the capture request. Maximum length: 80 characters. */ @@ -50,7 +50,7 @@ export class PaymentCaptureRequest { { "name": "applicationInfo", "baseName": "applicationInfo", - "type": "ApplicationInfo | null" + "type": "ApplicationInfo" }, { "name": "lineItems", @@ -65,7 +65,7 @@ export class PaymentCaptureRequest { { "name": "platformChargebackLogic", "baseName": "platformChargebackLogic", - "type": "PlatformChargebackLogic | null" + "type": "PlatformChargebackLogic" }, { "name": "reference", diff --git a/src/typings/checkout/paymentCaptureResponse.ts b/src/typings/checkout/paymentCaptureResponse.ts index 57600c036..3f694ad7e 100644 --- a/src/typings/checkout/paymentCaptureResponse.ts +++ b/src/typings/checkout/paymentCaptureResponse.ts @@ -27,7 +27,7 @@ export class PaymentCaptureResponse { * The [`pspReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__resParam_pspReference) of the payment to capture. */ 'paymentPspReference': string; - 'platformChargebackLogic'?: PlatformChargebackLogic | null; + 'platformChargebackLogic'?: PlatformChargebackLogic; /** * Adyen\'s 16-character reference associated with the capture request. */ @@ -75,7 +75,7 @@ export class PaymentCaptureResponse { { "name": "platformChargebackLogic", "baseName": "platformChargebackLogic", - "type": "PlatformChargebackLogic | null" + "type": "PlatformChargebackLogic" }, { "name": "pspReference", @@ -110,6 +110,6 @@ export class PaymentCaptureResponse { export namespace PaymentCaptureResponse { export enum StatusEnum { - Received = 'received' + Received = 'received' } } diff --git a/src/typings/checkout/paymentDetails.ts b/src/typings/checkout/paymentDetails.ts index fbf420377..1a79d34c2 100644 --- a/src/typings/checkout/paymentDetails.ts +++ b/src/typings/checkout/paymentDetails.ts @@ -39,93 +39,93 @@ export class PaymentDetails { export namespace PaymentDetails { export enum TypeEnum { - Alipay = 'alipay', - Multibanco = 'multibanco', - BankTransferIban = 'bankTransfer_IBAN', - Paybright = 'paybright', - Paynow = 'paynow', - AffirmPos = 'affirm_pos', - Trustly = 'trustly', - Trustlyvector = 'trustlyvector', - Oney = 'oney', - Facilypay = 'facilypay', - Facilypay3x = 'facilypay_3x', - Facilypay4x = 'facilypay_4x', - Facilypay6x = 'facilypay_6x', - Facilypay10x = 'facilypay_10x', - Facilypay12x = 'facilypay_12x', - Unionpay = 'unionpay', - KcpBanktransfer = 'kcp_banktransfer', - KcpPayco = 'kcp_payco', - KcpCreditcard = 'kcp_creditcard', - WechatpaySdk = 'wechatpaySDK', - WechatpayQr = 'wechatpayQR', - WechatpayWeb = 'wechatpayWeb', - MolpayBoost = 'molpay_boost', - WalletIn = 'wallet_IN', - PayuInCashcard = 'payu_IN_cashcard', - PayuInNb = 'payu_IN_nb', - UpiQr = 'upi_qr', - Paytm = 'paytm', - MolpayEbankingVn = 'molpay_ebanking_VN', - MolpayEbankingMy = 'molpay_ebanking_MY', - MolpayEbankingDirectMy = 'molpay_ebanking_direct_MY', - Swish = 'swish', - Bizum = 'bizum', - Walley = 'walley', - WalleyB2b = 'walley_b2b', - Alma = 'alma', - Paypo = 'paypo', - Scalapay = 'scalapay', - Scalapay3x = 'scalapay_3x', - Scalapay4x = 'scalapay_4x', - MolpayFpx = 'molpay_fpx', - Konbini = 'konbini', - DirectEbanking = 'directEbanking', - Boletobancario = 'boletobancario', - Neteller = 'neteller', - Paysafecard = 'paysafecard', - Cashticket = 'cashticket', - Ikano = 'ikano', - Karenmillen = 'karenmillen', - Oasis = 'oasis', - Warehouse = 'warehouse', - PrimeiropayBoleto = 'primeiropay_boleto', - Mada = 'mada', - Benefit = 'benefit', - Knet = 'knet', - Omannet = 'omannet', - GopayWallet = 'gopay_wallet', - KcpNaverpay = 'kcp_naverpay', - OnlinebankingIn = 'onlinebanking_IN', - Fawry = 'fawry', - Atome = 'atome', - Moneybookers = 'moneybookers', - Naps = 'naps', - Nordea = 'nordea', - BoletobancarioBradesco = 'boletobancario_bradesco', - BoletobancarioItau = 'boletobancario_itau', - BoletobancarioSantander = 'boletobancario_santander', - BoletobancarioBancodobrasil = 'boletobancario_bancodobrasil', - BoletobancarioHsbc = 'boletobancario_hsbc', - MolpayMaybank2u = 'molpay_maybank2u', - MolpayCimb = 'molpay_cimb', - MolpayRhb = 'molpay_rhb', - MolpayAmb = 'molpay_amb', - MolpayHlb = 'molpay_hlb', - MolpayAffinEpg = 'molpay_affin_epg', - MolpayBankislam = 'molpay_bankislam', - MolpayPublicbank = 'molpay_publicbank', - FpxAgrobank = 'fpx_agrobank', - Touchngo = 'touchngo', - Maybank2uMae = 'maybank2u_mae', - Duitnow = 'duitnow', - Promptpay = 'promptpay', - TwintPos = 'twint_pos', - AlipayHk = 'alipay_hk', - AlipayHkWeb = 'alipay_hk_web', - AlipayHkWap = 'alipay_hk_wap', - AlipayWap = 'alipay_wap', - Balanceplatform = 'balanceplatform' + Alipay = 'alipay', + Multibanco = 'multibanco', + BankTransferIban = 'bankTransfer_IBAN', + Paybright = 'paybright', + Paynow = 'paynow', + AffirmPos = 'affirm_pos', + Trustly = 'trustly', + Trustlyvector = 'trustlyvector', + Oney = 'oney', + Facilypay = 'facilypay', + Facilypay3x = 'facilypay_3x', + Facilypay4x = 'facilypay_4x', + Facilypay6x = 'facilypay_6x', + Facilypay10x = 'facilypay_10x', + Facilypay12x = 'facilypay_12x', + Unionpay = 'unionpay', + KcpBanktransfer = 'kcp_banktransfer', + KcpPayco = 'kcp_payco', + KcpCreditcard = 'kcp_creditcard', + WechatpaySdk = 'wechatpaySDK', + WechatpayQr = 'wechatpayQR', + WechatpayWeb = 'wechatpayWeb', + MolpayBoost = 'molpay_boost', + WalletIn = 'wallet_IN', + PayuInCashcard = 'payu_IN_cashcard', + PayuInNb = 'payu_IN_nb', + UpiQr = 'upi_qr', + Paytm = 'paytm', + MolpayEbankingVn = 'molpay_ebanking_VN', + MolpayEbankingMy = 'molpay_ebanking_MY', + MolpayEbankingDirectMy = 'molpay_ebanking_direct_MY', + Swish = 'swish', + Bizum = 'bizum', + Walley = 'walley', + WalleyB2b = 'walley_b2b', + Alma = 'alma', + Paypo = 'paypo', + Scalapay = 'scalapay', + Scalapay3x = 'scalapay_3x', + Scalapay4x = 'scalapay_4x', + MolpayFpx = 'molpay_fpx', + Konbini = 'konbini', + DirectEbanking = 'directEbanking', + Boletobancario = 'boletobancario', + Neteller = 'neteller', + Paysafecard = 'paysafecard', + Cashticket = 'cashticket', + Ikano = 'ikano', + Karenmillen = 'karenmillen', + Oasis = 'oasis', + Warehouse = 'warehouse', + PrimeiropayBoleto = 'primeiropay_boleto', + Mada = 'mada', + Benefit = 'benefit', + Knet = 'knet', + Omannet = 'omannet', + GopayWallet = 'gopay_wallet', + KcpNaverpay = 'kcp_naverpay', + OnlinebankingIn = 'onlinebanking_IN', + Fawry = 'fawry', + Atome = 'atome', + Moneybookers = 'moneybookers', + Naps = 'naps', + Nordea = 'nordea', + BoletobancarioBradesco = 'boletobancario_bradesco', + BoletobancarioItau = 'boletobancario_itau', + BoletobancarioSantander = 'boletobancario_santander', + BoletobancarioBancodobrasil = 'boletobancario_bancodobrasil', + BoletobancarioHsbc = 'boletobancario_hsbc', + MolpayMaybank2u = 'molpay_maybank2u', + MolpayCimb = 'molpay_cimb', + MolpayRhb = 'molpay_rhb', + MolpayAmb = 'molpay_amb', + MolpayHlb = 'molpay_hlb', + MolpayAffinEpg = 'molpay_affin_epg', + MolpayBankislam = 'molpay_bankislam', + MolpayPublicbank = 'molpay_publicbank', + FpxAgrobank = 'fpx_agrobank', + Touchngo = 'touchngo', + Maybank2uMae = 'maybank2u_mae', + Duitnow = 'duitnow', + Promptpay = 'promptpay', + TwintPos = 'twint_pos', + AlipayHk = 'alipay_hk', + AlipayHkWeb = 'alipay_hk_web', + AlipayHkWap = 'alipay_hk_wap', + AlipayWap = 'alipay_wap', + Balanceplatform = 'balanceplatform' } } diff --git a/src/typings/checkout/paymentDetailsRequest.ts b/src/typings/checkout/paymentDetailsRequest.ts index 4478d4dd1..11ce8d59e 100644 --- a/src/typings/checkout/paymentDetailsRequest.ts +++ b/src/typings/checkout/paymentDetailsRequest.ts @@ -11,7 +11,7 @@ import { DetailsRequestAuthenticationData } from './detailsRequestAuthentication import { PaymentCompletionDetails } from './paymentCompletionDetails'; export class PaymentDetailsRequest { - 'authenticationData'?: DetailsRequestAuthenticationData | null; + 'authenticationData'?: DetailsRequestAuthenticationData; 'details': PaymentCompletionDetails; /** * Encoded payment data. For [authorizing a payment after using 3D Secure 2 Authentication-only](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only/#authorise-the-payment-with-adyen): If you received `resultCode`: **AuthenticationNotRequired** in the `/payments` response, use the `threeDSPaymentData` from the same response. If you received `resultCode`: **AuthenticationFinished** in the `/payments` response, use the `action.paymentData` from the same response. @@ -31,7 +31,7 @@ export class PaymentDetailsRequest { { "name": "authenticationData", "baseName": "authenticationData", - "type": "DetailsRequestAuthenticationData | null" + "type": "DetailsRequestAuthenticationData" }, { "name": "details", diff --git a/src/typings/checkout/paymentDetailsResponse.ts b/src/typings/checkout/paymentDetailsResponse.ts index 9b9431e84..b9367391f 100644 --- a/src/typings/checkout/paymentDetailsResponse.ts +++ b/src/typings/checkout/paymentDetailsResponse.ts @@ -19,18 +19,18 @@ export class PaymentDetailsResponse { * Contains additional information about the payment. Some data fields are included only if you select them first: Go to **Customer Area** > **Developers** > **Additional data**. */ 'additionalData'?: { [key: string]: string; }; - 'amount'?: Amount | null; + 'amount'?: Amount; /** * Donation Token containing payment details for Adyen Giving. */ 'donationToken'?: string; - 'fraudResult'?: FraudResult | null; + 'fraudResult'?: FraudResult; /** * The reference used during the /payments request. */ 'merchantReference'?: string; - 'order'?: CheckoutOrderResponse | null; - 'paymentMethod'?: ResponsePaymentMethod | null; + 'order'?: CheckoutOrderResponse; + 'paymentMethod'?: ResponsePaymentMethod; /** * Adyen\'s 16-character string reference associated with the transaction/request. This value is globally unique; quote it when communicating with us about this request. */ @@ -51,8 +51,8 @@ export class PaymentDetailsResponse { * The shopperLocale. */ 'shopperLocale'?: string; - 'threeDS2ResponseData'?: ThreeDS2ResponseData | null; - 'threeDS2Result'?: ThreeDS2Result | null; + 'threeDS2ResponseData'?: ThreeDS2ResponseData; + 'threeDS2Result'?: ThreeDS2Result; /** * When non-empty, contains a value that you must submit to the `/payments/details` endpoint as `paymentData`. */ @@ -69,7 +69,7 @@ export class PaymentDetailsResponse { { "name": "amount", "baseName": "amount", - "type": "Amount | null" + "type": "Amount" }, { "name": "donationToken", @@ -79,7 +79,7 @@ export class PaymentDetailsResponse { { "name": "fraudResult", "baseName": "fraudResult", - "type": "FraudResult | null" + "type": "FraudResult" }, { "name": "merchantReference", @@ -89,12 +89,12 @@ export class PaymentDetailsResponse { { "name": "order", "baseName": "order", - "type": "CheckoutOrderResponse | null" + "type": "CheckoutOrderResponse" }, { "name": "paymentMethod", "baseName": "paymentMethod", - "type": "ResponsePaymentMethod | null" + "type": "ResponsePaymentMethod" }, { "name": "pspReference", @@ -124,12 +124,12 @@ export class PaymentDetailsResponse { { "name": "threeDS2ResponseData", "baseName": "threeDS2ResponseData", - "type": "ThreeDS2ResponseData | null" + "type": "ThreeDS2ResponseData" }, { "name": "threeDS2Result", "baseName": "threeDS2Result", - "type": "ThreeDS2Result | null" + "type": "ThreeDS2Result" }, { "name": "threeDSPaymentData", @@ -144,19 +144,19 @@ export class PaymentDetailsResponse { export namespace PaymentDetailsResponse { export enum ResultCodeEnum { - AuthenticationFinished = 'AuthenticationFinished', - AuthenticationNotRequired = 'AuthenticationNotRequired', - Authorised = 'Authorised', - Cancelled = 'Cancelled', - ChallengeShopper = 'ChallengeShopper', - Error = 'Error', - IdentifyShopper = 'IdentifyShopper', - PartiallyAuthorised = 'PartiallyAuthorised', - Pending = 'Pending', - PresentToShopper = 'PresentToShopper', - Received = 'Received', - RedirectShopper = 'RedirectShopper', - Refused = 'Refused', - Success = 'Success' + AuthenticationFinished = 'AuthenticationFinished', + AuthenticationNotRequired = 'AuthenticationNotRequired', + Authorised = 'Authorised', + Cancelled = 'Cancelled', + ChallengeShopper = 'ChallengeShopper', + Error = 'Error', + IdentifyShopper = 'IdentifyShopper', + PartiallyAuthorised = 'PartiallyAuthorised', + Pending = 'Pending', + PresentToShopper = 'PresentToShopper', + Received = 'Received', + RedirectShopper = 'RedirectShopper', + Refused = 'Refused', + Success = 'Success' } } diff --git a/src/typings/checkout/paymentLinkRequest.ts b/src/typings/checkout/paymentLinkRequest.ts index 23e23737b..4f9b7454a 100644 --- a/src/typings/checkout/paymentLinkRequest.ts +++ b/src/typings/checkout/paymentLinkRequest.ts @@ -26,8 +26,8 @@ export class PaymentLinkRequest { */ 'allowedPaymentMethods'?: Array; 'amount': Amount; - 'applicationInfo'?: ApplicationInfo | null; - 'billingAddress'?: Address | null; + 'applicationInfo'?: ApplicationInfo; + 'billingAddress'?: Address; /** * List of payment methods to be hidden from the shopper. To refer to payment methods, use their [payment method type](https://docs.adyen.com/payment-methods/payment-method-types). Example: `\"blockedPaymentMethods\":[\"ideal\",\"giropay\"]` */ @@ -48,7 +48,7 @@ export class PaymentLinkRequest { * The date and time when the purchased goods should be delivered. [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format: YYYY-MM-DDThh:mm:ss+TZD, for example, **2020-12-18T10:15:30+01:00**. */ 'deliverAt'?: Date; - 'deliveryAddress'?: Address | null; + 'deliveryAddress'?: Address; /** * A short description visible on the payment page. Maximum length: 280 characters. */ @@ -57,8 +57,8 @@ export class PaymentLinkRequest { * The date when the payment link expires. [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format with time zone offset: YYYY-MM-DDThh:mm:ss+TZD, for example, **2020-12-18T10:15:30+01:00**. The maximum expiry date is 70 days after the payment link is created. If not provided, the payment link expires 24 hours after it was created. */ 'expiresAt'?: Date; - 'fundOrigin'?: FundOrigin | null; - 'fundRecipient'?: FundRecipient | null; + 'fundOrigin'?: FundOrigin; + 'fundRecipient'?: FundRecipient; /** * A set of key-value pairs that specifies the installment options available per payment method. The key must be a payment method name in lowercase. For example, **card** to specify installment options for all cards, or **visa** or **mc**. The value must be an object containing the installment options. */ @@ -87,7 +87,7 @@ export class PaymentLinkRequest { * Metadata consists of entries, each of which includes a key and a value. Limitations: * Maximum 20 key-value pairs per request. Otherwise, error \"177\" occurs: \"Metadata size exceeds limit\" * Maximum 20 characters per key. Otherwise, error \"178\" occurs: \"Metadata key size exceeds limit\" * A key cannot have the name `checkout.linkId`. Any value that you provide with this key is going to be replaced by the real payment link ID. */ 'metadata'?: { [key: string]: string; }; - 'platformChargebackLogic'?: PlatformChargebackLogic | null; + 'platformChargebackLogic'?: PlatformChargebackLogic; /** * Defines a recurring payment type. Required when `storePaymentMethodMode` is set to **askForConsent** or **enabled**. Possible values: * **Subscription** – A transaction for a fixed or variable amount, which follows a fixed schedule. * **CardOnFile** – With a card-on-file (CoF) transaction, card details are stored to enable one-click or omnichannel journeys, or simply to streamline the checkout process. Any subscription not following a fixed schedule is also considered a card-on-file transaction. * **UnscheduledCardOnFile** – An unscheduled card-on-file (UCoF) transaction is a transaction that occurs on a non-fixed schedule and/or has variable amounts. For example, automatic top-ups when a cardholder\'s balance drops below a certain amount. */ @@ -108,7 +108,7 @@ export class PaymentLinkRequest { * Indicates whether the payment link can be reused for multiple payments. If not provided, this defaults to **false** which means the link can be used for one successful payment only. */ 'reusable'?: boolean; - 'riskData'?: RiskData | null; + 'riskData'?: RiskData; /** * The shopper\'s email address. */ @@ -117,7 +117,7 @@ export class PaymentLinkRequest { * The language to be used in the payment page, specified by a combination of a language and country code. For example, `en-US`. For a list of shopper locales that Pay by Link supports, refer to [Language and localization](https://docs.adyen.com/unified-commerce/pay-by-link/payment-links/api#language). */ 'shopperLocale'?: string; - 'shopperName'?: Name | null; + 'shopperName'?: Name; /** * Your reference to uniquely identify this shopper, for example user ID or account ID. The value is case-sensitive and must be at least three characters. > Your reference must not include personally identifiable information (PII) such as name or email address. */ @@ -129,7 +129,7 @@ export class PaymentLinkRequest { /** * Set to **false** to hide the button that lets the shopper remove a stored payment method. */ - 'showRemovePaymentMethodButton'?: boolean; + 'showRemovePaymentMethodButton'?: boolean = true; /** * The shopper\'s social security number. */ @@ -137,7 +137,7 @@ export class PaymentLinkRequest { /** * Boolean value indicating whether the card payment method should be split into separate debit and credit options. */ - 'splitCardFundingSources'?: boolean; + 'splitCardFundingSources'?: boolean = false; /** * An array of objects specifying how to split a payment when using [Adyen for Platforms](https://docs.adyen.com/platforms/process-payments#providing-split-information), [Classic Platforms integration](https://docs.adyen.com/classic-platforms/processing-payments#providing-split-information), or [Issuing](https://docs.adyen.com/issuing/manage-funds#split). */ @@ -158,7 +158,7 @@ export class PaymentLinkRequest { * A [theme](https://docs.adyen.com/unified-commerce/pay-by-link/payment-links/api#themes) to customize the appearance of the payment page. If not specified, the payment page is rendered according to the theme set as default in your Customer Area. */ 'themeId'?: string; - 'threeDS2RequestData'?: CheckoutSessionThreeDS2RequestData | null; + 'threeDS2RequestData'?: CheckoutSessionThreeDS2RequestData; static discriminator: string | undefined = undefined; @@ -176,12 +176,12 @@ export class PaymentLinkRequest { { "name": "applicationInfo", "baseName": "applicationInfo", - "type": "ApplicationInfo | null" + "type": "ApplicationInfo" }, { "name": "billingAddress", "baseName": "billingAddress", - "type": "Address | null" + "type": "Address" }, { "name": "blockedPaymentMethods", @@ -211,7 +211,7 @@ export class PaymentLinkRequest { { "name": "deliveryAddress", "baseName": "deliveryAddress", - "type": "Address | null" + "type": "Address" }, { "name": "description", @@ -226,12 +226,12 @@ export class PaymentLinkRequest { { "name": "fundOrigin", "baseName": "fundOrigin", - "type": "FundOrigin | null" + "type": "FundOrigin" }, { "name": "fundRecipient", "baseName": "fundRecipient", - "type": "FundRecipient | null" + "type": "FundRecipient" }, { "name": "installmentOptions", @@ -271,7 +271,7 @@ export class PaymentLinkRequest { { "name": "platformChargebackLogic", "baseName": "platformChargebackLogic", - "type": "PlatformChargebackLogic | null" + "type": "PlatformChargebackLogic" }, { "name": "recurringProcessingModel", @@ -301,7 +301,7 @@ export class PaymentLinkRequest { { "name": "riskData", "baseName": "riskData", - "type": "RiskData | null" + "type": "RiskData" }, { "name": "shopperEmail", @@ -316,7 +316,7 @@ export class PaymentLinkRequest { { "name": "shopperName", "baseName": "shopperName", - "type": "Name | null" + "type": "Name" }, { "name": "shopperReference", @@ -371,7 +371,7 @@ export class PaymentLinkRequest { { "name": "threeDS2RequestData", "baseName": "threeDS2RequestData", - "type": "CheckoutSessionThreeDS2RequestData | null" + "type": "CheckoutSessionThreeDS2RequestData" } ]; static getAttributeTypeMap() { @@ -381,20 +381,20 @@ export class PaymentLinkRequest { export namespace PaymentLinkRequest { export enum RecurringProcessingModelEnum { - CardOnFile = 'CardOnFile', - Subscription = 'Subscription', - UnscheduledCardOnFile = 'UnscheduledCardOnFile' + CardOnFile = 'CardOnFile', + Subscription = 'Subscription', + UnscheduledCardOnFile = 'UnscheduledCardOnFile' } export enum RequiredShopperFieldsEnum { - BillingAddress = 'billingAddress', - DeliveryAddress = 'deliveryAddress', - ShopperEmail = 'shopperEmail', - ShopperName = 'shopperName', - TelephoneNumber = 'telephoneNumber' + BillingAddress = 'billingAddress', + DeliveryAddress = 'deliveryAddress', + ShopperEmail = 'shopperEmail', + ShopperName = 'shopperName', + TelephoneNumber = 'telephoneNumber' } export enum StorePaymentMethodModeEnum { - AskForConsent = 'askForConsent', - Disabled = 'disabled', - Enabled = 'enabled' + AskForConsent = 'askForConsent', + Disabled = 'disabled', + Enabled = 'enabled' } } diff --git a/src/typings/checkout/paymentLinkResponse.ts b/src/typings/checkout/paymentLinkResponse.ts index 4bbed5d93..dde1252e7 100644 --- a/src/typings/checkout/paymentLinkResponse.ts +++ b/src/typings/checkout/paymentLinkResponse.ts @@ -26,8 +26,8 @@ export class PaymentLinkResponse { */ 'allowedPaymentMethods'?: Array; 'amount': Amount; - 'applicationInfo'?: ApplicationInfo | null; - 'billingAddress'?: Address | null; + 'applicationInfo'?: ApplicationInfo; + 'billingAddress'?: Address; /** * List of payment methods to be hidden from the shopper. To refer to payment methods, use their [payment method type](https://docs.adyen.com/payment-methods/payment-method-types). Example: `\"blockedPaymentMethods\":[\"ideal\",\"giropay\"]` */ @@ -48,7 +48,7 @@ export class PaymentLinkResponse { * The date and time when the purchased goods should be delivered. [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format: YYYY-MM-DDThh:mm:ss+TZD, for example, **2020-12-18T10:15:30+01:00**. */ 'deliverAt'?: Date; - 'deliveryAddress'?: Address | null; + 'deliveryAddress'?: Address; /** * A short description visible on the payment page. Maximum length: 280 characters. */ @@ -57,8 +57,8 @@ export class PaymentLinkResponse { * The date when the payment link expires. [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format with time zone offset: YYYY-MM-DDThh:mm:ss+TZD, for example, **2020-12-18T10:15:30+01:00**. The maximum expiry date is 70 days after the payment link is created. If not provided, the payment link expires 24 hours after it was created. */ 'expiresAt'?: Date; - 'fundOrigin'?: FundOrigin | null; - 'fundRecipient'?: FundRecipient | null; + 'fundOrigin'?: FundOrigin; + 'fundRecipient'?: FundRecipient; /** * A unique identifier of the payment link. */ @@ -91,7 +91,7 @@ export class PaymentLinkResponse { * Metadata consists of entries, each of which includes a key and a value. Limitations: * Maximum 20 key-value pairs per request. Otherwise, error \"177\" occurs: \"Metadata size exceeds limit\" * Maximum 20 characters per key. Otherwise, error \"178\" occurs: \"Metadata key size exceeds limit\" * A key cannot have the name `checkout.linkId`. Any value that you provide with this key is going to be replaced by the real payment link ID. */ 'metadata'?: { [key: string]: string; }; - 'platformChargebackLogic'?: PlatformChargebackLogic | null; + 'platformChargebackLogic'?: PlatformChargebackLogic; /** * Defines a recurring payment type. Required when `storePaymentMethodMode` is set to **askForConsent** or **enabled**. Possible values: * **Subscription** – A transaction for a fixed or variable amount, which follows a fixed schedule. * **CardOnFile** – With a card-on-file (CoF) transaction, card details are stored to enable one-click or omnichannel journeys, or simply to streamline the checkout process. Any subscription not following a fixed schedule is also considered a card-on-file transaction. * **UnscheduledCardOnFile** – An unscheduled card-on-file (UCoF) transaction is a transaction that occurs on a non-fixed schedule and/or has variable amounts. For example, automatic top-ups when a cardholder\'s balance drops below a certain amount. */ @@ -112,7 +112,7 @@ export class PaymentLinkResponse { * Indicates whether the payment link can be reused for multiple payments. If not provided, this defaults to **false** which means the link can be used for one successful payment only. */ 'reusable'?: boolean; - 'riskData'?: RiskData | null; + 'riskData'?: RiskData; /** * The shopper\'s email address. */ @@ -121,7 +121,7 @@ export class PaymentLinkResponse { * The language to be used in the payment page, specified by a combination of a language and country code. For example, `en-US`. For a list of shopper locales that Pay by Link supports, refer to [Language and localization](https://docs.adyen.com/unified-commerce/pay-by-link/payment-links/api#language). */ 'shopperLocale'?: string; - 'shopperName'?: Name | null; + 'shopperName'?: Name; /** * Your reference to uniquely identify this shopper, for example user ID or account ID. The value is case-sensitive and must be at least three characters. > Your reference must not include personally identifiable information (PII) such as name or email address. */ @@ -133,7 +133,7 @@ export class PaymentLinkResponse { /** * Set to **false** to hide the button that lets the shopper remove a stored payment method. */ - 'showRemovePaymentMethodButton'?: boolean; + 'showRemovePaymentMethodButton'?: boolean = true; /** * The shopper\'s social security number. */ @@ -141,7 +141,7 @@ export class PaymentLinkResponse { /** * Boolean value indicating whether the card payment method should be split into separate debit and credit options. */ - 'splitCardFundingSources'?: boolean; + 'splitCardFundingSources'?: boolean = false; /** * An array of objects specifying how to split a payment when using [Adyen for Platforms](https://docs.adyen.com/platforms/process-payments#providing-split-information), [Classic Platforms integration](https://docs.adyen.com/classic-platforms/processing-payments#providing-split-information), or [Issuing](https://docs.adyen.com/issuing/manage-funds#split). */ @@ -166,7 +166,7 @@ export class PaymentLinkResponse { * A [theme](https://docs.adyen.com/unified-commerce/pay-by-link/payment-links/api#themes) to customize the appearance of the payment page. If not specified, the payment page is rendered according to the theme set as default in your Customer Area. */ 'themeId'?: string; - 'threeDS2RequestData'?: CheckoutSessionThreeDS2RequestData | null; + 'threeDS2RequestData'?: CheckoutSessionThreeDS2RequestData; /** * The date when the payment link status was updated. [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format: YYYY-MM-DDThh:mm:ss+TZD, for example, **2020-12-18T10:15:30+01:00**. */ @@ -192,12 +192,12 @@ export class PaymentLinkResponse { { "name": "applicationInfo", "baseName": "applicationInfo", - "type": "ApplicationInfo | null" + "type": "ApplicationInfo" }, { "name": "billingAddress", "baseName": "billingAddress", - "type": "Address | null" + "type": "Address" }, { "name": "blockedPaymentMethods", @@ -227,7 +227,7 @@ export class PaymentLinkResponse { { "name": "deliveryAddress", "baseName": "deliveryAddress", - "type": "Address | null" + "type": "Address" }, { "name": "description", @@ -242,12 +242,12 @@ export class PaymentLinkResponse { { "name": "fundOrigin", "baseName": "fundOrigin", - "type": "FundOrigin | null" + "type": "FundOrigin" }, { "name": "fundRecipient", "baseName": "fundRecipient", - "type": "FundRecipient | null" + "type": "FundRecipient" }, { "name": "id", @@ -292,7 +292,7 @@ export class PaymentLinkResponse { { "name": "platformChargebackLogic", "baseName": "platformChargebackLogic", - "type": "PlatformChargebackLogic | null" + "type": "PlatformChargebackLogic" }, { "name": "recurringProcessingModel", @@ -322,7 +322,7 @@ export class PaymentLinkResponse { { "name": "riskData", "baseName": "riskData", - "type": "RiskData | null" + "type": "RiskData" }, { "name": "shopperEmail", @@ -337,7 +337,7 @@ export class PaymentLinkResponse { { "name": "shopperName", "baseName": "shopperName", - "type": "Name | null" + "type": "Name" }, { "name": "shopperReference", @@ -397,7 +397,7 @@ export class PaymentLinkResponse { { "name": "threeDS2RequestData", "baseName": "threeDS2RequestData", - "type": "CheckoutSessionThreeDS2RequestData | null" + "type": "CheckoutSessionThreeDS2RequestData" }, { "name": "updatedAt", @@ -417,27 +417,27 @@ export class PaymentLinkResponse { export namespace PaymentLinkResponse { export enum RecurringProcessingModelEnum { - CardOnFile = 'CardOnFile', - Subscription = 'Subscription', - UnscheduledCardOnFile = 'UnscheduledCardOnFile' + CardOnFile = 'CardOnFile', + Subscription = 'Subscription', + UnscheduledCardOnFile = 'UnscheduledCardOnFile' } export enum RequiredShopperFieldsEnum { - BillingAddress = 'billingAddress', - DeliveryAddress = 'deliveryAddress', - ShopperEmail = 'shopperEmail', - ShopperName = 'shopperName', - TelephoneNumber = 'telephoneNumber' + BillingAddress = 'billingAddress', + DeliveryAddress = 'deliveryAddress', + ShopperEmail = 'shopperEmail', + ShopperName = 'shopperName', + TelephoneNumber = 'telephoneNumber' } export enum StatusEnum { - Active = 'active', - Completed = 'completed', - Expired = 'expired', - Paid = 'paid', - PaymentPending = 'paymentPending' + Active = 'active', + Completed = 'completed', + Expired = 'expired', + Paid = 'paid', + PaymentPending = 'paymentPending' } export enum StorePaymentMethodModeEnum { - AskForConsent = 'askForConsent', - Disabled = 'disabled', - Enabled = 'enabled' + AskForConsent = 'askForConsent', + Disabled = 'disabled', + Enabled = 'enabled' } } diff --git a/src/typings/checkout/paymentMethod.ts b/src/typings/checkout/paymentMethod.ts index ab77b0d76..9ed692847 100644 --- a/src/typings/checkout/paymentMethod.ts +++ b/src/typings/checkout/paymentMethod.ts @@ -33,7 +33,7 @@ export class PaymentMethod { * The funding source of the payment method. */ 'fundingSource'?: PaymentMethod.FundingSourceEnum; - 'group'?: PaymentMethodGroup | null; + 'group'?: PaymentMethodGroup; /** * All input details to be provided to complete the payment with this payment method. * @@ -84,7 +84,7 @@ export class PaymentMethod { { "name": "group", "baseName": "group", - "type": "PaymentMethodGroup | null" + "type": "PaymentMethodGroup" }, { "name": "inputDetails", @@ -114,7 +114,7 @@ export class PaymentMethod { export namespace PaymentMethod { export enum FundingSourceEnum { - Credit = 'credit', - Debit = 'debit' + Credit = 'credit', + Debit = 'debit' } } diff --git a/src/typings/checkout/paymentMethodIssuer.ts b/src/typings/checkout/paymentMethodIssuer.ts index 4b2bed58e..b2b5ae34e 100644 --- a/src/typings/checkout/paymentMethodIssuer.ts +++ b/src/typings/checkout/paymentMethodIssuer.ts @@ -12,7 +12,7 @@ export class PaymentMethodIssuer { /** * A boolean value indicating whether this issuer is unavailable. Can be `true` whenever the issuer is offline. */ - 'disabled'?: boolean; + 'disabled'?: boolean = false; /** * The unique identifier of this issuer, to submit in requests to /payments. */ diff --git a/src/typings/checkout/paymentMethodToStore.ts b/src/typings/checkout/paymentMethodToStore.ts index 1f4b10940..cc51e656c 100644 --- a/src/typings/checkout/paymentMethodToStore.ts +++ b/src/typings/checkout/paymentMethodToStore.ts @@ -18,6 +18,10 @@ export class PaymentMethodToStore { */ 'cvc'?: string; /** + * The encrypted card. + */ + 'encryptedCard'?: string; + /** * The encrypted card number. */ 'encryptedCardNumber'?: string; @@ -67,6 +71,11 @@ export class PaymentMethodToStore { "baseName": "cvc", "type": "string" }, + { + "name": "encryptedCard", + "baseName": "encryptedCard", + "type": "string" + }, { "name": "encryptedCardNumber", "baseName": "encryptedCardNumber", diff --git a/src/typings/checkout/paymentMethodsRequest.ts b/src/typings/checkout/paymentMethodsRequest.ts index c8138b5f7..6431894f7 100644 --- a/src/typings/checkout/paymentMethodsRequest.ts +++ b/src/typings/checkout/paymentMethodsRequest.ts @@ -19,7 +19,7 @@ export class PaymentMethodsRequest { * List of payment methods to be presented to the shopper. To refer to payment methods, use their [payment method type](https://docs.adyen.com/payment-methods/payment-method-types). Example: `\"allowedPaymentMethods\":[\"ideal\",\"giropay\"]` */ 'allowedPaymentMethods'?: Array; - 'amount'?: Amount | null; + 'amount'?: Amount; /** * List of payment methods to be hidden from the shopper. To refer to payment methods, use their [payment method type](https://docs.adyen.com/payment-methods/payment-method-types). Example: `\"blockedPaymentMethods\":[\"ideal\",\"giropay\"]` */ @@ -36,7 +36,7 @@ export class PaymentMethodsRequest { * The merchant account identifier, with which you want to process the transaction. */ 'merchantAccount': string; - 'order'?: EncryptedOrderData | null; + 'order'?: EncryptedOrderData; /** * A unique ID that can be used to associate `/paymentMethods` and `/payments` requests with the same shopper transaction, offering insights into conversion rates. */ @@ -52,7 +52,7 @@ export class PaymentMethodsRequest { /** * Boolean value indicating whether the card payment method should be split into separate debit and credit options. */ - 'splitCardFundingSources'?: boolean; + 'splitCardFundingSources'?: boolean = false; /** * Required for Adyen for Platforms integrations if you are a platform model. This is your [reference](https://docs.adyen.com/api-explorer/Management/3/post/merchants/(merchantId)/stores#request-reference) (on [balance platform](https://docs.adyen.com/platforms)) or the [storeReference](https://docs.adyen.com/api-explorer/Account/latest/post/updateAccountHolder#request-accountHolderDetails-storeDetails-storeReference) (in the [classic integration](https://docs.adyen.com/classic-platforms/processing-payments/route-payment-to-store/#route-a-payment-to-a-store)) for the ecommerce or point-of-sale store that is processing the payment. */ @@ -78,7 +78,7 @@ export class PaymentMethodsRequest { { "name": "amount", "baseName": "amount", - "type": "Amount | null" + "type": "Amount" }, { "name": "blockedPaymentMethods", @@ -103,7 +103,7 @@ export class PaymentMethodsRequest { { "name": "order", "baseName": "order", - "type": "EncryptedOrderData | null" + "type": "EncryptedOrderData" }, { "name": "shopperConversionId", @@ -143,13 +143,13 @@ export class PaymentMethodsRequest { export namespace PaymentMethodsRequest { export enum ChannelEnum { - IOs = 'iOS', - Android = 'Android', - Web = 'Web' + IOs = 'iOS', + Android = 'Android', + Web = 'Web' } export enum StoreFiltrationModeEnum { - Exclusive = 'exclusive', - Inclusive = 'inclusive', - SkipFilter = 'skipFilter' + Exclusive = 'exclusive', + Inclusive = 'inclusive', + SkipFilter = 'skipFilter' } } diff --git a/src/typings/checkout/paymentMethodsResponse.ts b/src/typings/checkout/paymentMethodsResponse.ts index 3ae3b9a7f..2a10750c3 100644 --- a/src/typings/checkout/paymentMethodsResponse.ts +++ b/src/typings/checkout/paymentMethodsResponse.ts @@ -8,7 +8,7 @@ */ import { PaymentMethod } from './paymentMethod'; -import { StoredPaymentMethod } from './storedPaymentMethod'; +import { PaymentMethodsResponseStoredPaymentMethodsInner } from './paymentMethodsResponseStoredPaymentMethodsInner'; export class PaymentMethodsResponse { /** @@ -18,7 +18,7 @@ export class PaymentMethodsResponse { /** * List of all stored payment methods. */ - 'storedPaymentMethods'?: Array; + 'storedPaymentMethods'?: Array; static discriminator: string | undefined = undefined; @@ -31,7 +31,7 @@ export class PaymentMethodsResponse { { "name": "storedPaymentMethods", "baseName": "storedPaymentMethods", - "type": "Array" + "type": "Array" } ]; static getAttributeTypeMap() { diff --git a/src/typings/checkout/paymentMethodsResponseStoredPaymentMethodsInner.ts b/src/typings/checkout/paymentMethodsResponseStoredPaymentMethodsInner.ts new file mode 100644 index 000000000..96ecd8e05 --- /dev/null +++ b/src/typings/checkout/paymentMethodsResponseStoredPaymentMethodsInner.ts @@ -0,0 +1,176 @@ +/* + * The version of the OpenAPI document: v71 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { PixStoredPaymentMethod } from './pixStoredPaymentMethod'; +import { StoredPaymentMethod } from './storedPaymentMethod'; + +export class PaymentMethodsResponseStoredPaymentMethodsInner { + /** + * The bank account number (without separators). + */ + 'bankAccountNumber'?: string; + /** + * The location id of the bank. The field value is `nil` in most cases. + */ + 'bankLocationId'?: string; + /** + * The brand of the card. + */ + 'brand'?: string; + /** + * The two-digit month when the card expires + */ + 'expiryMonth'?: string; + /** + * The last two digits of the year the card expires. For example, **22** for the year 2022. + */ + 'expiryYear'?: string; + /** + * The unique payment method code. + */ + 'holderName'?: string; + /** + * The IBAN of the bank account. + */ + 'iban'?: string; + /** + * A unique identifier of this stored payment method. + */ + 'id'?: string; + /** + * The shopper’s issuer account label + */ + 'label'?: string; + /** + * The last four digits of the PAN. + */ + 'lastFour'?: string; + /** + * The display name of the stored payment method. + */ + 'name'?: string; + /** + * Returned in the response if you are not tokenizing with Adyen and are using the Merchant-initiated transactions (MIT) framework from Mastercard or Visa. This contains either the Mastercard Trace ID or the Visa Transaction ID. + */ + 'networkTxReference'?: string; + /** + * The name of the bank account holder. + */ + 'ownerName'?: string; + /** + * The shopper’s email address. + */ + 'shopperEmail'?: string; + /** + * The supported recurring processing models for this stored payment method. + */ + 'supportedRecurringProcessingModels'?: Array; + /** + * The supported shopper interactions for this stored payment method. + */ + 'supportedShopperInteractions'?: Array; + /** + * The type of payment method. + */ + 'type'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "bankAccountNumber", + "baseName": "bankAccountNumber", + "type": "string" + }, + { + "name": "bankLocationId", + "baseName": "bankLocationId", + "type": "string" + }, + { + "name": "brand", + "baseName": "brand", + "type": "string" + }, + { + "name": "expiryMonth", + "baseName": "expiryMonth", + "type": "string" + }, + { + "name": "expiryYear", + "baseName": "expiryYear", + "type": "string" + }, + { + "name": "holderName", + "baseName": "holderName", + "type": "string" + }, + { + "name": "iban", + "baseName": "iban", + "type": "string" + }, + { + "name": "id", + "baseName": "id", + "type": "string" + }, + { + "name": "label", + "baseName": "label", + "type": "string" + }, + { + "name": "lastFour", + "baseName": "lastFour", + "type": "string" + }, + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "networkTxReference", + "baseName": "networkTxReference", + "type": "string" + }, + { + "name": "ownerName", + "baseName": "ownerName", + "type": "string" + }, + { + "name": "shopperEmail", + "baseName": "shopperEmail", + "type": "string" + }, + { + "name": "supportedRecurringProcessingModels", + "baseName": "supportedRecurringProcessingModels", + "type": "Array" + }, + { + "name": "supportedShopperInteractions", + "baseName": "supportedShopperInteractions", + "type": "Array" + }, + { + "name": "type", + "baseName": "type", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return PaymentMethodsResponseStoredPaymentMethodsInner.attributeTypeMap; + } +} + diff --git a/src/typings/checkout/paymentRefundRequest.ts b/src/typings/checkout/paymentRefundRequest.ts index 078a8f590..7ffbda47d 100644 --- a/src/typings/checkout/paymentRefundRequest.ts +++ b/src/typings/checkout/paymentRefundRequest.ts @@ -14,7 +14,7 @@ import { Split } from './split'; export class PaymentRefundRequest { 'amount': Amount; - 'applicationInfo'?: ApplicationInfo | null; + 'applicationInfo'?: ApplicationInfo; /** * Price and product information of the refunded items, required for [partial refunds](https://docs.adyen.com/online-payments/refund#refund-a-payment). > This field is required for partial refunds with 3x 4x Oney, Affirm, Afterpay, Atome, Clearpay, Klarna, Ratepay, Walley, and Zip. */ @@ -26,7 +26,7 @@ export class PaymentRefundRequest { /** * The reason for the refund request. Possible values: * **FRAUD** * **CUSTOMER REQUEST** * **RETURN** * **DUPLICATE** * **OTHER** */ - 'merchantRefundReason'?: PaymentRefundRequest.MerchantRefundReasonEnum | null; + 'merchantRefundReason'?: PaymentRefundRequest.MerchantRefundReasonEnum; /** * Your reference for the refund request. Maximum length: 80 characters. */ @@ -51,7 +51,7 @@ export class PaymentRefundRequest { { "name": "applicationInfo", "baseName": "applicationInfo", - "type": "ApplicationInfo | null" + "type": "ApplicationInfo" }, { "name": "lineItems", @@ -66,7 +66,7 @@ export class PaymentRefundRequest { { "name": "merchantRefundReason", "baseName": "merchantRefundReason", - "type": "PaymentRefundRequest.MerchantRefundReasonEnum | null" + "type": "PaymentRefundRequest.MerchantRefundReasonEnum" }, { "name": "reference", @@ -91,10 +91,10 @@ export class PaymentRefundRequest { export namespace PaymentRefundRequest { export enum MerchantRefundReasonEnum { - Fraud = 'FRAUD', - CustomerRequest = 'CUSTOMER REQUEST', - Return = 'RETURN', - Duplicate = 'DUPLICATE', - Other = 'OTHER' + Fraud = 'FRAUD', + CustomerRequest = 'CUSTOMER REQUEST', + Return = 'RETURN', + Duplicate = 'DUPLICATE', + Other = 'OTHER' } } diff --git a/src/typings/checkout/paymentRefundResponse.ts b/src/typings/checkout/paymentRefundResponse.ts index 77c4bb9af..507803323 100644 --- a/src/typings/checkout/paymentRefundResponse.ts +++ b/src/typings/checkout/paymentRefundResponse.ts @@ -28,7 +28,7 @@ export class PaymentRefundResponse { /** * Your reason for the refund request. */ - 'merchantRefundReason'?: PaymentRefundResponse.MerchantRefundReasonEnum | null; + 'merchantRefundReason'?: PaymentRefundResponse.MerchantRefundReasonEnum; /** * The [`pspReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__resParam_pspReference) of the payment to refund. */ @@ -80,7 +80,7 @@ export class PaymentRefundResponse { { "name": "merchantRefundReason", "baseName": "merchantRefundReason", - "type": "PaymentRefundResponse.MerchantRefundReasonEnum | null" + "type": "PaymentRefundResponse.MerchantRefundReasonEnum" }, { "name": "paymentPspReference", @@ -120,13 +120,13 @@ export class PaymentRefundResponse { export namespace PaymentRefundResponse { export enum MerchantRefundReasonEnum { - Fraud = 'FRAUD', - CustomerRequest = 'CUSTOMER REQUEST', - Return = 'RETURN', - Duplicate = 'DUPLICATE', - Other = 'OTHER' + Fraud = 'FRAUD', + CustomerRequest = 'CUSTOMER REQUEST', + Return = 'RETURN', + Duplicate = 'DUPLICATE', + Other = 'OTHER' } export enum StatusEnum { - Received = 'received' + Received = 'received' } } diff --git a/src/typings/checkout/paymentRequest.ts b/src/typings/checkout/paymentRequest.ts index 4be01cbd0..84224783c 100644 --- a/src/typings/checkout/paymentRequest.ts +++ b/src/typings/checkout/paymentRequest.ts @@ -8,96 +8,44 @@ */ import { AccountInfo } from './accountInfo'; -import { AchDetails } from './achDetails'; -import { AffirmDetails } from './affirmDetails'; -import { AfterpayDetails } from './afterpayDetails'; -import { AmazonPayDetails } from './amazonPayDetails'; import { Amount } from './amount'; -import { AncvDetails } from './ancvDetails'; -import { AndroidPayDetails } from './androidPayDetails'; -import { ApplePayDetails } from './applePayDetails'; import { ApplicationInfo } from './applicationInfo'; import { AuthenticationData } from './authenticationData'; -import { BacsDirectDebitDetails } from './bacsDirectDebitDetails'; -import { BillDeskDetails } from './billDeskDetails'; import { BillingAddress } from './billingAddress'; -import { BlikDetails } from './blikDetails'; import { BrowserInfo } from './browserInfo'; -import { CardDetails } from './cardDetails'; -import { CashAppDetails } from './cashAppDetails'; -import { CellulantDetails } from './cellulantDetails'; import { CheckoutBankAccount } from './checkoutBankAccount'; import { Company } from './company'; import { DeliveryAddress } from './deliveryAddress'; -import { DokuDetails } from './dokuDetails'; -import { DotpayDetails } from './dotpayDetails'; -import { DragonpayDetails } from './dragonpayDetails'; -import { EBankingFinlandDetails } from './eBankingFinlandDetails'; -import { EcontextVoucherDetails } from './econtextVoucherDetails'; -import { EftDetails } from './eftDetails'; import { EncryptedOrderData } from './encryptedOrderData'; -import { FastlaneDetails } from './fastlaneDetails'; import { ForexQuote } from './forexQuote'; import { FundOrigin } from './fundOrigin'; import { FundRecipient } from './fundRecipient'; -import { GenericIssuerPaymentMethodDetails } from './genericIssuerPaymentMethodDetails'; -import { GiropayDetails } from './giropayDetails'; -import { GooglePayDetails } from './googlePayDetails'; -import { IdealDetails } from './idealDetails'; import { Installments } from './installments'; -import { KlarnaDetails } from './klarnaDetails'; import { LineItem } from './lineItem'; import { Mandate } from './mandate'; -import { MasterpassDetails } from './masterpassDetails'; -import { MbwayDetails } from './mbwayDetails'; import { MerchantRiskIndicator } from './merchantRiskIndicator'; -import { MobilePayDetails } from './mobilePayDetails'; -import { MolPayDetails } from './molPayDetails'; import { Name } from './name'; -import { OpenInvoiceDetails } from './openInvoiceDetails'; -import { PayByBankAISDirectDebitDetails } from './payByBankAISDirectDebitDetails'; -import { PayByBankDetails } from './payByBankDetails'; -import { PayPalDetails } from './payPalDetails'; -import { PayPayDetails } from './payPayDetails'; -import { PayToDetails } from './payToDetails'; -import { PayUUpiDetails } from './payUUpiDetails'; -import { PayWithGoogleDetails } from './payWithGoogleDetails'; -import { PaymentDetails } from './paymentDetails'; -import { PixDetails } from './pixDetails'; +import { PaymentRequestPaymentMethod } from './paymentRequestPaymentMethod'; import { PlatformChargebackLogic } from './platformChargebackLogic'; -import { PseDetails } from './pseDetails'; -import { RatepayDetails } from './ratepayDetails'; import { RiskData } from './riskData'; -import { RivertyDetails } from './rivertyDetails'; -import { SamsungPayDetails } from './samsungPayDetails'; -import { SepaDirectDebitDetails } from './sepaDirectDebitDetails'; import { Split } from './split'; -import { StoredPaymentMethodDetails } from './storedPaymentMethodDetails'; import { SubMerchantInfo } from './subMerchantInfo'; import { ThreeDS2RequestFields } from './threeDS2RequestFields'; import { ThreeDSecureData } from './threeDSecureData'; -import { TwintDetails } from './twintDetails'; -import { UpiCollectDetails } from './upiCollectDetails'; -import { UpiIntentDetails } from './upiIntentDetails'; -import { VippsDetails } from './vippsDetails'; -import { VisaCheckoutDetails } from './visaCheckoutDetails'; -import { WeChatPayDetails } from './weChatPayDetails'; -import { WeChatPayMiniProgramDetails } from './weChatPayMiniProgramDetails'; -import { ZipDetails } from './zipDetails'; export class PaymentRequest { - 'accountInfo'?: AccountInfo | null; - 'additionalAmount'?: Amount | null; + 'accountInfo'?: AccountInfo; + 'additionalAmount'?: Amount; /** * This field contains additional data, which may be required for a particular payment request. The `additionalData` object consists of entries, each of which includes the key and value. */ 'additionalData'?: { [key: string]: string; }; 'amount': Amount; - 'applicationInfo'?: ApplicationInfo | null; - 'authenticationData'?: AuthenticationData | null; - 'bankAccount'?: CheckoutBankAccount | null; - 'billingAddress'?: BillingAddress | null; - 'browserInfo'?: BrowserInfo | null; + 'applicationInfo'?: ApplicationInfo; + 'authenticationData'?: AuthenticationData; + 'bankAccount'?: CheckoutBankAccount; + 'billingAddress'?: BillingAddress; + 'browserInfo'?: BrowserInfo; /** * The delay between the authorisation and scheduled auto-capture, specified in hours. */ @@ -110,7 +58,7 @@ export class PaymentRequest { * Checkout attempt ID that corresponds to the Id generated by the client SDK for tracking user payment journey. */ 'checkoutAttemptId'?: string; - 'company'?: Company | null; + 'company'?: Company; /** * Conversion ID that corresponds to the Id generated by the client SDK for tracking user payment journey. * @@ -126,12 +74,12 @@ export class PaymentRequest { * The shopper\'s date of birth. Format [ISO-8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DD */ 'dateOfBirth'?: Date; - 'dccQuote'?: ForexQuote | null; + 'dccQuote'?: ForexQuote; /** * The date and time the purchased goods should be delivered. Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DDThh:mm:ss.sssTZD Example: 2017-07-17T13:42:40.428+01:00 */ 'deliverAt'?: Date; - 'deliveryAddress'?: DeliveryAddress | null; + 'deliveryAddress'?: DeliveryAddress; /** * The date and time the purchased goods should be delivered. Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DDThh:mm:ss.sssTZD Example: 2017-07-17T13:42:40.428+01:00 * @@ -163,13 +111,13 @@ export class PaymentRequest { * An integer value that is added to the normal fraud score. The value can be either positive or negative. */ 'fraudOffset'?: number; - 'fundOrigin'?: FundOrigin | null; - 'fundRecipient'?: FundRecipient | null; + 'fundOrigin'?: FundOrigin; + 'fundRecipient'?: FundRecipient; /** * The reason for the amount update. Possible values: * **delayedCharge** * **noShow** * **installment** */ 'industryUsage'?: PaymentRequest.IndustryUsageEnum; - 'installments'?: Installments | null; + 'installments'?: Installments; /** * Price and product information about the purchased items, to be included on the invoice sent to the shopper. > This field is required for 3x 4x Oney, Affirm, Afterpay, Clearpay, Klarna, Ratepay, Riverty, and Zip. */ @@ -178,7 +126,7 @@ export class PaymentRequest { * The `localizedShopperStatement` field lets you use dynamic values for your shopper statement in a local character set. If not supplied, left empty, or for cross-border transactions, **shopperStatement** is used. Adyen currently supports the ja-Kana character set for Visa and Mastercard payments in Japan using Japanese cards. This character set supports: * UTF-8 based Katakana, capital letters, numbers and special characters. * Half-width or full-width characters. */ 'localizedShopperStatement'?: { [key: string]: string; }; - 'mandate'?: Mandate | null; + 'mandate'?: Mandate; /** * The [merchant category code](https://en.wikipedia.org/wiki/Merchant_category_code) (MCC) is a four-digit number, which relates to a particular market segment. This code reflects the predominant activity that is conducted by the merchant. */ @@ -191,13 +139,13 @@ export class PaymentRequest { * This reference allows linking multiple transactions to each other for reporting purposes (i.e. order auth-rate). The reference should be unique per billing cycle. The same merchant order reference should never be reused after the first authorised attempt. If used, this field should be supplied for all incoming authorisations. > We strongly recommend you send the `merchantOrderReference` value to benefit from linking payment requests when authorisation retries take place. In addition, we recommend you provide `retry.orderAttemptNumber`, `retry.chainAttemptNumber`, and `retry.skipRetry` values in `PaymentRequest.additionalData`. */ 'merchantOrderReference'?: string; - 'merchantRiskIndicator'?: MerchantRiskIndicator | null; + 'merchantRiskIndicator'?: MerchantRiskIndicator; /** * Metadata consists of entries, each of which includes a key and a value. Limits: * Maximum 20 key-value pairs per request. When exceeding, the \"177\" error occurs: \"Metadata size exceeds limit\". * Maximum 20 characters per key. * Maximum 80 characters per value. */ 'metadata'?: { [key: string]: string; }; - 'mpiData'?: ThreeDSecureData | null; - 'order'?: EncryptedOrderData | null; + 'mpiData'?: ThreeDSecureData; + 'order'?: EncryptedOrderData; /** * When you are doing multiple partial (gift card) payments, this is the `pspReference` of the first payment. We use this to link the multiple payments to each other. As your own reference for linking multiple payments, use the `merchantOrderReference`instead. */ @@ -206,11 +154,8 @@ export class PaymentRequest { * Required for the 3D Secure 2 `channel` **Web** integration. Set this parameter to the origin URL of the page that you are loading the 3D Secure Component from. */ 'origin'?: string; - /** - * The type and required details of a payment method to use. - */ - 'paymentMethod': AchDetails | AffirmDetails | AfterpayDetails | AmazonPayDetails | AncvDetails | AndroidPayDetails | ApplePayDetails | BacsDirectDebitDetails | BillDeskDetails | BlikDetails | CardDetails | CashAppDetails | CellulantDetails | DokuDetails | DotpayDetails | DragonpayDetails | EBankingFinlandDetails | EcontextVoucherDetails | EftDetails | FastlaneDetails | GenericIssuerPaymentMethodDetails | GiropayDetails | GooglePayDetails | IdealDetails | KlarnaDetails | MasterpassDetails | MbwayDetails | MobilePayDetails | MolPayDetails | OpenInvoiceDetails | PayByBankAISDirectDebitDetails | PayByBankDetails | PayPalDetails | PayPayDetails | PayToDetails | PayUUpiDetails | PayWithGoogleDetails | PaymentDetails | PixDetails | PseDetails | RatepayDetails | RivertyDetails | SamsungPayDetails | SepaDirectDebitDetails | StoredPaymentMethodDetails | TwintDetails | UpiCollectDetails | UpiIntentDetails | VippsDetails | VisaCheckoutDetails | WeChatPayDetails | WeChatPayMiniProgramDetails | ZipDetails; - 'platformChargebackLogic'?: PlatformChargebackLogic | null; + 'paymentMethod': PaymentRequestPaymentMethod; + 'platformChargebackLogic'?: PlatformChargebackLogic; /** * Date after which no further authorisations shall be performed. Only for 3D Secure 2. */ @@ -239,7 +184,7 @@ export class PaymentRequest { * The URL to return to in case of a redirection. The format depends on the channel. * For web, include the protocol `http://` or `https://`. You can also include your own additional query parameters, for example, shopper ID or order reference number. Example: `https://your-company.com/checkout?shopperOrder=12xy` * For iOS, use the custom URL for your app. To know more about setting custom URL schemes, refer to the [Apple Developer documentation](https://developer.apple.com/documentation/uikit/inter-process_communication/allowing_apps_and_websites_to_link_to_your_content/defining_a_custom_url_scheme_for_your_app). Example: `my-app://` * For Android, use a custom URL handled by an Activity on your app. You can configure it with an [intent filter](https://developer.android.com/guide/components/intents-filters). Example: `my-app://your.package.name` If the URL to return to includes non-ASCII characters, like spaces or special letters, URL encode the value. > The URL must not include personally identifiable information (PII), for example name or email address. */ 'returnUrl': string; - 'riskData'?: RiskData | null; + 'riskData'?: RiskData; /** * The date and time until when the session remains valid, in [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format. For example: 2020-07-18T15:42:40.428+01:00 */ @@ -264,7 +209,7 @@ export class PaymentRequest { * The combination of a language code and a country code to specify the language to be used in the payment. */ 'shopperLocale'?: string; - 'shopperName'?: Name | null; + 'shopperName'?: Name; /** * Required for recurring payments. Your reference to uniquely identify this shopper, for example user ID or account ID. Minimum length: 3 characters. > Your reference must not include personally identifiable information (PII), for example name or email address. */ @@ -297,14 +242,14 @@ export class PaymentRequest { * The shopper\'s telephone number. */ 'telephoneNumber'?: string; - 'threeDS2RequestData'?: ThreeDS2RequestFields | null; + 'threeDS2RequestData'?: ThreeDS2RequestFields; /** * If set to true, you will only perform the [3D Secure 2 authentication](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only), and not the payment authorisation. * * @deprecated since Adyen Checkout API v69 * Use `authenticationData.authenticationOnly` instead. */ - 'threeDSAuthenticationOnly'?: boolean; + 'threeDSAuthenticationOnly'?: boolean = false; /** * Set to true if the payment should be routed to a trusted MID. */ @@ -316,12 +261,12 @@ export class PaymentRequest { { "name": "accountInfo", "baseName": "accountInfo", - "type": "AccountInfo | null" + "type": "AccountInfo" }, { "name": "additionalAmount", "baseName": "additionalAmount", - "type": "Amount | null" + "type": "Amount" }, { "name": "additionalData", @@ -336,27 +281,27 @@ export class PaymentRequest { { "name": "applicationInfo", "baseName": "applicationInfo", - "type": "ApplicationInfo | null" + "type": "ApplicationInfo" }, { "name": "authenticationData", "baseName": "authenticationData", - "type": "AuthenticationData | null" + "type": "AuthenticationData" }, { "name": "bankAccount", "baseName": "bankAccount", - "type": "CheckoutBankAccount | null" + "type": "CheckoutBankAccount" }, { "name": "billingAddress", "baseName": "billingAddress", - "type": "BillingAddress | null" + "type": "BillingAddress" }, { "name": "browserInfo", "baseName": "browserInfo", - "type": "BrowserInfo | null" + "type": "BrowserInfo" }, { "name": "captureDelayHours", @@ -376,7 +321,7 @@ export class PaymentRequest { { "name": "company", "baseName": "company", - "type": "Company | null" + "type": "Company" }, { "name": "conversionId", @@ -396,7 +341,7 @@ export class PaymentRequest { { "name": "dccQuote", "baseName": "dccQuote", - "type": "ForexQuote | null" + "type": "ForexQuote" }, { "name": "deliverAt", @@ -406,7 +351,7 @@ export class PaymentRequest { { "name": "deliveryAddress", "baseName": "deliveryAddress", - "type": "DeliveryAddress | null" + "type": "DeliveryAddress" }, { "name": "deliveryDate", @@ -446,12 +391,12 @@ export class PaymentRequest { { "name": "fundOrigin", "baseName": "fundOrigin", - "type": "FundOrigin | null" + "type": "FundOrigin" }, { "name": "fundRecipient", "baseName": "fundRecipient", - "type": "FundRecipient | null" + "type": "FundRecipient" }, { "name": "industryUsage", @@ -461,7 +406,7 @@ export class PaymentRequest { { "name": "installments", "baseName": "installments", - "type": "Installments | null" + "type": "Installments" }, { "name": "lineItems", @@ -476,7 +421,7 @@ export class PaymentRequest { { "name": "mandate", "baseName": "mandate", - "type": "Mandate | null" + "type": "Mandate" }, { "name": "mcc", @@ -496,7 +441,7 @@ export class PaymentRequest { { "name": "merchantRiskIndicator", "baseName": "merchantRiskIndicator", - "type": "MerchantRiskIndicator | null" + "type": "MerchantRiskIndicator" }, { "name": "metadata", @@ -506,12 +451,12 @@ export class PaymentRequest { { "name": "mpiData", "baseName": "mpiData", - "type": "ThreeDSecureData | null" + "type": "ThreeDSecureData" }, { "name": "order", "baseName": "order", - "type": "EncryptedOrderData | null" + "type": "EncryptedOrderData" }, { "name": "orderReference", @@ -526,12 +471,12 @@ export class PaymentRequest { { "name": "paymentMethod", "baseName": "paymentMethod", - "type": "AchDetails | AffirmDetails | AfterpayDetails | AmazonPayDetails | AncvDetails | AndroidPayDetails | ApplePayDetails | BacsDirectDebitDetails | BillDeskDetails | BlikDetails | CardDetails | CashAppDetails | CellulantDetails | DokuDetails | DotpayDetails | DragonpayDetails | EBankingFinlandDetails | EcontextVoucherDetails | EftDetails | FastlaneDetails | GenericIssuerPaymentMethodDetails | GiropayDetails | GooglePayDetails | IdealDetails | KlarnaDetails | MasterpassDetails | MbwayDetails | MobilePayDetails | MolPayDetails | OpenInvoiceDetails | PayByBankAISDirectDebitDetails | PayByBankDetails | PayPalDetails | PayPayDetails | PayToDetails | PayUUpiDetails | PayWithGoogleDetails | PaymentDetails | PixDetails | PseDetails | RatepayDetails | RivertyDetails | SamsungPayDetails | SepaDirectDebitDetails | StoredPaymentMethodDetails | TwintDetails | UpiCollectDetails | UpiIntentDetails | VippsDetails | VisaCheckoutDetails | WeChatPayDetails | WeChatPayMiniProgramDetails | ZipDetails" + "type": "PaymentRequestPaymentMethod" }, { "name": "platformChargebackLogic", "baseName": "platformChargebackLogic", - "type": "PlatformChargebackLogic | null" + "type": "PlatformChargebackLogic" }, { "name": "recurringExpiry", @@ -571,7 +516,7 @@ export class PaymentRequest { { "name": "riskData", "baseName": "riskData", - "type": "RiskData | null" + "type": "RiskData" }, { "name": "sessionValidity", @@ -606,7 +551,7 @@ export class PaymentRequest { { "name": "shopperName", "baseName": "shopperName", - "type": "Name | null" + "type": "Name" }, { "name": "shopperReference", @@ -651,7 +596,7 @@ export class PaymentRequest { { "name": "threeDS2RequestData", "baseName": "threeDS2RequestData", - "type": "ThreeDS2RequestFields | null" + "type": "ThreeDS2RequestFields" }, { "name": "threeDSAuthenticationOnly", @@ -671,28 +616,28 @@ export class PaymentRequest { export namespace PaymentRequest { export enum ChannelEnum { - IOs = 'iOS', - Android = 'Android', - Web = 'Web' + IOs = 'iOS', + Android = 'Android', + Web = 'Web' } export enum EntityTypeEnum { - NaturalPerson = 'NaturalPerson', - CompanyName = 'CompanyName' + NaturalPerson = 'NaturalPerson', + CompanyName = 'CompanyName' } export enum IndustryUsageEnum { - DelayedCharge = 'delayedCharge', - Installment = 'installment', - NoShow = 'noShow' + DelayedCharge = 'delayedCharge', + Installment = 'installment', + NoShow = 'noShow' } export enum RecurringProcessingModelEnum { - CardOnFile = 'CardOnFile', - Subscription = 'Subscription', - UnscheduledCardOnFile = 'UnscheduledCardOnFile' + CardOnFile = 'CardOnFile', + Subscription = 'Subscription', + UnscheduledCardOnFile = 'UnscheduledCardOnFile' } export enum ShopperInteractionEnum { - Ecommerce = 'Ecommerce', - ContAuth = 'ContAuth', - Moto = 'Moto', - Pos = 'POS' + Ecommerce = 'Ecommerce', + ContAuth = 'ContAuth', + Moto = 'Moto', + Pos = 'POS' } } diff --git a/src/typings/checkout/paymentRequestPaymentMethod.ts b/src/typings/checkout/paymentRequestPaymentMethod.ts new file mode 100644 index 000000000..3cea1643d --- /dev/null +++ b/src/typings/checkout/paymentRequestPaymentMethod.ts @@ -0,0 +1,971 @@ +/* + * The version of the OpenAPI document: v71 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { AchDetails } from './achDetails'; +import { AffirmDetails } from './affirmDetails'; +import { AfterpayDetails } from './afterpayDetails'; +import { AmazonPayDetails } from './amazonPayDetails'; +import { AncvDetails } from './ancvDetails'; +import { AndroidPayDetails } from './androidPayDetails'; +import { ApplePayDetails } from './applePayDetails'; +import { BacsDirectDebitDetails } from './bacsDirectDebitDetails'; +import { BillDeskDetails } from './billDeskDetails'; +import { BlikDetails } from './blikDetails'; +import { CardDetails } from './cardDetails'; +import { CashAppDetails } from './cashAppDetails'; +import { CellulantDetails } from './cellulantDetails'; +import { DokuDetails } from './dokuDetails'; +import { DotpayDetails } from './dotpayDetails'; +import { DragonpayDetails } from './dragonpayDetails'; +import { EBankingFinlandDetails } from './eBankingFinlandDetails'; +import { EcontextVoucherDetails } from './econtextVoucherDetails'; +import { EftDetails } from './eftDetails'; +import { FastlaneDetails } from './fastlaneDetails'; +import { GenericIssuerPaymentMethodDetails } from './genericIssuerPaymentMethodDetails'; +import { GiropayDetails } from './giropayDetails'; +import { GooglePayDetails } from './googlePayDetails'; +import { IdealDetails } from './idealDetails'; +import { KlarnaDetails } from './klarnaDetails'; +import { MasterpassDetails } from './masterpassDetails'; +import { MbwayDetails } from './mbwayDetails'; +import { MobilePayDetails } from './mobilePayDetails'; +import { MolPayDetails } from './molPayDetails'; +import { OpenInvoiceDetails } from './openInvoiceDetails'; +import { PayByBankAISDirectDebitDetails } from './payByBankAISDirectDebitDetails'; +import { PayByBankDetails } from './payByBankDetails'; +import { PayPalDetails } from './payPalDetails'; +import { PayPayDetails } from './payPayDetails'; +import { PayToDetails } from './payToDetails'; +import { PayUUpiDetails } from './payUUpiDetails'; +import { PayWithGoogleDetails } from './payWithGoogleDetails'; +import { PaymentDetails } from './paymentDetails'; +import { PixDetails } from './pixDetails'; +import { PixRecurring } from './pixRecurring'; +import { PseDetails } from './pseDetails'; +import { RakutenPayDetails } from './rakutenPayDetails'; +import { RatepayDetails } from './ratepayDetails'; +import { RivertyDetails } from './rivertyDetails'; +import { SamsungPayDetails } from './samsungPayDetails'; +import { SepaDirectDebitDetails } from './sepaDirectDebitDetails'; +import { StoredPaymentMethodDetails } from './storedPaymentMethodDetails'; +import { TwintDetails } from './twintDetails'; +import { UpiCollectDetails } from './upiCollectDetails'; +import { UpiIntentDetails } from './upiIntentDetails'; +import { VippsDetails } from './vippsDetails'; +import { VisaCheckoutDetails } from './visaCheckoutDetails'; +import { WeChatPayDetails } from './weChatPayDetails'; +import { WeChatPayMiniProgramDetails } from './weChatPayMiniProgramDetails'; +import { ZipDetails } from './zipDetails'; + +/** +* The type and required details of a payment method to use. +*/ +export class PaymentRequestPaymentMethod { + /** + * The account holder type (personal or business). + */ + 'accountHolderType'?: PaymentRequestPaymentMethod.AccountHolderTypeEnum; + /** + * The bank account number (without separators). + */ + 'bankAccountNumber'?: string; + /** + * The bank account type (checking, savings...). + */ + 'bankAccountType'?: PaymentRequestPaymentMethod.BankAccountTypeEnum; + /** + * The bank routing number of the account. + */ + 'bankLocationId'?: string; + /** + * The checkout attempt identifier. + */ + 'checkoutAttemptId'?: string; + /** + * Encrypted bank account number. The bank account number (without separators). + */ + 'encryptedBankAccountNumber'?: string; + /** + * Encrypted location id. The bank routing number of the account. The field value is `nil` in most cases. + */ + 'encryptedBankLocationId'?: string; + /** + * The name of the bank account holder. + */ + 'ownerName': string; + /** + * This is the `recurringDetailReference` returned in the response when you created the token. + * + * @deprecated since Adyen Checkout API v49 + * Use `storedPaymentMethodId` instead. + */ + 'recurringDetailReference'?: string; + /** + * This is the `recurringDetailReference` returned in the response when you created the token. + */ + 'storedPaymentMethodId'?: string; + /** + * The unique identifier of your user\'s verified transfer instrument, which you can use to top up their balance accounts. + */ + 'transferInstrumentId'?: string; + /** + * **ach** + */ + 'type': PaymentRequestPaymentMethod.TypeEnum = PaymentRequestPaymentMethod.TypeEnum.Ach; + /** + * The address where to send the invoice. + */ + 'billingAddress'?: string; + /** + * The address where the goods should be delivered. + */ + 'deliveryAddress'?: string; + /** + * Shopper name, date of birth, phone number, and email address. + */ + 'personalDetails'?: string; + /** + * This is the `amazonPayToken` that you obtained from the [Get Checkout Session](https://amazon-pay-acquirer-guide.s3-eu-west-1.amazonaws.com/v1/amazon-pay-api-v2/checkout-session.html#get-checkout-session) response. This token is used for API only integration specifically. + */ + 'amazonPayToken'?: string; + /** + * The `checkoutSessionId` is used to identify the checkout session at the Amazon Pay side. This field is required only for drop-in and components integration, where it replaces the amazonPayToken. + */ + 'checkoutSessionId'?: string; + /** + * ANCV account identification (email or account number) + */ + 'beneficiaryId'?: string; + /** + * The stringified and base64 encoded `paymentData` you retrieved from the Apple framework. + */ + 'applePayToken': string; + /** + * The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**. + */ + 'fundingSource'?: PaymentRequestPaymentMethod.FundingSourceEnum; + /** + * The name of the card holder. + */ + 'holderName'?: string; + /** + * The PayByBank issuer value of the shopper\'s selected bank. + */ + 'issuer': string; + /** + * BLIK code consisting of 6 digits. + */ + 'blikCode'?: string; + /** + * Secondary brand of the card. For example: **plastix**, **hmclub**. + */ + 'brand'?: string; + /** + * @deprecated + */ + 'cupsecureplus_smscode'?: string; + /** + * The card verification code. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide). + */ + 'cvc'?: string; + /** + * Only include this for JSON Web Encryption (JWE) implementations. The JWE-encrypted card details. + */ + 'encryptedCard'?: string; + /** + * The encrypted card number. + */ + 'encryptedCardNumber'?: string; + /** + * The encrypted card expiry month. + */ + 'encryptedExpiryMonth'?: string; + /** + * The encrypted card expiry year. + */ + 'encryptedExpiryYear'?: string; + /** + * The encrypted card verification code. + */ + 'encryptedSecurityCode'?: string; + /** + * The card expiry month. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide). + */ + 'expiryMonth'?: string; + /** + * The card expiry year. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide). + */ + 'expiryYear'?: string; + /** + * The encoded fastlane data blob + */ + 'fastlaneData': string; + /** + * The transaction identifier from card schemes. This is the [`networkTxReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__resParam_additionalData-ResponseAdditionalDataCommon-networkTxReference) from the response to the first payment. + */ + 'networkPaymentReference'?: string; + /** + * The card number. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide). + */ + 'number'?: string; + /** + * The `shopperNotificationReference` returned in the response when you requested to notify the shopper. Used for recurring payment only. + */ + 'shopperNotificationReference'?: string; + /** + * An identifier used for the Click to Pay transaction. + */ + 'srcCorrelationId'?: string; + /** + * The SRC reference for the Click to Pay token. + */ + 'srcDigitalCardId'?: string; + /** + * The scheme that is being used for Click to Pay. + */ + 'srcScheme'?: string; + /** + * The reference for the Click to Pay token. + */ + 'srcTokenReference'?: string; + /** + * Required for mobile integrations. Version of the 3D Secure 2 mobile SDK. + */ + 'threeDS2SdkVersion'?: string; + /** + * Cash App issued cashtag for recurring payment + */ + 'cashtag'?: string; + /** + * Cash App issued customerId for recurring payment + */ + 'customerId'?: string; + /** + * Cash App issued grantId for one time payment + */ + 'grantId'?: string; + /** + * Cash App issued onFileGrantId for recurring payment + */ + 'onFileGrantId'?: string; + /** + * Cash App request id + */ + 'requestId'?: string; + /** + * The type of flow to initiate. + */ + 'subtype'?: string; + /** + * The shopper\'s first name. + */ + 'firstName': string; + /** + * The shopper\'s last name. + */ + 'lastName': string; + /** + * + */ + 'shopperEmail': string; + /** + * + */ + 'telephoneNumber': string; + /** + * The financial institution code. + */ + 'bankCode'?: string; + /** + * The selected payment card network. + */ + 'googlePayCardNetwork'?: string; + /** + * The `token` that you obtained from the [Google Pay API](https://developers.google.com/pay/api/web/reference/response-objects#PaymentData) `PaymentData` response. + */ + 'googlePayToken': string; + /** + * The Masterpass transaction ID. + */ + 'masterpassTransactionId': string; + /** + * The unique ID associated with the order. + */ + 'orderID'?: string; + /** + * IMMEDIATE_PAYMENT_REQUIRED or UNRESTRICTED + */ + 'payeePreferred'?: string; + /** + * The unique ID associated with the payer. + */ + 'payerID'?: string; + /** + * PAYPAL or PAYPAL_CREDIT + */ + 'payerSelected'?: string; + /** + * The shopper\'s banking details or payId reference, used to complete payment. + */ + 'shopperAccountIdentifier'?: string; + /** + * The virtual payment address for UPI. + */ + 'virtualPaymentAddress'?: string; + 'pixRecurring'?: PixRecurring; + /** + * The shopper\'s bank. + */ + 'bank': string; + /** + * The client type. + */ + 'clientType': string; + /** + * The identification code. + */ + 'identification': string; + /** + * The identification type. + */ + 'identificationType': string; + /** + * A string containing the shopper\'s device fingerprint. For more information, refer to [Device fingerprinting](https://docs.adyen.com/risk-management/device-fingerprinting). + */ + 'deviceFingerprint'?: string; + /** + * The International Bank Account Number (IBAN). + */ + 'iban': string; + /** + * The payload you received from the Samsung Pay SDK response. + */ + 'samsungPayToken': string; + /** + * The sequence number for the debit. For example, send **2** if this is the second debit for the subscription. The sequence number is included in the notification sent to the shopper. + */ + 'billingSequenceNumber': string; + 'appId'?: string; + /** + * The Visa Click to Pay Call ID value. When your shopper selects a payment and/or a shipping address from Visa Click to Pay, you will receive a Visa Click to Pay Call ID. + */ + 'visaCheckoutCallId': string; + 'openid'?: string; + /** + * Set this to **true** if the shopper would like to pick up and collect their order, instead of having the goods delivered to them. + */ + 'clickAndCollect'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "accountHolderType", + "baseName": "accountHolderType", + "type": "PaymentRequestPaymentMethod.AccountHolderTypeEnum" + }, + { + "name": "bankAccountNumber", + "baseName": "bankAccountNumber", + "type": "string" + }, + { + "name": "bankAccountType", + "baseName": "bankAccountType", + "type": "PaymentRequestPaymentMethod.BankAccountTypeEnum" + }, + { + "name": "bankLocationId", + "baseName": "bankLocationId", + "type": "string" + }, + { + "name": "checkoutAttemptId", + "baseName": "checkoutAttemptId", + "type": "string" + }, + { + "name": "encryptedBankAccountNumber", + "baseName": "encryptedBankAccountNumber", + "type": "string" + }, + { + "name": "encryptedBankLocationId", + "baseName": "encryptedBankLocationId", + "type": "string" + }, + { + "name": "ownerName", + "baseName": "ownerName", + "type": "string" + }, + { + "name": "recurringDetailReference", + "baseName": "recurringDetailReference", + "type": "string" + }, + { + "name": "storedPaymentMethodId", + "baseName": "storedPaymentMethodId", + "type": "string" + }, + { + "name": "transferInstrumentId", + "baseName": "transferInstrumentId", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "PaymentRequestPaymentMethod.TypeEnum" + }, + { + "name": "billingAddress", + "baseName": "billingAddress", + "type": "string" + }, + { + "name": "deliveryAddress", + "baseName": "deliveryAddress", + "type": "string" + }, + { + "name": "personalDetails", + "baseName": "personalDetails", + "type": "string" + }, + { + "name": "amazonPayToken", + "baseName": "amazonPayToken", + "type": "string" + }, + { + "name": "checkoutSessionId", + "baseName": "checkoutSessionId", + "type": "string" + }, + { + "name": "beneficiaryId", + "baseName": "beneficiaryId", + "type": "string" + }, + { + "name": "applePayToken", + "baseName": "applePayToken", + "type": "string" + }, + { + "name": "fundingSource", + "baseName": "fundingSource", + "type": "PaymentRequestPaymentMethod.FundingSourceEnum" + }, + { + "name": "holderName", + "baseName": "holderName", + "type": "string" + }, + { + "name": "issuer", + "baseName": "issuer", + "type": "string" + }, + { + "name": "blikCode", + "baseName": "blikCode", + "type": "string" + }, + { + "name": "brand", + "baseName": "brand", + "type": "string" + }, + { + "name": "cupsecureplus_smscode", + "baseName": "cupsecureplus.smscode", + "type": "string" + }, + { + "name": "cvc", + "baseName": "cvc", + "type": "string" + }, + { + "name": "encryptedCard", + "baseName": "encryptedCard", + "type": "string" + }, + { + "name": "encryptedCardNumber", + "baseName": "encryptedCardNumber", + "type": "string" + }, + { + "name": "encryptedExpiryMonth", + "baseName": "encryptedExpiryMonth", + "type": "string" + }, + { + "name": "encryptedExpiryYear", + "baseName": "encryptedExpiryYear", + "type": "string" + }, + { + "name": "encryptedSecurityCode", + "baseName": "encryptedSecurityCode", + "type": "string" + }, + { + "name": "expiryMonth", + "baseName": "expiryMonth", + "type": "string" + }, + { + "name": "expiryYear", + "baseName": "expiryYear", + "type": "string" + }, + { + "name": "fastlaneData", + "baseName": "fastlaneData", + "type": "string" + }, + { + "name": "networkPaymentReference", + "baseName": "networkPaymentReference", + "type": "string" + }, + { + "name": "number", + "baseName": "number", + "type": "string" + }, + { + "name": "shopperNotificationReference", + "baseName": "shopperNotificationReference", + "type": "string" + }, + { + "name": "srcCorrelationId", + "baseName": "srcCorrelationId", + "type": "string" + }, + { + "name": "srcDigitalCardId", + "baseName": "srcDigitalCardId", + "type": "string" + }, + { + "name": "srcScheme", + "baseName": "srcScheme", + "type": "string" + }, + { + "name": "srcTokenReference", + "baseName": "srcTokenReference", + "type": "string" + }, + { + "name": "threeDS2SdkVersion", + "baseName": "threeDS2SdkVersion", + "type": "string" + }, + { + "name": "cashtag", + "baseName": "cashtag", + "type": "string" + }, + { + "name": "customerId", + "baseName": "customerId", + "type": "string" + }, + { + "name": "grantId", + "baseName": "grantId", + "type": "string" + }, + { + "name": "onFileGrantId", + "baseName": "onFileGrantId", + "type": "string" + }, + { + "name": "requestId", + "baseName": "requestId", + "type": "string" + }, + { + "name": "subtype", + "baseName": "subtype", + "type": "string" + }, + { + "name": "firstName", + "baseName": "firstName", + "type": "string" + }, + { + "name": "lastName", + "baseName": "lastName", + "type": "string" + }, + { + "name": "shopperEmail", + "baseName": "shopperEmail", + "type": "string" + }, + { + "name": "telephoneNumber", + "baseName": "telephoneNumber", + "type": "string" + }, + { + "name": "bankCode", + "baseName": "bankCode", + "type": "string" + }, + { + "name": "googlePayCardNetwork", + "baseName": "googlePayCardNetwork", + "type": "string" + }, + { + "name": "googlePayToken", + "baseName": "googlePayToken", + "type": "string" + }, + { + "name": "masterpassTransactionId", + "baseName": "masterpassTransactionId", + "type": "string" + }, + { + "name": "orderID", + "baseName": "orderID", + "type": "string" + }, + { + "name": "payeePreferred", + "baseName": "payeePreferred", + "type": "string" + }, + { + "name": "payerID", + "baseName": "payerID", + "type": "string" + }, + { + "name": "payerSelected", + "baseName": "payerSelected", + "type": "string" + }, + { + "name": "shopperAccountIdentifier", + "baseName": "shopperAccountIdentifier", + "type": "string" + }, + { + "name": "virtualPaymentAddress", + "baseName": "virtualPaymentAddress", + "type": "string" + }, + { + "name": "pixRecurring", + "baseName": "pixRecurring", + "type": "PixRecurring" + }, + { + "name": "bank", + "baseName": "bank", + "type": "string" + }, + { + "name": "clientType", + "baseName": "clientType", + "type": "string" + }, + { + "name": "identification", + "baseName": "identification", + "type": "string" + }, + { + "name": "identificationType", + "baseName": "identificationType", + "type": "string" + }, + { + "name": "deviceFingerprint", + "baseName": "deviceFingerprint", + "type": "string" + }, + { + "name": "iban", + "baseName": "iban", + "type": "string" + }, + { + "name": "samsungPayToken", + "baseName": "samsungPayToken", + "type": "string" + }, + { + "name": "billingSequenceNumber", + "baseName": "billingSequenceNumber", + "type": "string" + }, + { + "name": "appId", + "baseName": "appId", + "type": "string" + }, + { + "name": "visaCheckoutCallId", + "baseName": "visaCheckoutCallId", + "type": "string" + }, + { + "name": "openid", + "baseName": "openid", + "type": "string" + }, + { + "name": "clickAndCollect", + "baseName": "clickAndCollect", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return PaymentRequestPaymentMethod.attributeTypeMap; + } +} + +export namespace PaymentRequestPaymentMethod { + export enum AccountHolderTypeEnum { + Business = 'business', + Personal = 'personal' + } + export enum BankAccountTypeEnum { + Balance = 'balance', + Checking = 'checking', + Deposit = 'deposit', + General = 'general', + Other = 'other', + Payment = 'payment', + Savings = 'savings' + } + export enum TypeEnum { + Ach = 'ach', + AchPlaid = 'ach_plaid', + Affirm = 'affirm', + AfterpayDefault = 'afterpay_default', + Afterpaytouch = 'afterpaytouch', + AfterpayB2b = 'afterpay_b2b', + Clearpay = 'clearpay', + Amazonpay = 'amazonpay', + Ancv = 'ancv', + Androidpay = 'androidpay', + Applepay = 'applepay', + DirectdebitGb = 'directdebit_GB', + BilldeskOnline = 'billdesk_online', + BilldeskWallet = 'billdesk_wallet', + Blik = 'blik', + Bcmc = 'bcmc', + Scheme = 'scheme', + NetworkToken = 'networkToken', + Giftcard = 'giftcard', + Card = 'card', + Clicktopay = 'clicktopay', + Cashapp = 'cashapp', + Cellulant = 'cellulant', + DokuMandiriVa = 'doku_mandiri_va', + DokuCimbVa = 'doku_cimb_va', + DokuDanamonVa = 'doku_danamon_va', + DokuBniVa = 'doku_bni_va', + DokuPermataLiteAtm = 'doku_permata_lite_atm', + DokuBriVa = 'doku_bri_va', + DokuBcaVa = 'doku_bca_va', + DokuAlfamart = 'doku_alfamart', + DokuIndomaret = 'doku_indomaret', + DokuWallet = 'doku_wallet', + DokuOvo = 'doku_ovo', + Dotpay = 'dotpay', + DragonpayEbanking = 'dragonpay_ebanking', + DragonpayOtcBanking = 'dragonpay_otc_banking', + DragonpayOtcNonBanking = 'dragonpay_otc_non_banking', + DragonpayOtcPhilippines = 'dragonpay_otc_philippines', + EbankingFi = 'ebanking_FI', + EcontextSevenEleven = 'econtext_seven_eleven', + EcontextOnline = 'econtext_online', + Econtext = 'econtext', + EcontextStores = 'econtext_stores', + EcontextAtm = 'econtext_atm', + EftDirectdebitCa = 'eft_directdebit_CA', + Fastlane = 'fastlane', + OnlineBankingPl = 'onlineBanking_PL', + Eps = 'eps', + OnlineBankingSk = 'onlineBanking_SK', + OnlineBankingCz = 'onlineBanking_CZ', + Giropay = 'giropay', + Googlepay = 'googlepay', + Ideal = 'ideal', + Klarna = 'klarna', + Klarnapayments = 'klarnapayments', + KlarnapaymentsAccount = 'klarnapayments_account', + KlarnapaymentsB2b = 'klarnapayments_b2b', + KlarnaPaynow = 'klarna_paynow', + KlarnaAccount = 'klarna_account', + KlarnaB2b = 'klarna_b2b', + Masterpass = 'masterpass', + Mbway = 'mbway', + Mobilepay = 'mobilepay', + MolpayEbankingFpxMy = 'molpay_ebanking_fpx_MY', + MolpayEbankingTh = 'molpay_ebanking_TH', + Openinvoice = 'openinvoice', + AfterpayDirectdebit = 'afterpay_directdebit', + AtomePos = 'atome_pos', + PaybybankAisDd = 'paybybank_AIS_DD', + Paybybank = 'paybybank', + Paypal = 'paypal', + Paypay = 'paypay', + Payto = 'payto', + PayuInUpi = 'payu_IN_upi', + Paywithgoogle = 'paywithgoogle', + Alipay = 'alipay', + Multibanco = 'multibanco', + BankTransferIban = 'bankTransfer_IBAN', + Paybright = 'paybright', + Paynow = 'paynow', + AffirmPos = 'affirm_pos', + Trustly = 'trustly', + Trustlyvector = 'trustlyvector', + Oney = 'oney', + Facilypay = 'facilypay', + Facilypay3x = 'facilypay_3x', + Facilypay4x = 'facilypay_4x', + Facilypay6x = 'facilypay_6x', + Facilypay10x = 'facilypay_10x', + Facilypay12x = 'facilypay_12x', + Unionpay = 'unionpay', + KcpBanktransfer = 'kcp_banktransfer', + KcpPayco = 'kcp_payco', + KcpCreditcard = 'kcp_creditcard', + WechatpaySdk = 'wechatpaySDK', + WechatpayQr = 'wechatpayQR', + WechatpayWeb = 'wechatpayWeb', + MolpayBoost = 'molpay_boost', + WalletIn = 'wallet_IN', + PayuInCashcard = 'payu_IN_cashcard', + PayuInNb = 'payu_IN_nb', + UpiQr = 'upi_qr', + Paytm = 'paytm', + MolpayEbankingVn = 'molpay_ebanking_VN', + MolpayEbankingMy = 'molpay_ebanking_MY', + MolpayEbankingDirectMy = 'molpay_ebanking_direct_MY', + Swish = 'swish', + Bizum = 'bizum', + Walley = 'walley', + WalleyB2b = 'walley_b2b', + Alma = 'alma', + Paypo = 'paypo', + Scalapay = 'scalapay', + Scalapay3x = 'scalapay_3x', + Scalapay4x = 'scalapay_4x', + MolpayFpx = 'molpay_fpx', + Konbini = 'konbini', + DirectEbanking = 'directEbanking', + Boletobancario = 'boletobancario', + Neteller = 'neteller', + Paysafecard = 'paysafecard', + Cashticket = 'cashticket', + Ikano = 'ikano', + Karenmillen = 'karenmillen', + Oasis = 'oasis', + Warehouse = 'warehouse', + PrimeiropayBoleto = 'primeiropay_boleto', + Mada = 'mada', + Benefit = 'benefit', + Knet = 'knet', + Omannet = 'omannet', + GopayWallet = 'gopay_wallet', + KcpNaverpay = 'kcp_naverpay', + OnlinebankingIn = 'onlinebanking_IN', + Fawry = 'fawry', + Atome = 'atome', + Moneybookers = 'moneybookers', + Naps = 'naps', + Nordea = 'nordea', + BoletobancarioBradesco = 'boletobancario_bradesco', + BoletobancarioItau = 'boletobancario_itau', + BoletobancarioSantander = 'boletobancario_santander', + BoletobancarioBancodobrasil = 'boletobancario_bancodobrasil', + BoletobancarioHsbc = 'boletobancario_hsbc', + MolpayMaybank2u = 'molpay_maybank2u', + MolpayCimb = 'molpay_cimb', + MolpayRhb = 'molpay_rhb', + MolpayAmb = 'molpay_amb', + MolpayHlb = 'molpay_hlb', + MolpayAffinEpg = 'molpay_affin_epg', + MolpayBankislam = 'molpay_bankislam', + MolpayPublicbank = 'molpay_publicbank', + FpxAgrobank = 'fpx_agrobank', + Touchngo = 'touchngo', + Maybank2uMae = 'maybank2u_mae', + Duitnow = 'duitnow', + Promptpay = 'promptpay', + TwintPos = 'twint_pos', + AlipayHk = 'alipay_hk', + AlipayHkWeb = 'alipay_hk_web', + AlipayHkWap = 'alipay_hk_wap', + AlipayWap = 'alipay_wap', + Balanceplatform = 'balanceplatform', + Pix = 'pix', + PsePayulatam = 'pse_payulatam', + Rakutenpay = 'rakutenpay', + Ratepay = 'ratepay', + RatepayDirectdebit = 'ratepay_directdebit', + Riverty = 'riverty', + RivertyAccount = 'riverty_account', + SepadirectdebitRiverty = 'sepadirectdebit_riverty', + Samsungpay = 'samsungpay', + Sepadirectdebit = 'sepadirectdebit', + SepadirectdebitAmazonpay = 'sepadirectdebit_amazonpay', + BcmcMobile = 'bcmc_mobile', + BcmcMobileQr = 'bcmc_mobile_QR', + BcmcMobileApp = 'bcmc_mobile_app', + MomoWallet = 'momo_wallet', + MomoWalletApp = 'momo_wallet_app', + PaymayaWallet = 'paymaya_wallet', + GrabpaySg = 'grabpay_SG', + GrabpayMy = 'grabpay_MY', + GrabpayTh = 'grabpay_TH', + GrabpayId = 'grabpay_ID', + GrabpayVn = 'grabpay_VN', + GrabpayPh = 'grabpay_PH', + Oxxo = 'oxxo', + Gcash = 'gcash', + Dana = 'dana', + Kakaopay = 'kakaopay', + Truemoney = 'truemoney', + Twint = 'twint', + UpiCollect = 'upi_collect', + UpiIntent = 'upi_intent', + Vipps = 'vipps', + Visacheckout = 'visacheckout', + Wechatpay = 'wechatpay', + WechatpayPos = 'wechatpay_pos', + WechatpayMiniProgram = 'wechatpayMiniProgram', + Zip = 'zip', + ZipPos = 'zip_pos' + } + export enum FundingSourceEnum { + Credit = 'credit', + Debit = 'debit' + } +} diff --git a/src/typings/checkout/paymentResponse.ts b/src/typings/checkout/paymentResponse.ts index 77d6eb839..1f7a290c2 100644 --- a/src/typings/checkout/paymentResponse.ts +++ b/src/typings/checkout/paymentResponse.ts @@ -8,42 +8,31 @@ */ import { Amount } from './amount'; -import { CheckoutAwaitAction } from './checkoutAwaitAction'; -import { CheckoutBankTransferAction } from './checkoutBankTransferAction'; -import { CheckoutDelegatedAuthenticationAction } from './checkoutDelegatedAuthenticationAction'; -import { CheckoutNativeRedirectAction } from './checkoutNativeRedirectAction'; import { CheckoutOrderResponse } from './checkoutOrderResponse'; -import { CheckoutQrCodeAction } from './checkoutQrCodeAction'; -import { CheckoutRedirectAction } from './checkoutRedirectAction'; -import { CheckoutSDKAction } from './checkoutSDKAction'; -import { CheckoutThreeDS2Action } from './checkoutThreeDS2Action'; -import { CheckoutVoucherAction } from './checkoutVoucherAction'; import { FraudResult } from './fraudResult'; +import { PaymentResponseAction } from './paymentResponseAction'; import { ResponsePaymentMethod } from './responsePaymentMethod'; import { ThreeDS2ResponseData } from './threeDS2ResponseData'; import { ThreeDS2Result } from './threeDS2Result'; export class PaymentResponse { - /** - * Action to be taken for completing the payment. - */ - 'action'?: CheckoutAwaitAction | CheckoutBankTransferAction | CheckoutDelegatedAuthenticationAction | CheckoutNativeRedirectAction | CheckoutQrCodeAction | CheckoutRedirectAction | CheckoutSDKAction | CheckoutThreeDS2Action | CheckoutVoucherAction | null; + 'action'?: PaymentResponseAction; /** * Contains additional information about the payment. Some data fields are included only if you select them first: Go to **Customer Area** > **Developers** > **Additional data**. */ 'additionalData'?: { [key: string]: string; }; - 'amount'?: Amount | null; + 'amount'?: Amount; /** * Donation Token containing payment details for Adyen Giving. */ 'donationToken'?: string; - 'fraudResult'?: FraudResult | null; + 'fraudResult'?: FraudResult; /** * The reference to uniquely identify a payment. This reference is used in all communication with you about the payment status. We recommend using a unique value per payment; however, it is not a requirement. If you need to provide multiple references for a transaction, separate them with hyphens (\"-\"). Maximum length: 80 characters. */ 'merchantReference'?: string; - 'order'?: CheckoutOrderResponse | null; - 'paymentMethod'?: ResponsePaymentMethod | null; + 'order'?: CheckoutOrderResponse; + 'paymentMethod'?: ResponsePaymentMethod; /** * Adyen\'s 16-character string reference associated with the transaction/request. This value is globally unique; quote it when communicating with us about this request. > For payment methods that require a redirect or additional action, you will get this value in the `/payments/details` response. */ @@ -60,8 +49,8 @@ export class PaymentResponse { * The result of the payment. For more information, see [Result codes](https://docs.adyen.com/online-payments/payment-result-codes). Possible values: * **AuthenticationFinished** – The payment has been successfully authenticated with 3D Secure 2. Returned for 3D Secure 2 authentication-only transactions. * **AuthenticationNotRequired** – The transaction does not require 3D Secure authentication. Returned for [standalone authentication-only integrations](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only). * **Authorised** – The payment was successfully authorised. This state serves as an indicator to proceed with the delivery of goods and services. This is a final state. * **Cancelled** – Indicates the payment has been cancelled (either by the shopper or the merchant) before processing was completed. This is a final state. * **ChallengeShopper** – The issuer requires further shopper interaction before the payment can be authenticated. Returned for 3D Secure 2 transactions. * **Error** – There was an error when the payment was being processed. The reason is given in the `refusalReason` field. This is a final state. * **IdentifyShopper** – The issuer requires the shopper\'s device fingerprint before the payment can be authenticated. Returned for 3D Secure 2 transactions. * **PartiallyAuthorised** – The payment has been authorised for a partial amount. This happens for card payments when the merchant supports Partial Authorisations and the cardholder has insufficient funds. * **Pending** – Indicates that it is not possible to obtain the final status of the payment. This can happen if the systems providing final status information for the payment are unavailable, or if the shopper needs to take further action to complete the payment. * **PresentToShopper** – Indicates that the response contains additional information that you need to present to a shopper, so that they can use it to complete a payment. * **Received** – Indicates the payment has successfully been received by Adyen, and will be processed. This is the initial state for all payments. * **RedirectShopper** – Indicates the shopper should be redirected to an external web page or app to complete the authorisation. * **Refused** – Indicates the payment was refused. The reason is given in the `refusalReason` field. This is a final state. */ 'resultCode'?: PaymentResponse.ResultCodeEnum; - 'threeDS2ResponseData'?: ThreeDS2ResponseData | null; - 'threeDS2Result'?: ThreeDS2Result | null; + 'threeDS2ResponseData'?: ThreeDS2ResponseData; + 'threeDS2Result'?: ThreeDS2Result; /** * When non-empty, contains a value that you must submit to the `/payments/details` endpoint as `paymentData`. */ @@ -73,7 +62,7 @@ export class PaymentResponse { { "name": "action", "baseName": "action", - "type": "CheckoutAwaitAction | CheckoutBankTransferAction | CheckoutDelegatedAuthenticationAction | CheckoutNativeRedirectAction | CheckoutQrCodeAction | CheckoutRedirectAction | CheckoutSDKAction | CheckoutThreeDS2Action | CheckoutVoucherAction | null" + "type": "PaymentResponseAction" }, { "name": "additionalData", @@ -83,7 +72,7 @@ export class PaymentResponse { { "name": "amount", "baseName": "amount", - "type": "Amount | null" + "type": "Amount" }, { "name": "donationToken", @@ -93,7 +82,7 @@ export class PaymentResponse { { "name": "fraudResult", "baseName": "fraudResult", - "type": "FraudResult | null" + "type": "FraudResult" }, { "name": "merchantReference", @@ -103,12 +92,12 @@ export class PaymentResponse { { "name": "order", "baseName": "order", - "type": "CheckoutOrderResponse | null" + "type": "CheckoutOrderResponse" }, { "name": "paymentMethod", "baseName": "paymentMethod", - "type": "ResponsePaymentMethod | null" + "type": "ResponsePaymentMethod" }, { "name": "pspReference", @@ -133,12 +122,12 @@ export class PaymentResponse { { "name": "threeDS2ResponseData", "baseName": "threeDS2ResponseData", - "type": "ThreeDS2ResponseData | null" + "type": "ThreeDS2ResponseData" }, { "name": "threeDS2Result", "baseName": "threeDS2Result", - "type": "ThreeDS2Result | null" + "type": "ThreeDS2Result" }, { "name": "threeDSPaymentData", @@ -153,19 +142,19 @@ export class PaymentResponse { export namespace PaymentResponse { export enum ResultCodeEnum { - AuthenticationFinished = 'AuthenticationFinished', - AuthenticationNotRequired = 'AuthenticationNotRequired', - Authorised = 'Authorised', - Cancelled = 'Cancelled', - ChallengeShopper = 'ChallengeShopper', - Error = 'Error', - IdentifyShopper = 'IdentifyShopper', - PartiallyAuthorised = 'PartiallyAuthorised', - Pending = 'Pending', - PresentToShopper = 'PresentToShopper', - Received = 'Received', - RedirectShopper = 'RedirectShopper', - Refused = 'Refused', - Success = 'Success' + AuthenticationFinished = 'AuthenticationFinished', + AuthenticationNotRequired = 'AuthenticationNotRequired', + Authorised = 'Authorised', + Cancelled = 'Cancelled', + ChallengeShopper = 'ChallengeShopper', + Error = 'Error', + IdentifyShopper = 'IdentifyShopper', + PartiallyAuthorised = 'PartiallyAuthorised', + Pending = 'Pending', + PresentToShopper = 'PresentToShopper', + Received = 'Received', + RedirectShopper = 'RedirectShopper', + Refused = 'Refused', + Success = 'Success' } } diff --git a/src/typings/checkout/paymentResponseAction.ts b/src/typings/checkout/paymentResponseAction.ts new file mode 100644 index 000000000..d40750301 --- /dev/null +++ b/src/typings/checkout/paymentResponseAction.ts @@ -0,0 +1,354 @@ +/* + * The version of the OpenAPI document: v71 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { Amount } from './amount'; +import { CheckoutAwaitAction } from './checkoutAwaitAction'; +import { CheckoutBankTransferAction } from './checkoutBankTransferAction'; +import { CheckoutDelegatedAuthenticationAction } from './checkoutDelegatedAuthenticationAction'; +import { CheckoutNativeRedirectAction } from './checkoutNativeRedirectAction'; +import { CheckoutQrCodeAction } from './checkoutQrCodeAction'; +import { CheckoutRedirectAction } from './checkoutRedirectAction'; +import { CheckoutSDKAction } from './checkoutSDKAction'; +import { CheckoutThreeDS2Action } from './checkoutThreeDS2Action'; +import { CheckoutVoucherAction } from './checkoutVoucherAction'; + +/** +* Action to be taken for completing the payment. +*/ +export class PaymentResponseAction { + /** + * Encoded payment data. + */ + 'paymentData'?: string; + /** + * Specifies the payment method. + */ + 'paymentMethodType'?: string; + /** + * **await** + */ + 'type': PaymentResponseAction.TypeEnum; + /** + * Specifies the URL to redirect to. + */ + 'url'?: string; + /** + * The account number of the bank transfer. + */ + 'accountNumber'?: string; + /** + * The name of the account holder. + */ + 'beneficiary'?: string; + /** + * The BIC of the IBAN. + */ + 'bic'?: string; + /** + * The URL to download the voucher. + */ + 'downloadUrl'?: string; + /** + * The IBAN of the bank transfer. + */ + 'iban'?: string; + /** + * The voucher reference code. + */ + 'reference'?: string; + /** + * The routing number of the bank transfer. + */ + 'routingNumber'?: string; + /** + * The shopper email. + */ + 'shopperEmail'?: string; + /** + * The sort code of the bank transfer. + */ + 'sortCode'?: string; + 'totalAmount'?: Amount; + /** + * A token needed to authorise a payment. + */ + 'authorisationToken'?: string; + /** + * A token to pass to the 3DS2 Component to get the fingerprint. + */ + 'token'?: string; + /** + * When the redirect URL must be accessed via POST, use this data to post to the redirect URL. + */ + 'data'?: { [key: string]: string; }; + /** + * Specifies the HTTP method, for example GET or POST. + */ + 'method'?: string; + /** + * Native SDK\'s redirect data containing the direct issuer link and state data that must be submitted to the /v1/nativeRedirect/redirectResult. + */ + 'nativeRedirectData'?: string; + /** + * The date time of the voucher expiry. + */ + 'expiresAt'?: string; + /** + * The contents of the QR code as a UTF8 string. + */ + 'qrCodeData'?: string; + /** + * The data to pass to the SDK. + */ + 'sdkData'?: { [key: string]: string; }; + /** + * A subtype of the token. + */ + 'subtype'?: string; + /** + * The voucher alternative reference code. + */ + 'alternativeReference'?: string; + /** + * A collection institution number (store number) for Econtext Pay-Easy ATM. + */ + 'collectionInstitutionNumber'?: string; + /** + * An entity number of Multibanco. + */ + 'entity'?: string; + 'initialAmount'?: Amount; + /** + * The URL to the detailed instructions to make payment using the voucher. + */ + 'instructionsUrl'?: string; + /** + * The issuer of the voucher. + */ + 'issuer'?: string; + /** + * The shopper telephone number (partially masked). + */ + 'maskedTelephoneNumber'?: string; + /** + * The merchant name. + */ + 'merchantName'?: string; + /** + * The merchant reference. + */ + 'merchantReference'?: string; + /** + * A Base64-encoded token containing all properties of the voucher. For iOS, you can use this to pass a voucher to Apple Wallet. + */ + 'passCreationToken'?: string; + /** + * The shopper name. + */ + 'shopperName'?: string; + 'surcharge'?: Amount; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "paymentData", + "baseName": "paymentData", + "type": "string" + }, + { + "name": "paymentMethodType", + "baseName": "paymentMethodType", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "PaymentResponseAction.TypeEnum" + }, + { + "name": "url", + "baseName": "url", + "type": "string" + }, + { + "name": "accountNumber", + "baseName": "accountNumber", + "type": "string" + }, + { + "name": "beneficiary", + "baseName": "beneficiary", + "type": "string" + }, + { + "name": "bic", + "baseName": "bic", + "type": "string" + }, + { + "name": "downloadUrl", + "baseName": "downloadUrl", + "type": "string" + }, + { + "name": "iban", + "baseName": "iban", + "type": "string" + }, + { + "name": "reference", + "baseName": "reference", + "type": "string" + }, + { + "name": "routingNumber", + "baseName": "routingNumber", + "type": "string" + }, + { + "name": "shopperEmail", + "baseName": "shopperEmail", + "type": "string" + }, + { + "name": "sortCode", + "baseName": "sortCode", + "type": "string" + }, + { + "name": "totalAmount", + "baseName": "totalAmount", + "type": "Amount" + }, + { + "name": "authorisationToken", + "baseName": "authorisationToken", + "type": "string" + }, + { + "name": "token", + "baseName": "token", + "type": "string" + }, + { + "name": "data", + "baseName": "data", + "type": "{ [key: string]: string; }" + }, + { + "name": "method", + "baseName": "method", + "type": "string" + }, + { + "name": "nativeRedirectData", + "baseName": "nativeRedirectData", + "type": "string" + }, + { + "name": "expiresAt", + "baseName": "expiresAt", + "type": "string" + }, + { + "name": "qrCodeData", + "baseName": "qrCodeData", + "type": "string" + }, + { + "name": "sdkData", + "baseName": "sdkData", + "type": "{ [key: string]: string; }" + }, + { + "name": "subtype", + "baseName": "subtype", + "type": "string" + }, + { + "name": "alternativeReference", + "baseName": "alternativeReference", + "type": "string" + }, + { + "name": "collectionInstitutionNumber", + "baseName": "collectionInstitutionNumber", + "type": "string" + }, + { + "name": "entity", + "baseName": "entity", + "type": "string" + }, + { + "name": "initialAmount", + "baseName": "initialAmount", + "type": "Amount" + }, + { + "name": "instructionsUrl", + "baseName": "instructionsUrl", + "type": "string" + }, + { + "name": "issuer", + "baseName": "issuer", + "type": "string" + }, + { + "name": "maskedTelephoneNumber", + "baseName": "maskedTelephoneNumber", + "type": "string" + }, + { + "name": "merchantName", + "baseName": "merchantName", + "type": "string" + }, + { + "name": "merchantReference", + "baseName": "merchantReference", + "type": "string" + }, + { + "name": "passCreationToken", + "baseName": "passCreationToken", + "type": "string" + }, + { + "name": "shopperName", + "baseName": "shopperName", + "type": "string" + }, + { + "name": "surcharge", + "baseName": "surcharge", + "type": "Amount" + } ]; + + static getAttributeTypeMap() { + return PaymentResponseAction.attributeTypeMap; + } +} + +export namespace PaymentResponseAction { + export enum TypeEnum { + Await = 'await', + BankTransfer = 'bankTransfer', + DelegatedAuthentication = 'delegatedAuthentication', + NativeRedirect = 'nativeRedirect', + QrCode = 'qrCode', + Redirect = 'redirect', + Sdk = 'sdk', + WechatpaySdk = 'wechatpaySDK', + ThreeDs2 = 'threeDS2', + Voucher = 'voucher' + } +} diff --git a/src/typings/checkout/paymentReversalRequest.ts b/src/typings/checkout/paymentReversalRequest.ts index 569a5c3d2..828f2ec17 100644 --- a/src/typings/checkout/paymentReversalRequest.ts +++ b/src/typings/checkout/paymentReversalRequest.ts @@ -10,7 +10,7 @@ import { ApplicationInfo } from './applicationInfo'; export class PaymentReversalRequest { - 'applicationInfo'?: ApplicationInfo | null; + 'applicationInfo'?: ApplicationInfo; /** * The merchant account that is used to process the payment. */ @@ -26,7 +26,7 @@ export class PaymentReversalRequest { { "name": "applicationInfo", "baseName": "applicationInfo", - "type": "ApplicationInfo | null" + "type": "ApplicationInfo" }, { "name": "merchantAccount", diff --git a/src/typings/checkout/paymentReversalResponse.ts b/src/typings/checkout/paymentReversalResponse.ts index 3534dc508..580fc62a4 100644 --- a/src/typings/checkout/paymentReversalResponse.ts +++ b/src/typings/checkout/paymentReversalResponse.ts @@ -66,6 +66,6 @@ export class PaymentReversalResponse { export namespace PaymentReversalResponse { export enum StatusEnum { - Received = 'received' + Received = 'received' } } diff --git a/src/typings/checkout/paypalUpdateOrderRequest.ts b/src/typings/checkout/paypalUpdateOrderRequest.ts index 494b1d908..bd381de34 100644 --- a/src/typings/checkout/paypalUpdateOrderRequest.ts +++ b/src/typings/checkout/paypalUpdateOrderRequest.ts @@ -12,7 +12,7 @@ import { DeliveryMethod } from './deliveryMethod'; import { TaxTotal } from './taxTotal'; export class PaypalUpdateOrderRequest { - 'amount'?: Amount | null; + 'amount'?: Amount; /** * The list of new delivery methods and the cost of each. */ @@ -29,7 +29,7 @@ export class PaypalUpdateOrderRequest { * The original `sessionId` from the `/sessions` response. */ 'sessionId'?: string; - 'taxTotal'?: TaxTotal | null; + 'taxTotal'?: TaxTotal; static discriminator: string | undefined = undefined; @@ -37,7 +37,7 @@ export class PaypalUpdateOrderRequest { { "name": "amount", "baseName": "amount", - "type": "Amount | null" + "type": "Amount" }, { "name": "deliveryMethods", @@ -62,7 +62,7 @@ export class PaypalUpdateOrderRequest { { "name": "taxTotal", "baseName": "taxTotal", - "type": "TaxTotal | null" + "type": "TaxTotal" } ]; static getAttributeTypeMap() { diff --git a/src/typings/checkout/paypalUpdateOrderResponse.ts b/src/typings/checkout/paypalUpdateOrderResponse.ts index a4c7343ef..72444e28c 100644 --- a/src/typings/checkout/paypalUpdateOrderResponse.ts +++ b/src/typings/checkout/paypalUpdateOrderResponse.ts @@ -39,7 +39,7 @@ export class PaypalUpdateOrderResponse { export namespace PaypalUpdateOrderResponse { export enum StatusEnum { - Error = 'error', - Success = 'success' + Error = 'error', + Success = 'success' } } diff --git a/src/typings/checkout/pixDetails.ts b/src/typings/checkout/pixDetails.ts index 19e7a4fa7..7c71d9dda 100644 --- a/src/typings/checkout/pixDetails.ts +++ b/src/typings/checkout/pixDetails.ts @@ -14,7 +14,7 @@ export class PixDetails { * The checkout attempt identifier. */ 'checkoutAttemptId'?: string; - 'pixRecurring'?: PixRecurring | null; + 'pixRecurring'?: PixRecurring; /** * This is the `recurringDetailReference` returned in the response when you created the token. * @@ -42,7 +42,7 @@ export class PixDetails { { "name": "pixRecurring", "baseName": "pixRecurring", - "type": "PixRecurring | null" + "type": "PixRecurring" }, { "name": "recurringDetailReference", @@ -67,6 +67,6 @@ export class PixDetails { export namespace PixDetails { export enum TypeEnum { - Pix = 'pix' + Pix = 'pix' } } diff --git a/src/typings/checkout/pixRecurring.ts b/src/typings/checkout/pixRecurring.ts index 1c288d45d..8780d99f3 100644 --- a/src/typings/checkout/pixRecurring.ts +++ b/src/typings/checkout/pixRecurring.ts @@ -22,12 +22,12 @@ export class PixRecurring { * The frequency at which the shopper will be charged. */ 'frequency'?: PixRecurring.FrequencyEnum; - 'minAmount'?: Amount | null; + 'minAmount'?: Amount; /** * The pspReference for the failed recurring payment. Find this in AUTHORISATION webhook you received after the billing date. */ 'originalPspReference'?: string; - 'recurringAmount'?: Amount | null; + 'recurringAmount'?: Amount; /** * The text that that will be shown on the shopper\'s bank statement for the recurring payments. We recommend to add a descriptive text about the subscription to let your shoppers recognize your recurring payments. Maximum length: 35 characters. */ @@ -62,7 +62,7 @@ export class PixRecurring { { "name": "minAmount", "baseName": "minAmount", - "type": "Amount | null" + "type": "Amount" }, { "name": "originalPspReference", @@ -72,7 +72,7 @@ export class PixRecurring { { "name": "recurringAmount", "baseName": "recurringAmount", - "type": "Amount | null" + "type": "Amount" }, { "name": "recurringStatement", @@ -97,10 +97,10 @@ export class PixRecurring { export namespace PixRecurring { export enum FrequencyEnum { - Weekly = 'weekly', - Monthly = 'monthly', - Quarterly = 'quarterly', - HalfYearly = 'half-yearly', - Yearly = 'yearly' + Weekly = 'weekly', + Monthly = 'monthly', + Quarterly = 'quarterly', + HalfYearly = 'half-yearly', + Yearly = 'yearly' } } diff --git a/src/typings/checkout/pixStoredPaymentMethod.ts b/src/typings/checkout/pixStoredPaymentMethod.ts new file mode 100644 index 000000000..baa23ed0c --- /dev/null +++ b/src/typings/checkout/pixStoredPaymentMethod.ts @@ -0,0 +1,179 @@ +/* + * The version of the OpenAPI document: v71 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + + +export class PixStoredPaymentMethod { + /** + * The bank account number (without separators). + */ + 'bankAccountNumber'?: string; + /** + * The location id of the bank. The field value is `nil` in most cases. + */ + 'bankLocationId'?: string; + /** + * The brand of the card. + */ + 'brand'?: string; + /** + * The two-digit month when the card expires + */ + 'expiryMonth'?: string; + /** + * The last two digits of the year the card expires. For example, **22** for the year 2022. + */ + 'expiryYear'?: string; + /** + * The unique payment method code. + */ + 'holderName'?: string; + /** + * The IBAN of the bank account. + */ + 'iban'?: string; + /** + * A unique identifier of this stored payment method. + */ + 'id'?: string; + /** + * The shopper’s issuer account label + */ + 'label'?: string; + /** + * The last four digits of the PAN. + */ + 'lastFour'?: string; + /** + * The display name of the stored payment method. + */ + 'name'?: string; + /** + * Returned in the response if you are not tokenizing with Adyen and are using the Merchant-initiated transactions (MIT) framework from Mastercard or Visa. This contains either the Mastercard Trace ID or the Visa Transaction ID. + */ + 'networkTxReference'?: string; + /** + * The name of the bank account holder. + */ + 'ownerName'?: string; + /** + * The shopper’s email address. + */ + 'shopperEmail'?: string; + /** + * The supported recurring processing models for this stored payment method. + */ + 'supportedRecurringProcessingModels'?: Array; + /** + * The supported shopper interactions for this stored payment method. + */ + 'supportedShopperInteractions'?: Array; + /** + * The type of payment method. + */ + 'type'?: PixStoredPaymentMethod.TypeEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "bankAccountNumber", + "baseName": "bankAccountNumber", + "type": "string" + }, + { + "name": "bankLocationId", + "baseName": "bankLocationId", + "type": "string" + }, + { + "name": "brand", + "baseName": "brand", + "type": "string" + }, + { + "name": "expiryMonth", + "baseName": "expiryMonth", + "type": "string" + }, + { + "name": "expiryYear", + "baseName": "expiryYear", + "type": "string" + }, + { + "name": "holderName", + "baseName": "holderName", + "type": "string" + }, + { + "name": "iban", + "baseName": "iban", + "type": "string" + }, + { + "name": "id", + "baseName": "id", + "type": "string" + }, + { + "name": "label", + "baseName": "label", + "type": "string" + }, + { + "name": "lastFour", + "baseName": "lastFour", + "type": "string" + }, + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "networkTxReference", + "baseName": "networkTxReference", + "type": "string" + }, + { + "name": "ownerName", + "baseName": "ownerName", + "type": "string" + }, + { + "name": "shopperEmail", + "baseName": "shopperEmail", + "type": "string" + }, + { + "name": "supportedRecurringProcessingModels", + "baseName": "supportedRecurringProcessingModels", + "type": "Array" + }, + { + "name": "supportedShopperInteractions", + "baseName": "supportedShopperInteractions", + "type": "Array" + }, + { + "name": "type", + "baseName": "type", + "type": "PixStoredPaymentMethod.TypeEnum" + } ]; + + static getAttributeTypeMap() { + return PixStoredPaymentMethod.attributeTypeMap; + } +} + +export namespace PixStoredPaymentMethod { + export enum TypeEnum { + Pix = 'pix' + } +} diff --git a/src/typings/checkout/platformChargebackLogic.ts b/src/typings/checkout/platformChargebackLogic.ts index f05e34152..cb4669795 100644 --- a/src/typings/checkout/platformChargebackLogic.ts +++ b/src/typings/checkout/platformChargebackLogic.ts @@ -48,8 +48,8 @@ export class PlatformChargebackLogic { export namespace PlatformChargebackLogic { export enum BehaviorEnum { - DeductAccordingToSplitRatio = 'deductAccordingToSplitRatio', - DeductFromLiableAccount = 'deductFromLiableAccount', - DeductFromOneBalanceAccount = 'deductFromOneBalanceAccount' + DeductAccordingToSplitRatio = 'deductAccordingToSplitRatio', + DeductFromLiableAccount = 'deductFromLiableAccount', + DeductFromOneBalanceAccount = 'deductFromOneBalanceAccount' } } diff --git a/src/typings/checkout/pseDetails.ts b/src/typings/checkout/pseDetails.ts index 03378c965..1ce91ff74 100644 --- a/src/typings/checkout/pseDetails.ts +++ b/src/typings/checkout/pseDetails.ts @@ -75,6 +75,6 @@ export class PseDetails { export namespace PseDetails { export enum TypeEnum { - PsePayulatam = 'pse_payulatam' + PsePayulatam = 'pse_payulatam' } } diff --git a/src/typings/checkout/rakutenPayDetails.ts b/src/typings/checkout/rakutenPayDetails.ts new file mode 100644 index 000000000..02bba1d5b --- /dev/null +++ b/src/typings/checkout/rakutenPayDetails.ts @@ -0,0 +1,65 @@ +/* + * The version of the OpenAPI document: v71 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + + +export class RakutenPayDetails { + /** + * The checkout attempt identifier. + */ + 'checkoutAttemptId'?: string; + /** + * This is the `recurringDetailReference` returned in the response when you created the token. + * + * @deprecated since Adyen Checkout API v49 + * Use `storedPaymentMethodId` instead. + */ + 'recurringDetailReference'?: string; + /** + * This is the `recurringDetailReference` returned in the response when you created the token. + */ + 'storedPaymentMethodId'?: string; + /** + * **rakutenpay** + */ + 'type'?: RakutenPayDetails.TypeEnum = RakutenPayDetails.TypeEnum.Rakutenpay; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "checkoutAttemptId", + "baseName": "checkoutAttemptId", + "type": "string" + }, + { + "name": "recurringDetailReference", + "baseName": "recurringDetailReference", + "type": "string" + }, + { + "name": "storedPaymentMethodId", + "baseName": "storedPaymentMethodId", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "RakutenPayDetails.TypeEnum" + } ]; + + static getAttributeTypeMap() { + return RakutenPayDetails.attributeTypeMap; + } +} + +export namespace RakutenPayDetails { + export enum TypeEnum { + Rakutenpay = 'rakutenpay' + } +} diff --git a/src/typings/checkout/ratepayDetails.ts b/src/typings/checkout/ratepayDetails.ts index 18849bc0f..04dc2b79b 100644 --- a/src/typings/checkout/ratepayDetails.ts +++ b/src/typings/checkout/ratepayDetails.ts @@ -39,7 +39,7 @@ export class RatepayDetails { /** * **ratepay** */ - 'type': RatepayDetails.TypeEnum; + 'type': RatepayDetails.TypeEnum = RatepayDetails.TypeEnum.Ratepay; static discriminator: string | undefined = undefined; @@ -87,7 +87,7 @@ export class RatepayDetails { export namespace RatepayDetails { export enum TypeEnum { - Ratepay = 'ratepay', - RatepayDirectdebit = 'ratepay_directdebit' + Ratepay = 'ratepay', + RatepayDirectdebit = 'ratepay_directdebit' } } diff --git a/src/typings/checkout/recurring.ts b/src/typings/checkout/recurring.ts index a1eafd4f2..80f5cdba0 100644 --- a/src/typings/checkout/recurring.ts +++ b/src/typings/checkout/recurring.ts @@ -66,14 +66,14 @@ export class Recurring { export namespace Recurring { export enum ContractEnum { - Oneclick = 'ONECLICK', - Recurring = 'RECURRING', - Payout = 'PAYOUT' + Oneclick = 'ONECLICK', + Recurring = 'RECURRING', + Payout = 'PAYOUT' } export enum TokenServiceEnum { - Visatokenservice = 'VISATOKENSERVICE', - Mctokenservice = 'MCTOKENSERVICE', - Amextokenservice = 'AMEXTOKENSERVICE', - TokenSharing = 'TOKEN_SHARING' + Visatokenservice = 'VISATOKENSERVICE', + Mctokenservice = 'MCTOKENSERVICE', + Amextokenservice = 'AMEXTOKENSERVICE', + TokenSharing = 'TOKEN_SHARING' } } diff --git a/src/typings/checkout/responseAdditionalDataCard.ts b/src/typings/checkout/responseAdditionalDataCard.ts index 72c860d6b..11671826c 100644 --- a/src/typings/checkout/responseAdditionalDataCard.ts +++ b/src/typings/checkout/responseAdditionalDataCard.ts @@ -102,16 +102,16 @@ export class ResponseAdditionalDataCard { export namespace ResponseAdditionalDataCard { export enum CardProductIdEnum { - A = 'A', - B = 'B', - C = 'C', - D = 'D', - F = 'F', - Mcc = 'MCC', - Mce = 'MCE', - Mcf = 'MCF', - Mcg = 'MCG', - Mch = 'MCH', - Mci = 'MCI' + A = 'A', + B = 'B', + C = 'C', + D = 'D', + F = 'F', + Mcc = 'MCC', + Mce = 'MCE', + Mcf = 'MCF', + Mcg = 'MCG', + Mch = 'MCH', + Mci = 'MCI' } } diff --git a/src/typings/checkout/responseAdditionalDataCommon.ts b/src/typings/checkout/responseAdditionalDataCommon.ts index ad33282a8..6ebfdf576 100644 --- a/src/typings/checkout/responseAdditionalDataCommon.ts +++ b/src/typings/checkout/responseAdditionalDataCommon.ts @@ -585,17 +585,17 @@ export class ResponseAdditionalDataCommon { export namespace ResponseAdditionalDataCommon { export enum FraudResultTypeEnum { - Green = 'GREEN', - Fraud = 'FRAUD' + Green = 'GREEN', + Fraud = 'FRAUD' } export enum RecurringProcessingModelEnum { - CardOnFile = 'CardOnFile', - Subscription = 'Subscription', - UnscheduledCardOnFile = 'UnscheduledCardOnFile' + CardOnFile = 'CardOnFile', + Subscription = 'Subscription', + UnscheduledCardOnFile = 'UnscheduledCardOnFile' } export enum TokenizationStoreOperationTypeEnum { - Created = 'created', - Updated = 'updated', - AlreadyExisting = 'alreadyExisting' + Created = 'created', + Updated = 'updated', + AlreadyExisting = 'alreadyExisting' } } diff --git a/src/typings/checkout/rivertyDetails.ts b/src/typings/checkout/rivertyDetails.ts index 76df7df0b..8baeb92ee 100644 --- a/src/typings/checkout/rivertyDetails.ts +++ b/src/typings/checkout/rivertyDetails.ts @@ -47,7 +47,7 @@ export class RivertyDetails { /** * **riverty** */ - 'type': RivertyDetails.TypeEnum; + 'type': RivertyDetails.TypeEnum = RivertyDetails.TypeEnum.Riverty; static discriminator: string | undefined = undefined; @@ -105,8 +105,8 @@ export class RivertyDetails { export namespace RivertyDetails { export enum TypeEnum { - Riverty = 'riverty', - RivertyAccount = 'riverty_account', - SepadirectdebitRiverty = 'sepadirectdebit_riverty' + Riverty = 'riverty', + RivertyAccount = 'riverty_account', + SepadirectdebitRiverty = 'sepadirectdebit_riverty' } } diff --git a/src/typings/checkout/samsungPayDetails.ts b/src/typings/checkout/samsungPayDetails.ts index e91316c72..afa4a3eb6 100644 --- a/src/typings/checkout/samsungPayDetails.ts +++ b/src/typings/checkout/samsungPayDetails.ts @@ -35,7 +35,7 @@ export class SamsungPayDetails { /** * **samsungpay** */ - 'type'?: SamsungPayDetails.TypeEnum; + 'type'?: SamsungPayDetails.TypeEnum = SamsungPayDetails.TypeEnum.Samsungpay; static discriminator: string | undefined = undefined; @@ -78,10 +78,10 @@ export class SamsungPayDetails { export namespace SamsungPayDetails { export enum FundingSourceEnum { - Credit = 'credit', - Debit = 'debit' + Credit = 'credit', + Debit = 'debit' } export enum TypeEnum { - Samsungpay = 'samsungpay' + Samsungpay = 'samsungpay' } } diff --git a/src/typings/checkout/sepaDirectDebitDetails.ts b/src/typings/checkout/sepaDirectDebitDetails.ts index 7ce316675..233c3e70f 100644 --- a/src/typings/checkout/sepaDirectDebitDetails.ts +++ b/src/typings/checkout/sepaDirectDebitDetails.ts @@ -39,7 +39,7 @@ export class SepaDirectDebitDetails { /** * **sepadirectdebit** */ - 'type'?: SepaDirectDebitDetails.TypeEnum; + 'type'?: SepaDirectDebitDetails.TypeEnum = SepaDirectDebitDetails.TypeEnum.Sepadirectdebit; static discriminator: string | undefined = undefined; @@ -87,7 +87,7 @@ export class SepaDirectDebitDetails { export namespace SepaDirectDebitDetails { export enum TypeEnum { - Sepadirectdebit = 'sepadirectdebit', - SepadirectdebitAmazonpay = 'sepadirectdebit_amazonpay' + Sepadirectdebit = 'sepadirectdebit', + SepadirectdebitAmazonpay = 'sepadirectdebit_amazonpay' } } diff --git a/src/typings/checkout/sessionResultResponse.ts b/src/typings/checkout/sessionResultResponse.ts index 4508efde4..43ecaa553 100644 --- a/src/typings/checkout/sessionResultResponse.ts +++ b/src/typings/checkout/sessionResultResponse.ts @@ -14,7 +14,7 @@ export class SessionResultResponse { */ 'id'?: string; /** - * The status of the session. The status included in the response doesn\'t get updated. Don\'t make the request again to check for payment status updates. Possible values: * **completed** – The shopper completed the payment. This means that the payment was authorized. * **paymentPending** – The shopper is in the process of making the payment. This applies to payment methods with an asynchronous flow. * **refused** – The session has been refused, due to too many refused payment attempts. Shoppers can no longer complete the payment with this session. * **canceled** – The shopper canceled the payment. * **active** – The session is still active and can be paid. * **expired** – The session expired (default: 1 hour after session creation). Shoppers can no longer complete the payment with this session. + * The status of the session. The status included in the response doesn\'t get updated. Don\'t make the request again to check for payment status updates. Possible values: * **completed**: the shopper completed the payment, and the payment was authorized. * **paymentPending**: the shopper is in the process of making the payment. This applies to payment methods with an asynchronous flow, like voucher payments where the shopper completes the payment in a physical shop. * **refused**: the session has been refused, because of too many refused payment attempts. The shopper can no longer complete the payment with this session. * **canceled**: the shopper canceled the payment. * **expired**: the session expired. The shopper can no longer complete the payment with this session. By default, the session expires one hour after it is created. */ 'status'?: SessionResultResponse.StatusEnum; @@ -39,11 +39,11 @@ export class SessionResultResponse { export namespace SessionResultResponse { export enum StatusEnum { - Active = 'active', - Canceled = 'canceled', - Completed = 'completed', - Expired = 'expired', - PaymentPending = 'paymentPending', - Refused = 'refused' + Active = 'active', + Canceled = 'canceled', + Completed = 'completed', + Expired = 'expired', + PaymentPending = 'paymentPending', + Refused = 'refused' } } diff --git a/src/typings/checkout/split.ts b/src/typings/checkout/split.ts index c4f6ff4de..ffdbee6dc 100644 --- a/src/typings/checkout/split.ts +++ b/src/typings/checkout/split.ts @@ -14,7 +14,7 @@ export class Split { * The unique identifier of the account to which the split amount is booked. Required if `type` is **MarketPlace** or **BalanceAccount**. * [Classic Platforms integration](https://docs.adyen.com/classic-platforms): The [`accountCode`](https://docs.adyen.com/api-explorer/Account/latest/post/updateAccount#request-accountCode) of the account to which the split amount is booked. * [Balance Platform](https://docs.adyen.com/adyen-for-platforms-model): The [`balanceAccountId`](https://docs.adyen.com/api-explorer/balanceplatform/latest/get/balanceAccounts/_id_#path-id) of the account to which the split amount is booked. */ 'account'?: string; - 'amount'?: SplitAmount | null; + 'amount'?: SplitAmount; /** * Your description for the split item. */ @@ -39,7 +39,7 @@ export class Split { { "name": "amount", "baseName": "amount", - "type": "SplitAmount | null" + "type": "SplitAmount" }, { "name": "description", @@ -64,21 +64,21 @@ export class Split { export namespace Split { export enum TypeEnum { - AcquiringFees = 'AcquiringFees', - AdyenCommission = 'AdyenCommission', - AdyenFees = 'AdyenFees', - AdyenMarkup = 'AdyenMarkup', - BalanceAccount = 'BalanceAccount', - Commission = 'Commission', - Default = 'Default', - Interchange = 'Interchange', - MarketPlace = 'MarketPlace', - PaymentFee = 'PaymentFee', - Remainder = 'Remainder', - SchemeFee = 'SchemeFee', - Surcharge = 'Surcharge', - Tip = 'Tip', - TopUp = 'TopUp', - Vat = 'VAT' + AcquiringFees = 'AcquiringFees', + AdyenCommission = 'AdyenCommission', + AdyenFees = 'AdyenFees', + AdyenMarkup = 'AdyenMarkup', + BalanceAccount = 'BalanceAccount', + Commission = 'Commission', + Default = 'Default', + Interchange = 'Interchange', + MarketPlace = 'MarketPlace', + PaymentFee = 'PaymentFee', + Remainder = 'Remainder', + SchemeFee = 'SchemeFee', + Surcharge = 'Surcharge', + Tip = 'Tip', + TopUp = 'TopUp', + Vat = 'VAT' } } diff --git a/src/typings/checkout/standalonePaymentCancelRequest.ts b/src/typings/checkout/standalonePaymentCancelRequest.ts index e27dd56c8..e06245626 100644 --- a/src/typings/checkout/standalonePaymentCancelRequest.ts +++ b/src/typings/checkout/standalonePaymentCancelRequest.ts @@ -10,7 +10,7 @@ import { ApplicationInfo } from './applicationInfo'; export class StandalonePaymentCancelRequest { - 'applicationInfo'?: ApplicationInfo | null; + 'applicationInfo'?: ApplicationInfo; /** * The merchant account that is used to process the payment. */ @@ -30,7 +30,7 @@ export class StandalonePaymentCancelRequest { { "name": "applicationInfo", "baseName": "applicationInfo", - "type": "ApplicationInfo | null" + "type": "ApplicationInfo" }, { "name": "merchantAccount", diff --git a/src/typings/checkout/standalonePaymentCancelResponse.ts b/src/typings/checkout/standalonePaymentCancelResponse.ts index 7a11e57ca..111fdb2d9 100644 --- a/src/typings/checkout/standalonePaymentCancelResponse.ts +++ b/src/typings/checkout/standalonePaymentCancelResponse.ts @@ -66,6 +66,6 @@ export class StandalonePaymentCancelResponse { export namespace StandalonePaymentCancelResponse { export enum StatusEnum { - Received = 'received' + Received = 'received' } } diff --git a/src/typings/checkout/storedPaymentMethod.ts b/src/typings/checkout/storedPaymentMethod.ts index 68075c702..2381f7200 100644 --- a/src/typings/checkout/storedPaymentMethod.ts +++ b/src/typings/checkout/storedPaymentMethod.ts @@ -22,7 +22,7 @@ export class StoredPaymentMethod { */ 'brand'?: string; /** - * The month the card expires. + * The two-digit month when the card expires */ 'expiryMonth'?: string; /** diff --git a/src/typings/checkout/storedPaymentMethodDetails.ts b/src/typings/checkout/storedPaymentMethodDetails.ts index 540c10b00..e1f9224a9 100644 --- a/src/typings/checkout/storedPaymentMethodDetails.ts +++ b/src/typings/checkout/storedPaymentMethodDetails.ts @@ -60,22 +60,22 @@ export class StoredPaymentMethodDetails { export namespace StoredPaymentMethodDetails { export enum TypeEnum { - BcmcMobile = 'bcmc_mobile', - BcmcMobileQr = 'bcmc_mobile_QR', - BcmcMobileApp = 'bcmc_mobile_app', - MomoWallet = 'momo_wallet', - MomoWalletApp = 'momo_wallet_app', - PaymayaWallet = 'paymaya_wallet', - GrabpaySg = 'grabpay_SG', - GrabpayMy = 'grabpay_MY', - GrabpayTh = 'grabpay_TH', - GrabpayId = 'grabpay_ID', - GrabpayVn = 'grabpay_VN', - GrabpayPh = 'grabpay_PH', - Oxxo = 'oxxo', - Gcash = 'gcash', - Dana = 'dana', - Kakaopay = 'kakaopay', - Truemoney = 'truemoney' + BcmcMobile = 'bcmc_mobile', + BcmcMobileQr = 'bcmc_mobile_QR', + BcmcMobileApp = 'bcmc_mobile_app', + MomoWallet = 'momo_wallet', + MomoWalletApp = 'momo_wallet_app', + PaymayaWallet = 'paymaya_wallet', + GrabpaySg = 'grabpay_SG', + GrabpayMy = 'grabpay_MY', + GrabpayTh = 'grabpay_TH', + GrabpayId = 'grabpay_ID', + GrabpayVn = 'grabpay_VN', + GrabpayPh = 'grabpay_PH', + Oxxo = 'oxxo', + Gcash = 'gcash', + Dana = 'dana', + Kakaopay = 'kakaopay', + Truemoney = 'truemoney' } } diff --git a/src/typings/checkout/storedPaymentMethodRequest.ts b/src/typings/checkout/storedPaymentMethodRequest.ts index ff7ae69f3..6202e32ec 100644 --- a/src/typings/checkout/storedPaymentMethodRequest.ts +++ b/src/typings/checkout/storedPaymentMethodRequest.ts @@ -73,8 +73,8 @@ export class StoredPaymentMethodRequest { export namespace StoredPaymentMethodRequest { export enum RecurringProcessingModelEnum { - CardOnFile = 'CardOnFile', - Subscription = 'Subscription', - UnscheduledCardOnFile = 'UnscheduledCardOnFile' + CardOnFile = 'CardOnFile', + Subscription = 'Subscription', + UnscheduledCardOnFile = 'UnscheduledCardOnFile' } } diff --git a/src/typings/checkout/subMerchantInfo.ts b/src/typings/checkout/subMerchantInfo.ts index 1c34670b6..e60dc7339 100644 --- a/src/typings/checkout/subMerchantInfo.ts +++ b/src/typings/checkout/subMerchantInfo.ts @@ -11,8 +11,8 @@ import { Amount } from './amount'; import { BillingAddress } from './billingAddress'; export class SubMerchantInfo { - 'address'?: BillingAddress | null; - 'amount'?: Amount | null; + 'address'?: BillingAddress; + 'amount'?: Amount; /** * Required for transactions performed by registered payment facilitators. The email associated with the sub-merchant\'s account. */ @@ -49,12 +49,12 @@ export class SubMerchantInfo { { "name": "address", "baseName": "address", - "type": "BillingAddress | null" + "type": "BillingAddress" }, { "name": "amount", "baseName": "amount", - "type": "Amount | null" + "type": "Amount" }, { "name": "email", diff --git a/src/typings/checkout/taxTotal.ts b/src/typings/checkout/taxTotal.ts index 4c21fb737..befb398ea 100644 --- a/src/typings/checkout/taxTotal.ts +++ b/src/typings/checkout/taxTotal.ts @@ -10,7 +10,7 @@ import { Amount } from './amount'; export class TaxTotal { - 'amount'?: Amount | null; + 'amount'?: Amount; static discriminator: string | undefined = undefined; @@ -18,7 +18,7 @@ export class TaxTotal { { "name": "amount", "baseName": "amount", - "type": "Amount | null" + "type": "Amount" } ]; static getAttributeTypeMap() { diff --git a/src/typings/checkout/threeDS2RequestData.ts b/src/typings/checkout/threeDS2RequestData.ts index 7aea75458..de74fd3d9 100644 --- a/src/typings/checkout/threeDS2RequestData.ts +++ b/src/typings/checkout/threeDS2RequestData.ts @@ -15,7 +15,7 @@ import { ThreeDSRequestorAuthenticationInfo } from './threeDSRequestorAuthentica import { ThreeDSRequestorPriorAuthenticationInfo } from './threeDSRequestorPriorAuthenticationInfo'; export class ThreeDS2RequestData { - 'acctInfo'?: AcctInfo | null; + 'acctInfo'?: AcctInfo; /** * Indicates the type of account. For example, for a multi-account card product. Length: 2 characters. Allowed values: * **01** — Not applicable * **02** — Credit * **03** — Debit */ @@ -38,7 +38,7 @@ export class ThreeDS2RequestData { * @deprecated since Adyen Checkout API v50 * Use `threeDSAuthenticationOnly` instead. */ - 'authenticationOnly'?: boolean; + 'authenticationOnly'?: boolean = false; /** * Possibility to specify a preference for receiving a challenge from the issuer. Allowed values: * `noPreference` * `requestNoChallenge` * `requestChallenge` * `requestChallengeAsMandate` * @@ -50,8 +50,8 @@ export class ThreeDS2RequestData { * The environment of the shopper. Allowed values: * `app` * `browser` */ 'deviceChannel': string; - 'deviceRenderOptions'?: DeviceRenderOptions | null; - 'homePhone'?: Phone | null; + 'deviceRenderOptions'?: DeviceRenderOptions; + 'homePhone'?: Phone; /** * Required for merchants that have been enrolled for 3D Secure 2 by another party than Adyen, mostly [authentication-only integrations](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only). The `mcc` is a four-digit code with which the previously given `acquirerMerchantID` is registered at the scheme. */ @@ -64,7 +64,7 @@ export class ThreeDS2RequestData { * The `messageVersion` value indicating the 3D Secure 2 protocol version. */ 'messageVersion'?: string; - 'mobilePhone'?: Phone | null; + 'mobilePhone'?: Phone; /** * URL to where the issuer should send the `CRes`. Required if you are not using components for `channel` **Web** or if you are using classic integration `deviceChannel` **browser**. */ @@ -97,11 +97,11 @@ export class ThreeDS2RequestData { * The `sdkEncData` value as received from the 3D Secure 2 SDK. Required for `deviceChannel` set to **app**. */ 'sdkEncData'?: string; - 'sdkEphemPubKey'?: SDKEphemPubKey | null; + 'sdkEphemPubKey'?: SDKEphemPubKey; /** * The maximum amount of time in minutes for the 3D Secure 2 authentication process. Optional and only for `deviceChannel` set to **app**. Defaults to **60** minutes. */ - 'sdkMaxTimeout'?: number; + 'sdkMaxTimeout'?: number = 60; /** * The `sdkReferenceNumber` value as received from the 3D Secure 2 SDK. Only for `deviceChannel` set to **app**. */ @@ -122,7 +122,7 @@ export class ThreeDS2RequestData { * Indicates the type of Authentication request. */ 'threeDSRequestorAuthenticationInd'?: string; - 'threeDSRequestorAuthenticationInfo'?: ThreeDSRequestorAuthenticationInfo | null; + 'threeDSRequestorAuthenticationInfo'?: ThreeDSRequestorAuthenticationInfo; /** * Indicates whether a challenge is requested for this transaction. Possible values: * **01** — No preference * **02** — No challenge requested * **03** — Challenge requested (3DS Requestor preference) * **04** — Challenge requested (Mandate) * **05** — No challenge (transactional risk analysis is already performed) * **06** — Data Only */ @@ -135,7 +135,7 @@ export class ThreeDS2RequestData { * Required for [authentication-only integration](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only) for Visa. Unique 3D Secure requestor name assigned by the Directory Server when you enrol for 3D Secure 2. */ 'threeDSRequestorName'?: string; - 'threeDSRequestorPriorAuthenticationInfo'?: ThreeDSRequestorPriorAuthenticationInfo | null; + 'threeDSRequestorPriorAuthenticationInfo'?: ThreeDSRequestorPriorAuthenticationInfo; /** * URL of the (customer service) website that will be shown to the shopper in case of technical errors during the 3D Secure 2 process. */ @@ -152,7 +152,7 @@ export class ThreeDS2RequestData { * The `whiteListStatus` value returned from a previous 3D Secure 2 transaction, only applicable for 3D Secure 2 protocol version 2.2.0. */ 'whiteListStatus'?: string; - 'workPhone'?: Phone | null; + 'workPhone'?: Phone; static discriminator: string | undefined = undefined; @@ -160,7 +160,7 @@ export class ThreeDS2RequestData { { "name": "acctInfo", "baseName": "acctInfo", - "type": "AcctInfo | null" + "type": "AcctInfo" }, { "name": "acctType", @@ -200,12 +200,12 @@ export class ThreeDS2RequestData { { "name": "deviceRenderOptions", "baseName": "deviceRenderOptions", - "type": "DeviceRenderOptions | null" + "type": "DeviceRenderOptions" }, { "name": "homePhone", "baseName": "homePhone", - "type": "Phone | null" + "type": "Phone" }, { "name": "mcc", @@ -225,7 +225,7 @@ export class ThreeDS2RequestData { { "name": "mobilePhone", "baseName": "mobilePhone", - "type": "Phone | null" + "type": "Phone" }, { "name": "notificationURL", @@ -270,7 +270,7 @@ export class ThreeDS2RequestData { { "name": "sdkEphemPubKey", "baseName": "sdkEphemPubKey", - "type": "SDKEphemPubKey | null" + "type": "SDKEphemPubKey" }, { "name": "sdkMaxTimeout", @@ -305,7 +305,7 @@ export class ThreeDS2RequestData { { "name": "threeDSRequestorAuthenticationInfo", "baseName": "threeDSRequestorAuthenticationInfo", - "type": "ThreeDSRequestorAuthenticationInfo | null" + "type": "ThreeDSRequestorAuthenticationInfo" }, { "name": "threeDSRequestorChallengeInd", @@ -325,7 +325,7 @@ export class ThreeDS2RequestData { { "name": "threeDSRequestorPriorAuthenticationInfo", "baseName": "threeDSRequestorPriorAuthenticationInfo", - "type": "ThreeDSRequestorPriorAuthenticationInfo | null" + "type": "ThreeDSRequestorPriorAuthenticationInfo" }, { "name": "threeDSRequestorURL", @@ -350,7 +350,7 @@ export class ThreeDS2RequestData { { "name": "workPhone", "baseName": "workPhone", - "type": "Phone | null" + "type": "Phone" } ]; static getAttributeTypeMap() { @@ -360,40 +360,40 @@ export class ThreeDS2RequestData { export namespace ThreeDS2RequestData { export enum AcctTypeEnum { - _01 = '01', - _02 = '02', - _03 = '03' + _01 = '01', + _02 = '02', + _03 = '03' } export enum AddrMatchEnum { - Y = 'Y', - N = 'N' + Y = 'Y', + N = 'N' } export enum ChallengeIndicatorEnum { - NoPreference = 'noPreference', - RequestNoChallenge = 'requestNoChallenge', - RequestChallenge = 'requestChallenge', - RequestChallengeAsMandate = 'requestChallengeAsMandate' + NoPreference = 'noPreference', + RequestNoChallenge = 'requestNoChallenge', + RequestChallenge = 'requestChallenge', + RequestChallengeAsMandate = 'requestChallengeAsMandate' } export enum ThreeDSRequestorChallengeIndEnum { - _01 = '01', - _02 = '02', - _03 = '03', - _04 = '04', - _05 = '05', - _06 = '06' + _01 = '01', + _02 = '02', + _03 = '03', + _04 = '04', + _05 = '05', + _06 = '06' } export enum TransTypeEnum { - _01 = '01', - _03 = '03', - _10 = '10', - _11 = '11', - _28 = '28' + _01 = '01', + _03 = '03', + _10 = '10', + _11 = '11', + _28 = '28' } export enum TransactionTypeEnum { - GoodsOrServicePurchase = 'goodsOrServicePurchase', - CheckAcceptance = 'checkAcceptance', - AccountFunding = 'accountFunding', - QuasiCashTransaction = 'quasiCashTransaction', - PrepaidActivationAndLoad = 'prepaidActivationAndLoad' + GoodsOrServicePurchase = 'goodsOrServicePurchase', + CheckAcceptance = 'checkAcceptance', + AccountFunding = 'accountFunding', + QuasiCashTransaction = 'quasiCashTransaction', + PrepaidActivationAndLoad = 'prepaidActivationAndLoad' } } diff --git a/src/typings/checkout/threeDS2RequestFields.ts b/src/typings/checkout/threeDS2RequestFields.ts index 7c9603dcc..8b79993a2 100644 --- a/src/typings/checkout/threeDS2RequestFields.ts +++ b/src/typings/checkout/threeDS2RequestFields.ts @@ -15,7 +15,7 @@ import { ThreeDSRequestorAuthenticationInfo } from './threeDSRequestorAuthentica import { ThreeDSRequestorPriorAuthenticationInfo } from './threeDSRequestorPriorAuthenticationInfo'; export class ThreeDS2RequestFields { - 'acctInfo'?: AcctInfo | null; + 'acctInfo'?: AcctInfo; /** * Indicates the type of account. For example, for a multi-account card product. Length: 2 characters. Allowed values: * **01** — Not applicable * **02** — Credit * **03** — Debit */ @@ -38,7 +38,7 @@ export class ThreeDS2RequestFields { * @deprecated since Adyen Checkout API v50 * Use `threeDSAuthenticationOnly` instead. */ - 'authenticationOnly'?: boolean; + 'authenticationOnly'?: boolean = false; /** * Possibility to specify a preference for receiving a challenge from the issuer. Allowed values: * `noPreference` * `requestNoChallenge` * `requestChallenge` * `requestChallengeAsMandate` * @@ -46,8 +46,8 @@ export class ThreeDS2RequestFields { * Use `threeDSRequestorChallengeInd` instead. */ 'challengeIndicator'?: ThreeDS2RequestFields.ChallengeIndicatorEnum; - 'deviceRenderOptions'?: DeviceRenderOptions | null; - 'homePhone'?: Phone | null; + 'deviceRenderOptions'?: DeviceRenderOptions; + 'homePhone'?: Phone; /** * Required for merchants that have been enrolled for 3D Secure 2 by another party than Adyen, mostly [authentication-only integrations](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only). The `mcc` is a four-digit code with which the previously given `acquirerMerchantID` is registered at the scheme. */ @@ -60,7 +60,7 @@ export class ThreeDS2RequestFields { * The `messageVersion` value indicating the 3D Secure 2 protocol version. */ 'messageVersion'?: string; - 'mobilePhone'?: Phone | null; + 'mobilePhone'?: Phone; /** * URL to where the issuer should send the `CRes`. Required if you are not using components for `channel` **Web** or if you are using classic integration `deviceChannel` **browser**. */ @@ -89,11 +89,11 @@ export class ThreeDS2RequestFields { * The `sdkAppID` value as received from the 3D Secure 2 SDK. */ 'sdkAppID'?: string; - 'sdkEphemPubKey'?: SDKEphemPubKey | null; + 'sdkEphemPubKey'?: SDKEphemPubKey; /** * The maximum amount of time in minutes for the 3D Secure 2 authentication process. Optional and only for `deviceChannel` set to **app**. Defaults to **60** minutes. */ - 'sdkMaxTimeout'?: number; + 'sdkMaxTimeout'?: number = 60; /** * The `sdkReferenceNumber` value as received from the 3D Secure 2 SDK. */ @@ -110,7 +110,7 @@ export class ThreeDS2RequestFields { * Indicates the type of Authentication request. */ 'threeDSRequestorAuthenticationInd'?: string; - 'threeDSRequestorAuthenticationInfo'?: ThreeDSRequestorAuthenticationInfo | null; + 'threeDSRequestorAuthenticationInfo'?: ThreeDSRequestorAuthenticationInfo; /** * Indicates whether a challenge is requested for this transaction. Possible values: * **01** — No preference * **02** — No challenge requested * **03** — Challenge requested (3DS Requestor preference) * **04** — Challenge requested (Mandate) * **05** — No challenge (transactional risk analysis is already performed) * **06** — Data Only */ @@ -123,7 +123,7 @@ export class ThreeDS2RequestFields { * Required for [authentication-only integration](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only) for Visa. Unique 3D Secure requestor name assigned by the Directory Server when you enrol for 3D Secure 2. */ 'threeDSRequestorName'?: string; - 'threeDSRequestorPriorAuthenticationInfo'?: ThreeDSRequestorPriorAuthenticationInfo | null; + 'threeDSRequestorPriorAuthenticationInfo'?: ThreeDSRequestorPriorAuthenticationInfo; /** * URL of the (customer service) website that will be shown to the shopper in case of technical errors during the 3D Secure 2 process. */ @@ -140,7 +140,7 @@ export class ThreeDS2RequestFields { * The `whiteListStatus` value returned from a previous 3D Secure 2 transaction, only applicable for 3D Secure 2 protocol version 2.2.0. */ 'whiteListStatus'?: string; - 'workPhone'?: Phone | null; + 'workPhone'?: Phone; static discriminator: string | undefined = undefined; @@ -148,7 +148,7 @@ export class ThreeDS2RequestFields { { "name": "acctInfo", "baseName": "acctInfo", - "type": "AcctInfo | null" + "type": "AcctInfo" }, { "name": "acctType", @@ -183,12 +183,12 @@ export class ThreeDS2RequestFields { { "name": "deviceRenderOptions", "baseName": "deviceRenderOptions", - "type": "DeviceRenderOptions | null" + "type": "DeviceRenderOptions" }, { "name": "homePhone", "baseName": "homePhone", - "type": "Phone | null" + "type": "Phone" }, { "name": "mcc", @@ -208,7 +208,7 @@ export class ThreeDS2RequestFields { { "name": "mobilePhone", "baseName": "mobilePhone", - "type": "Phone | null" + "type": "Phone" }, { "name": "notificationURL", @@ -248,7 +248,7 @@ export class ThreeDS2RequestFields { { "name": "sdkEphemPubKey", "baseName": "sdkEphemPubKey", - "type": "SDKEphemPubKey | null" + "type": "SDKEphemPubKey" }, { "name": "sdkMaxTimeout", @@ -278,7 +278,7 @@ export class ThreeDS2RequestFields { { "name": "threeDSRequestorAuthenticationInfo", "baseName": "threeDSRequestorAuthenticationInfo", - "type": "ThreeDSRequestorAuthenticationInfo | null" + "type": "ThreeDSRequestorAuthenticationInfo" }, { "name": "threeDSRequestorChallengeInd", @@ -298,7 +298,7 @@ export class ThreeDS2RequestFields { { "name": "threeDSRequestorPriorAuthenticationInfo", "baseName": "threeDSRequestorPriorAuthenticationInfo", - "type": "ThreeDSRequestorPriorAuthenticationInfo | null" + "type": "ThreeDSRequestorPriorAuthenticationInfo" }, { "name": "threeDSRequestorURL", @@ -323,7 +323,7 @@ export class ThreeDS2RequestFields { { "name": "workPhone", "baseName": "workPhone", - "type": "Phone | null" + "type": "Phone" } ]; static getAttributeTypeMap() { @@ -333,40 +333,40 @@ export class ThreeDS2RequestFields { export namespace ThreeDS2RequestFields { export enum AcctTypeEnum { - _01 = '01', - _02 = '02', - _03 = '03' + _01 = '01', + _02 = '02', + _03 = '03' } export enum AddrMatchEnum { - Y = 'Y', - N = 'N' + Y = 'Y', + N = 'N' } export enum ChallengeIndicatorEnum { - NoPreference = 'noPreference', - RequestNoChallenge = 'requestNoChallenge', - RequestChallenge = 'requestChallenge', - RequestChallengeAsMandate = 'requestChallengeAsMandate' + NoPreference = 'noPreference', + RequestNoChallenge = 'requestNoChallenge', + RequestChallenge = 'requestChallenge', + RequestChallengeAsMandate = 'requestChallengeAsMandate' } export enum ThreeDSRequestorChallengeIndEnum { - _01 = '01', - _02 = '02', - _03 = '03', - _04 = '04', - _05 = '05', - _06 = '06' + _01 = '01', + _02 = '02', + _03 = '03', + _04 = '04', + _05 = '05', + _06 = '06' } export enum TransTypeEnum { - _01 = '01', - _03 = '03', - _10 = '10', - _11 = '11', - _28 = '28' + _01 = '01', + _03 = '03', + _10 = '10', + _11 = '11', + _28 = '28' } export enum TransactionTypeEnum { - GoodsOrServicePurchase = 'goodsOrServicePurchase', - CheckAcceptance = 'checkAcceptance', - AccountFunding = 'accountFunding', - QuasiCashTransaction = 'quasiCashTransaction', - PrepaidActivationAndLoad = 'prepaidActivationAndLoad' + GoodsOrServicePurchase = 'goodsOrServicePurchase', + CheckAcceptance = 'checkAcceptance', + AccountFunding = 'accountFunding', + QuasiCashTransaction = 'quasiCashTransaction', + PrepaidActivationAndLoad = 'prepaidActivationAndLoad' } } diff --git a/src/typings/checkout/threeDS2Result.ts b/src/typings/checkout/threeDS2Result.ts index 340059b56..1f4a5b38b 100644 --- a/src/typings/checkout/threeDS2Result.ts +++ b/src/typings/checkout/threeDS2Result.ts @@ -147,26 +147,26 @@ export class ThreeDS2Result { export namespace ThreeDS2Result { export enum ChallengeCancelEnum { - _01 = '01', - _02 = '02', - _03 = '03', - _04 = '04', - _05 = '05', - _06 = '06', - _07 = '07' + _01 = '01', + _02 = '02', + _03 = '03', + _04 = '04', + _05 = '05', + _06 = '06', + _07 = '07' } export enum ExemptionIndicatorEnum { - LowValue = 'lowValue', - SecureCorporate = 'secureCorporate', - TrustedBeneficiary = 'trustedBeneficiary', - TransactionRiskAnalysis = 'transactionRiskAnalysis' + LowValue = 'lowValue', + SecureCorporate = 'secureCorporate', + TrustedBeneficiary = 'trustedBeneficiary', + TransactionRiskAnalysis = 'transactionRiskAnalysis' } export enum ThreeDSRequestorChallengeIndEnum { - _01 = '01', - _02 = '02', - _03 = '03', - _04 = '04', - _05 = '05', - _06 = '06' + _01 = '01', + _02 = '02', + _03 = '03', + _04 = '04', + _05 = '05', + _06 = '06' } } diff --git a/src/typings/checkout/threeDSRequestData.ts b/src/typings/checkout/threeDSRequestData.ts index 68ed8c193..88020e9b5 100644 --- a/src/typings/checkout/threeDSRequestData.ts +++ b/src/typings/checkout/threeDSRequestData.ts @@ -57,22 +57,22 @@ export class ThreeDSRequestData { export namespace ThreeDSRequestData { export enum ChallengeWindowSizeEnum { - _01 = '01', - _02 = '02', - _03 = '03', - _04 = '04', - _05 = '05' + _01 = '01', + _02 = '02', + _03 = '03', + _04 = '04', + _05 = '05' } export enum DataOnlyEnum { - False = 'false', - True = 'true' + False = 'false', + True = 'true' } export enum NativeThreeDSEnum { - Preferred = 'preferred', - Disabled = 'disabled' + Preferred = 'preferred', + Disabled = 'disabled' } export enum ThreeDSVersionEnum { - _10 = '2.1.0', - _20 = '2.2.0' + _210 = '2.1.0', + _220 = '2.2.0' } } diff --git a/src/typings/checkout/threeDSRequestorAuthenticationInfo.ts b/src/typings/checkout/threeDSRequestorAuthenticationInfo.ts index 04153faf2..13b89942d 100644 --- a/src/typings/checkout/threeDSRequestorAuthenticationInfo.ts +++ b/src/typings/checkout/threeDSRequestorAuthenticationInfo.ts @@ -48,11 +48,11 @@ export class ThreeDSRequestorAuthenticationInfo { export namespace ThreeDSRequestorAuthenticationInfo { export enum ThreeDSReqAuthMethodEnum { - _01 = '01', - _02 = '02', - _03 = '03', - _04 = '04', - _05 = '05', - _06 = '06' + _01 = '01', + _02 = '02', + _03 = '03', + _04 = '04', + _05 = '05', + _06 = '06' } } diff --git a/src/typings/checkout/threeDSRequestorPriorAuthenticationInfo.ts b/src/typings/checkout/threeDSRequestorPriorAuthenticationInfo.ts index b91b3834b..0ccce42f0 100644 --- a/src/typings/checkout/threeDSRequestorPriorAuthenticationInfo.ts +++ b/src/typings/checkout/threeDSRequestorPriorAuthenticationInfo.ts @@ -57,9 +57,9 @@ export class ThreeDSRequestorPriorAuthenticationInfo { export namespace ThreeDSRequestorPriorAuthenticationInfo { export enum ThreeDSReqPriorAuthMethodEnum { - _01 = '01', - _02 = '02', - _03 = '03', - _04 = '04' + _01 = '01', + _02 = '02', + _03 = '03', + _04 = '04' } } diff --git a/src/typings/checkout/threeDSecureData.ts b/src/typings/checkout/threeDSecureData.ts index 481c76549..8f108c9f8 100644 --- a/src/typings/checkout/threeDSecureData.ts +++ b/src/typings/checkout/threeDSecureData.ts @@ -129,28 +129,28 @@ export class ThreeDSecureData { export namespace ThreeDSecureData { export enum AuthenticationResponseEnum { - Y = 'Y', - N = 'N', - U = 'U', - A = 'A' + Y = 'Y', + N = 'N', + U = 'U', + A = 'A' } export enum ChallengeCancelEnum { - _01 = '01', - _02 = '02', - _03 = '03', - _04 = '04', - _05 = '05', - _06 = '06', - _07 = '07' + _01 = '01', + _02 = '02', + _03 = '03', + _04 = '04', + _05 = '05', + _06 = '06', + _07 = '07' } export enum DirectoryResponseEnum { - A = 'A', - C = 'C', - D = 'D', - I = 'I', - N = 'N', - R = 'R', - U = 'U', - Y = 'Y' + A = 'A', + C = 'C', + D = 'D', + I = 'I', + N = 'N', + R = 'R', + U = 'U', + Y = 'Y' } } diff --git a/src/typings/checkout/twintDetails.ts b/src/typings/checkout/twintDetails.ts index 090a1ebdc..827f958ff 100644 --- a/src/typings/checkout/twintDetails.ts +++ b/src/typings/checkout/twintDetails.ts @@ -69,6 +69,6 @@ export class TwintDetails { export namespace TwintDetails { export enum TypeEnum { - Twint = 'twint' + Twint = 'twint' } } diff --git a/src/typings/checkout/updatePaymentLinkRequest.ts b/src/typings/checkout/updatePaymentLinkRequest.ts index ce71ba8d1..0f1aeec9e 100644 --- a/src/typings/checkout/updatePaymentLinkRequest.ts +++ b/src/typings/checkout/updatePaymentLinkRequest.ts @@ -30,6 +30,6 @@ export class UpdatePaymentLinkRequest { export namespace UpdatePaymentLinkRequest { export enum StatusEnum { - Expired = 'expired' + Expired = 'expired' } } diff --git a/src/typings/checkout/upiCollectDetails.ts b/src/typings/checkout/upiCollectDetails.ts index dc24c0627..6d709e579 100644 --- a/src/typings/checkout/upiCollectDetails.ts +++ b/src/typings/checkout/upiCollectDetails.ts @@ -35,7 +35,7 @@ export class UpiCollectDetails { /** * **upi_collect** */ - 'type': UpiCollectDetails.TypeEnum; + 'type': UpiCollectDetails.TypeEnum = UpiCollectDetails.TypeEnum.UpiCollect; /** * The virtual payment address for UPI. */ @@ -87,6 +87,6 @@ export class UpiCollectDetails { export namespace UpiCollectDetails { export enum TypeEnum { - UpiCollect = 'upi_collect' + UpiCollect = 'upi_collect' } } diff --git a/src/typings/checkout/upiIntentDetails.ts b/src/typings/checkout/upiIntentDetails.ts index f573aac0f..b2d755c11 100644 --- a/src/typings/checkout/upiIntentDetails.ts +++ b/src/typings/checkout/upiIntentDetails.ts @@ -35,7 +35,7 @@ export class UpiIntentDetails { /** * **upi_intent** */ - 'type': UpiIntentDetails.TypeEnum; + 'type': UpiIntentDetails.TypeEnum = UpiIntentDetails.TypeEnum.UpiIntent; static discriminator: string | undefined = undefined; @@ -78,6 +78,6 @@ export class UpiIntentDetails { export namespace UpiIntentDetails { export enum TypeEnum { - UpiIntent = 'upi_intent' + UpiIntent = 'upi_intent' } } diff --git a/src/typings/checkout/vippsDetails.ts b/src/typings/checkout/vippsDetails.ts index ff3a74998..b0c037a78 100644 --- a/src/typings/checkout/vippsDetails.ts +++ b/src/typings/checkout/vippsDetails.ts @@ -24,11 +24,14 @@ export class VippsDetails { * This is the `recurringDetailReference` returned in the response when you created the token. */ 'storedPaymentMethodId'?: string; + /** + * + */ 'telephoneNumber': string; /** * **vipps** */ - 'type'?: VippsDetails.TypeEnum; + 'type'?: VippsDetails.TypeEnum = VippsDetails.TypeEnum.Vipps; static discriminator: string | undefined = undefined; @@ -66,6 +69,6 @@ export class VippsDetails { export namespace VippsDetails { export enum TypeEnum { - Vipps = 'vipps' + Vipps = 'vipps' } } diff --git a/src/typings/checkout/visaCheckoutDetails.ts b/src/typings/checkout/visaCheckoutDetails.ts index 4879ad237..49668ffad 100644 --- a/src/typings/checkout/visaCheckoutDetails.ts +++ b/src/typings/checkout/visaCheckoutDetails.ts @@ -20,7 +20,7 @@ export class VisaCheckoutDetails { /** * **visacheckout** */ - 'type'?: VisaCheckoutDetails.TypeEnum; + 'type'?: VisaCheckoutDetails.TypeEnum = VisaCheckoutDetails.TypeEnum.Visacheckout; /** * The Visa Click to Pay Call ID value. When your shopper selects a payment and/or a shipping address from Visa Click to Pay, you will receive a Visa Click to Pay Call ID. */ @@ -57,10 +57,10 @@ export class VisaCheckoutDetails { export namespace VisaCheckoutDetails { export enum FundingSourceEnum { - Credit = 'credit', - Debit = 'debit' + Credit = 'credit', + Debit = 'debit' } export enum TypeEnum { - Visacheckout = 'visacheckout' + Visacheckout = 'visacheckout' } } diff --git a/src/typings/checkout/weChatPayDetails.ts b/src/typings/checkout/weChatPayDetails.ts index c82d44fd9..8501e1593 100644 --- a/src/typings/checkout/weChatPayDetails.ts +++ b/src/typings/checkout/weChatPayDetails.ts @@ -16,7 +16,7 @@ export class WeChatPayDetails { /** * **wechatpay** */ - 'type'?: WeChatPayDetails.TypeEnum; + 'type'?: WeChatPayDetails.TypeEnum = WeChatPayDetails.TypeEnum.Wechatpay; static discriminator: string | undefined = undefined; @@ -39,7 +39,7 @@ export class WeChatPayDetails { export namespace WeChatPayDetails { export enum TypeEnum { - Wechatpay = 'wechatpay', - WechatpayPos = 'wechatpay_pos' + Wechatpay = 'wechatpay', + WechatpayPos = 'wechatpay_pos' } } diff --git a/src/typings/checkout/weChatPayMiniProgramDetails.ts b/src/typings/checkout/weChatPayMiniProgramDetails.ts index 14c1e29cf..f258886c7 100644 --- a/src/typings/checkout/weChatPayMiniProgramDetails.ts +++ b/src/typings/checkout/weChatPayMiniProgramDetails.ts @@ -18,7 +18,7 @@ export class WeChatPayMiniProgramDetails { /** * **wechatpayMiniProgram** */ - 'type'?: WeChatPayMiniProgramDetails.TypeEnum; + 'type'?: WeChatPayMiniProgramDetails.TypeEnum = WeChatPayMiniProgramDetails.TypeEnum.WechatpayMiniProgram; static discriminator: string | undefined = undefined; @@ -51,6 +51,6 @@ export class WeChatPayMiniProgramDetails { export namespace WeChatPayMiniProgramDetails { export enum TypeEnum { - WechatpayMiniProgram = 'wechatpayMiniProgram' + WechatpayMiniProgram = 'wechatpayMiniProgram' } } diff --git a/src/typings/checkout/zipDetails.ts b/src/typings/checkout/zipDetails.ts index 71e523c7d..4b3c7b6b0 100644 --- a/src/typings/checkout/zipDetails.ts +++ b/src/typings/checkout/zipDetails.ts @@ -31,7 +31,7 @@ export class ZipDetails { /** * **zip** */ - 'type'?: ZipDetails.TypeEnum; + 'type'?: ZipDetails.TypeEnum = ZipDetails.TypeEnum.Zip; static discriminator: string | undefined = undefined; @@ -69,7 +69,7 @@ export class ZipDetails { export namespace ZipDetails { export enum TypeEnum { - Zip = 'zip', - ZipPos = 'zip_pos' + Zip = 'zip', + ZipPos = 'zip_pos' } } diff --git a/src/typings/configurationWebhooks/accountHolder.ts b/src/typings/configurationWebhooks/accountHolder.ts index e9f475128..2526ad5ac 100644 --- a/src/typings/configurationWebhooks/accountHolder.ts +++ b/src/typings/configurationWebhooks/accountHolder.ts @@ -23,7 +23,7 @@ export class AccountHolder { /** * @deprecated */ - 'contactDetails'?: ContactDetails | null; + 'contactDetails'?: ContactDetails; /** * Your description for the account holder. */ @@ -81,7 +81,7 @@ export class AccountHolder { { "name": "contactDetails", "baseName": "contactDetails", - "type": "ContactDetails | null" + "type": "ContactDetails" }, { "name": "description", @@ -141,8 +141,8 @@ export class AccountHolder { export namespace AccountHolder { export enum StatusEnum { - Active = 'active', - Closed = 'closed', - Suspended = 'suspended' + Active = 'active', + Closed = 'closed', + Suspended = 'suspended' } } diff --git a/src/typings/configurationWebhooks/accountHolderCapability.ts b/src/typings/configurationWebhooks/accountHolderCapability.ts index eaccb94ae..4496a3b55 100644 --- a/src/typings/configurationWebhooks/accountHolderCapability.ts +++ b/src/typings/configurationWebhooks/accountHolderCapability.ts @@ -20,7 +20,7 @@ export class AccountHolderCapability { * The capability level that is allowed for the account holder. Possible values: **notApplicable**, **low**, **medium**, **high**. */ 'allowedLevel'?: AccountHolderCapability.AllowedLevelEnum; - 'allowedSettings'?: CapabilitySettings | null; + 'allowedSettings'?: CapabilitySettings; /** * Indicates whether the capability is enabled. If **false**, the capability is temporarily disabled for the account holder. */ @@ -37,7 +37,7 @@ export class AccountHolderCapability { * The requested level of the capability. Some capabilities, such as those used in [card issuing](https://docs.adyen.com/issuing/add-capabilities#capability-levels), have different levels. Levels increase the capability, but also require additional checks and increased monitoring. Possible values: **notApplicable**, **low**, **medium**, **high**. */ 'requestedLevel'?: AccountHolderCapability.RequestedLevelEnum; - 'requestedSettings'?: CapabilitySettings | null; + 'requestedSettings'?: CapabilitySettings; /** * Contains the status of the transfer instruments associated with this capability. */ @@ -63,7 +63,7 @@ export class AccountHolderCapability { { "name": "allowedSettings", "baseName": "allowedSettings", - "type": "CapabilitySettings | null" + "type": "CapabilitySettings" }, { "name": "enabled", @@ -88,7 +88,7 @@ export class AccountHolderCapability { { "name": "requestedSettings", "baseName": "requestedSettings", - "type": "CapabilitySettings | null" + "type": "CapabilitySettings" }, { "name": "transferInstruments", @@ -108,21 +108,21 @@ export class AccountHolderCapability { export namespace AccountHolderCapability { export enum AllowedLevelEnum { - High = 'high', - Low = 'low', - Medium = 'medium', - NotApplicable = 'notApplicable' + High = 'high', + Low = 'low', + Medium = 'medium', + NotApplicable = 'notApplicable' } export enum RequestedLevelEnum { - High = 'high', - Low = 'low', - Medium = 'medium', - NotApplicable = 'notApplicable' + High = 'high', + Low = 'low', + Medium = 'medium', + NotApplicable = 'notApplicable' } export enum VerificationStatusEnum { - Invalid = 'invalid', - Pending = 'pending', - Rejected = 'rejected', - Valid = 'valid' + Invalid = 'invalid', + Pending = 'pending', + Rejected = 'rejected', + Valid = 'valid' } } diff --git a/src/typings/configurationWebhooks/accountHolderNotificationData.ts b/src/typings/configurationWebhooks/accountHolderNotificationData.ts index b2146fa35..d1691173e 100644 --- a/src/typings/configurationWebhooks/accountHolderNotificationData.ts +++ b/src/typings/configurationWebhooks/accountHolderNotificationData.ts @@ -10,7 +10,7 @@ import { AccountHolder } from './accountHolder'; export class AccountHolderNotificationData { - 'accountHolder'?: AccountHolder | null; + 'accountHolder'?: AccountHolder; /** * The unique identifier of the balance platform. */ @@ -22,7 +22,7 @@ export class AccountHolderNotificationData { { "name": "accountHolder", "baseName": "accountHolder", - "type": "AccountHolder | null" + "type": "AccountHolder" }, { "name": "balancePlatform", diff --git a/src/typings/configurationWebhooks/accountHolderNotificationRequest.ts b/src/typings/configurationWebhooks/accountHolderNotificationRequest.ts index 4982c72c0..c84aa2326 100644 --- a/src/typings/configurationWebhooks/accountHolderNotificationRequest.ts +++ b/src/typings/configurationWebhooks/accountHolderNotificationRequest.ts @@ -55,7 +55,7 @@ export class AccountHolderNotificationRequest { export namespace AccountHolderNotificationRequest { export enum TypeEnum { - Updated = 'balancePlatform.accountHolder.updated', - Created = 'balancePlatform.accountHolder.created' + BalancePlatformAccountHolderUpdated = 'balancePlatform.accountHolder.updated', + BalancePlatformAccountHolderCreated = 'balancePlatform.accountHolder.created' } } diff --git a/src/typings/configurationWebhooks/accountSupportingEntityCapability.ts b/src/typings/configurationWebhooks/accountSupportingEntityCapability.ts index ce3dd89dc..8d82054e8 100644 --- a/src/typings/configurationWebhooks/accountSupportingEntityCapability.ts +++ b/src/typings/configurationWebhooks/accountSupportingEntityCapability.ts @@ -84,21 +84,21 @@ export class AccountSupportingEntityCapability { export namespace AccountSupportingEntityCapability { export enum AllowedLevelEnum { - High = 'high', - Low = 'low', - Medium = 'medium', - NotApplicable = 'notApplicable' + High = 'high', + Low = 'low', + Medium = 'medium', + NotApplicable = 'notApplicable' } export enum RequestedLevelEnum { - High = 'high', - Low = 'low', - Medium = 'medium', - NotApplicable = 'notApplicable' + High = 'high', + Low = 'low', + Medium = 'medium', + NotApplicable = 'notApplicable' } export enum VerificationStatusEnum { - Invalid = 'invalid', - Pending = 'pending', - Rejected = 'rejected', - Valid = 'valid' + Invalid = 'invalid', + Pending = 'pending', + Rejected = 'rejected', + Valid = 'valid' } } diff --git a/src/typings/configurationWebhooks/authentication.ts b/src/typings/configurationWebhooks/authentication.ts index 843cf933c..0a6a62203 100644 --- a/src/typings/configurationWebhooks/authentication.ts +++ b/src/typings/configurationWebhooks/authentication.ts @@ -18,7 +18,7 @@ export class Authentication { * The password used for 3D Secure password-based authentication. The value must be between 1 to 30 characters and must only contain the following supported characters. * Characters between **a-z**, **A-Z**, and **0-9** * Special characters: **äöüßÄÖÜ+-*_/ç%()=?!~#\'\",;:$&àùòâôûáúó** */ 'password'?: string; - 'phone'?: Phone | null; + 'phone'?: Phone; static discriminator: string | undefined = undefined; @@ -36,7 +36,7 @@ export class Authentication { { "name": "phone", "baseName": "phone", - "type": "Phone | null" + "type": "Phone" } ]; static getAttributeTypeMap() { diff --git a/src/typings/configurationWebhooks/balanceAccount.ts b/src/typings/configurationWebhooks/balanceAccount.ts index 6fcb17368..ea874bdf0 100644 --- a/src/typings/configurationWebhooks/balanceAccount.ts +++ b/src/typings/configurationWebhooks/balanceAccount.ts @@ -39,7 +39,7 @@ export class BalanceAccount { * The unique identifier of the account of the migrated account holder in the classic integration. */ 'migratedAccountCode'?: string; - 'platformPaymentConfiguration'?: PlatformPaymentConfiguration | null; + 'platformPaymentConfiguration'?: PlatformPaymentConfiguration; /** * Your reference for the balance account, maximum 150 characters. */ @@ -94,7 +94,7 @@ export class BalanceAccount { { "name": "platformPaymentConfiguration", "baseName": "platformPaymentConfiguration", - "type": "PlatformPaymentConfiguration | null" + "type": "PlatformPaymentConfiguration" }, { "name": "reference", @@ -119,9 +119,9 @@ export class BalanceAccount { export namespace BalanceAccount { export enum StatusEnum { - Active = 'active', - Closed = 'closed', - Inactive = 'inactive', - Suspended = 'suspended' + Active = 'active', + Closed = 'closed', + Inactive = 'inactive', + Suspended = 'suspended' } } diff --git a/src/typings/configurationWebhooks/balanceAccountNotificationData.ts b/src/typings/configurationWebhooks/balanceAccountNotificationData.ts index 824ed6abb..2856c0c65 100644 --- a/src/typings/configurationWebhooks/balanceAccountNotificationData.ts +++ b/src/typings/configurationWebhooks/balanceAccountNotificationData.ts @@ -10,7 +10,7 @@ import { BalanceAccount } from './balanceAccount'; export class BalanceAccountNotificationData { - 'balanceAccount'?: BalanceAccount | null; + 'balanceAccount'?: BalanceAccount; /** * The unique identifier of the balance platform. */ @@ -22,7 +22,7 @@ export class BalanceAccountNotificationData { { "name": "balanceAccount", "baseName": "balanceAccount", - "type": "BalanceAccount | null" + "type": "BalanceAccount" }, { "name": "balancePlatform", diff --git a/src/typings/configurationWebhooks/balanceAccountNotificationRequest.ts b/src/typings/configurationWebhooks/balanceAccountNotificationRequest.ts index 5576df18b..d8a0abf06 100644 --- a/src/typings/configurationWebhooks/balanceAccountNotificationRequest.ts +++ b/src/typings/configurationWebhooks/balanceAccountNotificationRequest.ts @@ -55,7 +55,7 @@ export class BalanceAccountNotificationRequest { export namespace BalanceAccountNotificationRequest { export enum TypeEnum { - Updated = 'balancePlatform.balanceAccount.updated', - Created = 'balancePlatform.balanceAccount.created' + BalancePlatformBalanceAccountUpdated = 'balancePlatform.balanceAccount.updated', + BalancePlatformBalanceAccountCreated = 'balancePlatform.balanceAccount.created' } } diff --git a/src/typings/configurationWebhooks/bankAccountDetails.ts b/src/typings/configurationWebhooks/bankAccountDetails.ts index bbd62559b..d205db499 100644 --- a/src/typings/configurationWebhooks/bankAccountDetails.ts +++ b/src/typings/configurationWebhooks/bankAccountDetails.ts @@ -16,7 +16,7 @@ export class BankAccountDetails { /** * The bank account type. Possible values: **checking** or **savings**. Defaults to **checking**. */ - 'accountType'?: string; + 'accountType'?: string = 'checking'; /** * The bank account branch number, without separators or whitespace */ @@ -24,7 +24,7 @@ export class BankAccountDetails { /** * Business accounts with a `formFactor` value of **physical** are business accounts issued under the central bank of that country. The default value is **physical** for NL, US, and UK business accounts. Adyen creates a local IBAN for business accounts when the `formFactor` value is set to **virtual**. The local IBANs that are supported are for DE and FR, which reference a physical NL account, with funds being routed through the central bank of NL. */ - 'formFactor'?: string; + 'formFactor'?: string = 'physical'; /** * The international bank account number as defined in the [ISO-13616](https://www.iso.org/standard/81090.html) standard. */ @@ -40,7 +40,7 @@ export class BankAccountDetails { /** * **iban** or **usLocal** or **ukLocal** */ - 'type': string; + 'type': string = 'iban'; static discriminator: string | undefined = undefined; diff --git a/src/typings/configurationWebhooks/capabilityProblem.ts b/src/typings/configurationWebhooks/capabilityProblem.ts index 41cd5fe6c..539cda4dc 100644 --- a/src/typings/configurationWebhooks/capabilityProblem.ts +++ b/src/typings/configurationWebhooks/capabilityProblem.ts @@ -11,7 +11,7 @@ import { CapabilityProblemEntity } from './capabilityProblemEntity'; import { VerificationError } from './verificationError'; export class CapabilityProblem { - 'entity'?: CapabilityProblemEntity | null; + 'entity'?: CapabilityProblemEntity; /** * Contains information about the verification error. */ @@ -23,7 +23,7 @@ export class CapabilityProblem { { "name": "entity", "baseName": "entity", - "type": "CapabilityProblemEntity | null" + "type": "CapabilityProblemEntity" }, { "name": "verificationErrors", diff --git a/src/typings/configurationWebhooks/capabilityProblemEntity.ts b/src/typings/configurationWebhooks/capabilityProblemEntity.ts index b022a757f..2b1bbadba 100644 --- a/src/typings/configurationWebhooks/capabilityProblemEntity.ts +++ b/src/typings/configurationWebhooks/capabilityProblemEntity.ts @@ -18,7 +18,7 @@ export class CapabilityProblemEntity { * The ID of the entity. */ 'id'?: string; - 'owner'?: CapabilityProblemEntityRecursive | null; + 'owner'?: CapabilityProblemEntityRecursive; /** * Type of entity. Possible values: **LegalEntity**, **BankAccount**, **Document**. */ @@ -40,7 +40,7 @@ export class CapabilityProblemEntity { { "name": "owner", "baseName": "owner", - "type": "CapabilityProblemEntityRecursive | null" + "type": "CapabilityProblemEntityRecursive" }, { "name": "type", @@ -55,8 +55,8 @@ export class CapabilityProblemEntity { export namespace CapabilityProblemEntity { export enum TypeEnum { - BankAccount = 'BankAccount', - Document = 'Document', - LegalEntity = 'LegalEntity' + BankAccount = 'BankAccount', + Document = 'Document', + LegalEntity = 'LegalEntity' } } diff --git a/src/typings/configurationWebhooks/capabilityProblemEntityRecursive.ts b/src/typings/configurationWebhooks/capabilityProblemEntityRecursive.ts index 6280b7e7b..01e787cdf 100644 --- a/src/typings/configurationWebhooks/capabilityProblemEntityRecursive.ts +++ b/src/typings/configurationWebhooks/capabilityProblemEntityRecursive.ts @@ -48,8 +48,8 @@ export class CapabilityProblemEntityRecursive { export namespace CapabilityProblemEntityRecursive { export enum TypeEnum { - BankAccount = 'BankAccount', - Document = 'Document', - LegalEntity = 'LegalEntity' + BankAccount = 'BankAccount', + Document = 'Document', + LegalEntity = 'LegalEntity' } } diff --git a/src/typings/configurationWebhooks/capabilitySettings.ts b/src/typings/configurationWebhooks/capabilitySettings.ts index 4a1bd904a..4ca74aca7 100644 --- a/src/typings/configurationWebhooks/capabilitySettings.ts +++ b/src/typings/configurationWebhooks/capabilitySettings.ts @@ -10,11 +10,23 @@ import { Amount } from './amount'; export class CapabilitySettings { + /** + * + */ 'amountPerIndustry'?: { [key: string]: Amount; }; + /** + * + */ 'authorizedCardUsers'?: boolean; + /** + * + */ 'fundingSource'?: Array; + /** + * + */ 'interval'?: CapabilitySettings.IntervalEnum; - 'maxAmount'?: Amount | null; + 'maxAmount'?: Amount; static discriminator: string | undefined = undefined; @@ -42,7 +54,7 @@ export class CapabilitySettings { { "name": "maxAmount", "baseName": "maxAmount", - "type": "Amount | null" + "type": "Amount" } ]; static getAttributeTypeMap() { @@ -52,13 +64,13 @@ export class CapabilitySettings { export namespace CapabilitySettings { export enum FundingSourceEnum { - Credit = 'credit', - Debit = 'debit', - Prepaid = 'prepaid' + Credit = 'credit', + Debit = 'debit', + Prepaid = 'prepaid' } export enum IntervalEnum { - Daily = 'daily', - Monthly = 'monthly', - Weekly = 'weekly' + Daily = 'daily', + Monthly = 'monthly', + Weekly = 'weekly' } } diff --git a/src/typings/configurationWebhooks/card.ts b/src/typings/configurationWebhooks/card.ts index 2d386cbda..bdbc5fe76 100644 --- a/src/typings/configurationWebhooks/card.ts +++ b/src/typings/configurationWebhooks/card.ts @@ -13,7 +13,7 @@ import { DeliveryContact } from './deliveryContact'; import { Expiry } from './expiry'; export class Card { - 'authentication'?: Authentication | null; + 'authentication'?: Authentication; /** * The bank identification number (BIN) of the card number. */ @@ -30,13 +30,13 @@ export class Card { * The name of the cardholder. Maximum length: 26 characters. */ 'cardholderName': string; - 'configuration'?: CardConfiguration | null; + 'configuration'?: CardConfiguration; /** * The CVC2 value of the card. > The CVC2 is not sent by default. This is only returned in the `POST` response for single-use virtual cards. */ 'cvc'?: string; - 'deliveryContact'?: DeliveryContact | null; - 'expiration'?: Expiry | null; + 'deliveryContact'?: DeliveryContact; + 'expiration'?: Expiry; /** * The form factor of the card. Possible values: **virtual**, **physical**. */ @@ -60,7 +60,7 @@ export class Card { { "name": "authentication", "baseName": "authentication", - "type": "Authentication | null" + "type": "Authentication" }, { "name": "bin", @@ -85,7 +85,7 @@ export class Card { { "name": "configuration", "baseName": "configuration", - "type": "CardConfiguration | null" + "type": "CardConfiguration" }, { "name": "cvc", @@ -95,12 +95,12 @@ export class Card { { "name": "deliveryContact", "baseName": "deliveryContact", - "type": "DeliveryContact | null" + "type": "DeliveryContact" }, { "name": "expiration", "baseName": "expiration", - "type": "Expiry | null" + "type": "Expiry" }, { "name": "formFactor", @@ -130,8 +130,8 @@ export class Card { export namespace Card { export enum FormFactorEnum { - Physical = 'physical', - Unknown = 'unknown', - Virtual = 'virtual' + Physical = 'physical', + Unknown = 'unknown', + Virtual = 'virtual' } } diff --git a/src/typings/configurationWebhooks/cardConfiguration.ts b/src/typings/configurationWebhooks/cardConfiguration.ts index 79d7502dd..833894ecf 100644 --- a/src/typings/configurationWebhooks/cardConfiguration.ts +++ b/src/typings/configurationWebhooks/cardConfiguration.ts @@ -18,7 +18,7 @@ export class CardConfiguration { * Your app\'s URL, if you want to activate cards through your app. For example, **my-app://ref1236a7d**. A QR code is created based on this URL, and is included in the carrier. Before you use this field, reach out to your Adyen contact to set up the QR code process. Maximum length: 255 characters. */ 'activationUrl'?: string; - 'bulkAddress'?: BulkAddress | null; + 'bulkAddress'?: BulkAddress; /** * The ID of the card image. This is the image that will be printed on the full front of the card. */ @@ -80,7 +80,7 @@ export class CardConfiguration { { "name": "bulkAddress", "baseName": "bulkAddress", - "type": "BulkAddress | null" + "type": "BulkAddress" }, { "name": "cardImageId", diff --git a/src/typings/configurationWebhooks/cardOrderItem.ts b/src/typings/configurationWebhooks/cardOrderItem.ts index 2d6cd1223..0cafa4c38 100644 --- a/src/typings/configurationWebhooks/cardOrderItem.ts +++ b/src/typings/configurationWebhooks/cardOrderItem.ts @@ -14,7 +14,7 @@ export class CardOrderItem { * The unique identifier of the balance platform. */ 'balancePlatform'?: string; - 'card'?: CardOrderItemDeliveryStatus | null; + 'card'?: CardOrderItemDeliveryStatus; /** * The unique identifier of the card order item. */ @@ -31,7 +31,7 @@ export class CardOrderItem { * The unique identifier of the payment instrument related to the card order item. */ 'paymentInstrumentId'?: string; - 'pin'?: CardOrderItemDeliveryStatus | null; + 'pin'?: CardOrderItemDeliveryStatus; /** * The shipping method used to deliver the card or the PIN. */ @@ -48,7 +48,7 @@ export class CardOrderItem { { "name": "card", "baseName": "card", - "type": "CardOrderItemDeliveryStatus | null" + "type": "CardOrderItemDeliveryStatus" }, { "name": "cardOrderItemId", @@ -73,7 +73,7 @@ export class CardOrderItem { { "name": "pin", "baseName": "pin", - "type": "CardOrderItemDeliveryStatus | null" + "type": "CardOrderItemDeliveryStatus" }, { "name": "shippingMethod", diff --git a/src/typings/configurationWebhooks/cardOrderItemDeliveryStatus.ts b/src/typings/configurationWebhooks/cardOrderItemDeliveryStatus.ts index fe077645f..7f780c049 100644 --- a/src/typings/configurationWebhooks/cardOrderItemDeliveryStatus.ts +++ b/src/typings/configurationWebhooks/cardOrderItemDeliveryStatus.ts @@ -48,13 +48,13 @@ export class CardOrderItemDeliveryStatus { export namespace CardOrderItemDeliveryStatus { export enum StatusEnum { - Created = 'created', - Delivered = 'delivered', - NotApplicable = 'notApplicable', - Processing = 'processing', - Produced = 'produced', - Rejected = 'rejected', - Shipped = 'shipped', - Unknown = 'unknown' + Created = 'created', + Delivered = 'delivered', + NotApplicable = 'notApplicable', + Processing = 'processing', + Produced = 'produced', + Rejected = 'rejected', + Shipped = 'shipped', + Unknown = 'unknown' } } diff --git a/src/typings/configurationWebhooks/cardOrderNotificationRequest.ts b/src/typings/configurationWebhooks/cardOrderNotificationRequest.ts index b47aa3fb8..7eb9e92dd 100644 --- a/src/typings/configurationWebhooks/cardOrderNotificationRequest.ts +++ b/src/typings/configurationWebhooks/cardOrderNotificationRequest.ts @@ -55,7 +55,7 @@ export class CardOrderNotificationRequest { export namespace CardOrderNotificationRequest { export enum TypeEnum { - Created = 'balancePlatform.cardorder.created', - Updated = 'balancePlatform.cardorder.updated' + BalancePlatformCardorderCreated = 'balancePlatform.cardorder.created', + BalancePlatformCardorderUpdated = 'balancePlatform.cardorder.updated' } } diff --git a/src/typings/configurationWebhooks/deliveryContact.ts b/src/typings/configurationWebhooks/deliveryContact.ts index f60009f14..c01f2b4a0 100644 --- a/src/typings/configurationWebhooks/deliveryContact.ts +++ b/src/typings/configurationWebhooks/deliveryContact.ts @@ -26,7 +26,7 @@ export class DeliveryContact { */ 'fullPhoneNumber'?: string; 'name': Name; - 'phoneNumber'?: PhoneNumber | null; + 'phoneNumber'?: PhoneNumber; /** * The URL of the contact\'s website. */ @@ -63,7 +63,7 @@ export class DeliveryContact { { "name": "phoneNumber", "baseName": "phoneNumber", - "type": "PhoneNumber | null" + "type": "PhoneNumber" }, { "name": "webAddress", diff --git a/src/typings/configurationWebhooks/ibanAccountIdentification.ts b/src/typings/configurationWebhooks/ibanAccountIdentification.ts index 583392194..f4dc2a88c 100644 --- a/src/typings/configurationWebhooks/ibanAccountIdentification.ts +++ b/src/typings/configurationWebhooks/ibanAccountIdentification.ts @@ -16,7 +16,7 @@ export class IbanAccountIdentification { /** * **iban** */ - 'type': IbanAccountIdentification.TypeEnum; + 'type': IbanAccountIdentification.TypeEnum = IbanAccountIdentification.TypeEnum.Iban; static discriminator: string | undefined = undefined; @@ -39,6 +39,6 @@ export class IbanAccountIdentification { export namespace IbanAccountIdentification { export enum TypeEnum { - Iban = 'iban' + Iban = 'iban' } } diff --git a/src/typings/configurationWebhooks/models.ts b/src/typings/configurationWebhooks/models.ts index 3aa6944e3..b6e94abaa 100644 --- a/src/typings/configurationWebhooks/models.ts +++ b/src/typings/configurationWebhooks/models.ts @@ -1,12 +1,4 @@ -/* - * The version of the OpenAPI document: v2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - +import localVarRequest from 'request'; export * from './accountHolder'; export * from './accountHolderCapability'; @@ -39,6 +31,7 @@ export * from './expiry'; export * from './ibanAccountIdentification'; export * from './name'; export * from './paymentInstrument'; +export * from './paymentInstrumentAdditionalBankAccountIdentificationsInner'; export * from './paymentInstrumentNotificationData'; export * from './paymentNotificationRequest'; export * from './phone'; @@ -55,6 +48,18 @@ export * from './verificationDeadline'; export * from './verificationError'; export * from './verificationErrorRecursive'; +import * as fs from 'fs'; + +export interface RequestDetailedFile { + value: Buffer; + options?: { + filename?: string; + contentType?: string; + } +} + +export type RequestFile = string | Buffer | fs.ReadStream | RequestDetailedFile; + import { AccountHolder } from './accountHolder'; import { AccountHolderCapability } from './accountHolderCapability'; @@ -87,6 +92,7 @@ import { Expiry } from './expiry'; import { IbanAccountIdentification } from './ibanAccountIdentification'; import { Name } from './name'; import { PaymentInstrument } from './paymentInstrument'; +import { PaymentInstrumentAdditionalBankAccountIdentificationsInner } from './paymentInstrumentAdditionalBankAccountIdentificationsInner'; import { PaymentInstrumentNotificationData } from './paymentInstrumentNotificationData'; import { PaymentNotificationRequest } from './paymentNotificationRequest'; import { Phone } from './phone'; @@ -137,6 +143,7 @@ let enumsMap: {[index: string]: any} = { "PaymentInstrument.StatusEnum": PaymentInstrument.StatusEnum, "PaymentInstrument.StatusReasonEnum": PaymentInstrument.StatusReasonEnum, "PaymentInstrument.TypeEnum": PaymentInstrument.TypeEnum, + "PaymentInstrumentAdditionalBankAccountIdentificationsInner.TypeEnum": PaymentInstrumentAdditionalBankAccountIdentificationsInner.TypeEnum, "PaymentNotificationRequest.TypeEnum": PaymentNotificationRequest.TypeEnum, "Phone.TypeEnum": Phone.TypeEnum, "PhoneNumber.PhoneTypeEnum": PhoneNumber.PhoneTypeEnum, @@ -186,6 +193,7 @@ let typeMap: {[index: string]: any} = { "IbanAccountIdentification": IbanAccountIdentification, "Name": Name, "PaymentInstrument": PaymentInstrument, + "PaymentInstrumentAdditionalBankAccountIdentificationsInner": PaymentInstrumentAdditionalBankAccountIdentificationsInner, "PaymentInstrumentNotificationData": PaymentInstrumentNotificationData, "PaymentNotificationRequest": PaymentNotificationRequest, "Phone": Phone, @@ -203,6 +211,23 @@ let typeMap: {[index: string]: any} = { "VerificationErrorRecursive": VerificationErrorRecursive, } +// Check if a string starts with another string without using es6 features +function startsWith(str: string, match: string): boolean { + return str.substring(0, match.length) === match; +} + +// Check if a string ends with another string without using es6 features +function endsWith(str: string, match: string): boolean { + return str.length >= match.length && str.substring(str.length - match.length) === match; +} + +const nullableSuffix = " | null"; +const optionalSuffix = " | undefined"; +const arrayPrefix = "Array<"; +const arraySuffix = ">"; +const mapPrefix = "{ [key: string]: "; +const mapSuffix = "; }"; + export class ObjectSerializer { public static findCorrectType(data: any, expectedType: string) { if (data == undefined) { @@ -239,25 +264,37 @@ export class ObjectSerializer { } } - public static serialize(data: any, type: string) { + public static serialize(data: any, type: string): any { if (data == undefined) { return data; } else if (primitives.indexOf(type.toLowerCase()) !== -1) { return data; - } else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6 - let subType: string = type.replace("Array<", ""); // Array => Type> - subType = subType.substring(0, subType.length - 1); // Type> => Type + } else if (endsWith(type, nullableSuffix)) { + let subType: string = type.slice(0, -nullableSuffix.length); // Type | null => Type + return ObjectSerializer.serialize(data, subType); + } else if (endsWith(type, optionalSuffix)) { + let subType: string = type.slice(0, -optionalSuffix.length); // Type | undefined => Type + return ObjectSerializer.serialize(data, subType); + } else if (startsWith(type, arrayPrefix)) { + let subType: string = type.slice(arrayPrefix.length, -arraySuffix.length); // Array => Type let transformedData: any[] = []; for (let index = 0; index < data.length; index++) { let datum = data[index]; transformedData.push(ObjectSerializer.serialize(datum, subType)); } return transformedData; + } else if (startsWith(type, mapPrefix)) { + let subType: string = type.slice(mapPrefix.length, -mapSuffix.length); // { [key: string]: Type; } => Type + let transformedData: { [key: string]: any } = {}; + for (let key in data) { + transformedData[key] = ObjectSerializer.serialize( + data[key], + subType, + ); + } + return transformedData; } else if (type === "Date") { return data.toISOString(); - } else if (type === "SaleToAcquirerData") { - const dataString = JSON.stringify(data); - return Buffer.from(dataString).toString("base64"); } else { if (enumsMap[type]) { return data; @@ -280,22 +317,37 @@ export class ObjectSerializer { } } - public static deserialize(data: any, type: string) { + public static deserialize(data: any, type: string): any { // polymorphism may change the actual type. type = ObjectSerializer.findCorrectType(data, type); if (data == undefined) { return data; } else if (primitives.indexOf(type.toLowerCase()) !== -1) { return data; - } else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6 - let subType: string = type.replace("Array<", ""); // Array => Type> - subType = subType.substring(0, subType.length - 1); // Type> => Type + } else if (endsWith(type, nullableSuffix)) { + let subType: string = type.slice(0, -nullableSuffix.length); // Type | null => Type + return ObjectSerializer.deserialize(data, subType); + } else if (endsWith(type, optionalSuffix)) { + let subType: string = type.slice(0, -optionalSuffix.length); // Type | undefined => Type + return ObjectSerializer.deserialize(data, subType); + } else if (startsWith(type, arrayPrefix)) { + let subType: string = type.slice(arrayPrefix.length, -arraySuffix.length); // Array => Type let transformedData: any[] = []; for (let index = 0; index < data.length; index++) { let datum = data[index]; transformedData.push(ObjectSerializer.deserialize(datum, subType)); } return transformedData; + } else if (startsWith(type, mapPrefix)) { + let subType: string = type.slice(mapPrefix.length, -mapSuffix.length); // { [key: string]: Type; } => Type + let transformedData: { [key: string]: any } = {}; + for (let key in data) { + transformedData[key] = ObjectSerializer.deserialize( + data[key], + subType, + ); + } + return transformedData; } else if (type === "Date") { return new Date(data); } else { @@ -316,3 +368,77 @@ export class ObjectSerializer { } } } + +export interface Authentication { + /** + * Apply authentication settings to header and query params. + */ + applyToRequest(requestOptions: localVarRequest.Options): Promise | void; +} + +export class HttpBasicAuth implements Authentication { + public username: string = ''; + public password: string = ''; + + applyToRequest(requestOptions: localVarRequest.Options): void { + requestOptions.auth = { + username: this.username, password: this.password + } + } +} + +export class HttpBearerAuth implements Authentication { + public accessToken: string | (() => string) = ''; + + applyToRequest(requestOptions: localVarRequest.Options): void { + if (requestOptions && requestOptions.headers) { + const accessToken = typeof this.accessToken === 'function' + ? this.accessToken() + : this.accessToken; + requestOptions.headers["Authorization"] = "Bearer " + accessToken; + } + } +} + +export class ApiKeyAuth implements Authentication { + public apiKey: string = ''; + + constructor(private location: string, private paramName: string) { + } + + applyToRequest(requestOptions: localVarRequest.Options): void { + if (this.location == "query") { + (requestOptions.qs)[this.paramName] = this.apiKey; + } else if (this.location == "header" && requestOptions && requestOptions.headers) { + requestOptions.headers[this.paramName] = this.apiKey; + } else if (this.location == 'cookie' && requestOptions && requestOptions.headers) { + if (requestOptions.headers['Cookie']) { + requestOptions.headers['Cookie'] += '; ' + this.paramName + '=' + encodeURIComponent(this.apiKey); + } + else { + requestOptions.headers['Cookie'] = this.paramName + '=' + encodeURIComponent(this.apiKey); + } + } + } +} + +export class OAuth implements Authentication { + public accessToken: string = ''; + + applyToRequest(requestOptions: localVarRequest.Options): void { + if (requestOptions && requestOptions.headers) { + requestOptions.headers["Authorization"] = "Bearer " + this.accessToken; + } + } +} + +export class VoidAuth implements Authentication { + public username: string = ''; + public password: string = ''; + + applyToRequest(_: localVarRequest.Options): void { + // Do nothing + } +} + +export type Interceptor = (requestOptions: localVarRequest.Options) => (Promise | void); diff --git a/src/typings/configurationWebhooks/paymentInstrument.ts b/src/typings/configurationWebhooks/paymentInstrument.ts index 1852b1710..0b98b2e16 100644 --- a/src/typings/configurationWebhooks/paymentInstrument.ts +++ b/src/typings/configurationWebhooks/paymentInstrument.ts @@ -9,7 +9,7 @@ import { BankAccountDetails } from './bankAccountDetails'; import { Card } from './card'; -import { IbanAccountIdentification } from './ibanAccountIdentification'; +import { PaymentInstrumentAdditionalBankAccountIdentificationsInner } from './paymentInstrumentAdditionalBankAccountIdentificationsInner'; export class PaymentInstrument { /** @@ -18,13 +18,13 @@ export class PaymentInstrument { * @deprecated since Configuration webhooks v2 * Please use `bankAccount` object instead */ - 'additionalBankAccountIdentifications'?: Array; + 'additionalBankAccountIdentifications'?: Array; /** * The unique identifier of the [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/v1/post/balanceAccounts__resParam_id) associated with the payment instrument. */ 'balanceAccountId': string; - 'bankAccount'?: BankAccountDetails | null; - 'card'?: Card | null; + 'bankAccount'?: BankAccountDetails; + 'card'?: Card; /** * Your description for the payment instrument, maximum 300 characters. */ @@ -68,7 +68,7 @@ export class PaymentInstrument { { "name": "additionalBankAccountIdentifications", "baseName": "additionalBankAccountIdentifications", - "type": "Array" + "type": "Array" }, { "name": "balanceAccountId", @@ -78,12 +78,12 @@ export class PaymentInstrument { { "name": "bankAccount", "baseName": "bankAccount", - "type": "BankAccountDetails | null" + "type": "BankAccountDetails" }, { "name": "card", "baseName": "card", - "type": "Card | null" + "type": "Card" }, { "name": "description", @@ -138,24 +138,24 @@ export class PaymentInstrument { export namespace PaymentInstrument { export enum StatusEnum { - Active = 'active', - Closed = 'closed', - Inactive = 'inactive', - Suspended = 'suspended' + Active = 'active', + Closed = 'closed', + Inactive = 'inactive', + Suspended = 'suspended' } export enum StatusReasonEnum { - AccountClosure = 'accountClosure', - Damaged = 'damaged', - EndOfLife = 'endOfLife', - Expired = 'expired', - Lost = 'lost', - Other = 'other', - Stolen = 'stolen', - SuspectedFraud = 'suspectedFraud', - TransactionRule = 'transactionRule' + AccountClosure = 'accountClosure', + Damaged = 'damaged', + EndOfLife = 'endOfLife', + Expired = 'expired', + Lost = 'lost', + Other = 'other', + Stolen = 'stolen', + SuspectedFraud = 'suspectedFraud', + TransactionRule = 'transactionRule' } export enum TypeEnum { - BankAccount = 'bankAccount', - Card = 'card' + BankAccount = 'bankAccount', + Card = 'card' } } diff --git a/src/typings/configurationWebhooks/paymentInstrumentAdditionalBankAccountIdentificationsInner.ts b/src/typings/configurationWebhooks/paymentInstrumentAdditionalBankAccountIdentificationsInner.ts new file mode 100644 index 000000000..a9bc2c537 --- /dev/null +++ b/src/typings/configurationWebhooks/paymentInstrumentAdditionalBankAccountIdentificationsInner.ts @@ -0,0 +1,45 @@ +/* + * The version of the OpenAPI document: v2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { IbanAccountIdentification } from './ibanAccountIdentification'; + +export class PaymentInstrumentAdditionalBankAccountIdentificationsInner { + /** + * The international bank account number as defined in the [ISO-13616](https://www.iso.org/standard/81090.html) standard. + */ + 'iban': string; + /** + * **iban** + */ + 'type': PaymentInstrumentAdditionalBankAccountIdentificationsInner.TypeEnum = PaymentInstrumentAdditionalBankAccountIdentificationsInner.TypeEnum.Iban; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "iban", + "baseName": "iban", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "PaymentInstrumentAdditionalBankAccountIdentificationsInner.TypeEnum" + } ]; + + static getAttributeTypeMap() { + return PaymentInstrumentAdditionalBankAccountIdentificationsInner.attributeTypeMap; + } +} + +export namespace PaymentInstrumentAdditionalBankAccountIdentificationsInner { + export enum TypeEnum { + Iban = 'iban' + } +} diff --git a/src/typings/configurationWebhooks/paymentInstrumentNotificationData.ts b/src/typings/configurationWebhooks/paymentInstrumentNotificationData.ts index 7f05d54e6..636498e05 100644 --- a/src/typings/configurationWebhooks/paymentInstrumentNotificationData.ts +++ b/src/typings/configurationWebhooks/paymentInstrumentNotificationData.ts @@ -14,7 +14,7 @@ export class PaymentInstrumentNotificationData { * The unique identifier of the balance platform. */ 'balancePlatform'?: string; - 'paymentInstrument'?: PaymentInstrument | null; + 'paymentInstrument'?: PaymentInstrument; static discriminator: string | undefined = undefined; @@ -27,7 +27,7 @@ export class PaymentInstrumentNotificationData { { "name": "paymentInstrument", "baseName": "paymentInstrument", - "type": "PaymentInstrument | null" + "type": "PaymentInstrument" } ]; static getAttributeTypeMap() { diff --git a/src/typings/configurationWebhooks/paymentNotificationRequest.ts b/src/typings/configurationWebhooks/paymentNotificationRequest.ts index ad49c3067..efb7303bd 100644 --- a/src/typings/configurationWebhooks/paymentNotificationRequest.ts +++ b/src/typings/configurationWebhooks/paymentNotificationRequest.ts @@ -55,7 +55,7 @@ export class PaymentNotificationRequest { export namespace PaymentNotificationRequest { export enum TypeEnum { - Created = 'balancePlatform.paymentInstrument.created', - Updated = 'balancePlatform.paymentInstrument.updated' + BalancePlatformPaymentInstrumentCreated = 'balancePlatform.paymentInstrument.created', + BalancePlatformPaymentInstrumentUpdated = 'balancePlatform.paymentInstrument.updated' } } diff --git a/src/typings/configurationWebhooks/phone.ts b/src/typings/configurationWebhooks/phone.ts index 7fb4c66b9..52b2220bd 100644 --- a/src/typings/configurationWebhooks/phone.ts +++ b/src/typings/configurationWebhooks/phone.ts @@ -39,7 +39,7 @@ export class Phone { export namespace Phone { export enum TypeEnum { - Landline = 'landline', - Mobile = 'mobile' + Landline = 'landline', + Mobile = 'mobile' } } diff --git a/src/typings/configurationWebhooks/phoneNumber.ts b/src/typings/configurationWebhooks/phoneNumber.ts index aa414d703..a3a99e2f7 100644 --- a/src/typings/configurationWebhooks/phoneNumber.ts +++ b/src/typings/configurationWebhooks/phoneNumber.ts @@ -48,9 +48,9 @@ export class PhoneNumber { export namespace PhoneNumber { export enum PhoneTypeEnum { - Fax = 'Fax', - Landline = 'Landline', - Mobile = 'Mobile', - Sip = 'SIP' + Fax = 'Fax', + Landline = 'Landline', + Mobile = 'Mobile', + Sip = 'SIP' } } diff --git a/src/typings/configurationWebhooks/sweepConfigurationNotificationData.ts b/src/typings/configurationWebhooks/sweepConfigurationNotificationData.ts index 32c6d0ceb..28e11e24b 100644 --- a/src/typings/configurationWebhooks/sweepConfigurationNotificationData.ts +++ b/src/typings/configurationWebhooks/sweepConfigurationNotificationData.ts @@ -18,7 +18,7 @@ export class SweepConfigurationNotificationData { * The unique identifier of the balance platform. */ 'balancePlatform'?: string; - 'sweep'?: SweepConfigurationV2 | null; + 'sweep'?: SweepConfigurationV2; static discriminator: string | undefined = undefined; @@ -36,7 +36,7 @@ export class SweepConfigurationNotificationData { { "name": "sweep", "baseName": "sweep", - "type": "SweepConfigurationV2 | null" + "type": "SweepConfigurationV2" } ]; static getAttributeTypeMap() { diff --git a/src/typings/configurationWebhooks/sweepConfigurationNotificationRequest.ts b/src/typings/configurationWebhooks/sweepConfigurationNotificationRequest.ts index b622d2e7e..5ff7dfeec 100644 --- a/src/typings/configurationWebhooks/sweepConfigurationNotificationRequest.ts +++ b/src/typings/configurationWebhooks/sweepConfigurationNotificationRequest.ts @@ -55,8 +55,8 @@ export class SweepConfigurationNotificationRequest { export namespace SweepConfigurationNotificationRequest { export enum TypeEnum { - Created = 'balancePlatform.balanceAccountSweep.created', - Updated = 'balancePlatform.balanceAccountSweep.updated', - Deleted = 'balancePlatform.balanceAccountSweep.deleted' + BalancePlatformBalanceAccountSweepCreated = 'balancePlatform.balanceAccountSweep.created', + BalancePlatformBalanceAccountSweepUpdated = 'balancePlatform.balanceAccountSweep.updated', + BalancePlatformBalanceAccountSweepDeleted = 'balancePlatform.balanceAccountSweep.deleted' } } diff --git a/src/typings/configurationWebhooks/sweepConfigurationV2.ts b/src/typings/configurationWebhooks/sweepConfigurationV2.ts index 3bd2d7584..b8731d448 100644 --- a/src/typings/configurationWebhooks/sweepConfigurationV2.ts +++ b/src/typings/configurationWebhooks/sweepConfigurationV2.ts @@ -54,13 +54,13 @@ export class SweepConfigurationV2 { * The status of the sweep. If not provided, by default, this is set to **active**. Possible values: * **active**: the sweep is enabled and funds will be pulled in or pushed out based on the defined configuration. * **inactive**: the sweep is disabled and cannot be triggered. */ 'status'?: SweepConfigurationV2.StatusEnum; - 'sweepAmount'?: Amount | null; - 'targetAmount'?: Amount | null; - 'triggerAmount'?: Amount | null; + 'sweepAmount'?: Amount; + 'targetAmount'?: Amount; + 'triggerAmount'?: Amount; /** * The direction of sweep, whether pushing out or pulling in funds to the balance account. If not provided, by default, this is set to **push**. Possible values: * **push**: _push out funds_ to a destination balance account or transfer instrument. * **pull**: _pull in funds_ from a source merchant account, transfer instrument, or balance account. */ - 'type'?: SweepConfigurationV2.TypeEnum; + 'type'?: SweepConfigurationV2.TypeEnum = SweepConfigurationV2.TypeEnum.Push; static discriminator: string | undefined = undefined; @@ -128,17 +128,17 @@ export class SweepConfigurationV2 { { "name": "sweepAmount", "baseName": "sweepAmount", - "type": "Amount | null" + "type": "Amount" }, { "name": "targetAmount", "baseName": "targetAmount", - "type": "Amount | null" + "type": "Amount" }, { "name": "triggerAmount", "baseName": "triggerAmount", - "type": "Amount | null" + "type": "Amount" }, { "name": "type", @@ -153,49 +153,49 @@ export class SweepConfigurationV2 { export namespace SweepConfigurationV2 { export enum CategoryEnum { - Bank = 'bank', - Internal = 'internal', - PlatformPayment = 'platformPayment' + Bank = 'bank', + Internal = 'internal', + PlatformPayment = 'platformPayment' } export enum PrioritiesEnum { - CrossBorder = 'crossBorder', - Fast = 'fast', - Instant = 'instant', - Internal = 'internal', - Regular = 'regular', - Wire = 'wire' + CrossBorder = 'crossBorder', + Fast = 'fast', + Instant = 'instant', + Internal = 'internal', + Regular = 'regular', + Wire = 'wire' } export enum ReasonEnum { - AccountHierarchyNotActive = 'accountHierarchyNotActive', - AmountLimitExceeded = 'amountLimitExceeded', - Approved = 'approved', - BalanceAccountTemporarilyBlockedByTransactionRule = 'balanceAccountTemporarilyBlockedByTransactionRule', - CounterpartyAccountBlocked = 'counterpartyAccountBlocked', - CounterpartyAccountClosed = 'counterpartyAccountClosed', - CounterpartyAccountNotFound = 'counterpartyAccountNotFound', - CounterpartyAddressRequired = 'counterpartyAddressRequired', - CounterpartyBankTimedOut = 'counterpartyBankTimedOut', - CounterpartyBankUnavailable = 'counterpartyBankUnavailable', - Declined = 'declined', - DeclinedByTransactionRule = 'declinedByTransactionRule', - DirectDebitNotSupported = 'directDebitNotSupported', - Error = 'error', - NotEnoughBalance = 'notEnoughBalance', - PendingApproval = 'pendingApproval', - PendingExecution = 'pendingExecution', - RefusedByCounterpartyBank = 'refusedByCounterpartyBank', - RefusedByCustomer = 'refusedByCustomer', - RouteNotFound = 'routeNotFound', - ScaFailed = 'scaFailed', - TransferInstrumentDoesNotExist = 'transferInstrumentDoesNotExist', - Unknown = 'unknown' + AccountHierarchyNotActive = 'accountHierarchyNotActive', + AmountLimitExceeded = 'amountLimitExceeded', + Approved = 'approved', + BalanceAccountTemporarilyBlockedByTransactionRule = 'balanceAccountTemporarilyBlockedByTransactionRule', + CounterpartyAccountBlocked = 'counterpartyAccountBlocked', + CounterpartyAccountClosed = 'counterpartyAccountClosed', + CounterpartyAccountNotFound = 'counterpartyAccountNotFound', + CounterpartyAddressRequired = 'counterpartyAddressRequired', + CounterpartyBankTimedOut = 'counterpartyBankTimedOut', + CounterpartyBankUnavailable = 'counterpartyBankUnavailable', + Declined = 'declined', + DeclinedByTransactionRule = 'declinedByTransactionRule', + DirectDebitNotSupported = 'directDebitNotSupported', + Error = 'error', + NotEnoughBalance = 'notEnoughBalance', + PendingApproval = 'pendingApproval', + PendingExecution = 'pendingExecution', + RefusedByCounterpartyBank = 'refusedByCounterpartyBank', + RefusedByCustomer = 'refusedByCustomer', + RouteNotFound = 'routeNotFound', + ScaFailed = 'scaFailed', + TransferInstrumentDoesNotExist = 'transferInstrumentDoesNotExist', + Unknown = 'unknown' } export enum StatusEnum { - Active = 'active', - Inactive = 'inactive' + Active = 'active', + Inactive = 'inactive' } export enum TypeEnum { - Pull = 'pull', - Push = 'push' + Pull = 'pull', + Push = 'push' } } diff --git a/src/typings/configurationWebhooks/sweepSchedule.ts b/src/typings/configurationWebhooks/sweepSchedule.ts index 3aa2fe3fd..df9aaaf5d 100644 --- a/src/typings/configurationWebhooks/sweepSchedule.ts +++ b/src/typings/configurationWebhooks/sweepSchedule.ts @@ -39,10 +39,10 @@ export class SweepSchedule { export namespace SweepSchedule { export enum TypeEnum { - Daily = 'daily', - Weekly = 'weekly', - Monthly = 'monthly', - Balance = 'balance', - Cron = 'cron' + Daily = 'daily', + Weekly = 'weekly', + Monthly = 'monthly', + Balance = 'balance', + Cron = 'cron' } } diff --git a/src/typings/configurationWebhooks/verificationDeadline.ts b/src/typings/configurationWebhooks/verificationDeadline.ts index 169e3f154..8d7afea1c 100644 --- a/src/typings/configurationWebhooks/verificationDeadline.ts +++ b/src/typings/configurationWebhooks/verificationDeadline.ts @@ -48,60 +48,60 @@ export class VerificationDeadline { export namespace VerificationDeadline { export enum CapabilitiesEnum { - AcceptExternalFunding = 'acceptExternalFunding', - AcceptPspFunding = 'acceptPspFunding', - AcceptTransactionInRestrictedCountries = 'acceptTransactionInRestrictedCountries', - AcceptTransactionInRestrictedCountriesCommercial = 'acceptTransactionInRestrictedCountriesCommercial', - AcceptTransactionInRestrictedCountriesConsumer = 'acceptTransactionInRestrictedCountriesConsumer', - AcceptTransactionInRestrictedIndustries = 'acceptTransactionInRestrictedIndustries', - AcceptTransactionInRestrictedIndustriesCommercial = 'acceptTransactionInRestrictedIndustriesCommercial', - AcceptTransactionInRestrictedIndustriesConsumer = 'acceptTransactionInRestrictedIndustriesConsumer', - Acquiring = 'acquiring', - AtmWithdrawal = 'atmWithdrawal', - AtmWithdrawalCommercial = 'atmWithdrawalCommercial', - AtmWithdrawalConsumer = 'atmWithdrawalConsumer', - AtmWithdrawalInRestrictedCountries = 'atmWithdrawalInRestrictedCountries', - AtmWithdrawalInRestrictedCountriesCommercial = 'atmWithdrawalInRestrictedCountriesCommercial', - AtmWithdrawalInRestrictedCountriesConsumer = 'atmWithdrawalInRestrictedCountriesConsumer', - AuthorisedPaymentInstrumentUser = 'authorisedPaymentInstrumentUser', - GetGrantOffers = 'getGrantOffers', - IssueBankAccount = 'issueBankAccount', - IssueCard = 'issueCard', - IssueCardCommercial = 'issueCardCommercial', - IssueCardConsumer = 'issueCardConsumer', - IssueChargeCard = 'issueChargeCard', - IssueChargeCardCommercial = 'issueChargeCardCommercial', - IssueCreditLimit = 'issueCreditLimit', - LocalAcceptance = 'localAcceptance', - Payout = 'payout', - PayoutToTransferInstrument = 'payoutToTransferInstrument', - Processing = 'processing', - ReceiveFromBalanceAccount = 'receiveFromBalanceAccount', - ReceiveFromPlatformPayments = 'receiveFromPlatformPayments', - ReceiveFromThirdParty = 'receiveFromThirdParty', - ReceiveFromTransferInstrument = 'receiveFromTransferInstrument', - ReceiveGrants = 'receiveGrants', - ReceivePayments = 'receivePayments', - SendToBalanceAccount = 'sendToBalanceAccount', - SendToThirdParty = 'sendToThirdParty', - SendToTransferInstrument = 'sendToTransferInstrument', - ThirdPartyFunding = 'thirdPartyFunding', - UseCard = 'useCard', - UseCardCommercial = 'useCardCommercial', - UseCardConsumer = 'useCardConsumer', - UseCardInRestrictedCountries = 'useCardInRestrictedCountries', - UseCardInRestrictedCountriesCommercial = 'useCardInRestrictedCountriesCommercial', - UseCardInRestrictedCountriesConsumer = 'useCardInRestrictedCountriesConsumer', - UseCardInRestrictedIndustries = 'useCardInRestrictedIndustries', - UseCardInRestrictedIndustriesCommercial = 'useCardInRestrictedIndustriesCommercial', - UseCardInRestrictedIndustriesConsumer = 'useCardInRestrictedIndustriesConsumer', - UseChargeCard = 'useChargeCard', - UseChargeCardCommercial = 'useChargeCardCommercial', - WithdrawFromAtm = 'withdrawFromAtm', - WithdrawFromAtmCommercial = 'withdrawFromAtmCommercial', - WithdrawFromAtmConsumer = 'withdrawFromAtmConsumer', - WithdrawFromAtmInRestrictedCountries = 'withdrawFromAtmInRestrictedCountries', - WithdrawFromAtmInRestrictedCountriesCommercial = 'withdrawFromAtmInRestrictedCountriesCommercial', - WithdrawFromAtmInRestrictedCountriesConsumer = 'withdrawFromAtmInRestrictedCountriesConsumer' + AcceptExternalFunding = 'acceptExternalFunding', + AcceptPspFunding = 'acceptPspFunding', + AcceptTransactionInRestrictedCountries = 'acceptTransactionInRestrictedCountries', + AcceptTransactionInRestrictedCountriesCommercial = 'acceptTransactionInRestrictedCountriesCommercial', + AcceptTransactionInRestrictedCountriesConsumer = 'acceptTransactionInRestrictedCountriesConsumer', + AcceptTransactionInRestrictedIndustries = 'acceptTransactionInRestrictedIndustries', + AcceptTransactionInRestrictedIndustriesCommercial = 'acceptTransactionInRestrictedIndustriesCommercial', + AcceptTransactionInRestrictedIndustriesConsumer = 'acceptTransactionInRestrictedIndustriesConsumer', + Acquiring = 'acquiring', + AtmWithdrawal = 'atmWithdrawal', + AtmWithdrawalCommercial = 'atmWithdrawalCommercial', + AtmWithdrawalConsumer = 'atmWithdrawalConsumer', + AtmWithdrawalInRestrictedCountries = 'atmWithdrawalInRestrictedCountries', + AtmWithdrawalInRestrictedCountriesCommercial = 'atmWithdrawalInRestrictedCountriesCommercial', + AtmWithdrawalInRestrictedCountriesConsumer = 'atmWithdrawalInRestrictedCountriesConsumer', + AuthorisedPaymentInstrumentUser = 'authorisedPaymentInstrumentUser', + GetGrantOffers = 'getGrantOffers', + IssueBankAccount = 'issueBankAccount', + IssueCard = 'issueCard', + IssueCardCommercial = 'issueCardCommercial', + IssueCardConsumer = 'issueCardConsumer', + IssueChargeCard = 'issueChargeCard', + IssueChargeCardCommercial = 'issueChargeCardCommercial', + IssueCreditLimit = 'issueCreditLimit', + LocalAcceptance = 'localAcceptance', + Payout = 'payout', + PayoutToTransferInstrument = 'payoutToTransferInstrument', + Processing = 'processing', + ReceiveFromBalanceAccount = 'receiveFromBalanceAccount', + ReceiveFromPlatformPayments = 'receiveFromPlatformPayments', + ReceiveFromThirdParty = 'receiveFromThirdParty', + ReceiveFromTransferInstrument = 'receiveFromTransferInstrument', + ReceiveGrants = 'receiveGrants', + ReceivePayments = 'receivePayments', + SendToBalanceAccount = 'sendToBalanceAccount', + SendToThirdParty = 'sendToThirdParty', + SendToTransferInstrument = 'sendToTransferInstrument', + ThirdPartyFunding = 'thirdPartyFunding', + UseCard = 'useCard', + UseCardCommercial = 'useCardCommercial', + UseCardConsumer = 'useCardConsumer', + UseCardInRestrictedCountries = 'useCardInRestrictedCountries', + UseCardInRestrictedCountriesCommercial = 'useCardInRestrictedCountriesCommercial', + UseCardInRestrictedCountriesConsumer = 'useCardInRestrictedCountriesConsumer', + UseCardInRestrictedIndustries = 'useCardInRestrictedIndustries', + UseCardInRestrictedIndustriesCommercial = 'useCardInRestrictedIndustriesCommercial', + UseCardInRestrictedIndustriesConsumer = 'useCardInRestrictedIndustriesConsumer', + UseChargeCard = 'useChargeCard', + UseChargeCardCommercial = 'useChargeCardCommercial', + WithdrawFromAtm = 'withdrawFromAtm', + WithdrawFromAtmCommercial = 'withdrawFromAtmCommercial', + WithdrawFromAtmConsumer = 'withdrawFromAtmConsumer', + WithdrawFromAtmInRestrictedCountries = 'withdrawFromAtmInRestrictedCountries', + WithdrawFromAtmInRestrictedCountriesCommercial = 'withdrawFromAtmInRestrictedCountriesCommercial', + WithdrawFromAtmInRestrictedCountriesConsumer = 'withdrawFromAtmInRestrictedCountriesConsumer' } } diff --git a/src/typings/configurationWebhooks/verificationError.ts b/src/typings/configurationWebhooks/verificationError.ts index dad217dce..5d7917853 100644 --- a/src/typings/configurationWebhooks/verificationError.ts +++ b/src/typings/configurationWebhooks/verificationError.ts @@ -77,65 +77,65 @@ export class VerificationError { export namespace VerificationError { export enum CapabilitiesEnum { - AcceptExternalFunding = 'acceptExternalFunding', - AcceptPspFunding = 'acceptPspFunding', - AcceptTransactionInRestrictedCountries = 'acceptTransactionInRestrictedCountries', - AcceptTransactionInRestrictedCountriesCommercial = 'acceptTransactionInRestrictedCountriesCommercial', - AcceptTransactionInRestrictedCountriesConsumer = 'acceptTransactionInRestrictedCountriesConsumer', - AcceptTransactionInRestrictedIndustries = 'acceptTransactionInRestrictedIndustries', - AcceptTransactionInRestrictedIndustriesCommercial = 'acceptTransactionInRestrictedIndustriesCommercial', - AcceptTransactionInRestrictedIndustriesConsumer = 'acceptTransactionInRestrictedIndustriesConsumer', - Acquiring = 'acquiring', - AtmWithdrawal = 'atmWithdrawal', - AtmWithdrawalCommercial = 'atmWithdrawalCommercial', - AtmWithdrawalConsumer = 'atmWithdrawalConsumer', - AtmWithdrawalInRestrictedCountries = 'atmWithdrawalInRestrictedCountries', - AtmWithdrawalInRestrictedCountriesCommercial = 'atmWithdrawalInRestrictedCountriesCommercial', - AtmWithdrawalInRestrictedCountriesConsumer = 'atmWithdrawalInRestrictedCountriesConsumer', - AuthorisedPaymentInstrumentUser = 'authorisedPaymentInstrumentUser', - GetGrantOffers = 'getGrantOffers', - IssueBankAccount = 'issueBankAccount', - IssueCard = 'issueCard', - IssueCardCommercial = 'issueCardCommercial', - IssueCardConsumer = 'issueCardConsumer', - IssueChargeCard = 'issueChargeCard', - IssueChargeCardCommercial = 'issueChargeCardCommercial', - IssueCreditLimit = 'issueCreditLimit', - LocalAcceptance = 'localAcceptance', - Payout = 'payout', - PayoutToTransferInstrument = 'payoutToTransferInstrument', - Processing = 'processing', - ReceiveFromBalanceAccount = 'receiveFromBalanceAccount', - ReceiveFromPlatformPayments = 'receiveFromPlatformPayments', - ReceiveFromThirdParty = 'receiveFromThirdParty', - ReceiveFromTransferInstrument = 'receiveFromTransferInstrument', - ReceiveGrants = 'receiveGrants', - ReceivePayments = 'receivePayments', - SendToBalanceAccount = 'sendToBalanceAccount', - SendToThirdParty = 'sendToThirdParty', - SendToTransferInstrument = 'sendToTransferInstrument', - ThirdPartyFunding = 'thirdPartyFunding', - UseCard = 'useCard', - UseCardCommercial = 'useCardCommercial', - UseCardConsumer = 'useCardConsumer', - UseCardInRestrictedCountries = 'useCardInRestrictedCountries', - UseCardInRestrictedCountriesCommercial = 'useCardInRestrictedCountriesCommercial', - UseCardInRestrictedCountriesConsumer = 'useCardInRestrictedCountriesConsumer', - UseCardInRestrictedIndustries = 'useCardInRestrictedIndustries', - UseCardInRestrictedIndustriesCommercial = 'useCardInRestrictedIndustriesCommercial', - UseCardInRestrictedIndustriesConsumer = 'useCardInRestrictedIndustriesConsumer', - UseChargeCard = 'useChargeCard', - UseChargeCardCommercial = 'useChargeCardCommercial', - WithdrawFromAtm = 'withdrawFromAtm', - WithdrawFromAtmCommercial = 'withdrawFromAtmCommercial', - WithdrawFromAtmConsumer = 'withdrawFromAtmConsumer', - WithdrawFromAtmInRestrictedCountries = 'withdrawFromAtmInRestrictedCountries', - WithdrawFromAtmInRestrictedCountriesCommercial = 'withdrawFromAtmInRestrictedCountriesCommercial', - WithdrawFromAtmInRestrictedCountriesConsumer = 'withdrawFromAtmInRestrictedCountriesConsumer' + AcceptExternalFunding = 'acceptExternalFunding', + AcceptPspFunding = 'acceptPspFunding', + AcceptTransactionInRestrictedCountries = 'acceptTransactionInRestrictedCountries', + AcceptTransactionInRestrictedCountriesCommercial = 'acceptTransactionInRestrictedCountriesCommercial', + AcceptTransactionInRestrictedCountriesConsumer = 'acceptTransactionInRestrictedCountriesConsumer', + AcceptTransactionInRestrictedIndustries = 'acceptTransactionInRestrictedIndustries', + AcceptTransactionInRestrictedIndustriesCommercial = 'acceptTransactionInRestrictedIndustriesCommercial', + AcceptTransactionInRestrictedIndustriesConsumer = 'acceptTransactionInRestrictedIndustriesConsumer', + Acquiring = 'acquiring', + AtmWithdrawal = 'atmWithdrawal', + AtmWithdrawalCommercial = 'atmWithdrawalCommercial', + AtmWithdrawalConsumer = 'atmWithdrawalConsumer', + AtmWithdrawalInRestrictedCountries = 'atmWithdrawalInRestrictedCountries', + AtmWithdrawalInRestrictedCountriesCommercial = 'atmWithdrawalInRestrictedCountriesCommercial', + AtmWithdrawalInRestrictedCountriesConsumer = 'atmWithdrawalInRestrictedCountriesConsumer', + AuthorisedPaymentInstrumentUser = 'authorisedPaymentInstrumentUser', + GetGrantOffers = 'getGrantOffers', + IssueBankAccount = 'issueBankAccount', + IssueCard = 'issueCard', + IssueCardCommercial = 'issueCardCommercial', + IssueCardConsumer = 'issueCardConsumer', + IssueChargeCard = 'issueChargeCard', + IssueChargeCardCommercial = 'issueChargeCardCommercial', + IssueCreditLimit = 'issueCreditLimit', + LocalAcceptance = 'localAcceptance', + Payout = 'payout', + PayoutToTransferInstrument = 'payoutToTransferInstrument', + Processing = 'processing', + ReceiveFromBalanceAccount = 'receiveFromBalanceAccount', + ReceiveFromPlatformPayments = 'receiveFromPlatformPayments', + ReceiveFromThirdParty = 'receiveFromThirdParty', + ReceiveFromTransferInstrument = 'receiveFromTransferInstrument', + ReceiveGrants = 'receiveGrants', + ReceivePayments = 'receivePayments', + SendToBalanceAccount = 'sendToBalanceAccount', + SendToThirdParty = 'sendToThirdParty', + SendToTransferInstrument = 'sendToTransferInstrument', + ThirdPartyFunding = 'thirdPartyFunding', + UseCard = 'useCard', + UseCardCommercial = 'useCardCommercial', + UseCardConsumer = 'useCardConsumer', + UseCardInRestrictedCountries = 'useCardInRestrictedCountries', + UseCardInRestrictedCountriesCommercial = 'useCardInRestrictedCountriesCommercial', + UseCardInRestrictedCountriesConsumer = 'useCardInRestrictedCountriesConsumer', + UseCardInRestrictedIndustries = 'useCardInRestrictedIndustries', + UseCardInRestrictedIndustriesCommercial = 'useCardInRestrictedIndustriesCommercial', + UseCardInRestrictedIndustriesConsumer = 'useCardInRestrictedIndustriesConsumer', + UseChargeCard = 'useChargeCard', + UseChargeCardCommercial = 'useChargeCardCommercial', + WithdrawFromAtm = 'withdrawFromAtm', + WithdrawFromAtmCommercial = 'withdrawFromAtmCommercial', + WithdrawFromAtmConsumer = 'withdrawFromAtmConsumer', + WithdrawFromAtmInRestrictedCountries = 'withdrawFromAtmInRestrictedCountries', + WithdrawFromAtmInRestrictedCountriesCommercial = 'withdrawFromAtmInRestrictedCountriesCommercial', + WithdrawFromAtmInRestrictedCountriesConsumer = 'withdrawFromAtmInRestrictedCountriesConsumer' } export enum TypeEnum { - DataMissing = 'dataMissing', - InvalidInput = 'invalidInput', - PendingStatus = 'pendingStatus' + DataMissing = 'dataMissing', + InvalidInput = 'invalidInput', + PendingStatus = 'pendingStatus' } } diff --git a/src/typings/configurationWebhooks/verificationErrorRecursive.ts b/src/typings/configurationWebhooks/verificationErrorRecursive.ts index 7fc379fad..0acaa1ac2 100644 --- a/src/typings/configurationWebhooks/verificationErrorRecursive.ts +++ b/src/typings/configurationWebhooks/verificationErrorRecursive.ts @@ -67,65 +67,65 @@ export class VerificationErrorRecursive { export namespace VerificationErrorRecursive { export enum CapabilitiesEnum { - AcceptExternalFunding = 'acceptExternalFunding', - AcceptPspFunding = 'acceptPspFunding', - AcceptTransactionInRestrictedCountries = 'acceptTransactionInRestrictedCountries', - AcceptTransactionInRestrictedCountriesCommercial = 'acceptTransactionInRestrictedCountriesCommercial', - AcceptTransactionInRestrictedCountriesConsumer = 'acceptTransactionInRestrictedCountriesConsumer', - AcceptTransactionInRestrictedIndustries = 'acceptTransactionInRestrictedIndustries', - AcceptTransactionInRestrictedIndustriesCommercial = 'acceptTransactionInRestrictedIndustriesCommercial', - AcceptTransactionInRestrictedIndustriesConsumer = 'acceptTransactionInRestrictedIndustriesConsumer', - Acquiring = 'acquiring', - AtmWithdrawal = 'atmWithdrawal', - AtmWithdrawalCommercial = 'atmWithdrawalCommercial', - AtmWithdrawalConsumer = 'atmWithdrawalConsumer', - AtmWithdrawalInRestrictedCountries = 'atmWithdrawalInRestrictedCountries', - AtmWithdrawalInRestrictedCountriesCommercial = 'atmWithdrawalInRestrictedCountriesCommercial', - AtmWithdrawalInRestrictedCountriesConsumer = 'atmWithdrawalInRestrictedCountriesConsumer', - AuthorisedPaymentInstrumentUser = 'authorisedPaymentInstrumentUser', - GetGrantOffers = 'getGrantOffers', - IssueBankAccount = 'issueBankAccount', - IssueCard = 'issueCard', - IssueCardCommercial = 'issueCardCommercial', - IssueCardConsumer = 'issueCardConsumer', - IssueChargeCard = 'issueChargeCard', - IssueChargeCardCommercial = 'issueChargeCardCommercial', - IssueCreditLimit = 'issueCreditLimit', - LocalAcceptance = 'localAcceptance', - Payout = 'payout', - PayoutToTransferInstrument = 'payoutToTransferInstrument', - Processing = 'processing', - ReceiveFromBalanceAccount = 'receiveFromBalanceAccount', - ReceiveFromPlatformPayments = 'receiveFromPlatformPayments', - ReceiveFromThirdParty = 'receiveFromThirdParty', - ReceiveFromTransferInstrument = 'receiveFromTransferInstrument', - ReceiveGrants = 'receiveGrants', - ReceivePayments = 'receivePayments', - SendToBalanceAccount = 'sendToBalanceAccount', - SendToThirdParty = 'sendToThirdParty', - SendToTransferInstrument = 'sendToTransferInstrument', - ThirdPartyFunding = 'thirdPartyFunding', - UseCard = 'useCard', - UseCardCommercial = 'useCardCommercial', - UseCardConsumer = 'useCardConsumer', - UseCardInRestrictedCountries = 'useCardInRestrictedCountries', - UseCardInRestrictedCountriesCommercial = 'useCardInRestrictedCountriesCommercial', - UseCardInRestrictedCountriesConsumer = 'useCardInRestrictedCountriesConsumer', - UseCardInRestrictedIndustries = 'useCardInRestrictedIndustries', - UseCardInRestrictedIndustriesCommercial = 'useCardInRestrictedIndustriesCommercial', - UseCardInRestrictedIndustriesConsumer = 'useCardInRestrictedIndustriesConsumer', - UseChargeCard = 'useChargeCard', - UseChargeCardCommercial = 'useChargeCardCommercial', - WithdrawFromAtm = 'withdrawFromAtm', - WithdrawFromAtmCommercial = 'withdrawFromAtmCommercial', - WithdrawFromAtmConsumer = 'withdrawFromAtmConsumer', - WithdrawFromAtmInRestrictedCountries = 'withdrawFromAtmInRestrictedCountries', - WithdrawFromAtmInRestrictedCountriesCommercial = 'withdrawFromAtmInRestrictedCountriesCommercial', - WithdrawFromAtmInRestrictedCountriesConsumer = 'withdrawFromAtmInRestrictedCountriesConsumer' + AcceptExternalFunding = 'acceptExternalFunding', + AcceptPspFunding = 'acceptPspFunding', + AcceptTransactionInRestrictedCountries = 'acceptTransactionInRestrictedCountries', + AcceptTransactionInRestrictedCountriesCommercial = 'acceptTransactionInRestrictedCountriesCommercial', + AcceptTransactionInRestrictedCountriesConsumer = 'acceptTransactionInRestrictedCountriesConsumer', + AcceptTransactionInRestrictedIndustries = 'acceptTransactionInRestrictedIndustries', + AcceptTransactionInRestrictedIndustriesCommercial = 'acceptTransactionInRestrictedIndustriesCommercial', + AcceptTransactionInRestrictedIndustriesConsumer = 'acceptTransactionInRestrictedIndustriesConsumer', + Acquiring = 'acquiring', + AtmWithdrawal = 'atmWithdrawal', + AtmWithdrawalCommercial = 'atmWithdrawalCommercial', + AtmWithdrawalConsumer = 'atmWithdrawalConsumer', + AtmWithdrawalInRestrictedCountries = 'atmWithdrawalInRestrictedCountries', + AtmWithdrawalInRestrictedCountriesCommercial = 'atmWithdrawalInRestrictedCountriesCommercial', + AtmWithdrawalInRestrictedCountriesConsumer = 'atmWithdrawalInRestrictedCountriesConsumer', + AuthorisedPaymentInstrumentUser = 'authorisedPaymentInstrumentUser', + GetGrantOffers = 'getGrantOffers', + IssueBankAccount = 'issueBankAccount', + IssueCard = 'issueCard', + IssueCardCommercial = 'issueCardCommercial', + IssueCardConsumer = 'issueCardConsumer', + IssueChargeCard = 'issueChargeCard', + IssueChargeCardCommercial = 'issueChargeCardCommercial', + IssueCreditLimit = 'issueCreditLimit', + LocalAcceptance = 'localAcceptance', + Payout = 'payout', + PayoutToTransferInstrument = 'payoutToTransferInstrument', + Processing = 'processing', + ReceiveFromBalanceAccount = 'receiveFromBalanceAccount', + ReceiveFromPlatformPayments = 'receiveFromPlatformPayments', + ReceiveFromThirdParty = 'receiveFromThirdParty', + ReceiveFromTransferInstrument = 'receiveFromTransferInstrument', + ReceiveGrants = 'receiveGrants', + ReceivePayments = 'receivePayments', + SendToBalanceAccount = 'sendToBalanceAccount', + SendToThirdParty = 'sendToThirdParty', + SendToTransferInstrument = 'sendToTransferInstrument', + ThirdPartyFunding = 'thirdPartyFunding', + UseCard = 'useCard', + UseCardCommercial = 'useCardCommercial', + UseCardConsumer = 'useCardConsumer', + UseCardInRestrictedCountries = 'useCardInRestrictedCountries', + UseCardInRestrictedCountriesCommercial = 'useCardInRestrictedCountriesCommercial', + UseCardInRestrictedCountriesConsumer = 'useCardInRestrictedCountriesConsumer', + UseCardInRestrictedIndustries = 'useCardInRestrictedIndustries', + UseCardInRestrictedIndustriesCommercial = 'useCardInRestrictedIndustriesCommercial', + UseCardInRestrictedIndustriesConsumer = 'useCardInRestrictedIndustriesConsumer', + UseChargeCard = 'useChargeCard', + UseChargeCardCommercial = 'useChargeCardCommercial', + WithdrawFromAtm = 'withdrawFromAtm', + WithdrawFromAtmCommercial = 'withdrawFromAtmCommercial', + WithdrawFromAtmConsumer = 'withdrawFromAtmConsumer', + WithdrawFromAtmInRestrictedCountries = 'withdrawFromAtmInRestrictedCountries', + WithdrawFromAtmInRestrictedCountriesCommercial = 'withdrawFromAtmInRestrictedCountriesCommercial', + WithdrawFromAtmInRestrictedCountriesConsumer = 'withdrawFromAtmInRestrictedCountriesConsumer' } export enum TypeEnum { - DataMissing = 'dataMissing', - InvalidInput = 'invalidInput', - PendingStatus = 'pendingStatus' + DataMissing = 'dataMissing', + InvalidInput = 'invalidInput', + PendingStatus = 'pendingStatus' } } diff --git a/src/typings/dataProtection/models.ts b/src/typings/dataProtection/models.ts index a7706f034..9ae7eb3aa 100644 --- a/src/typings/dataProtection/models.ts +++ b/src/typings/dataProtection/models.ts @@ -1,17 +1,21 @@ -/* - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - +import localVarRequest from 'request'; export * from './serviceError'; export * from './subjectErasureByPspReferenceRequest'; export * from './subjectErasureResponse'; +import * as fs from 'fs'; + +export interface RequestDetailedFile { + value: Buffer; + options?: { + filename?: string; + contentType?: string; + } +} + +export type RequestFile = string | Buffer | fs.ReadStream | RequestDetailedFile; + import { ServiceError } from './serviceError'; import { SubjectErasureByPspReferenceRequest } from './subjectErasureByPspReferenceRequest'; @@ -39,6 +43,23 @@ let typeMap: {[index: string]: any} = { "SubjectErasureResponse": SubjectErasureResponse, } +// Check if a string starts with another string without using es6 features +function startsWith(str: string, match: string): boolean { + return str.substring(0, match.length) === match; +} + +// Check if a string ends with another string without using es6 features +function endsWith(str: string, match: string): boolean { + return str.length >= match.length && str.substring(str.length - match.length) === match; +} + +const nullableSuffix = " | null"; +const optionalSuffix = " | undefined"; +const arrayPrefix = "Array<"; +const arraySuffix = ">"; +const mapPrefix = "{ [key: string]: "; +const mapSuffix = "; }"; + export class ObjectSerializer { public static findCorrectType(data: any, expectedType: string) { if (data == undefined) { @@ -75,25 +96,37 @@ export class ObjectSerializer { } } - public static serialize(data: any, type: string) { + public static serialize(data: any, type: string): any { if (data == undefined) { return data; } else if (primitives.indexOf(type.toLowerCase()) !== -1) { return data; - } else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6 - let subType: string = type.replace("Array<", ""); // Array => Type> - subType = subType.substring(0, subType.length - 1); // Type> => Type + } else if (endsWith(type, nullableSuffix)) { + let subType: string = type.slice(0, -nullableSuffix.length); // Type | null => Type + return ObjectSerializer.serialize(data, subType); + } else if (endsWith(type, optionalSuffix)) { + let subType: string = type.slice(0, -optionalSuffix.length); // Type | undefined => Type + return ObjectSerializer.serialize(data, subType); + } else if (startsWith(type, arrayPrefix)) { + let subType: string = type.slice(arrayPrefix.length, -arraySuffix.length); // Array => Type let transformedData: any[] = []; for (let index = 0; index < data.length; index++) { let datum = data[index]; transformedData.push(ObjectSerializer.serialize(datum, subType)); } return transformedData; + } else if (startsWith(type, mapPrefix)) { + let subType: string = type.slice(mapPrefix.length, -mapSuffix.length); // { [key: string]: Type; } => Type + let transformedData: { [key: string]: any } = {}; + for (let key in data) { + transformedData[key] = ObjectSerializer.serialize( + data[key], + subType, + ); + } + return transformedData; } else if (type === "Date") { return data.toISOString(); - } else if (type === "SaleToAcquirerData") { - const dataString = JSON.stringify(data); - return Buffer.from(dataString).toString("base64"); } else { if (enumsMap[type]) { return data; @@ -116,22 +149,37 @@ export class ObjectSerializer { } } - public static deserialize(data: any, type: string) { + public static deserialize(data: any, type: string): any { // polymorphism may change the actual type. type = ObjectSerializer.findCorrectType(data, type); if (data == undefined) { return data; } else if (primitives.indexOf(type.toLowerCase()) !== -1) { return data; - } else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6 - let subType: string = type.replace("Array<", ""); // Array => Type> - subType = subType.substring(0, subType.length - 1); // Type> => Type + } else if (endsWith(type, nullableSuffix)) { + let subType: string = type.slice(0, -nullableSuffix.length); // Type | null => Type + return ObjectSerializer.deserialize(data, subType); + } else if (endsWith(type, optionalSuffix)) { + let subType: string = type.slice(0, -optionalSuffix.length); // Type | undefined => Type + return ObjectSerializer.deserialize(data, subType); + } else if (startsWith(type, arrayPrefix)) { + let subType: string = type.slice(arrayPrefix.length, -arraySuffix.length); // Array => Type let transformedData: any[] = []; for (let index = 0; index < data.length; index++) { let datum = data[index]; transformedData.push(ObjectSerializer.deserialize(datum, subType)); } return transformedData; + } else if (startsWith(type, mapPrefix)) { + let subType: string = type.slice(mapPrefix.length, -mapSuffix.length); // { [key: string]: Type; } => Type + let transformedData: { [key: string]: any } = {}; + for (let key in data) { + transformedData[key] = ObjectSerializer.deserialize( + data[key], + subType, + ); + } + return transformedData; } else if (type === "Date") { return new Date(data); } else { @@ -152,3 +200,77 @@ export class ObjectSerializer { } } } + +export interface Authentication { + /** + * Apply authentication settings to header and query params. + */ + applyToRequest(requestOptions: localVarRequest.Options): Promise | void; +} + +export class HttpBasicAuth implements Authentication { + public username: string = ''; + public password: string = ''; + + applyToRequest(requestOptions: localVarRequest.Options): void { + requestOptions.auth = { + username: this.username, password: this.password + } + } +} + +export class HttpBearerAuth implements Authentication { + public accessToken: string | (() => string) = ''; + + applyToRequest(requestOptions: localVarRequest.Options): void { + if (requestOptions && requestOptions.headers) { + const accessToken = typeof this.accessToken === 'function' + ? this.accessToken() + : this.accessToken; + requestOptions.headers["Authorization"] = "Bearer " + accessToken; + } + } +} + +export class ApiKeyAuth implements Authentication { + public apiKey: string = ''; + + constructor(private location: string, private paramName: string) { + } + + applyToRequest(requestOptions: localVarRequest.Options): void { + if (this.location == "query") { + (requestOptions.qs)[this.paramName] = this.apiKey; + } else if (this.location == "header" && requestOptions && requestOptions.headers) { + requestOptions.headers[this.paramName] = this.apiKey; + } else if (this.location == 'cookie' && requestOptions && requestOptions.headers) { + if (requestOptions.headers['Cookie']) { + requestOptions.headers['Cookie'] += '; ' + this.paramName + '=' + encodeURIComponent(this.apiKey); + } + else { + requestOptions.headers['Cookie'] = this.paramName + '=' + encodeURIComponent(this.apiKey); + } + } + } +} + +export class OAuth implements Authentication { + public accessToken: string = ''; + + applyToRequest(requestOptions: localVarRequest.Options): void { + if (requestOptions && requestOptions.headers) { + requestOptions.headers["Authorization"] = "Bearer " + this.accessToken; + } + } +} + +export class VoidAuth implements Authentication { + public username: string = ''; + public password: string = ''; + + applyToRequest(_: localVarRequest.Options): void { + // Do nothing + } +} + +export type Interceptor = (requestOptions: localVarRequest.Options) => (Promise | void); diff --git a/src/typings/dataProtection/subjectErasureResponse.ts b/src/typings/dataProtection/subjectErasureResponse.ts index 218c54038..78bdc2442 100644 --- a/src/typings/dataProtection/subjectErasureResponse.ts +++ b/src/typings/dataProtection/subjectErasureResponse.ts @@ -30,9 +30,9 @@ export class SubjectErasureResponse { export namespace SubjectErasureResponse { export enum ResultEnum { - ActiveRecurringTokenExists = 'ACTIVE_RECURRING_TOKEN_EXISTS', - AlreadyProcessed = 'ALREADY_PROCESSED', - PaymentNotFound = 'PAYMENT_NOT_FOUND', - Success = 'SUCCESS' + ActiveRecurringTokenExists = 'ACTIVE_RECURRING_TOKEN_EXISTS', + AlreadyProcessed = 'ALREADY_PROCESSED', + PaymentNotFound = 'PAYMENT_NOT_FOUND', + Success = 'SUCCESS' } } diff --git a/src/typings/disputeWebhooks/disputeEventNotification.ts b/src/typings/disputeWebhooks/disputeEventNotification.ts index dc83ab604..dfa4c2ac7 100644 --- a/src/typings/disputeWebhooks/disputeEventNotification.ts +++ b/src/typings/disputeWebhooks/disputeEventNotification.ts @@ -26,7 +26,7 @@ export class DisputeEventNotification { * Contains information about the dispute. */ 'description'?: string; - 'disputedAmount'?: Amount | null; + 'disputedAmount'?: Amount; /** * The ID of the resource. */ @@ -74,7 +74,7 @@ export class DisputeEventNotification { { "name": "disputedAmount", "baseName": "disputedAmount", - "type": "Amount | null" + "type": "Amount" }, { "name": "id", @@ -109,7 +109,7 @@ export class DisputeEventNotification { export namespace DisputeEventNotification { export enum TypeEnum { - Fraud = 'fraud', - NotDelivered = 'notDelivered' + Fraud = 'fraud', + NotDelivered = 'notDelivered' } } diff --git a/src/typings/disputeWebhooks/disputeNotificationRequest.ts b/src/typings/disputeWebhooks/disputeNotificationRequest.ts index a39c7ec70..6c53640f7 100644 --- a/src/typings/disputeWebhooks/disputeNotificationRequest.ts +++ b/src/typings/disputeWebhooks/disputeNotificationRequest.ts @@ -37,7 +37,7 @@ export class DisputeNotificationRequest { export namespace DisputeNotificationRequest { export enum TypeEnum { - Created = 'balancePlatform.dispute.created', - Updated = 'balancePlatform.dispute.updated' + BalancePlatformDisputeCreated = 'balancePlatform.dispute.created', + BalancePlatformDisputeUpdated = 'balancePlatform.dispute.updated' } } diff --git a/src/typings/disputeWebhooks/models.ts b/src/typings/disputeWebhooks/models.ts index def86d6e4..54ba4d82b 100644 --- a/src/typings/disputeWebhooks/models.ts +++ b/src/typings/disputeWebhooks/models.ts @@ -1,18 +1,22 @@ -/* - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - +import localVarRequest from 'request'; export * from './amount'; export * from './balancePlatformNotificationResponse'; export * from './disputeEventNotification'; export * from './disputeNotificationRequest'; +import * as fs from 'fs'; + +export interface RequestDetailedFile { + value: Buffer; + options?: { + filename?: string; + contentType?: string; + } +} + +export type RequestFile = string | Buffer | fs.ReadStream | RequestDetailedFile; + import { Amount } from './amount'; import { BalancePlatformNotificationResponse } from './balancePlatformNotificationResponse'; @@ -43,6 +47,23 @@ let typeMap: {[index: string]: any} = { "DisputeNotificationRequest": DisputeNotificationRequest, } +// Check if a string starts with another string without using es6 features +function startsWith(str: string, match: string): boolean { + return str.substring(0, match.length) === match; +} + +// Check if a string ends with another string without using es6 features +function endsWith(str: string, match: string): boolean { + return str.length >= match.length && str.substring(str.length - match.length) === match; +} + +const nullableSuffix = " | null"; +const optionalSuffix = " | undefined"; +const arrayPrefix = "Array<"; +const arraySuffix = ">"; +const mapPrefix = "{ [key: string]: "; +const mapSuffix = "; }"; + export class ObjectSerializer { public static findCorrectType(data: any, expectedType: string) { if (data == undefined) { @@ -79,25 +100,37 @@ export class ObjectSerializer { } } - public static serialize(data: any, type: string) { + public static serialize(data: any, type: string): any { if (data == undefined) { return data; } else if (primitives.indexOf(type.toLowerCase()) !== -1) { return data; - } else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6 - let subType: string = type.replace("Array<", ""); // Array => Type> - subType = subType.substring(0, subType.length - 1); // Type> => Type + } else if (endsWith(type, nullableSuffix)) { + let subType: string = type.slice(0, -nullableSuffix.length); // Type | null => Type + return ObjectSerializer.serialize(data, subType); + } else if (endsWith(type, optionalSuffix)) { + let subType: string = type.slice(0, -optionalSuffix.length); // Type | undefined => Type + return ObjectSerializer.serialize(data, subType); + } else if (startsWith(type, arrayPrefix)) { + let subType: string = type.slice(arrayPrefix.length, -arraySuffix.length); // Array => Type let transformedData: any[] = []; for (let index = 0; index < data.length; index++) { let datum = data[index]; transformedData.push(ObjectSerializer.serialize(datum, subType)); } return transformedData; + } else if (startsWith(type, mapPrefix)) { + let subType: string = type.slice(mapPrefix.length, -mapSuffix.length); // { [key: string]: Type; } => Type + let transformedData: { [key: string]: any } = {}; + for (let key in data) { + transformedData[key] = ObjectSerializer.serialize( + data[key], + subType, + ); + } + return transformedData; } else if (type === "Date") { return data.toISOString(); - } else if (type === "SaleToAcquirerData") { - const dataString = JSON.stringify(data); - return Buffer.from(dataString).toString("base64"); } else { if (enumsMap[type]) { return data; @@ -120,22 +153,37 @@ export class ObjectSerializer { } } - public static deserialize(data: any, type: string) { + public static deserialize(data: any, type: string): any { // polymorphism may change the actual type. type = ObjectSerializer.findCorrectType(data, type); if (data == undefined) { return data; } else if (primitives.indexOf(type.toLowerCase()) !== -1) { return data; - } else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6 - let subType: string = type.replace("Array<", ""); // Array => Type> - subType = subType.substring(0, subType.length - 1); // Type> => Type + } else if (endsWith(type, nullableSuffix)) { + let subType: string = type.slice(0, -nullableSuffix.length); // Type | null => Type + return ObjectSerializer.deserialize(data, subType); + } else if (endsWith(type, optionalSuffix)) { + let subType: string = type.slice(0, -optionalSuffix.length); // Type | undefined => Type + return ObjectSerializer.deserialize(data, subType); + } else if (startsWith(type, arrayPrefix)) { + let subType: string = type.slice(arrayPrefix.length, -arraySuffix.length); // Array => Type let transformedData: any[] = []; for (let index = 0; index < data.length; index++) { let datum = data[index]; transformedData.push(ObjectSerializer.deserialize(datum, subType)); } return transformedData; + } else if (startsWith(type, mapPrefix)) { + let subType: string = type.slice(mapPrefix.length, -mapSuffix.length); // { [key: string]: Type; } => Type + let transformedData: { [key: string]: any } = {}; + for (let key in data) { + transformedData[key] = ObjectSerializer.deserialize( + data[key], + subType, + ); + } + return transformedData; } else if (type === "Date") { return new Date(data); } else { @@ -156,3 +204,77 @@ export class ObjectSerializer { } } } + +export interface Authentication { + /** + * Apply authentication settings to header and query params. + */ + applyToRequest(requestOptions: localVarRequest.Options): Promise | void; +} + +export class HttpBasicAuth implements Authentication { + public username: string = ''; + public password: string = ''; + + applyToRequest(requestOptions: localVarRequest.Options): void { + requestOptions.auth = { + username: this.username, password: this.password + } + } +} + +export class HttpBearerAuth implements Authentication { + public accessToken: string | (() => string) = ''; + + applyToRequest(requestOptions: localVarRequest.Options): void { + if (requestOptions && requestOptions.headers) { + const accessToken = typeof this.accessToken === 'function' + ? this.accessToken() + : this.accessToken; + requestOptions.headers["Authorization"] = "Bearer " + accessToken; + } + } +} + +export class ApiKeyAuth implements Authentication { + public apiKey: string = ''; + + constructor(private location: string, private paramName: string) { + } + + applyToRequest(requestOptions: localVarRequest.Options): void { + if (this.location == "query") { + (requestOptions.qs)[this.paramName] = this.apiKey; + } else if (this.location == "header" && requestOptions && requestOptions.headers) { + requestOptions.headers[this.paramName] = this.apiKey; + } else if (this.location == 'cookie' && requestOptions && requestOptions.headers) { + if (requestOptions.headers['Cookie']) { + requestOptions.headers['Cookie'] += '; ' + this.paramName + '=' + encodeURIComponent(this.apiKey); + } + else { + requestOptions.headers['Cookie'] = this.paramName + '=' + encodeURIComponent(this.apiKey); + } + } + } +} + +export class OAuth implements Authentication { + public accessToken: string = ''; + + applyToRequest(requestOptions: localVarRequest.Options): void { + if (requestOptions && requestOptions.headers) { + requestOptions.headers["Authorization"] = "Bearer " + this.accessToken; + } + } +} + +export class VoidAuth implements Authentication { + public username: string = ''; + public password: string = ''; + + applyToRequest(_: localVarRequest.Options): void { + // Do nothing + } +} + +export type Interceptor = (requestOptions: localVarRequest.Options) => (Promise | void); diff --git a/src/typings/disputes/models.ts b/src/typings/disputes/models.ts index 672401800..c13ca1fbd 100644 --- a/src/typings/disputes/models.ts +++ b/src/typings/disputes/models.ts @@ -1,12 +1,4 @@ -/* - * The version of the OpenAPI document: v30 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - +import localVarRequest from 'request'; export * from './acceptDisputeRequest'; export * from './acceptDisputeResponse'; @@ -24,6 +16,18 @@ export * from './serviceError'; export * from './supplyDefenseDocumentRequest'; export * from './supplyDefenseDocumentResponse'; +import * as fs from 'fs'; + +export interface RequestDetailedFile { + value: Buffer; + options?: { + filename?: string; + contentType?: string; + } +} + +export type RequestFile = string | Buffer | fs.ReadStream | RequestDetailedFile; + import { AcceptDisputeRequest } from './acceptDisputeRequest'; import { AcceptDisputeResponse } from './acceptDisputeResponse'; @@ -74,6 +78,23 @@ let typeMap: {[index: string]: any} = { "SupplyDefenseDocumentResponse": SupplyDefenseDocumentResponse, } +// Check if a string starts with another string without using es6 features +function startsWith(str: string, match: string): boolean { + return str.substring(0, match.length) === match; +} + +// Check if a string ends with another string without using es6 features +function endsWith(str: string, match: string): boolean { + return str.length >= match.length && str.substring(str.length - match.length) === match; +} + +const nullableSuffix = " | null"; +const optionalSuffix = " | undefined"; +const arrayPrefix = "Array<"; +const arraySuffix = ">"; +const mapPrefix = "{ [key: string]: "; +const mapSuffix = "; }"; + export class ObjectSerializer { public static findCorrectType(data: any, expectedType: string) { if (data == undefined) { @@ -110,25 +131,37 @@ export class ObjectSerializer { } } - public static serialize(data: any, type: string) { + public static serialize(data: any, type: string): any { if (data == undefined) { return data; } else if (primitives.indexOf(type.toLowerCase()) !== -1) { return data; - } else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6 - let subType: string = type.replace("Array<", ""); // Array => Type> - subType = subType.substring(0, subType.length - 1); // Type> => Type + } else if (endsWith(type, nullableSuffix)) { + let subType: string = type.slice(0, -nullableSuffix.length); // Type | null => Type + return ObjectSerializer.serialize(data, subType); + } else if (endsWith(type, optionalSuffix)) { + let subType: string = type.slice(0, -optionalSuffix.length); // Type | undefined => Type + return ObjectSerializer.serialize(data, subType); + } else if (startsWith(type, arrayPrefix)) { + let subType: string = type.slice(arrayPrefix.length, -arraySuffix.length); // Array => Type let transformedData: any[] = []; for (let index = 0; index < data.length; index++) { let datum = data[index]; transformedData.push(ObjectSerializer.serialize(datum, subType)); } return transformedData; + } else if (startsWith(type, mapPrefix)) { + let subType: string = type.slice(mapPrefix.length, -mapSuffix.length); // { [key: string]: Type; } => Type + let transformedData: { [key: string]: any } = {}; + for (let key in data) { + transformedData[key] = ObjectSerializer.serialize( + data[key], + subType, + ); + } + return transformedData; } else if (type === "Date") { return data.toISOString(); - } else if (type === "SaleToAcquirerData") { - const dataString = JSON.stringify(data); - return Buffer.from(dataString).toString("base64"); } else { if (enumsMap[type]) { return data; @@ -151,22 +184,37 @@ export class ObjectSerializer { } } - public static deserialize(data: any, type: string) { + public static deserialize(data: any, type: string): any { // polymorphism may change the actual type. type = ObjectSerializer.findCorrectType(data, type); if (data == undefined) { return data; } else if (primitives.indexOf(type.toLowerCase()) !== -1) { return data; - } else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6 - let subType: string = type.replace("Array<", ""); // Array => Type> - subType = subType.substring(0, subType.length - 1); // Type> => Type + } else if (endsWith(type, nullableSuffix)) { + let subType: string = type.slice(0, -nullableSuffix.length); // Type | null => Type + return ObjectSerializer.deserialize(data, subType); + } else if (endsWith(type, optionalSuffix)) { + let subType: string = type.slice(0, -optionalSuffix.length); // Type | undefined => Type + return ObjectSerializer.deserialize(data, subType); + } else if (startsWith(type, arrayPrefix)) { + let subType: string = type.slice(arrayPrefix.length, -arraySuffix.length); // Array => Type let transformedData: any[] = []; for (let index = 0; index < data.length; index++) { let datum = data[index]; transformedData.push(ObjectSerializer.deserialize(datum, subType)); } return transformedData; + } else if (startsWith(type, mapPrefix)) { + let subType: string = type.slice(mapPrefix.length, -mapSuffix.length); // { [key: string]: Type; } => Type + let transformedData: { [key: string]: any } = {}; + for (let key in data) { + transformedData[key] = ObjectSerializer.deserialize( + data[key], + subType, + ); + } + return transformedData; } else if (type === "Date") { return new Date(data); } else { @@ -187,3 +235,77 @@ export class ObjectSerializer { } } } + +export interface Authentication { + /** + * Apply authentication settings to header and query params. + */ + applyToRequest(requestOptions: localVarRequest.Options): Promise | void; +} + +export class HttpBasicAuth implements Authentication { + public username: string = ''; + public password: string = ''; + + applyToRequest(requestOptions: localVarRequest.Options): void { + requestOptions.auth = { + username: this.username, password: this.password + } + } +} + +export class HttpBearerAuth implements Authentication { + public accessToken: string | (() => string) = ''; + + applyToRequest(requestOptions: localVarRequest.Options): void { + if (requestOptions && requestOptions.headers) { + const accessToken = typeof this.accessToken === 'function' + ? this.accessToken() + : this.accessToken; + requestOptions.headers["Authorization"] = "Bearer " + accessToken; + } + } +} + +export class ApiKeyAuth implements Authentication { + public apiKey: string = ''; + + constructor(private location: string, private paramName: string) { + } + + applyToRequest(requestOptions: localVarRequest.Options): void { + if (this.location == "query") { + (requestOptions.qs)[this.paramName] = this.apiKey; + } else if (this.location == "header" && requestOptions && requestOptions.headers) { + requestOptions.headers[this.paramName] = this.apiKey; + } else if (this.location == 'cookie' && requestOptions && requestOptions.headers) { + if (requestOptions.headers['Cookie']) { + requestOptions.headers['Cookie'] += '; ' + this.paramName + '=' + encodeURIComponent(this.apiKey); + } + else { + requestOptions.headers['Cookie'] = this.paramName + '=' + encodeURIComponent(this.apiKey); + } + } + } +} + +export class OAuth implements Authentication { + public accessToken: string = ''; + + applyToRequest(requestOptions: localVarRequest.Options): void { + if (requestOptions && requestOptions.headers) { + requestOptions.headers["Authorization"] = "Bearer " + this.accessToken; + } + } +} + +export class VoidAuth implements Authentication { + public username: string = ''; + public password: string = ''; + + applyToRequest(_: localVarRequest.Options): void { + // Do nothing + } +} + +export type Interceptor = (requestOptions: localVarRequest.Options) => (Promise | void); diff --git a/src/typings/legalEntityManagement/aULocalAccountIdentification.ts b/src/typings/legalEntityManagement/aULocalAccountIdentification.ts index 9993f58ac..9503781f9 100644 --- a/src/typings/legalEntityManagement/aULocalAccountIdentification.ts +++ b/src/typings/legalEntityManagement/aULocalAccountIdentification.ts @@ -20,7 +20,7 @@ export class AULocalAccountIdentification { /** * **auLocal** */ - 'type': AULocalAccountIdentification.TypeEnum; + 'type': AULocalAccountIdentification.TypeEnum = AULocalAccountIdentification.TypeEnum.AuLocal; static discriminator: string | undefined = undefined; @@ -48,6 +48,6 @@ export class AULocalAccountIdentification { export namespace AULocalAccountIdentification { export enum TypeEnum { - AuLocal = 'auLocal' + AuLocal = 'auLocal' } } diff --git a/src/typings/legalEntityManagement/acceptTermsOfServiceResponse.ts b/src/typings/legalEntityManagement/acceptTermsOfServiceResponse.ts index aaf7fc55a..84c8b0f66 100644 --- a/src/typings/legalEntityManagement/acceptTermsOfServiceResponse.ts +++ b/src/typings/legalEntityManagement/acceptTermsOfServiceResponse.ts @@ -75,14 +75,14 @@ export class AcceptTermsOfServiceResponse { export namespace AcceptTermsOfServiceResponse { export enum TypeEnum { - AdyenAccount = 'adyenAccount', - AdyenCapital = 'adyenCapital', - AdyenCard = 'adyenCard', - AdyenChargeCard = 'adyenChargeCard', - AdyenForPlatformsAdvanced = 'adyenForPlatformsAdvanced', - AdyenForPlatformsManage = 'adyenForPlatformsManage', - AdyenFranchisee = 'adyenFranchisee', - AdyenIssuing = 'adyenIssuing', - AdyenPccr = 'adyenPccr' + AdyenAccount = 'adyenAccount', + AdyenCapital = 'adyenCapital', + AdyenCard = 'adyenCard', + AdyenChargeCard = 'adyenChargeCard', + AdyenForPlatformsAdvanced = 'adyenForPlatformsAdvanced', + AdyenForPlatformsManage = 'adyenForPlatformsManage', + AdyenFranchisee = 'adyenFranchisee', + AdyenIssuing = 'adyenIssuing', + AdyenPccr = 'adyenPccr' } } diff --git a/src/typings/legalEntityManagement/additionalBankIdentification.ts b/src/typings/legalEntityManagement/additionalBankIdentification.ts index 381c4c2cb..b6ff88a52 100644 --- a/src/typings/legalEntityManagement/additionalBankIdentification.ts +++ b/src/typings/legalEntityManagement/additionalBankIdentification.ts @@ -39,7 +39,7 @@ export class AdditionalBankIdentification { export namespace AdditionalBankIdentification { export enum TypeEnum { - GbSortCode = 'gbSortCode', - UsRoutingNumber = 'usRoutingNumber' + GbSortCode = 'gbSortCode', + UsRoutingNumber = 'usRoutingNumber' } } diff --git a/src/typings/legalEntityManagement/bankAccountInfo.ts b/src/typings/legalEntityManagement/bankAccountInfo.ts index 18837be00..f7848f47b 100644 --- a/src/typings/legalEntityManagement/bankAccountInfo.ts +++ b/src/typings/legalEntityManagement/bankAccountInfo.ts @@ -7,27 +7,10 @@ * Do not edit this class manually. */ -import { AULocalAccountIdentification } from './aULocalAccountIdentification'; -import { CALocalAccountIdentification } from './cALocalAccountIdentification'; -import { CZLocalAccountIdentification } from './cZLocalAccountIdentification'; -import { DKLocalAccountIdentification } from './dKLocalAccountIdentification'; -import { HKLocalAccountIdentification } from './hKLocalAccountIdentification'; -import { HULocalAccountIdentification } from './hULocalAccountIdentification'; -import { IbanAccountIdentification } from './ibanAccountIdentification'; -import { NOLocalAccountIdentification } from './nOLocalAccountIdentification'; -import { NZLocalAccountIdentification } from './nZLocalAccountIdentification'; -import { NumberAndBicAccountIdentification } from './numberAndBicAccountIdentification'; -import { PLLocalAccountIdentification } from './pLLocalAccountIdentification'; -import { SELocalAccountIdentification } from './sELocalAccountIdentification'; -import { SGLocalAccountIdentification } from './sGLocalAccountIdentification'; -import { UKLocalAccountIdentification } from './uKLocalAccountIdentification'; -import { USLocalAccountIdentification } from './uSLocalAccountIdentification'; +import { BankAccountInfoAccountIdentification } from './bankAccountInfoAccountIdentification'; export class BankAccountInfo { - /** - * Identification of the bank account. - */ - 'accountIdentification'?: AULocalAccountIdentification | CALocalAccountIdentification | CZLocalAccountIdentification | DKLocalAccountIdentification | HKLocalAccountIdentification | HULocalAccountIdentification | IbanAccountIdentification | NOLocalAccountIdentification | NZLocalAccountIdentification | NumberAndBicAccountIdentification | PLLocalAccountIdentification | SELocalAccountIdentification | SGLocalAccountIdentification | UKLocalAccountIdentification | USLocalAccountIdentification | null; + 'accountIdentification'?: BankAccountInfoAccountIdentification; /** * The type of bank account. * @@ -53,7 +36,7 @@ export class BankAccountInfo { { "name": "accountIdentification", "baseName": "accountIdentification", - "type": "AULocalAccountIdentification | CALocalAccountIdentification | CZLocalAccountIdentification | DKLocalAccountIdentification | HKLocalAccountIdentification | HULocalAccountIdentification | IbanAccountIdentification | NOLocalAccountIdentification | NZLocalAccountIdentification | NumberAndBicAccountIdentification | PLLocalAccountIdentification | SELocalAccountIdentification | SGLocalAccountIdentification | UKLocalAccountIdentification | USLocalAccountIdentification | null" + "type": "BankAccountInfoAccountIdentification" }, { "name": "accountType", diff --git a/src/typings/legalEntityManagement/bankAccountInfoAccountIdentification.ts b/src/typings/legalEntityManagement/bankAccountInfoAccountIdentification.ts new file mode 100644 index 000000000..d16e311fe --- /dev/null +++ b/src/typings/legalEntityManagement/bankAccountInfoAccountIdentification.ts @@ -0,0 +1,186 @@ +/* + * The version of the OpenAPI document: v3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { AULocalAccountIdentification } from './aULocalAccountIdentification'; +import { AdditionalBankIdentification } from './additionalBankIdentification'; +import { CALocalAccountIdentification } from './cALocalAccountIdentification'; +import { CZLocalAccountIdentification } from './cZLocalAccountIdentification'; +import { DKLocalAccountIdentification } from './dKLocalAccountIdentification'; +import { HKLocalAccountIdentification } from './hKLocalAccountIdentification'; +import { HULocalAccountIdentification } from './hULocalAccountIdentification'; +import { IbanAccountIdentification } from './ibanAccountIdentification'; +import { NOLocalAccountIdentification } from './nOLocalAccountIdentification'; +import { NZLocalAccountIdentification } from './nZLocalAccountIdentification'; +import { NumberAndBicAccountIdentification } from './numberAndBicAccountIdentification'; +import { PLLocalAccountIdentification } from './pLLocalAccountIdentification'; +import { SELocalAccountIdentification } from './sELocalAccountIdentification'; +import { SGLocalAccountIdentification } from './sGLocalAccountIdentification'; +import { UKLocalAccountIdentification } from './uKLocalAccountIdentification'; +import { USLocalAccountIdentification } from './uSLocalAccountIdentification'; + +/** +* Identification of the bank account. +*/ +export class BankAccountInfoAccountIdentification { + /** + * The bank account number, without separators or whitespace. + */ + 'accountNumber': string; + /** + * The 6-digit [Bank State Branch (BSB) code](https://en.wikipedia.org/wiki/Bank_state_branch), without separators or whitespace. + */ + 'bsbCode': string; + /** + * **auLocal** + */ + 'type': BankAccountInfoAccountIdentification.TypeEnum = BankAccountInfoAccountIdentification.TypeEnum.AuLocal; + /** + * The bank account type. Possible values: **checking** or **savings**. Defaults to **checking**. + */ + 'accountType'?: BankAccountInfoAccountIdentification.AccountTypeEnum = BankAccountInfoAccountIdentification.AccountTypeEnum.Checking; + /** + * The 3-digit institution number, without separators or whitespace. + */ + 'institutionNumber': string; + /** + * The 5-digit transit number, without separators or whitespace. + */ + 'transitNumber': string; + /** + * The 4-digit bank code (Registreringsnummer) (without separators or whitespace). + */ + 'bankCode': string; + /** + * The 3-digit clearing code, without separators or whitespace. + */ + 'clearingCode': string; + /** + * The international bank account number as defined in the [ISO-13616](https://www.iso.org/standard/81090.html) standard. + */ + 'iban': string; + 'additionalBankIdentification'?: AdditionalBankIdentification; + /** + * The bank\'s 8- or 11-character BIC or SWIFT code. + */ + 'bic': string; + /** + * The 4- to 5-digit clearing number ([Clearingnummer](https://sv.wikipedia.org/wiki/Clearingnummer)), without separators or whitespace. + */ + 'clearingNumber': string; + /** + * The 6-digit [sort code](https://en.wikipedia.org/wiki/Sort_code), without separators or whitespace. + */ + 'sortCode': string; + /** + * The 9-digit [routing number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without separators or whitespace. + */ + 'routingNumber': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "accountNumber", + "baseName": "accountNumber", + "type": "string" + }, + { + "name": "bsbCode", + "baseName": "bsbCode", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "BankAccountInfoAccountIdentification.TypeEnum" + }, + { + "name": "accountType", + "baseName": "accountType", + "type": "BankAccountInfoAccountIdentification.AccountTypeEnum" + }, + { + "name": "institutionNumber", + "baseName": "institutionNumber", + "type": "string" + }, + { + "name": "transitNumber", + "baseName": "transitNumber", + "type": "string" + }, + { + "name": "bankCode", + "baseName": "bankCode", + "type": "string" + }, + { + "name": "clearingCode", + "baseName": "clearingCode", + "type": "string" + }, + { + "name": "iban", + "baseName": "iban", + "type": "string" + }, + { + "name": "additionalBankIdentification", + "baseName": "additionalBankIdentification", + "type": "AdditionalBankIdentification" + }, + { + "name": "bic", + "baseName": "bic", + "type": "string" + }, + { + "name": "clearingNumber", + "baseName": "clearingNumber", + "type": "string" + }, + { + "name": "sortCode", + "baseName": "sortCode", + "type": "string" + }, + { + "name": "routingNumber", + "baseName": "routingNumber", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return BankAccountInfoAccountIdentification.attributeTypeMap; + } +} + +export namespace BankAccountInfoAccountIdentification { + export enum TypeEnum { + AuLocal = 'auLocal', + CaLocal = 'caLocal', + CzLocal = 'czLocal', + DkLocal = 'dkLocal', + HkLocal = 'hkLocal', + HuLocal = 'huLocal', + Iban = 'iban', + NoLocal = 'noLocal', + NzLocal = 'nzLocal', + NumberAndBic = 'numberAndBic', + PlLocal = 'plLocal', + SeLocal = 'seLocal', + SgLocal = 'sgLocal', + UkLocal = 'ukLocal', + UsLocal = 'usLocal' + } + export enum AccountTypeEnum { + Checking = 'checking', + Savings = 'savings' + } +} diff --git a/src/typings/legalEntityManagement/businessLine.ts b/src/typings/legalEntityManagement/businessLine.ts index 59e884094..4e8747c8c 100644 --- a/src/typings/legalEntityManagement/businessLine.ts +++ b/src/typings/legalEntityManagement/businessLine.ts @@ -44,12 +44,12 @@ export class BusinessLine { * The service for which you are creating the business line. Possible values: * **paymentProcessing** * **banking** */ 'service': BusinessLine.ServiceEnum; - 'sourceOfFunds'?: SourceOfFunds | null; + 'sourceOfFunds'?: SourceOfFunds; /** * List of website URLs where your user\'s goods or services are sold. When this is required for a service but your user does not have an online presence, provide the reason in the `webDataExemption` object. */ 'webData'?: Array; - 'webDataExemption'?: WebDataExemption | null; + 'webDataExemption'?: WebDataExemption; static discriminator: string | undefined = undefined; @@ -92,7 +92,7 @@ export class BusinessLine { { "name": "sourceOfFunds", "baseName": "sourceOfFunds", - "type": "SourceOfFunds | null" + "type": "SourceOfFunds" }, { "name": "webData", @@ -102,7 +102,7 @@ export class BusinessLine { { "name": "webDataExemption", "baseName": "webDataExemption", - "type": "WebDataExemption | null" + "type": "WebDataExemption" } ]; static getAttributeTypeMap() { @@ -112,12 +112,12 @@ export class BusinessLine { export namespace BusinessLine { export enum CapabilityEnum { - ReceivePayments = 'receivePayments', - ReceiveFromPlatformPayments = 'receiveFromPlatformPayments', - IssueBankAccount = 'issueBankAccount' + ReceivePayments = 'receivePayments', + ReceiveFromPlatformPayments = 'receiveFromPlatformPayments', + IssueBankAccount = 'issueBankAccount' } export enum ServiceEnum { - PaymentProcessing = 'paymentProcessing', - Banking = 'banking' + PaymentProcessing = 'paymentProcessing', + Banking = 'banking' } } diff --git a/src/typings/legalEntityManagement/businessLineInfo.ts b/src/typings/legalEntityManagement/businessLineInfo.ts index ebe9ca74a..50de40cac 100644 --- a/src/typings/legalEntityManagement/businessLineInfo.ts +++ b/src/typings/legalEntityManagement/businessLineInfo.ts @@ -35,12 +35,12 @@ export class BusinessLineInfo { * The service for which you are creating the business line. Possible values: * **paymentProcessing** * **banking** */ 'service': BusinessLineInfo.ServiceEnum; - 'sourceOfFunds'?: SourceOfFunds | null; + 'sourceOfFunds'?: SourceOfFunds; /** * List of website URLs where your user\'s goods or services are sold. When this is required for a service but your user does not have an online presence, provide the reason in the `webDataExemption` object. */ 'webData'?: Array; - 'webDataExemption'?: WebDataExemption | null; + 'webDataExemption'?: WebDataExemption; static discriminator: string | undefined = undefined; @@ -73,7 +73,7 @@ export class BusinessLineInfo { { "name": "sourceOfFunds", "baseName": "sourceOfFunds", - "type": "SourceOfFunds | null" + "type": "SourceOfFunds" }, { "name": "webData", @@ -83,7 +83,7 @@ export class BusinessLineInfo { { "name": "webDataExemption", "baseName": "webDataExemption", - "type": "WebDataExemption | null" + "type": "WebDataExemption" } ]; static getAttributeTypeMap() { @@ -93,12 +93,12 @@ export class BusinessLineInfo { export namespace BusinessLineInfo { export enum CapabilityEnum { - ReceivePayments = 'receivePayments', - ReceiveFromPlatformPayments = 'receiveFromPlatformPayments', - IssueBankAccount = 'issueBankAccount' + ReceivePayments = 'receivePayments', + ReceiveFromPlatformPayments = 'receiveFromPlatformPayments', + IssueBankAccount = 'issueBankAccount' } export enum ServiceEnum { - PaymentProcessing = 'paymentProcessing', - Banking = 'banking' + PaymentProcessing = 'paymentProcessing', + Banking = 'banking' } } diff --git a/src/typings/legalEntityManagement/businessLineInfoUpdate.ts b/src/typings/legalEntityManagement/businessLineInfoUpdate.ts index c9e76e509..b5b05cf0f 100644 --- a/src/typings/legalEntityManagement/businessLineInfoUpdate.ts +++ b/src/typings/legalEntityManagement/businessLineInfoUpdate.ts @@ -20,12 +20,12 @@ export class BusinessLineInfoUpdate { * A list of channels where goods or services are sold. Possible values: **pos**, **posMoto**, **eCommerce**, **ecomMoto**, **payByLink**. Required only in combination with the `service` **paymentProcessing**. */ 'salesChannels'?: Array; - 'sourceOfFunds'?: SourceOfFunds | null; + 'sourceOfFunds'?: SourceOfFunds; /** * List of website URLs where your user\'s goods or services are sold. When this is required for a service but your user does not have an online presence, provide the reason in the `webDataExemption` object. */ 'webData'?: Array; - 'webDataExemption'?: WebDataExemption | null; + 'webDataExemption'?: WebDataExemption; static discriminator: string | undefined = undefined; @@ -43,7 +43,7 @@ export class BusinessLineInfoUpdate { { "name": "sourceOfFunds", "baseName": "sourceOfFunds", - "type": "SourceOfFunds | null" + "type": "SourceOfFunds" }, { "name": "webData", @@ -53,7 +53,7 @@ export class BusinessLineInfoUpdate { { "name": "webDataExemption", "baseName": "webDataExemption", - "type": "WebDataExemption | null" + "type": "WebDataExemption" } ]; static getAttributeTypeMap() { diff --git a/src/typings/legalEntityManagement/cALocalAccountIdentification.ts b/src/typings/legalEntityManagement/cALocalAccountIdentification.ts index 12360c00d..096f38c49 100644 --- a/src/typings/legalEntityManagement/cALocalAccountIdentification.ts +++ b/src/typings/legalEntityManagement/cALocalAccountIdentification.ts @@ -16,7 +16,7 @@ export class CALocalAccountIdentification { /** * The bank account type. Possible values: **checking** or **savings**. Defaults to **checking**. */ - 'accountType'?: CALocalAccountIdentification.AccountTypeEnum; + 'accountType'?: CALocalAccountIdentification.AccountTypeEnum = CALocalAccountIdentification.AccountTypeEnum.Checking; /** * The 3-digit institution number, without separators or whitespace. */ @@ -28,7 +28,7 @@ export class CALocalAccountIdentification { /** * **caLocal** */ - 'type': CALocalAccountIdentification.TypeEnum; + 'type': CALocalAccountIdentification.TypeEnum = CALocalAccountIdentification.TypeEnum.CaLocal; static discriminator: string | undefined = undefined; @@ -66,10 +66,10 @@ export class CALocalAccountIdentification { export namespace CALocalAccountIdentification { export enum AccountTypeEnum { - Checking = 'checking', - Savings = 'savings' + Checking = 'checking', + Savings = 'savings' } export enum TypeEnum { - CaLocal = 'caLocal' + CaLocal = 'caLocal' } } diff --git a/src/typings/legalEntityManagement/cZLocalAccountIdentification.ts b/src/typings/legalEntityManagement/cZLocalAccountIdentification.ts index d3195e341..1f4b73e77 100644 --- a/src/typings/legalEntityManagement/cZLocalAccountIdentification.ts +++ b/src/typings/legalEntityManagement/cZLocalAccountIdentification.ts @@ -20,7 +20,7 @@ export class CZLocalAccountIdentification { /** * **czLocal** */ - 'type': CZLocalAccountIdentification.TypeEnum; + 'type': CZLocalAccountIdentification.TypeEnum = CZLocalAccountIdentification.TypeEnum.CzLocal; static discriminator: string | undefined = undefined; @@ -48,6 +48,6 @@ export class CZLocalAccountIdentification { export namespace CZLocalAccountIdentification { export enum TypeEnum { - CzLocal = 'czLocal' + CzLocal = 'czLocal' } } diff --git a/src/typings/legalEntityManagement/calculatePciStatusRequest.ts b/src/typings/legalEntityManagement/calculatePciStatusRequest.ts index 92f46facc..bc7d25cc2 100644 --- a/src/typings/legalEntityManagement/calculatePciStatusRequest.ts +++ b/src/typings/legalEntityManagement/calculatePciStatusRequest.ts @@ -30,9 +30,9 @@ export class CalculatePciStatusRequest { export namespace CalculatePciStatusRequest { export enum AdditionalSalesChannelsEnum { - ECommerce = 'eCommerce', - EcomMoto = 'ecomMoto', - Pos = 'pos', - PosMoto = 'posMoto' + ECommerce = 'eCommerce', + EcomMoto = 'ecomMoto', + Pos = 'pos', + PosMoto = 'posMoto' } } diff --git a/src/typings/legalEntityManagement/calculateTermsOfServiceStatusResponse.ts b/src/typings/legalEntityManagement/calculateTermsOfServiceStatusResponse.ts index bb4baabb8..f99fd1a29 100644 --- a/src/typings/legalEntityManagement/calculateTermsOfServiceStatusResponse.ts +++ b/src/typings/legalEntityManagement/calculateTermsOfServiceStatusResponse.ts @@ -30,14 +30,14 @@ export class CalculateTermsOfServiceStatusResponse { export namespace CalculateTermsOfServiceStatusResponse { export enum TermsOfServiceTypesEnum { - AdyenAccount = 'adyenAccount', - AdyenCapital = 'adyenCapital', - AdyenCard = 'adyenCard', - AdyenChargeCard = 'adyenChargeCard', - AdyenForPlatformsAdvanced = 'adyenForPlatformsAdvanced', - AdyenForPlatformsManage = 'adyenForPlatformsManage', - AdyenFranchisee = 'adyenFranchisee', - AdyenIssuing = 'adyenIssuing', - AdyenPccr = 'adyenPccr' + AdyenAccount = 'adyenAccount', + AdyenCapital = 'adyenCapital', + AdyenCard = 'adyenCard', + AdyenChargeCard = 'adyenChargeCard', + AdyenForPlatformsAdvanced = 'adyenForPlatformsAdvanced', + AdyenForPlatformsManage = 'adyenForPlatformsManage', + AdyenFranchisee = 'adyenFranchisee', + AdyenIssuing = 'adyenIssuing', + AdyenPccr = 'adyenPccr' } } diff --git a/src/typings/legalEntityManagement/capabilityProblem.ts b/src/typings/legalEntityManagement/capabilityProblem.ts index 97e80c57d..1b98be094 100644 --- a/src/typings/legalEntityManagement/capabilityProblem.ts +++ b/src/typings/legalEntityManagement/capabilityProblem.ts @@ -11,7 +11,7 @@ import { CapabilityProblemEntity } from './capabilityProblemEntity'; import { VerificationError } from './verificationError'; export class CapabilityProblem { - 'entity'?: CapabilityProblemEntity | null; + 'entity'?: CapabilityProblemEntity; 'verificationErrors'?: Array; static discriminator: string | undefined = undefined; @@ -20,7 +20,7 @@ export class CapabilityProblem { { "name": "entity", "baseName": "entity", - "type": "CapabilityProblemEntity | null" + "type": "CapabilityProblemEntity" }, { "name": "verificationErrors", diff --git a/src/typings/legalEntityManagement/capabilityProblemEntity.ts b/src/typings/legalEntityManagement/capabilityProblemEntity.ts index 5aec97041..c84452583 100644 --- a/src/typings/legalEntityManagement/capabilityProblemEntity.ts +++ b/src/typings/legalEntityManagement/capabilityProblemEntity.ts @@ -15,7 +15,7 @@ export class CapabilityProblemEntity { */ 'documents'?: Array; 'id'?: string; - 'owner'?: CapabilityProblemEntityRecursive | null; + 'owner'?: CapabilityProblemEntityRecursive; 'type'?: CapabilityProblemEntity.TypeEnum; static discriminator: string | undefined = undefined; @@ -34,7 +34,7 @@ export class CapabilityProblemEntity { { "name": "owner", "baseName": "owner", - "type": "CapabilityProblemEntityRecursive | null" + "type": "CapabilityProblemEntityRecursive" }, { "name": "type", @@ -49,9 +49,9 @@ export class CapabilityProblemEntity { export namespace CapabilityProblemEntity { export enum TypeEnum { - BankAccount = 'BankAccount', - Document = 'Document', - LegalEntity = 'LegalEntity', - Product = 'product' + BankAccount = 'BankAccount', + Document = 'Document', + LegalEntity = 'LegalEntity', + Product = 'product' } } diff --git a/src/typings/legalEntityManagement/capabilityProblemEntityRecursive.ts b/src/typings/legalEntityManagement/capabilityProblemEntityRecursive.ts index 4969028a7..093fee451 100644 --- a/src/typings/legalEntityManagement/capabilityProblemEntityRecursive.ts +++ b/src/typings/legalEntityManagement/capabilityProblemEntityRecursive.ts @@ -42,9 +42,9 @@ export class CapabilityProblemEntityRecursive { export namespace CapabilityProblemEntityRecursive { export enum TypeEnum { - BankAccount = 'BankAccount', - Document = 'Document', - LegalEntity = 'LegalEntity', - Product = 'product' + BankAccount = 'BankAccount', + Document = 'Document', + LegalEntity = 'LegalEntity', + Product = 'product' } } diff --git a/src/typings/legalEntityManagement/capabilitySettings.ts b/src/typings/legalEntityManagement/capabilitySettings.ts index 0a3d31209..6b6587181 100644 --- a/src/typings/legalEntityManagement/capabilitySettings.ts +++ b/src/typings/legalEntityManagement/capabilitySettings.ts @@ -26,7 +26,7 @@ export class CapabilitySettings { * The period when the rule conditions apply. */ 'interval'?: CapabilitySettings.IntervalEnum; - 'maxAmount'?: Amount | null; + 'maxAmount'?: Amount; static discriminator: string | undefined = undefined; @@ -54,7 +54,7 @@ export class CapabilitySettings { { "name": "maxAmount", "baseName": "maxAmount", - "type": "Amount | null" + "type": "Amount" } ]; static getAttributeTypeMap() { @@ -64,13 +64,13 @@ export class CapabilitySettings { export namespace CapabilitySettings { export enum FundingSourceEnum { - Credit = 'credit', - Debit = 'debit', - Prepaid = 'prepaid' + Credit = 'credit', + Debit = 'debit', + Prepaid = 'prepaid' } export enum IntervalEnum { - Daily = 'daily', - Monthly = 'monthly', - Weekly = 'weekly' + Daily = 'daily', + Monthly = 'monthly', + Weekly = 'weekly' } } diff --git a/src/typings/legalEntityManagement/dKLocalAccountIdentification.ts b/src/typings/legalEntityManagement/dKLocalAccountIdentification.ts index 63fded678..64d1be73d 100644 --- a/src/typings/legalEntityManagement/dKLocalAccountIdentification.ts +++ b/src/typings/legalEntityManagement/dKLocalAccountIdentification.ts @@ -20,7 +20,7 @@ export class DKLocalAccountIdentification { /** * **dkLocal** */ - 'type': DKLocalAccountIdentification.TypeEnum; + 'type': DKLocalAccountIdentification.TypeEnum = DKLocalAccountIdentification.TypeEnum.DkLocal; static discriminator: string | undefined = undefined; @@ -48,6 +48,6 @@ export class DKLocalAccountIdentification { export namespace DKLocalAccountIdentification { export enum TypeEnum { - DkLocal = 'dkLocal' + DkLocal = 'dkLocal' } } diff --git a/src/typings/legalEntityManagement/document.ts b/src/typings/legalEntityManagement/document.ts index e4f09cab8..d04adfd5b 100644 --- a/src/typings/legalEntityManagement/document.ts +++ b/src/typings/legalEntityManagement/document.ts @@ -11,7 +11,7 @@ import { Attachment } from './attachment'; import { OwnerEntity } from './ownerEntity'; export class Document { - 'attachment'?: Attachment | null; + 'attachment'?: Attachment; /** * Array that contains the document. The array supports multiple attachments for uploading different sides or pages of a document. */ @@ -58,7 +58,7 @@ export class Document { * The number in the document. */ 'number'?: string; - 'owner'?: OwnerEntity | null; + 'owner'?: OwnerEntity; /** * Type of document, used when providing an ID number or uploading a document. The possible values depend on the legal entity type. * For **organization**, the `type` values can be **proofOfAddress**, **registrationDocument**, **vatDocument**, **proofOfOrganizationTaxInfo**, **proofOfOwnership**, **proofOfIndustry**, **proofOfSignatory**, or **proofOfFundingOrWealthSource**. * For **individual**, the `type` values can be **identityCard**, **driversLicense**, **passport**, **liveSelfie**, **proofOfNationalIdNumber**, **proofOfResidency**, **proofOfIndustry**, **proofOfIndividualTaxId**, **proofOfFundingOrWealthSource** or **proofOfRelationship**. * For **soleProprietorship**, the `type` values can be **constitutionalDocument**, **proofOfAddress**, or **proofOfIndustry**. * For **trust**, the `type` value is **constitutionalDocument**. * For **unincorporatedPartnership**, the `type` value is **constitutionalDocument**. * Use **bankStatement** to upload documents for a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id). */ @@ -70,7 +70,7 @@ export class Document { { "name": "attachment", "baseName": "attachment", - "type": "Attachment | null" + "type": "Attachment" }, { "name": "attachments", @@ -125,7 +125,7 @@ export class Document { { "name": "owner", "baseName": "owner", - "type": "OwnerEntity | null" + "type": "OwnerEntity" }, { "name": "type", @@ -140,24 +140,24 @@ export class Document { export namespace Document { export enum TypeEnum { - BankStatement = 'bankStatement', - DriversLicense = 'driversLicense', - IdentityCard = 'identityCard', - NationalIdNumber = 'nationalIdNumber', - Passport = 'passport', - ProofOfAddress = 'proofOfAddress', - ProofOfNationalIdNumber = 'proofOfNationalIdNumber', - ProofOfResidency = 'proofOfResidency', - RegistrationDocument = 'registrationDocument', - VatDocument = 'vatDocument', - ProofOfOrganizationTaxInfo = 'proofOfOrganizationTaxInfo', - ProofOfIndividualTaxId = 'proofOfIndividualTaxId', - ProofOfOwnership = 'proofOfOwnership', - ProofOfSignatory = 'proofOfSignatory', - LiveSelfie = 'liveSelfie', - ProofOfIndustry = 'proofOfIndustry', - ConstitutionalDocument = 'constitutionalDocument', - ProofOfFundingOrWealthSource = 'proofOfFundingOrWealthSource', - ProofOfRelationship = 'proofOfRelationship' + BankStatement = 'bankStatement', + DriversLicense = 'driversLicense', + IdentityCard = 'identityCard', + NationalIdNumber = 'nationalIdNumber', + Passport = 'passport', + ProofOfAddress = 'proofOfAddress', + ProofOfNationalIdNumber = 'proofOfNationalIdNumber', + ProofOfResidency = 'proofOfResidency', + RegistrationDocument = 'registrationDocument', + VatDocument = 'vatDocument', + ProofOfOrganizationTaxInfo = 'proofOfOrganizationTaxInfo', + ProofOfIndividualTaxId = 'proofOfIndividualTaxId', + ProofOfOwnership = 'proofOfOwnership', + ProofOfSignatory = 'proofOfSignatory', + LiveSelfie = 'liveSelfie', + ProofOfIndustry = 'proofOfIndustry', + ConstitutionalDocument = 'constitutionalDocument', + ProofOfFundingOrWealthSource = 'proofOfFundingOrWealthSource', + ProofOfRelationship = 'proofOfRelationship' } } diff --git a/src/typings/legalEntityManagement/documentPage.ts b/src/typings/legalEntityManagement/documentPage.ts index ce8b08c04..e38ba2680 100644 --- a/src/typings/legalEntityManagement/documentPage.ts +++ b/src/typings/legalEntityManagement/documentPage.ts @@ -39,8 +39,8 @@ export class DocumentPage { export namespace DocumentPage { export enum TypeEnum { - Back = 'BACK', - Front = 'FRONT', - Undefined = 'UNDEFINED' + Back = 'BACK', + Front = 'FRONT', + Undefined = 'UNDEFINED' } } diff --git a/src/typings/legalEntityManagement/generatePciDescriptionRequest.ts b/src/typings/legalEntityManagement/generatePciDescriptionRequest.ts index f64b09964..2214be799 100644 --- a/src/typings/legalEntityManagement/generatePciDescriptionRequest.ts +++ b/src/typings/legalEntityManagement/generatePciDescriptionRequest.ts @@ -39,9 +39,9 @@ export class GeneratePciDescriptionRequest { export namespace GeneratePciDescriptionRequest { export enum AdditionalSalesChannelsEnum { - ECommerce = 'eCommerce', - EcomMoto = 'ecomMoto', - Pos = 'pos', - PosMoto = 'posMoto' + ECommerce = 'eCommerce', + EcomMoto = 'ecomMoto', + Pos = 'pos', + PosMoto = 'posMoto' } } diff --git a/src/typings/legalEntityManagement/getAcceptedTermsOfServiceDocumentResponse.ts b/src/typings/legalEntityManagement/getAcceptedTermsOfServiceDocumentResponse.ts index f848433b3..4b1d718d0 100644 --- a/src/typings/legalEntityManagement/getAcceptedTermsOfServiceDocumentResponse.ts +++ b/src/typings/legalEntityManagement/getAcceptedTermsOfServiceDocumentResponse.ts @@ -57,8 +57,8 @@ export class GetAcceptedTermsOfServiceDocumentResponse { export namespace GetAcceptedTermsOfServiceDocumentResponse { export enum TermsOfServiceDocumentFormatEnum { - Json = 'JSON', - Pdf = 'PDF', - Txt = 'TXT' + Json = 'JSON', + Pdf = 'PDF', + Txt = 'TXT' } } diff --git a/src/typings/legalEntityManagement/getTermsOfServiceDocumentRequest.ts b/src/typings/legalEntityManagement/getTermsOfServiceDocumentRequest.ts index 6beeeb0d5..0b4307e2c 100644 --- a/src/typings/legalEntityManagement/getTermsOfServiceDocumentRequest.ts +++ b/src/typings/legalEntityManagement/getTermsOfServiceDocumentRequest.ts @@ -48,14 +48,14 @@ export class GetTermsOfServiceDocumentRequest { export namespace GetTermsOfServiceDocumentRequest { export enum TypeEnum { - AdyenAccount = 'adyenAccount', - AdyenCapital = 'adyenCapital', - AdyenCard = 'adyenCard', - AdyenChargeCard = 'adyenChargeCard', - AdyenForPlatformsAdvanced = 'adyenForPlatformsAdvanced', - AdyenForPlatformsManage = 'adyenForPlatformsManage', - AdyenFranchisee = 'adyenFranchisee', - AdyenIssuing = 'adyenIssuing', - AdyenPccr = 'adyenPccr' + AdyenAccount = 'adyenAccount', + AdyenCapital = 'adyenCapital', + AdyenCard = 'adyenCard', + AdyenChargeCard = 'adyenChargeCard', + AdyenForPlatformsAdvanced = 'adyenForPlatformsAdvanced', + AdyenForPlatformsManage = 'adyenForPlatformsManage', + AdyenFranchisee = 'adyenFranchisee', + AdyenIssuing = 'adyenIssuing', + AdyenPccr = 'adyenPccr' } } diff --git a/src/typings/legalEntityManagement/getTermsOfServiceDocumentResponse.ts b/src/typings/legalEntityManagement/getTermsOfServiceDocumentResponse.ts index 3616c036b..3ed4940f0 100644 --- a/src/typings/legalEntityManagement/getTermsOfServiceDocumentResponse.ts +++ b/src/typings/legalEntityManagement/getTermsOfServiceDocumentResponse.ts @@ -75,14 +75,14 @@ export class GetTermsOfServiceDocumentResponse { export namespace GetTermsOfServiceDocumentResponse { export enum TypeEnum { - AdyenAccount = 'adyenAccount', - AdyenCapital = 'adyenCapital', - AdyenCard = 'adyenCard', - AdyenChargeCard = 'adyenChargeCard', - AdyenForPlatformsAdvanced = 'adyenForPlatformsAdvanced', - AdyenForPlatformsManage = 'adyenForPlatformsManage', - AdyenFranchisee = 'adyenFranchisee', - AdyenIssuing = 'adyenIssuing', - AdyenPccr = 'adyenPccr' + AdyenAccount = 'adyenAccount', + AdyenCapital = 'adyenCapital', + AdyenCard = 'adyenCard', + AdyenChargeCard = 'adyenChargeCard', + AdyenForPlatformsAdvanced = 'adyenForPlatformsAdvanced', + AdyenForPlatformsManage = 'adyenForPlatformsManage', + AdyenFranchisee = 'adyenFranchisee', + AdyenIssuing = 'adyenIssuing', + AdyenPccr = 'adyenPccr' } } diff --git a/src/typings/legalEntityManagement/hKLocalAccountIdentification.ts b/src/typings/legalEntityManagement/hKLocalAccountIdentification.ts index 57d7533bf..1a106bd48 100644 --- a/src/typings/legalEntityManagement/hKLocalAccountIdentification.ts +++ b/src/typings/legalEntityManagement/hKLocalAccountIdentification.ts @@ -20,7 +20,7 @@ export class HKLocalAccountIdentification { /** * **hkLocal** */ - 'type': HKLocalAccountIdentification.TypeEnum; + 'type': HKLocalAccountIdentification.TypeEnum = HKLocalAccountIdentification.TypeEnum.HkLocal; static discriminator: string | undefined = undefined; @@ -48,6 +48,6 @@ export class HKLocalAccountIdentification { export namespace HKLocalAccountIdentification { export enum TypeEnum { - HkLocal = 'hkLocal' + HkLocal = 'hkLocal' } } diff --git a/src/typings/legalEntityManagement/hULocalAccountIdentification.ts b/src/typings/legalEntityManagement/hULocalAccountIdentification.ts index b05fc60f1..2c5ae92e5 100644 --- a/src/typings/legalEntityManagement/hULocalAccountIdentification.ts +++ b/src/typings/legalEntityManagement/hULocalAccountIdentification.ts @@ -16,7 +16,7 @@ export class HULocalAccountIdentification { /** * **huLocal** */ - 'type': HULocalAccountIdentification.TypeEnum; + 'type': HULocalAccountIdentification.TypeEnum = HULocalAccountIdentification.TypeEnum.HuLocal; static discriminator: string | undefined = undefined; @@ -39,6 +39,6 @@ export class HULocalAccountIdentification { export namespace HULocalAccountIdentification { export enum TypeEnum { - HuLocal = 'huLocal' + HuLocal = 'huLocal' } } diff --git a/src/typings/legalEntityManagement/ibanAccountIdentification.ts b/src/typings/legalEntityManagement/ibanAccountIdentification.ts index df72fe59d..d431ec632 100644 --- a/src/typings/legalEntityManagement/ibanAccountIdentification.ts +++ b/src/typings/legalEntityManagement/ibanAccountIdentification.ts @@ -16,7 +16,7 @@ export class IbanAccountIdentification { /** * **iban** */ - 'type': IbanAccountIdentification.TypeEnum; + 'type': IbanAccountIdentification.TypeEnum = IbanAccountIdentification.TypeEnum.Iban; static discriminator: string | undefined = undefined; @@ -39,6 +39,6 @@ export class IbanAccountIdentification { export namespace IbanAccountIdentification { export enum TypeEnum { - Iban = 'iban' + Iban = 'iban' } } diff --git a/src/typings/legalEntityManagement/identificationData.ts b/src/typings/legalEntityManagement/identificationData.ts index f8d22bd0a..a7dd83817 100644 --- a/src/typings/legalEntityManagement/identificationData.ts +++ b/src/typings/legalEntityManagement/identificationData.ts @@ -86,9 +86,9 @@ export class IdentificationData { export namespace IdentificationData { export enum TypeEnum { - NationalIdNumber = 'nationalIdNumber', - Passport = 'passport', - DriversLicense = 'driversLicense', - IdentityCard = 'identityCard' + NationalIdNumber = 'nationalIdNumber', + Passport = 'passport', + DriversLicense = 'driversLicense', + IdentityCard = 'identityCard' } } diff --git a/src/typings/legalEntityManagement/individual.ts b/src/typings/legalEntityManagement/individual.ts index 373ebd48f..fd7e59710 100644 --- a/src/typings/legalEntityManagement/individual.ts +++ b/src/typings/legalEntityManagement/individual.ts @@ -16,24 +16,24 @@ import { TaxInformation } from './taxInformation'; import { WebData } from './webData'; export class Individual { - 'birthData'?: BirthData | null; + 'birthData'?: BirthData; /** * The email address of the legal entity. */ 'email'?: string; - 'identificationData'?: IdentificationData | null; + 'identificationData'?: IdentificationData; 'name': Name; /** * The individual\'s nationality. */ 'nationality'?: string; - 'phone'?: PhoneNumber | null; + 'phone'?: PhoneNumber; 'residentialAddress': Address; /** * The tax information of the individual. */ 'taxInformation'?: Array; - 'webData'?: WebData | null; + 'webData'?: WebData; static discriminator: string | undefined = undefined; @@ -41,7 +41,7 @@ export class Individual { { "name": "birthData", "baseName": "birthData", - "type": "BirthData | null" + "type": "BirthData" }, { "name": "email", @@ -51,7 +51,7 @@ export class Individual { { "name": "identificationData", "baseName": "identificationData", - "type": "IdentificationData | null" + "type": "IdentificationData" }, { "name": "name", @@ -66,7 +66,7 @@ export class Individual { { "name": "phone", "baseName": "phone", - "type": "PhoneNumber | null" + "type": "PhoneNumber" }, { "name": "residentialAddress", @@ -81,7 +81,7 @@ export class Individual { { "name": "webData", "baseName": "webData", - "type": "WebData | null" + "type": "WebData" } ]; static getAttributeTypeMap() { diff --git a/src/typings/legalEntityManagement/legalEntity.ts b/src/typings/legalEntityManagement/legalEntity.ts index 839d1dbea..bab6ef114 100644 --- a/src/typings/legalEntityManagement/legalEntity.ts +++ b/src/typings/legalEntityManagement/legalEntity.ts @@ -44,8 +44,8 @@ export class LegalEntity { * The unique identifier of the legal entity. */ 'id': string; - 'individual'?: Individual | null; - 'organization'?: Organization | null; + 'individual'?: Individual; + 'organization'?: Organization; /** * List of verification errors related to capabilities for the legal entity. */ @@ -54,17 +54,17 @@ export class LegalEntity { * Your reference for the legal entity, maximum 150 characters. */ 'reference'?: string; - 'soleProprietorship'?: SoleProprietorship | null; + 'soleProprietorship'?: SoleProprietorship; /** * List of transfer instruments that the legal entity owns. */ 'transferInstruments'?: Array; - 'trust'?: Trust | null; + 'trust'?: Trust; /** * The type of legal entity. Possible values: **individual**, **organization**, **soleProprietorship**, or **trust**. */ 'type'?: LegalEntity.TypeEnum; - 'unincorporatedPartnership'?: UnincorporatedPartnership | null; + 'unincorporatedPartnership'?: UnincorporatedPartnership; /** * List of verification deadlines and the capabilities that will be disallowed if verification errors are not resolved. */ @@ -105,12 +105,12 @@ export class LegalEntity { { "name": "individual", "baseName": "individual", - "type": "Individual | null" + "type": "Individual" }, { "name": "organization", "baseName": "organization", - "type": "Organization | null" + "type": "Organization" }, { "name": "problems", @@ -125,7 +125,7 @@ export class LegalEntity { { "name": "soleProprietorship", "baseName": "soleProprietorship", - "type": "SoleProprietorship | null" + "type": "SoleProprietorship" }, { "name": "transferInstruments", @@ -135,7 +135,7 @@ export class LegalEntity { { "name": "trust", "baseName": "trust", - "type": "Trust | null" + "type": "Trust" }, { "name": "type", @@ -145,7 +145,7 @@ export class LegalEntity { { "name": "unincorporatedPartnership", "baseName": "unincorporatedPartnership", - "type": "UnincorporatedPartnership | null" + "type": "UnincorporatedPartnership" }, { "name": "verificationDeadlines", @@ -165,10 +165,10 @@ export class LegalEntity { export namespace LegalEntity { export enum TypeEnum { - Individual = 'individual', - Organization = 'organization', - SoleProprietorship = 'soleProprietorship', - Trust = 'trust', - UnincorporatedPartnership = 'unincorporatedPartnership' + Individual = 'individual', + Organization = 'organization', + SoleProprietorship = 'soleProprietorship', + Trust = 'trust', + UnincorporatedPartnership = 'unincorporatedPartnership' } } diff --git a/src/typings/legalEntityManagement/legalEntityAssociation.ts b/src/typings/legalEntityManagement/legalEntityAssociation.ts index 5f7e28f3b..05926db10 100644 --- a/src/typings/legalEntityManagement/legalEntityAssociation.ts +++ b/src/typings/legalEntityManagement/legalEntityAssociation.ts @@ -102,23 +102,23 @@ export class LegalEntityAssociation { export namespace LegalEntityAssociation { export enum TypeEnum { - DefinedBeneficiary = 'definedBeneficiary', - Director = 'director', - ImmediateParentCompany = 'immediateParentCompany', - LegalRepresentative = 'legalRepresentative', - PciSignatory = 'pciSignatory', - Protector = 'protector', - SecondaryPartner = 'secondaryPartner', - SecondaryTrustee = 'secondaryTrustee', - Settlor = 'settlor', - Signatory = 'signatory', - SoleProprietorship = 'soleProprietorship', - Trust = 'trust', - TrustOwnership = 'trustOwnership', - UboThroughControl = 'uboThroughControl', - UboThroughOwnership = 'uboThroughOwnership', - UltimateParentCompany = 'ultimateParentCompany', - UndefinedBeneficiary = 'undefinedBeneficiary', - UnincorporatedPartnership = 'unincorporatedPartnership' + DefinedBeneficiary = 'definedBeneficiary', + Director = 'director', + ImmediateParentCompany = 'immediateParentCompany', + LegalRepresentative = 'legalRepresentative', + PciSignatory = 'pciSignatory', + Protector = 'protector', + SecondaryPartner = 'secondaryPartner', + SecondaryTrustee = 'secondaryTrustee', + Settlor = 'settlor', + Signatory = 'signatory', + SoleProprietorship = 'soleProprietorship', + Trust = 'trust', + TrustOwnership = 'trustOwnership', + UboThroughControl = 'uboThroughControl', + UboThroughOwnership = 'uboThroughOwnership', + UltimateParentCompany = 'ultimateParentCompany', + UndefinedBeneficiary = 'undefinedBeneficiary', + UnincorporatedPartnership = 'unincorporatedPartnership' } } diff --git a/src/typings/legalEntityManagement/legalEntityCapability.ts b/src/typings/legalEntityManagement/legalEntityCapability.ts index ca818f750..02da55219 100644 --- a/src/typings/legalEntityManagement/legalEntityCapability.ts +++ b/src/typings/legalEntityManagement/legalEntityCapability.ts @@ -19,7 +19,7 @@ export class LegalEntityCapability { * The capability level that is allowed for the legal entity. Possible values: **notApplicable**, **low**, **medium**, **high**. */ 'allowedLevel'?: LegalEntityCapability.AllowedLevelEnum; - 'allowedSettings'?: CapabilitySettings | null; + 'allowedSettings'?: CapabilitySettings; /** * Indicates whether the capability is requested. To check whether the legal entity is permitted to use the capability, refer to the `allowed` field. */ @@ -28,7 +28,7 @@ export class LegalEntityCapability { * The requested level of the capability. Some capabilities, such as those used in [card issuing](https://docs.adyen.com/issuing/add-capabilities#capability-levels), have different levels. Levels increase the capability, but also require additional checks and increased monitoring. Possible values: **notApplicable**, **low**, **medium**, **high**. */ 'requestedLevel'?: LegalEntityCapability.RequestedLevelEnum; - 'requestedSettings'?: CapabilitySettings | null; + 'requestedSettings'?: CapabilitySettings; /** * The capability status of transfer instruments associated with the legal entity. */ @@ -54,7 +54,7 @@ export class LegalEntityCapability { { "name": "allowedSettings", "baseName": "allowedSettings", - "type": "CapabilitySettings | null" + "type": "CapabilitySettings" }, { "name": "requested", @@ -69,7 +69,7 @@ export class LegalEntityCapability { { "name": "requestedSettings", "baseName": "requestedSettings", - "type": "CapabilitySettings | null" + "type": "CapabilitySettings" }, { "name": "transferInstruments", @@ -89,15 +89,15 @@ export class LegalEntityCapability { export namespace LegalEntityCapability { export enum AllowedLevelEnum { - High = 'high', - Low = 'low', - Medium = 'medium', - NotApplicable = 'notApplicable' + High = 'high', + Low = 'low', + Medium = 'medium', + NotApplicable = 'notApplicable' } export enum RequestedLevelEnum { - High = 'high', - Low = 'low', - Medium = 'medium', - NotApplicable = 'notApplicable' + High = 'high', + Low = 'low', + Medium = 'medium', + NotApplicable = 'notApplicable' } } diff --git a/src/typings/legalEntityManagement/legalEntityInfo.ts b/src/typings/legalEntityManagement/legalEntityInfo.ts index 86b2066d4..5570347dc 100644 --- a/src/typings/legalEntityManagement/legalEntityInfo.ts +++ b/src/typings/legalEntityManagement/legalEntityInfo.ts @@ -24,19 +24,19 @@ export class LegalEntityInfo { * List of legal entities associated with the current legal entity. For example, ultimate beneficial owners associated with an organization through ownership or control, or as signatories. */ 'entityAssociations'?: Array; - 'individual'?: Individual | null; - 'organization'?: Organization | null; + 'individual'?: Individual; + 'organization'?: Organization; /** * Your reference for the legal entity, maximum 150 characters. */ 'reference'?: string; - 'soleProprietorship'?: SoleProprietorship | null; - 'trust'?: Trust | null; + 'soleProprietorship'?: SoleProprietorship; + 'trust'?: Trust; /** * The type of legal entity. Possible values: **individual**, **organization**, **soleProprietorship**, or **trust**. */ 'type'?: LegalEntityInfo.TypeEnum; - 'unincorporatedPartnership'?: UnincorporatedPartnership | null; + 'unincorporatedPartnership'?: UnincorporatedPartnership; /** * A key-value pair that specifies the verification process for a legal entity. Set to **upfront** for upfront verification for [marketplaces](https://docs.adyen.com/marketplaces/verification-overview/verification-types/#upfront-verification). */ @@ -58,12 +58,12 @@ export class LegalEntityInfo { { "name": "individual", "baseName": "individual", - "type": "Individual | null" + "type": "Individual" }, { "name": "organization", "baseName": "organization", - "type": "Organization | null" + "type": "Organization" }, { "name": "reference", @@ -73,12 +73,12 @@ export class LegalEntityInfo { { "name": "soleProprietorship", "baseName": "soleProprietorship", - "type": "SoleProprietorship | null" + "type": "SoleProprietorship" }, { "name": "trust", "baseName": "trust", - "type": "Trust | null" + "type": "Trust" }, { "name": "type", @@ -88,7 +88,7 @@ export class LegalEntityInfo { { "name": "unincorporatedPartnership", "baseName": "unincorporatedPartnership", - "type": "UnincorporatedPartnership | null" + "type": "UnincorporatedPartnership" }, { "name": "verificationPlan", @@ -103,10 +103,10 @@ export class LegalEntityInfo { export namespace LegalEntityInfo { export enum TypeEnum { - Individual = 'individual', - Organization = 'organization', - SoleProprietorship = 'soleProprietorship', - Trust = 'trust', - UnincorporatedPartnership = 'unincorporatedPartnership' + Individual = 'individual', + Organization = 'organization', + SoleProprietorship = 'soleProprietorship', + Trust = 'trust', + UnincorporatedPartnership = 'unincorporatedPartnership' } } diff --git a/src/typings/legalEntityManagement/legalEntityInfoRequiredType.ts b/src/typings/legalEntityManagement/legalEntityInfoRequiredType.ts index 86b414dca..23c09f045 100644 --- a/src/typings/legalEntityManagement/legalEntityInfoRequiredType.ts +++ b/src/typings/legalEntityManagement/legalEntityInfoRequiredType.ts @@ -24,19 +24,19 @@ export class LegalEntityInfoRequiredType { * List of legal entities associated with the current legal entity. For example, ultimate beneficial owners associated with an organization through ownership or control, or as signatories. */ 'entityAssociations'?: Array; - 'individual'?: Individual | null; - 'organization'?: Organization | null; + 'individual'?: Individual; + 'organization'?: Organization; /** * Your reference for the legal entity, maximum 150 characters. */ 'reference'?: string; - 'soleProprietorship'?: SoleProprietorship | null; - 'trust'?: Trust | null; + 'soleProprietorship'?: SoleProprietorship; + 'trust'?: Trust; /** * The type of legal entity. Possible values: **individual**, **organization**, **soleProprietorship**, or **trust**. */ 'type': LegalEntityInfoRequiredType.TypeEnum; - 'unincorporatedPartnership'?: UnincorporatedPartnership | null; + 'unincorporatedPartnership'?: UnincorporatedPartnership; /** * A key-value pair that specifies the verification process for a legal entity. Set to **upfront** for upfront verification for [marketplaces](https://docs.adyen.com/marketplaces/verification-overview/verification-types/#upfront-verification). */ @@ -58,12 +58,12 @@ export class LegalEntityInfoRequiredType { { "name": "individual", "baseName": "individual", - "type": "Individual | null" + "type": "Individual" }, { "name": "organization", "baseName": "organization", - "type": "Organization | null" + "type": "Organization" }, { "name": "reference", @@ -73,12 +73,12 @@ export class LegalEntityInfoRequiredType { { "name": "soleProprietorship", "baseName": "soleProprietorship", - "type": "SoleProprietorship | null" + "type": "SoleProprietorship" }, { "name": "trust", "baseName": "trust", - "type": "Trust | null" + "type": "Trust" }, { "name": "type", @@ -88,7 +88,7 @@ export class LegalEntityInfoRequiredType { { "name": "unincorporatedPartnership", "baseName": "unincorporatedPartnership", - "type": "UnincorporatedPartnership | null" + "type": "UnincorporatedPartnership" }, { "name": "verificationPlan", @@ -103,10 +103,10 @@ export class LegalEntityInfoRequiredType { export namespace LegalEntityInfoRequiredType { export enum TypeEnum { - Individual = 'individual', - Organization = 'organization', - SoleProprietorship = 'soleProprietorship', - Trust = 'trust', - UnincorporatedPartnership = 'unincorporatedPartnership' + Individual = 'individual', + Organization = 'organization', + SoleProprietorship = 'soleProprietorship', + Trust = 'trust', + UnincorporatedPartnership = 'unincorporatedPartnership' } } diff --git a/src/typings/legalEntityManagement/models.ts b/src/typings/legalEntityManagement/models.ts index 2ee5efac7..c9796d56c 100644 --- a/src/typings/legalEntityManagement/models.ts +++ b/src/typings/legalEntityManagement/models.ts @@ -1,12 +1,4 @@ -/* - * The version of the OpenAPI document: v3 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - +import localVarRequest from 'request'; export * from './aULocalAccountIdentification'; export * from './acceptTermsOfServiceRequest'; @@ -16,6 +8,7 @@ export * from './address'; export * from './amount'; export * from './attachment'; export * from './bankAccountInfo'; +export * from './bankAccountInfoAccountIdentification'; export * from './birthData'; export * from './businessLine'; export * from './businessLineInfo'; @@ -99,6 +92,18 @@ export * from './verificationErrors'; export * from './webData'; export * from './webDataExemption'; +import * as fs from 'fs'; + +export interface RequestDetailedFile { + value: Buffer; + options?: { + filename?: string; + contentType?: string; + } +} + +export type RequestFile = string | Buffer | fs.ReadStream | RequestDetailedFile; + import { AULocalAccountIdentification } from './aULocalAccountIdentification'; import { AcceptTermsOfServiceRequest } from './acceptTermsOfServiceRequest'; @@ -108,6 +113,7 @@ import { Address } from './address'; import { Amount } from './amount'; import { Attachment } from './attachment'; import { BankAccountInfo } from './bankAccountInfo'; +import { BankAccountInfoAccountIdentification } from './bankAccountInfoAccountIdentification'; import { BirthData } from './birthData'; import { BusinessLine } from './businessLine'; import { BusinessLineInfo } from './businessLineInfo'; @@ -207,6 +213,8 @@ let enumsMap: {[index: string]: any} = { "AULocalAccountIdentification.TypeEnum": AULocalAccountIdentification.TypeEnum, "AcceptTermsOfServiceResponse.TypeEnum": AcceptTermsOfServiceResponse.TypeEnum, "AdditionalBankIdentification.TypeEnum": AdditionalBankIdentification.TypeEnum, + "BankAccountInfoAccountIdentification.TypeEnum": BankAccountInfoAccountIdentification.TypeEnum, + "BankAccountInfoAccountIdentification.AccountTypeEnum": BankAccountInfoAccountIdentification.AccountTypeEnum, "BusinessLine.CapabilityEnum": BusinessLine.CapabilityEnum, "BusinessLine.ServiceEnum": BusinessLine.ServiceEnum, "BusinessLineInfo.CapabilityEnum": BusinessLineInfo.CapabilityEnum, @@ -277,6 +285,7 @@ let typeMap: {[index: string]: any} = { "Amount": Amount, "Attachment": Attachment, "BankAccountInfo": BankAccountInfo, + "BankAccountInfoAccountIdentification": BankAccountInfoAccountIdentification, "BirthData": BirthData, "BusinessLine": BusinessLine, "BusinessLineInfo": BusinessLineInfo, @@ -361,6 +370,23 @@ let typeMap: {[index: string]: any} = { "WebDataExemption": WebDataExemption, } +// Check if a string starts with another string without using es6 features +function startsWith(str: string, match: string): boolean { + return str.substring(0, match.length) === match; +} + +// Check if a string ends with another string without using es6 features +function endsWith(str: string, match: string): boolean { + return str.length >= match.length && str.substring(str.length - match.length) === match; +} + +const nullableSuffix = " | null"; +const optionalSuffix = " | undefined"; +const arrayPrefix = "Array<"; +const arraySuffix = ">"; +const mapPrefix = "{ [key: string]: "; +const mapSuffix = "; }"; + export class ObjectSerializer { public static findCorrectType(data: any, expectedType: string) { if (data == undefined) { @@ -397,25 +423,37 @@ export class ObjectSerializer { } } - public static serialize(data: any, type: string) { + public static serialize(data: any, type: string): any { if (data == undefined) { return data; } else if (primitives.indexOf(type.toLowerCase()) !== -1) { return data; - } else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6 - let subType: string = type.replace("Array<", ""); // Array => Type> - subType = subType.substring(0, subType.length - 1); // Type> => Type + } else if (endsWith(type, nullableSuffix)) { + let subType: string = type.slice(0, -nullableSuffix.length); // Type | null => Type + return ObjectSerializer.serialize(data, subType); + } else if (endsWith(type, optionalSuffix)) { + let subType: string = type.slice(0, -optionalSuffix.length); // Type | undefined => Type + return ObjectSerializer.serialize(data, subType); + } else if (startsWith(type, arrayPrefix)) { + let subType: string = type.slice(arrayPrefix.length, -arraySuffix.length); // Array => Type let transformedData: any[] = []; for (let index = 0; index < data.length; index++) { let datum = data[index]; transformedData.push(ObjectSerializer.serialize(datum, subType)); } return transformedData; + } else if (startsWith(type, mapPrefix)) { + let subType: string = type.slice(mapPrefix.length, -mapSuffix.length); // { [key: string]: Type; } => Type + let transformedData: { [key: string]: any } = {}; + for (let key in data) { + transformedData[key] = ObjectSerializer.serialize( + data[key], + subType, + ); + } + return transformedData; } else if (type === "Date") { return data.toISOString(); - } else if (type === "SaleToAcquirerData") { - const dataString = JSON.stringify(data); - return Buffer.from(dataString).toString("base64"); } else { if (enumsMap[type]) { return data; @@ -438,22 +476,37 @@ export class ObjectSerializer { } } - public static deserialize(data: any, type: string) { + public static deserialize(data: any, type: string): any { // polymorphism may change the actual type. type = ObjectSerializer.findCorrectType(data, type); if (data == undefined) { return data; } else if (primitives.indexOf(type.toLowerCase()) !== -1) { return data; - } else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6 - let subType: string = type.replace("Array<", ""); // Array => Type> - subType = subType.substring(0, subType.length - 1); // Type> => Type + } else if (endsWith(type, nullableSuffix)) { + let subType: string = type.slice(0, -nullableSuffix.length); // Type | null => Type + return ObjectSerializer.deserialize(data, subType); + } else if (endsWith(type, optionalSuffix)) { + let subType: string = type.slice(0, -optionalSuffix.length); // Type | undefined => Type + return ObjectSerializer.deserialize(data, subType); + } else if (startsWith(type, arrayPrefix)) { + let subType: string = type.slice(arrayPrefix.length, -arraySuffix.length); // Array => Type let transformedData: any[] = []; for (let index = 0; index < data.length; index++) { let datum = data[index]; transformedData.push(ObjectSerializer.deserialize(datum, subType)); } return transformedData; + } else if (startsWith(type, mapPrefix)) { + let subType: string = type.slice(mapPrefix.length, -mapSuffix.length); // { [key: string]: Type; } => Type + let transformedData: { [key: string]: any } = {}; + for (let key in data) { + transformedData[key] = ObjectSerializer.deserialize( + data[key], + subType, + ); + } + return transformedData; } else if (type === "Date") { return new Date(data); } else { @@ -474,3 +527,77 @@ export class ObjectSerializer { } } } + +export interface Authentication { + /** + * Apply authentication settings to header and query params. + */ + applyToRequest(requestOptions: localVarRequest.Options): Promise | void; +} + +export class HttpBasicAuth implements Authentication { + public username: string = ''; + public password: string = ''; + + applyToRequest(requestOptions: localVarRequest.Options): void { + requestOptions.auth = { + username: this.username, password: this.password + } + } +} + +export class HttpBearerAuth implements Authentication { + public accessToken: string | (() => string) = ''; + + applyToRequest(requestOptions: localVarRequest.Options): void { + if (requestOptions && requestOptions.headers) { + const accessToken = typeof this.accessToken === 'function' + ? this.accessToken() + : this.accessToken; + requestOptions.headers["Authorization"] = "Bearer " + accessToken; + } + } +} + +export class ApiKeyAuth implements Authentication { + public apiKey: string = ''; + + constructor(private location: string, private paramName: string) { + } + + applyToRequest(requestOptions: localVarRequest.Options): void { + if (this.location == "query") { + (requestOptions.qs)[this.paramName] = this.apiKey; + } else if (this.location == "header" && requestOptions && requestOptions.headers) { + requestOptions.headers[this.paramName] = this.apiKey; + } else if (this.location == 'cookie' && requestOptions && requestOptions.headers) { + if (requestOptions.headers['Cookie']) { + requestOptions.headers['Cookie'] += '; ' + this.paramName + '=' + encodeURIComponent(this.apiKey); + } + else { + requestOptions.headers['Cookie'] = this.paramName + '=' + encodeURIComponent(this.apiKey); + } + } + } +} + +export class OAuth implements Authentication { + public accessToken: string = ''; + + applyToRequest(requestOptions: localVarRequest.Options): void { + if (requestOptions && requestOptions.headers) { + requestOptions.headers["Authorization"] = "Bearer " + this.accessToken; + } + } +} + +export class VoidAuth implements Authentication { + public username: string = ''; + public password: string = ''; + + applyToRequest(_: localVarRequest.Options): void { + // Do nothing + } +} + +export type Interceptor = (requestOptions: localVarRequest.Options) => (Promise | void); diff --git a/src/typings/legalEntityManagement/nOLocalAccountIdentification.ts b/src/typings/legalEntityManagement/nOLocalAccountIdentification.ts index 6ba897a58..ff8be56cd 100644 --- a/src/typings/legalEntityManagement/nOLocalAccountIdentification.ts +++ b/src/typings/legalEntityManagement/nOLocalAccountIdentification.ts @@ -16,7 +16,7 @@ export class NOLocalAccountIdentification { /** * **noLocal** */ - 'type': NOLocalAccountIdentification.TypeEnum; + 'type': NOLocalAccountIdentification.TypeEnum = NOLocalAccountIdentification.TypeEnum.NoLocal; static discriminator: string | undefined = undefined; @@ -39,6 +39,6 @@ export class NOLocalAccountIdentification { export namespace NOLocalAccountIdentification { export enum TypeEnum { - NoLocal = 'noLocal' + NoLocal = 'noLocal' } } diff --git a/src/typings/legalEntityManagement/nZLocalAccountIdentification.ts b/src/typings/legalEntityManagement/nZLocalAccountIdentification.ts index de28e370c..66c329082 100644 --- a/src/typings/legalEntityManagement/nZLocalAccountIdentification.ts +++ b/src/typings/legalEntityManagement/nZLocalAccountIdentification.ts @@ -16,7 +16,7 @@ export class NZLocalAccountIdentification { /** * **nzLocal** */ - 'type': NZLocalAccountIdentification.TypeEnum; + 'type': NZLocalAccountIdentification.TypeEnum = NZLocalAccountIdentification.TypeEnum.NzLocal; static discriminator: string | undefined = undefined; @@ -39,6 +39,6 @@ export class NZLocalAccountIdentification { export namespace NZLocalAccountIdentification { export enum TypeEnum { - NzLocal = 'nzLocal' + NzLocal = 'nzLocal' } } diff --git a/src/typings/legalEntityManagement/numberAndBicAccountIdentification.ts b/src/typings/legalEntityManagement/numberAndBicAccountIdentification.ts index 283424e68..c939ec6c3 100644 --- a/src/typings/legalEntityManagement/numberAndBicAccountIdentification.ts +++ b/src/typings/legalEntityManagement/numberAndBicAccountIdentification.ts @@ -14,7 +14,7 @@ export class NumberAndBicAccountIdentification { * The bank account number, without separators or whitespace. The length and format depends on the bank or country. */ 'accountNumber': string; - 'additionalBankIdentification'?: AdditionalBankIdentification | null; + 'additionalBankIdentification'?: AdditionalBankIdentification; /** * The bank\'s 8- or 11-character BIC or SWIFT code. */ @@ -22,7 +22,7 @@ export class NumberAndBicAccountIdentification { /** * **numberAndBic** */ - 'type': NumberAndBicAccountIdentification.TypeEnum; + 'type': NumberAndBicAccountIdentification.TypeEnum = NumberAndBicAccountIdentification.TypeEnum.NumberAndBic; static discriminator: string | undefined = undefined; @@ -35,7 +35,7 @@ export class NumberAndBicAccountIdentification { { "name": "additionalBankIdentification", "baseName": "additionalBankIdentification", - "type": "AdditionalBankIdentification | null" + "type": "AdditionalBankIdentification" }, { "name": "bic", @@ -55,6 +55,6 @@ export class NumberAndBicAccountIdentification { export namespace NumberAndBicAccountIdentification { export enum TypeEnum { - NumberAndBic = 'numberAndBic' + NumberAndBic = 'numberAndBic' } } diff --git a/src/typings/legalEntityManagement/onboardingLinkInfo.ts b/src/typings/legalEntityManagement/onboardingLinkInfo.ts index d69bac09b..615c6d8aa 100644 --- a/src/typings/legalEntityManagement/onboardingLinkInfo.ts +++ b/src/typings/legalEntityManagement/onboardingLinkInfo.ts @@ -18,7 +18,7 @@ export class OnboardingLinkInfo { * The URL where the user is redirected after they complete hosted onboarding. */ 'redirectUrl'?: string; - 'settings'?: OnboardingLinkSettings | null; + 'settings'?: OnboardingLinkSettings; /** * The unique identifier of the hosted onboarding theme. */ @@ -40,7 +40,7 @@ export class OnboardingLinkInfo { { "name": "settings", "baseName": "settings", - "type": "OnboardingLinkSettings | null" + "type": "OnboardingLinkSettings" }, { "name": "themeId", diff --git a/src/typings/legalEntityManagement/organization.ts b/src/typings/legalEntityManagement/organization.ts index 4cab32d67..2c3efec1b 100644 --- a/src/typings/legalEntityManagement/organization.ts +++ b/src/typings/legalEntityManagement/organization.ts @@ -44,19 +44,19 @@ export class Organization { * The organization\'s legal name. */ 'legalName': string; - 'phone'?: PhoneNumber | null; - 'principalPlaceOfBusiness'?: Address | null; + 'phone'?: PhoneNumber; + 'principalPlaceOfBusiness'?: Address; 'registeredAddress': Address; /** * The organization\'s registration number. */ 'registrationNumber'?: string; - 'stockData'?: StockData | null; + 'stockData'?: StockData; /** * The tax information of the organization. */ 'taxInformation'?: Array; - 'taxReportingClassification'?: TaxReportingClassification | null; + 'taxReportingClassification'?: TaxReportingClassification; /** * Type of organization. Possible values: **associationIncorporated**, **governmentalOrganization**, **listedPublicCompany**, **nonProfit**, **partnershipIncorporated**, **privateCompany**. */ @@ -69,7 +69,7 @@ export class Organization { * The organization\'s VAT number. */ 'vatNumber'?: string; - 'webData'?: WebData | null; + 'webData'?: WebData; static discriminator: string | undefined = undefined; @@ -112,12 +112,12 @@ export class Organization { { "name": "phone", "baseName": "phone", - "type": "PhoneNumber | null" + "type": "PhoneNumber" }, { "name": "principalPlaceOfBusiness", "baseName": "principalPlaceOfBusiness", - "type": "Address | null" + "type": "Address" }, { "name": "registeredAddress", @@ -132,7 +132,7 @@ export class Organization { { "name": "stockData", "baseName": "stockData", - "type": "StockData | null" + "type": "StockData" }, { "name": "taxInformation", @@ -142,7 +142,7 @@ export class Organization { { "name": "taxReportingClassification", "baseName": "taxReportingClassification", - "type": "TaxReportingClassification | null" + "type": "TaxReportingClassification" }, { "name": "type", @@ -162,7 +162,7 @@ export class Organization { { "name": "webData", "baseName": "webData", - "type": "WebData | null" + "type": "WebData" } ]; static getAttributeTypeMap() { @@ -172,15 +172,15 @@ export class Organization { export namespace Organization { export enum TypeEnum { - AssociationIncorporated = 'associationIncorporated', - GovernmentalOrganization = 'governmentalOrganization', - ListedPublicCompany = 'listedPublicCompany', - NonProfit = 'nonProfit', - PartnershipIncorporated = 'partnershipIncorporated', - PrivateCompany = 'privateCompany' + AssociationIncorporated = 'associationIncorporated', + GovernmentalOrganization = 'governmentalOrganization', + ListedPublicCompany = 'listedPublicCompany', + NonProfit = 'nonProfit', + PartnershipIncorporated = 'partnershipIncorporated', + PrivateCompany = 'privateCompany' } export enum VatAbsenceReasonEnum { - IndustryExemption = 'industryExemption', - BelowTaxThreshold = 'belowTaxThreshold' + IndustryExemption = 'industryExemption', + BelowTaxThreshold = 'belowTaxThreshold' } } diff --git a/src/typings/legalEntityManagement/pLLocalAccountIdentification.ts b/src/typings/legalEntityManagement/pLLocalAccountIdentification.ts index 78c7d765a..d39b765ea 100644 --- a/src/typings/legalEntityManagement/pLLocalAccountIdentification.ts +++ b/src/typings/legalEntityManagement/pLLocalAccountIdentification.ts @@ -16,7 +16,7 @@ export class PLLocalAccountIdentification { /** * **plLocal** */ - 'type': PLLocalAccountIdentification.TypeEnum; + 'type': PLLocalAccountIdentification.TypeEnum = PLLocalAccountIdentification.TypeEnum.PlLocal; static discriminator: string | undefined = undefined; @@ -39,6 +39,6 @@ export class PLLocalAccountIdentification { export namespace PLLocalAccountIdentification { export enum TypeEnum { - PlLocal = 'plLocal' + PlLocal = 'plLocal' } } diff --git a/src/typings/legalEntityManagement/sELocalAccountIdentification.ts b/src/typings/legalEntityManagement/sELocalAccountIdentification.ts index a0646debc..5cac87f19 100644 --- a/src/typings/legalEntityManagement/sELocalAccountIdentification.ts +++ b/src/typings/legalEntityManagement/sELocalAccountIdentification.ts @@ -20,7 +20,7 @@ export class SELocalAccountIdentification { /** * **seLocal** */ - 'type': SELocalAccountIdentification.TypeEnum; + 'type': SELocalAccountIdentification.TypeEnum = SELocalAccountIdentification.TypeEnum.SeLocal; static discriminator: string | undefined = undefined; @@ -48,6 +48,6 @@ export class SELocalAccountIdentification { export namespace SELocalAccountIdentification { export enum TypeEnum { - SeLocal = 'seLocal' + SeLocal = 'seLocal' } } diff --git a/src/typings/legalEntityManagement/sGLocalAccountIdentification.ts b/src/typings/legalEntityManagement/sGLocalAccountIdentification.ts index 38823c052..6e62d391b 100644 --- a/src/typings/legalEntityManagement/sGLocalAccountIdentification.ts +++ b/src/typings/legalEntityManagement/sGLocalAccountIdentification.ts @@ -20,7 +20,7 @@ export class SGLocalAccountIdentification { /** * **sgLocal** */ - 'type'?: SGLocalAccountIdentification.TypeEnum; + 'type'?: SGLocalAccountIdentification.TypeEnum = SGLocalAccountIdentification.TypeEnum.SgLocal; static discriminator: string | undefined = undefined; @@ -48,6 +48,6 @@ export class SGLocalAccountIdentification { export namespace SGLocalAccountIdentification { export enum TypeEnum { - SgLocal = 'sgLocal' + SgLocal = 'sgLocal' } } diff --git a/src/typings/legalEntityManagement/soleProprietorship.ts b/src/typings/legalEntityManagement/soleProprietorship.ts index 110ddf597..b7b4c9576 100644 --- a/src/typings/legalEntityManagement/soleProprietorship.ts +++ b/src/typings/legalEntityManagement/soleProprietorship.ts @@ -32,7 +32,7 @@ export class SoleProprietorship { * The legal name. */ 'name': string; - 'principalPlaceOfBusiness'?: Address | null; + 'principalPlaceOfBusiness'?: Address; 'registeredAddress': Address; /** * The registration number. @@ -86,7 +86,7 @@ export class SoleProprietorship { { "name": "principalPlaceOfBusiness", "baseName": "principalPlaceOfBusiness", - "type": "Address | null" + "type": "Address" }, { "name": "registeredAddress", @@ -101,7 +101,7 @@ export class SoleProprietorship { { "name": "taxAbsent", "baseName": "taxAbsent", - "type": "boolean | null" + "type": "boolean" }, { "name": "taxInformation", @@ -126,7 +126,7 @@ export class SoleProprietorship { export namespace SoleProprietorship { export enum VatAbsenceReasonEnum { - IndustryExemption = 'industryExemption', - BelowTaxThreshold = 'belowTaxThreshold' + IndustryExemption = 'industryExemption', + BelowTaxThreshold = 'belowTaxThreshold' } } diff --git a/src/typings/legalEntityManagement/sourceOfFunds.ts b/src/typings/legalEntityManagement/sourceOfFunds.ts index b5b119e56..027362b48 100644 --- a/src/typings/legalEntityManagement/sourceOfFunds.ts +++ b/src/typings/legalEntityManagement/sourceOfFunds.ts @@ -60,6 +60,6 @@ export class SourceOfFunds { export namespace SourceOfFunds { export enum TypeEnum { - Business = 'business' + Business = 'business' } } diff --git a/src/typings/legalEntityManagement/taxReportingClassification.ts b/src/typings/legalEntityManagement/taxReportingClassification.ts index df53e95b0..24c510442 100644 --- a/src/typings/legalEntityManagement/taxReportingClassification.ts +++ b/src/typings/legalEntityManagement/taxReportingClassification.ts @@ -57,24 +57,24 @@ export class TaxReportingClassification { export namespace TaxReportingClassification { export enum BusinessTypeEnum { - Other = 'other', - ListedPublicCompany = 'listedPublicCompany', - SubsidiaryOfListedPublicCompany = 'subsidiaryOfListedPublicCompany', - GovernmentalOrganization = 'governmentalOrganization', - InternationalOrganization = 'internationalOrganization', - FinancialInstitution = 'financialInstitution' + Other = 'other', + ListedPublicCompany = 'listedPublicCompany', + SubsidiaryOfListedPublicCompany = 'subsidiaryOfListedPublicCompany', + GovernmentalOrganization = 'governmentalOrganization', + InternationalOrganization = 'internationalOrganization', + FinancialInstitution = 'financialInstitution' } export enum MainSourceOfIncomeEnum { - BusinessOperation = 'businessOperation', - RealEstateSales = 'realEstateSales', - InvestmentInterestOrRoyalty = 'investmentInterestOrRoyalty', - PropertyRental = 'propertyRental', - Other = 'other' + BusinessOperation = 'businessOperation', + RealEstateSales = 'realEstateSales', + InvestmentInterestOrRoyalty = 'investmentInterestOrRoyalty', + PropertyRental = 'propertyRental', + Other = 'other' } export enum TypeEnum { - NonFinancialNonReportable = 'nonFinancialNonReportable', - FinancialNonReportable = 'financialNonReportable', - NonFinancialActive = 'nonFinancialActive', - NonFinancialPassive = 'nonFinancialPassive' + NonFinancialNonReportable = 'nonFinancialNonReportable', + FinancialNonReportable = 'financialNonReportable', + NonFinancialActive = 'nonFinancialActive', + NonFinancialPassive = 'nonFinancialPassive' } } diff --git a/src/typings/legalEntityManagement/termsOfServiceAcceptanceInfo.ts b/src/typings/legalEntityManagement/termsOfServiceAcceptanceInfo.ts index 3015b9097..c21fae501 100644 --- a/src/typings/legalEntityManagement/termsOfServiceAcceptanceInfo.ts +++ b/src/typings/legalEntityManagement/termsOfServiceAcceptanceInfo.ts @@ -66,14 +66,14 @@ export class TermsOfServiceAcceptanceInfo { export namespace TermsOfServiceAcceptanceInfo { export enum TypeEnum { - AdyenAccount = 'adyenAccount', - AdyenCapital = 'adyenCapital', - AdyenCard = 'adyenCard', - AdyenChargeCard = 'adyenChargeCard', - AdyenForPlatformsAdvanced = 'adyenForPlatformsAdvanced', - AdyenForPlatformsManage = 'adyenForPlatformsManage', - AdyenFranchisee = 'adyenFranchisee', - AdyenIssuing = 'adyenIssuing', - AdyenPccr = 'adyenPccr' + AdyenAccount = 'adyenAccount', + AdyenCapital = 'adyenCapital', + AdyenCard = 'adyenCard', + AdyenChargeCard = 'adyenChargeCard', + AdyenForPlatformsAdvanced = 'adyenForPlatformsAdvanced', + AdyenForPlatformsManage = 'adyenForPlatformsManage', + AdyenFranchisee = 'adyenFranchisee', + AdyenIssuing = 'adyenIssuing', + AdyenPccr = 'adyenPccr' } } diff --git a/src/typings/legalEntityManagement/transferInstrument.ts b/src/typings/legalEntityManagement/transferInstrument.ts index 80db42003..0ecd1e886 100644 --- a/src/typings/legalEntityManagement/transferInstrument.ts +++ b/src/typings/legalEntityManagement/transferInstrument.ts @@ -85,7 +85,7 @@ export class TransferInstrument { export namespace TransferInstrument { export enum TypeEnum { - BankAccount = 'bankAccount', - RecurringDetail = 'recurringDetail' + BankAccount = 'bankAccount', + RecurringDetail = 'recurringDetail' } } diff --git a/src/typings/legalEntityManagement/transferInstrumentInfo.ts b/src/typings/legalEntityManagement/transferInstrumentInfo.ts index b0c592243..1cd09256a 100644 --- a/src/typings/legalEntityManagement/transferInstrumentInfo.ts +++ b/src/typings/legalEntityManagement/transferInstrumentInfo.ts @@ -46,7 +46,7 @@ export class TransferInstrumentInfo { export namespace TransferInstrumentInfo { export enum TypeEnum { - BankAccount = 'bankAccount', - RecurringDetail = 'recurringDetail' + BankAccount = 'bankAccount', + RecurringDetail = 'recurringDetail' } } diff --git a/src/typings/legalEntityManagement/trust.ts b/src/typings/legalEntityManagement/trust.ts index 7043e0568..92ada054a 100644 --- a/src/typings/legalEntityManagement/trust.ts +++ b/src/typings/legalEntityManagement/trust.ts @@ -32,7 +32,7 @@ export class Trust { * The legal name. */ 'name': string; - 'principalPlaceOfBusiness'?: Address | null; + 'principalPlaceOfBusiness'?: Address; 'registeredAddress': Address; /** * The registration number. @@ -90,7 +90,7 @@ export class Trust { { "name": "principalPlaceOfBusiness", "baseName": "principalPlaceOfBusiness", - "type": "Address | null" + "type": "Address" }, { "name": "registeredAddress", @@ -135,28 +135,28 @@ export class Trust { export namespace Trust { export enum TypeEnum { - BusinessTrust = 'businessTrust', - CashManagementTrust = 'cashManagementTrust', - CharitableTrust = 'charitableTrust', - CorporateUnitTrust = 'corporateUnitTrust', - DeceasedEstate = 'deceasedEstate', - DiscretionaryTrust = 'discretionaryTrust', - DiscretionaryInvestmentTrust = 'discretionaryInvestmentTrust', - DiscretionaryServicesManagementTrust = 'discretionaryServicesManagementTrust', - DiscretionaryTradingTrust = 'discretionaryTradingTrust', - FamilyTrust = 'familyTrust', - FirstHomeSaverAccountsTrust = 'firstHomeSaverAccountsTrust', - FixedTrust = 'fixedTrust', - FixedUnitTrust = 'fixedUnitTrust', - HybridTrust = 'hybridTrust', - ListedPublicUnitTrust = 'listedPublicUnitTrust', - OtherTrust = 'otherTrust', - PooledSuperannuationTrust = 'pooledSuperannuationTrust', - PublicTradingTrust = 'publicTradingTrust', - UnlistedPublicUnitTrust = 'unlistedPublicUnitTrust' + BusinessTrust = 'businessTrust', + CashManagementTrust = 'cashManagementTrust', + CharitableTrust = 'charitableTrust', + CorporateUnitTrust = 'corporateUnitTrust', + DeceasedEstate = 'deceasedEstate', + DiscretionaryTrust = 'discretionaryTrust', + DiscretionaryInvestmentTrust = 'discretionaryInvestmentTrust', + DiscretionaryServicesManagementTrust = 'discretionaryServicesManagementTrust', + DiscretionaryTradingTrust = 'discretionaryTradingTrust', + FamilyTrust = 'familyTrust', + FirstHomeSaverAccountsTrust = 'firstHomeSaverAccountsTrust', + FixedTrust = 'fixedTrust', + FixedUnitTrust = 'fixedUnitTrust', + HybridTrust = 'hybridTrust', + ListedPublicUnitTrust = 'listedPublicUnitTrust', + OtherTrust = 'otherTrust', + PooledSuperannuationTrust = 'pooledSuperannuationTrust', + PublicTradingTrust = 'publicTradingTrust', + UnlistedPublicUnitTrust = 'unlistedPublicUnitTrust' } export enum VatAbsenceReasonEnum { - IndustryExemption = 'industryExemption', - BelowTaxThreshold = 'belowTaxThreshold' + IndustryExemption = 'industryExemption', + BelowTaxThreshold = 'belowTaxThreshold' } } diff --git a/src/typings/legalEntityManagement/uKLocalAccountIdentification.ts b/src/typings/legalEntityManagement/uKLocalAccountIdentification.ts index 26dff2350..b84bc995d 100644 --- a/src/typings/legalEntityManagement/uKLocalAccountIdentification.ts +++ b/src/typings/legalEntityManagement/uKLocalAccountIdentification.ts @@ -20,7 +20,7 @@ export class UKLocalAccountIdentification { /** * **ukLocal** */ - 'type': UKLocalAccountIdentification.TypeEnum; + 'type': UKLocalAccountIdentification.TypeEnum = UKLocalAccountIdentification.TypeEnum.UkLocal; static discriminator: string | undefined = undefined; @@ -48,6 +48,6 @@ export class UKLocalAccountIdentification { export namespace UKLocalAccountIdentification { export enum TypeEnum { - UkLocal = 'ukLocal' + UkLocal = 'ukLocal' } } diff --git a/src/typings/legalEntityManagement/uSLocalAccountIdentification.ts b/src/typings/legalEntityManagement/uSLocalAccountIdentification.ts index 43cba41d2..940291056 100644 --- a/src/typings/legalEntityManagement/uSLocalAccountIdentification.ts +++ b/src/typings/legalEntityManagement/uSLocalAccountIdentification.ts @@ -16,7 +16,7 @@ export class USLocalAccountIdentification { /** * The bank account type. Possible values: **checking** or **savings**. Defaults to **checking**. */ - 'accountType'?: USLocalAccountIdentification.AccountTypeEnum; + 'accountType'?: USLocalAccountIdentification.AccountTypeEnum = USLocalAccountIdentification.AccountTypeEnum.Checking; /** * The 9-digit [routing number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without separators or whitespace. */ @@ -24,7 +24,7 @@ export class USLocalAccountIdentification { /** * **usLocal** */ - 'type': USLocalAccountIdentification.TypeEnum; + 'type': USLocalAccountIdentification.TypeEnum = USLocalAccountIdentification.TypeEnum.UsLocal; static discriminator: string | undefined = undefined; @@ -57,10 +57,10 @@ export class USLocalAccountIdentification { export namespace USLocalAccountIdentification { export enum AccountTypeEnum { - Checking = 'checking', - Savings = 'savings' + Checking = 'checking', + Savings = 'savings' } export enum TypeEnum { - UsLocal = 'usLocal' + UsLocal = 'usLocal' } } diff --git a/src/typings/legalEntityManagement/unincorporatedPartnership.ts b/src/typings/legalEntityManagement/unincorporatedPartnership.ts index d37061c6f..273de03c6 100644 --- a/src/typings/legalEntityManagement/unincorporatedPartnership.ts +++ b/src/typings/legalEntityManagement/unincorporatedPartnership.ts @@ -31,7 +31,7 @@ export class UnincorporatedPartnership { * The legal name. */ 'name': string; - 'principalPlaceOfBusiness'?: Address | null; + 'principalPlaceOfBusiness'?: Address; 'registeredAddress': Address; /** * The registration number. @@ -85,7 +85,7 @@ export class UnincorporatedPartnership { { "name": "principalPlaceOfBusiness", "baseName": "principalPlaceOfBusiness", - "type": "Address | null" + "type": "Address" }, { "name": "registeredAddress", @@ -125,37 +125,37 @@ export class UnincorporatedPartnership { export namespace UnincorporatedPartnership { export enum TypeEnum { - LimitedPartnership = 'limitedPartnership', - GeneralPartnership = 'generalPartnership', - FamilyPartnership = 'familyPartnership', - CommercialPartnership = 'commercialPartnership', - PublicPartnership = 'publicPartnership', - OtherPartnership = 'otherPartnership', - Gbr = 'gbr', - Gmbh = 'gmbh', - Kgaa = 'kgaa', - Cv = 'cv', - Vof = 'vof', - Maatschap = 'maatschap', - PrivateFundLimitedPartnership = 'privateFundLimitedPartnership', - BusinessTrustEntity = 'businessTrustEntity', - BusinessPartnership = 'businessPartnership', - LimitedLiabilityPartnership = 'limitedLiabilityPartnership', - Eg = 'eg', - Cooperative = 'cooperative', - Vos = 'vos', - ComunidadDeBienes = 'comunidadDeBienes', - HerenciaYacente = 'herenciaYacente', - ComunidadDePropietarios = 'comunidadDePropietarios', - Sep = 'sep', - Sca = 'sca', - Bt = 'bt', - Kkt = 'kkt', - Scs = 'scs', - Snc = 'snc' + LimitedPartnership = 'limitedPartnership', + GeneralPartnership = 'generalPartnership', + FamilyPartnership = 'familyPartnership', + CommercialPartnership = 'commercialPartnership', + PublicPartnership = 'publicPartnership', + OtherPartnership = 'otherPartnership', + Gbr = 'gbr', + Gmbh = 'gmbh', + Kgaa = 'kgaa', + Cv = 'cv', + Vof = 'vof', + Maatschap = 'maatschap', + PrivateFundLimitedPartnership = 'privateFundLimitedPartnership', + BusinessTrustEntity = 'businessTrustEntity', + BusinessPartnership = 'businessPartnership', + LimitedLiabilityPartnership = 'limitedLiabilityPartnership', + Eg = 'eg', + Cooperative = 'cooperative', + Vos = 'vos', + ComunidadDeBienes = 'comunidadDeBienes', + HerenciaYacente = 'herenciaYacente', + ComunidadDePropietarios = 'comunidadDePropietarios', + Sep = 'sep', + Sca = 'sca', + Bt = 'bt', + Kkt = 'kkt', + Scs = 'scs', + Snc = 'snc' } export enum VatAbsenceReasonEnum { - IndustryExemption = 'industryExemption', - BelowTaxThreshold = 'belowTaxThreshold' + IndustryExemption = 'industryExemption', + BelowTaxThreshold = 'belowTaxThreshold' } } diff --git a/src/typings/legalEntityManagement/verificationDeadline.ts b/src/typings/legalEntityManagement/verificationDeadline.ts index 61f315167..df3759187 100644 --- a/src/typings/legalEntityManagement/verificationDeadline.ts +++ b/src/typings/legalEntityManagement/verificationDeadline.ts @@ -48,60 +48,60 @@ export class VerificationDeadline { export namespace VerificationDeadline { export enum CapabilitiesEnum { - AcceptExternalFunding = 'acceptExternalFunding', - AcceptPspFunding = 'acceptPspFunding', - AcceptTransactionInRestrictedCountries = 'acceptTransactionInRestrictedCountries', - AcceptTransactionInRestrictedCountriesCommercial = 'acceptTransactionInRestrictedCountriesCommercial', - AcceptTransactionInRestrictedCountriesConsumer = 'acceptTransactionInRestrictedCountriesConsumer', - AcceptTransactionInRestrictedIndustries = 'acceptTransactionInRestrictedIndustries', - AcceptTransactionInRestrictedIndustriesCommercial = 'acceptTransactionInRestrictedIndustriesCommercial', - AcceptTransactionInRestrictedIndustriesConsumer = 'acceptTransactionInRestrictedIndustriesConsumer', - Acquiring = 'acquiring', - AtmWithdrawal = 'atmWithdrawal', - AtmWithdrawalCommercial = 'atmWithdrawalCommercial', - AtmWithdrawalConsumer = 'atmWithdrawalConsumer', - AtmWithdrawalInRestrictedCountries = 'atmWithdrawalInRestrictedCountries', - AtmWithdrawalInRestrictedCountriesCommercial = 'atmWithdrawalInRestrictedCountriesCommercial', - AtmWithdrawalInRestrictedCountriesConsumer = 'atmWithdrawalInRestrictedCountriesConsumer', - AuthorisedPaymentInstrumentUser = 'authorisedPaymentInstrumentUser', - GetGrantOffers = 'getGrantOffers', - IssueBankAccount = 'issueBankAccount', - IssueCard = 'issueCard', - IssueCardCommercial = 'issueCardCommercial', - IssueCardConsumer = 'issueCardConsumer', - IssueChargeCard = 'issueChargeCard', - IssueChargeCardCommercial = 'issueChargeCardCommercial', - IssueCreditLimit = 'issueCreditLimit', - LocalAcceptance = 'localAcceptance', - Payout = 'payout', - PayoutToTransferInstrument = 'payoutToTransferInstrument', - Processing = 'processing', - ReceiveFromBalanceAccount = 'receiveFromBalanceAccount', - ReceiveFromPlatformPayments = 'receiveFromPlatformPayments', - ReceiveFromThirdParty = 'receiveFromThirdParty', - ReceiveFromTransferInstrument = 'receiveFromTransferInstrument', - ReceiveGrants = 'receiveGrants', - ReceivePayments = 'receivePayments', - SendToBalanceAccount = 'sendToBalanceAccount', - SendToThirdParty = 'sendToThirdParty', - SendToTransferInstrument = 'sendToTransferInstrument', - ThirdPartyFunding = 'thirdPartyFunding', - UseCard = 'useCard', - UseCardCommercial = 'useCardCommercial', - UseCardConsumer = 'useCardConsumer', - UseCardInRestrictedCountries = 'useCardInRestrictedCountries', - UseCardInRestrictedCountriesCommercial = 'useCardInRestrictedCountriesCommercial', - UseCardInRestrictedCountriesConsumer = 'useCardInRestrictedCountriesConsumer', - UseCardInRestrictedIndustries = 'useCardInRestrictedIndustries', - UseCardInRestrictedIndustriesCommercial = 'useCardInRestrictedIndustriesCommercial', - UseCardInRestrictedIndustriesConsumer = 'useCardInRestrictedIndustriesConsumer', - UseChargeCard = 'useChargeCard', - UseChargeCardCommercial = 'useChargeCardCommercial', - WithdrawFromAtm = 'withdrawFromAtm', - WithdrawFromAtmCommercial = 'withdrawFromAtmCommercial', - WithdrawFromAtmConsumer = 'withdrawFromAtmConsumer', - WithdrawFromAtmInRestrictedCountries = 'withdrawFromAtmInRestrictedCountries', - WithdrawFromAtmInRestrictedCountriesCommercial = 'withdrawFromAtmInRestrictedCountriesCommercial', - WithdrawFromAtmInRestrictedCountriesConsumer = 'withdrawFromAtmInRestrictedCountriesConsumer' + AcceptExternalFunding = 'acceptExternalFunding', + AcceptPspFunding = 'acceptPspFunding', + AcceptTransactionInRestrictedCountries = 'acceptTransactionInRestrictedCountries', + AcceptTransactionInRestrictedCountriesCommercial = 'acceptTransactionInRestrictedCountriesCommercial', + AcceptTransactionInRestrictedCountriesConsumer = 'acceptTransactionInRestrictedCountriesConsumer', + AcceptTransactionInRestrictedIndustries = 'acceptTransactionInRestrictedIndustries', + AcceptTransactionInRestrictedIndustriesCommercial = 'acceptTransactionInRestrictedIndustriesCommercial', + AcceptTransactionInRestrictedIndustriesConsumer = 'acceptTransactionInRestrictedIndustriesConsumer', + Acquiring = 'acquiring', + AtmWithdrawal = 'atmWithdrawal', + AtmWithdrawalCommercial = 'atmWithdrawalCommercial', + AtmWithdrawalConsumer = 'atmWithdrawalConsumer', + AtmWithdrawalInRestrictedCountries = 'atmWithdrawalInRestrictedCountries', + AtmWithdrawalInRestrictedCountriesCommercial = 'atmWithdrawalInRestrictedCountriesCommercial', + AtmWithdrawalInRestrictedCountriesConsumer = 'atmWithdrawalInRestrictedCountriesConsumer', + AuthorisedPaymentInstrumentUser = 'authorisedPaymentInstrumentUser', + GetGrantOffers = 'getGrantOffers', + IssueBankAccount = 'issueBankAccount', + IssueCard = 'issueCard', + IssueCardCommercial = 'issueCardCommercial', + IssueCardConsumer = 'issueCardConsumer', + IssueChargeCard = 'issueChargeCard', + IssueChargeCardCommercial = 'issueChargeCardCommercial', + IssueCreditLimit = 'issueCreditLimit', + LocalAcceptance = 'localAcceptance', + Payout = 'payout', + PayoutToTransferInstrument = 'payoutToTransferInstrument', + Processing = 'processing', + ReceiveFromBalanceAccount = 'receiveFromBalanceAccount', + ReceiveFromPlatformPayments = 'receiveFromPlatformPayments', + ReceiveFromThirdParty = 'receiveFromThirdParty', + ReceiveFromTransferInstrument = 'receiveFromTransferInstrument', + ReceiveGrants = 'receiveGrants', + ReceivePayments = 'receivePayments', + SendToBalanceAccount = 'sendToBalanceAccount', + SendToThirdParty = 'sendToThirdParty', + SendToTransferInstrument = 'sendToTransferInstrument', + ThirdPartyFunding = 'thirdPartyFunding', + UseCard = 'useCard', + UseCardCommercial = 'useCardCommercial', + UseCardConsumer = 'useCardConsumer', + UseCardInRestrictedCountries = 'useCardInRestrictedCountries', + UseCardInRestrictedCountriesCommercial = 'useCardInRestrictedCountriesCommercial', + UseCardInRestrictedCountriesConsumer = 'useCardInRestrictedCountriesConsumer', + UseCardInRestrictedIndustries = 'useCardInRestrictedIndustries', + UseCardInRestrictedIndustriesCommercial = 'useCardInRestrictedIndustriesCommercial', + UseCardInRestrictedIndustriesConsumer = 'useCardInRestrictedIndustriesConsumer', + UseChargeCard = 'useChargeCard', + UseChargeCardCommercial = 'useChargeCardCommercial', + WithdrawFromAtm = 'withdrawFromAtm', + WithdrawFromAtmCommercial = 'withdrawFromAtmCommercial', + WithdrawFromAtmConsumer = 'withdrawFromAtmConsumer', + WithdrawFromAtmInRestrictedCountries = 'withdrawFromAtmInRestrictedCountries', + WithdrawFromAtmInRestrictedCountriesCommercial = 'withdrawFromAtmInRestrictedCountriesCommercial', + WithdrawFromAtmInRestrictedCountriesConsumer = 'withdrawFromAtmInRestrictedCountriesConsumer' } } diff --git a/src/typings/legalEntityManagement/verificationError.ts b/src/typings/legalEntityManagement/verificationError.ts index 488fa7bd3..f36797c10 100644 --- a/src/typings/legalEntityManagement/verificationError.ts +++ b/src/typings/legalEntityManagement/verificationError.ts @@ -77,67 +77,67 @@ export class VerificationError { export namespace VerificationError { export enum CapabilitiesEnum { - AcceptExternalFunding = 'acceptExternalFunding', - AcceptPspFunding = 'acceptPspFunding', - AcceptTransactionInRestrictedCountries = 'acceptTransactionInRestrictedCountries', - AcceptTransactionInRestrictedCountriesCommercial = 'acceptTransactionInRestrictedCountriesCommercial', - AcceptTransactionInRestrictedCountriesConsumer = 'acceptTransactionInRestrictedCountriesConsumer', - AcceptTransactionInRestrictedIndustries = 'acceptTransactionInRestrictedIndustries', - AcceptTransactionInRestrictedIndustriesCommercial = 'acceptTransactionInRestrictedIndustriesCommercial', - AcceptTransactionInRestrictedIndustriesConsumer = 'acceptTransactionInRestrictedIndustriesConsumer', - Acquiring = 'acquiring', - AtmWithdrawal = 'atmWithdrawal', - AtmWithdrawalCommercial = 'atmWithdrawalCommercial', - AtmWithdrawalConsumer = 'atmWithdrawalConsumer', - AtmWithdrawalInRestrictedCountries = 'atmWithdrawalInRestrictedCountries', - AtmWithdrawalInRestrictedCountriesCommercial = 'atmWithdrawalInRestrictedCountriesCommercial', - AtmWithdrawalInRestrictedCountriesConsumer = 'atmWithdrawalInRestrictedCountriesConsumer', - AuthorisedPaymentInstrumentUser = 'authorisedPaymentInstrumentUser', - GetGrantOffers = 'getGrantOffers', - IssueBankAccount = 'issueBankAccount', - IssueCard = 'issueCard', - IssueCardCommercial = 'issueCardCommercial', - IssueCardConsumer = 'issueCardConsumer', - IssueChargeCard = 'issueChargeCard', - IssueChargeCardCommercial = 'issueChargeCardCommercial', - IssueCreditLimit = 'issueCreditLimit', - LocalAcceptance = 'localAcceptance', - Payout = 'payout', - PayoutToTransferInstrument = 'payoutToTransferInstrument', - Processing = 'processing', - ReceiveFromBalanceAccount = 'receiveFromBalanceAccount', - ReceiveFromPlatformPayments = 'receiveFromPlatformPayments', - ReceiveFromThirdParty = 'receiveFromThirdParty', - ReceiveFromTransferInstrument = 'receiveFromTransferInstrument', - ReceiveGrants = 'receiveGrants', - ReceivePayments = 'receivePayments', - SendToBalanceAccount = 'sendToBalanceAccount', - SendToThirdParty = 'sendToThirdParty', - SendToTransferInstrument = 'sendToTransferInstrument', - ThirdPartyFunding = 'thirdPartyFunding', - UseCard = 'useCard', - UseCardCommercial = 'useCardCommercial', - UseCardConsumer = 'useCardConsumer', - UseCardInRestrictedCountries = 'useCardInRestrictedCountries', - UseCardInRestrictedCountriesCommercial = 'useCardInRestrictedCountriesCommercial', - UseCardInRestrictedCountriesConsumer = 'useCardInRestrictedCountriesConsumer', - UseCardInRestrictedIndustries = 'useCardInRestrictedIndustries', - UseCardInRestrictedIndustriesCommercial = 'useCardInRestrictedIndustriesCommercial', - UseCardInRestrictedIndustriesConsumer = 'useCardInRestrictedIndustriesConsumer', - UseChargeCard = 'useChargeCard', - UseChargeCardCommercial = 'useChargeCardCommercial', - WithdrawFromAtm = 'withdrawFromAtm', - WithdrawFromAtmCommercial = 'withdrawFromAtmCommercial', - WithdrawFromAtmConsumer = 'withdrawFromAtmConsumer', - WithdrawFromAtmInRestrictedCountries = 'withdrawFromAtmInRestrictedCountries', - WithdrawFromAtmInRestrictedCountriesCommercial = 'withdrawFromAtmInRestrictedCountriesCommercial', - WithdrawFromAtmInRestrictedCountriesConsumer = 'withdrawFromAtmInRestrictedCountriesConsumer' + AcceptExternalFunding = 'acceptExternalFunding', + AcceptPspFunding = 'acceptPspFunding', + AcceptTransactionInRestrictedCountries = 'acceptTransactionInRestrictedCountries', + AcceptTransactionInRestrictedCountriesCommercial = 'acceptTransactionInRestrictedCountriesCommercial', + AcceptTransactionInRestrictedCountriesConsumer = 'acceptTransactionInRestrictedCountriesConsumer', + AcceptTransactionInRestrictedIndustries = 'acceptTransactionInRestrictedIndustries', + AcceptTransactionInRestrictedIndustriesCommercial = 'acceptTransactionInRestrictedIndustriesCommercial', + AcceptTransactionInRestrictedIndustriesConsumer = 'acceptTransactionInRestrictedIndustriesConsumer', + Acquiring = 'acquiring', + AtmWithdrawal = 'atmWithdrawal', + AtmWithdrawalCommercial = 'atmWithdrawalCommercial', + AtmWithdrawalConsumer = 'atmWithdrawalConsumer', + AtmWithdrawalInRestrictedCountries = 'atmWithdrawalInRestrictedCountries', + AtmWithdrawalInRestrictedCountriesCommercial = 'atmWithdrawalInRestrictedCountriesCommercial', + AtmWithdrawalInRestrictedCountriesConsumer = 'atmWithdrawalInRestrictedCountriesConsumer', + AuthorisedPaymentInstrumentUser = 'authorisedPaymentInstrumentUser', + GetGrantOffers = 'getGrantOffers', + IssueBankAccount = 'issueBankAccount', + IssueCard = 'issueCard', + IssueCardCommercial = 'issueCardCommercial', + IssueCardConsumer = 'issueCardConsumer', + IssueChargeCard = 'issueChargeCard', + IssueChargeCardCommercial = 'issueChargeCardCommercial', + IssueCreditLimit = 'issueCreditLimit', + LocalAcceptance = 'localAcceptance', + Payout = 'payout', + PayoutToTransferInstrument = 'payoutToTransferInstrument', + Processing = 'processing', + ReceiveFromBalanceAccount = 'receiveFromBalanceAccount', + ReceiveFromPlatformPayments = 'receiveFromPlatformPayments', + ReceiveFromThirdParty = 'receiveFromThirdParty', + ReceiveFromTransferInstrument = 'receiveFromTransferInstrument', + ReceiveGrants = 'receiveGrants', + ReceivePayments = 'receivePayments', + SendToBalanceAccount = 'sendToBalanceAccount', + SendToThirdParty = 'sendToThirdParty', + SendToTransferInstrument = 'sendToTransferInstrument', + ThirdPartyFunding = 'thirdPartyFunding', + UseCard = 'useCard', + UseCardCommercial = 'useCardCommercial', + UseCardConsumer = 'useCardConsumer', + UseCardInRestrictedCountries = 'useCardInRestrictedCountries', + UseCardInRestrictedCountriesCommercial = 'useCardInRestrictedCountriesCommercial', + UseCardInRestrictedCountriesConsumer = 'useCardInRestrictedCountriesConsumer', + UseCardInRestrictedIndustries = 'useCardInRestrictedIndustries', + UseCardInRestrictedIndustriesCommercial = 'useCardInRestrictedIndustriesCommercial', + UseCardInRestrictedIndustriesConsumer = 'useCardInRestrictedIndustriesConsumer', + UseChargeCard = 'useChargeCard', + UseChargeCardCommercial = 'useChargeCardCommercial', + WithdrawFromAtm = 'withdrawFromAtm', + WithdrawFromAtmCommercial = 'withdrawFromAtmCommercial', + WithdrawFromAtmConsumer = 'withdrawFromAtmConsumer', + WithdrawFromAtmInRestrictedCountries = 'withdrawFromAtmInRestrictedCountries', + WithdrawFromAtmInRestrictedCountriesCommercial = 'withdrawFromAtmInRestrictedCountriesCommercial', + WithdrawFromAtmInRestrictedCountriesConsumer = 'withdrawFromAtmInRestrictedCountriesConsumer' } export enum TypeEnum { - DataMissing = 'dataMissing', - DataReview = 'dataReview', - InvalidInput = 'invalidInput', - PendingStatus = 'pendingStatus', - Rejected = 'rejected' + DataMissing = 'dataMissing', + DataReview = 'dataReview', + InvalidInput = 'invalidInput', + PendingStatus = 'pendingStatus', + Rejected = 'rejected' } } diff --git a/src/typings/legalEntityManagement/verificationErrorRecursive.ts b/src/typings/legalEntityManagement/verificationErrorRecursive.ts index c4b282690..75f655dfe 100644 --- a/src/typings/legalEntityManagement/verificationErrorRecursive.ts +++ b/src/typings/legalEntityManagement/verificationErrorRecursive.ts @@ -67,67 +67,67 @@ export class VerificationErrorRecursive { export namespace VerificationErrorRecursive { export enum CapabilitiesEnum { - AcceptExternalFunding = 'acceptExternalFunding', - AcceptPspFunding = 'acceptPspFunding', - AcceptTransactionInRestrictedCountries = 'acceptTransactionInRestrictedCountries', - AcceptTransactionInRestrictedCountriesCommercial = 'acceptTransactionInRestrictedCountriesCommercial', - AcceptTransactionInRestrictedCountriesConsumer = 'acceptTransactionInRestrictedCountriesConsumer', - AcceptTransactionInRestrictedIndustries = 'acceptTransactionInRestrictedIndustries', - AcceptTransactionInRestrictedIndustriesCommercial = 'acceptTransactionInRestrictedIndustriesCommercial', - AcceptTransactionInRestrictedIndustriesConsumer = 'acceptTransactionInRestrictedIndustriesConsumer', - Acquiring = 'acquiring', - AtmWithdrawal = 'atmWithdrawal', - AtmWithdrawalCommercial = 'atmWithdrawalCommercial', - AtmWithdrawalConsumer = 'atmWithdrawalConsumer', - AtmWithdrawalInRestrictedCountries = 'atmWithdrawalInRestrictedCountries', - AtmWithdrawalInRestrictedCountriesCommercial = 'atmWithdrawalInRestrictedCountriesCommercial', - AtmWithdrawalInRestrictedCountriesConsumer = 'atmWithdrawalInRestrictedCountriesConsumer', - AuthorisedPaymentInstrumentUser = 'authorisedPaymentInstrumentUser', - GetGrantOffers = 'getGrantOffers', - IssueBankAccount = 'issueBankAccount', - IssueCard = 'issueCard', - IssueCardCommercial = 'issueCardCommercial', - IssueCardConsumer = 'issueCardConsumer', - IssueChargeCard = 'issueChargeCard', - IssueChargeCardCommercial = 'issueChargeCardCommercial', - IssueCreditLimit = 'issueCreditLimit', - LocalAcceptance = 'localAcceptance', - Payout = 'payout', - PayoutToTransferInstrument = 'payoutToTransferInstrument', - Processing = 'processing', - ReceiveFromBalanceAccount = 'receiveFromBalanceAccount', - ReceiveFromPlatformPayments = 'receiveFromPlatformPayments', - ReceiveFromThirdParty = 'receiveFromThirdParty', - ReceiveFromTransferInstrument = 'receiveFromTransferInstrument', - ReceiveGrants = 'receiveGrants', - ReceivePayments = 'receivePayments', - SendToBalanceAccount = 'sendToBalanceAccount', - SendToThirdParty = 'sendToThirdParty', - SendToTransferInstrument = 'sendToTransferInstrument', - ThirdPartyFunding = 'thirdPartyFunding', - UseCard = 'useCard', - UseCardCommercial = 'useCardCommercial', - UseCardConsumer = 'useCardConsumer', - UseCardInRestrictedCountries = 'useCardInRestrictedCountries', - UseCardInRestrictedCountriesCommercial = 'useCardInRestrictedCountriesCommercial', - UseCardInRestrictedCountriesConsumer = 'useCardInRestrictedCountriesConsumer', - UseCardInRestrictedIndustries = 'useCardInRestrictedIndustries', - UseCardInRestrictedIndustriesCommercial = 'useCardInRestrictedIndustriesCommercial', - UseCardInRestrictedIndustriesConsumer = 'useCardInRestrictedIndustriesConsumer', - UseChargeCard = 'useChargeCard', - UseChargeCardCommercial = 'useChargeCardCommercial', - WithdrawFromAtm = 'withdrawFromAtm', - WithdrawFromAtmCommercial = 'withdrawFromAtmCommercial', - WithdrawFromAtmConsumer = 'withdrawFromAtmConsumer', - WithdrawFromAtmInRestrictedCountries = 'withdrawFromAtmInRestrictedCountries', - WithdrawFromAtmInRestrictedCountriesCommercial = 'withdrawFromAtmInRestrictedCountriesCommercial', - WithdrawFromAtmInRestrictedCountriesConsumer = 'withdrawFromAtmInRestrictedCountriesConsumer' + AcceptExternalFunding = 'acceptExternalFunding', + AcceptPspFunding = 'acceptPspFunding', + AcceptTransactionInRestrictedCountries = 'acceptTransactionInRestrictedCountries', + AcceptTransactionInRestrictedCountriesCommercial = 'acceptTransactionInRestrictedCountriesCommercial', + AcceptTransactionInRestrictedCountriesConsumer = 'acceptTransactionInRestrictedCountriesConsumer', + AcceptTransactionInRestrictedIndustries = 'acceptTransactionInRestrictedIndustries', + AcceptTransactionInRestrictedIndustriesCommercial = 'acceptTransactionInRestrictedIndustriesCommercial', + AcceptTransactionInRestrictedIndustriesConsumer = 'acceptTransactionInRestrictedIndustriesConsumer', + Acquiring = 'acquiring', + AtmWithdrawal = 'atmWithdrawal', + AtmWithdrawalCommercial = 'atmWithdrawalCommercial', + AtmWithdrawalConsumer = 'atmWithdrawalConsumer', + AtmWithdrawalInRestrictedCountries = 'atmWithdrawalInRestrictedCountries', + AtmWithdrawalInRestrictedCountriesCommercial = 'atmWithdrawalInRestrictedCountriesCommercial', + AtmWithdrawalInRestrictedCountriesConsumer = 'atmWithdrawalInRestrictedCountriesConsumer', + AuthorisedPaymentInstrumentUser = 'authorisedPaymentInstrumentUser', + GetGrantOffers = 'getGrantOffers', + IssueBankAccount = 'issueBankAccount', + IssueCard = 'issueCard', + IssueCardCommercial = 'issueCardCommercial', + IssueCardConsumer = 'issueCardConsumer', + IssueChargeCard = 'issueChargeCard', + IssueChargeCardCommercial = 'issueChargeCardCommercial', + IssueCreditLimit = 'issueCreditLimit', + LocalAcceptance = 'localAcceptance', + Payout = 'payout', + PayoutToTransferInstrument = 'payoutToTransferInstrument', + Processing = 'processing', + ReceiveFromBalanceAccount = 'receiveFromBalanceAccount', + ReceiveFromPlatformPayments = 'receiveFromPlatformPayments', + ReceiveFromThirdParty = 'receiveFromThirdParty', + ReceiveFromTransferInstrument = 'receiveFromTransferInstrument', + ReceiveGrants = 'receiveGrants', + ReceivePayments = 'receivePayments', + SendToBalanceAccount = 'sendToBalanceAccount', + SendToThirdParty = 'sendToThirdParty', + SendToTransferInstrument = 'sendToTransferInstrument', + ThirdPartyFunding = 'thirdPartyFunding', + UseCard = 'useCard', + UseCardCommercial = 'useCardCommercial', + UseCardConsumer = 'useCardConsumer', + UseCardInRestrictedCountries = 'useCardInRestrictedCountries', + UseCardInRestrictedCountriesCommercial = 'useCardInRestrictedCountriesCommercial', + UseCardInRestrictedCountriesConsumer = 'useCardInRestrictedCountriesConsumer', + UseCardInRestrictedIndustries = 'useCardInRestrictedIndustries', + UseCardInRestrictedIndustriesCommercial = 'useCardInRestrictedIndustriesCommercial', + UseCardInRestrictedIndustriesConsumer = 'useCardInRestrictedIndustriesConsumer', + UseChargeCard = 'useChargeCard', + UseChargeCardCommercial = 'useChargeCardCommercial', + WithdrawFromAtm = 'withdrawFromAtm', + WithdrawFromAtmCommercial = 'withdrawFromAtmCommercial', + WithdrawFromAtmConsumer = 'withdrawFromAtmConsumer', + WithdrawFromAtmInRestrictedCountries = 'withdrawFromAtmInRestrictedCountries', + WithdrawFromAtmInRestrictedCountriesCommercial = 'withdrawFromAtmInRestrictedCountriesCommercial', + WithdrawFromAtmInRestrictedCountriesConsumer = 'withdrawFromAtmInRestrictedCountriesConsumer' } export enum TypeEnum { - DataMissing = 'dataMissing', - DataReview = 'dataReview', - InvalidInput = 'invalidInput', - PendingStatus = 'pendingStatus', - Rejected = 'rejected' + DataMissing = 'dataMissing', + DataReview = 'dataReview', + InvalidInput = 'invalidInput', + PendingStatus = 'pendingStatus', + Rejected = 'rejected' } } diff --git a/src/typings/legalEntityManagement/webDataExemption.ts b/src/typings/legalEntityManagement/webDataExemption.ts index 6ce03705d..3eab61798 100644 --- a/src/typings/legalEntityManagement/webDataExemption.ts +++ b/src/typings/legalEntityManagement/webDataExemption.ts @@ -30,7 +30,7 @@ export class WebDataExemption { export namespace WebDataExemption { export enum ReasonEnum { - NoOnlinePresence = 'noOnlinePresence', - NotCollectedDuringOnboarding = 'notCollectedDuringOnboarding' + NoOnlinePresence = 'noOnlinePresence', + NotCollectedDuringOnboarding = 'notCollectedDuringOnboarding' } } diff --git a/src/typings/management/accelInfo.ts b/src/typings/management/accelInfo.ts index 3ddac8149..99d676539 100644 --- a/src/typings/management/accelInfo.ts +++ b/src/typings/management/accelInfo.ts @@ -14,7 +14,7 @@ export class AccelInfo { * The type of transactions processed over this payment method. Allowed values: - **pos** for in-person payments. - **billpay** for subscription payments, both the initial payment and the later recurring payments. These transactions have `recurringProcessingModel` **Subscription**. - **ecom** for all other card not present transactions. This includes non-recurring transactions and transactions with `recurringProcessingModel` **CardOnFile** or **UnscheduledCardOnFile**. */ 'processingType': AccelInfo.ProcessingTypeEnum; - 'transactionDescription'?: TransactionDescriptionInfo | null; + 'transactionDescription'?: TransactionDescriptionInfo; static discriminator: string | undefined = undefined; @@ -27,7 +27,7 @@ export class AccelInfo { { "name": "transactionDescription", "baseName": "transactionDescription", - "type": "TransactionDescriptionInfo | null" + "type": "TransactionDescriptionInfo" } ]; static getAttributeTypeMap() { @@ -37,8 +37,8 @@ export class AccelInfo { export namespace AccelInfo { export enum ProcessingTypeEnum { - Billpay = 'billpay', - Ecom = 'ecom', - Pos = 'pos' + Billpay = 'billpay', + Ecom = 'ecom', + Pos = 'pos' } } diff --git a/src/typings/management/allowedOrigin.ts b/src/typings/management/allowedOrigin.ts index b16a7f1ba..c269b9dad 100644 --- a/src/typings/management/allowedOrigin.ts +++ b/src/typings/management/allowedOrigin.ts @@ -10,7 +10,7 @@ import { Links } from './links'; export class AllowedOrigin { - '_links'?: Links | null; + '_links'?: Links; /** * Domain of the allowed origin. */ @@ -26,7 +26,7 @@ export class AllowedOrigin { { "name": "_links", "baseName": "_links", - "type": "Links | null" + "type": "Links" }, { "name": "domain", diff --git a/src/typings/management/amexInfo.ts b/src/typings/management/amexInfo.ts index 6cab90b68..c36578414 100644 --- a/src/typings/management/amexInfo.ts +++ b/src/typings/management/amexInfo.ts @@ -16,7 +16,7 @@ export class AmexInfo { /** * Indicates whether the Amex Merchant ID is reused from a previously setup Amex payment method. This is only applicable for `gatewayContract` and `paymentDesignatorContract` service levels. The default value is **false**. */ - 'reuseMidNumber'?: boolean; + 'reuseMidNumber'?: boolean = false; /** * Specifies the service level (settlement type) of this payment method. Possible values: * **noContract**: Adyen holds the contract with American Express. * **gatewayContract**: American Express receives the settlement and handles disputes, then pays out to you or your sub-merchant directly. * **paymentDesignatorContract**: Adyen receives the settlement, and handles disputes and payouts. */ @@ -48,8 +48,8 @@ export class AmexInfo { export namespace AmexInfo { export enum ServiceLevelEnum { - NoContract = 'noContract', - GatewayContract = 'gatewayContract', - PaymentDesignatorContract = 'paymentDesignatorContract' + NoContract = 'noContract', + GatewayContract = 'gatewayContract', + PaymentDesignatorContract = 'paymentDesignatorContract' } } diff --git a/src/typings/management/androidApp.ts b/src/typings/management/androidApp.ts index 9272d3978..0e5421c4d 100644 --- a/src/typings/management/androidApp.ts +++ b/src/typings/management/androidApp.ts @@ -106,10 +106,10 @@ export class AndroidApp { export namespace AndroidApp { export enum StatusEnum { - Archived = 'archived', - Error = 'error', - Invalid = 'invalid', - Processing = 'processing', - Ready = 'ready' + Archived = 'archived', + Error = 'error', + Invalid = 'invalid', + Processing = 'processing', + Ready = 'ready' } } diff --git a/src/typings/management/apiCredential.ts b/src/typings/management/apiCredential.ts index be57a362c..739345d7e 100644 --- a/src/typings/management/apiCredential.ts +++ b/src/typings/management/apiCredential.ts @@ -11,7 +11,7 @@ import { AllowedOrigin } from './allowedOrigin'; import { ApiCredentialLinks } from './apiCredentialLinks'; export class ApiCredential { - '_links'?: ApiCredentialLinks | null; + '_links'?: ApiCredentialLinks; /** * Indicates if the API credential is enabled. Must be set to **true** to use the credential in your integration. */ @@ -51,7 +51,7 @@ export class ApiCredential { { "name": "_links", "baseName": "_links", - "type": "ApiCredentialLinks | null" + "type": "ApiCredentialLinks" }, { "name": "active", diff --git a/src/typings/management/apiCredentialLinks.ts b/src/typings/management/apiCredentialLinks.ts index e45c2b6ea..c4a0dbf20 100644 --- a/src/typings/management/apiCredentialLinks.ts +++ b/src/typings/management/apiCredentialLinks.ts @@ -10,11 +10,11 @@ import { LinksElement } from './linksElement'; export class ApiCredentialLinks { - 'allowedOrigins'?: LinksElement | null; - 'company'?: LinksElement | null; - 'generateApiKey'?: LinksElement | null; - 'generateClientKey'?: LinksElement | null; - 'merchant'?: LinksElement | null; + 'allowedOrigins'?: LinksElement; + 'company'?: LinksElement; + 'generateApiKey'?: LinksElement; + 'generateClientKey'?: LinksElement; + 'merchant'?: LinksElement; 'self': LinksElement; static discriminator: string | undefined = undefined; @@ -23,27 +23,27 @@ export class ApiCredentialLinks { { "name": "allowedOrigins", "baseName": "allowedOrigins", - "type": "LinksElement | null" + "type": "LinksElement" }, { "name": "company", "baseName": "company", - "type": "LinksElement | null" + "type": "LinksElement" }, { "name": "generateApiKey", "baseName": "generateApiKey", - "type": "LinksElement | null" + "type": "LinksElement" }, { "name": "generateClientKey", "baseName": "generateClientKey", - "type": "LinksElement | null" + "type": "LinksElement" }, { "name": "merchant", "baseName": "merchant", - "type": "LinksElement | null" + "type": "LinksElement" }, { "name": "self", diff --git a/src/typings/management/billingEntity.ts b/src/typings/management/billingEntity.ts index 1f2d1c1b7..7b2514f31 100644 --- a/src/typings/management/billingEntity.ts +++ b/src/typings/management/billingEntity.ts @@ -10,7 +10,7 @@ import { Address } from './address'; export class BillingEntity { - 'address'?: Address | null; + 'address'?: Address; /** * The email address of the billing entity. */ @@ -34,7 +34,7 @@ export class BillingEntity { { "name": "address", "baseName": "address", - "type": "Address | null" + "type": "Address" }, { "name": "email", diff --git a/src/typings/management/cartesBancairesInfo.ts b/src/typings/management/cartesBancairesInfo.ts index 800370114..c56012ba8 100644 --- a/src/typings/management/cartesBancairesInfo.ts +++ b/src/typings/management/cartesBancairesInfo.ts @@ -14,7 +14,7 @@ export class CartesBancairesInfo { * Cartes Bancaires SIRET. Format: 14 digits. */ 'siret': string; - 'transactionDescription'?: TransactionDescriptionInfo | null; + 'transactionDescription'?: TransactionDescriptionInfo; static discriminator: string | undefined = undefined; @@ -27,7 +27,7 @@ export class CartesBancairesInfo { { "name": "transactionDescription", "baseName": "transactionDescription", - "type": "TransactionDescriptionInfo | null" + "type": "TransactionDescriptionInfo" } ]; static getAttributeTypeMap() { diff --git a/src/typings/management/company.ts b/src/typings/management/company.ts index f6e418aec..500a0abe1 100644 --- a/src/typings/management/company.ts +++ b/src/typings/management/company.ts @@ -11,7 +11,7 @@ import { CompanyLinks } from './companyLinks'; import { DataCenter } from './dataCenter'; export class Company { - '_links'?: CompanyLinks | null; + '_links'?: CompanyLinks; /** * List of available data centers. Adyen has several data centers around the world.In the URL that you use for making API requests, we recommend you use the live URL prefix from the data center closest to your shoppers. */ @@ -43,7 +43,7 @@ export class Company { { "name": "_links", "baseName": "_links", - "type": "CompanyLinks | null" + "type": "CompanyLinks" }, { "name": "dataCenters", diff --git a/src/typings/management/companyApiCredential.ts b/src/typings/management/companyApiCredential.ts index c998a3e90..aa31c699f 100644 --- a/src/typings/management/companyApiCredential.ts +++ b/src/typings/management/companyApiCredential.ts @@ -11,7 +11,7 @@ import { AllowedOrigin } from './allowedOrigin'; import { ApiCredentialLinks } from './apiCredentialLinks'; export class CompanyApiCredential { - '_links'?: ApiCredentialLinks | null; + '_links'?: ApiCredentialLinks; /** * Indicates if the API credential is enabled. Must be set to **true** to use the credential in your integration. */ @@ -55,7 +55,7 @@ export class CompanyApiCredential { { "name": "_links", "baseName": "_links", - "type": "ApiCredentialLinks | null" + "type": "ApiCredentialLinks" }, { "name": "active", diff --git a/src/typings/management/companyLinks.ts b/src/typings/management/companyLinks.ts index 003248315..4160b4223 100644 --- a/src/typings/management/companyLinks.ts +++ b/src/typings/management/companyLinks.ts @@ -10,10 +10,10 @@ import { LinksElement } from './linksElement'; export class CompanyLinks { - 'apiCredentials'?: LinksElement | null; + 'apiCredentials'?: LinksElement; 'self': LinksElement; - 'users'?: LinksElement | null; - 'webhooks'?: LinksElement | null; + 'users'?: LinksElement; + 'webhooks'?: LinksElement; static discriminator: string | undefined = undefined; @@ -21,7 +21,7 @@ export class CompanyLinks { { "name": "apiCredentials", "baseName": "apiCredentials", - "type": "LinksElement | null" + "type": "LinksElement" }, { "name": "self", @@ -31,12 +31,12 @@ export class CompanyLinks { { "name": "users", "baseName": "users", - "type": "LinksElement | null" + "type": "LinksElement" }, { "name": "webhooks", "baseName": "webhooks", - "type": "LinksElement | null" + "type": "LinksElement" } ]; static getAttributeTypeMap() { diff --git a/src/typings/management/companyUser.ts b/src/typings/management/companyUser.ts index 17b08e23c..e29ab9630 100644 --- a/src/typings/management/companyUser.ts +++ b/src/typings/management/companyUser.ts @@ -11,7 +11,7 @@ import { Links } from './links'; import { Name } from './name'; export class CompanyUser { - '_links'?: Links | null; + '_links'?: Links; /** * The list of [account groups](https://docs.adyen.com/account/account-structure#account-groups) associated with this user. */ @@ -36,7 +36,7 @@ export class CompanyUser { * The unique identifier of the user. */ 'id': string; - 'name'?: Name | null; + 'name'?: Name; /** * The list of [roles](https://docs.adyen.com/account/user-roles) for this user. */ @@ -56,7 +56,7 @@ export class CompanyUser { { "name": "_links", "baseName": "_links", - "type": "Links | null" + "type": "Links" }, { "name": "accountGroups", @@ -91,7 +91,7 @@ export class CompanyUser { { "name": "name", "baseName": "name", - "type": "Name | null" + "type": "Name" }, { "name": "roles", diff --git a/src/typings/management/connectivity.ts b/src/typings/management/connectivity.ts index e172d6d33..f065abe12 100644 --- a/src/typings/management/connectivity.ts +++ b/src/typings/management/connectivity.ts @@ -14,7 +14,7 @@ export class Connectivity { * Indicates the status of the SIM card in the payment terminal. Can be updated and received only at terminal level, and only for models that support cellular connectivity. Possible values: * **ACTIVATED**: the SIM card is activated. Cellular connectivity may still need to be enabled on the terminal itself, in the **Network** settings. * **INVENTORY**: the SIM card is not activated. The terminal can\'t use cellular connectivity. */ 'simcardStatus'?: Connectivity.SimcardStatusEnum; - 'terminalIPAddressURL'?: EventUrl | null; + 'terminalIPAddressURL'?: EventUrl; static discriminator: string | undefined = undefined; @@ -27,7 +27,7 @@ export class Connectivity { { "name": "terminalIPAddressURL", "baseName": "terminalIPAddressURL", - "type": "EventUrl | null" + "type": "EventUrl" } ]; static getAttributeTypeMap() { @@ -37,7 +37,7 @@ export class Connectivity { export namespace Connectivity { export enum SimcardStatusEnum { - Activated = 'ACTIVATED', - Inventory = 'INVENTORY' + Activated = 'ACTIVATED', + Inventory = 'INVENTORY' } } diff --git a/src/typings/management/createAllowedOriginRequest.ts b/src/typings/management/createAllowedOriginRequest.ts index 2fe0e9b13..6dd2a8a86 100644 --- a/src/typings/management/createAllowedOriginRequest.ts +++ b/src/typings/management/createAllowedOriginRequest.ts @@ -10,7 +10,7 @@ import { Links } from './links'; export class CreateAllowedOriginRequest { - '_links'?: Links | null; + '_links'?: Links; /** * Domain of the allowed origin. */ @@ -26,7 +26,7 @@ export class CreateAllowedOriginRequest { { "name": "_links", "baseName": "_links", - "type": "Links | null" + "type": "Links" }, { "name": "domain", diff --git a/src/typings/management/createApiCredentialResponse.ts b/src/typings/management/createApiCredentialResponse.ts index bbc0927d0..e26d9dcc8 100644 --- a/src/typings/management/createApiCredentialResponse.ts +++ b/src/typings/management/createApiCredentialResponse.ts @@ -11,7 +11,7 @@ import { AllowedOrigin } from './allowedOrigin'; import { ApiCredentialLinks } from './apiCredentialLinks'; export class CreateApiCredentialResponse { - '_links'?: ApiCredentialLinks | null; + '_links'?: ApiCredentialLinks; /** * Indicates if the API credential is enabled. Must be set to **true** to use the credential in your integration. */ @@ -59,7 +59,7 @@ export class CreateApiCredentialResponse { { "name": "_links", "baseName": "_links", - "type": "ApiCredentialLinks | null" + "type": "ApiCredentialLinks" }, { "name": "active", diff --git a/src/typings/management/createCompanyApiCredentialResponse.ts b/src/typings/management/createCompanyApiCredentialResponse.ts index 0e9c27df8..c9e7a2ece 100644 --- a/src/typings/management/createCompanyApiCredentialResponse.ts +++ b/src/typings/management/createCompanyApiCredentialResponse.ts @@ -11,7 +11,7 @@ import { AllowedOrigin } from './allowedOrigin'; import { ApiCredentialLinks } from './apiCredentialLinks'; export class CreateCompanyApiCredentialResponse { - '_links'?: ApiCredentialLinks | null; + '_links'?: ApiCredentialLinks; /** * Indicates if the API credential is enabled. Must be set to **true** to use the credential in your integration. */ @@ -63,7 +63,7 @@ export class CreateCompanyApiCredentialResponse { { "name": "_links", "baseName": "_links", - "type": "ApiCredentialLinks | null" + "type": "ApiCredentialLinks" }, { "name": "active", diff --git a/src/typings/management/createCompanyUserResponse.ts b/src/typings/management/createCompanyUserResponse.ts index a6bf37299..2a7b8d460 100644 --- a/src/typings/management/createCompanyUserResponse.ts +++ b/src/typings/management/createCompanyUserResponse.ts @@ -11,7 +11,7 @@ import { Links } from './links'; import { Name } from './name'; export class CreateCompanyUserResponse { - '_links'?: Links | null; + '_links'?: Links; /** * The list of [account groups](https://docs.adyen.com/account/account-structure#account-groups) associated with this user. */ @@ -36,7 +36,7 @@ export class CreateCompanyUserResponse { * The unique identifier of the user. */ 'id': string; - 'name'?: Name | null; + 'name'?: Name; /** * The list of [roles](https://docs.adyen.com/account/user-roles) for this user. */ @@ -56,7 +56,7 @@ export class CreateCompanyUserResponse { { "name": "_links", "baseName": "_links", - "type": "Links | null" + "type": "Links" }, { "name": "accountGroups", @@ -91,7 +91,7 @@ export class CreateCompanyUserResponse { { "name": "name", "baseName": "name", - "type": "Name | null" + "type": "Name" }, { "name": "roles", diff --git a/src/typings/management/createCompanyWebhookRequest.ts b/src/typings/management/createCompanyWebhookRequest.ts index 37da93706..5678b6a8c 100644 --- a/src/typings/management/createCompanyWebhookRequest.ts +++ b/src/typings/management/createCompanyWebhookRequest.ts @@ -26,7 +26,7 @@ export class CreateCompanyWebhookRequest { * Indicates if the webhook configuration is active. The field must be **true** for us to send webhooks about events related an account. */ 'active': boolean; - 'additionalSettings'?: AdditionalSettings | null; + 'additionalSettings'?: AdditionalSettings; /** * Format or protocol for receiving webhooks. Possible values: * **soap** * **http** * **json** */ @@ -98,7 +98,7 @@ export class CreateCompanyWebhookRequest { { "name": "additionalSettings", "baseName": "additionalSettings", - "type": "AdditionalSettings | null" + "type": "AdditionalSettings" }, { "name": "communicationFormat", @@ -163,22 +163,22 @@ export class CreateCompanyWebhookRequest { export namespace CreateCompanyWebhookRequest { export enum CommunicationFormatEnum { - Http = 'http', - Json = 'json', - Soap = 'soap' + Http = 'http', + Json = 'json', + Soap = 'soap' } export enum EncryptionProtocolEnum { - Http = 'HTTP', - Tlsv12 = 'TLSv1.2', - Tlsv13 = 'TLSv1.3' + Http = 'HTTP', + Tlsv12 = 'TLSv1.2', + Tlsv13 = 'TLSv1.3' } export enum FilterMerchantAccountTypeEnum { - AllAccounts = 'allAccounts', - ExcludeAccounts = 'excludeAccounts', - IncludeAccounts = 'includeAccounts' + AllAccounts = 'allAccounts', + ExcludeAccounts = 'excludeAccounts', + IncludeAccounts = 'includeAccounts' } export enum NetworkTypeEnum { - Local = 'local', - Public = 'public' + Local = 'local', + Public = 'public' } } diff --git a/src/typings/management/createMerchantWebhookRequest.ts b/src/typings/management/createMerchantWebhookRequest.ts index ef509f7a6..0ea79163e 100644 --- a/src/typings/management/createMerchantWebhookRequest.ts +++ b/src/typings/management/createMerchantWebhookRequest.ts @@ -26,7 +26,7 @@ export class CreateMerchantWebhookRequest { * Indicates if the webhook configuration is active. The field must be **true** for us to send webhooks about events related an account. */ 'active': boolean; - 'additionalSettings'?: AdditionalSettings | null; + 'additionalSettings'?: AdditionalSettings; /** * Format or protocol for receiving webhooks. Possible values: * **soap** * **http** * **json** */ @@ -90,7 +90,7 @@ export class CreateMerchantWebhookRequest { { "name": "additionalSettings", "baseName": "additionalSettings", - "type": "AdditionalSettings | null" + "type": "AdditionalSettings" }, { "name": "communicationFormat", @@ -145,17 +145,17 @@ export class CreateMerchantWebhookRequest { export namespace CreateMerchantWebhookRequest { export enum CommunicationFormatEnum { - Http = 'http', - Json = 'json', - Soap = 'soap' + Http = 'http', + Json = 'json', + Soap = 'soap' } export enum EncryptionProtocolEnum { - Http = 'HTTP', - Tlsv12 = 'TLSv1.2', - Tlsv13 = 'TLSv1.3' + Http = 'HTTP', + Tlsv12 = 'TLSv1.2', + Tlsv13 = 'TLSv1.3' } export enum NetworkTypeEnum { - Local = 'local', - Public = 'public' + Local = 'local', + Public = 'public' } } diff --git a/src/typings/management/createUserResponse.ts b/src/typings/management/createUserResponse.ts index d4c77ca15..933478a9f 100644 --- a/src/typings/management/createUserResponse.ts +++ b/src/typings/management/createUserResponse.ts @@ -11,7 +11,7 @@ import { Links } from './links'; import { Name } from './name'; export class CreateUserResponse { - '_links'?: Links | null; + '_links'?: Links; /** * The list of [account groups](https://docs.adyen.com/account/account-structure#account-groups) associated with this user. */ @@ -32,7 +32,7 @@ export class CreateUserResponse { * The unique identifier of the user. */ 'id': string; - 'name'?: Name | null; + 'name'?: Name; /** * The list of [roles](https://docs.adyen.com/account/user-roles) for this user. */ @@ -52,7 +52,7 @@ export class CreateUserResponse { { "name": "_links", "baseName": "_links", - "type": "Links | null" + "type": "Links" }, { "name": "accountGroups", @@ -82,7 +82,7 @@ export class CreateUserResponse { { "name": "name", "baseName": "name", - "type": "Name | null" + "type": "Name" }, { "name": "roles", diff --git a/src/typings/management/customNotification.ts b/src/typings/management/customNotification.ts index 478e8af21..af320b46c 100644 --- a/src/typings/management/customNotification.ts +++ b/src/typings/management/customNotification.ts @@ -10,7 +10,7 @@ import { Amount } from './amount'; export class CustomNotification { - 'amount'?: Amount | null; + 'amount'?: Amount; /** * The event that caused the notification to be sent.Currently supported values: * **AUTHORISATION** * **CANCELLATION** * **REFUND** * **CAPTURE** * **REPORT_AVAILABLE** * **CHARGEBACK** * **REQUEST_FOR_INFORMATION** * **NOTIFICATION_OF_CHARGEBACK** * **NOTIFICATIONTEST** * **ORDER_OPENED** * **ORDER_CLOSED** * **CHARGEBACK_REVERSED** * **REFUNDED_REVERSED** * **REFUND_WITH_DATA** */ @@ -42,7 +42,7 @@ export class CustomNotification { { "name": "amount", "baseName": "amount", - "type": "Amount | null" + "type": "Amount" }, { "name": "eventCode", diff --git a/src/typings/management/dinersInfo.ts b/src/typings/management/dinersInfo.ts index 6f1557674..2993e08f7 100644 --- a/src/typings/management/dinersInfo.ts +++ b/src/typings/management/dinersInfo.ts @@ -17,12 +17,12 @@ export class DinersInfo { /** * Indicates whether the JCB Merchant ID is reused from a previously configured JCB payment method. The default value is **false**. For merchants operating in Japan, this field is required and must be set to **true**. */ - 'reuseMidNumber': boolean; + 'reuseMidNumber': boolean = false; /** * Specifies the service level (settlement type) of this payment method. Required for merchants operating in Japan. Possible values: * **noContract**: Adyen holds the contract with JCB. * **gatewayContract**: JCB receives the settlement and handles disputes, then pays out to you or your sub-merchant directly. */ 'serviceLevel'?: DinersInfo.ServiceLevelEnum; - 'transactionDescription'?: TransactionDescriptionInfo | null; + 'transactionDescription'?: TransactionDescriptionInfo; static discriminator: string | undefined = undefined; @@ -45,7 +45,7 @@ export class DinersInfo { { "name": "transactionDescription", "baseName": "transactionDescription", - "type": "TransactionDescriptionInfo | null" + "type": "TransactionDescriptionInfo" } ]; static getAttributeTypeMap() { @@ -55,7 +55,7 @@ export class DinersInfo { export namespace DinersInfo { export enum ServiceLevelEnum { - NoContract = 'noContract', - GatewayContract = 'gatewayContract' + NoContract = 'noContract', + GatewayContract = 'gatewayContract' } } diff --git a/src/typings/management/genericPmWithTdiInfo.ts b/src/typings/management/genericPmWithTdiInfo.ts index 6f7740b15..5498b7f9a 100644 --- a/src/typings/management/genericPmWithTdiInfo.ts +++ b/src/typings/management/genericPmWithTdiInfo.ts @@ -10,7 +10,7 @@ import { TransactionDescriptionInfo } from './transactionDescriptionInfo'; export class GenericPmWithTdiInfo { - 'transactionDescription'?: TransactionDescriptionInfo | null; + 'transactionDescription'?: TransactionDescriptionInfo; static discriminator: string | undefined = undefined; @@ -18,7 +18,7 @@ export class GenericPmWithTdiInfo { { "name": "transactionDescription", "baseName": "transactionDescription", - "type": "TransactionDescriptionInfo | null" + "type": "TransactionDescriptionInfo" } ]; static getAttributeTypeMap() { diff --git a/src/typings/management/installAndroidAppDetails.ts b/src/typings/management/installAndroidAppDetails.ts index 2b5b8467c..2aa1cdc72 100644 --- a/src/typings/management/installAndroidAppDetails.ts +++ b/src/typings/management/installAndroidAppDetails.ts @@ -16,7 +16,7 @@ export class InstallAndroidAppDetails { /** * Type of terminal action: Install an Android app. */ - 'type'?: InstallAndroidAppDetails.TypeEnum; + 'type'?: InstallAndroidAppDetails.TypeEnum = InstallAndroidAppDetails.TypeEnum.InstallAndroidApp; static discriminator: string | undefined = undefined; @@ -39,6 +39,6 @@ export class InstallAndroidAppDetails { export namespace InstallAndroidAppDetails { export enum TypeEnum { - InstallAndroidApp = 'InstallAndroidApp' + InstallAndroidApp = 'InstallAndroidApp' } } diff --git a/src/typings/management/installAndroidCertificateDetails.ts b/src/typings/management/installAndroidCertificateDetails.ts index 0be4f6481..b2cf9b2ad 100644 --- a/src/typings/management/installAndroidCertificateDetails.ts +++ b/src/typings/management/installAndroidCertificateDetails.ts @@ -16,7 +16,7 @@ export class InstallAndroidCertificateDetails { /** * Type of terminal action: Install an Android certificate. */ - 'type'?: InstallAndroidCertificateDetails.TypeEnum; + 'type'?: InstallAndroidCertificateDetails.TypeEnum = InstallAndroidCertificateDetails.TypeEnum.InstallAndroidCertificate; static discriminator: string | undefined = undefined; @@ -39,6 +39,6 @@ export class InstallAndroidCertificateDetails { export namespace InstallAndroidCertificateDetails { export enum TypeEnum { - InstallAndroidCertificate = 'InstallAndroidCertificate' + InstallAndroidCertificate = 'InstallAndroidCertificate' } } diff --git a/src/typings/management/jCBInfo.ts b/src/typings/management/jCBInfo.ts index 3bed28b53..dbed41d88 100644 --- a/src/typings/management/jCBInfo.ts +++ b/src/typings/management/jCBInfo.ts @@ -17,12 +17,12 @@ export class JCBInfo { /** * Indicates whether the JCB Merchant ID is reused from a previously setup JCB payment method. The default value is **false**.For merchants operating in Japan, this field is required and must be set to **true**. */ - 'reuseMidNumber'?: boolean; + 'reuseMidNumber'?: boolean = false; /** * Specifies the service level (settlement type) of this payment method. Required for merchants operating in Japan. Possible values: * **noContract**: Adyen holds the contract with JCB. * **gatewayContract**: JCB receives the settlement and handles disputes, then pays out to you or your sub-merchant directly. */ 'serviceLevel'?: JCBInfo.ServiceLevelEnum; - 'transactionDescription'?: TransactionDescriptionInfo | null; + 'transactionDescription'?: TransactionDescriptionInfo; static discriminator: string | undefined = undefined; @@ -45,7 +45,7 @@ export class JCBInfo { { "name": "transactionDescription", "baseName": "transactionDescription", - "type": "TransactionDescriptionInfo | null" + "type": "TransactionDescriptionInfo" } ]; static getAttributeTypeMap() { @@ -55,7 +55,7 @@ export class JCBInfo { export namespace JCBInfo { export enum ServiceLevelEnum { - NoContract = 'noContract', - GatewayContract = 'gatewayContract' + NoContract = 'noContract', + GatewayContract = 'gatewayContract' } } diff --git a/src/typings/management/klarnaInfo.ts b/src/typings/management/klarnaInfo.ts index 06c9dcd7b..52726e96b 100644 --- a/src/typings/management/klarnaInfo.ts +++ b/src/typings/management/klarnaInfo.ts @@ -57,9 +57,9 @@ export class KlarnaInfo { export namespace KlarnaInfo { export enum RegionEnum { - Na = 'NA', - Eu = 'EU', - Ch = 'CH', - Au = 'AU' + Na = 'NA', + Eu = 'EU', + Ch = 'CH', + Au = 'AU' } } diff --git a/src/typings/management/listCompanyApiCredentialsResponse.ts b/src/typings/management/listCompanyApiCredentialsResponse.ts index a8562ccde..ef56c7ef9 100644 --- a/src/typings/management/listCompanyApiCredentialsResponse.ts +++ b/src/typings/management/listCompanyApiCredentialsResponse.ts @@ -11,7 +11,7 @@ import { CompanyApiCredential } from './companyApiCredential'; import { PaginationLinks } from './paginationLinks'; export class ListCompanyApiCredentialsResponse { - '_links'?: PaginationLinks | null; + '_links'?: PaginationLinks; /** * The list of API credentials. */ @@ -31,7 +31,7 @@ export class ListCompanyApiCredentialsResponse { { "name": "_links", "baseName": "_links", - "type": "PaginationLinks | null" + "type": "PaginationLinks" }, { "name": "data", diff --git a/src/typings/management/listCompanyResponse.ts b/src/typings/management/listCompanyResponse.ts index fe147ba47..7c5a2dea0 100644 --- a/src/typings/management/listCompanyResponse.ts +++ b/src/typings/management/listCompanyResponse.ts @@ -11,7 +11,7 @@ import { Company } from './company'; import { PaginationLinks } from './paginationLinks'; export class ListCompanyResponse { - '_links'?: PaginationLinks | null; + '_links'?: PaginationLinks; /** * The list of companies. */ @@ -31,7 +31,7 @@ export class ListCompanyResponse { { "name": "_links", "baseName": "_links", - "type": "PaginationLinks | null" + "type": "PaginationLinks" }, { "name": "data", diff --git a/src/typings/management/listCompanyUsersResponse.ts b/src/typings/management/listCompanyUsersResponse.ts index fed47c694..bf5549c46 100644 --- a/src/typings/management/listCompanyUsersResponse.ts +++ b/src/typings/management/listCompanyUsersResponse.ts @@ -11,7 +11,7 @@ import { CompanyUser } from './companyUser'; import { PaginationLinks } from './paginationLinks'; export class ListCompanyUsersResponse { - '_links'?: PaginationLinks | null; + '_links'?: PaginationLinks; /** * The list of users. */ @@ -31,7 +31,7 @@ export class ListCompanyUsersResponse { { "name": "_links", "baseName": "_links", - "type": "PaginationLinks | null" + "type": "PaginationLinks" }, { "name": "data", diff --git a/src/typings/management/listMerchantApiCredentialsResponse.ts b/src/typings/management/listMerchantApiCredentialsResponse.ts index 63d680a61..60a7161a8 100644 --- a/src/typings/management/listMerchantApiCredentialsResponse.ts +++ b/src/typings/management/listMerchantApiCredentialsResponse.ts @@ -11,7 +11,7 @@ import { ApiCredential } from './apiCredential'; import { PaginationLinks } from './paginationLinks'; export class ListMerchantApiCredentialsResponse { - '_links'?: PaginationLinks | null; + '_links'?: PaginationLinks; /** * The list of API credentials. */ @@ -31,7 +31,7 @@ export class ListMerchantApiCredentialsResponse { { "name": "_links", "baseName": "_links", - "type": "PaginationLinks | null" + "type": "PaginationLinks" }, { "name": "data", diff --git a/src/typings/management/listMerchantResponse.ts b/src/typings/management/listMerchantResponse.ts index 4ba57815e..edbc26dc2 100644 --- a/src/typings/management/listMerchantResponse.ts +++ b/src/typings/management/listMerchantResponse.ts @@ -11,7 +11,7 @@ import { Merchant } from './merchant'; import { PaginationLinks } from './paginationLinks'; export class ListMerchantResponse { - '_links'?: PaginationLinks | null; + '_links'?: PaginationLinks; /** * The list of merchant accounts. */ @@ -31,7 +31,7 @@ export class ListMerchantResponse { { "name": "_links", "baseName": "_links", - "type": "PaginationLinks | null" + "type": "PaginationLinks" }, { "name": "data", diff --git a/src/typings/management/listMerchantUsersResponse.ts b/src/typings/management/listMerchantUsersResponse.ts index ca66e7c28..910932136 100644 --- a/src/typings/management/listMerchantUsersResponse.ts +++ b/src/typings/management/listMerchantUsersResponse.ts @@ -11,7 +11,7 @@ import { PaginationLinks } from './paginationLinks'; import { User } from './user'; export class ListMerchantUsersResponse { - '_links'?: PaginationLinks | null; + '_links'?: PaginationLinks; /** * The list of users. */ @@ -31,7 +31,7 @@ export class ListMerchantUsersResponse { { "name": "_links", "baseName": "_links", - "type": "PaginationLinks | null" + "type": "PaginationLinks" }, { "name": "data", diff --git a/src/typings/management/listStoresResponse.ts b/src/typings/management/listStoresResponse.ts index 6032b593c..c192a427d 100644 --- a/src/typings/management/listStoresResponse.ts +++ b/src/typings/management/listStoresResponse.ts @@ -11,7 +11,7 @@ import { PaginationLinks } from './paginationLinks'; import { Store } from './store'; export class ListStoresResponse { - '_links'?: PaginationLinks | null; + '_links'?: PaginationLinks; /** * List of stores */ @@ -31,7 +31,7 @@ export class ListStoresResponse { { "name": "_links", "baseName": "_links", - "type": "PaginationLinks | null" + "type": "PaginationLinks" }, { "name": "data", diff --git a/src/typings/management/listTerminalsResponse.ts b/src/typings/management/listTerminalsResponse.ts index 7b6891962..396c30be9 100644 --- a/src/typings/management/listTerminalsResponse.ts +++ b/src/typings/management/listTerminalsResponse.ts @@ -11,7 +11,7 @@ import { PaginationLinks } from './paginationLinks'; import { Terminal } from './terminal'; export class ListTerminalsResponse { - '_links'?: PaginationLinks | null; + '_links'?: PaginationLinks; /** * The list of terminals and their details. */ @@ -31,7 +31,7 @@ export class ListTerminalsResponse { { "name": "_links", "baseName": "_links", - "type": "PaginationLinks | null" + "type": "PaginationLinks" }, { "name": "data", diff --git a/src/typings/management/listWebhooksResponse.ts b/src/typings/management/listWebhooksResponse.ts index a97480bb9..02701a1ed 100644 --- a/src/typings/management/listWebhooksResponse.ts +++ b/src/typings/management/listWebhooksResponse.ts @@ -11,7 +11,7 @@ import { PaginationLinks } from './paginationLinks'; import { Webhook } from './webhook'; export class ListWebhooksResponse { - '_links'?: PaginationLinks | null; + '_links'?: PaginationLinks; /** * Reference to the account. */ @@ -35,7 +35,7 @@ export class ListWebhooksResponse { { "name": "_links", "baseName": "_links", - "type": "PaginationLinks | null" + "type": "PaginationLinks" }, { "name": "accountReference", diff --git a/src/typings/management/meApiCredential.ts b/src/typings/management/meApiCredential.ts index 86128fe6d..2cfe8d6a2 100644 --- a/src/typings/management/meApiCredential.ts +++ b/src/typings/management/meApiCredential.ts @@ -11,7 +11,7 @@ import { AllowedOrigin } from './allowedOrigin'; import { ApiCredentialLinks } from './apiCredentialLinks'; export class MeApiCredential { - '_links'?: ApiCredentialLinks | null; + '_links'?: ApiCredentialLinks; /** * Indicates if the API credential is enabled. Must be set to **true** to use the credential in your integration. */ @@ -55,7 +55,7 @@ export class MeApiCredential { { "name": "_links", "baseName": "_links", - "type": "ApiCredentialLinks | null" + "type": "ApiCredentialLinks" }, { "name": "active", diff --git a/src/typings/management/merchant.ts b/src/typings/management/merchant.ts index c4f13423c..8466f121b 100644 --- a/src/typings/management/merchant.ts +++ b/src/typings/management/merchant.ts @@ -11,7 +11,7 @@ import { DataCenter } from './dataCenter'; import { MerchantLinks } from './merchantLinks'; export class Merchant { - '_links'?: MerchantLinks | null; + '_links'?: MerchantLinks; /** * The [capture delay](https://docs.adyen.com/online-payments/capture#capture-delay) set for the merchant account. Possible values: * **Immediate** * **Manual** * Number of days from **1** to **29** */ @@ -71,7 +71,7 @@ export class Merchant { { "name": "_links", "baseName": "_links", - "type": "MerchantLinks | null" + "type": "MerchantLinks" }, { "name": "captureDelay", diff --git a/src/typings/management/merchantLinks.ts b/src/typings/management/merchantLinks.ts index 1ada791e1..dbb86fdf8 100644 --- a/src/typings/management/merchantLinks.ts +++ b/src/typings/management/merchantLinks.ts @@ -10,10 +10,10 @@ import { LinksElement } from './linksElement'; export class MerchantLinks { - 'apiCredentials'?: LinksElement | null; + 'apiCredentials'?: LinksElement; 'self': LinksElement; - 'users'?: LinksElement | null; - 'webhooks'?: LinksElement | null; + 'users'?: LinksElement; + 'webhooks'?: LinksElement; static discriminator: string | undefined = undefined; @@ -21,7 +21,7 @@ export class MerchantLinks { { "name": "apiCredentials", "baseName": "apiCredentials", - "type": "LinksElement | null" + "type": "LinksElement" }, { "name": "self", @@ -31,12 +31,12 @@ export class MerchantLinks { { "name": "users", "baseName": "users", - "type": "LinksElement | null" + "type": "LinksElement" }, { "name": "webhooks", "baseName": "webhooks", - "type": "LinksElement | null" + "type": "LinksElement" } ]; static getAttributeTypeMap() { diff --git a/src/typings/management/models.ts b/src/typings/management/models.ts index 5d0f3d757..5c8ca56ec 100644 --- a/src/typings/management/models.ts +++ b/src/typings/management/models.ts @@ -1,12 +1,4 @@ -/* - * The version of the OpenAPI document: v3 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - +import localVarRequest from 'request'; export * from './accelInfo'; export * from './additionalCommission'; @@ -128,6 +120,7 @@ export * from './reprocessAndroidAppResponse'; export * from './requestActivationResponse'; export * from './restServiceError'; export * from './scheduleTerminalActionsRequest'; +export * from './scheduleTerminalActionsRequestActionDetails'; export * from './scheduleTerminalActionsResponse'; export * from './settings'; export * from './shippingLocation'; @@ -204,6 +197,18 @@ export * from './webhook'; export * from './webhookLinks'; export * from './wifiProfiles'; +import * as fs from 'fs'; + +export interface RequestDetailedFile { + value: Buffer; + options?: { + filename?: string; + contentType?: string; + } +} + +export type RequestFile = string | Buffer | fs.ReadStream | RequestDetailedFile; + import { AccelInfo } from './accelInfo'; import { AdditionalCommission } from './additionalCommission'; @@ -325,6 +330,7 @@ import { ReprocessAndroidAppResponse } from './reprocessAndroidAppResponse'; import { RequestActivationResponse } from './requestActivationResponse'; import { RestServiceError } from './restServiceError'; import { ScheduleTerminalActionsRequest } from './scheduleTerminalActionsRequest'; +import { ScheduleTerminalActionsRequestActionDetails } from './scheduleTerminalActionsRequestActionDetails'; import { ScheduleTerminalActionsResponse } from './scheduleTerminalActionsResponse'; import { Settings } from './settings'; import { ShippingLocation } from './shippingLocation'; @@ -442,6 +448,7 @@ let enumsMap: {[index: string]: any} = { "PayoutSettings.VerificationStatusEnum": PayoutSettings.VerificationStatusEnum, "PulseInfo.ProcessingTypeEnum": PulseInfo.ProcessingTypeEnum, "ReleaseUpdateDetails.TypeEnum": ReleaseUpdateDetails.TypeEnum, + "ScheduleTerminalActionsRequestActionDetails.TypeEnum": ScheduleTerminalActionsRequestActionDetails.TypeEnum, "SplitConfigurationLogic.AcquiringFeesEnum": SplitConfigurationLogic.AcquiringFeesEnum, "SplitConfigurationLogic.AdyenCommissionEnum": SplitConfigurationLogic.AdyenCommissionEnum, "SplitConfigurationLogic.AdyenFeesEnum": SplitConfigurationLogic.AdyenFeesEnum, @@ -614,6 +621,7 @@ let typeMap: {[index: string]: any} = { "RequestActivationResponse": RequestActivationResponse, "RestServiceError": RestServiceError, "ScheduleTerminalActionsRequest": ScheduleTerminalActionsRequest, + "ScheduleTerminalActionsRequestActionDetails": ScheduleTerminalActionsRequestActionDetails, "ScheduleTerminalActionsResponse": ScheduleTerminalActionsResponse, "Settings": Settings, "ShippingLocation": ShippingLocation, @@ -691,6 +699,23 @@ let typeMap: {[index: string]: any} = { "WifiProfiles": WifiProfiles, } +// Check if a string starts with another string without using es6 features +function startsWith(str: string, match: string): boolean { + return str.substring(0, match.length) === match; +} + +// Check if a string ends with another string without using es6 features +function endsWith(str: string, match: string): boolean { + return str.length >= match.length && str.substring(str.length - match.length) === match; +} + +const nullableSuffix = " | null"; +const optionalSuffix = " | undefined"; +const arrayPrefix = "Array<"; +const arraySuffix = ">"; +const mapPrefix = "{ [key: string]: "; +const mapSuffix = "; }"; + export class ObjectSerializer { public static findCorrectType(data: any, expectedType: string) { if (data == undefined) { @@ -727,25 +752,37 @@ export class ObjectSerializer { } } - public static serialize(data: any, type: string) { + public static serialize(data: any, type: string): any { if (data == undefined) { return data; } else if (primitives.indexOf(type.toLowerCase()) !== -1) { return data; - } else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6 - let subType: string = type.replace("Array<", ""); // Array => Type> - subType = subType.substring(0, subType.length - 1); // Type> => Type + } else if (endsWith(type, nullableSuffix)) { + let subType: string = type.slice(0, -nullableSuffix.length); // Type | null => Type + return ObjectSerializer.serialize(data, subType); + } else if (endsWith(type, optionalSuffix)) { + let subType: string = type.slice(0, -optionalSuffix.length); // Type | undefined => Type + return ObjectSerializer.serialize(data, subType); + } else if (startsWith(type, arrayPrefix)) { + let subType: string = type.slice(arrayPrefix.length, -arraySuffix.length); // Array => Type let transformedData: any[] = []; for (let index = 0; index < data.length; index++) { let datum = data[index]; transformedData.push(ObjectSerializer.serialize(datum, subType)); } return transformedData; + } else if (startsWith(type, mapPrefix)) { + let subType: string = type.slice(mapPrefix.length, -mapSuffix.length); // { [key: string]: Type; } => Type + let transformedData: { [key: string]: any } = {}; + for (let key in data) { + transformedData[key] = ObjectSerializer.serialize( + data[key], + subType, + ); + } + return transformedData; } else if (type === "Date") { return data.toISOString(); - } else if (type === "SaleToAcquirerData") { - const dataString = JSON.stringify(data); - return Buffer.from(dataString).toString("base64"); } else { if (enumsMap[type]) { return data; @@ -768,22 +805,37 @@ export class ObjectSerializer { } } - public static deserialize(data: any, type: string) { + public static deserialize(data: any, type: string): any { // polymorphism may change the actual type. type = ObjectSerializer.findCorrectType(data, type); if (data == undefined) { return data; } else if (primitives.indexOf(type.toLowerCase()) !== -1) { return data; - } else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6 - let subType: string = type.replace("Array<", ""); // Array => Type> - subType = subType.substring(0, subType.length - 1); // Type> => Type + } else if (endsWith(type, nullableSuffix)) { + let subType: string = type.slice(0, -nullableSuffix.length); // Type | null => Type + return ObjectSerializer.deserialize(data, subType); + } else if (endsWith(type, optionalSuffix)) { + let subType: string = type.slice(0, -optionalSuffix.length); // Type | undefined => Type + return ObjectSerializer.deserialize(data, subType); + } else if (startsWith(type, arrayPrefix)) { + let subType: string = type.slice(arrayPrefix.length, -arraySuffix.length); // Array => Type let transformedData: any[] = []; for (let index = 0; index < data.length; index++) { let datum = data[index]; transformedData.push(ObjectSerializer.deserialize(datum, subType)); } return transformedData; + } else if (startsWith(type, mapPrefix)) { + let subType: string = type.slice(mapPrefix.length, -mapSuffix.length); // { [key: string]: Type; } => Type + let transformedData: { [key: string]: any } = {}; + for (let key in data) { + transformedData[key] = ObjectSerializer.deserialize( + data[key], + subType, + ); + } + return transformedData; } else if (type === "Date") { return new Date(data); } else { @@ -804,3 +856,77 @@ export class ObjectSerializer { } } } + +export interface Authentication { + /** + * Apply authentication settings to header and query params. + */ + applyToRequest(requestOptions: localVarRequest.Options): Promise | void; +} + +export class HttpBasicAuth implements Authentication { + public username: string = ''; + public password: string = ''; + + applyToRequest(requestOptions: localVarRequest.Options): void { + requestOptions.auth = { + username: this.username, password: this.password + } + } +} + +export class HttpBearerAuth implements Authentication { + public accessToken: string | (() => string) = ''; + + applyToRequest(requestOptions: localVarRequest.Options): void { + if (requestOptions && requestOptions.headers) { + const accessToken = typeof this.accessToken === 'function' + ? this.accessToken() + : this.accessToken; + requestOptions.headers["Authorization"] = "Bearer " + accessToken; + } + } +} + +export class ApiKeyAuth implements Authentication { + public apiKey: string = ''; + + constructor(private location: string, private paramName: string) { + } + + applyToRequest(requestOptions: localVarRequest.Options): void { + if (this.location == "query") { + (requestOptions.qs)[this.paramName] = this.apiKey; + } else if (this.location == "header" && requestOptions && requestOptions.headers) { + requestOptions.headers[this.paramName] = this.apiKey; + } else if (this.location == 'cookie' && requestOptions && requestOptions.headers) { + if (requestOptions.headers['Cookie']) { + requestOptions.headers['Cookie'] += '; ' + this.paramName + '=' + encodeURIComponent(this.apiKey); + } + else { + requestOptions.headers['Cookie'] = this.paramName + '=' + encodeURIComponent(this.apiKey); + } + } + } +} + +export class OAuth implements Authentication { + public accessToken: string = ''; + + applyToRequest(requestOptions: localVarRequest.Options): void { + if (requestOptions && requestOptions.headers) { + requestOptions.headers["Authorization"] = "Bearer " + this.accessToken; + } + } +} + +export class VoidAuth implements Authentication { + public username: string = ''; + public password: string = ''; + + applyToRequest(_: localVarRequest.Options): void { + // Do nothing + } +} + +export type Interceptor = (requestOptions: localVarRequest.Options) => (Promise | void); diff --git a/src/typings/management/nexo.ts b/src/typings/management/nexo.ts index c9864f38e..0dc4dd081 100644 --- a/src/typings/management/nexo.ts +++ b/src/typings/management/nexo.ts @@ -13,9 +13,9 @@ import { Notification } from './notification'; import { NotificationUrl } from './notificationUrl'; export class Nexo { - 'displayUrls'?: NotificationUrl | null; - 'encryptionKey'?: Key | null; - 'eventUrls'?: EventUrl | null; + 'displayUrls'?: NotificationUrl; + 'encryptionKey'?: Key; + 'eventUrls'?: EventUrl; /** * One or more URLs to send event messages to when using Terminal API. * @@ -23,7 +23,7 @@ export class Nexo { * Use `eventUrls` instead. */ 'nexoEventUrls'?: Array; - 'notification'?: Notification | null; + 'notification'?: Notification; static discriminator: string | undefined = undefined; @@ -31,17 +31,17 @@ export class Nexo { { "name": "displayUrls", "baseName": "displayUrls", - "type": "NotificationUrl | null" + "type": "NotificationUrl" }, { "name": "encryptionKey", "baseName": "encryptionKey", - "type": "Key | null" + "type": "Key" }, { "name": "eventUrls", "baseName": "eventUrls", - "type": "EventUrl | null" + "type": "EventUrl" }, { "name": "nexoEventUrls", @@ -51,7 +51,7 @@ export class Nexo { { "name": "notification", "baseName": "notification", - "type": "Notification | null" + "type": "Notification" } ]; static getAttributeTypeMap() { diff --git a/src/typings/management/notification.ts b/src/typings/management/notification.ts index df873eb11..15547b477 100644 --- a/src/typings/management/notification.ts +++ b/src/typings/management/notification.ts @@ -66,8 +66,8 @@ export class Notification { export namespace Notification { export enum CategoryEnum { - SaleWakeUp = 'SaleWakeUp', - KeyPressed = 'KeyPressed', - Empty = '' + SaleWakeUp = 'SaleWakeUp', + KeyPressed = 'KeyPressed', + Empty = '' } } diff --git a/src/typings/management/nyceInfo.ts b/src/typings/management/nyceInfo.ts index 72bcd1f1e..8b4efb79e 100644 --- a/src/typings/management/nyceInfo.ts +++ b/src/typings/management/nyceInfo.ts @@ -14,7 +14,7 @@ export class NyceInfo { * The type of transactions processed over this payment method. Allowed values: - **pos** for in-person payments. - **billpay** for subscription payments, both the initial payment and the later recurring payments. These transactions have `recurringProcessingModel` **Subscription**. - **ecom** for all other card not present transactions. This includes non-recurring transactions and transactions with `recurringProcessingModel` **CardOnFile** or **UnscheduledCardOnFile**. */ 'processingType': NyceInfo.ProcessingTypeEnum; - 'transactionDescription'?: TransactionDescriptionInfo | null; + 'transactionDescription'?: TransactionDescriptionInfo; static discriminator: string | undefined = undefined; @@ -27,7 +27,7 @@ export class NyceInfo { { "name": "transactionDescription", "baseName": "transactionDescription", - "type": "TransactionDescriptionInfo | null" + "type": "TransactionDescriptionInfo" } ]; static getAttributeTypeMap() { @@ -37,8 +37,8 @@ export class NyceInfo { export namespace NyceInfo { export enum ProcessingTypeEnum { - Billpay = 'billpay', - Ecom = 'ecom', - Pos = 'pos' + Billpay = 'billpay', + Ecom = 'ecom', + Pos = 'pos' } } diff --git a/src/typings/management/paginationLinks.ts b/src/typings/management/paginationLinks.ts index e03974928..055d535a4 100644 --- a/src/typings/management/paginationLinks.ts +++ b/src/typings/management/paginationLinks.ts @@ -12,8 +12,8 @@ import { LinksElement } from './linksElement'; export class PaginationLinks { 'first': LinksElement; 'last': LinksElement; - 'next'?: LinksElement | null; - 'prev'?: LinksElement | null; + 'next'?: LinksElement; + 'prev'?: LinksElement; 'self': LinksElement; static discriminator: string | undefined = undefined; @@ -32,12 +32,12 @@ export class PaginationLinks { { "name": "next", "baseName": "next", - "type": "LinksElement | null" + "type": "LinksElement" }, { "name": "prev", "baseName": "prev", - "type": "LinksElement | null" + "type": "LinksElement" }, { "name": "self", diff --git a/src/typings/management/payAtTable.ts b/src/typings/management/payAtTable.ts index fd9984f50..4641025ff 100644 --- a/src/typings/management/payAtTable.ts +++ b/src/typings/management/payAtTable.ts @@ -20,7 +20,7 @@ export class PayAtTable { /** * Sets the allowed payment instrument for Pay at table transactions. Can be: **cash** or **card**. If not set, the terminal presents both options. */ - 'paymentInstrument'?: PayAtTable.PaymentInstrumentEnum | null; + 'paymentInstrument'?: PayAtTable.PaymentInstrumentEnum; static discriminator: string | undefined = undefined; @@ -38,7 +38,7 @@ export class PayAtTable { { "name": "paymentInstrument", "baseName": "paymentInstrument", - "type": "PayAtTable.PaymentInstrumentEnum | null" + "type": "PayAtTable.PaymentInstrumentEnum" } ]; static getAttributeTypeMap() { @@ -48,11 +48,11 @@ export class PayAtTable { export namespace PayAtTable { export enum AuthenticationMethodEnum { - Magswipe = 'MAGSWIPE', - Mke = 'MKE' + Magswipe = 'MAGSWIPE', + Mke = 'MKE' } export enum PaymentInstrumentEnum { - Cash = 'Cash', - Card = 'Card' + Cash = 'Cash', + Card = 'Card' } } diff --git a/src/typings/management/paymentMethod.ts b/src/typings/management/paymentMethod.ts index 900f40ccd..828e3bf40 100644 --- a/src/typings/management/paymentMethod.ts +++ b/src/typings/management/paymentMethod.ts @@ -38,27 +38,27 @@ import { WeChatPayInfo } from './weChatPayInfo'; import { WeChatPayPosInfo } from './weChatPayPosInfo'; export class PaymentMethod { - 'accel'?: AccelInfo | null; - 'affirm'?: AffirmInfo | null; - 'afterpayTouch'?: AfterpayTouchInfo | null; + 'accel'?: AccelInfo; + 'affirm'?: AffirmInfo; + 'afterpayTouch'?: AfterpayTouchInfo; /** * Indicates whether receiving payments is allowed. This value is set to **true** by Adyen after screening your merchant account. */ 'allowed'?: boolean; - 'amex'?: AmexInfo | null; - 'applePay'?: ApplePayInfo | null; - 'bcmc'?: BcmcInfo | null; + 'amex'?: AmexInfo; + 'applePay'?: ApplePayInfo; + 'bcmc'?: BcmcInfo; /** * The unique identifier of the business line. Required if you are a [platform model](https://docs.adyen.com/platforms). */ 'businessLineId'?: string; - 'cartesBancaires'?: CartesBancairesInfo | null; - 'clearpay'?: ClearpayInfo | null; + 'cartesBancaires'?: CartesBancairesInfo; + 'clearpay'?: ClearpayInfo; /** * The list of countries where a payment method is available. By default, all countries supported by the payment method. */ 'countries'?: Array; - 'cup'?: GenericPmWithTdiInfo | null; + 'cup'?: GenericPmWithTdiInfo; /** * The list of currencies that a payment method supports. By default, all currencies supported by the payment method. */ @@ -67,33 +67,33 @@ export class PaymentMethod { * The list of custom routing flags to route payment to the intended acquirer. */ 'customRoutingFlags'?: Array; - 'diners'?: DinersInfo | null; - 'discover'?: GenericPmWithTdiInfo | null; - 'eft_directdebit_CA'?: GenericPmWithTdiInfo | null; - 'eftpos_australia'?: GenericPmWithTdiInfo | null; + 'diners'?: DinersInfo; + 'discover'?: GenericPmWithTdiInfo; + 'eft_directdebit_CA'?: GenericPmWithTdiInfo; + 'eftpos_australia'?: GenericPmWithTdiInfo; /** * Indicates whether the payment method is enabled (**true**) or disabled (**false**). */ 'enabled'?: boolean; - 'giroPay'?: GiroPayInfo | null; - 'girocard'?: GenericPmWithTdiInfo | null; - 'googlePay'?: GooglePayInfo | null; + 'giroPay'?: GiroPayInfo; + 'girocard'?: GenericPmWithTdiInfo; + 'googlePay'?: GooglePayInfo; /** * The identifier of the resource. */ 'id': string; - 'ideal'?: GenericPmWithTdiInfo | null; - 'interac_card'?: GenericPmWithTdiInfo | null; - 'jcb'?: JCBInfo | null; - 'klarna'?: KlarnaInfo | null; - 'maestro'?: GenericPmWithTdiInfo | null; - 'mc'?: GenericPmWithTdiInfo | null; - 'mealVoucher_FR'?: MealVoucherFRInfo | null; - 'nyce'?: NyceInfo | null; - 'payme'?: PayMeInfo | null; - 'paypal'?: PayPalInfo | null; - 'payto'?: PayToInfo | null; - 'pulse'?: PulseInfo | null; + 'ideal'?: GenericPmWithTdiInfo; + 'interac_card'?: GenericPmWithTdiInfo; + 'jcb'?: JCBInfo; + 'klarna'?: KlarnaInfo; + 'maestro'?: GenericPmWithTdiInfo; + 'mc'?: GenericPmWithTdiInfo; + 'mealVoucher_FR'?: MealVoucherFRInfo; + 'nyce'?: NyceInfo; + 'payme'?: PayMeInfo; + 'paypal'?: PayPalInfo; + 'payto'?: PayToInfo; + 'pulse'?: PulseInfo; /** * Your reference for the payment method. Supported characters a-z, A-Z, 0-9. */ @@ -102,16 +102,16 @@ export class PaymentMethod { * The sales channel. */ 'shopperInteraction'?: string; - 'sodexo'?: SodexoInfo | null; - 'sofort'?: SofortInfo | null; - 'star'?: StarInfo | null; + 'sodexo'?: SodexoInfo; + 'sofort'?: SofortInfo; + 'star'?: StarInfo; /** * The unique identifier of the store for which to configure the payment method, if any. */ 'storeIds'?: Array; - 'swish'?: SwishInfo | null; - 'ticket'?: TicketInfo | null; - 'twint'?: TwintInfo | null; + 'swish'?: SwishInfo; + 'ticket'?: TicketInfo; + 'twint'?: TwintInfo; /** * Payment method [variant](https://docs.adyen.com/development-resources/paymentmethodvariant#management-api). */ @@ -120,10 +120,10 @@ export class PaymentMethod { * Payment method status. Possible values: * **valid** * **pending** * **invalid** * **rejected** */ 'verificationStatus'?: PaymentMethod.VerificationStatusEnum; - 'vipps'?: VippsInfo | null; - 'visa'?: GenericPmWithTdiInfo | null; - 'wechatpay'?: WeChatPayInfo | null; - 'wechatpay_pos'?: WeChatPayPosInfo | null; + 'vipps'?: VippsInfo; + 'visa'?: GenericPmWithTdiInfo; + 'wechatpay'?: WeChatPayInfo; + 'wechatpay_pos'?: WeChatPayPosInfo; static discriminator: string | undefined = undefined; @@ -131,17 +131,17 @@ export class PaymentMethod { { "name": "accel", "baseName": "accel", - "type": "AccelInfo | null" + "type": "AccelInfo" }, { "name": "affirm", "baseName": "affirm", - "type": "AffirmInfo | null" + "type": "AffirmInfo" }, { "name": "afterpayTouch", "baseName": "afterpayTouch", - "type": "AfterpayTouchInfo | null" + "type": "AfterpayTouchInfo" }, { "name": "allowed", @@ -151,17 +151,17 @@ export class PaymentMethod { { "name": "amex", "baseName": "amex", - "type": "AmexInfo | null" + "type": "AmexInfo" }, { "name": "applePay", "baseName": "applePay", - "type": "ApplePayInfo | null" + "type": "ApplePayInfo" }, { "name": "bcmc", "baseName": "bcmc", - "type": "BcmcInfo | null" + "type": "BcmcInfo" }, { "name": "businessLineId", @@ -171,12 +171,12 @@ export class PaymentMethod { { "name": "cartesBancaires", "baseName": "cartesBancaires", - "type": "CartesBancairesInfo | null" + "type": "CartesBancairesInfo" }, { "name": "clearpay", "baseName": "clearpay", - "type": "ClearpayInfo | null" + "type": "ClearpayInfo" }, { "name": "countries", @@ -186,7 +186,7 @@ export class PaymentMethod { { "name": "cup", "baseName": "cup", - "type": "GenericPmWithTdiInfo | null" + "type": "GenericPmWithTdiInfo" }, { "name": "currencies", @@ -201,22 +201,22 @@ export class PaymentMethod { { "name": "diners", "baseName": "diners", - "type": "DinersInfo | null" + "type": "DinersInfo" }, { "name": "discover", "baseName": "discover", - "type": "GenericPmWithTdiInfo | null" + "type": "GenericPmWithTdiInfo" }, { "name": "eft_directdebit_CA", "baseName": "eft_directdebit_CA", - "type": "GenericPmWithTdiInfo | null" + "type": "GenericPmWithTdiInfo" }, { "name": "eftpos_australia", "baseName": "eftpos_australia", - "type": "GenericPmWithTdiInfo | null" + "type": "GenericPmWithTdiInfo" }, { "name": "enabled", @@ -226,17 +226,17 @@ export class PaymentMethod { { "name": "giroPay", "baseName": "giroPay", - "type": "GiroPayInfo | null" + "type": "GiroPayInfo" }, { "name": "girocard", "baseName": "girocard", - "type": "GenericPmWithTdiInfo | null" + "type": "GenericPmWithTdiInfo" }, { "name": "googlePay", "baseName": "googlePay", - "type": "GooglePayInfo | null" + "type": "GooglePayInfo" }, { "name": "id", @@ -246,62 +246,62 @@ export class PaymentMethod { { "name": "ideal", "baseName": "ideal", - "type": "GenericPmWithTdiInfo | null" + "type": "GenericPmWithTdiInfo" }, { "name": "interac_card", "baseName": "interac_card", - "type": "GenericPmWithTdiInfo | null" + "type": "GenericPmWithTdiInfo" }, { "name": "jcb", "baseName": "jcb", - "type": "JCBInfo | null" + "type": "JCBInfo" }, { "name": "klarna", "baseName": "klarna", - "type": "KlarnaInfo | null" + "type": "KlarnaInfo" }, { "name": "maestro", "baseName": "maestro", - "type": "GenericPmWithTdiInfo | null" + "type": "GenericPmWithTdiInfo" }, { "name": "mc", "baseName": "mc", - "type": "GenericPmWithTdiInfo | null" + "type": "GenericPmWithTdiInfo" }, { "name": "mealVoucher_FR", "baseName": "mealVoucher_FR", - "type": "MealVoucherFRInfo | null" + "type": "MealVoucherFRInfo" }, { "name": "nyce", "baseName": "nyce", - "type": "NyceInfo | null" + "type": "NyceInfo" }, { "name": "payme", "baseName": "payme", - "type": "PayMeInfo | null" + "type": "PayMeInfo" }, { "name": "paypal", "baseName": "paypal", - "type": "PayPalInfo | null" + "type": "PayPalInfo" }, { "name": "payto", "baseName": "payto", - "type": "PayToInfo | null" + "type": "PayToInfo" }, { "name": "pulse", "baseName": "pulse", - "type": "PulseInfo | null" + "type": "PulseInfo" }, { "name": "reference", @@ -316,17 +316,17 @@ export class PaymentMethod { { "name": "sodexo", "baseName": "sodexo", - "type": "SodexoInfo | null" + "type": "SodexoInfo" }, { "name": "sofort", "baseName": "sofort", - "type": "SofortInfo | null" + "type": "SofortInfo" }, { "name": "star", "baseName": "star", - "type": "StarInfo | null" + "type": "StarInfo" }, { "name": "storeIds", @@ -336,17 +336,17 @@ export class PaymentMethod { { "name": "swish", "baseName": "swish", - "type": "SwishInfo | null" + "type": "SwishInfo" }, { "name": "ticket", "baseName": "ticket", - "type": "TicketInfo | null" + "type": "TicketInfo" }, { "name": "twint", "baseName": "twint", - "type": "TwintInfo | null" + "type": "TwintInfo" }, { "name": "type", @@ -361,22 +361,22 @@ export class PaymentMethod { { "name": "vipps", "baseName": "vipps", - "type": "VippsInfo | null" + "type": "VippsInfo" }, { "name": "visa", "baseName": "visa", - "type": "GenericPmWithTdiInfo | null" + "type": "GenericPmWithTdiInfo" }, { "name": "wechatpay", "baseName": "wechatpay", - "type": "WeChatPayInfo | null" + "type": "WeChatPayInfo" }, { "name": "wechatpay_pos", "baseName": "wechatpay_pos", - "type": "WeChatPayPosInfo | null" + "type": "WeChatPayPosInfo" } ]; static getAttributeTypeMap() { @@ -386,9 +386,9 @@ export class PaymentMethod { export namespace PaymentMethod { export enum VerificationStatusEnum { - Valid = 'valid', - Pending = 'pending', - Invalid = 'invalid', - Rejected = 'rejected' + Valid = 'valid', + Pending = 'pending', + Invalid = 'invalid', + Rejected = 'rejected' } } diff --git a/src/typings/management/paymentMethodResponse.ts b/src/typings/management/paymentMethodResponse.ts index 55da25e32..08c42f558 100644 --- a/src/typings/management/paymentMethodResponse.ts +++ b/src/typings/management/paymentMethodResponse.ts @@ -11,7 +11,7 @@ import { PaginationLinks } from './paginationLinks'; import { PaymentMethod } from './paymentMethod'; export class PaymentMethodResponse { - '_links'?: PaginationLinks | null; + '_links'?: PaginationLinks; /** * The list of supported payment methods and their details. */ @@ -35,7 +35,7 @@ export class PaymentMethodResponse { { "name": "_links", "baseName": "_links", - "type": "PaginationLinks | null" + "type": "PaginationLinks" }, { "name": "data", @@ -65,82 +65,82 @@ export class PaymentMethodResponse { export namespace PaymentMethodResponse { export enum TypesWithErrorsEnum { - Accel = 'accel', - Ach = 'ach', - Affirm = 'affirm', - Afterpaytouch = 'afterpaytouch', - Alelo = 'alelo', - Alipay = 'alipay', - AlipayHk = 'alipay_hk', - AlipayWap = 'alipay_wap', - Amex = 'amex', - Applepay = 'applepay', - BaneseCard = 'banese_card', - BaneseCardCredit = 'banese_card_credit', - BaneseCardDebit = 'banese_card_debit', - BaneseCardPrepaid = 'banese_card_prepaid', - Bcmc = 'bcmc', - Blik = 'blik', - Cartebancaire = 'cartebancaire', - Clearpay = 'clearpay', - Clicktopay = 'clicktopay', - Credtodos = 'credtodos', - CredtodosPrivateCredit = 'credtodos_private_credit', - CredtodosPrivateDebit = 'credtodos_private_debit', - Cup = 'cup', - Diners = 'diners', - DirectdebitGb = 'directdebit_GB', - Discover = 'discover', - EbankingFi = 'ebanking_FI', - EftDirectdebitCa = 'eft_directdebit_CA', - EftposAustralia = 'eftpos_australia', - Elo = 'elo', - Elocredit = 'elocredit', - Elodebit = 'elodebit', - Girocard = 'girocard', - Googlepay = 'googlepay', - Hiper = 'hiper', - Hipercard = 'hipercard', - Ideal = 'ideal', - InteracCard = 'interac_card', - Jcb = 'jcb', - Klarna = 'klarna', - KlarnaAccount = 'klarna_account', - KlarnaPaynow = 'klarna_paynow', - Maestro = 'maestro', - Mbway = 'mbway', - Mc = 'mc', - Mcdebit = 'mcdebit', - MealVoucherFr = 'mealVoucher_FR', - Mobilepay = 'mobilepay', - Multibanco = 'multibanco', - Nyce = 'nyce', - OnlineBankingPl = 'onlineBanking_PL', - Paybybank = 'paybybank', - Payme = 'payme', - PaymePos = 'payme_pos', - Paynow = 'paynow', - PaynowPos = 'paynow_pos', - Paypal = 'paypal', - Payshop = 'payshop', - Payto = 'payto', - Pulse = 'pulse', - Sodexo = 'sodexo', - Star = 'star', - Swish = 'swish', - Ticket = 'ticket', - TodoGiftcard = 'todo_giftcard', - Trustly = 'trustly', - Twint = 'twint', - TwintPos = 'twint_pos', - UpBrazilCredit = 'up_brazil_credit', - ValeRefeicao = 'vale_refeicao', - ValeRefeicaoPrepaid = 'vale_refeicao_prepaid', - Vipps = 'vipps', - Visa = 'visa', - Visadebit = 'visadebit', - Vpay = 'vpay', - Wechatpay = 'wechatpay', - WechatpayPos = 'wechatpay_pos' + Accel = 'accel', + Ach = 'ach', + Affirm = 'affirm', + Afterpaytouch = 'afterpaytouch', + Alelo = 'alelo', + Alipay = 'alipay', + AlipayHk = 'alipay_hk', + AlipayWap = 'alipay_wap', + Amex = 'amex', + Applepay = 'applepay', + BaneseCard = 'banese_card', + BaneseCardCredit = 'banese_card_credit', + BaneseCardDebit = 'banese_card_debit', + BaneseCardPrepaid = 'banese_card_prepaid', + Bcmc = 'bcmc', + Blik = 'blik', + Cartebancaire = 'cartebancaire', + Clearpay = 'clearpay', + Clicktopay = 'clicktopay', + Credtodos = 'credtodos', + CredtodosPrivateCredit = 'credtodos_private_credit', + CredtodosPrivateDebit = 'credtodos_private_debit', + Cup = 'cup', + Diners = 'diners', + DirectdebitGb = 'directdebit_GB', + Discover = 'discover', + EbankingFi = 'ebanking_FI', + EftDirectdebitCa = 'eft_directdebit_CA', + EftposAustralia = 'eftpos_australia', + Elo = 'elo', + Elocredit = 'elocredit', + Elodebit = 'elodebit', + Girocard = 'girocard', + Googlepay = 'googlepay', + Hiper = 'hiper', + Hipercard = 'hipercard', + Ideal = 'ideal', + InteracCard = 'interac_card', + Jcb = 'jcb', + Klarna = 'klarna', + KlarnaAccount = 'klarna_account', + KlarnaPaynow = 'klarna_paynow', + Maestro = 'maestro', + Mbway = 'mbway', + Mc = 'mc', + Mcdebit = 'mcdebit', + MealVoucherFr = 'mealVoucher_FR', + Mobilepay = 'mobilepay', + Multibanco = 'multibanco', + Nyce = 'nyce', + OnlineBankingPl = 'onlineBanking_PL', + Paybybank = 'paybybank', + Payme = 'payme', + PaymePos = 'payme_pos', + Paynow = 'paynow', + PaynowPos = 'paynow_pos', + Paypal = 'paypal', + Payshop = 'payshop', + Payto = 'payto', + Pulse = 'pulse', + Sodexo = 'sodexo', + Star = 'star', + Swish = 'swish', + Ticket = 'ticket', + TodoGiftcard = 'todo_giftcard', + Trustly = 'trustly', + Twint = 'twint', + TwintPos = 'twint_pos', + UpBrazilCredit = 'up_brazil_credit', + ValeRefeicao = 'vale_refeicao', + ValeRefeicaoPrepaid = 'vale_refeicao_prepaid', + Vipps = 'vipps', + Visa = 'visa', + Visadebit = 'visadebit', + Vpay = 'vpay', + Wechatpay = 'wechatpay', + WechatpayPos = 'wechatpay_pos' } } diff --git a/src/typings/management/paymentMethodSetupInfo.ts b/src/typings/management/paymentMethodSetupInfo.ts index 9ad274553..8bac7f0a1 100644 --- a/src/typings/management/paymentMethodSetupInfo.ts +++ b/src/typings/management/paymentMethodSetupInfo.ts @@ -38,23 +38,23 @@ import { WeChatPayInfo } from './weChatPayInfo'; import { WeChatPayPosInfo } from './weChatPayPosInfo'; export class PaymentMethodSetupInfo { - 'accel'?: AccelInfo | null; - 'affirm'?: AffirmInfo | null; - 'afterpayTouch'?: AfterpayTouchInfo | null; - 'amex'?: AmexInfo | null; - 'applePay'?: ApplePayInfo | null; - 'bcmc'?: BcmcInfo | null; + 'accel'?: AccelInfo; + 'affirm'?: AffirmInfo; + 'afterpayTouch'?: AfterpayTouchInfo; + 'amex'?: AmexInfo; + 'applePay'?: ApplePayInfo; + 'bcmc'?: BcmcInfo; /** * The unique identifier of the business line. Required if you are a [platform model](https://docs.adyen.com/platforms). */ 'businessLineId'?: string; - 'cartesBancaires'?: CartesBancairesInfo | null; - 'clearpay'?: ClearpayInfo | null; + 'cartesBancaires'?: CartesBancairesInfo; + 'clearpay'?: ClearpayInfo; /** * The list of countries where a payment method is available. By default, all countries supported by the payment method. */ 'countries'?: Array; - 'cup'?: GenericPmWithTdiInfo | null; + 'cup'?: GenericPmWithTdiInfo; /** * The list of currencies that a payment method supports. By default, all currencies supported by the payment method. */ @@ -63,25 +63,25 @@ export class PaymentMethodSetupInfo { * The list of custom routing flags to route payment to the intended acquirer. */ 'customRoutingFlags'?: Array; - 'diners'?: DinersInfo | null; - 'discover'?: GenericPmWithTdiInfo | null; - 'eft_directdebit_CA'?: GenericPmWithTdiInfo | null; - 'eftpos_australia'?: GenericPmWithTdiInfo | null; - 'giroPay'?: GiroPayInfo | null; - 'girocard'?: GenericPmWithTdiInfo | null; - 'googlePay'?: GooglePayInfo | null; - 'ideal'?: GenericPmWithTdiInfo | null; - 'interac_card'?: GenericPmWithTdiInfo | null; - 'jcb'?: JCBInfo | null; - 'klarna'?: KlarnaInfo | null; - 'maestro'?: GenericPmWithTdiInfo | null; - 'mc'?: GenericPmWithTdiInfo | null; - 'mealVoucher_FR'?: MealVoucherFRInfo | null; - 'nyce'?: NyceInfo | null; - 'payme'?: PayMeInfo | null; - 'paypal'?: PayPalInfo | null; - 'payto'?: PayToInfo | null; - 'pulse'?: PulseInfo | null; + 'diners'?: DinersInfo; + 'discover'?: GenericPmWithTdiInfo; + 'eft_directdebit_CA'?: GenericPmWithTdiInfo; + 'eftpos_australia'?: GenericPmWithTdiInfo; + 'giroPay'?: GiroPayInfo; + 'girocard'?: GenericPmWithTdiInfo; + 'googlePay'?: GooglePayInfo; + 'ideal'?: GenericPmWithTdiInfo; + 'interac_card'?: GenericPmWithTdiInfo; + 'jcb'?: JCBInfo; + 'klarna'?: KlarnaInfo; + 'maestro'?: GenericPmWithTdiInfo; + 'mc'?: GenericPmWithTdiInfo; + 'mealVoucher_FR'?: MealVoucherFRInfo; + 'nyce'?: NyceInfo; + 'payme'?: PayMeInfo; + 'paypal'?: PayPalInfo; + 'payto'?: PayToInfo; + 'pulse'?: PulseInfo; /** * Your reference for the payment method. Supported characters a-z, A-Z, 0-9. */ @@ -90,24 +90,24 @@ export class PaymentMethodSetupInfo { * The sales channel. Required if the merchant account does not have a sales channel. When you provide this field, it overrides the default sales channel set on the merchant account. Possible values: **eCommerce**, **pos**, **contAuth**, and **moto**. */ 'shopperInteraction'?: PaymentMethodSetupInfo.ShopperInteractionEnum; - 'sodexo'?: SodexoInfo | null; - 'sofort'?: SofortInfo | null; - 'star'?: StarInfo | null; + 'sodexo'?: SodexoInfo; + 'sofort'?: SofortInfo; + 'star'?: StarInfo; /** * The unique identifier of the store for which to configure the payment method, if any. */ 'storeIds'?: Array; - 'swish'?: SwishInfo | null; - 'ticket'?: TicketInfo | null; - 'twint'?: TwintInfo | null; + 'swish'?: SwishInfo; + 'ticket'?: TicketInfo; + 'twint'?: TwintInfo; /** * Payment method [variant](https://docs.adyen.com/development-resources/paymentmethodvariant#management-api). */ 'type': PaymentMethodSetupInfo.TypeEnum; - 'vipps'?: VippsInfo | null; - 'visa'?: GenericPmWithTdiInfo | null; - 'wechatpay'?: WeChatPayInfo | null; - 'wechatpay_pos'?: WeChatPayPosInfo | null; + 'vipps'?: VippsInfo; + 'visa'?: GenericPmWithTdiInfo; + 'wechatpay'?: WeChatPayInfo; + 'wechatpay_pos'?: WeChatPayPosInfo; static discriminator: string | undefined = undefined; @@ -115,32 +115,32 @@ export class PaymentMethodSetupInfo { { "name": "accel", "baseName": "accel", - "type": "AccelInfo | null" + "type": "AccelInfo" }, { "name": "affirm", "baseName": "affirm", - "type": "AffirmInfo | null" + "type": "AffirmInfo" }, { "name": "afterpayTouch", "baseName": "afterpayTouch", - "type": "AfterpayTouchInfo | null" + "type": "AfterpayTouchInfo" }, { "name": "amex", "baseName": "amex", - "type": "AmexInfo | null" + "type": "AmexInfo" }, { "name": "applePay", "baseName": "applePay", - "type": "ApplePayInfo | null" + "type": "ApplePayInfo" }, { "name": "bcmc", "baseName": "bcmc", - "type": "BcmcInfo | null" + "type": "BcmcInfo" }, { "name": "businessLineId", @@ -150,12 +150,12 @@ export class PaymentMethodSetupInfo { { "name": "cartesBancaires", "baseName": "cartesBancaires", - "type": "CartesBancairesInfo | null" + "type": "CartesBancairesInfo" }, { "name": "clearpay", "baseName": "clearpay", - "type": "ClearpayInfo | null" + "type": "ClearpayInfo" }, { "name": "countries", @@ -165,7 +165,7 @@ export class PaymentMethodSetupInfo { { "name": "cup", "baseName": "cup", - "type": "GenericPmWithTdiInfo | null" + "type": "GenericPmWithTdiInfo" }, { "name": "currencies", @@ -180,97 +180,97 @@ export class PaymentMethodSetupInfo { { "name": "diners", "baseName": "diners", - "type": "DinersInfo | null" + "type": "DinersInfo" }, { "name": "discover", "baseName": "discover", - "type": "GenericPmWithTdiInfo | null" + "type": "GenericPmWithTdiInfo" }, { "name": "eft_directdebit_CA", "baseName": "eft_directdebit_CA", - "type": "GenericPmWithTdiInfo | null" + "type": "GenericPmWithTdiInfo" }, { "name": "eftpos_australia", "baseName": "eftpos_australia", - "type": "GenericPmWithTdiInfo | null" + "type": "GenericPmWithTdiInfo" }, { "name": "giroPay", "baseName": "giroPay", - "type": "GiroPayInfo | null" + "type": "GiroPayInfo" }, { "name": "girocard", "baseName": "girocard", - "type": "GenericPmWithTdiInfo | null" + "type": "GenericPmWithTdiInfo" }, { "name": "googlePay", "baseName": "googlePay", - "type": "GooglePayInfo | null" + "type": "GooglePayInfo" }, { "name": "ideal", "baseName": "ideal", - "type": "GenericPmWithTdiInfo | null" + "type": "GenericPmWithTdiInfo" }, { "name": "interac_card", "baseName": "interac_card", - "type": "GenericPmWithTdiInfo | null" + "type": "GenericPmWithTdiInfo" }, { "name": "jcb", "baseName": "jcb", - "type": "JCBInfo | null" + "type": "JCBInfo" }, { "name": "klarna", "baseName": "klarna", - "type": "KlarnaInfo | null" + "type": "KlarnaInfo" }, { "name": "maestro", "baseName": "maestro", - "type": "GenericPmWithTdiInfo | null" + "type": "GenericPmWithTdiInfo" }, { "name": "mc", "baseName": "mc", - "type": "GenericPmWithTdiInfo | null" + "type": "GenericPmWithTdiInfo" }, { "name": "mealVoucher_FR", "baseName": "mealVoucher_FR", - "type": "MealVoucherFRInfo | null" + "type": "MealVoucherFRInfo" }, { "name": "nyce", "baseName": "nyce", - "type": "NyceInfo | null" + "type": "NyceInfo" }, { "name": "payme", "baseName": "payme", - "type": "PayMeInfo | null" + "type": "PayMeInfo" }, { "name": "paypal", "baseName": "paypal", - "type": "PayPalInfo | null" + "type": "PayPalInfo" }, { "name": "payto", "baseName": "payto", - "type": "PayToInfo | null" + "type": "PayToInfo" }, { "name": "pulse", "baseName": "pulse", - "type": "PulseInfo | null" + "type": "PulseInfo" }, { "name": "reference", @@ -285,17 +285,17 @@ export class PaymentMethodSetupInfo { { "name": "sodexo", "baseName": "sodexo", - "type": "SodexoInfo | null" + "type": "SodexoInfo" }, { "name": "sofort", "baseName": "sofort", - "type": "SofortInfo | null" + "type": "SofortInfo" }, { "name": "star", "baseName": "star", - "type": "StarInfo | null" + "type": "StarInfo" }, { "name": "storeIds", @@ -305,17 +305,17 @@ export class PaymentMethodSetupInfo { { "name": "swish", "baseName": "swish", - "type": "SwishInfo | null" + "type": "SwishInfo" }, { "name": "ticket", "baseName": "ticket", - "type": "TicketInfo | null" + "type": "TicketInfo" }, { "name": "twint", "baseName": "twint", - "type": "TwintInfo | null" + "type": "TwintInfo" }, { "name": "type", @@ -325,22 +325,22 @@ export class PaymentMethodSetupInfo { { "name": "vipps", "baseName": "vipps", - "type": "VippsInfo | null" + "type": "VippsInfo" }, { "name": "visa", "baseName": "visa", - "type": "GenericPmWithTdiInfo | null" + "type": "GenericPmWithTdiInfo" }, { "name": "wechatpay", "baseName": "wechatpay", - "type": "WeChatPayInfo | null" + "type": "WeChatPayInfo" }, { "name": "wechatpay_pos", "baseName": "wechatpay_pos", - "type": "WeChatPayPosInfo | null" + "type": "WeChatPayPosInfo" } ]; static getAttributeTypeMap() { @@ -350,88 +350,88 @@ export class PaymentMethodSetupInfo { export namespace PaymentMethodSetupInfo { export enum ShopperInteractionEnum { - ECommerce = 'eCommerce', - Pos = 'pos', - Moto = 'moto', - ContAuth = 'contAuth' + ECommerce = 'eCommerce', + Pos = 'pos', + Moto = 'moto', + ContAuth = 'contAuth' } export enum TypeEnum { - Accel = 'accel', - Ach = 'ach', - Affirm = 'affirm', - Afterpaytouch = 'afterpaytouch', - Alelo = 'alelo', - Alipay = 'alipay', - AlipayHk = 'alipay_hk', - AlipayWap = 'alipay_wap', - Amex = 'amex', - Applepay = 'applepay', - BaneseCard = 'banese_card', - BaneseCardCredit = 'banese_card_credit', - BaneseCardDebit = 'banese_card_debit', - BaneseCardPrepaid = 'banese_card_prepaid', - Bcmc = 'bcmc', - Blik = 'blik', - Cartebancaire = 'cartebancaire', - Clearpay = 'clearpay', - Clicktopay = 'clicktopay', - Credtodos = 'credtodos', - CredtodosPrivateCredit = 'credtodos_private_credit', - CredtodosPrivateDebit = 'credtodos_private_debit', - Cup = 'cup', - Diners = 'diners', - DirectdebitGb = 'directdebit_GB', - Discover = 'discover', - EbankingFi = 'ebanking_FI', - EftDirectdebitCa = 'eft_directdebit_CA', - EftposAustralia = 'eftpos_australia', - Elo = 'elo', - Elocredit = 'elocredit', - Elodebit = 'elodebit', - Girocard = 'girocard', - Googlepay = 'googlepay', - Hiper = 'hiper', - Hipercard = 'hipercard', - Ideal = 'ideal', - InteracCard = 'interac_card', - Jcb = 'jcb', - Klarna = 'klarna', - KlarnaAccount = 'klarna_account', - KlarnaPaynow = 'klarna_paynow', - Maestro = 'maestro', - Mbway = 'mbway', - Mc = 'mc', - Mcdebit = 'mcdebit', - MealVoucherFr = 'mealVoucher_FR', - Mobilepay = 'mobilepay', - Multibanco = 'multibanco', - Nyce = 'nyce', - OnlineBankingPl = 'onlineBanking_PL', - Paybybank = 'paybybank', - Payme = 'payme', - PaymePos = 'payme_pos', - Paynow = 'paynow', - PaynowPos = 'paynow_pos', - Paypal = 'paypal', - Payshop = 'payshop', - Payto = 'payto', - Pulse = 'pulse', - Sodexo = 'sodexo', - Star = 'star', - Swish = 'swish', - Ticket = 'ticket', - TodoGiftcard = 'todo_giftcard', - Trustly = 'trustly', - Twint = 'twint', - TwintPos = 'twint_pos', - UpBrazilCredit = 'up_brazil_credit', - ValeRefeicao = 'vale_refeicao', - ValeRefeicaoPrepaid = 'vale_refeicao_prepaid', - Vipps = 'vipps', - Visa = 'visa', - Visadebit = 'visadebit', - Vpay = 'vpay', - Wechatpay = 'wechatpay', - WechatpayPos = 'wechatpay_pos' + Accel = 'accel', + Ach = 'ach', + Affirm = 'affirm', + Afterpaytouch = 'afterpaytouch', + Alelo = 'alelo', + Alipay = 'alipay', + AlipayHk = 'alipay_hk', + AlipayWap = 'alipay_wap', + Amex = 'amex', + Applepay = 'applepay', + BaneseCard = 'banese_card', + BaneseCardCredit = 'banese_card_credit', + BaneseCardDebit = 'banese_card_debit', + BaneseCardPrepaid = 'banese_card_prepaid', + Bcmc = 'bcmc', + Blik = 'blik', + Cartebancaire = 'cartebancaire', + Clearpay = 'clearpay', + Clicktopay = 'clicktopay', + Credtodos = 'credtodos', + CredtodosPrivateCredit = 'credtodos_private_credit', + CredtodosPrivateDebit = 'credtodos_private_debit', + Cup = 'cup', + Diners = 'diners', + DirectdebitGb = 'directdebit_GB', + Discover = 'discover', + EbankingFi = 'ebanking_FI', + EftDirectdebitCa = 'eft_directdebit_CA', + EftposAustralia = 'eftpos_australia', + Elo = 'elo', + Elocredit = 'elocredit', + Elodebit = 'elodebit', + Girocard = 'girocard', + Googlepay = 'googlepay', + Hiper = 'hiper', + Hipercard = 'hipercard', + Ideal = 'ideal', + InteracCard = 'interac_card', + Jcb = 'jcb', + Klarna = 'klarna', + KlarnaAccount = 'klarna_account', + KlarnaPaynow = 'klarna_paynow', + Maestro = 'maestro', + Mbway = 'mbway', + Mc = 'mc', + Mcdebit = 'mcdebit', + MealVoucherFr = 'mealVoucher_FR', + Mobilepay = 'mobilepay', + Multibanco = 'multibanco', + Nyce = 'nyce', + OnlineBankingPl = 'onlineBanking_PL', + Paybybank = 'paybybank', + Payme = 'payme', + PaymePos = 'payme_pos', + Paynow = 'paynow', + PaynowPos = 'paynow_pos', + Paypal = 'paypal', + Payshop = 'payshop', + Payto = 'payto', + Pulse = 'pulse', + Sodexo = 'sodexo', + Star = 'star', + Swish = 'swish', + Ticket = 'ticket', + TodoGiftcard = 'todo_giftcard', + Trustly = 'trustly', + Twint = 'twint', + TwintPos = 'twint_pos', + UpBrazilCredit = 'up_brazil_credit', + ValeRefeicao = 'vale_refeicao', + ValeRefeicaoPrepaid = 'vale_refeicao_prepaid', + Vipps = 'vipps', + Visa = 'visa', + Visadebit = 'visadebit', + Vpay = 'vpay', + Wechatpay = 'wechatpay', + WechatpayPos = 'wechatpay_pos' } } diff --git a/src/typings/management/payoutSettings.ts b/src/typings/management/payoutSettings.ts index ef6fd0df3..6840a40c0 100644 --- a/src/typings/management/payoutSettings.ts +++ b/src/typings/management/payoutSettings.ts @@ -84,14 +84,14 @@ export class PayoutSettings { export namespace PayoutSettings { export enum PriorityEnum { - First = 'first', - Normal = 'normal', - Urgent = 'urgent' + First = 'first', + Normal = 'normal', + Urgent = 'urgent' } export enum VerificationStatusEnum { - Invalid = 'invalid', - Pending = 'pending', - Rejected = 'rejected', - Valid = 'valid' + Invalid = 'invalid', + Pending = 'pending', + Rejected = 'rejected', + Valid = 'valid' } } diff --git a/src/typings/management/profile.ts b/src/typings/management/profile.ts index d80199577..c83b834e0 100644 --- a/src/typings/management/profile.ts +++ b/src/typings/management/profile.ts @@ -33,9 +33,9 @@ export class Profile { * For `authType` **wpa-eap** or **wpa2-eap**. Possible values: **tls**, **peap**, **leap**, **fast** */ 'eap'?: string; - 'eapCaCert'?: any | null; - 'eapClientCert'?: any | null; - 'eapClientKey'?: any | null; + 'eapCaCert'?: any; + 'eapClientCert'?: any; + 'eapClientKey'?: any; /** * For `eap` **tls**. The password of the RSA key file, if that file is password-protected. */ @@ -44,7 +44,7 @@ export class Profile { * For `authType` **wpa-eap** or **wpa2-eap**. The EAP-PEAP username from your MS-CHAP account. Must match the configuration of your RADIUS server. */ 'eapIdentity'?: string; - 'eapIntermediateCert'?: any | null; + 'eapIntermediateCert'?: any; /** * For `eap` **peap**. The EAP-PEAP password from your MS-CHAP account. Must match the configuration of your RADIUS server. */ @@ -106,17 +106,17 @@ export class Profile { { "name": "eapCaCert", "baseName": "eapCaCert", - "type": "any | null" + "type": "any" }, { "name": "eapClientCert", "baseName": "eapClientCert", - "type": "any | null" + "type": "any" }, { "name": "eapClientKey", "baseName": "eapClientKey", - "type": "any | null" + "type": "any" }, { "name": "eapClientPwd", @@ -131,7 +131,7 @@ export class Profile { { "name": "eapIntermediateCert", "baseName": "eapIntermediateCert", - "type": "any | null" + "type": "any" }, { "name": "eapPwd", diff --git a/src/typings/management/pulseInfo.ts b/src/typings/management/pulseInfo.ts index 174f19211..c3f0a5b32 100644 --- a/src/typings/management/pulseInfo.ts +++ b/src/typings/management/pulseInfo.ts @@ -14,7 +14,7 @@ export class PulseInfo { * The type of transactions processed over this payment method. Allowed values: - **pos** for in-person payments. - **billpay** for subscription payments, both the initial payment and the later recurring payments. These transactions have `recurringProcessingModel` **Subscription**. - **ecom** for all other card not present transactions. This includes non-recurring transactions and transactions with `recurringProcessingModel` **CardOnFile** or **UnscheduledCardOnFile**. */ 'processingType': PulseInfo.ProcessingTypeEnum; - 'transactionDescription'?: TransactionDescriptionInfo | null; + 'transactionDescription'?: TransactionDescriptionInfo; static discriminator: string | undefined = undefined; @@ -27,7 +27,7 @@ export class PulseInfo { { "name": "transactionDescription", "baseName": "transactionDescription", - "type": "TransactionDescriptionInfo | null" + "type": "TransactionDescriptionInfo" } ]; static getAttributeTypeMap() { @@ -37,8 +37,8 @@ export class PulseInfo { export namespace PulseInfo { export enum ProcessingTypeEnum { - Billpay = 'billpay', - Ecom = 'ecom', - Pos = 'pos' + Billpay = 'billpay', + Ecom = 'ecom', + Pos = 'pos' } } diff --git a/src/typings/management/refunds.ts b/src/typings/management/refunds.ts index f3391271d..6095a9738 100644 --- a/src/typings/management/refunds.ts +++ b/src/typings/management/refunds.ts @@ -10,7 +10,7 @@ import { Referenced } from './referenced'; export class Refunds { - 'referenced'?: Referenced | null; + 'referenced'?: Referenced; static discriminator: string | undefined = undefined; @@ -18,7 +18,7 @@ export class Refunds { { "name": "referenced", "baseName": "referenced", - "type": "Referenced | null" + "type": "Referenced" } ]; static getAttributeTypeMap() { diff --git a/src/typings/management/releaseUpdateDetails.ts b/src/typings/management/releaseUpdateDetails.ts index 9a4396e68..ecf9036aa 100644 --- a/src/typings/management/releaseUpdateDetails.ts +++ b/src/typings/management/releaseUpdateDetails.ts @@ -12,7 +12,7 @@ export class ReleaseUpdateDetails { /** * Type of terminal action: Update Release. */ - 'type'?: ReleaseUpdateDetails.TypeEnum; + 'type'?: ReleaseUpdateDetails.TypeEnum = ReleaseUpdateDetails.TypeEnum.ReleaseUpdate; /** * Boolean flag that tells if the terminal should update at the first next maintenance call. If false, terminal will update on its configured reboot time. */ @@ -39,6 +39,6 @@ export class ReleaseUpdateDetails { export namespace ReleaseUpdateDetails { export enum TypeEnum { - ReleaseUpdate = 'ReleaseUpdate' + ReleaseUpdate = 'ReleaseUpdate' } } diff --git a/src/typings/management/scheduleTerminalActionsRequest.ts b/src/typings/management/scheduleTerminalActionsRequest.ts index 0e535f180..5d7b8c4f5 100644 --- a/src/typings/management/scheduleTerminalActionsRequest.ts +++ b/src/typings/management/scheduleTerminalActionsRequest.ts @@ -7,17 +7,10 @@ * Do not edit this class manually. */ -import { InstallAndroidAppDetails } from './installAndroidAppDetails'; -import { InstallAndroidCertificateDetails } from './installAndroidCertificateDetails'; -import { ReleaseUpdateDetails } from './releaseUpdateDetails'; -import { UninstallAndroidAppDetails } from './uninstallAndroidAppDetails'; -import { UninstallAndroidCertificateDetails } from './uninstallAndroidCertificateDetails'; +import { ScheduleTerminalActionsRequestActionDetails } from './scheduleTerminalActionsRequestActionDetails'; export class ScheduleTerminalActionsRequest { - /** - * Information about the action to take. - */ - 'actionDetails'?: InstallAndroidAppDetails | InstallAndroidCertificateDetails | ReleaseUpdateDetails | UninstallAndroidAppDetails | UninstallAndroidCertificateDetails | null; + 'actionDetails'?: ScheduleTerminalActionsRequestActionDetails; /** * The date and time when the action should happen. Format: [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339), but without the **Z** before the time offset. For example, **2021-11-15T12:16:21+0100** The action is sent with the first [maintenance call](https://docs.adyen.com/point-of-sale/automating-terminal-management/terminal-actions-api#when-actions-take-effect) after the specified date and time in the time zone of the terminal. An empty value causes the action to be sent as soon as possible: at the next maintenance call. */ @@ -37,7 +30,7 @@ export class ScheduleTerminalActionsRequest { { "name": "actionDetails", "baseName": "actionDetails", - "type": "InstallAndroidAppDetails | InstallAndroidCertificateDetails | ReleaseUpdateDetails | UninstallAndroidAppDetails | UninstallAndroidCertificateDetails | null" + "type": "ScheduleTerminalActionsRequestActionDetails" }, { "name": "scheduledAt", diff --git a/src/typings/management/scheduleTerminalActionsRequestActionDetails.ts b/src/typings/management/scheduleTerminalActionsRequestActionDetails.ts new file mode 100644 index 000000000..4bb3dca2b --- /dev/null +++ b/src/typings/management/scheduleTerminalActionsRequestActionDetails.ts @@ -0,0 +1,74 @@ +/* + * The version of the OpenAPI document: v3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { InstallAndroidAppDetails } from './installAndroidAppDetails'; +import { InstallAndroidCertificateDetails } from './installAndroidCertificateDetails'; +import { ReleaseUpdateDetails } from './releaseUpdateDetails'; +import { UninstallAndroidAppDetails } from './uninstallAndroidAppDetails'; +import { UninstallAndroidCertificateDetails } from './uninstallAndroidCertificateDetails'; + +/** +* Information about the action to take. +*/ +export class ScheduleTerminalActionsRequestActionDetails { + /** + * The unique identifier of the app to be uninstalled. + */ + 'appId'?: string; + /** + * Type of terminal action: Install an Android app. + */ + 'type'?: ScheduleTerminalActionsRequestActionDetails.TypeEnum = ScheduleTerminalActionsRequestActionDetails.TypeEnum.InstallAndroidApp; + /** + * The unique identifier of the certificate to be uninstalled. + */ + 'certificateId'?: string; + /** + * Boolean flag that tells if the terminal should update at the first next maintenance call. If false, terminal will update on its configured reboot time. + */ + 'updateAtFirstMaintenanceCall'?: boolean; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "appId", + "baseName": "appId", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "ScheduleTerminalActionsRequestActionDetails.TypeEnum" + }, + { + "name": "certificateId", + "baseName": "certificateId", + "type": "string" + }, + { + "name": "updateAtFirstMaintenanceCall", + "baseName": "updateAtFirstMaintenanceCall", + "type": "boolean" + } ]; + + static getAttributeTypeMap() { + return ScheduleTerminalActionsRequestActionDetails.attributeTypeMap; + } +} + +export namespace ScheduleTerminalActionsRequestActionDetails { + export enum TypeEnum { + InstallAndroidApp = 'InstallAndroidApp', + InstallAndroidCertificate = 'InstallAndroidCertificate', + ReleaseUpdate = 'ReleaseUpdate', + UninstallAndroidApp = 'UninstallAndroidApp', + UninstallAndroidCertificate = 'UninstallAndroidCertificate' + } +} diff --git a/src/typings/management/scheduleTerminalActionsResponse.ts b/src/typings/management/scheduleTerminalActionsResponse.ts index 2e9222322..c0edb09c1 100644 --- a/src/typings/management/scheduleTerminalActionsResponse.ts +++ b/src/typings/management/scheduleTerminalActionsResponse.ts @@ -7,18 +7,11 @@ * Do not edit this class manually. */ -import { InstallAndroidAppDetails } from './installAndroidAppDetails'; -import { InstallAndroidCertificateDetails } from './installAndroidCertificateDetails'; -import { ReleaseUpdateDetails } from './releaseUpdateDetails'; +import { ScheduleTerminalActionsRequestActionDetails } from './scheduleTerminalActionsRequestActionDetails'; import { TerminalActionScheduleDetail } from './terminalActionScheduleDetail'; -import { UninstallAndroidAppDetails } from './uninstallAndroidAppDetails'; -import { UninstallAndroidCertificateDetails } from './uninstallAndroidCertificateDetails'; export class ScheduleTerminalActionsResponse { - /** - * Information about the action to take. - */ - 'actionDetails'?: InstallAndroidAppDetails | InstallAndroidCertificateDetails | ReleaseUpdateDetails | UninstallAndroidAppDetails | UninstallAndroidCertificateDetails | null; + 'actionDetails'?: ScheduleTerminalActionsRequestActionDetails; /** * A list containing a terminal ID and an action ID for each terminal that the action was scheduled for. */ @@ -50,7 +43,7 @@ export class ScheduleTerminalActionsResponse { { "name": "actionDetails", "baseName": "actionDetails", - "type": "InstallAndroidAppDetails | InstallAndroidCertificateDetails | ReleaseUpdateDetails | UninstallAndroidAppDetails | UninstallAndroidCertificateDetails | null" + "type": "ScheduleTerminalActionsRequestActionDetails" }, { "name": "items", diff --git a/src/typings/management/shippingLocation.ts b/src/typings/management/shippingLocation.ts index 909eaf6c9..e5ee4bca0 100644 --- a/src/typings/management/shippingLocation.ts +++ b/src/typings/management/shippingLocation.ts @@ -11,8 +11,8 @@ import { Address } from './address'; import { Contact } from './contact'; export class ShippingLocation { - 'address'?: Address | null; - 'contact'?: Contact | null; + 'address'?: Address; + 'contact'?: Contact; /** * The unique identifier of the shipping location, for use as `shippingLocationId` when creating an order. */ @@ -28,12 +28,12 @@ export class ShippingLocation { { "name": "address", "baseName": "address", - "type": "Address | null" + "type": "Address" }, { "name": "contact", "baseName": "contact", - "type": "Contact | null" + "type": "Contact" }, { "name": "id", diff --git a/src/typings/management/splitConfigurationLogic.ts b/src/typings/management/splitConfigurationLogic.ts index 200bfd63f..68dd31ab3 100644 --- a/src/typings/management/splitConfigurationLogic.ts +++ b/src/typings/management/splitConfigurationLogic.ts @@ -15,7 +15,7 @@ export class SplitConfigurationLogic { * Deducts the acquiring fees (the aggregated amount of interchange and scheme fee) from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. */ 'acquiringFees'?: SplitConfigurationLogic.AcquiringFeesEnum; - 'additionalCommission'?: AdditionalCommission | null; + 'additionalCommission'?: AdditionalCommission; /** * Deducts the transaction fee due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/guides/payments-training-guide/get-the-best-from-your-card-processing) from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. */ @@ -85,7 +85,7 @@ export class SplitConfigurationLogic { { "name": "additionalCommission", "baseName": "additionalCommission", - "type": "AdditionalCommission | null" + "type": "AdditionalCommission" }, { "name": "adyenCommission", @@ -170,61 +170,61 @@ export class SplitConfigurationLogic { export namespace SplitConfigurationLogic { export enum AcquiringFeesEnum { - DeductFromLiableAccount = 'deductFromLiableAccount', - DeductFromOneBalanceAccount = 'deductFromOneBalanceAccount' + DeductFromLiableAccount = 'deductFromLiableAccount', + DeductFromOneBalanceAccount = 'deductFromOneBalanceAccount' } export enum AdyenCommissionEnum { - DeductFromLiableAccount = 'deductFromLiableAccount', - DeductFromOneBalanceAccount = 'deductFromOneBalanceAccount' + DeductFromLiableAccount = 'deductFromLiableAccount', + DeductFromOneBalanceAccount = 'deductFromOneBalanceAccount' } export enum AdyenFeesEnum { - DeductFromLiableAccount = 'deductFromLiableAccount', - DeductFromOneBalanceAccount = 'deductFromOneBalanceAccount' + DeductFromLiableAccount = 'deductFromLiableAccount', + DeductFromOneBalanceAccount = 'deductFromOneBalanceAccount' } export enum AdyenMarkupEnum { - DeductFromLiableAccount = 'deductFromLiableAccount', - DeductFromOneBalanceAccount = 'deductFromOneBalanceAccount' + DeductFromLiableAccount = 'deductFromLiableAccount', + DeductFromOneBalanceAccount = 'deductFromOneBalanceAccount' } export enum ChargebackEnum { - DeductFromLiableAccount = 'deductFromLiableAccount', - DeductFromOneBalanceAccount = 'deductFromOneBalanceAccount', - DeductAccordingToSplitRatio = 'deductAccordingToSplitRatio' + DeductFromLiableAccount = 'deductFromLiableAccount', + DeductFromOneBalanceAccount = 'deductFromOneBalanceAccount', + DeductAccordingToSplitRatio = 'deductAccordingToSplitRatio' } export enum ChargebackCostAllocationEnum { - DeductFromLiableAccount = 'deductFromLiableAccount', - DeductFromOneBalanceAccount = 'deductFromOneBalanceAccount' + DeductFromLiableAccount = 'deductFromLiableAccount', + DeductFromOneBalanceAccount = 'deductFromOneBalanceAccount' } export enum InterchangeEnum { - DeductFromLiableAccount = 'deductFromLiableAccount', - DeductFromOneBalanceAccount = 'deductFromOneBalanceAccount' + DeductFromLiableAccount = 'deductFromLiableAccount', + DeductFromOneBalanceAccount = 'deductFromOneBalanceAccount' } export enum PaymentFeeEnum { - DeductFromLiableAccount = 'deductFromLiableAccount', - DeductFromOneBalanceAccount = 'deductFromOneBalanceAccount' + DeductFromLiableAccount = 'deductFromLiableAccount', + DeductFromOneBalanceAccount = 'deductFromOneBalanceAccount' } export enum RefundEnum { - DeductFromLiableAccount = 'deductFromLiableAccount', - DeductFromOneBalanceAccount = 'deductFromOneBalanceAccount', - DeductAccordingToSplitRatio = 'deductAccordingToSplitRatio' + DeductFromLiableAccount = 'deductFromLiableAccount', + DeductFromOneBalanceAccount = 'deductFromOneBalanceAccount', + DeductAccordingToSplitRatio = 'deductAccordingToSplitRatio' } export enum RefundCostAllocationEnum { - DeductFromLiableAccount = 'deductFromLiableAccount', - DeductFromOneBalanceAccount = 'deductFromOneBalanceAccount' + DeductFromLiableAccount = 'deductFromLiableAccount', + DeductFromOneBalanceAccount = 'deductFromOneBalanceAccount' } export enum RemainderEnum { - AddToLiableAccount = 'addToLiableAccount', - AddToOneBalanceAccount = 'addToOneBalanceAccount' + AddToLiableAccount = 'addToLiableAccount', + AddToOneBalanceAccount = 'addToOneBalanceAccount' } export enum SchemeFeeEnum { - DeductFromLiableAccount = 'deductFromLiableAccount', - DeductFromOneBalanceAccount = 'deductFromOneBalanceAccount' + DeductFromLiableAccount = 'deductFromLiableAccount', + DeductFromOneBalanceAccount = 'deductFromOneBalanceAccount' } export enum SurchargeEnum { - AddToLiableAccount = 'addToLiableAccount', - AddToOneBalanceAccount = 'addToOneBalanceAccount' + AddToLiableAccount = 'addToLiableAccount', + AddToOneBalanceAccount = 'addToOneBalanceAccount' } export enum TipEnum { - AddToLiableAccount = 'addToLiableAccount', - AddToOneBalanceAccount = 'addToOneBalanceAccount' + AddToLiableAccount = 'addToLiableAccount', + AddToOneBalanceAccount = 'addToOneBalanceAccount' } } diff --git a/src/typings/management/splitConfigurationRule.ts b/src/typings/management/splitConfigurationRule.ts index 04f7921b9..492b5e3bb 100644 --- a/src/typings/management/splitConfigurationRule.ts +++ b/src/typings/management/splitConfigurationRule.ts @@ -73,15 +73,15 @@ export class SplitConfigurationRule { export namespace SplitConfigurationRule { export enum FundingSourceEnum { - Credit = 'credit', - Debit = 'debit', - Any = 'ANY' + Credit = 'credit', + Debit = 'debit', + Any = 'ANY' } export enum ShopperInteractionEnum { - Ecommerce = 'Ecommerce', - ContAuth = 'ContAuth', - Moto = 'Moto', - Pos = 'POS', - Any = 'ANY' + Ecommerce = 'Ecommerce', + ContAuth = 'ContAuth', + Moto = 'Moto', + Pos = 'POS', + Any = 'ANY' } } diff --git a/src/typings/management/starInfo.ts b/src/typings/management/starInfo.ts index 2478771f2..7e85b602a 100644 --- a/src/typings/management/starInfo.ts +++ b/src/typings/management/starInfo.ts @@ -14,7 +14,7 @@ export class StarInfo { * The type of transactions processed over this payment method. Allowed values: - **pos** for in-person payments. - **billpay** for subscription payments, both the initial payment and the later recurring payments. These transactions have `recurringProcessingModel` **Subscription**. - **ecom** for all other card not present transactions. This includes non-recurring transactions and transactions with `recurringProcessingModel` **CardOnFile** or **UnscheduledCardOnFile**. */ 'processingType': StarInfo.ProcessingTypeEnum; - 'transactionDescription'?: TransactionDescriptionInfo | null; + 'transactionDescription'?: TransactionDescriptionInfo; static discriminator: string | undefined = undefined; @@ -27,7 +27,7 @@ export class StarInfo { { "name": "transactionDescription", "baseName": "transactionDescription", - "type": "TransactionDescriptionInfo | null" + "type": "TransactionDescriptionInfo" } ]; static getAttributeTypeMap() { @@ -37,8 +37,8 @@ export class StarInfo { export namespace StarInfo { export enum ProcessingTypeEnum { - Billpay = 'billpay', - Ecom = 'ecom', - Pos = 'pos' + Billpay = 'billpay', + Ecom = 'ecom', + Pos = 'pos' } } diff --git a/src/typings/management/store.ts b/src/typings/management/store.ts index d7fa402ef..f131f8914 100644 --- a/src/typings/management/store.ts +++ b/src/typings/management/store.ts @@ -12,8 +12,8 @@ import { StoreLocation } from './storeLocation'; import { StoreSplitConfiguration } from './storeSplitConfiguration'; export class Store { - '_links'?: Links | null; - 'address'?: StoreLocation | null; + '_links'?: Links; + 'address'?: StoreLocation; /** * The unique identifiers of the [business lines](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/businesslines__resParam_id) that the store is associated with. If not specified, the business line of the merchant account is used. Required when there are multiple business lines under the merchant account. */ @@ -46,7 +46,7 @@ export class Store { * The store name shown on the shopper\'s bank or credit card statement and on the shopper receipt. */ 'shopperStatement'?: string; - 'splitConfiguration'?: StoreSplitConfiguration | null; + 'splitConfiguration'?: StoreSplitConfiguration; /** * The status of the store. Possible values are: - **active**. This value is assigned automatically when a store is created. - **inactive**. The terminals under the store are blocked from accepting new transactions, but capturing outstanding transactions is still possible. - **closed**. This status is irreversible. The terminals under the store are reassigned to the merchant inventory. */ @@ -58,12 +58,12 @@ export class Store { { "name": "_links", "baseName": "_links", - "type": "Links | null" + "type": "Links" }, { "name": "address", "baseName": "address", - "type": "StoreLocation | null" + "type": "StoreLocation" }, { "name": "businessLineIds", @@ -108,7 +108,7 @@ export class Store { { "name": "splitConfiguration", "baseName": "splitConfiguration", - "type": "StoreSplitConfiguration | null" + "type": "StoreSplitConfiguration" }, { "name": "status", @@ -123,8 +123,8 @@ export class Store { export namespace Store { export enum StatusEnum { - Active = 'active', - Closed = 'closed', - Inactive = 'inactive' + Active = 'active', + Closed = 'closed', + Inactive = 'inactive' } } diff --git a/src/typings/management/storeAndForward.ts b/src/typings/management/storeAndForward.ts index 35e5a6536..ad0277051 100644 --- a/src/typings/management/storeAndForward.ts +++ b/src/typings/management/storeAndForward.ts @@ -19,7 +19,7 @@ export class StoreAndForward { * The maximum number of store-and-forward transactions per terminal that you can process while offline. */ 'maxPayments'?: number; - 'supportedCardTypes'?: SupportedCardTypes | null; + 'supportedCardTypes'?: SupportedCardTypes; static discriminator: string | undefined = undefined; @@ -37,7 +37,7 @@ export class StoreAndForward { { "name": "supportedCardTypes", "baseName": "supportedCardTypes", - "type": "SupportedCardTypes | null" + "type": "SupportedCardTypes" } ]; static getAttributeTypeMap() { diff --git a/src/typings/management/storeCreationRequest.ts b/src/typings/management/storeCreationRequest.ts index 1150eb2da..fe14e12d6 100644 --- a/src/typings/management/storeCreationRequest.ts +++ b/src/typings/management/storeCreationRequest.ts @@ -36,7 +36,7 @@ export class StoreCreationRequest { * The store name to be shown on the shopper\'s bank or credit card statement and on the shopper receipt. Maximum length: 22 characters; can\'t be all numbers. */ 'shopperStatement': string; - 'splitConfiguration'?: StoreSplitConfiguration | null; + 'splitConfiguration'?: StoreSplitConfiguration; static discriminator: string | undefined = undefined; @@ -79,7 +79,7 @@ export class StoreCreationRequest { { "name": "splitConfiguration", "baseName": "splitConfiguration", - "type": "StoreSplitConfiguration | null" + "type": "StoreSplitConfiguration" } ]; static getAttributeTypeMap() { diff --git a/src/typings/management/storeCreationWithMerchantCodeRequest.ts b/src/typings/management/storeCreationWithMerchantCodeRequest.ts index 6307bba6d..2f8fc5c7a 100644 --- a/src/typings/management/storeCreationWithMerchantCodeRequest.ts +++ b/src/typings/management/storeCreationWithMerchantCodeRequest.ts @@ -40,7 +40,7 @@ export class StoreCreationWithMerchantCodeRequest { * The store name to be shown on the shopper\'s bank or credit card statement and on the shopper receipt. Maximum length: 22 characters; can\'t be all numbers. */ 'shopperStatement': string; - 'splitConfiguration'?: StoreSplitConfiguration | null; + 'splitConfiguration'?: StoreSplitConfiguration; static discriminator: string | undefined = undefined; @@ -88,7 +88,7 @@ export class StoreCreationWithMerchantCodeRequest { { "name": "splitConfiguration", "baseName": "splitConfiguration", - "type": "StoreSplitConfiguration | null" + "type": "StoreSplitConfiguration" } ]; static getAttributeTypeMap() { diff --git a/src/typings/management/terminal.ts b/src/typings/management/terminal.ts index 915e061f3..2b6a441d8 100644 --- a/src/typings/management/terminal.ts +++ b/src/typings/management/terminal.ts @@ -11,8 +11,8 @@ import { TerminalAssignment } from './terminalAssignment'; import { TerminalConnectivity } from './terminalConnectivity'; export class Terminal { - 'assignment'?: TerminalAssignment | null; - 'connectivity'?: TerminalConnectivity | null; + 'assignment'?: TerminalAssignment; + 'connectivity'?: TerminalConnectivity; /** * The software release currently in use on the terminal. */ @@ -48,12 +48,12 @@ export class Terminal { { "name": "assignment", "baseName": "assignment", - "type": "TerminalAssignment | null" + "type": "TerminalAssignment" }, { "name": "connectivity", "baseName": "connectivity", - "type": "TerminalConnectivity | null" + "type": "TerminalConnectivity" }, { "name": "firmwareVersion", diff --git a/src/typings/management/terminalAssignment.ts b/src/typings/management/terminalAssignment.ts index 246904d4e..d3fd09712 100644 --- a/src/typings/management/terminalAssignment.ts +++ b/src/typings/management/terminalAssignment.ts @@ -18,7 +18,7 @@ export class TerminalAssignment { * The unique identifier of the merchant account to which terminal is assigned. */ 'merchantId'?: string; - 'reassignmentTarget'?: TerminalReassignmentTarget | null; + 'reassignmentTarget'?: TerminalReassignmentTarget; /** * The status of the reassignment. Possible values: * `reassignmentInProgress`: the terminal was boarded and is now scheduled to remove the configuration. Wait for the terminal to synchronize with the Adyen platform. * `deployed`: the terminal is deployed and reassigned. * `inventory`: the terminal is in inventory and cannot process transactions. * `boarded`: the terminal is boarded to a store, or a merchant account representing a store, and can process transactions. */ @@ -44,7 +44,7 @@ export class TerminalAssignment { { "name": "reassignmentTarget", "baseName": "reassignmentTarget", - "type": "TerminalReassignmentTarget | null" + "type": "TerminalReassignmentTarget" }, { "name": "status", @@ -64,9 +64,9 @@ export class TerminalAssignment { export namespace TerminalAssignment { export enum StatusEnum { - Boarded = 'boarded', - Deployed = 'deployed', - Inventory = 'inventory', - ReassignmentInProgress = 'reassignmentInProgress' + Boarded = 'boarded', + Deployed = 'deployed', + Inventory = 'inventory', + ReassignmentInProgress = 'reassignmentInProgress' } } diff --git a/src/typings/management/terminalConnectivity.ts b/src/typings/management/terminalConnectivity.ts index 1f476bcfd..1eca22f06 100644 --- a/src/typings/management/terminalConnectivity.ts +++ b/src/typings/management/terminalConnectivity.ts @@ -13,10 +13,10 @@ import { TerminalConnectivityEthernet } from './terminalConnectivityEthernet'; import { TerminalConnectivityWifi } from './terminalConnectivityWifi'; export class TerminalConnectivity { - 'bluetooth'?: TerminalConnectivityBluetooth | null; - 'cellular'?: TerminalConnectivityCellular | null; - 'ethernet'?: TerminalConnectivityEthernet | null; - 'wifi'?: TerminalConnectivityWifi | null; + 'bluetooth'?: TerminalConnectivityBluetooth; + 'cellular'?: TerminalConnectivityCellular; + 'ethernet'?: TerminalConnectivityEthernet; + 'wifi'?: TerminalConnectivityWifi; static discriminator: string | undefined = undefined; @@ -24,22 +24,22 @@ export class TerminalConnectivity { { "name": "bluetooth", "baseName": "bluetooth", - "type": "TerminalConnectivityBluetooth | null" + "type": "TerminalConnectivityBluetooth" }, { "name": "cellular", "baseName": "cellular", - "type": "TerminalConnectivityCellular | null" + "type": "TerminalConnectivityCellular" }, { "name": "ethernet", "baseName": "ethernet", - "type": "TerminalConnectivityEthernet | null" + "type": "TerminalConnectivityEthernet" }, { "name": "wifi", "baseName": "wifi", - "type": "TerminalConnectivityWifi | null" + "type": "TerminalConnectivityWifi" } ]; static getAttributeTypeMap() { diff --git a/src/typings/management/terminalConnectivityCellular.ts b/src/typings/management/terminalConnectivityCellular.ts index 0c52e9f7c..3ad356920 100644 --- a/src/typings/management/terminalConnectivityCellular.ts +++ b/src/typings/management/terminalConnectivityCellular.ts @@ -48,10 +48,10 @@ export class TerminalConnectivityCellular { export namespace TerminalConnectivityCellular { export enum StatusEnum { - Activated = 'activated', - Deactivated = 'deactivated', - Deprecated = 'deprecated', - Inventory = 'inventory', - ReadyForActivation = 'readyForActivation' + Activated = 'activated', + Deactivated = 'deactivated', + Deprecated = 'deprecated', + Inventory = 'inventory', + ReadyForActivation = 'readyForActivation' } } diff --git a/src/typings/management/terminalOrder.ts b/src/typings/management/terminalOrder.ts index 91acf7edd..b1d1b3115 100644 --- a/src/typings/management/terminalOrder.ts +++ b/src/typings/management/terminalOrder.ts @@ -12,7 +12,7 @@ import { OrderItem } from './orderItem'; import { ShippingLocation } from './shippingLocation'; export class TerminalOrder { - 'billingEntity'?: BillingEntity | null; + 'billingEntity'?: BillingEntity; /** * The merchant-defined purchase order number. This will be printed on the packing list. */ @@ -29,7 +29,7 @@ export class TerminalOrder { * The date and time that the order was placed, in UTC ISO 8601 format. For example, \"2011-12-03T10:15:30Z\". */ 'orderDate'?: string; - 'shippingLocation'?: ShippingLocation | null; + 'shippingLocation'?: ShippingLocation; /** * The processing status of the order. */ @@ -45,7 +45,7 @@ export class TerminalOrder { { "name": "billingEntity", "baseName": "billingEntity", - "type": "BillingEntity | null" + "type": "BillingEntity" }, { "name": "customerOrderReference", @@ -70,7 +70,7 @@ export class TerminalOrder { { "name": "shippingLocation", "baseName": "shippingLocation", - "type": "ShippingLocation | null" + "type": "ShippingLocation" }, { "name": "status", diff --git a/src/typings/management/terminalProduct.ts b/src/typings/management/terminalProduct.ts index 7457d17dd..0186985f5 100644 --- a/src/typings/management/terminalProduct.ts +++ b/src/typings/management/terminalProduct.ts @@ -26,7 +26,7 @@ export class TerminalProduct { * The descriptive name of the product. */ 'name'?: string; - 'price'?: TerminalProductPrice | null; + 'price'?: TerminalProductPrice; static discriminator: string | undefined = undefined; @@ -54,7 +54,7 @@ export class TerminalProduct { { "name": "price", "baseName": "price", - "type": "TerminalProductPrice | null" + "type": "TerminalProductPrice" } ]; static getAttributeTypeMap() { diff --git a/src/typings/management/terminalSettings.ts b/src/typings/management/terminalSettings.ts index 35c17b19e..9c0f310da 100644 --- a/src/typings/management/terminalSettings.ts +++ b/src/typings/management/terminalSettings.ts @@ -31,31 +31,31 @@ import { Timeouts } from './timeouts'; import { WifiProfiles } from './wifiProfiles'; export class TerminalSettings { - 'cardholderReceipt'?: CardholderReceipt | null; - 'connectivity'?: Connectivity | null; + 'cardholderReceipt'?: CardholderReceipt; + 'connectivity'?: Connectivity; /** * Settings for tipping with or without predefined options to choose from. The maximum number of predefined options is four, or three plus the option to enter a custom tip. */ 'gratuities'?: Array | null; - 'hardware'?: Hardware | null; - 'localization'?: Localization | null; - 'nexo'?: Nexo | null; - 'offlineProcessing'?: OfflineProcessing | null; - 'opi'?: Opi | null; - 'passcodes'?: Passcodes | null; - 'payAtTable'?: PayAtTable | null; - 'payment'?: Payment | null; - 'receiptOptions'?: ReceiptOptions | null; - 'receiptPrinting'?: ReceiptPrinting | null; - 'refunds'?: Refunds | null; - 'signature'?: Signature | null; - 'standalone'?: Standalone | null; - 'storeAndForward'?: StoreAndForward | null; - 'surcharge'?: Surcharge | null; - 'tapToPay'?: TapToPay | null; - 'terminalInstructions'?: TerminalInstructions | null; - 'timeouts'?: Timeouts | null; - 'wifiProfiles'?: WifiProfiles | null; + 'hardware'?: Hardware; + 'localization'?: Localization; + 'nexo'?: Nexo; + 'offlineProcessing'?: OfflineProcessing; + 'opi'?: Opi; + 'passcodes'?: Passcodes; + 'payAtTable'?: PayAtTable; + 'payment'?: Payment; + 'receiptOptions'?: ReceiptOptions; + 'receiptPrinting'?: ReceiptPrinting; + 'refunds'?: Refunds; + 'signature'?: Signature; + 'standalone'?: Standalone; + 'storeAndForward'?: StoreAndForward; + 'surcharge'?: Surcharge; + 'tapToPay'?: TapToPay; + 'terminalInstructions'?: TerminalInstructions; + 'timeouts'?: Timeouts; + 'wifiProfiles'?: WifiProfiles; static discriminator: string | undefined = undefined; @@ -63,112 +63,112 @@ export class TerminalSettings { { "name": "cardholderReceipt", "baseName": "cardholderReceipt", - "type": "CardholderReceipt | null" + "type": "CardholderReceipt" }, { "name": "connectivity", "baseName": "connectivity", - "type": "Connectivity | null" + "type": "Connectivity" }, { "name": "gratuities", "baseName": "gratuities", - "type": "Array | null" + "type": "Array" }, { "name": "hardware", "baseName": "hardware", - "type": "Hardware | null" + "type": "Hardware" }, { "name": "localization", "baseName": "localization", - "type": "Localization | null" + "type": "Localization" }, { "name": "nexo", "baseName": "nexo", - "type": "Nexo | null" + "type": "Nexo" }, { "name": "offlineProcessing", "baseName": "offlineProcessing", - "type": "OfflineProcessing | null" + "type": "OfflineProcessing" }, { "name": "opi", "baseName": "opi", - "type": "Opi | null" + "type": "Opi" }, { "name": "passcodes", "baseName": "passcodes", - "type": "Passcodes | null" + "type": "Passcodes" }, { "name": "payAtTable", "baseName": "payAtTable", - "type": "PayAtTable | null" + "type": "PayAtTable" }, { "name": "payment", "baseName": "payment", - "type": "Payment | null" + "type": "Payment" }, { "name": "receiptOptions", "baseName": "receiptOptions", - "type": "ReceiptOptions | null" + "type": "ReceiptOptions" }, { "name": "receiptPrinting", "baseName": "receiptPrinting", - "type": "ReceiptPrinting | null" + "type": "ReceiptPrinting" }, { "name": "refunds", "baseName": "refunds", - "type": "Refunds | null" + "type": "Refunds" }, { "name": "signature", "baseName": "signature", - "type": "Signature | null" + "type": "Signature" }, { "name": "standalone", "baseName": "standalone", - "type": "Standalone | null" + "type": "Standalone" }, { "name": "storeAndForward", "baseName": "storeAndForward", - "type": "StoreAndForward | null" + "type": "StoreAndForward" }, { "name": "surcharge", "baseName": "surcharge", - "type": "Surcharge | null" + "type": "Surcharge" }, { "name": "tapToPay", "baseName": "tapToPay", - "type": "TapToPay | null" + "type": "TapToPay" }, { "name": "terminalInstructions", "baseName": "terminalInstructions", - "type": "TerminalInstructions | null" + "type": "TerminalInstructions" }, { "name": "timeouts", "baseName": "timeouts", - "type": "Timeouts | null" + "type": "Timeouts" }, { "name": "wifiProfiles", "baseName": "wifiProfiles", - "type": "WifiProfiles | null" + "type": "WifiProfiles" } ]; static getAttributeTypeMap() { diff --git a/src/typings/management/testCompanyWebhookRequest.ts b/src/typings/management/testCompanyWebhookRequest.ts index 972e1a129..2c6512cd8 100644 --- a/src/typings/management/testCompanyWebhookRequest.ts +++ b/src/typings/management/testCompanyWebhookRequest.ts @@ -14,7 +14,7 @@ export class TestCompanyWebhookRequest { * List of `merchantId` values for which test webhooks will be sent. The list can have a maximum of 20 `merchantId` values. If not specified, we send sample notifications to all the merchant accounts that the webhook is configured for. If this is more than 20 merchant accounts, use this list to specify a subset of the merchant accounts for which to send test notifications. */ 'merchantIds'?: Array; - 'notification'?: CustomNotification | null; + 'notification'?: CustomNotification; /** * List of event codes for which to send test notifications. Only the webhook types below are supported. Possible values if webhook `type`: **standard**: * **AUTHORISATION** * **CHARGEBACK_REVERSED** * **ORDER_CLOSED** * **ORDER_OPENED** * **PAIDOUT_REVERSED** * **PAYOUT_THIRDPARTY** * **REFUNDED_REVERSED** * **REFUND_WITH_DATA** * **REPORT_AVAILABLE** * **CUSTOM** - set your custom notification fields in the [`notification`](https://docs.adyen.com/api-explorer/#/ManagementService/v1/post/companies/{companyId}/webhooks/{webhookId}/test__reqParam_notification) object. Possible values if webhook `type`: **banktransfer-notification**: * **PENDING** Possible values if webhook `type`: **report-notification**: * **REPORT_AVAILABLE** Possible values if webhook `type`: **ideal-notification**: * **AUTHORISATION** Possible values if webhook `type`: **pending-notification**: * **PENDING** */ @@ -31,7 +31,7 @@ export class TestCompanyWebhookRequest { { "name": "notification", "baseName": "notification", - "type": "CustomNotification | null" + "type": "CustomNotification" }, { "name": "types", diff --git a/src/typings/management/testWebhookRequest.ts b/src/typings/management/testWebhookRequest.ts index 9f0349a44..7d3eeaa07 100644 --- a/src/typings/management/testWebhookRequest.ts +++ b/src/typings/management/testWebhookRequest.ts @@ -10,7 +10,7 @@ import { CustomNotification } from './customNotification'; export class TestWebhookRequest { - 'notification'?: CustomNotification | null; + 'notification'?: CustomNotification; /** * List of event codes for which to send test notifications. Only the webhook types below are supported. Possible values if webhook `type`: **standard**: * **AUTHORISATION** * **CHARGEBACK_REVERSED** * **ORDER_CLOSED** * **ORDER_OPENED** * **PAIDOUT_REVERSED** * **PAYOUT_THIRDPARTY** * **REFUNDED_REVERSED** * **REFUND_WITH_DATA** * **REPORT_AVAILABLE** * **CUSTOM** - set your custom notification fields in the [`notification`](https://docs.adyen.com/api-explorer/#/ManagementService/v1/post/companies/{companyId}/webhooks/{webhookId}/test__reqParam_notification) object. Possible values if webhook `type`: **banktransfer-notification**: * **PENDING** Possible values if webhook `type`: **report-notification**: * **REPORT_AVAILABLE** Possible values if webhook `type`: **ideal-notification**: * **AUTHORISATION** Possible values if webhook `type`: **pending-notification**: * **PENDING** */ @@ -22,7 +22,7 @@ export class TestWebhookRequest { { "name": "notification", "baseName": "notification", - "type": "CustomNotification | null" + "type": "CustomNotification" }, { "name": "types", diff --git a/src/typings/management/transactionDescriptionInfo.ts b/src/typings/management/transactionDescriptionInfo.ts index 6c571914f..1e02b177a 100644 --- a/src/typings/management/transactionDescriptionInfo.ts +++ b/src/typings/management/transactionDescriptionInfo.ts @@ -16,7 +16,7 @@ export class TransactionDescriptionInfo { /** * The type of transaction description you want to use: - **fixed**: The transaction description set in this request is used for all payments with this payment method. - **append**: The transaction description set in this request is used as a base for all payments with this payment method. The [transaction description set in the request to process the payment](https://docs.adyen.com/api-explorer/Checkout/70/post/sessions#request-shopperStatement) is appended to this base description. Note that if the combined length exceeds 22 characters, banks may truncate the string. - **dynamic**: Only the [transaction description set in the request to process the payment](https://docs.adyen.com/api-explorer/Checkout/70/post/sessions#request-shopperStatement) is used for payments with this payment method. */ - 'type'?: TransactionDescriptionInfo.TypeEnum; + 'type'?: TransactionDescriptionInfo.TypeEnum = TransactionDescriptionInfo.TypeEnum.Dynamic; static discriminator: string | undefined = undefined; @@ -39,8 +39,8 @@ export class TransactionDescriptionInfo { export namespace TransactionDescriptionInfo { export enum TypeEnum { - Append = 'append', - Dynamic = 'dynamic', - Fixed = 'fixed' + Append = 'append', + Dynamic = 'dynamic', + Fixed = 'fixed' } } diff --git a/src/typings/management/uninstallAndroidAppDetails.ts b/src/typings/management/uninstallAndroidAppDetails.ts index 2279217f9..d10d2ba63 100644 --- a/src/typings/management/uninstallAndroidAppDetails.ts +++ b/src/typings/management/uninstallAndroidAppDetails.ts @@ -16,7 +16,7 @@ export class UninstallAndroidAppDetails { /** * Type of terminal action: Uninstall an Android app. */ - 'type'?: UninstallAndroidAppDetails.TypeEnum; + 'type'?: UninstallAndroidAppDetails.TypeEnum = UninstallAndroidAppDetails.TypeEnum.UninstallAndroidApp; static discriminator: string | undefined = undefined; @@ -39,6 +39,6 @@ export class UninstallAndroidAppDetails { export namespace UninstallAndroidAppDetails { export enum TypeEnum { - UninstallAndroidApp = 'UninstallAndroidApp' + UninstallAndroidApp = 'UninstallAndroidApp' } } diff --git a/src/typings/management/uninstallAndroidCertificateDetails.ts b/src/typings/management/uninstallAndroidCertificateDetails.ts index 429058201..cb545598d 100644 --- a/src/typings/management/uninstallAndroidCertificateDetails.ts +++ b/src/typings/management/uninstallAndroidCertificateDetails.ts @@ -16,7 +16,7 @@ export class UninstallAndroidCertificateDetails { /** * Type of terminal action: Uninstall an Android certificate. */ - 'type'?: UninstallAndroidCertificateDetails.TypeEnum; + 'type'?: UninstallAndroidCertificateDetails.TypeEnum = UninstallAndroidCertificateDetails.TypeEnum.UninstallAndroidCertificate; static discriminator: string | undefined = undefined; @@ -39,6 +39,6 @@ export class UninstallAndroidCertificateDetails { export namespace UninstallAndroidCertificateDetails { export enum TypeEnum { - UninstallAndroidCertificate = 'UninstallAndroidCertificate' + UninstallAndroidCertificate = 'UninstallAndroidCertificate' } } diff --git a/src/typings/management/updateCompanyUserRequest.ts b/src/typings/management/updateCompanyUserRequest.ts index 6139d9912..9bf63764e 100644 --- a/src/typings/management/updateCompanyUserRequest.ts +++ b/src/typings/management/updateCompanyUserRequest.ts @@ -30,7 +30,7 @@ export class UpdateCompanyUserRequest { * The requested login method for the user. To use SSO, you must already have SSO configured with Adyen before creating the user. Possible values: **Username & account**, **Email**, or **SSO** */ 'loginMethod'?: string; - 'name'?: Name2 | null; + 'name'?: Name2; /** * The list of [roles](https://docs.adyen.com/account/user-roles) for this user. */ @@ -71,7 +71,7 @@ export class UpdateCompanyUserRequest { { "name": "name", "baseName": "name", - "type": "Name2 | null" + "type": "Name2" }, { "name": "roles", diff --git a/src/typings/management/updateCompanyWebhookRequest.ts b/src/typings/management/updateCompanyWebhookRequest.ts index 9b128a088..f89e1be5e 100644 --- a/src/typings/management/updateCompanyWebhookRequest.ts +++ b/src/typings/management/updateCompanyWebhookRequest.ts @@ -26,7 +26,7 @@ export class UpdateCompanyWebhookRequest { * Indicates if the webhook configuration is active. The field must be **true** for us to send webhooks about events related an account. */ 'active'?: boolean; - 'additionalSettings'?: AdditionalSettings | null; + 'additionalSettings'?: AdditionalSettings; /** * Format or protocol for receiving webhooks. Possible values: * **soap** * **http** * **json** */ @@ -94,7 +94,7 @@ export class UpdateCompanyWebhookRequest { { "name": "additionalSettings", "baseName": "additionalSettings", - "type": "AdditionalSettings | null" + "type": "AdditionalSettings" }, { "name": "communicationFormat", @@ -154,22 +154,22 @@ export class UpdateCompanyWebhookRequest { export namespace UpdateCompanyWebhookRequest { export enum CommunicationFormatEnum { - Http = 'http', - Json = 'json', - Soap = 'soap' + Http = 'http', + Json = 'json', + Soap = 'soap' } export enum EncryptionProtocolEnum { - Http = 'HTTP', - Tlsv12 = 'TLSv1.2', - Tlsv13 = 'TLSv1.3' + Http = 'HTTP', + Tlsv12 = 'TLSv1.2', + Tlsv13 = 'TLSv1.3' } export enum FilterMerchantAccountTypeEnum { - AllAccounts = 'allAccounts', - ExcludeAccounts = 'excludeAccounts', - IncludeAccounts = 'includeAccounts' + AllAccounts = 'allAccounts', + ExcludeAccounts = 'excludeAccounts', + IncludeAccounts = 'includeAccounts' } export enum NetworkTypeEnum { - Local = 'local', - Public = 'public' + Local = 'local', + Public = 'public' } } diff --git a/src/typings/management/updateMerchantUserRequest.ts b/src/typings/management/updateMerchantUserRequest.ts index 4ab1c66f0..5cb20c3c5 100644 --- a/src/typings/management/updateMerchantUserRequest.ts +++ b/src/typings/management/updateMerchantUserRequest.ts @@ -26,7 +26,7 @@ export class UpdateMerchantUserRequest { * The requested login method for the user. To use SSO, you must already have SSO configured with Adyen before creating the user. Possible values: **Username & account**, **Email**, or **SSO** */ 'loginMethod'?: string; - 'name'?: Name2 | null; + 'name'?: Name2; /** * The list of [roles](https://docs.adyen.com/account/user-roles) for this user. */ @@ -62,7 +62,7 @@ export class UpdateMerchantUserRequest { { "name": "name", "baseName": "name", - "type": "Name2 | null" + "type": "Name2" }, { "name": "roles", diff --git a/src/typings/management/updateMerchantWebhookRequest.ts b/src/typings/management/updateMerchantWebhookRequest.ts index ed3e6eeb6..b754e5a8b 100644 --- a/src/typings/management/updateMerchantWebhookRequest.ts +++ b/src/typings/management/updateMerchantWebhookRequest.ts @@ -26,7 +26,7 @@ export class UpdateMerchantWebhookRequest { * Indicates if the webhook configuration is active. The field must be **true** for us to send webhooks about events related an account. */ 'active'?: boolean; - 'additionalSettings'?: AdditionalSettings | null; + 'additionalSettings'?: AdditionalSettings; /** * Format or protocol for receiving webhooks. Possible values: * **soap** * **http** * **json** */ @@ -86,7 +86,7 @@ export class UpdateMerchantWebhookRequest { { "name": "additionalSettings", "baseName": "additionalSettings", - "type": "AdditionalSettings | null" + "type": "AdditionalSettings" }, { "name": "communicationFormat", @@ -136,17 +136,17 @@ export class UpdateMerchantWebhookRequest { export namespace UpdateMerchantWebhookRequest { export enum CommunicationFormatEnum { - Http = 'http', - Json = 'json', - Soap = 'soap' + Http = 'http', + Json = 'json', + Soap = 'soap' } export enum EncryptionProtocolEnum { - Http = 'HTTP', - Tlsv12 = 'TLSv1.2', - Tlsv13 = 'TLSv1.3' + Http = 'HTTP', + Tlsv12 = 'TLSv1.2', + Tlsv13 = 'TLSv1.3' } export enum NetworkTypeEnum { - Local = 'local', - Public = 'public' + Local = 'local', + Public = 'public' } } diff --git a/src/typings/management/updatePaymentMethodInfo.ts b/src/typings/management/updatePaymentMethodInfo.ts index c514bc96d..913bc464a 100644 --- a/src/typings/management/updatePaymentMethodInfo.ts +++ b/src/typings/management/updatePaymentMethodInfo.ts @@ -16,14 +16,14 @@ import { PulseInfo } from './pulseInfo'; import { StarInfo } from './starInfo'; export class UpdatePaymentMethodInfo { - 'accel'?: AccelInfo | null; - 'bcmc'?: BcmcInfo | null; - 'cartesBancaires'?: CartesBancairesInfo | null; + 'accel'?: AccelInfo; + 'bcmc'?: BcmcInfo; + 'cartesBancaires'?: CartesBancairesInfo; /** * The list of countries where a payment method is available. By default, all countries supported by the payment method. */ 'countries'?: Array; - 'cup'?: GenericPmWithTdiInfo | null; + 'cup'?: GenericPmWithTdiInfo; /** * The list of currencies that a payment method supports. By default, all currencies supported by the payment method. */ @@ -32,23 +32,23 @@ export class UpdatePaymentMethodInfo { * Custom routing flags for acquirer routing. */ 'customRoutingFlags'?: Array; - 'diners'?: GenericPmWithTdiInfo | null; - 'discover'?: GenericPmWithTdiInfo | null; - 'eft_directdebit_CA'?: GenericPmWithTdiInfo | null; - 'eftpos_australia'?: GenericPmWithTdiInfo | null; + 'diners'?: GenericPmWithTdiInfo; + 'discover'?: GenericPmWithTdiInfo; + 'eft_directdebit_CA'?: GenericPmWithTdiInfo; + 'eftpos_australia'?: GenericPmWithTdiInfo; /** * Indicates whether the payment method is enabled (**true**) or disabled (**false**). */ 'enabled'?: boolean; - 'girocard'?: GenericPmWithTdiInfo | null; - 'ideal'?: GenericPmWithTdiInfo | null; - 'interac_card'?: GenericPmWithTdiInfo | null; - 'jcb'?: GenericPmWithTdiInfo | null; - 'maestro'?: GenericPmWithTdiInfo | null; - 'mc'?: GenericPmWithTdiInfo | null; - 'nyce'?: NyceInfo | null; - 'pulse'?: PulseInfo | null; - 'star'?: StarInfo | null; + 'girocard'?: GenericPmWithTdiInfo; + 'ideal'?: GenericPmWithTdiInfo; + 'interac_card'?: GenericPmWithTdiInfo; + 'jcb'?: GenericPmWithTdiInfo; + 'maestro'?: GenericPmWithTdiInfo; + 'mc'?: GenericPmWithTdiInfo; + 'nyce'?: NyceInfo; + 'pulse'?: PulseInfo; + 'star'?: StarInfo; /** * The store for this payment method */ @@ -60,7 +60,7 @@ export class UpdatePaymentMethodInfo { * Use `storeId` instead. Only one store per payment method is allowed. */ 'storeIds'?: Array; - 'visa'?: GenericPmWithTdiInfo | null; + 'visa'?: GenericPmWithTdiInfo; static discriminator: string | undefined = undefined; @@ -68,17 +68,17 @@ export class UpdatePaymentMethodInfo { { "name": "accel", "baseName": "accel", - "type": "AccelInfo | null" + "type": "AccelInfo" }, { "name": "bcmc", "baseName": "bcmc", - "type": "BcmcInfo | null" + "type": "BcmcInfo" }, { "name": "cartesBancaires", "baseName": "cartesBancaires", - "type": "CartesBancairesInfo | null" + "type": "CartesBancairesInfo" }, { "name": "countries", @@ -88,7 +88,7 @@ export class UpdatePaymentMethodInfo { { "name": "cup", "baseName": "cup", - "type": "GenericPmWithTdiInfo | null" + "type": "GenericPmWithTdiInfo" }, { "name": "currencies", @@ -103,22 +103,22 @@ export class UpdatePaymentMethodInfo { { "name": "diners", "baseName": "diners", - "type": "GenericPmWithTdiInfo | null" + "type": "GenericPmWithTdiInfo" }, { "name": "discover", "baseName": "discover", - "type": "GenericPmWithTdiInfo | null" + "type": "GenericPmWithTdiInfo" }, { "name": "eft_directdebit_CA", "baseName": "eft_directdebit_CA", - "type": "GenericPmWithTdiInfo | null" + "type": "GenericPmWithTdiInfo" }, { "name": "eftpos_australia", "baseName": "eftpos_australia", - "type": "GenericPmWithTdiInfo | null" + "type": "GenericPmWithTdiInfo" }, { "name": "enabled", @@ -128,47 +128,47 @@ export class UpdatePaymentMethodInfo { { "name": "girocard", "baseName": "girocard", - "type": "GenericPmWithTdiInfo | null" + "type": "GenericPmWithTdiInfo" }, { "name": "ideal", "baseName": "ideal", - "type": "GenericPmWithTdiInfo | null" + "type": "GenericPmWithTdiInfo" }, { "name": "interac_card", "baseName": "interac_card", - "type": "GenericPmWithTdiInfo | null" + "type": "GenericPmWithTdiInfo" }, { "name": "jcb", "baseName": "jcb", - "type": "GenericPmWithTdiInfo | null" + "type": "GenericPmWithTdiInfo" }, { "name": "maestro", "baseName": "maestro", - "type": "GenericPmWithTdiInfo | null" + "type": "GenericPmWithTdiInfo" }, { "name": "mc", "baseName": "mc", - "type": "GenericPmWithTdiInfo | null" + "type": "GenericPmWithTdiInfo" }, { "name": "nyce", "baseName": "nyce", - "type": "NyceInfo | null" + "type": "NyceInfo" }, { "name": "pulse", "baseName": "pulse", - "type": "PulseInfo | null" + "type": "PulseInfo" }, { "name": "star", "baseName": "star", - "type": "StarInfo | null" + "type": "StarInfo" }, { "name": "storeId", @@ -183,7 +183,7 @@ export class UpdatePaymentMethodInfo { { "name": "visa", "baseName": "visa", - "type": "GenericPmWithTdiInfo | null" + "type": "GenericPmWithTdiInfo" } ]; static getAttributeTypeMap() { diff --git a/src/typings/management/updateSplitConfigurationLogicRequest.ts b/src/typings/management/updateSplitConfigurationLogicRequest.ts index c19006942..68aa4eea9 100644 --- a/src/typings/management/updateSplitConfigurationLogicRequest.ts +++ b/src/typings/management/updateSplitConfigurationLogicRequest.ts @@ -15,7 +15,7 @@ export class UpdateSplitConfigurationLogicRequest { * Deducts the acquiring fees (the aggregated amount of interchange and scheme fee) from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. */ 'acquiringFees'?: UpdateSplitConfigurationLogicRequest.AcquiringFeesEnum; - 'additionalCommission'?: AdditionalCommission | null; + 'additionalCommission'?: AdditionalCommission; /** * Deducts the transaction fee due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/guides/payments-training-guide/get-the-best-from-your-card-processing) from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. */ @@ -85,7 +85,7 @@ export class UpdateSplitConfigurationLogicRequest { { "name": "additionalCommission", "baseName": "additionalCommission", - "type": "AdditionalCommission | null" + "type": "AdditionalCommission" }, { "name": "adyenCommission", @@ -170,61 +170,61 @@ export class UpdateSplitConfigurationLogicRequest { export namespace UpdateSplitConfigurationLogicRequest { export enum AcquiringFeesEnum { - DeductFromLiableAccount = 'deductFromLiableAccount', - DeductFromOneBalanceAccount = 'deductFromOneBalanceAccount' + DeductFromLiableAccount = 'deductFromLiableAccount', + DeductFromOneBalanceAccount = 'deductFromOneBalanceAccount' } export enum AdyenCommissionEnum { - DeductFromLiableAccount = 'deductFromLiableAccount', - DeductFromOneBalanceAccount = 'deductFromOneBalanceAccount' + DeductFromLiableAccount = 'deductFromLiableAccount', + DeductFromOneBalanceAccount = 'deductFromOneBalanceAccount' } export enum AdyenFeesEnum { - DeductFromLiableAccount = 'deductFromLiableAccount', - DeductFromOneBalanceAccount = 'deductFromOneBalanceAccount' + DeductFromLiableAccount = 'deductFromLiableAccount', + DeductFromOneBalanceAccount = 'deductFromOneBalanceAccount' } export enum AdyenMarkupEnum { - DeductFromLiableAccount = 'deductFromLiableAccount', - DeductFromOneBalanceAccount = 'deductFromOneBalanceAccount' + DeductFromLiableAccount = 'deductFromLiableAccount', + DeductFromOneBalanceAccount = 'deductFromOneBalanceAccount' } export enum ChargebackEnum { - DeductFromLiableAccount = 'deductFromLiableAccount', - DeductFromOneBalanceAccount = 'deductFromOneBalanceAccount', - DeductAccordingToSplitRatio = 'deductAccordingToSplitRatio' + DeductFromLiableAccount = 'deductFromLiableAccount', + DeductFromOneBalanceAccount = 'deductFromOneBalanceAccount', + DeductAccordingToSplitRatio = 'deductAccordingToSplitRatio' } export enum ChargebackCostAllocationEnum { - DeductFromLiableAccount = 'deductFromLiableAccount', - DeductFromOneBalanceAccount = 'deductFromOneBalanceAccount' + DeductFromLiableAccount = 'deductFromLiableAccount', + DeductFromOneBalanceAccount = 'deductFromOneBalanceAccount' } export enum InterchangeEnum { - DeductFromLiableAccount = 'deductFromLiableAccount', - DeductFromOneBalanceAccount = 'deductFromOneBalanceAccount' + DeductFromLiableAccount = 'deductFromLiableAccount', + DeductFromOneBalanceAccount = 'deductFromOneBalanceAccount' } export enum PaymentFeeEnum { - DeductFromLiableAccount = 'deductFromLiableAccount', - DeductFromOneBalanceAccount = 'deductFromOneBalanceAccount' + DeductFromLiableAccount = 'deductFromLiableAccount', + DeductFromOneBalanceAccount = 'deductFromOneBalanceAccount' } export enum RefundEnum { - DeductFromLiableAccount = 'deductFromLiableAccount', - DeductFromOneBalanceAccount = 'deductFromOneBalanceAccount', - DeductAccordingToSplitRatio = 'deductAccordingToSplitRatio' + DeductFromLiableAccount = 'deductFromLiableAccount', + DeductFromOneBalanceAccount = 'deductFromOneBalanceAccount', + DeductAccordingToSplitRatio = 'deductAccordingToSplitRatio' } export enum RefundCostAllocationEnum { - DeductFromLiableAccount = 'deductFromLiableAccount', - DeductFromOneBalanceAccount = 'deductFromOneBalanceAccount' + DeductFromLiableAccount = 'deductFromLiableAccount', + DeductFromOneBalanceAccount = 'deductFromOneBalanceAccount' } export enum RemainderEnum { - AddToLiableAccount = 'addToLiableAccount', - AddToOneBalanceAccount = 'addToOneBalanceAccount' + AddToLiableAccount = 'addToLiableAccount', + AddToOneBalanceAccount = 'addToOneBalanceAccount' } export enum SchemeFeeEnum { - DeductFromLiableAccount = 'deductFromLiableAccount', - DeductFromOneBalanceAccount = 'deductFromOneBalanceAccount' + DeductFromLiableAccount = 'deductFromLiableAccount', + DeductFromOneBalanceAccount = 'deductFromOneBalanceAccount' } export enum SurchargeEnum { - AddToLiableAccount = 'addToLiableAccount', - AddToOneBalanceAccount = 'addToOneBalanceAccount' + AddToLiableAccount = 'addToLiableAccount', + AddToOneBalanceAccount = 'addToOneBalanceAccount' } export enum TipEnum { - AddToLiableAccount = 'addToLiableAccount', - AddToOneBalanceAccount = 'addToOneBalanceAccount' + AddToLiableAccount = 'addToLiableAccount', + AddToOneBalanceAccount = 'addToOneBalanceAccount' } } diff --git a/src/typings/management/updateStoreRequest.ts b/src/typings/management/updateStoreRequest.ts index 58a127f55..74ad9666b 100644 --- a/src/typings/management/updateStoreRequest.ts +++ b/src/typings/management/updateStoreRequest.ts @@ -11,7 +11,7 @@ import { StoreSplitConfiguration } from './storeSplitConfiguration'; import { UpdatableAddress } from './updatableAddress'; export class UpdateStoreRequest { - 'address'?: UpdatableAddress | null; + 'address'?: UpdatableAddress; /** * The unique identifiers of the [business lines](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/businessLines__resParam_id) that the store is associated with. */ @@ -28,7 +28,7 @@ export class UpdateStoreRequest { * The phone number of the store, including \'+\' and country code in the [E.164](https://en.wikipedia.org/wiki/E.164) format. If passed in a different format, we convert and validate the phone number against E.164. */ 'phoneNumber'?: string; - 'splitConfiguration'?: StoreSplitConfiguration | null; + 'splitConfiguration'?: StoreSplitConfiguration; /** * The status of the store. Possible values are: - **active**: This value is assigned automatically when a store is created. - **inactive**: The maximum [transaction limits and number of Store-and-Forward transactions](https://docs.adyen.com/point-of-sale/determine-account-structure/configure-features#payment-features) for the store are set to 0. This blocks new transactions, but captures are still possible. - **closed**: The terminals of the store are reassigned to the merchant inventory, so they can\'t process payments. You can change the status from **active** to **inactive**, and from **inactive** to **active** or **closed**. Once **closed**, a store can\'t be reopened. */ @@ -40,7 +40,7 @@ export class UpdateStoreRequest { { "name": "address", "baseName": "address", - "type": "UpdatableAddress | null" + "type": "UpdatableAddress" }, { "name": "businessLineIds", @@ -65,7 +65,7 @@ export class UpdateStoreRequest { { "name": "splitConfiguration", "baseName": "splitConfiguration", - "type": "StoreSplitConfiguration | null" + "type": "StoreSplitConfiguration" }, { "name": "status", @@ -80,8 +80,8 @@ export class UpdateStoreRequest { export namespace UpdateStoreRequest { export enum StatusEnum { - Active = 'active', - Closed = 'closed', - Inactive = 'inactive' + Active = 'active', + Closed = 'closed', + Inactive = 'inactive' } } diff --git a/src/typings/management/user.ts b/src/typings/management/user.ts index 2fe9210bf..dac67b658 100644 --- a/src/typings/management/user.ts +++ b/src/typings/management/user.ts @@ -11,7 +11,7 @@ import { Links } from './links'; import { Name } from './name'; export class User { - '_links'?: Links | null; + '_links'?: Links; /** * The list of [account groups](https://docs.adyen.com/account/account-structure#account-groups) associated with this user. */ @@ -32,7 +32,7 @@ export class User { * The unique identifier of the user. */ 'id': string; - 'name'?: Name | null; + 'name'?: Name; /** * The list of [roles](https://docs.adyen.com/account/user-roles) for this user. */ @@ -52,7 +52,7 @@ export class User { { "name": "_links", "baseName": "_links", - "type": "Links | null" + "type": "Links" }, { "name": "accountGroups", @@ -82,7 +82,7 @@ export class User { { "name": "name", "baseName": "name", - "type": "Name | null" + "type": "Name" }, { "name": "roles", diff --git a/src/typings/management/webhook.ts b/src/typings/management/webhook.ts index 201ccfe19..23e02d255 100644 --- a/src/typings/management/webhook.ts +++ b/src/typings/management/webhook.ts @@ -11,7 +11,7 @@ import { AdditionalSettingsResponse } from './additionalSettingsResponse'; import { WebhookLinks } from './webhookLinks'; export class Webhook { - '_links'?: WebhookLinks | null; + '_links'?: WebhookLinks; /** * Indicates if expired SSL certificates are accepted. Default value: **false**. */ @@ -32,7 +32,7 @@ export class Webhook { * Indicates if the webhook configuration is active. The field must be **true** for you to receive webhooks about events related an account. */ 'active': boolean; - 'additionalSettings'?: AdditionalSettingsResponse | null; + 'additionalSettings'?: AdditionalSettingsResponse; /** * The alias of our SSL certificate. When you receive a notification from us, the alias from the HMAC signature will match this alias. */ @@ -100,7 +100,7 @@ export class Webhook { { "name": "_links", "baseName": "_links", - "type": "WebhookLinks | null" + "type": "WebhookLinks" }, { "name": "acceptsExpiredCertificate", @@ -130,7 +130,7 @@ export class Webhook { { "name": "additionalSettings", "baseName": "additionalSettings", - "type": "AdditionalSettingsResponse | null" + "type": "AdditionalSettingsResponse" }, { "name": "certificateAlias", @@ -215,22 +215,22 @@ export class Webhook { export namespace Webhook { export enum CommunicationFormatEnum { - Http = 'http', - Json = 'json', - Soap = 'soap' + Http = 'http', + Json = 'json', + Soap = 'soap' } export enum EncryptionProtocolEnum { - Http = 'HTTP', - Tlsv12 = 'TLSv1.2', - Tlsv13 = 'TLSv1.3' + Http = 'HTTP', + Tlsv12 = 'TLSv1.2', + Tlsv13 = 'TLSv1.3' } export enum FilterMerchantAccountTypeEnum { - AllAccounts = 'allAccounts', - ExcludeAccounts = 'excludeAccounts', - IncludeAccounts = 'includeAccounts' + AllAccounts = 'allAccounts', + ExcludeAccounts = 'excludeAccounts', + IncludeAccounts = 'includeAccounts' } export enum NetworkTypeEnum { - Local = 'local', - Public = 'public' + Local = 'local', + Public = 'public' } } diff --git a/src/typings/management/webhookLinks.ts b/src/typings/management/webhookLinks.ts index 66a76f232..5e9a85ea9 100644 --- a/src/typings/management/webhookLinks.ts +++ b/src/typings/management/webhookLinks.ts @@ -10,9 +10,9 @@ import { LinksElement } from './linksElement'; export class WebhookLinks { - 'company'?: LinksElement | null; + 'company'?: LinksElement; 'generateHmac': LinksElement; - 'merchant'?: LinksElement | null; + 'merchant'?: LinksElement; 'self': LinksElement; 'testWebhook': LinksElement; @@ -22,7 +22,7 @@ export class WebhookLinks { { "name": "company", "baseName": "company", - "type": "LinksElement | null" + "type": "LinksElement" }, { "name": "generateHmac", @@ -32,7 +32,7 @@ export class WebhookLinks { { "name": "merchant", "baseName": "merchant", - "type": "LinksElement | null" + "type": "LinksElement" }, { "name": "self", diff --git a/src/typings/management/wifiProfiles.ts b/src/typings/management/wifiProfiles.ts index d38a836f8..cd5bdbc74 100644 --- a/src/typings/management/wifiProfiles.ts +++ b/src/typings/management/wifiProfiles.ts @@ -15,7 +15,7 @@ export class WifiProfiles { * List of remote Wi-Fi profiles. */ 'profiles'?: Array; - 'settings'?: Settings | null; + 'settings'?: Settings; static discriminator: string | undefined = undefined; @@ -28,7 +28,7 @@ export class WifiProfiles { { "name": "settings", "baseName": "settings", - "type": "Settings | null" + "type": "Settings" } ]; static getAttributeTypeMap() { diff --git a/src/typings/managementWebhooks/capabilityProblem.ts b/src/typings/managementWebhooks/capabilityProblem.ts index 46f963ae9..49542de0d 100644 --- a/src/typings/managementWebhooks/capabilityProblem.ts +++ b/src/typings/managementWebhooks/capabilityProblem.ts @@ -11,7 +11,7 @@ import { CapabilityProblemEntity } from './capabilityProblemEntity'; import { VerificationError } from './verificationError'; export class CapabilityProblem { - 'entity'?: CapabilityProblemEntity | null; + 'entity'?: CapabilityProblemEntity; /** * List of verification errors. */ @@ -23,7 +23,7 @@ export class CapabilityProblem { { "name": "entity", "baseName": "entity", - "type": "CapabilityProblemEntity | null" + "type": "CapabilityProblemEntity" }, { "name": "verificationErrors", diff --git a/src/typings/managementWebhooks/capabilityProblemEntity.ts b/src/typings/managementWebhooks/capabilityProblemEntity.ts index d4dd5f457..b5a83a6b6 100644 --- a/src/typings/managementWebhooks/capabilityProblemEntity.ts +++ b/src/typings/managementWebhooks/capabilityProblemEntity.ts @@ -18,7 +18,7 @@ export class CapabilityProblemEntity { * The ID of the entity. */ 'id'?: string; - 'owner'?: CapabilityProblemEntityRecursive | null; + 'owner'?: CapabilityProblemEntityRecursive; /** * The type of entity. Possible values: **LegalEntity**, **BankAccount**, or **Document**. */ @@ -40,7 +40,7 @@ export class CapabilityProblemEntity { { "name": "owner", "baseName": "owner", - "type": "CapabilityProblemEntityRecursive | null" + "type": "CapabilityProblemEntityRecursive" }, { "name": "type", @@ -55,8 +55,8 @@ export class CapabilityProblemEntity { export namespace CapabilityProblemEntity { export enum TypeEnum { - BankAccount = 'BankAccount', - Document = 'Document', - LegalEntity = 'LegalEntity' + BankAccount = 'BankAccount', + Document = 'Document', + LegalEntity = 'LegalEntity' } } diff --git a/src/typings/managementWebhooks/capabilityProblemEntityRecursive.ts b/src/typings/managementWebhooks/capabilityProblemEntityRecursive.ts index 824eaaa8b..5a57b7845 100644 --- a/src/typings/managementWebhooks/capabilityProblemEntityRecursive.ts +++ b/src/typings/managementWebhooks/capabilityProblemEntityRecursive.ts @@ -48,8 +48,8 @@ export class CapabilityProblemEntityRecursive { export namespace CapabilityProblemEntityRecursive { export enum TypeEnum { - BankAccount = 'BankAccount', - Document = 'Document', - LegalEntity = 'LegalEntity' + BankAccount = 'BankAccount', + Document = 'Document', + LegalEntity = 'LegalEntity' } } diff --git a/src/typings/managementWebhooks/merchantCreatedNotificationRequest.ts b/src/typings/managementWebhooks/merchantCreatedNotificationRequest.ts index c52b3c72e..244a9b319 100644 --- a/src/typings/managementWebhooks/merchantCreatedNotificationRequest.ts +++ b/src/typings/managementWebhooks/merchantCreatedNotificationRequest.ts @@ -55,6 +55,6 @@ export class MerchantCreatedNotificationRequest { export namespace MerchantCreatedNotificationRequest { export enum TypeEnum { - MerchantCreated = 'merchant.created' + MerchantCreated = 'merchant.created' } } diff --git a/src/typings/managementWebhooks/merchantUpdatedNotificationRequest.ts b/src/typings/managementWebhooks/merchantUpdatedNotificationRequest.ts index da7b7a5e5..c5d2f7726 100644 --- a/src/typings/managementWebhooks/merchantUpdatedNotificationRequest.ts +++ b/src/typings/managementWebhooks/merchantUpdatedNotificationRequest.ts @@ -55,6 +55,6 @@ export class MerchantUpdatedNotificationRequest { export namespace MerchantUpdatedNotificationRequest { export enum TypeEnum { - MerchantUpdated = 'merchant.updated' + MerchantUpdated = 'merchant.updated' } } diff --git a/src/typings/managementWebhooks/midServiceNotificationData.ts b/src/typings/managementWebhooks/midServiceNotificationData.ts index 5a0f8dd9c..cb4e192f2 100644 --- a/src/typings/managementWebhooks/midServiceNotificationData.ts +++ b/src/typings/managementWebhooks/midServiceNotificationData.ts @@ -102,16 +102,16 @@ export class MidServiceNotificationData { export namespace MidServiceNotificationData { export enum StatusEnum { - Success = 'success', - Failure = 'failure', - CapabilityPending = 'capabilityPending', - DataRequired = 'dataRequired', - UpdatesExpected = 'updatesExpected' + Success = 'success', + Failure = 'failure', + CapabilityPending = 'capabilityPending', + DataRequired = 'dataRequired', + UpdatesExpected = 'updatesExpected' } export enum VerificationStatusEnum { - Valid = 'valid', - Pending = 'pending', - Invalid = 'invalid', - Rejected = 'rejected' + Valid = 'valid', + Pending = 'pending', + Invalid = 'invalid', + Rejected = 'rejected' } } diff --git a/src/typings/managementWebhooks/models.ts b/src/typings/managementWebhooks/models.ts index 2974510ec..13a323923 100644 --- a/src/typings/managementWebhooks/models.ts +++ b/src/typings/managementWebhooks/models.ts @@ -1,12 +1,4 @@ -/* - * The version of the OpenAPI document: v3 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - +import localVarRequest from 'request'; export * from './accountCapabilityData'; export * from './accountCreateNotificationData'; @@ -34,6 +26,18 @@ export * from './terminalSettingsNotificationResponse'; export * from './verificationError'; export * from './verificationErrorRecursive'; +import * as fs from 'fs'; + +export interface RequestDetailedFile { + value: Buffer; + options?: { + filename?: string; + contentType?: string; + } +} + +export type RequestFile = string | Buffer | fs.ReadStream | RequestDetailedFile; + import { AccountCapabilityData } from './accountCapabilityData'; import { AccountCreateNotificationData } from './accountCreateNotificationData'; @@ -118,6 +122,23 @@ let typeMap: {[index: string]: any} = { "VerificationErrorRecursive": VerificationErrorRecursive, } +// Check if a string starts with another string without using es6 features +function startsWith(str: string, match: string): boolean { + return str.substring(0, match.length) === match; +} + +// Check if a string ends with another string without using es6 features +function endsWith(str: string, match: string): boolean { + return str.length >= match.length && str.substring(str.length - match.length) === match; +} + +const nullableSuffix = " | null"; +const optionalSuffix = " | undefined"; +const arrayPrefix = "Array<"; +const arraySuffix = ">"; +const mapPrefix = "{ [key: string]: "; +const mapSuffix = "; }"; + export class ObjectSerializer { public static findCorrectType(data: any, expectedType: string) { if (data == undefined) { @@ -154,25 +175,37 @@ export class ObjectSerializer { } } - public static serialize(data: any, type: string) { + public static serialize(data: any, type: string): any { if (data == undefined) { return data; } else if (primitives.indexOf(type.toLowerCase()) !== -1) { return data; - } else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6 - let subType: string = type.replace("Array<", ""); // Array => Type> - subType = subType.substring(0, subType.length - 1); // Type> => Type + } else if (endsWith(type, nullableSuffix)) { + let subType: string = type.slice(0, -nullableSuffix.length); // Type | null => Type + return ObjectSerializer.serialize(data, subType); + } else if (endsWith(type, optionalSuffix)) { + let subType: string = type.slice(0, -optionalSuffix.length); // Type | undefined => Type + return ObjectSerializer.serialize(data, subType); + } else if (startsWith(type, arrayPrefix)) { + let subType: string = type.slice(arrayPrefix.length, -arraySuffix.length); // Array => Type let transformedData: any[] = []; for (let index = 0; index < data.length; index++) { let datum = data[index]; transformedData.push(ObjectSerializer.serialize(datum, subType)); } return transformedData; + } else if (startsWith(type, mapPrefix)) { + let subType: string = type.slice(mapPrefix.length, -mapSuffix.length); // { [key: string]: Type; } => Type + let transformedData: { [key: string]: any } = {}; + for (let key in data) { + transformedData[key] = ObjectSerializer.serialize( + data[key], + subType, + ); + } + return transformedData; } else if (type === "Date") { return data.toISOString(); - } else if (type === "SaleToAcquirerData") { - const dataString = JSON.stringify(data); - return Buffer.from(dataString).toString("base64"); } else { if (enumsMap[type]) { return data; @@ -195,22 +228,37 @@ export class ObjectSerializer { } } - public static deserialize(data: any, type: string) { + public static deserialize(data: any, type: string): any { // polymorphism may change the actual type. type = ObjectSerializer.findCorrectType(data, type); if (data == undefined) { return data; } else if (primitives.indexOf(type.toLowerCase()) !== -1) { return data; - } else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6 - let subType: string = type.replace("Array<", ""); // Array => Type> - subType = subType.substring(0, subType.length - 1); // Type> => Type + } else if (endsWith(type, nullableSuffix)) { + let subType: string = type.slice(0, -nullableSuffix.length); // Type | null => Type + return ObjectSerializer.deserialize(data, subType); + } else if (endsWith(type, optionalSuffix)) { + let subType: string = type.slice(0, -optionalSuffix.length); // Type | undefined => Type + return ObjectSerializer.deserialize(data, subType); + } else if (startsWith(type, arrayPrefix)) { + let subType: string = type.slice(arrayPrefix.length, -arraySuffix.length); // Array => Type let transformedData: any[] = []; for (let index = 0; index < data.length; index++) { let datum = data[index]; transformedData.push(ObjectSerializer.deserialize(datum, subType)); } return transformedData; + } else if (startsWith(type, mapPrefix)) { + let subType: string = type.slice(mapPrefix.length, -mapSuffix.length); // { [key: string]: Type; } => Type + let transformedData: { [key: string]: any } = {}; + for (let key in data) { + transformedData[key] = ObjectSerializer.deserialize( + data[key], + subType, + ); + } + return transformedData; } else if (type === "Date") { return new Date(data); } else { @@ -231,3 +279,77 @@ export class ObjectSerializer { } } } + +export interface Authentication { + /** + * Apply authentication settings to header and query params. + */ + applyToRequest(requestOptions: localVarRequest.Options): Promise | void; +} + +export class HttpBasicAuth implements Authentication { + public username: string = ''; + public password: string = ''; + + applyToRequest(requestOptions: localVarRequest.Options): void { + requestOptions.auth = { + username: this.username, password: this.password + } + } +} + +export class HttpBearerAuth implements Authentication { + public accessToken: string | (() => string) = ''; + + applyToRequest(requestOptions: localVarRequest.Options): void { + if (requestOptions && requestOptions.headers) { + const accessToken = typeof this.accessToken === 'function' + ? this.accessToken() + : this.accessToken; + requestOptions.headers["Authorization"] = "Bearer " + accessToken; + } + } +} + +export class ApiKeyAuth implements Authentication { + public apiKey: string = ''; + + constructor(private location: string, private paramName: string) { + } + + applyToRequest(requestOptions: localVarRequest.Options): void { + if (this.location == "query") { + (requestOptions.qs)[this.paramName] = this.apiKey; + } else if (this.location == "header" && requestOptions && requestOptions.headers) { + requestOptions.headers[this.paramName] = this.apiKey; + } else if (this.location == 'cookie' && requestOptions && requestOptions.headers) { + if (requestOptions.headers['Cookie']) { + requestOptions.headers['Cookie'] += '; ' + this.paramName + '=' + encodeURIComponent(this.apiKey); + } + else { + requestOptions.headers['Cookie'] = this.paramName + '=' + encodeURIComponent(this.apiKey); + } + } + } +} + +export class OAuth implements Authentication { + public accessToken: string = ''; + + applyToRequest(requestOptions: localVarRequest.Options): void { + if (requestOptions && requestOptions.headers) { + requestOptions.headers["Authorization"] = "Bearer " + this.accessToken; + } + } +} + +export class VoidAuth implements Authentication { + public username: string = ''; + public password: string = ''; + + applyToRequest(_: localVarRequest.Options): void { + // Do nothing + } +} + +export type Interceptor = (requestOptions: localVarRequest.Options) => (Promise | void); diff --git a/src/typings/managementWebhooks/paymentMethodCreatedNotificationRequest.ts b/src/typings/managementWebhooks/paymentMethodCreatedNotificationRequest.ts index 9be4385f1..9ab95185e 100644 --- a/src/typings/managementWebhooks/paymentMethodCreatedNotificationRequest.ts +++ b/src/typings/managementWebhooks/paymentMethodCreatedNotificationRequest.ts @@ -55,6 +55,6 @@ export class PaymentMethodCreatedNotificationRequest { export namespace PaymentMethodCreatedNotificationRequest { export enum TypeEnum { - PaymentMethodCreated = 'paymentMethod.created' + PaymentMethodCreated = 'paymentMethod.created' } } diff --git a/src/typings/managementWebhooks/paymentMethodRequestRemovedNotificationRequest.ts b/src/typings/managementWebhooks/paymentMethodRequestRemovedNotificationRequest.ts index 57aab1cc6..73be064b1 100644 --- a/src/typings/managementWebhooks/paymentMethodRequestRemovedNotificationRequest.ts +++ b/src/typings/managementWebhooks/paymentMethodRequestRemovedNotificationRequest.ts @@ -55,6 +55,6 @@ export class PaymentMethodRequestRemovedNotificationRequest { export namespace PaymentMethodRequestRemovedNotificationRequest { export enum TypeEnum { - PaymentMethodRequestRemoved = 'paymentMethodRequest.removed' + PaymentMethodRequestRemoved = 'paymentMethodRequest.removed' } } diff --git a/src/typings/managementWebhooks/paymentMethodScheduledForRemovalNotificationRequest.ts b/src/typings/managementWebhooks/paymentMethodScheduledForRemovalNotificationRequest.ts index 243fb19d8..1301a02a8 100644 --- a/src/typings/managementWebhooks/paymentMethodScheduledForRemovalNotificationRequest.ts +++ b/src/typings/managementWebhooks/paymentMethodScheduledForRemovalNotificationRequest.ts @@ -55,6 +55,6 @@ export class PaymentMethodScheduledForRemovalNotificationRequest { export namespace PaymentMethodScheduledForRemovalNotificationRequest { export enum TypeEnum { - PaymentMethodRequestScheduledForRemoval = 'paymentMethodRequest.scheduledForRemoval' + PaymentMethodRequestScheduledForRemoval = 'paymentMethodRequest.scheduledForRemoval' } } diff --git a/src/typings/managementWebhooks/terminalBoardingNotificationRequest.ts b/src/typings/managementWebhooks/terminalBoardingNotificationRequest.ts index beee76e71..4e972a1bc 100644 --- a/src/typings/managementWebhooks/terminalBoardingNotificationRequest.ts +++ b/src/typings/managementWebhooks/terminalBoardingNotificationRequest.ts @@ -55,6 +55,6 @@ export class TerminalBoardingNotificationRequest { export namespace TerminalBoardingNotificationRequest { export enum TypeEnum { - TerminalBoardingTriggered = 'terminalBoarding.triggered' + TerminalBoardingTriggered = 'terminalBoarding.triggered' } } diff --git a/src/typings/managementWebhooks/terminalSettingsData.ts b/src/typings/managementWebhooks/terminalSettingsData.ts index 3655a0400..c07deb384 100644 --- a/src/typings/managementWebhooks/terminalSettingsData.ts +++ b/src/typings/managementWebhooks/terminalSettingsData.ts @@ -75,7 +75,7 @@ export class TerminalSettingsData { export namespace TerminalSettingsData { export enum UpdateSourceEnum { - CustomerArea = 'Customer Area', - ManagementApi = 'Management Api' + CustomerArea = 'Customer Area', + ManagementApi = 'Management Api' } } diff --git a/src/typings/managementWebhooks/terminalSettingsNotificationRequest.ts b/src/typings/managementWebhooks/terminalSettingsNotificationRequest.ts index 312a77589..60a89ed0f 100644 --- a/src/typings/managementWebhooks/terminalSettingsNotificationRequest.ts +++ b/src/typings/managementWebhooks/terminalSettingsNotificationRequest.ts @@ -55,6 +55,6 @@ export class TerminalSettingsNotificationRequest { export namespace TerminalSettingsNotificationRequest { export enum TypeEnum { - TerminalSettingsModified = 'terminalSettings.modified' + TerminalSettingsModified = 'terminalSettings.modified' } } diff --git a/src/typings/managementWebhooks/verificationError.ts b/src/typings/managementWebhooks/verificationError.ts index 1a13dccb8..65befe9d6 100644 --- a/src/typings/managementWebhooks/verificationError.ts +++ b/src/typings/managementWebhooks/verificationError.ts @@ -68,8 +68,8 @@ export class VerificationError { export namespace VerificationError { export enum TypeEnum { - DataMissing = 'dataMissing', - InvalidInput = 'invalidInput', - PendingStatus = 'pendingStatus' + DataMissing = 'dataMissing', + InvalidInput = 'invalidInput', + PendingStatus = 'pendingStatus' } } diff --git a/src/typings/managementWebhooks/verificationErrorRecursive.ts b/src/typings/managementWebhooks/verificationErrorRecursive.ts index 763c72b75..d3f44ede2 100644 --- a/src/typings/managementWebhooks/verificationErrorRecursive.ts +++ b/src/typings/managementWebhooks/verificationErrorRecursive.ts @@ -58,8 +58,8 @@ export class VerificationErrorRecursive { export namespace VerificationErrorRecursive { export enum TypeEnum { - DataMissing = 'dataMissing', - InvalidInput = 'invalidInput', - PendingStatus = 'pendingStatus' + DataMissing = 'dataMissing', + InvalidInput = 'invalidInput', + PendingStatus = 'pendingStatus' } } diff --git a/src/typings/negativeBalanceWarningWebhooks/models.ts b/src/typings/negativeBalanceWarningWebhooks/models.ts index b4faef79a..1e4ebb6ab 100644 --- a/src/typings/negativeBalanceWarningWebhooks/models.ts +++ b/src/typings/negativeBalanceWarningWebhooks/models.ts @@ -1,12 +1,4 @@ -/* - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - +import localVarRequest from 'request'; export * from './amount'; export * from './negativeBalanceCompensationWarningNotificationData'; @@ -14,6 +6,18 @@ export * from './negativeBalanceCompensationWarningNotificationRequest'; export * from './resource'; export * from './resourceReference'; +import * as fs from 'fs'; + +export interface RequestDetailedFile { + value: Buffer; + options?: { + filename?: string; + contentType?: string; + } +} + +export type RequestFile = string | Buffer | fs.ReadStream | RequestDetailedFile; + import { Amount } from './amount'; import { NegativeBalanceCompensationWarningNotificationData } from './negativeBalanceCompensationWarningNotificationData'; @@ -45,6 +49,23 @@ let typeMap: {[index: string]: any} = { "ResourceReference": ResourceReference, } +// Check if a string starts with another string without using es6 features +function startsWith(str: string, match: string): boolean { + return str.substring(0, match.length) === match; +} + +// Check if a string ends with another string without using es6 features +function endsWith(str: string, match: string): boolean { + return str.length >= match.length && str.substring(str.length - match.length) === match; +} + +const nullableSuffix = " | null"; +const optionalSuffix = " | undefined"; +const arrayPrefix = "Array<"; +const arraySuffix = ">"; +const mapPrefix = "{ [key: string]: "; +const mapSuffix = "; }"; + export class ObjectSerializer { public static findCorrectType(data: any, expectedType: string) { if (data == undefined) { @@ -81,25 +102,37 @@ export class ObjectSerializer { } } - public static serialize(data: any, type: string) { + public static serialize(data: any, type: string): any { if (data == undefined) { return data; } else if (primitives.indexOf(type.toLowerCase()) !== -1) { return data; - } else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6 - let subType: string = type.replace("Array<", ""); // Array => Type> - subType = subType.substring(0, subType.length - 1); // Type> => Type + } else if (endsWith(type, nullableSuffix)) { + let subType: string = type.slice(0, -nullableSuffix.length); // Type | null => Type + return ObjectSerializer.serialize(data, subType); + } else if (endsWith(type, optionalSuffix)) { + let subType: string = type.slice(0, -optionalSuffix.length); // Type | undefined => Type + return ObjectSerializer.serialize(data, subType); + } else if (startsWith(type, arrayPrefix)) { + let subType: string = type.slice(arrayPrefix.length, -arraySuffix.length); // Array => Type let transformedData: any[] = []; for (let index = 0; index < data.length; index++) { let datum = data[index]; transformedData.push(ObjectSerializer.serialize(datum, subType)); } return transformedData; + } else if (startsWith(type, mapPrefix)) { + let subType: string = type.slice(mapPrefix.length, -mapSuffix.length); // { [key: string]: Type; } => Type + let transformedData: { [key: string]: any } = {}; + for (let key in data) { + transformedData[key] = ObjectSerializer.serialize( + data[key], + subType, + ); + } + return transformedData; } else if (type === "Date") { return data.toISOString(); - } else if (type === "SaleToAcquirerData") { - const dataString = JSON.stringify(data); - return Buffer.from(dataString).toString("base64"); } else { if (enumsMap[type]) { return data; @@ -122,22 +155,37 @@ export class ObjectSerializer { } } - public static deserialize(data: any, type: string) { + public static deserialize(data: any, type: string): any { // polymorphism may change the actual type. type = ObjectSerializer.findCorrectType(data, type); if (data == undefined) { return data; } else if (primitives.indexOf(type.toLowerCase()) !== -1) { return data; - } else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6 - let subType: string = type.replace("Array<", ""); // Array => Type> - subType = subType.substring(0, subType.length - 1); // Type> => Type + } else if (endsWith(type, nullableSuffix)) { + let subType: string = type.slice(0, -nullableSuffix.length); // Type | null => Type + return ObjectSerializer.deserialize(data, subType); + } else if (endsWith(type, optionalSuffix)) { + let subType: string = type.slice(0, -optionalSuffix.length); // Type | undefined => Type + return ObjectSerializer.deserialize(data, subType); + } else if (startsWith(type, arrayPrefix)) { + let subType: string = type.slice(arrayPrefix.length, -arraySuffix.length); // Array => Type let transformedData: any[] = []; for (let index = 0; index < data.length; index++) { let datum = data[index]; transformedData.push(ObjectSerializer.deserialize(datum, subType)); } return transformedData; + } else if (startsWith(type, mapPrefix)) { + let subType: string = type.slice(mapPrefix.length, -mapSuffix.length); // { [key: string]: Type; } => Type + let transformedData: { [key: string]: any } = {}; + for (let key in data) { + transformedData[key] = ObjectSerializer.deserialize( + data[key], + subType, + ); + } + return transformedData; } else if (type === "Date") { return new Date(data); } else { @@ -158,3 +206,77 @@ export class ObjectSerializer { } } } + +export interface Authentication { + /** + * Apply authentication settings to header and query params. + */ + applyToRequest(requestOptions: localVarRequest.Options): Promise | void; +} + +export class HttpBasicAuth implements Authentication { + public username: string = ''; + public password: string = ''; + + applyToRequest(requestOptions: localVarRequest.Options): void { + requestOptions.auth = { + username: this.username, password: this.password + } + } +} + +export class HttpBearerAuth implements Authentication { + public accessToken: string | (() => string) = ''; + + applyToRequest(requestOptions: localVarRequest.Options): void { + if (requestOptions && requestOptions.headers) { + const accessToken = typeof this.accessToken === 'function' + ? this.accessToken() + : this.accessToken; + requestOptions.headers["Authorization"] = "Bearer " + accessToken; + } + } +} + +export class ApiKeyAuth implements Authentication { + public apiKey: string = ''; + + constructor(private location: string, private paramName: string) { + } + + applyToRequest(requestOptions: localVarRequest.Options): void { + if (this.location == "query") { + (requestOptions.qs)[this.paramName] = this.apiKey; + } else if (this.location == "header" && requestOptions && requestOptions.headers) { + requestOptions.headers[this.paramName] = this.apiKey; + } else if (this.location == 'cookie' && requestOptions && requestOptions.headers) { + if (requestOptions.headers['Cookie']) { + requestOptions.headers['Cookie'] += '; ' + this.paramName + '=' + encodeURIComponent(this.apiKey); + } + else { + requestOptions.headers['Cookie'] = this.paramName + '=' + encodeURIComponent(this.apiKey); + } + } + } +} + +export class OAuth implements Authentication { + public accessToken: string = ''; + + applyToRequest(requestOptions: localVarRequest.Options): void { + if (requestOptions && requestOptions.headers) { + requestOptions.headers["Authorization"] = "Bearer " + this.accessToken; + } + } +} + +export class VoidAuth implements Authentication { + public username: string = ''; + public password: string = ''; + + applyToRequest(_: localVarRequest.Options): void { + // Do nothing + } +} + +export type Interceptor = (requestOptions: localVarRequest.Options) => (Promise | void); diff --git a/src/typings/negativeBalanceWarningWebhooks/negativeBalanceCompensationWarningNotificationData.ts b/src/typings/negativeBalanceWarningWebhooks/negativeBalanceCompensationWarningNotificationData.ts index 63ce72785..512c6feed 100644 --- a/src/typings/negativeBalanceWarningWebhooks/negativeBalanceCompensationWarningNotificationData.ts +++ b/src/typings/negativeBalanceWarningWebhooks/negativeBalanceCompensationWarningNotificationData.ts @@ -11,8 +11,8 @@ import { Amount } from './amount'; import { ResourceReference } from './resourceReference'; export class NegativeBalanceCompensationWarningNotificationData { - 'accountHolder'?: ResourceReference | null; - 'amount'?: Amount | null; + 'accountHolder'?: ResourceReference; + 'amount'?: Amount; /** * The unique identifier of the balance platform. */ @@ -44,12 +44,12 @@ export class NegativeBalanceCompensationWarningNotificationData { { "name": "accountHolder", "baseName": "accountHolder", - "type": "ResourceReference | null" + "type": "ResourceReference" }, { "name": "amount", "baseName": "amount", - "type": "Amount | null" + "type": "Amount" }, { "name": "balancePlatform", diff --git a/src/typings/negativeBalanceWarningWebhooks/negativeBalanceCompensationWarningNotificationRequest.ts b/src/typings/negativeBalanceWarningWebhooks/negativeBalanceCompensationWarningNotificationRequest.ts index e44e15a88..0672eeca2 100644 --- a/src/typings/negativeBalanceWarningWebhooks/negativeBalanceCompensationWarningNotificationRequest.ts +++ b/src/typings/negativeBalanceWarningWebhooks/negativeBalanceCompensationWarningNotificationRequest.ts @@ -55,6 +55,6 @@ export class NegativeBalanceCompensationWarningNotificationRequest { export namespace NegativeBalanceCompensationWarningNotificationRequest { export enum TypeEnum { - BalancePlatformNegativeBalanceCompensationWarningScheduled = 'balancePlatform.negativeBalanceCompensationWarning.scheduled' + BalancePlatformNegativeBalanceCompensationWarningScheduled = 'balancePlatform.negativeBalanceCompensationWarning.scheduled' } } diff --git a/src/typings/payment/accountInfo.ts b/src/typings/payment/accountInfo.ts index bdc79d3f4..765fd6a2f 100644 --- a/src/typings/payment/accountInfo.ts +++ b/src/typings/payment/accountInfo.ts @@ -201,41 +201,41 @@ export class AccountInfo { export namespace AccountInfo { export enum AccountAgeIndicatorEnum { - NotApplicable = 'notApplicable', - ThisTransaction = 'thisTransaction', - LessThan30Days = 'lessThan30Days', - From30To60Days = 'from30To60Days', - MoreThan60Days = 'moreThan60Days' + NotApplicable = 'notApplicable', + ThisTransaction = 'thisTransaction', + LessThan30Days = 'lessThan30Days', + From30To60Days = 'from30To60Days', + MoreThan60Days = 'moreThan60Days' } export enum AccountChangeIndicatorEnum { - ThisTransaction = 'thisTransaction', - LessThan30Days = 'lessThan30Days', - From30To60Days = 'from30To60Days', - MoreThan60Days = 'moreThan60Days' + ThisTransaction = 'thisTransaction', + LessThan30Days = 'lessThan30Days', + From30To60Days = 'from30To60Days', + MoreThan60Days = 'moreThan60Days' } export enum AccountTypeEnum { - NotApplicable = 'notApplicable', - Credit = 'credit', - Debit = 'debit' + NotApplicable = 'notApplicable', + Credit = 'credit', + Debit = 'debit' } export enum DeliveryAddressUsageIndicatorEnum { - ThisTransaction = 'thisTransaction', - LessThan30Days = 'lessThan30Days', - From30To60Days = 'from30To60Days', - MoreThan60Days = 'moreThan60Days' + ThisTransaction = 'thisTransaction', + LessThan30Days = 'lessThan30Days', + From30To60Days = 'from30To60Days', + MoreThan60Days = 'moreThan60Days' } export enum PasswordChangeIndicatorEnum { - NotApplicable = 'notApplicable', - ThisTransaction = 'thisTransaction', - LessThan30Days = 'lessThan30Days', - From30To60Days = 'from30To60Days', - MoreThan60Days = 'moreThan60Days' + NotApplicable = 'notApplicable', + ThisTransaction = 'thisTransaction', + LessThan30Days = 'lessThan30Days', + From30To60Days = 'from30To60Days', + MoreThan60Days = 'moreThan60Days' } export enum PaymentAccountIndicatorEnum { - NotApplicable = 'notApplicable', - ThisTransaction = 'thisTransaction', - LessThan30Days = 'lessThan30Days', - From30To60Days = 'from30To60Days', - MoreThan60Days = 'moreThan60Days' + NotApplicable = 'notApplicable', + ThisTransaction = 'thisTransaction', + LessThan30Days = 'lessThan30Days', + From30To60Days = 'from30To60Days', + MoreThan60Days = 'moreThan60Days' } } diff --git a/src/typings/payment/acctInfo.ts b/src/typings/payment/acctInfo.ts index 0c5b1847e..1a13bba39 100644 --- a/src/typings/payment/acctInfo.ts +++ b/src/typings/payment/acctInfo.ts @@ -165,44 +165,44 @@ export class AcctInfo { export namespace AcctInfo { export enum ChAccAgeIndEnum { - _01 = '01', - _02 = '02', - _03 = '03', - _04 = '04', - _05 = '05' + _01 = '01', + _02 = '02', + _03 = '03', + _04 = '04', + _05 = '05' } export enum ChAccChangeIndEnum { - _01 = '01', - _02 = '02', - _03 = '03', - _04 = '04' + _01 = '01', + _02 = '02', + _03 = '03', + _04 = '04' } export enum ChAccPwChangeIndEnum { - _01 = '01', - _02 = '02', - _03 = '03', - _04 = '04', - _05 = '05' + _01 = '01', + _02 = '02', + _03 = '03', + _04 = '04', + _05 = '05' } export enum PaymentAccIndEnum { - _01 = '01', - _02 = '02', - _03 = '03', - _04 = '04', - _05 = '05' + _01 = '01', + _02 = '02', + _03 = '03', + _04 = '04', + _05 = '05' } export enum ShipAddressUsageIndEnum { - _01 = '01', - _02 = '02', - _03 = '03', - _04 = '04' + _01 = '01', + _02 = '02', + _03 = '03', + _04 = '04' } export enum ShipNameIndicatorEnum { - _01 = '01', - _02 = '02' + _01 = '01', + _02 = '02' } export enum SuspiciousAccActivityEnum { - _01 = '01', - _02 = '02' + _01 = '01', + _02 = '02' } } diff --git a/src/typings/payment/additionalData3DSecure.ts b/src/typings/payment/additionalData3DSecure.ts index 12335ff29..95337fead 100644 --- a/src/typings/payment/additionalData3DSecure.ts +++ b/src/typings/payment/additionalData3DSecure.ts @@ -75,10 +75,10 @@ export class AdditionalData3DSecure { export namespace AdditionalData3DSecure { export enum ChallengeWindowSizeEnum { - _01 = '01', - _02 = '02', - _03 = '03', - _04 = '04', - _05 = '05' + _01 = '01', + _02 = '02', + _03 = '03', + _04 = '04', + _05 = '05' } } diff --git a/src/typings/payment/additionalDataCommon.ts b/src/typings/payment/additionalDataCommon.ts index 8dd2103ac..05d2b30a9 100644 --- a/src/typings/payment/additionalDataCommon.ts +++ b/src/typings/payment/additionalDataCommon.ts @@ -183,7 +183,7 @@ export class AdditionalDataCommon { export namespace AdditionalDataCommon { export enum IndustryUsageEnum { - NoShow = 'NoShow', - DelayedCharge = 'DelayedCharge' + NoShow = 'NoShow', + DelayedCharge = 'DelayedCharge' } } diff --git a/src/typings/payment/additionalDataLevel23.ts b/src/typings/payment/additionalDataLevel23.ts index 1fa269185..963c2a9de 100644 --- a/src/typings/payment/additionalDataLevel23.ts +++ b/src/typings/payment/additionalDataLevel23.ts @@ -10,7 +10,7 @@ export class AdditionalDataLevel23 { /** - * The customer code. * Encoding: ASCII * Max length: 25 characters * Must not start with a space or be all spaces * Must not be all zeros. + * The reference number to identify the customer and their order. * Encoding: ASCII * Max length: 25 characters * Must not start with a space or be all spaces. * Must not be all zeros. */ 'enhancedSchemeData_customerReference'?: string; /** @@ -18,27 +18,27 @@ export class AdditionalDataLevel23 { */ 'enhancedSchemeData_destinationCountryCode'?: string; /** - * The postal code of the destination address. * Encoding: ASCII * Max length: 10 characters * Must not start with a space + * The postal code of the destination address. * Encoding: ASCII * Max length: 10 characters * Must not start with a space. * For the US, it must be in five or nine digits format. For example, 10001 or 10001-0000. * For Canada, it must be in 6 digits format. For example, M4B 1G5. */ 'enhancedSchemeData_destinationPostalCode'?: string; /** - * Destination state or province code. * Encoding: ASCII * Max length: 3 characters * Must not start with a space + * The state or province code of the destination address. * Encoding: ASCII * Max length: 3 characters * Must not start with a space. */ 'enhancedSchemeData_destinationStateProvinceCode'?: string; /** - * The duty amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means USD 20.00. * Encoding: Numeric * Max length: 12 characters + * The duty tax amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means USD 20.00. * Encoding: Numeric * Max length: 12 characters */ 'enhancedSchemeData_dutyAmount'?: string; /** - * The shipping amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means USD 20.00. * Encoding: Numeric *Max length: 12 characters + * The shipping amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means USD 20.00. * Encoding: Numeric * Max length: 12 characters */ 'enhancedSchemeData_freightAmount'?: string; /** - * The [UNSPC commodity code](https://www.unspsc.org/) of the item. * Encoding: ASCII * Max length: 12 characters * Must not start with a space or be all spaces * Must not be all zeros. + * The code that identifies the item in a standardized commodity coding scheme. There are different commodity coding schemes: * [UNSPSC commodity codes](https://www.unspsc.org/) * [HS commodity codes](https://www.wcoomd.org/en/topics/nomenclature/overview.aspx) * [NAICS commodity codes](https://www.census.gov/naics/) * [NAPCS commodity codes](https://www.census.gov/naics/napcs/) * Encoding: ASCII * Max length: 12 characters * Must not start with a space or be all spaces. * Must not be all zeros. */ 'enhancedSchemeData_itemDetailLine_itemNr_commodityCode'?: string; /** - * A description of the item. * Encoding: ASCII * Max length: 26 characters * Must not start with a space or be all spaces * Must not be all zeros. + * A description of the item. * Encoding: ASCII * Max length: 26 characters * Must not be a single character. * Must not be blank. * Must not start with a space or be all spaces. * Must not be all zeros. */ 'enhancedSchemeData_itemDetailLine_itemNr_description'?: string; /** @@ -46,19 +46,19 @@ export class AdditionalDataLevel23 { */ 'enhancedSchemeData_itemDetailLine_itemNr_discountAmount'?: string; /** - * The product code. * Encoding: ASCII. * Max length: 12 characters * Must not start with a space or be all spaces * Must not be all zeros. + * The product code. Must be a unique product code associated with the item or service. This can be your unique code for the item, or the manufacturer\'s product code. * Encoding: ASCII. * Max length: 12 characters * Must not start with a space or be all spaces. * Must not be all zeros. */ 'enhancedSchemeData_itemDetailLine_itemNr_productCode'?: string; /** - * The number of items. Must be an integer greater than zero. * Encoding: Numeric * Max length: 12 characters * Must not start with a space or be all spaces + * The number of items. Must be an integer greater than zero. * Encoding: Numeric * Max length: 12 characters * Must not start with a space or be all spaces. */ 'enhancedSchemeData_itemDetailLine_itemNr_quantity'?: string; /** - * The total amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means USD 20.00. * Max length: 12 characters * Must not start with a space or be all spaces * Must not be all zeros. + * The total amount for the line item, in [minor units](https://docs.adyen.com/development-resources/currency-codes). See [Amount requirements for level 2/3 ESD](https://docs.adyen.com//payment-methods/cards/enhanced-scheme-data/l2-l3#amount-requirements) to learn more about how to calculate the line item total. * For example, 2000 means USD 20.00. * Max length: 12 characters * Must not start with a space or be all spaces. * Must not be all zeros. */ 'enhancedSchemeData_itemDetailLine_itemNr_totalAmount'?: string; /** - * The unit of measurement for an item. * Encoding: ASCII Max length: 3 characters * Must not start with a space or be all spaces * Must not be all zeros. + * The unit of measurement for an item. * Encoding: ASCII * Max length: 3 characters * Must not start with a space or be all spaces. * Must not be all zeros. */ 'enhancedSchemeData_itemDetailLine_itemNr_unitOfMeasure'?: string; /** @@ -70,11 +70,11 @@ export class AdditionalDataLevel23 { */ 'enhancedSchemeData_orderDate'?: string; /** - * The postal code of the address the item is shipped from. * Encoding: ASCII * Max length: 10 characters * Must not start with a space or be all spaces * Must not be all zeros. + * The postal code of the address where the item is shipped from. * Encoding: ASCII * Max length: 10 characters * Must not start with a space or be all spaces. * Must not be all zeros.For the US, it must be in five or nine digits format. For example, 10001 or 10001-0000. * For Canada, it must be in 6 digits format. For example, M4B 1G5. */ 'enhancedSchemeData_shipFromPostalCode'?: string; /** - * The total tax amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means USD 20.00. *Encoding: Numeric *Max length: 12 characters * Must not be all zeros. + * The amount of state or provincial [tax included in the total transaction amount](https://docs.adyen.com/payment-methods/cards/enhanced-scheme-data/l2-l3#requirements-to-send-level-2-3-esd), in [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means USD 20.00. * Encoding: Numeric * Max length: 12 characters * Must not be all zeros. */ 'enhancedSchemeData_totalTaxAmount'?: string; diff --git a/src/typings/payment/adjustAuthorisationRequest.ts b/src/typings/payment/adjustAuthorisationRequest.ts index c62d9ea44..692021983 100644 --- a/src/typings/payment/adjustAuthorisationRequest.ts +++ b/src/typings/payment/adjustAuthorisationRequest.ts @@ -22,7 +22,7 @@ export class AdjustAuthorisationRequest { */ 'merchantAccount': string; 'modificationAmount': Amount; - 'mpiData'?: ThreeDSecureData | null; + 'mpiData'?: ThreeDSecureData; /** * The original merchant reference to cancel. */ @@ -31,7 +31,7 @@ export class AdjustAuthorisationRequest { * The original pspReference of the payment to modify. This reference is returned in: * authorisation response * authorisation notification */ 'originalReference': string; - 'platformChargebackLogic'?: PlatformChargebackLogic | null; + 'platformChargebackLogic'?: PlatformChargebackLogic; /** * Your reference for the payment modification. This reference is visible in Customer Area and in reports. Maximum length: 80 characters. */ @@ -70,7 +70,7 @@ export class AdjustAuthorisationRequest { { "name": "mpiData", "baseName": "mpiData", - "type": "ThreeDSecureData | null" + "type": "ThreeDSecureData" }, { "name": "originalMerchantReference", @@ -85,7 +85,7 @@ export class AdjustAuthorisationRequest { { "name": "platformChargebackLogic", "baseName": "platformChargebackLogic", - "type": "PlatformChargebackLogic | null" + "type": "PlatformChargebackLogic" }, { "name": "reference", diff --git a/src/typings/payment/applicationInfo.ts b/src/typings/payment/applicationInfo.ts index 269c523a4..a5702bd9f 100644 --- a/src/typings/payment/applicationInfo.ts +++ b/src/typings/payment/applicationInfo.ts @@ -13,12 +13,12 @@ import { MerchantDevice } from './merchantDevice'; import { ShopperInteractionDevice } from './shopperInteractionDevice'; export class ApplicationInfo { - 'adyenLibrary'?: CommonField | null; - 'adyenPaymentSource'?: CommonField | null; - 'externalPlatform'?: ExternalPlatform | null; - 'merchantApplication'?: CommonField | null; - 'merchantDevice'?: MerchantDevice | null; - 'shopperInteractionDevice'?: ShopperInteractionDevice | null; + 'adyenLibrary'?: CommonField; + 'adyenPaymentSource'?: CommonField; + 'externalPlatform'?: ExternalPlatform; + 'merchantApplication'?: CommonField; + 'merchantDevice'?: MerchantDevice; + 'shopperInteractionDevice'?: ShopperInteractionDevice; static discriminator: string | undefined = undefined; @@ -26,32 +26,32 @@ export class ApplicationInfo { { "name": "adyenLibrary", "baseName": "adyenLibrary", - "type": "CommonField | null" + "type": "CommonField" }, { "name": "adyenPaymentSource", "baseName": "adyenPaymentSource", - "type": "CommonField | null" + "type": "CommonField" }, { "name": "externalPlatform", "baseName": "externalPlatform", - "type": "ExternalPlatform | null" + "type": "ExternalPlatform" }, { "name": "merchantApplication", "baseName": "merchantApplication", - "type": "CommonField | null" + "type": "CommonField" }, { "name": "merchantDevice", "baseName": "merchantDevice", - "type": "MerchantDevice | null" + "type": "MerchantDevice" }, { "name": "shopperInteractionDevice", "baseName": "shopperInteractionDevice", - "type": "ShopperInteractionDevice | null" + "type": "ShopperInteractionDevice" } ]; static getAttributeTypeMap() { diff --git a/src/typings/payment/authenticationResultResponse.ts b/src/typings/payment/authenticationResultResponse.ts index bee459bed..05f29e753 100644 --- a/src/typings/payment/authenticationResultResponse.ts +++ b/src/typings/payment/authenticationResultResponse.ts @@ -11,8 +11,8 @@ import { ThreeDS1Result } from './threeDS1Result'; import { ThreeDS2Result } from './threeDS2Result'; export class AuthenticationResultResponse { - 'threeDS1Result'?: ThreeDS1Result | null; - 'threeDS2Result'?: ThreeDS2Result | null; + 'threeDS1Result'?: ThreeDS1Result; + 'threeDS2Result'?: ThreeDS2Result; static discriminator: string | undefined = undefined; @@ -20,12 +20,12 @@ export class AuthenticationResultResponse { { "name": "threeDS1Result", "baseName": "threeDS1Result", - "type": "ThreeDS1Result | null" + "type": "ThreeDS1Result" }, { "name": "threeDS2Result", "baseName": "threeDS2Result", - "type": "ThreeDS2Result | null" + "type": "ThreeDS2Result" } ]; static getAttributeTypeMap() { diff --git a/src/typings/payment/browserInfo.ts b/src/typings/payment/browserInfo.ts index 4d9f33d60..4b3b5c441 100644 --- a/src/typings/payment/browserInfo.ts +++ b/src/typings/payment/browserInfo.ts @@ -24,7 +24,7 @@ export class BrowserInfo { /** * Boolean value indicating if the shopper\'s browser is able to execute JavaScript. A default \'true\' value is assumed if the field is not present. */ - 'javaScriptEnabled'?: boolean; + 'javaScriptEnabled'?: boolean = true; /** * The `navigator.language` value of the shopper\'s browser (as defined in IETF BCP 47). */ diff --git a/src/typings/payment/cancelOrRefundRequest.ts b/src/typings/payment/cancelOrRefundRequest.ts index 3087216c0..f89d2a6fd 100644 --- a/src/typings/payment/cancelOrRefundRequest.ts +++ b/src/typings/payment/cancelOrRefundRequest.ts @@ -19,7 +19,7 @@ export class CancelOrRefundRequest { * The merchant account that is used to process the payment. */ 'merchantAccount': string; - 'mpiData'?: ThreeDSecureData | null; + 'mpiData'?: ThreeDSecureData; /** * The original merchant reference to cancel. */ @@ -28,7 +28,7 @@ export class CancelOrRefundRequest { * The original pspReference of the payment to modify. This reference is returned in: * authorisation response * authorisation notification */ 'originalReference': string; - 'platformChargebackLogic'?: PlatformChargebackLogic | null; + 'platformChargebackLogic'?: PlatformChargebackLogic; /** * Your reference for the payment modification. This reference is visible in Customer Area and in reports. Maximum length: 80 characters. */ @@ -58,7 +58,7 @@ export class CancelOrRefundRequest { { "name": "mpiData", "baseName": "mpiData", - "type": "ThreeDSecureData | null" + "type": "ThreeDSecureData" }, { "name": "originalMerchantReference", @@ -73,7 +73,7 @@ export class CancelOrRefundRequest { { "name": "platformChargebackLogic", "baseName": "platformChargebackLogic", - "type": "PlatformChargebackLogic | null" + "type": "PlatformChargebackLogic" }, { "name": "reference", diff --git a/src/typings/payment/cancelRequest.ts b/src/typings/payment/cancelRequest.ts index a77746d91..836b7a2ed 100644 --- a/src/typings/payment/cancelRequest.ts +++ b/src/typings/payment/cancelRequest.ts @@ -20,7 +20,7 @@ export class CancelRequest { * The merchant account that is used to process the payment. */ 'merchantAccount': string; - 'mpiData'?: ThreeDSecureData | null; + 'mpiData'?: ThreeDSecureData; /** * The original merchant reference to cancel. */ @@ -29,7 +29,7 @@ export class CancelRequest { * The original pspReference of the payment to modify. This reference is returned in: * authorisation response * authorisation notification */ 'originalReference': string; - 'platformChargebackLogic'?: PlatformChargebackLogic | null; + 'platformChargebackLogic'?: PlatformChargebackLogic; /** * Your reference for the payment modification. This reference is visible in Customer Area and in reports. Maximum length: 80 characters. */ @@ -63,7 +63,7 @@ export class CancelRequest { { "name": "mpiData", "baseName": "mpiData", - "type": "ThreeDSecureData | null" + "type": "ThreeDSecureData" }, { "name": "originalMerchantReference", @@ -78,7 +78,7 @@ export class CancelRequest { { "name": "platformChargebackLogic", "baseName": "platformChargebackLogic", - "type": "PlatformChargebackLogic | null" + "type": "PlatformChargebackLogic" }, { "name": "reference", diff --git a/src/typings/payment/captureRequest.ts b/src/typings/payment/captureRequest.ts index ad8ef39ae..f9f80aeb3 100644 --- a/src/typings/payment/captureRequest.ts +++ b/src/typings/payment/captureRequest.ts @@ -22,7 +22,7 @@ export class CaptureRequest { */ 'merchantAccount': string; 'modificationAmount': Amount; - 'mpiData'?: ThreeDSecureData | null; + 'mpiData'?: ThreeDSecureData; /** * The original merchant reference to cancel. */ @@ -31,7 +31,7 @@ export class CaptureRequest { * The original pspReference of the payment to modify. This reference is returned in: * authorisation response * authorisation notification */ 'originalReference': string; - 'platformChargebackLogic'?: PlatformChargebackLogic | null; + 'platformChargebackLogic'?: PlatformChargebackLogic; /** * Your reference for the payment modification. This reference is visible in Customer Area and in reports. Maximum length: 80 characters. */ @@ -70,7 +70,7 @@ export class CaptureRequest { { "name": "mpiData", "baseName": "mpiData", - "type": "ThreeDSecureData | null" + "type": "ThreeDSecureData" }, { "name": "originalMerchantReference", @@ -85,7 +85,7 @@ export class CaptureRequest { { "name": "platformChargebackLogic", "baseName": "platformChargebackLogic", - "type": "PlatformChargebackLogic | null" + "type": "PlatformChargebackLogic" }, { "name": "reference", diff --git a/src/typings/payment/deviceRenderOptions.ts b/src/typings/payment/deviceRenderOptions.ts index 55c28a6f1..f6313dd70 100644 --- a/src/typings/payment/deviceRenderOptions.ts +++ b/src/typings/payment/deviceRenderOptions.ts @@ -12,7 +12,7 @@ export class DeviceRenderOptions { /** * Supported SDK interface types. Allowed values: * native * html * both */ - 'sdkInterface'?: DeviceRenderOptions.SdkInterfaceEnum; + 'sdkInterface'?: DeviceRenderOptions.SdkInterfaceEnum = DeviceRenderOptions.SdkInterfaceEnum.Both; /** * UI types supported for displaying specific challenges. Allowed values: * text * singleSelect * outOfBand * otherHtml * multiSelect */ @@ -39,15 +39,15 @@ export class DeviceRenderOptions { export namespace DeviceRenderOptions { export enum SdkInterfaceEnum { - Native = 'native', - Html = 'html', - Both = 'both' + Native = 'native', + Html = 'html', + Both = 'both' } export enum SdkUiTypeEnum { - MultiSelect = 'multiSelect', - OtherHtml = 'otherHtml', - OutOfBand = 'outOfBand', - SingleSelect = 'singleSelect', - Text = 'text' + MultiSelect = 'multiSelect', + OtherHtml = 'otherHtml', + OutOfBand = 'outOfBand', + SingleSelect = 'singleSelect', + Text = 'text' } } diff --git a/src/typings/payment/donationRequest.ts b/src/typings/payment/donationRequest.ts index c96da773a..e2b6e3e50 100644 --- a/src/typings/payment/donationRequest.ts +++ b/src/typings/payment/donationRequest.ts @@ -24,7 +24,7 @@ export class DonationRequest { * The original pspReference of the payment to modify. This reference is returned in: * authorisation response * authorisation notification */ 'originalReference'?: string; - 'platformChargebackLogic'?: PlatformChargebackLogic | null; + 'platformChargebackLogic'?: PlatformChargebackLogic; /** * Your reference for the payment modification. This reference is visible in Customer Area and in reports. Maximum length: 80 characters. */ @@ -56,7 +56,7 @@ export class DonationRequest { { "name": "platformChargebackLogic", "baseName": "platformChargebackLogic", - "type": "PlatformChargebackLogic | null" + "type": "PlatformChargebackLogic" }, { "name": "reference", diff --git a/src/typings/payment/forexQuote.ts b/src/typings/payment/forexQuote.ts index 1ef40e192..60d64ac66 100644 --- a/src/typings/payment/forexQuote.ts +++ b/src/typings/payment/forexQuote.ts @@ -18,18 +18,18 @@ export class ForexQuote { * The account type. */ 'accountType'?: string; - 'baseAmount'?: Amount | null; + 'baseAmount'?: Amount; /** * The base points. */ 'basePoints': number; - 'buy'?: Amount | null; - 'interbank'?: Amount | null; + 'buy'?: Amount; + 'interbank'?: Amount; /** * The reference assigned to the forex quote request. */ 'reference'?: string; - 'sell'?: Amount | null; + 'sell'?: Amount; /** * The signature to validate the integrity. */ @@ -63,7 +63,7 @@ export class ForexQuote { { "name": "baseAmount", "baseName": "baseAmount", - "type": "Amount | null" + "type": "Amount" }, { "name": "basePoints", @@ -73,12 +73,12 @@ export class ForexQuote { { "name": "buy", "baseName": "buy", - "type": "Amount | null" + "type": "Amount" }, { "name": "interbank", "baseName": "interbank", - "type": "Amount | null" + "type": "Amount" }, { "name": "reference", @@ -88,7 +88,7 @@ export class ForexQuote { { "name": "sell", "baseName": "sell", - "type": "Amount | null" + "type": "Amount" }, { "name": "signature", diff --git a/src/typings/payment/fraudCheckResultWrapper.ts b/src/typings/payment/fraudCheckResultWrapper.ts index 841551c5e..37b094e68 100644 --- a/src/typings/payment/fraudCheckResultWrapper.ts +++ b/src/typings/payment/fraudCheckResultWrapper.ts @@ -10,7 +10,7 @@ import { FraudCheckResult } from './fraudCheckResult'; export class FraudCheckResultWrapper { - 'FraudCheckResult'?: FraudCheckResult | null; + 'FraudCheckResult'?: FraudCheckResult; static discriminator: string | undefined = undefined; @@ -18,7 +18,7 @@ export class FraudCheckResultWrapper { { "name": "FraudCheckResult", "baseName": "FraudCheckResult", - "type": "FraudCheckResult | null" + "type": "FraudCheckResult" } ]; static getAttributeTypeMap() { diff --git a/src/typings/payment/fundDestination.ts b/src/typings/payment/fundDestination.ts index 04ca78299..cb0461769 100644 --- a/src/typings/payment/fundDestination.ts +++ b/src/typings/payment/fundDestination.ts @@ -21,8 +21,8 @@ export class FundDestination { * a map of name/value pairs for passing in additional/industry-specific data */ 'additionalData'?: { [key: string]: string; }; - 'billingAddress'?: Address | null; - 'card'?: Card | null; + 'billingAddress'?: Address; + 'card'?: Card; /** * The `recurringDetailReference` you want to use for this payment. The value `LATEST` can be used to select the most recently stored recurring detail. */ @@ -31,12 +31,12 @@ export class FundDestination { * the email address of the person */ 'shopperEmail'?: string; - 'shopperName'?: Name | null; + 'shopperName'?: Name; /** * Required for recurring payments. Your reference to uniquely identify this shopper, for example user ID or account ID. The value is case-sensitive and must be at least three characters. > Your reference must not include personally identifiable information (PII) such as name or email address. */ 'shopperReference'?: string; - 'subMerchant'?: SubMerchant | null; + 'subMerchant'?: SubMerchant; /** * the telephone number of the person */ @@ -62,12 +62,12 @@ export class FundDestination { { "name": "billingAddress", "baseName": "billingAddress", - "type": "Address | null" + "type": "Address" }, { "name": "card", "baseName": "card", - "type": "Card | null" + "type": "Card" }, { "name": "selectedRecurringDetailReference", @@ -82,7 +82,7 @@ export class FundDestination { { "name": "shopperName", "baseName": "shopperName", - "type": "Name | null" + "type": "Name" }, { "name": "shopperReference", @@ -92,7 +92,7 @@ export class FundDestination { { "name": "subMerchant", "baseName": "subMerchant", - "type": "SubMerchant | null" + "type": "SubMerchant" }, { "name": "telephoneNumber", diff --git a/src/typings/payment/fundSource.ts b/src/typings/payment/fundSource.ts index 14eec5d74..0c45ca290 100644 --- a/src/typings/payment/fundSource.ts +++ b/src/typings/payment/fundSource.ts @@ -16,13 +16,13 @@ export class FundSource { * A map of name-value pairs for passing additional or industry-specific data. */ 'additionalData'?: { [key: string]: string; }; - 'billingAddress'?: Address | null; - 'card'?: Card | null; + 'billingAddress'?: Address; + 'card'?: Card; /** * Email address of the person. */ 'shopperEmail'?: string; - 'shopperName'?: Name | null; + 'shopperName'?: Name; /** * Phone number of the person */ @@ -39,12 +39,12 @@ export class FundSource { { "name": "billingAddress", "baseName": "billingAddress", - "type": "Address | null" + "type": "Address" }, { "name": "card", "baseName": "card", - "type": "Card | null" + "type": "Card" }, { "name": "shopperEmail", @@ -54,7 +54,7 @@ export class FundSource { { "name": "shopperName", "baseName": "shopperName", - "type": "Name | null" + "type": "Name" }, { "name": "telephoneNumber", diff --git a/src/typings/payment/installments.ts b/src/typings/payment/installments.ts index 6db4fc048..5abbc12bc 100644 --- a/src/typings/payment/installments.ts +++ b/src/typings/payment/installments.ts @@ -48,14 +48,14 @@ export class Installments { export namespace Installments { export enum PlanEnum { - BuynowPaylater = 'buynow_paylater', - InteresRefundPrctg = 'interes_refund_prctg', - InterestBonus = 'interest_bonus', - NointeresRefundPrctg = 'nointeres_refund_prctg', - NointerestBonus = 'nointerest_bonus', - RefundPrctg = 'refund_prctg', - Regular = 'regular', - Revolving = 'revolving', - WithInterest = 'with_interest' + BuynowPaylater = 'buynow_paylater', + InteresRefundPrctg = 'interes_refund_prctg', + InterestBonus = 'interest_bonus', + NointeresRefundPrctg = 'nointeres_refund_prctg', + NointerestBonus = 'nointerest_bonus', + RefundPrctg = 'refund_prctg', + Regular = 'regular', + Revolving = 'revolving', + WithInterest = 'with_interest' } } diff --git a/src/typings/payment/mandate.ts b/src/typings/payment/mandate.ts index 15e1f9bbf..8c17ab475 100644 --- a/src/typings/payment/mandate.ts +++ b/src/typings/payment/mandate.ts @@ -102,22 +102,22 @@ export class Mandate { export namespace Mandate { export enum AmountRuleEnum { - Max = 'max', - Exact = 'exact' + Max = 'max', + Exact = 'exact' } export enum BillingAttemptsRuleEnum { - On = 'on', - Before = 'before', - After = 'after' + On = 'on', + Before = 'before', + After = 'after' } export enum FrequencyEnum { - Adhoc = 'adhoc', - Daily = 'daily', - Weekly = 'weekly', - BiWeekly = 'biWeekly', - Monthly = 'monthly', - Quarterly = 'quarterly', - HalfYearly = 'halfYearly', - Yearly = 'yearly' + Adhoc = 'adhoc', + Daily = 'daily', + Weekly = 'weekly', + BiWeekly = 'biWeekly', + Monthly = 'monthly', + Quarterly = 'quarterly', + HalfYearly = 'halfYearly', + Yearly = 'yearly' } } diff --git a/src/typings/payment/merchantRiskIndicator.ts b/src/typings/payment/merchantRiskIndicator.ts index 5c9cecb61..82dee528b 100644 --- a/src/typings/payment/merchantRiskIndicator.ts +++ b/src/typings/payment/merchantRiskIndicator.ts @@ -33,7 +33,7 @@ export class MerchantRiskIndicator { * The estimated delivery time for the shopper to receive the goods. Allowed values: * `electronicDelivery` * `sameDayShipping` * `overnightShipping` * `twoOrMoreDaysShipping` */ 'deliveryTimeframe'?: MerchantRiskIndicator.DeliveryTimeframeEnum; - 'giftCardAmount'?: Amount | null; + 'giftCardAmount'?: Amount; /** * For prepaid or gift card purchase, total count of individual prepaid or gift cards/codes purchased. */ @@ -98,7 +98,7 @@ export class MerchantRiskIndicator { { "name": "giftCardAmount", "baseName": "giftCardAmount", - "type": "Amount | null" + "type": "Amount" }, { "name": "giftCardCount", @@ -148,18 +148,18 @@ export class MerchantRiskIndicator { export namespace MerchantRiskIndicator { export enum DeliveryAddressIndicatorEnum { - ShipToBillingAddress = 'shipToBillingAddress', - ShipToVerifiedAddress = 'shipToVerifiedAddress', - ShipToNewAddress = 'shipToNewAddress', - ShipToStore = 'shipToStore', - DigitalGoods = 'digitalGoods', - GoodsNotShipped = 'goodsNotShipped', - Other = 'other' + ShipToBillingAddress = 'shipToBillingAddress', + ShipToVerifiedAddress = 'shipToVerifiedAddress', + ShipToNewAddress = 'shipToNewAddress', + ShipToStore = 'shipToStore', + DigitalGoods = 'digitalGoods', + GoodsNotShipped = 'goodsNotShipped', + Other = 'other' } export enum DeliveryTimeframeEnum { - ElectronicDelivery = 'electronicDelivery', - SameDayShipping = 'sameDayShipping', - OvernightShipping = 'overnightShipping', - TwoOrMoreDaysShipping = 'twoOrMoreDaysShipping' + ElectronicDelivery = 'electronicDelivery', + SameDayShipping = 'sameDayShipping', + OvernightShipping = 'overnightShipping', + TwoOrMoreDaysShipping = 'twoOrMoreDaysShipping' } } diff --git a/src/typings/payment/models.ts b/src/typings/payment/models.ts index e296864e7..348b9bdf6 100644 --- a/src/typings/payment/models.ts +++ b/src/typings/payment/models.ts @@ -1,12 +1,4 @@ -/* - * The version of the OpenAPI document: v68 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - +import localVarRequest from 'request'; export * from './accountInfo'; export * from './acctInfo'; @@ -89,6 +81,18 @@ export * from './threeDSRequestorPriorAuthenticationInfo'; export * from './threeDSecureData'; export * from './voidPendingRefundRequest'; +import * as fs from 'fs'; + +export interface RequestDetailedFile { + value: Buffer; + options?: { + filename?: string; + contentType?: string; + } +} + +export type RequestFile = string | Buffer | fs.ReadStream | RequestDetailedFile; + import { AccountInfo } from './accountInfo'; import { AcctInfo } from './acctInfo'; @@ -325,6 +329,23 @@ let typeMap: {[index: string]: any} = { "VoidPendingRefundRequest": VoidPendingRefundRequest, } +// Check if a string starts with another string without using es6 features +function startsWith(str: string, match: string): boolean { + return str.substring(0, match.length) === match; +} + +// Check if a string ends with another string without using es6 features +function endsWith(str: string, match: string): boolean { + return str.length >= match.length && str.substring(str.length - match.length) === match; +} + +const nullableSuffix = " | null"; +const optionalSuffix = " | undefined"; +const arrayPrefix = "Array<"; +const arraySuffix = ">"; +const mapPrefix = "{ [key: string]: "; +const mapSuffix = "; }"; + export class ObjectSerializer { public static findCorrectType(data: any, expectedType: string) { if (data == undefined) { @@ -361,25 +382,37 @@ export class ObjectSerializer { } } - public static serialize(data: any, type: string) { + public static serialize(data: any, type: string): any { if (data == undefined) { return data; } else if (primitives.indexOf(type.toLowerCase()) !== -1) { return data; - } else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6 - let subType: string = type.replace("Array<", ""); // Array => Type> - subType = subType.substring(0, subType.length - 1); // Type> => Type + } else if (endsWith(type, nullableSuffix)) { + let subType: string = type.slice(0, -nullableSuffix.length); // Type | null => Type + return ObjectSerializer.serialize(data, subType); + } else if (endsWith(type, optionalSuffix)) { + let subType: string = type.slice(0, -optionalSuffix.length); // Type | undefined => Type + return ObjectSerializer.serialize(data, subType); + } else if (startsWith(type, arrayPrefix)) { + let subType: string = type.slice(arrayPrefix.length, -arraySuffix.length); // Array => Type let transformedData: any[] = []; for (let index = 0; index < data.length; index++) { let datum = data[index]; transformedData.push(ObjectSerializer.serialize(datum, subType)); } return transformedData; + } else if (startsWith(type, mapPrefix)) { + let subType: string = type.slice(mapPrefix.length, -mapSuffix.length); // { [key: string]: Type; } => Type + let transformedData: { [key: string]: any } = {}; + for (let key in data) { + transformedData[key] = ObjectSerializer.serialize( + data[key], + subType, + ); + } + return transformedData; } else if (type === "Date") { return data.toISOString(); - } else if (type === "SaleToAcquirerData") { - const dataString = JSON.stringify(data); - return Buffer.from(dataString).toString("base64"); } else { if (enumsMap[type]) { return data; @@ -402,22 +435,37 @@ export class ObjectSerializer { } } - public static deserialize(data: any, type: string) { + public static deserialize(data: any, type: string): any { // polymorphism may change the actual type. type = ObjectSerializer.findCorrectType(data, type); if (data == undefined) { return data; } else if (primitives.indexOf(type.toLowerCase()) !== -1) { return data; - } else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6 - let subType: string = type.replace("Array<", ""); // Array => Type> - subType = subType.substring(0, subType.length - 1); // Type> => Type + } else if (endsWith(type, nullableSuffix)) { + let subType: string = type.slice(0, -nullableSuffix.length); // Type | null => Type + return ObjectSerializer.deserialize(data, subType); + } else if (endsWith(type, optionalSuffix)) { + let subType: string = type.slice(0, -optionalSuffix.length); // Type | undefined => Type + return ObjectSerializer.deserialize(data, subType); + } else if (startsWith(type, arrayPrefix)) { + let subType: string = type.slice(arrayPrefix.length, -arraySuffix.length); // Array => Type let transformedData: any[] = []; for (let index = 0; index < data.length; index++) { let datum = data[index]; transformedData.push(ObjectSerializer.deserialize(datum, subType)); } return transformedData; + } else if (startsWith(type, mapPrefix)) { + let subType: string = type.slice(mapPrefix.length, -mapSuffix.length); // { [key: string]: Type; } => Type + let transformedData: { [key: string]: any } = {}; + for (let key in data) { + transformedData[key] = ObjectSerializer.deserialize( + data[key], + subType, + ); + } + return transformedData; } else if (type === "Date") { return new Date(data); } else { @@ -438,3 +486,77 @@ export class ObjectSerializer { } } } + +export interface Authentication { + /** + * Apply authentication settings to header and query params. + */ + applyToRequest(requestOptions: localVarRequest.Options): Promise | void; +} + +export class HttpBasicAuth implements Authentication { + public username: string = ''; + public password: string = ''; + + applyToRequest(requestOptions: localVarRequest.Options): void { + requestOptions.auth = { + username: this.username, password: this.password + } + } +} + +export class HttpBearerAuth implements Authentication { + public accessToken: string | (() => string) = ''; + + applyToRequest(requestOptions: localVarRequest.Options): void { + if (requestOptions && requestOptions.headers) { + const accessToken = typeof this.accessToken === 'function' + ? this.accessToken() + : this.accessToken; + requestOptions.headers["Authorization"] = "Bearer " + accessToken; + } + } +} + +export class ApiKeyAuth implements Authentication { + public apiKey: string = ''; + + constructor(private location: string, private paramName: string) { + } + + applyToRequest(requestOptions: localVarRequest.Options): void { + if (this.location == "query") { + (requestOptions.qs)[this.paramName] = this.apiKey; + } else if (this.location == "header" && requestOptions && requestOptions.headers) { + requestOptions.headers[this.paramName] = this.apiKey; + } else if (this.location == 'cookie' && requestOptions && requestOptions.headers) { + if (requestOptions.headers['Cookie']) { + requestOptions.headers['Cookie'] += '; ' + this.paramName + '=' + encodeURIComponent(this.apiKey); + } + else { + requestOptions.headers['Cookie'] = this.paramName + '=' + encodeURIComponent(this.apiKey); + } + } + } +} + +export class OAuth implements Authentication { + public accessToken: string = ''; + + applyToRequest(requestOptions: localVarRequest.Options): void { + if (requestOptions && requestOptions.headers) { + requestOptions.headers["Authorization"] = "Bearer " + this.accessToken; + } + } +} + +export class VoidAuth implements Authentication { + public username: string = ''; + public password: string = ''; + + applyToRequest(_: localVarRequest.Options): void { + // Do nothing + } +} + +export type Interceptor = (requestOptions: localVarRequest.Options) => (Promise | void); diff --git a/src/typings/payment/modificationResult.ts b/src/typings/payment/modificationResult.ts index 2db6b42e3..131c865bd 100644 --- a/src/typings/payment/modificationResult.ts +++ b/src/typings/payment/modificationResult.ts @@ -48,14 +48,14 @@ export class ModificationResult { export namespace ModificationResult { export enum ResponseEnum { - CaptureReceived = '[capture-received]', - CancelReceived = '[cancel-received]', - RefundReceived = '[refund-received]', - CancelOrRefundReceived = '[cancelOrRefund-received]', - AdjustAuthorisationReceived = '[adjustAuthorisation-received]', - DonationReceived = '[donation-received]', - TechnicalCancelReceived = '[technical-cancel-received]', - VoidPendingRefundReceived = '[voidPendingRefund-received]', - Authorised = 'Authorised' + CaptureReceived = '[capture-received]', + CancelReceived = '[cancel-received]', + RefundReceived = '[refund-received]', + CancelOrRefundReceived = '[cancelOrRefund-received]', + AdjustAuthorisationReceived = '[adjustAuthorisation-received]', + DonationReceived = '[donation-received]', + TechnicalCancelReceived = '[technical-cancel-received]', + VoidPendingRefundReceived = '[voidPendingRefund-received]', + Authorised = 'Authorised' } } diff --git a/src/typings/payment/paymentRequest.ts b/src/typings/payment/paymentRequest.ts index 74e06af80..ceec7b68f 100644 --- a/src/typings/payment/paymentRequest.ts +++ b/src/typings/payment/paymentRequest.ts @@ -29,28 +29,28 @@ import { ThreeDS2RequestData } from './threeDS2RequestData'; import { ThreeDSecureData } from './threeDSecureData'; export class PaymentRequest { - 'accountInfo'?: AccountInfo | null; - 'additionalAmount'?: Amount | null; + 'accountInfo'?: AccountInfo; + 'additionalAmount'?: Amount; /** * This field contains additional data, which may be required for a particular payment request. The `additionalData` object consists of entries, each of which includes the key and value. */ 'additionalData'?: { [key: string]: string; }; 'amount': Amount; - 'applicationInfo'?: ApplicationInfo | null; - 'bankAccount'?: BankAccount | null; - 'billingAddress'?: Address | null; - 'browserInfo'?: BrowserInfo | null; + 'applicationInfo'?: ApplicationInfo; + 'bankAccount'?: BankAccount; + 'billingAddress'?: Address; + 'browserInfo'?: BrowserInfo; /** * The delay between the authorisation and scheduled auto-capture, specified in hours. */ 'captureDelayHours'?: number; - 'card'?: Card | null; + 'card'?: Card; /** * The shopper\'s date of birth. Format [ISO-8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DD */ 'dateOfBirth'?: string; - 'dccQuote'?: ForexQuote | null; - 'deliveryAddress'?: Address | null; + 'dccQuote'?: ForexQuote; + 'deliveryAddress'?: Address; /** * The date and time the purchased goods should be delivered. Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DDThh:mm:ss.sssTZD Example: 2017-07-17T13:42:40.428+01:00 */ @@ -67,18 +67,18 @@ export class PaymentRequest { * An integer value that is added to the normal fraud score. The value can be either positive or negative. */ 'fraudOffset'?: number; - 'fundDestination'?: FundDestination | null; - 'fundSource'?: FundSource | null; + 'fundDestination'?: FundDestination; + 'fundSource'?: FundSource; /** * The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**. */ 'fundingSource'?: PaymentRequest.FundingSourceEnum; - 'installments'?: Installments | null; + 'installments'?: Installments; /** * The `localizedShopperStatement` field lets you use dynamic values for your shopper statement in a local character set. If not supplied, left empty, or for cross-border transactions, **shopperStatement** is used. Adyen currently supports the ja-Kana character set for Visa and Mastercard payments in Japan using Japanese cards. This character set supports: * UTF-8 based Katakana, capital letters, numbers and special characters. * Half-width or full-width characters. */ 'localizedShopperStatement'?: { [key: string]: string; }; - 'mandate'?: Mandate | null; + 'mandate'?: Mandate; /** * The [merchant category code](https://en.wikipedia.org/wiki/Merchant_category_code) (MCC) is a four-digit number, which relates to a particular market segment. This code reflects the predominant activity that is conducted by the merchant. */ @@ -91,12 +91,12 @@ export class PaymentRequest { * This reference allows linking multiple transactions to each other for reporting purposes (i.e. order auth-rate). The reference should be unique per billing cycle. The same merchant order reference should never be reused after the first authorised attempt. If used, this field should be supplied for all incoming authorisations. > We strongly recommend you send the `merchantOrderReference` value to benefit from linking payment requests when authorisation retries take place. In addition, we recommend you provide `retry.orderAttemptNumber`, `retry.chainAttemptNumber`, and `retry.skipRetry` values in `PaymentRequest.additionalData`. */ 'merchantOrderReference'?: string; - 'merchantRiskIndicator'?: MerchantRiskIndicator | null; + 'merchantRiskIndicator'?: MerchantRiskIndicator; /** * Metadata consists of entries, each of which includes a key and a value. Limits: * Maximum 20 key-value pairs per request. When exceeding, the \"177\" error occurs: \"Metadata size exceeds limit\". * Maximum 20 characters per key. * Maximum 80 characters per value. */ 'metadata'?: { [key: string]: string; }; - 'mpiData'?: ThreeDSecureData | null; + 'mpiData'?: ThreeDSecureData; /** * The two-character country code of the shopper\'s nationality. */ @@ -105,8 +105,8 @@ export class PaymentRequest { * When you are doing multiple partial (gift card) payments, this is the `pspReference` of the first payment. We use this to link the multiple payments to each other. As your own reference for linking multiple payments, use the `merchantOrderReference`instead. */ 'orderReference'?: string; - 'platformChargebackLogic'?: PlatformChargebackLogic | null; - 'recurring'?: Recurring | null; + 'platformChargebackLogic'?: PlatformChargebackLogic; + 'recurring'?: Recurring; /** * Defines a recurring payment type. Required when creating a token to store payment details or using stored payment details. Allowed values: * `Subscription` – A transaction for a fixed or variable amount, which follows a fixed schedule. * `CardOnFile` – With a card-on-file (CoF) transaction, card details are stored to enable one-click or omnichannel journeys, or simply to streamline the checkout process. Any subscription not following a fixed schedule is also considered a card-on-file transaction. * `UnscheduledCardOnFile` – An unscheduled card-on-file (UCoF) transaction is a transaction that occurs on a non-fixed schedule and/or have variable amounts. For example, automatic top-ups when a cardholder\'s balance drops below a certain amount. */ @@ -115,7 +115,7 @@ export class PaymentRequest { * The reference to uniquely identify a payment. This reference is used in all communication with you about the payment status. We recommend using a unique value per payment; however, it is not a requirement. If you need to provide multiple references for a transaction, separate them with hyphens (\"-\"). Maximum length: 80 characters. */ 'reference': string; - 'secureRemoteCommerceCheckoutData'?: SecureRemoteCommerceCheckoutData | null; + 'secureRemoteCommerceCheckoutData'?: SecureRemoteCommerceCheckoutData; /** * Some payment methods require defining a value for this field to specify how to process the transaction. For the Bancontact payment method, it can be set to: * `maestro` (default), to be processed like a Maestro card, or * `bcmc`, to be processed like a Bancontact card. */ @@ -144,7 +144,7 @@ export class PaymentRequest { * The combination of a language code and a country code to specify the language to be used in the payment. */ 'shopperLocale'?: string; - 'shopperName'?: Name | null; + 'shopperName'?: Name; /** * Required for recurring payments. Your reference to uniquely identify this shopper, for example user ID or account ID. The value is case-sensitive and must be at least three characters. > Your reference must not include personally identifiable information (PII) such as name or email address. */ @@ -158,7 +158,7 @@ export class PaymentRequest { */ 'socialSecurityNumber'?: string; /** - * An array of objects specifying how the payment should be split when using either Adyen for Platforms for [marketplaces](https://docs.adyen.com/marketplaces/split-payments) or [platforms]((https://docs.adyen.com/platforms/split-payments), or standalone [Issuing](https://docs.adyen.com/issuing/add-manage-funds#split). + * An array of objects specifying how the payment should be split when using either Adyen for Platforms for [marketplaces](https://docs.adyen.com/marketplaces/split-payments) or [platforms](https://docs.adyen.com/platforms/split-payments), or standalone [Issuing](https://docs.adyen.com/issuing/add-manage-funds#split). */ 'splits'?: Array; /** @@ -169,11 +169,11 @@ export class PaymentRequest { * The shopper\'s telephone number. */ 'telephoneNumber'?: string; - 'threeDS2RequestData'?: ThreeDS2RequestData | null; + 'threeDS2RequestData'?: ThreeDS2RequestData; /** * If set to true, you will only perform the [3D Secure 2 authentication](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only), and not the payment authorisation. */ - 'threeDSAuthenticationOnly'?: boolean; + 'threeDSAuthenticationOnly'?: boolean = false; /** * The reference value to aggregate sales totals in reporting. When not specified, the store field is used (if available). */ @@ -189,12 +189,12 @@ export class PaymentRequest { { "name": "accountInfo", "baseName": "accountInfo", - "type": "AccountInfo | null" + "type": "AccountInfo" }, { "name": "additionalAmount", "baseName": "additionalAmount", - "type": "Amount | null" + "type": "Amount" }, { "name": "additionalData", @@ -209,22 +209,22 @@ export class PaymentRequest { { "name": "applicationInfo", "baseName": "applicationInfo", - "type": "ApplicationInfo | null" + "type": "ApplicationInfo" }, { "name": "bankAccount", "baseName": "bankAccount", - "type": "BankAccount | null" + "type": "BankAccount" }, { "name": "billingAddress", "baseName": "billingAddress", - "type": "Address | null" + "type": "Address" }, { "name": "browserInfo", "baseName": "browserInfo", - "type": "BrowserInfo | null" + "type": "BrowserInfo" }, { "name": "captureDelayHours", @@ -234,7 +234,7 @@ export class PaymentRequest { { "name": "card", "baseName": "card", - "type": "Card | null" + "type": "Card" }, { "name": "dateOfBirth", @@ -244,12 +244,12 @@ export class PaymentRequest { { "name": "dccQuote", "baseName": "dccQuote", - "type": "ForexQuote | null" + "type": "ForexQuote" }, { "name": "deliveryAddress", "baseName": "deliveryAddress", - "type": "Address | null" + "type": "Address" }, { "name": "deliveryDate", @@ -274,12 +274,12 @@ export class PaymentRequest { { "name": "fundDestination", "baseName": "fundDestination", - "type": "FundDestination | null" + "type": "FundDestination" }, { "name": "fundSource", "baseName": "fundSource", - "type": "FundSource | null" + "type": "FundSource" }, { "name": "fundingSource", @@ -289,7 +289,7 @@ export class PaymentRequest { { "name": "installments", "baseName": "installments", - "type": "Installments | null" + "type": "Installments" }, { "name": "localizedShopperStatement", @@ -299,7 +299,7 @@ export class PaymentRequest { { "name": "mandate", "baseName": "mandate", - "type": "Mandate | null" + "type": "Mandate" }, { "name": "mcc", @@ -319,7 +319,7 @@ export class PaymentRequest { { "name": "merchantRiskIndicator", "baseName": "merchantRiskIndicator", - "type": "MerchantRiskIndicator | null" + "type": "MerchantRiskIndicator" }, { "name": "metadata", @@ -329,7 +329,7 @@ export class PaymentRequest { { "name": "mpiData", "baseName": "mpiData", - "type": "ThreeDSecureData | null" + "type": "ThreeDSecureData" }, { "name": "nationality", @@ -344,12 +344,12 @@ export class PaymentRequest { { "name": "platformChargebackLogic", "baseName": "platformChargebackLogic", - "type": "PlatformChargebackLogic | null" + "type": "PlatformChargebackLogic" }, { "name": "recurring", "baseName": "recurring", - "type": "Recurring | null" + "type": "Recurring" }, { "name": "recurringProcessingModel", @@ -364,7 +364,7 @@ export class PaymentRequest { { "name": "secureRemoteCommerceCheckoutData", "baseName": "secureRemoteCommerceCheckoutData", - "type": "SecureRemoteCommerceCheckoutData | null" + "type": "SecureRemoteCommerceCheckoutData" }, { "name": "selectedBrand", @@ -404,7 +404,7 @@ export class PaymentRequest { { "name": "shopperName", "baseName": "shopperName", - "type": "Name | null" + "type": "Name" }, { "name": "shopperReference", @@ -439,7 +439,7 @@ export class PaymentRequest { { "name": "threeDS2RequestData", "baseName": "threeDS2RequestData", - "type": "ThreeDS2RequestData | null" + "type": "ThreeDS2RequestData" }, { "name": "threeDSAuthenticationOnly", @@ -464,22 +464,22 @@ export class PaymentRequest { export namespace PaymentRequest { export enum EntityTypeEnum { - NaturalPerson = 'NaturalPerson', - CompanyName = 'CompanyName' + NaturalPerson = 'NaturalPerson', + CompanyName = 'CompanyName' } export enum FundingSourceEnum { - Credit = 'credit', - Debit = 'debit' + Credit = 'credit', + Debit = 'debit' } export enum RecurringProcessingModelEnum { - CardOnFile = 'CardOnFile', - Subscription = 'Subscription', - UnscheduledCardOnFile = 'UnscheduledCardOnFile' + CardOnFile = 'CardOnFile', + Subscription = 'Subscription', + UnscheduledCardOnFile = 'UnscheduledCardOnFile' } export enum ShopperInteractionEnum { - Ecommerce = 'Ecommerce', - ContAuth = 'ContAuth', - Moto = 'Moto', - Pos = 'POS' + Ecommerce = 'Ecommerce', + ContAuth = 'ContAuth', + Moto = 'Moto', + Pos = 'POS' } } diff --git a/src/typings/payment/paymentRequest3d.ts b/src/typings/payment/paymentRequest3d.ts index 0e4d168ca..ec72c4132 100644 --- a/src/typings/payment/paymentRequest3d.ts +++ b/src/typings/payment/paymentRequest3d.ts @@ -21,16 +21,16 @@ import { Split } from './split'; import { ThreeDS2RequestData } from './threeDS2RequestData'; export class PaymentRequest3d { - 'accountInfo'?: AccountInfo | null; - 'additionalAmount'?: Amount | null; + 'accountInfo'?: AccountInfo; + 'additionalAmount'?: Amount; /** * This field contains additional data, which may be required for a particular payment request. The `additionalData` object consists of entries, each of which includes the key and value. */ 'additionalData'?: { [key: string]: string; }; - 'amount'?: Amount | null; - 'applicationInfo'?: ApplicationInfo | null; - 'billingAddress'?: Address | null; - 'browserInfo'?: BrowserInfo | null; + 'amount'?: Amount; + 'applicationInfo'?: ApplicationInfo; + 'billingAddress'?: Address; + 'browserInfo'?: BrowserInfo; /** * The delay between the authorisation and scheduled auto-capture, specified in hours. */ @@ -39,8 +39,8 @@ export class PaymentRequest3d { * The shopper\'s date of birth. Format [ISO-8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DD */ 'dateOfBirth'?: string; - 'dccQuote'?: ForexQuote | null; - 'deliveryAddress'?: Address | null; + 'dccQuote'?: ForexQuote; + 'deliveryAddress'?: Address; /** * The date and time the purchased goods should be delivered. Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DDThh:mm:ss.sssTZD Example: 2017-07-17T13:42:40.428+01:00 */ @@ -53,7 +53,7 @@ export class PaymentRequest3d { * An integer value that is added to the normal fraud score. The value can be either positive or negative. */ 'fraudOffset'?: number; - 'installments'?: Installments | null; + 'installments'?: Installments; /** * The `localizedShopperStatement` field lets you use dynamic values for your shopper statement in a local character set. If not supplied, left empty, or for cross-border transactions, **shopperStatement** is used. Adyen currently supports the ja-Kana character set for Visa and Mastercard payments in Japan using Japanese cards. This character set supports: * UTF-8 based Katakana, capital letters, numbers and special characters. * Half-width or full-width characters. */ @@ -74,7 +74,7 @@ export class PaymentRequest3d { * This reference allows linking multiple transactions to each other for reporting purposes (i.e. order auth-rate). The reference should be unique per billing cycle. The same merchant order reference should never be reused after the first authorised attempt. If used, this field should be supplied for all incoming authorisations. > We strongly recommend you send the `merchantOrderReference` value to benefit from linking payment requests when authorisation retries take place. In addition, we recommend you provide `retry.orderAttemptNumber`, `retry.chainAttemptNumber`, and `retry.skipRetry` values in `PaymentRequest.additionalData`. */ 'merchantOrderReference'?: string; - 'merchantRiskIndicator'?: MerchantRiskIndicator | null; + 'merchantRiskIndicator'?: MerchantRiskIndicator; /** * Metadata consists of entries, each of which includes a key and a value. Limits: * Maximum 20 key-value pairs per request. When exceeding, the \"177\" error occurs: \"Metadata size exceeds limit\". * Maximum 20 characters per key. * Maximum 80 characters per value. */ @@ -87,7 +87,7 @@ export class PaymentRequest3d { * Payment authorisation response returned by the card issuer. The `paResponse` field holds the PaRes value received from the card issuer. */ 'paResponse': string; - 'recurring'?: Recurring | null; + 'recurring'?: Recurring; /** * Defines a recurring payment type. Required when creating a token to store payment details or using stored payment details. Allowed values: * `Subscription` – A transaction for a fixed or variable amount, which follows a fixed schedule. * `CardOnFile` – With a card-on-file (CoF) transaction, card details are stored to enable one-click or omnichannel journeys, or simply to streamline the checkout process. Any subscription not following a fixed schedule is also considered a card-on-file transaction. * `UnscheduledCardOnFile` – An unscheduled card-on-file (UCoF) transaction is a transaction that occurs on a non-fixed schedule and/or have variable amounts. For example, automatic top-ups when a cardholder\'s balance drops below a certain amount. */ @@ -124,7 +124,7 @@ export class PaymentRequest3d { * The combination of a language code and a country code to specify the language to be used in the payment. */ 'shopperLocale'?: string; - 'shopperName'?: Name | null; + 'shopperName'?: Name; /** * Required for recurring payments. Your reference to uniquely identify this shopper, for example user ID or account ID. The value is case-sensitive and must be at least three characters. > Your reference must not include personally identifiable information (PII) such as name or email address. */ @@ -138,7 +138,7 @@ export class PaymentRequest3d { */ 'socialSecurityNumber'?: string; /** - * An array of objects specifying how the payment should be split when using either Adyen for Platforms for [marketplaces](https://docs.adyen.com/marketplaces/split-payments) or [platforms]((https://docs.adyen.com/platforms/split-payments), or standalone [Issuing](https://docs.adyen.com/issuing/add-manage-funds#split). + * An array of objects specifying how the payment should be split when using either Adyen for Platforms for [marketplaces](https://docs.adyen.com/marketplaces/split-payments) or [platforms](https://docs.adyen.com/platforms/split-payments), or standalone [Issuing](https://docs.adyen.com/issuing/add-manage-funds#split). */ 'splits'?: Array; /** @@ -149,11 +149,11 @@ export class PaymentRequest3d { * The shopper\'s telephone number. */ 'telephoneNumber'?: string; - 'threeDS2RequestData'?: ThreeDS2RequestData | null; + 'threeDS2RequestData'?: ThreeDS2RequestData; /** * If set to true, you will only perform the [3D Secure 2 authentication](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only), and not the payment authorisation. */ - 'threeDSAuthenticationOnly'?: boolean; + 'threeDSAuthenticationOnly'?: boolean = false; /** * The reference value to aggregate sales totals in reporting. When not specified, the store field is used (if available). */ @@ -169,12 +169,12 @@ export class PaymentRequest3d { { "name": "accountInfo", "baseName": "accountInfo", - "type": "AccountInfo | null" + "type": "AccountInfo" }, { "name": "additionalAmount", "baseName": "additionalAmount", - "type": "Amount | null" + "type": "Amount" }, { "name": "additionalData", @@ -184,22 +184,22 @@ export class PaymentRequest3d { { "name": "amount", "baseName": "amount", - "type": "Amount | null" + "type": "Amount" }, { "name": "applicationInfo", "baseName": "applicationInfo", - "type": "ApplicationInfo | null" + "type": "ApplicationInfo" }, { "name": "billingAddress", "baseName": "billingAddress", - "type": "Address | null" + "type": "Address" }, { "name": "browserInfo", "baseName": "browserInfo", - "type": "BrowserInfo | null" + "type": "BrowserInfo" }, { "name": "captureDelayHours", @@ -214,12 +214,12 @@ export class PaymentRequest3d { { "name": "dccQuote", "baseName": "dccQuote", - "type": "ForexQuote | null" + "type": "ForexQuote" }, { "name": "deliveryAddress", "baseName": "deliveryAddress", - "type": "Address | null" + "type": "Address" }, { "name": "deliveryDate", @@ -239,7 +239,7 @@ export class PaymentRequest3d { { "name": "installments", "baseName": "installments", - "type": "Installments | null" + "type": "Installments" }, { "name": "localizedShopperStatement", @@ -269,7 +269,7 @@ export class PaymentRequest3d { { "name": "merchantRiskIndicator", "baseName": "merchantRiskIndicator", - "type": "MerchantRiskIndicator | null" + "type": "MerchantRiskIndicator" }, { "name": "metadata", @@ -289,7 +289,7 @@ export class PaymentRequest3d { { "name": "recurring", "baseName": "recurring", - "type": "Recurring | null" + "type": "Recurring" }, { "name": "recurringProcessingModel", @@ -339,7 +339,7 @@ export class PaymentRequest3d { { "name": "shopperName", "baseName": "shopperName", - "type": "Name | null" + "type": "Name" }, { "name": "shopperReference", @@ -374,7 +374,7 @@ export class PaymentRequest3d { { "name": "threeDS2RequestData", "baseName": "threeDS2RequestData", - "type": "ThreeDS2RequestData | null" + "type": "ThreeDS2RequestData" }, { "name": "threeDSAuthenticationOnly", @@ -399,14 +399,14 @@ export class PaymentRequest3d { export namespace PaymentRequest3d { export enum RecurringProcessingModelEnum { - CardOnFile = 'CardOnFile', - Subscription = 'Subscription', - UnscheduledCardOnFile = 'UnscheduledCardOnFile' + CardOnFile = 'CardOnFile', + Subscription = 'Subscription', + UnscheduledCardOnFile = 'UnscheduledCardOnFile' } export enum ShopperInteractionEnum { - Ecommerce = 'Ecommerce', - ContAuth = 'ContAuth', - Moto = 'Moto', - Pos = 'POS' + Ecommerce = 'Ecommerce', + ContAuth = 'ContAuth', + Moto = 'Moto', + Pos = 'POS' } } diff --git a/src/typings/payment/paymentRequest3ds2.ts b/src/typings/payment/paymentRequest3ds2.ts index bc9ce9ba8..2b0070d39 100644 --- a/src/typings/payment/paymentRequest3ds2.ts +++ b/src/typings/payment/paymentRequest3ds2.ts @@ -22,16 +22,16 @@ import { ThreeDS2RequestData } from './threeDS2RequestData'; import { ThreeDS2Result } from './threeDS2Result'; export class PaymentRequest3ds2 { - 'accountInfo'?: AccountInfo | null; - 'additionalAmount'?: Amount | null; + 'accountInfo'?: AccountInfo; + 'additionalAmount'?: Amount; /** * This field contains additional data, which may be required for a particular payment request. The `additionalData` object consists of entries, each of which includes the key and value. */ 'additionalData'?: { [key: string]: string; }; 'amount': Amount; - 'applicationInfo'?: ApplicationInfo | null; - 'billingAddress'?: Address | null; - 'browserInfo'?: BrowserInfo | null; + 'applicationInfo'?: ApplicationInfo; + 'billingAddress'?: Address; + 'browserInfo'?: BrowserInfo; /** * The delay between the authorisation and scheduled auto-capture, specified in hours. */ @@ -40,8 +40,8 @@ export class PaymentRequest3ds2 { * The shopper\'s date of birth. Format [ISO-8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DD */ 'dateOfBirth'?: string; - 'dccQuote'?: ForexQuote | null; - 'deliveryAddress'?: Address | null; + 'dccQuote'?: ForexQuote; + 'deliveryAddress'?: Address; /** * The date and time the purchased goods should be delivered. Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DDThh:mm:ss.sssTZD Example: 2017-07-17T13:42:40.428+01:00 */ @@ -54,7 +54,7 @@ export class PaymentRequest3ds2 { * An integer value that is added to the normal fraud score. The value can be either positive or negative. */ 'fraudOffset'?: number; - 'installments'?: Installments | null; + 'installments'?: Installments; /** * The `localizedShopperStatement` field lets you use dynamic values for your shopper statement in a local character set. If not supplied, left empty, or for cross-border transactions, **shopperStatement** is used. Adyen currently supports the ja-Kana character set for Visa and Mastercard payments in Japan using Japanese cards. This character set supports: * UTF-8 based Katakana, capital letters, numbers and special characters. * Half-width or full-width characters. */ @@ -71,7 +71,7 @@ export class PaymentRequest3ds2 { * This reference allows linking multiple transactions to each other for reporting purposes (i.e. order auth-rate). The reference should be unique per billing cycle. The same merchant order reference should never be reused after the first authorised attempt. If used, this field should be supplied for all incoming authorisations. > We strongly recommend you send the `merchantOrderReference` value to benefit from linking payment requests when authorisation retries take place. In addition, we recommend you provide `retry.orderAttemptNumber`, `retry.chainAttemptNumber`, and `retry.skipRetry` values in `PaymentRequest.additionalData`. */ 'merchantOrderReference'?: string; - 'merchantRiskIndicator'?: MerchantRiskIndicator | null; + 'merchantRiskIndicator'?: MerchantRiskIndicator; /** * Metadata consists of entries, each of which includes a key and a value. Limits: * Maximum 20 key-value pairs per request. When exceeding, the \"177\" error occurs: \"Metadata size exceeds limit\". * Maximum 20 characters per key. * Maximum 80 characters per value. */ @@ -80,7 +80,7 @@ export class PaymentRequest3ds2 { * When you are doing multiple partial (gift card) payments, this is the `pspReference` of the first payment. We use this to link the multiple payments to each other. As your own reference for linking multiple payments, use the `merchantOrderReference`instead. */ 'orderReference'?: string; - 'recurring'?: Recurring | null; + 'recurring'?: Recurring; /** * Defines a recurring payment type. Required when creating a token to store payment details or using stored payment details. Allowed values: * `Subscription` – A transaction for a fixed or variable amount, which follows a fixed schedule. * `CardOnFile` – With a card-on-file (CoF) transaction, card details are stored to enable one-click or omnichannel journeys, or simply to streamline the checkout process. Any subscription not following a fixed schedule is also considered a card-on-file transaction. * `UnscheduledCardOnFile` – An unscheduled card-on-file (UCoF) transaction is a transaction that occurs on a non-fixed schedule and/or have variable amounts. For example, automatic top-ups when a cardholder\'s balance drops below a certain amount. */ @@ -117,7 +117,7 @@ export class PaymentRequest3ds2 { * The combination of a language code and a country code to specify the language to be used in the payment. */ 'shopperLocale'?: string; - 'shopperName'?: Name | null; + 'shopperName'?: Name; /** * Required for recurring payments. Your reference to uniquely identify this shopper, for example user ID or account ID. The value is case-sensitive and must be at least three characters. > Your reference must not include personally identifiable information (PII) such as name or email address. */ @@ -131,7 +131,7 @@ export class PaymentRequest3ds2 { */ 'socialSecurityNumber'?: string; /** - * An array of objects specifying how the payment should be split when using either Adyen for Platforms for [marketplaces](https://docs.adyen.com/marketplaces/split-payments) or [platforms]((https://docs.adyen.com/platforms/split-payments), or standalone [Issuing](https://docs.adyen.com/issuing/add-manage-funds#split). + * An array of objects specifying how the payment should be split when using either Adyen for Platforms for [marketplaces](https://docs.adyen.com/marketplaces/split-payments) or [platforms](https://docs.adyen.com/platforms/split-payments), or standalone [Issuing](https://docs.adyen.com/issuing/add-manage-funds#split). */ 'splits'?: Array; /** @@ -142,8 +142,8 @@ export class PaymentRequest3ds2 { * The shopper\'s telephone number. */ 'telephoneNumber'?: string; - 'threeDS2RequestData'?: ThreeDS2RequestData | null; - 'threeDS2Result'?: ThreeDS2Result | null; + 'threeDS2RequestData'?: ThreeDS2RequestData; + 'threeDS2Result'?: ThreeDS2Result; /** * The ThreeDS2Token that was returned in the /authorise call. */ @@ -151,7 +151,7 @@ export class PaymentRequest3ds2 { /** * If set to true, you will only perform the [3D Secure 2 authentication](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only), and not the payment authorisation. */ - 'threeDSAuthenticationOnly'?: boolean; + 'threeDSAuthenticationOnly'?: boolean = false; /** * The reference value to aggregate sales totals in reporting. When not specified, the store field is used (if available). */ @@ -167,12 +167,12 @@ export class PaymentRequest3ds2 { { "name": "accountInfo", "baseName": "accountInfo", - "type": "AccountInfo | null" + "type": "AccountInfo" }, { "name": "additionalAmount", "baseName": "additionalAmount", - "type": "Amount | null" + "type": "Amount" }, { "name": "additionalData", @@ -187,17 +187,17 @@ export class PaymentRequest3ds2 { { "name": "applicationInfo", "baseName": "applicationInfo", - "type": "ApplicationInfo | null" + "type": "ApplicationInfo" }, { "name": "billingAddress", "baseName": "billingAddress", - "type": "Address | null" + "type": "Address" }, { "name": "browserInfo", "baseName": "browserInfo", - "type": "BrowserInfo | null" + "type": "BrowserInfo" }, { "name": "captureDelayHours", @@ -212,12 +212,12 @@ export class PaymentRequest3ds2 { { "name": "dccQuote", "baseName": "dccQuote", - "type": "ForexQuote | null" + "type": "ForexQuote" }, { "name": "deliveryAddress", "baseName": "deliveryAddress", - "type": "Address | null" + "type": "Address" }, { "name": "deliveryDate", @@ -237,7 +237,7 @@ export class PaymentRequest3ds2 { { "name": "installments", "baseName": "installments", - "type": "Installments | null" + "type": "Installments" }, { "name": "localizedShopperStatement", @@ -262,7 +262,7 @@ export class PaymentRequest3ds2 { { "name": "merchantRiskIndicator", "baseName": "merchantRiskIndicator", - "type": "MerchantRiskIndicator | null" + "type": "MerchantRiskIndicator" }, { "name": "metadata", @@ -277,7 +277,7 @@ export class PaymentRequest3ds2 { { "name": "recurring", "baseName": "recurring", - "type": "Recurring | null" + "type": "Recurring" }, { "name": "recurringProcessingModel", @@ -327,7 +327,7 @@ export class PaymentRequest3ds2 { { "name": "shopperName", "baseName": "shopperName", - "type": "Name | null" + "type": "Name" }, { "name": "shopperReference", @@ -362,12 +362,12 @@ export class PaymentRequest3ds2 { { "name": "threeDS2RequestData", "baseName": "threeDS2RequestData", - "type": "ThreeDS2RequestData | null" + "type": "ThreeDS2RequestData" }, { "name": "threeDS2Result", "baseName": "threeDS2Result", - "type": "ThreeDS2Result | null" + "type": "ThreeDS2Result" }, { "name": "threeDS2Token", @@ -397,14 +397,14 @@ export class PaymentRequest3ds2 { export namespace PaymentRequest3ds2 { export enum RecurringProcessingModelEnum { - CardOnFile = 'CardOnFile', - Subscription = 'Subscription', - UnscheduledCardOnFile = 'UnscheduledCardOnFile' + CardOnFile = 'CardOnFile', + Subscription = 'Subscription', + UnscheduledCardOnFile = 'UnscheduledCardOnFile' } export enum ShopperInteractionEnum { - Ecommerce = 'Ecommerce', - ContAuth = 'ContAuth', - Moto = 'Moto', - Pos = 'POS' + Ecommerce = 'Ecommerce', + ContAuth = 'ContAuth', + Moto = 'Moto', + Pos = 'POS' } } diff --git a/src/typings/payment/paymentResult.ts b/src/typings/payment/paymentResult.ts index fa948facf..e51b53071 100644 --- a/src/typings/payment/paymentResult.ts +++ b/src/typings/payment/paymentResult.ts @@ -19,12 +19,12 @@ export class PaymentResult { * Authorisation code: * When the payment is authorised successfully, this field holds the authorisation code for the payment. * When the payment is not authorised, this field is empty. */ 'authCode'?: string; - 'dccAmount'?: Amount | null; + 'dccAmount'?: Amount; /** * Cryptographic signature used to verify `dccQuote`. > This value only applies if you have implemented Dynamic Currency Conversion. For more information, [contact Support](https://www.adyen.help/hc/en-us/requests/new). */ 'dccSignature'?: string; - 'fraudResult'?: FraudResult | null; + 'fraudResult'?: FraudResult; /** * The URL to direct the shopper to. > In case of SecurePlus, do not redirect a shopper to this URL. */ @@ -66,7 +66,7 @@ export class PaymentResult { { "name": "dccAmount", "baseName": "dccAmount", - "type": "Amount | null" + "type": "Amount" }, { "name": "dccSignature", @@ -76,7 +76,7 @@ export class PaymentResult { { "name": "fraudResult", "baseName": "fraudResult", - "type": "FraudResult | null" + "type": "FraudResult" }, { "name": "issuerUrl", @@ -116,19 +116,19 @@ export class PaymentResult { export namespace PaymentResult { export enum ResultCodeEnum { - AuthenticationFinished = 'AuthenticationFinished', - AuthenticationNotRequired = 'AuthenticationNotRequired', - Authorised = 'Authorised', - Cancelled = 'Cancelled', - ChallengeShopper = 'ChallengeShopper', - Error = 'Error', - IdentifyShopper = 'IdentifyShopper', - PartiallyAuthorised = 'PartiallyAuthorised', - Pending = 'Pending', - PresentToShopper = 'PresentToShopper', - Received = 'Received', - RedirectShopper = 'RedirectShopper', - Refused = 'Refused', - Success = 'Success' + AuthenticationFinished = 'AuthenticationFinished', + AuthenticationNotRequired = 'AuthenticationNotRequired', + Authorised = 'Authorised', + Cancelled = 'Cancelled', + ChallengeShopper = 'ChallengeShopper', + Error = 'Error', + IdentifyShopper = 'IdentifyShopper', + PartiallyAuthorised = 'PartiallyAuthorised', + Pending = 'Pending', + PresentToShopper = 'PresentToShopper', + Received = 'Received', + RedirectShopper = 'RedirectShopper', + Refused = 'Refused', + Success = 'Success' } } diff --git a/src/typings/payment/platformChargebackLogic.ts b/src/typings/payment/platformChargebackLogic.ts index 77ee55922..a4aeebb28 100644 --- a/src/typings/payment/platformChargebackLogic.ts +++ b/src/typings/payment/platformChargebackLogic.ts @@ -48,8 +48,8 @@ export class PlatformChargebackLogic { export namespace PlatformChargebackLogic { export enum BehaviorEnum { - DeductAccordingToSplitRatio = 'deductAccordingToSplitRatio', - DeductFromLiableAccount = 'deductFromLiableAccount', - DeductFromOneBalanceAccount = 'deductFromOneBalanceAccount' + DeductAccordingToSplitRatio = 'deductAccordingToSplitRatio', + DeductFromLiableAccount = 'deductFromLiableAccount', + DeductFromOneBalanceAccount = 'deductFromOneBalanceAccount' } } diff --git a/src/typings/payment/recurring.ts b/src/typings/payment/recurring.ts index a65fef7c6..9eb5e7b5e 100644 --- a/src/typings/payment/recurring.ts +++ b/src/typings/payment/recurring.ts @@ -66,14 +66,14 @@ export class Recurring { export namespace Recurring { export enum ContractEnum { - Oneclick = 'ONECLICK', - Recurring = 'RECURRING', - Payout = 'PAYOUT' + Oneclick = 'ONECLICK', + Recurring = 'RECURRING', + Payout = 'PAYOUT' } export enum TokenServiceEnum { - Visatokenservice = 'VISATOKENSERVICE', - Mctokenservice = 'MCTOKENSERVICE', - Amextokenservice = 'AMEXTOKENSERVICE', - TokenSharing = 'TOKEN_SHARING' + Visatokenservice = 'VISATOKENSERVICE', + Mctokenservice = 'MCTOKENSERVICE', + Amextokenservice = 'AMEXTOKENSERVICE', + TokenSharing = 'TOKEN_SHARING' } } diff --git a/src/typings/payment/refundRequest.ts b/src/typings/payment/refundRequest.ts index 094db6201..32541db86 100644 --- a/src/typings/payment/refundRequest.ts +++ b/src/typings/payment/refundRequest.ts @@ -22,7 +22,7 @@ export class RefundRequest { */ 'merchantAccount': string; 'modificationAmount': Amount; - 'mpiData'?: ThreeDSecureData | null; + 'mpiData'?: ThreeDSecureData; /** * The original merchant reference to cancel. */ @@ -31,7 +31,7 @@ export class RefundRequest { * The original pspReference of the payment to modify. This reference is returned in: * authorisation response * authorisation notification */ 'originalReference': string; - 'platformChargebackLogic'?: PlatformChargebackLogic | null; + 'platformChargebackLogic'?: PlatformChargebackLogic; /** * Your reference for the payment modification. This reference is visible in Customer Area and in reports. Maximum length: 80 characters. */ @@ -70,7 +70,7 @@ export class RefundRequest { { "name": "mpiData", "baseName": "mpiData", - "type": "ThreeDSecureData | null" + "type": "ThreeDSecureData" }, { "name": "originalMerchantReference", @@ -85,7 +85,7 @@ export class RefundRequest { { "name": "platformChargebackLogic", "baseName": "platformChargebackLogic", - "type": "PlatformChargebackLogic | null" + "type": "PlatformChargebackLogic" }, { "name": "reference", diff --git a/src/typings/payment/responseAdditionalDataCard.ts b/src/typings/payment/responseAdditionalDataCard.ts index edd3b3df3..e89a9ba58 100644 --- a/src/typings/payment/responseAdditionalDataCard.ts +++ b/src/typings/payment/responseAdditionalDataCard.ts @@ -102,16 +102,16 @@ export class ResponseAdditionalDataCard { export namespace ResponseAdditionalDataCard { export enum CardProductIdEnum { - A = 'A', - B = 'B', - C = 'C', - D = 'D', - F = 'F', - Mcc = 'MCC', - Mce = 'MCE', - Mcf = 'MCF', - Mcg = 'MCG', - Mch = 'MCH', - Mci = 'MCI' + A = 'A', + B = 'B', + C = 'C', + D = 'D', + F = 'F', + Mcc = 'MCC', + Mce = 'MCE', + Mcf = 'MCF', + Mcg = 'MCG', + Mch = 'MCH', + Mci = 'MCI' } } diff --git a/src/typings/payment/responseAdditionalDataCommon.ts b/src/typings/payment/responseAdditionalDataCommon.ts index 164ca4831..8188528d0 100644 --- a/src/typings/payment/responseAdditionalDataCommon.ts +++ b/src/typings/payment/responseAdditionalDataCommon.ts @@ -179,10 +179,16 @@ export class ResponseAdditionalDataCommon { 'recurring_firstPspReference'?: string; /** * The reference that uniquely identifies the recurring transaction. + * + * @deprecated since Adyen Payment API v68 + * Use tokenization.storedPaymentMethodId instead. */ 'recurring_recurringDetailReference'?: string; /** * The provided reference of the shopper for a recurring transaction. + * + * @deprecated since Adyen Payment API v68 + * Use tokenization.shopperReference instead. */ 'recurring_shopperReference'?: string; /** @@ -238,11 +244,11 @@ export class ResponseAdditionalDataCommon { */ 'threeDSVersion'?: string; /** - * The provided reference of the shopper. + * The reference for the shopper that you sent when tokenizing the payment details. */ 'tokenization_shopperReference'?: string; /** - * The store operation performed on the token. + * The operation performed on the token. Possible values: * **created**: the token has been created. * **updated**: the existing token has been updated. * **alreadyExisting**: the details have already been stored. */ 'tokenization_store_operationType'?: ResponseAdditionalDataCommon.TokenizationStoreOperationTypeEnum; /** @@ -579,17 +585,17 @@ export class ResponseAdditionalDataCommon { export namespace ResponseAdditionalDataCommon { export enum FraudResultTypeEnum { - Green = 'GREEN', - Fraud = 'FRAUD' + Green = 'GREEN', + Fraud = 'FRAUD' } export enum RecurringProcessingModelEnum { - CardOnFile = 'CardOnFile', - Subscription = 'Subscription', - UnscheduledCardOnFile = 'UnscheduledCardOnFile' + CardOnFile = 'CardOnFile', + Subscription = 'Subscription', + UnscheduledCardOnFile = 'UnscheduledCardOnFile' } export enum TokenizationStoreOperationTypeEnum { - Created = 'created', - Updated = 'updated', - AlreadyStored = 'alreadyStored' + Created = 'created', + Updated = 'updated', + AlreadyExisting = 'alreadyExisting' } } diff --git a/src/typings/payment/secureRemoteCommerceCheckoutData.ts b/src/typings/payment/secureRemoteCommerceCheckoutData.ts index bee24da2d..e6b342381 100644 --- a/src/typings/payment/secureRemoteCommerceCheckoutData.ts +++ b/src/typings/payment/secureRemoteCommerceCheckoutData.ts @@ -75,7 +75,7 @@ export class SecureRemoteCommerceCheckoutData { export namespace SecureRemoteCommerceCheckoutData { export enum SchemeEnum { - Mc = 'mc', - Visa = 'visa' + Mc = 'mc', + Visa = 'visa' } } diff --git a/src/typings/payment/split.ts b/src/typings/payment/split.ts index 95e1bd26a..e6987cf42 100644 --- a/src/typings/payment/split.ts +++ b/src/typings/payment/split.ts @@ -14,7 +14,7 @@ export class Split { * The unique identifier of the account to which the split amount is booked. Required if `type` is **MarketPlace** or **BalanceAccount**. * [Classic Platforms integration](https://docs.adyen.com/classic-platforms): The [`accountCode`](https://docs.adyen.com/api-explorer/Account/latest/post/updateAccount#request-accountCode) of the account to which the split amount is booked. * [Balance Platform](https://docs.adyen.com/adyen-for-platforms-model): The [`balanceAccountId`](https://docs.adyen.com/api-explorer/balanceplatform/latest/get/balanceAccounts/_id_#path-id) of the account to which the split amount is booked. */ 'account'?: string; - 'amount'?: SplitAmount | null; + 'amount'?: SplitAmount; /** * Your description for the split item. */ @@ -39,7 +39,7 @@ export class Split { { "name": "amount", "baseName": "amount", - "type": "SplitAmount | null" + "type": "SplitAmount" }, { "name": "description", @@ -64,21 +64,21 @@ export class Split { export namespace Split { export enum TypeEnum { - AcquiringFees = 'AcquiringFees', - AdyenCommission = 'AdyenCommission', - AdyenFees = 'AdyenFees', - AdyenMarkup = 'AdyenMarkup', - BalanceAccount = 'BalanceAccount', - Commission = 'Commission', - Default = 'Default', - Interchange = 'Interchange', - MarketPlace = 'MarketPlace', - PaymentFee = 'PaymentFee', - Remainder = 'Remainder', - SchemeFee = 'SchemeFee', - Surcharge = 'Surcharge', - Tip = 'Tip', - TopUp = 'TopUp', - Vat = 'VAT' + AcquiringFees = 'AcquiringFees', + AdyenCommission = 'AdyenCommission', + AdyenFees = 'AdyenFees', + AdyenMarkup = 'AdyenMarkup', + BalanceAccount = 'BalanceAccount', + Commission = 'Commission', + Default = 'Default', + Interchange = 'Interchange', + MarketPlace = 'MarketPlace', + PaymentFee = 'PaymentFee', + Remainder = 'Remainder', + SchemeFee = 'SchemeFee', + Surcharge = 'Surcharge', + Tip = 'Tip', + TopUp = 'TopUp', + Vat = 'VAT' } } diff --git a/src/typings/payment/technicalCancelRequest.ts b/src/typings/payment/technicalCancelRequest.ts index 0cf3ab704..4c82fd7af 100644 --- a/src/typings/payment/technicalCancelRequest.ts +++ b/src/typings/payment/technicalCancelRequest.ts @@ -21,13 +21,13 @@ export class TechnicalCancelRequest { * The merchant account that is used to process the payment. */ 'merchantAccount': string; - 'modificationAmount'?: Amount | null; - 'mpiData'?: ThreeDSecureData | null; + 'modificationAmount'?: Amount; + 'mpiData'?: ThreeDSecureData; /** * The original merchant reference to cancel. */ 'originalMerchantReference': string; - 'platformChargebackLogic'?: PlatformChargebackLogic | null; + 'platformChargebackLogic'?: PlatformChargebackLogic; /** * Your reference for the payment modification. This reference is visible in Customer Area and in reports. Maximum length: 80 characters. */ @@ -61,12 +61,12 @@ export class TechnicalCancelRequest { { "name": "modificationAmount", "baseName": "modificationAmount", - "type": "Amount | null" + "type": "Amount" }, { "name": "mpiData", "baseName": "mpiData", - "type": "ThreeDSecureData | null" + "type": "ThreeDSecureData" }, { "name": "originalMerchantReference", @@ -76,7 +76,7 @@ export class TechnicalCancelRequest { { "name": "platformChargebackLogic", "baseName": "platformChargebackLogic", - "type": "PlatformChargebackLogic | null" + "type": "PlatformChargebackLogic" }, { "name": "reference", diff --git a/src/typings/payment/threeDS2RequestData.ts b/src/typings/payment/threeDS2RequestData.ts index 09ecb4511..a253fafbd 100644 --- a/src/typings/payment/threeDS2RequestData.ts +++ b/src/typings/payment/threeDS2RequestData.ts @@ -15,7 +15,7 @@ import { ThreeDSRequestorAuthenticationInfo } from './threeDSRequestorAuthentica import { ThreeDSRequestorPriorAuthenticationInfo } from './threeDSRequestorPriorAuthenticationInfo'; export class ThreeDS2RequestData { - 'acctInfo'?: AcctInfo | null; + 'acctInfo'?: AcctInfo; /** * Indicates the type of account. For example, for a multi-account card product. Length: 2 characters. Allowed values: * **01** — Not applicable * **02** — Credit * **03** — Debit */ @@ -38,7 +38,7 @@ export class ThreeDS2RequestData { * @deprecated since Adyen Payment API v50 * Use `threeDSAuthenticationOnly` instead. */ - 'authenticationOnly'?: boolean; + 'authenticationOnly'?: boolean = false; /** * Possibility to specify a preference for receiving a challenge from the issuer. Allowed values: * `noPreference` * `requestNoChallenge` * `requestChallenge` * `requestChallengeAsMandate` * @@ -50,8 +50,8 @@ export class ThreeDS2RequestData { * The environment of the shopper. Allowed values: * `app` * `browser` */ 'deviceChannel': string; - 'deviceRenderOptions'?: DeviceRenderOptions | null; - 'homePhone'?: Phone | null; + 'deviceRenderOptions'?: DeviceRenderOptions; + 'homePhone'?: Phone; /** * Required for merchants that have been enrolled for 3D Secure 2 by another party than Adyen, mostly [authentication-only integrations](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only). The `mcc` is a four-digit code with which the previously given `acquirerMerchantID` is registered at the scheme. */ @@ -64,7 +64,7 @@ export class ThreeDS2RequestData { * The `messageVersion` value indicating the 3D Secure 2 protocol version. */ 'messageVersion'?: string; - 'mobilePhone'?: Phone | null; + 'mobilePhone'?: Phone; /** * URL to where the issuer should send the `CRes`. Required if you are not using components for `channel` **Web** or if you are using classic integration `deviceChannel` **browser**. */ @@ -97,11 +97,11 @@ export class ThreeDS2RequestData { * The `sdkEncData` value as received from the 3D Secure 2 SDK. Required for `deviceChannel` set to **app**. */ 'sdkEncData'?: string; - 'sdkEphemPubKey'?: SDKEphemPubKey | null; + 'sdkEphemPubKey'?: SDKEphemPubKey; /** * The maximum amount of time in minutes for the 3D Secure 2 authentication process. Optional and only for `deviceChannel` set to **app**. Defaults to **60** minutes. */ - 'sdkMaxTimeout'?: number; + 'sdkMaxTimeout'?: number = 60; /** * The `sdkReferenceNumber` value as received from the 3D Secure 2 SDK. Only for `deviceChannel` set to **app**. */ @@ -122,7 +122,7 @@ export class ThreeDS2RequestData { * Indicates the type of Authentication request. */ 'threeDSRequestorAuthenticationInd'?: string; - 'threeDSRequestorAuthenticationInfo'?: ThreeDSRequestorAuthenticationInfo | null; + 'threeDSRequestorAuthenticationInfo'?: ThreeDSRequestorAuthenticationInfo; /** * Indicates whether a challenge is requested for this transaction. Possible values: * **01** — No preference * **02** — No challenge requested * **03** — Challenge requested (3DS Requestor preference) * **04** — Challenge requested (Mandate) * **05** — No challenge (transactional risk analysis is already performed) * **06** — Data Only */ @@ -135,7 +135,7 @@ export class ThreeDS2RequestData { * Required for [authentication-only integration](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only) for Visa. Unique 3D Secure requestor name assigned by the Directory Server when you enrol for 3D Secure 2. */ 'threeDSRequestorName'?: string; - 'threeDSRequestorPriorAuthenticationInfo'?: ThreeDSRequestorPriorAuthenticationInfo | null; + 'threeDSRequestorPriorAuthenticationInfo'?: ThreeDSRequestorPriorAuthenticationInfo; /** * URL of the (customer service) website that will be shown to the shopper in case of technical errors during the 3D Secure 2 process. */ @@ -152,7 +152,7 @@ export class ThreeDS2RequestData { * The `whiteListStatus` value returned from a previous 3D Secure 2 transaction, only applicable for 3D Secure 2 protocol version 2.2.0. */ 'whiteListStatus'?: string; - 'workPhone'?: Phone | null; + 'workPhone'?: Phone; static discriminator: string | undefined = undefined; @@ -160,7 +160,7 @@ export class ThreeDS2RequestData { { "name": "acctInfo", "baseName": "acctInfo", - "type": "AcctInfo | null" + "type": "AcctInfo" }, { "name": "acctType", @@ -200,12 +200,12 @@ export class ThreeDS2RequestData { { "name": "deviceRenderOptions", "baseName": "deviceRenderOptions", - "type": "DeviceRenderOptions | null" + "type": "DeviceRenderOptions" }, { "name": "homePhone", "baseName": "homePhone", - "type": "Phone | null" + "type": "Phone" }, { "name": "mcc", @@ -225,7 +225,7 @@ export class ThreeDS2RequestData { { "name": "mobilePhone", "baseName": "mobilePhone", - "type": "Phone | null" + "type": "Phone" }, { "name": "notificationURL", @@ -270,7 +270,7 @@ export class ThreeDS2RequestData { { "name": "sdkEphemPubKey", "baseName": "sdkEphemPubKey", - "type": "SDKEphemPubKey | null" + "type": "SDKEphemPubKey" }, { "name": "sdkMaxTimeout", @@ -305,7 +305,7 @@ export class ThreeDS2RequestData { { "name": "threeDSRequestorAuthenticationInfo", "baseName": "threeDSRequestorAuthenticationInfo", - "type": "ThreeDSRequestorAuthenticationInfo | null" + "type": "ThreeDSRequestorAuthenticationInfo" }, { "name": "threeDSRequestorChallengeInd", @@ -325,7 +325,7 @@ export class ThreeDS2RequestData { { "name": "threeDSRequestorPriorAuthenticationInfo", "baseName": "threeDSRequestorPriorAuthenticationInfo", - "type": "ThreeDSRequestorPriorAuthenticationInfo | null" + "type": "ThreeDSRequestorPriorAuthenticationInfo" }, { "name": "threeDSRequestorURL", @@ -350,7 +350,7 @@ export class ThreeDS2RequestData { { "name": "workPhone", "baseName": "workPhone", - "type": "Phone | null" + "type": "Phone" } ]; static getAttributeTypeMap() { @@ -360,40 +360,40 @@ export class ThreeDS2RequestData { export namespace ThreeDS2RequestData { export enum AcctTypeEnum { - _01 = '01', - _02 = '02', - _03 = '03' + _01 = '01', + _02 = '02', + _03 = '03' } export enum AddrMatchEnum { - Y = 'Y', - N = 'N' + Y = 'Y', + N = 'N' } export enum ChallengeIndicatorEnum { - NoPreference = 'noPreference', - RequestNoChallenge = 'requestNoChallenge', - RequestChallenge = 'requestChallenge', - RequestChallengeAsMandate = 'requestChallengeAsMandate' + NoPreference = 'noPreference', + RequestNoChallenge = 'requestNoChallenge', + RequestChallenge = 'requestChallenge', + RequestChallengeAsMandate = 'requestChallengeAsMandate' } export enum ThreeDSRequestorChallengeIndEnum { - _01 = '01', - _02 = '02', - _03 = '03', - _04 = '04', - _05 = '05', - _06 = '06' + _01 = '01', + _02 = '02', + _03 = '03', + _04 = '04', + _05 = '05', + _06 = '06' } export enum TransTypeEnum { - _01 = '01', - _03 = '03', - _10 = '10', - _11 = '11', - _28 = '28' + _01 = '01', + _03 = '03', + _10 = '10', + _11 = '11', + _28 = '28' } export enum TransactionTypeEnum { - GoodsOrServicePurchase = 'goodsOrServicePurchase', - CheckAcceptance = 'checkAcceptance', - AccountFunding = 'accountFunding', - QuasiCashTransaction = 'quasiCashTransaction', - PrepaidActivationAndLoad = 'prepaidActivationAndLoad' + GoodsOrServicePurchase = 'goodsOrServicePurchase', + CheckAcceptance = 'checkAcceptance', + AccountFunding = 'accountFunding', + QuasiCashTransaction = 'quasiCashTransaction', + PrepaidActivationAndLoad = 'prepaidActivationAndLoad' } } diff --git a/src/typings/payment/threeDS2Result.ts b/src/typings/payment/threeDS2Result.ts index b18afab96..e4d710851 100644 --- a/src/typings/payment/threeDS2Result.ts +++ b/src/typings/payment/threeDS2Result.ts @@ -147,26 +147,26 @@ export class ThreeDS2Result { export namespace ThreeDS2Result { export enum ChallengeCancelEnum { - _01 = '01', - _02 = '02', - _03 = '03', - _04 = '04', - _05 = '05', - _06 = '06', - _07 = '07' + _01 = '01', + _02 = '02', + _03 = '03', + _04 = '04', + _05 = '05', + _06 = '06', + _07 = '07' } export enum ExemptionIndicatorEnum { - LowValue = 'lowValue', - SecureCorporate = 'secureCorporate', - TrustedBeneficiary = 'trustedBeneficiary', - TransactionRiskAnalysis = 'transactionRiskAnalysis' + LowValue = 'lowValue', + SecureCorporate = 'secureCorporate', + TrustedBeneficiary = 'trustedBeneficiary', + TransactionRiskAnalysis = 'transactionRiskAnalysis' } export enum ThreeDSRequestorChallengeIndEnum { - _01 = '01', - _02 = '02', - _03 = '03', - _04 = '04', - _05 = '05', - _06 = '06' + _01 = '01', + _02 = '02', + _03 = '03', + _04 = '04', + _05 = '05', + _06 = '06' } } diff --git a/src/typings/payment/threeDS2ResultResponse.ts b/src/typings/payment/threeDS2ResultResponse.ts index d00f6147f..4570be2ae 100644 --- a/src/typings/payment/threeDS2ResultResponse.ts +++ b/src/typings/payment/threeDS2ResultResponse.ts @@ -10,7 +10,7 @@ import { ThreeDS2Result } from './threeDS2Result'; export class ThreeDS2ResultResponse { - 'threeDS2Result'?: ThreeDS2Result | null; + 'threeDS2Result'?: ThreeDS2Result; static discriminator: string | undefined = undefined; @@ -18,7 +18,7 @@ export class ThreeDS2ResultResponse { { "name": "threeDS2Result", "baseName": "threeDS2Result", - "type": "ThreeDS2Result | null" + "type": "ThreeDS2Result" } ]; static getAttributeTypeMap() { diff --git a/src/typings/payment/threeDSRequestorAuthenticationInfo.ts b/src/typings/payment/threeDSRequestorAuthenticationInfo.ts index 9ada40ec4..9d6e2331a 100644 --- a/src/typings/payment/threeDSRequestorAuthenticationInfo.ts +++ b/src/typings/payment/threeDSRequestorAuthenticationInfo.ts @@ -48,11 +48,11 @@ export class ThreeDSRequestorAuthenticationInfo { export namespace ThreeDSRequestorAuthenticationInfo { export enum ThreeDSReqAuthMethodEnum { - _01 = '01', - _02 = '02', - _03 = '03', - _04 = '04', - _05 = '05', - _06 = '06' + _01 = '01', + _02 = '02', + _03 = '03', + _04 = '04', + _05 = '05', + _06 = '06' } } diff --git a/src/typings/payment/threeDSRequestorPriorAuthenticationInfo.ts b/src/typings/payment/threeDSRequestorPriorAuthenticationInfo.ts index edcbf58fd..ada64c437 100644 --- a/src/typings/payment/threeDSRequestorPriorAuthenticationInfo.ts +++ b/src/typings/payment/threeDSRequestorPriorAuthenticationInfo.ts @@ -57,9 +57,9 @@ export class ThreeDSRequestorPriorAuthenticationInfo { export namespace ThreeDSRequestorPriorAuthenticationInfo { export enum ThreeDSReqPriorAuthMethodEnum { - _01 = '01', - _02 = '02', - _03 = '03', - _04 = '04' + _01 = '01', + _02 = '02', + _03 = '03', + _04 = '04' } } diff --git a/src/typings/payment/threeDSecureData.ts b/src/typings/payment/threeDSecureData.ts index d627d0d15..895c73e1c 100644 --- a/src/typings/payment/threeDSecureData.ts +++ b/src/typings/payment/threeDSecureData.ts @@ -129,28 +129,28 @@ export class ThreeDSecureData { export namespace ThreeDSecureData { export enum AuthenticationResponseEnum { - Y = 'Y', - N = 'N', - U = 'U', - A = 'A' + Y = 'Y', + N = 'N', + U = 'U', + A = 'A' } export enum ChallengeCancelEnum { - _01 = '01', - _02 = '02', - _03 = '03', - _04 = '04', - _05 = '05', - _06 = '06', - _07 = '07' + _01 = '01', + _02 = '02', + _03 = '03', + _04 = '04', + _05 = '05', + _06 = '06', + _07 = '07' } export enum DirectoryResponseEnum { - A = 'A', - C = 'C', - D = 'D', - I = 'I', - N = 'N', - R = 'R', - U = 'U', - Y = 'Y' + A = 'A', + C = 'C', + D = 'D', + I = 'I', + N = 'N', + R = 'R', + U = 'U', + Y = 'Y' } } diff --git a/src/typings/payment/voidPendingRefundRequest.ts b/src/typings/payment/voidPendingRefundRequest.ts index 3badce197..aef269317 100644 --- a/src/typings/payment/voidPendingRefundRequest.ts +++ b/src/typings/payment/voidPendingRefundRequest.ts @@ -21,8 +21,8 @@ export class VoidPendingRefundRequest { * The merchant account that is used to process the payment. */ 'merchantAccount': string; - 'modificationAmount'?: Amount | null; - 'mpiData'?: ThreeDSecureData | null; + 'modificationAmount'?: Amount; + 'mpiData'?: ThreeDSecureData; /** * The original merchant reference to cancel. */ @@ -31,7 +31,7 @@ export class VoidPendingRefundRequest { * The original pspReference of the payment to modify. This reference is returned in: * authorisation response * authorisation notification */ 'originalReference'?: string; - 'platformChargebackLogic'?: PlatformChargebackLogic | null; + 'platformChargebackLogic'?: PlatformChargebackLogic; /** * Your reference for the payment modification. This reference is visible in Customer Area and in reports. Maximum length: 80 characters. */ @@ -65,12 +65,12 @@ export class VoidPendingRefundRequest { { "name": "modificationAmount", "baseName": "modificationAmount", - "type": "Amount | null" + "type": "Amount" }, { "name": "mpiData", "baseName": "mpiData", - "type": "ThreeDSecureData | null" + "type": "ThreeDSecureData" }, { "name": "originalMerchantReference", @@ -85,7 +85,7 @@ export class VoidPendingRefundRequest { { "name": "platformChargebackLogic", "baseName": "platformChargebackLogic", - "type": "PlatformChargebackLogic | null" + "type": "PlatformChargebackLogic" }, { "name": "reference", diff --git a/src/typings/paymentsApp/models.ts b/src/typings/paymentsApp/models.ts index 122f8ca25..3d4d9fc0d 100644 --- a/src/typings/paymentsApp/models.ts +++ b/src/typings/paymentsApp/models.ts @@ -1,12 +1,4 @@ -/* - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - +import localVarRequest from 'request'; export * from './boardingTokenRequest'; export * from './boardingTokenResponse'; @@ -15,6 +7,18 @@ export * from './invalidField'; export * from './paymentsAppDto'; export * from './paymentsAppResponse'; +import * as fs from 'fs'; + +export interface RequestDetailedFile { + value: Buffer; + options?: { + filename?: string; + contentType?: string; + } +} + +export type RequestFile = string | Buffer | fs.ReadStream | RequestDetailedFile; + import { BoardingTokenRequest } from './boardingTokenRequest'; import { BoardingTokenResponse } from './boardingTokenResponse'; @@ -47,6 +51,23 @@ let typeMap: {[index: string]: any} = { "PaymentsAppResponse": PaymentsAppResponse, } +// Check if a string starts with another string without using es6 features +function startsWith(str: string, match: string): boolean { + return str.substring(0, match.length) === match; +} + +// Check if a string ends with another string without using es6 features +function endsWith(str: string, match: string): boolean { + return str.length >= match.length && str.substring(str.length - match.length) === match; +} + +const nullableSuffix = " | null"; +const optionalSuffix = " | undefined"; +const arrayPrefix = "Array<"; +const arraySuffix = ">"; +const mapPrefix = "{ [key: string]: "; +const mapSuffix = "; }"; + export class ObjectSerializer { public static findCorrectType(data: any, expectedType: string) { if (data == undefined) { @@ -83,25 +104,37 @@ export class ObjectSerializer { } } - public static serialize(data: any, type: string) { + public static serialize(data: any, type: string): any { if (data == undefined) { return data; } else if (primitives.indexOf(type.toLowerCase()) !== -1) { return data; - } else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6 - let subType: string = type.replace("Array<", ""); // Array => Type> - subType = subType.substring(0, subType.length - 1); // Type> => Type + } else if (endsWith(type, nullableSuffix)) { + let subType: string = type.slice(0, -nullableSuffix.length); // Type | null => Type + return ObjectSerializer.serialize(data, subType); + } else if (endsWith(type, optionalSuffix)) { + let subType: string = type.slice(0, -optionalSuffix.length); // Type | undefined => Type + return ObjectSerializer.serialize(data, subType); + } else if (startsWith(type, arrayPrefix)) { + let subType: string = type.slice(arrayPrefix.length, -arraySuffix.length); // Array => Type let transformedData: any[] = []; for (let index = 0; index < data.length; index++) { let datum = data[index]; transformedData.push(ObjectSerializer.serialize(datum, subType)); } return transformedData; + } else if (startsWith(type, mapPrefix)) { + let subType: string = type.slice(mapPrefix.length, -mapSuffix.length); // { [key: string]: Type; } => Type + let transformedData: { [key: string]: any } = {}; + for (let key in data) { + transformedData[key] = ObjectSerializer.serialize( + data[key], + subType, + ); + } + return transformedData; } else if (type === "Date") { return data.toISOString(); - } else if (type === "SaleToAcquirerData") { - const dataString = JSON.stringify(data); - return Buffer.from(dataString).toString("base64"); } else { if (enumsMap[type]) { return data; @@ -124,22 +157,37 @@ export class ObjectSerializer { } } - public static deserialize(data: any, type: string) { + public static deserialize(data: any, type: string): any { // polymorphism may change the actual type. type = ObjectSerializer.findCorrectType(data, type); if (data == undefined) { return data; } else if (primitives.indexOf(type.toLowerCase()) !== -1) { return data; - } else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6 - let subType: string = type.replace("Array<", ""); // Array => Type> - subType = subType.substring(0, subType.length - 1); // Type> => Type + } else if (endsWith(type, nullableSuffix)) { + let subType: string = type.slice(0, -nullableSuffix.length); // Type | null => Type + return ObjectSerializer.deserialize(data, subType); + } else if (endsWith(type, optionalSuffix)) { + let subType: string = type.slice(0, -optionalSuffix.length); // Type | undefined => Type + return ObjectSerializer.deserialize(data, subType); + } else if (startsWith(type, arrayPrefix)) { + let subType: string = type.slice(arrayPrefix.length, -arraySuffix.length); // Array => Type let transformedData: any[] = []; for (let index = 0; index < data.length; index++) { let datum = data[index]; transformedData.push(ObjectSerializer.deserialize(datum, subType)); } return transformedData; + } else if (startsWith(type, mapPrefix)) { + let subType: string = type.slice(mapPrefix.length, -mapSuffix.length); // { [key: string]: Type; } => Type + let transformedData: { [key: string]: any } = {}; + for (let key in data) { + transformedData[key] = ObjectSerializer.deserialize( + data[key], + subType, + ); + } + return transformedData; } else if (type === "Date") { return new Date(data); } else { @@ -160,3 +208,77 @@ export class ObjectSerializer { } } } + +export interface Authentication { + /** + * Apply authentication settings to header and query params. + */ + applyToRequest(requestOptions: localVarRequest.Options): Promise | void; +} + +export class HttpBasicAuth implements Authentication { + public username: string = ''; + public password: string = ''; + + applyToRequest(requestOptions: localVarRequest.Options): void { + requestOptions.auth = { + username: this.username, password: this.password + } + } +} + +export class HttpBearerAuth implements Authentication { + public accessToken: string | (() => string) = ''; + + applyToRequest(requestOptions: localVarRequest.Options): void { + if (requestOptions && requestOptions.headers) { + const accessToken = typeof this.accessToken === 'function' + ? this.accessToken() + : this.accessToken; + requestOptions.headers["Authorization"] = "Bearer " + accessToken; + } + } +} + +export class ApiKeyAuth implements Authentication { + public apiKey: string = ''; + + constructor(private location: string, private paramName: string) { + } + + applyToRequest(requestOptions: localVarRequest.Options): void { + if (this.location == "query") { + (requestOptions.qs)[this.paramName] = this.apiKey; + } else if (this.location == "header" && requestOptions && requestOptions.headers) { + requestOptions.headers[this.paramName] = this.apiKey; + } else if (this.location == 'cookie' && requestOptions && requestOptions.headers) { + if (requestOptions.headers['Cookie']) { + requestOptions.headers['Cookie'] += '; ' + this.paramName + '=' + encodeURIComponent(this.apiKey); + } + else { + requestOptions.headers['Cookie'] = this.paramName + '=' + encodeURIComponent(this.apiKey); + } + } + } +} + +export class OAuth implements Authentication { + public accessToken: string = ''; + + applyToRequest(requestOptions: localVarRequest.Options): void { + if (requestOptions && requestOptions.headers) { + requestOptions.headers["Authorization"] = "Bearer " + this.accessToken; + } + } +} + +export class VoidAuth implements Authentication { + public username: string = ''; + public password: string = ''; + + applyToRequest(_: localVarRequest.Options): void { + // Do nothing + } +} + +export type Interceptor = (requestOptions: localVarRequest.Options) => (Promise | void); diff --git a/src/typings/payout/fraudCheckResultWrapper.ts b/src/typings/payout/fraudCheckResultWrapper.ts index 841551c5e..37b094e68 100644 --- a/src/typings/payout/fraudCheckResultWrapper.ts +++ b/src/typings/payout/fraudCheckResultWrapper.ts @@ -10,7 +10,7 @@ import { FraudCheckResult } from './fraudCheckResult'; export class FraudCheckResultWrapper { - 'FraudCheckResult'?: FraudCheckResult | null; + 'FraudCheckResult'?: FraudCheckResult; static discriminator: string | undefined = undefined; @@ -18,7 +18,7 @@ export class FraudCheckResultWrapper { { "name": "FraudCheckResult", "baseName": "FraudCheckResult", - "type": "FraudCheckResult | null" + "type": "FraudCheckResult" } ]; static getAttributeTypeMap() { diff --git a/src/typings/payout/fundSource.ts b/src/typings/payout/fundSource.ts index 14eec5d74..0c45ca290 100644 --- a/src/typings/payout/fundSource.ts +++ b/src/typings/payout/fundSource.ts @@ -16,13 +16,13 @@ export class FundSource { * A map of name-value pairs for passing additional or industry-specific data. */ 'additionalData'?: { [key: string]: string; }; - 'billingAddress'?: Address | null; - 'card'?: Card | null; + 'billingAddress'?: Address; + 'card'?: Card; /** * Email address of the person. */ 'shopperEmail'?: string; - 'shopperName'?: Name | null; + 'shopperName'?: Name; /** * Phone number of the person */ @@ -39,12 +39,12 @@ export class FundSource { { "name": "billingAddress", "baseName": "billingAddress", - "type": "Address | null" + "type": "Address" }, { "name": "card", "baseName": "card", - "type": "Card | null" + "type": "Card" }, { "name": "shopperEmail", @@ -54,7 +54,7 @@ export class FundSource { { "name": "shopperName", "baseName": "shopperName", - "type": "Name | null" + "type": "Name" }, { "name": "telephoneNumber", diff --git a/src/typings/payout/models.ts b/src/typings/payout/models.ts index 9c8affd63..bb8d67fc6 100644 --- a/src/typings/payout/models.ts +++ b/src/typings/payout/models.ts @@ -1,12 +1,4 @@ -/* - * The version of the OpenAPI document: v68 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - +import localVarRequest from 'request'; export * from './address'; export * from './amount'; @@ -39,6 +31,18 @@ export * from './storeDetailResponse'; export * from './submitRequest'; export * from './submitResponse'; +import * as fs from 'fs'; + +export interface RequestDetailedFile { + value: Buffer; + options?: { + filename?: string; + contentType?: string; + } +} + +export type RequestFile = string | Buffer | fs.ReadStream | RequestDetailedFile; + import { Address } from './address'; import { Amount } from './amount'; @@ -130,6 +134,23 @@ let typeMap: {[index: string]: any} = { "SubmitResponse": SubmitResponse, } +// Check if a string starts with another string without using es6 features +function startsWith(str: string, match: string): boolean { + return str.substring(0, match.length) === match; +} + +// Check if a string ends with another string without using es6 features +function endsWith(str: string, match: string): boolean { + return str.length >= match.length && str.substring(str.length - match.length) === match; +} + +const nullableSuffix = " | null"; +const optionalSuffix = " | undefined"; +const arrayPrefix = "Array<"; +const arraySuffix = ">"; +const mapPrefix = "{ [key: string]: "; +const mapSuffix = "; }"; + export class ObjectSerializer { public static findCorrectType(data: any, expectedType: string) { if (data == undefined) { @@ -166,25 +187,37 @@ export class ObjectSerializer { } } - public static serialize(data: any, type: string) { + public static serialize(data: any, type: string): any { if (data == undefined) { return data; } else if (primitives.indexOf(type.toLowerCase()) !== -1) { return data; - } else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6 - let subType: string = type.replace("Array<", ""); // Array => Type> - subType = subType.substring(0, subType.length - 1); // Type> => Type + } else if (endsWith(type, nullableSuffix)) { + let subType: string = type.slice(0, -nullableSuffix.length); // Type | null => Type + return ObjectSerializer.serialize(data, subType); + } else if (endsWith(type, optionalSuffix)) { + let subType: string = type.slice(0, -optionalSuffix.length); // Type | undefined => Type + return ObjectSerializer.serialize(data, subType); + } else if (startsWith(type, arrayPrefix)) { + let subType: string = type.slice(arrayPrefix.length, -arraySuffix.length); // Array => Type let transformedData: any[] = []; for (let index = 0; index < data.length; index++) { let datum = data[index]; transformedData.push(ObjectSerializer.serialize(datum, subType)); } return transformedData; + } else if (startsWith(type, mapPrefix)) { + let subType: string = type.slice(mapPrefix.length, -mapSuffix.length); // { [key: string]: Type; } => Type + let transformedData: { [key: string]: any } = {}; + for (let key in data) { + transformedData[key] = ObjectSerializer.serialize( + data[key], + subType, + ); + } + return transformedData; } else if (type === "Date") { return data.toISOString(); - } else if (type === "SaleToAcquirerData") { - const dataString = JSON.stringify(data); - return Buffer.from(dataString).toString("base64"); } else { if (enumsMap[type]) { return data; @@ -207,22 +240,37 @@ export class ObjectSerializer { } } - public static deserialize(data: any, type: string) { + public static deserialize(data: any, type: string): any { // polymorphism may change the actual type. type = ObjectSerializer.findCorrectType(data, type); if (data == undefined) { return data; } else if (primitives.indexOf(type.toLowerCase()) !== -1) { return data; - } else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6 - let subType: string = type.replace("Array<", ""); // Array => Type> - subType = subType.substring(0, subType.length - 1); // Type> => Type + } else if (endsWith(type, nullableSuffix)) { + let subType: string = type.slice(0, -nullableSuffix.length); // Type | null => Type + return ObjectSerializer.deserialize(data, subType); + } else if (endsWith(type, optionalSuffix)) { + let subType: string = type.slice(0, -optionalSuffix.length); // Type | undefined => Type + return ObjectSerializer.deserialize(data, subType); + } else if (startsWith(type, arrayPrefix)) { + let subType: string = type.slice(arrayPrefix.length, -arraySuffix.length); // Array => Type let transformedData: any[] = []; for (let index = 0; index < data.length; index++) { let datum = data[index]; transformedData.push(ObjectSerializer.deserialize(datum, subType)); } return transformedData; + } else if (startsWith(type, mapPrefix)) { + let subType: string = type.slice(mapPrefix.length, -mapSuffix.length); // { [key: string]: Type; } => Type + let transformedData: { [key: string]: any } = {}; + for (let key in data) { + transformedData[key] = ObjectSerializer.deserialize( + data[key], + subType, + ); + } + return transformedData; } else if (type === "Date") { return new Date(data); } else { @@ -243,3 +291,77 @@ export class ObjectSerializer { } } } + +export interface Authentication { + /** + * Apply authentication settings to header and query params. + */ + applyToRequest(requestOptions: localVarRequest.Options): Promise | void; +} + +export class HttpBasicAuth implements Authentication { + public username: string = ''; + public password: string = ''; + + applyToRequest(requestOptions: localVarRequest.Options): void { + requestOptions.auth = { + username: this.username, password: this.password + } + } +} + +export class HttpBearerAuth implements Authentication { + public accessToken: string | (() => string) = ''; + + applyToRequest(requestOptions: localVarRequest.Options): void { + if (requestOptions && requestOptions.headers) { + const accessToken = typeof this.accessToken === 'function' + ? this.accessToken() + : this.accessToken; + requestOptions.headers["Authorization"] = "Bearer " + accessToken; + } + } +} + +export class ApiKeyAuth implements Authentication { + public apiKey: string = ''; + + constructor(private location: string, private paramName: string) { + } + + applyToRequest(requestOptions: localVarRequest.Options): void { + if (this.location == "query") { + (requestOptions.qs)[this.paramName] = this.apiKey; + } else if (this.location == "header" && requestOptions && requestOptions.headers) { + requestOptions.headers[this.paramName] = this.apiKey; + } else if (this.location == 'cookie' && requestOptions && requestOptions.headers) { + if (requestOptions.headers['Cookie']) { + requestOptions.headers['Cookie'] += '; ' + this.paramName + '=' + encodeURIComponent(this.apiKey); + } + else { + requestOptions.headers['Cookie'] = this.paramName + '=' + encodeURIComponent(this.apiKey); + } + } + } +} + +export class OAuth implements Authentication { + public accessToken: string = ''; + + applyToRequest(requestOptions: localVarRequest.Options): void { + if (requestOptions && requestOptions.headers) { + requestOptions.headers["Authorization"] = "Bearer " + this.accessToken; + } + } +} + +export class VoidAuth implements Authentication { + public username: string = ''; + public password: string = ''; + + applyToRequest(_: localVarRequest.Options): void { + // Do nothing + } +} + +export type Interceptor = (requestOptions: localVarRequest.Options) => (Promise | void); diff --git a/src/typings/payout/payoutRequest.ts b/src/typings/payout/payoutRequest.ts index 09225e02c..3155919df 100644 --- a/src/typings/payout/payoutRequest.ts +++ b/src/typings/payout/payoutRequest.ts @@ -16,18 +16,18 @@ import { Recurring } from './recurring'; export class PayoutRequest { 'amount': Amount; - 'billingAddress'?: Address | null; - 'card'?: Card | null; + 'billingAddress'?: Address; + 'card'?: Card; /** * An integer value that is added to the normal fraud score. The value can be either positive or negative. */ 'fraudOffset'?: number; - 'fundSource'?: FundSource | null; + 'fundSource'?: FundSource; /** * The merchant account identifier, with which you want to process the transaction. */ 'merchantAccount': string; - 'recurring'?: Recurring | null; + 'recurring'?: Recurring; /** * The reference to uniquely identify a payment. This reference is used in all communication with you about the payment status. We recommend using a unique value per payment; however, it is not a requirement. If you need to provide multiple references for a transaction, separate them with hyphens (\"-\"). Maximum length: 80 characters. */ @@ -44,7 +44,7 @@ export class PayoutRequest { * Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal. */ 'shopperInteraction'?: PayoutRequest.ShopperInteractionEnum; - 'shopperName'?: Name | null; + 'shopperName'?: Name; /** * Required for recurring payments. Your reference to uniquely identify this shopper, for example user ID or account ID. The value is case-sensitive and must be at least three characters. > Your reference must not include personally identifiable information (PII) such as name or email address. */ @@ -65,12 +65,12 @@ export class PayoutRequest { { "name": "billingAddress", "baseName": "billingAddress", - "type": "Address | null" + "type": "Address" }, { "name": "card", "baseName": "card", - "type": "Card | null" + "type": "Card" }, { "name": "fraudOffset", @@ -80,7 +80,7 @@ export class PayoutRequest { { "name": "fundSource", "baseName": "fundSource", - "type": "FundSource | null" + "type": "FundSource" }, { "name": "merchantAccount", @@ -90,7 +90,7 @@ export class PayoutRequest { { "name": "recurring", "baseName": "recurring", - "type": "Recurring | null" + "type": "Recurring" }, { "name": "reference", @@ -115,7 +115,7 @@ export class PayoutRequest { { "name": "shopperName", "baseName": "shopperName", - "type": "Name | null" + "type": "Name" }, { "name": "shopperReference", @@ -135,9 +135,9 @@ export class PayoutRequest { export namespace PayoutRequest { export enum ShopperInteractionEnum { - Ecommerce = 'Ecommerce', - ContAuth = 'ContAuth', - Moto = 'Moto', - Pos = 'POS' + Ecommerce = 'Ecommerce', + ContAuth = 'ContAuth', + Moto = 'Moto', + Pos = 'POS' } } diff --git a/src/typings/payout/payoutResponse.ts b/src/typings/payout/payoutResponse.ts index 403880054..aac1824b0 100644 --- a/src/typings/payout/payoutResponse.ts +++ b/src/typings/payout/payoutResponse.ts @@ -19,12 +19,12 @@ export class PayoutResponse { * Authorisation code: * When the payment is authorised successfully, this field holds the authorisation code for the payment. * When the payment is not authorised, this field is empty. */ 'authCode'?: string; - 'dccAmount'?: Amount | null; + 'dccAmount'?: Amount; /** * Cryptographic signature used to verify `dccQuote`. > This value only applies if you have implemented Dynamic Currency Conversion. For more information, [contact Support](https://www.adyen.help/hc/en-us/requests/new). */ 'dccSignature'?: string; - 'fraudResult'?: FraudResult | null; + 'fraudResult'?: FraudResult; /** * The URL to direct the shopper to. > In case of SecurePlus, do not redirect a shopper to this URL. */ @@ -66,7 +66,7 @@ export class PayoutResponse { { "name": "dccAmount", "baseName": "dccAmount", - "type": "Amount | null" + "type": "Amount" }, { "name": "dccSignature", @@ -76,7 +76,7 @@ export class PayoutResponse { { "name": "fraudResult", "baseName": "fraudResult", - "type": "FraudResult | null" + "type": "FraudResult" }, { "name": "issuerUrl", @@ -116,19 +116,19 @@ export class PayoutResponse { export namespace PayoutResponse { export enum ResultCodeEnum { - AuthenticationFinished = 'AuthenticationFinished', - AuthenticationNotRequired = 'AuthenticationNotRequired', - Authorised = 'Authorised', - Cancelled = 'Cancelled', - ChallengeShopper = 'ChallengeShopper', - Error = 'Error', - IdentifyShopper = 'IdentifyShopper', - PartiallyAuthorised = 'PartiallyAuthorised', - Pending = 'Pending', - PresentToShopper = 'PresentToShopper', - Received = 'Received', - RedirectShopper = 'RedirectShopper', - Refused = 'Refused', - Success = 'Success' + AuthenticationFinished = 'AuthenticationFinished', + AuthenticationNotRequired = 'AuthenticationNotRequired', + Authorised = 'Authorised', + Cancelled = 'Cancelled', + ChallengeShopper = 'ChallengeShopper', + Error = 'Error', + IdentifyShopper = 'IdentifyShopper', + PartiallyAuthorised = 'PartiallyAuthorised', + Pending = 'Pending', + PresentToShopper = 'PresentToShopper', + Received = 'Received', + RedirectShopper = 'RedirectShopper', + Refused = 'Refused', + Success = 'Success' } } diff --git a/src/typings/payout/recurring.ts b/src/typings/payout/recurring.ts index a65fef7c6..9eb5e7b5e 100644 --- a/src/typings/payout/recurring.ts +++ b/src/typings/payout/recurring.ts @@ -66,14 +66,14 @@ export class Recurring { export namespace Recurring { export enum ContractEnum { - Oneclick = 'ONECLICK', - Recurring = 'RECURRING', - Payout = 'PAYOUT' + Oneclick = 'ONECLICK', + Recurring = 'RECURRING', + Payout = 'PAYOUT' } export enum TokenServiceEnum { - Visatokenservice = 'VISATOKENSERVICE', - Mctokenservice = 'MCTOKENSERVICE', - Amextokenservice = 'AMEXTOKENSERVICE', - TokenSharing = 'TOKEN_SHARING' + Visatokenservice = 'VISATOKENSERVICE', + Mctokenservice = 'MCTOKENSERVICE', + Amextokenservice = 'AMEXTOKENSERVICE', + TokenSharing = 'TOKEN_SHARING' } } diff --git a/src/typings/payout/responseAdditionalDataCard.ts b/src/typings/payout/responseAdditionalDataCard.ts index edd3b3df3..e89a9ba58 100644 --- a/src/typings/payout/responseAdditionalDataCard.ts +++ b/src/typings/payout/responseAdditionalDataCard.ts @@ -102,16 +102,16 @@ export class ResponseAdditionalDataCard { export namespace ResponseAdditionalDataCard { export enum CardProductIdEnum { - A = 'A', - B = 'B', - C = 'C', - D = 'D', - F = 'F', - Mcc = 'MCC', - Mce = 'MCE', - Mcf = 'MCF', - Mcg = 'MCG', - Mch = 'MCH', - Mci = 'MCI' + A = 'A', + B = 'B', + C = 'C', + D = 'D', + F = 'F', + Mcc = 'MCC', + Mce = 'MCE', + Mcf = 'MCF', + Mcg = 'MCG', + Mch = 'MCH', + Mci = 'MCI' } } diff --git a/src/typings/payout/responseAdditionalDataCommon.ts b/src/typings/payout/responseAdditionalDataCommon.ts index e18cf95c7..5134792e9 100644 --- a/src/typings/payout/responseAdditionalDataCommon.ts +++ b/src/typings/payout/responseAdditionalDataCommon.ts @@ -585,17 +585,17 @@ export class ResponseAdditionalDataCommon { export namespace ResponseAdditionalDataCommon { export enum FraudResultTypeEnum { - Green = 'GREEN', - Fraud = 'FRAUD' + Green = 'GREEN', + Fraud = 'FRAUD' } export enum RecurringProcessingModelEnum { - CardOnFile = 'CardOnFile', - Subscription = 'Subscription', - UnscheduledCardOnFile = 'UnscheduledCardOnFile' + CardOnFile = 'CardOnFile', + Subscription = 'Subscription', + UnscheduledCardOnFile = 'UnscheduledCardOnFile' } export enum TokenizationStoreOperationTypeEnum { - Created = 'created', - Updated = 'updated', - AlreadyExisting = 'alreadyExisting' + Created = 'created', + Updated = 'updated', + AlreadyExisting = 'alreadyExisting' } } diff --git a/src/typings/payout/storeDetailAndSubmitRequest.ts b/src/typings/payout/storeDetailAndSubmitRequest.ts index bece69ec2..e69741af6 100644 --- a/src/typings/payout/storeDetailAndSubmitRequest.ts +++ b/src/typings/payout/storeDetailAndSubmitRequest.ts @@ -20,9 +20,9 @@ export class StoreDetailAndSubmitRequest { */ 'additionalData'?: { [key: string]: string; }; 'amount': Amount; - 'bank'?: BankAccount | null; - 'billingAddress'?: Address | null; - 'card'?: Card | null; + 'bank'?: BankAccount; + 'billingAddress'?: Address; + 'card'?: Card; /** * The date of birth. Format: [ISO-8601](https://www.w3.org/TR/NOTE-datetime); example: YYYY-MM-DD For Paysafecard it must be the same as used when registering the Paysafecard account. > This field is mandatory for natural persons. */ @@ -56,7 +56,7 @@ export class StoreDetailAndSubmitRequest { * The shopper\'s email address. */ 'shopperEmail': string; - 'shopperName'?: Name | null; + 'shopperName'?: Name; /** * The shopper\'s reference for the payment transaction. */ @@ -90,17 +90,17 @@ export class StoreDetailAndSubmitRequest { { "name": "bank", "baseName": "bank", - "type": "BankAccount | null" + "type": "BankAccount" }, { "name": "billingAddress", "baseName": "billingAddress", - "type": "Address | null" + "type": "Address" }, { "name": "card", "baseName": "card", - "type": "Card | null" + "type": "Card" }, { "name": "dateOfBirth", @@ -150,7 +150,7 @@ export class StoreDetailAndSubmitRequest { { "name": "shopperName", "baseName": "shopperName", - "type": "Name | null" + "type": "Name" }, { "name": "shopperReference", @@ -180,7 +180,7 @@ export class StoreDetailAndSubmitRequest { export namespace StoreDetailAndSubmitRequest { export enum EntityTypeEnum { - NaturalPerson = 'NaturalPerson', - Company = 'Company' + NaturalPerson = 'NaturalPerson', + Company = 'Company' } } diff --git a/src/typings/payout/storeDetailRequest.ts b/src/typings/payout/storeDetailRequest.ts index 47262336c..de55e1838 100644 --- a/src/typings/payout/storeDetailRequest.ts +++ b/src/typings/payout/storeDetailRequest.ts @@ -18,9 +18,9 @@ export class StoreDetailRequest { * This field contains additional data, which may be required for a particular request. */ 'additionalData'?: { [key: string]: string; }; - 'bank'?: BankAccount | null; - 'billingAddress'?: Address | null; - 'card'?: Card | null; + 'bank'?: BankAccount; + 'billingAddress'?: Address; + 'card'?: Card; /** * The date of birth. Format: [ISO-8601](https://www.w3.org/TR/NOTE-datetime); example: YYYY-MM-DD For Paysafecard it must be the same as used when registering the Paysafecard account. > This field is mandatory for natural persons. */ @@ -50,7 +50,7 @@ export class StoreDetailRequest { * The shopper\'s email address. */ 'shopperEmail': string; - 'shopperName'?: Name | null; + 'shopperName'?: Name; /** * The shopper\'s reference for the payment transaction. */ @@ -75,17 +75,17 @@ export class StoreDetailRequest { { "name": "bank", "baseName": "bank", - "type": "BankAccount | null" + "type": "BankAccount" }, { "name": "billingAddress", "baseName": "billingAddress", - "type": "Address | null" + "type": "Address" }, { "name": "card", "baseName": "card", - "type": "Card | null" + "type": "Card" }, { "name": "dateOfBirth", @@ -130,7 +130,7 @@ export class StoreDetailRequest { { "name": "shopperName", "baseName": "shopperName", - "type": "Name | null" + "type": "Name" }, { "name": "shopperReference", @@ -155,7 +155,7 @@ export class StoreDetailRequest { export namespace StoreDetailRequest { export enum EntityTypeEnum { - NaturalPerson = 'NaturalPerson', - Company = 'Company' + NaturalPerson = 'NaturalPerson', + Company = 'Company' } } diff --git a/src/typings/payout/submitRequest.ts b/src/typings/payout/submitRequest.ts index 2563f23ba..795c58825 100644 --- a/src/typings/payout/submitRequest.ts +++ b/src/typings/payout/submitRequest.ts @@ -50,7 +50,7 @@ export class SubmitRequest { * The shopper\'s email address. */ 'shopperEmail': string; - 'shopperName'?: Name | null; + 'shopperName'?: Name; /** * The shopper\'s reference for the payout transaction. */ @@ -125,7 +125,7 @@ export class SubmitRequest { { "name": "shopperName", "baseName": "shopperName", - "type": "Name | null" + "type": "Name" }, { "name": "shopperReference", @@ -150,7 +150,7 @@ export class SubmitRequest { export namespace SubmitRequest { export enum EntityTypeEnum { - NaturalPerson = 'NaturalPerson', - Company = 'Company' + NaturalPerson = 'NaturalPerson', + Company = 'Company' } } diff --git a/src/typings/posMobile/models.ts b/src/typings/posMobile/models.ts index ab302deb8..7622e55ca 100644 --- a/src/typings/posMobile/models.ts +++ b/src/typings/posMobile/models.ts @@ -1,16 +1,20 @@ -/* - * The version of the OpenAPI document: v68 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - +import localVarRequest from 'request'; export * from './createSessionRequest'; export * from './createSessionResponse'; +import * as fs from 'fs'; + +export interface RequestDetailedFile { + value: Buffer; + options?: { + filename?: string; + contentType?: string; + } +} + +export type RequestFile = string | Buffer | fs.ReadStream | RequestDetailedFile; + import { CreateSessionRequest } from './createSessionRequest'; import { CreateSessionResponse } from './createSessionResponse'; @@ -35,6 +39,23 @@ let typeMap: {[index: string]: any} = { "CreateSessionResponse": CreateSessionResponse, } +// Check if a string starts with another string without using es6 features +function startsWith(str: string, match: string): boolean { + return str.substring(0, match.length) === match; +} + +// Check if a string ends with another string without using es6 features +function endsWith(str: string, match: string): boolean { + return str.length >= match.length && str.substring(str.length - match.length) === match; +} + +const nullableSuffix = " | null"; +const optionalSuffix = " | undefined"; +const arrayPrefix = "Array<"; +const arraySuffix = ">"; +const mapPrefix = "{ [key: string]: "; +const mapSuffix = "; }"; + export class ObjectSerializer { public static findCorrectType(data: any, expectedType: string) { if (data == undefined) { @@ -71,25 +92,37 @@ export class ObjectSerializer { } } - public static serialize(data: any, type: string) { + public static serialize(data: any, type: string): any { if (data == undefined) { return data; } else if (primitives.indexOf(type.toLowerCase()) !== -1) { return data; - } else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6 - let subType: string = type.replace("Array<", ""); // Array => Type> - subType = subType.substring(0, subType.length - 1); // Type> => Type + } else if (endsWith(type, nullableSuffix)) { + let subType: string = type.slice(0, -nullableSuffix.length); // Type | null => Type + return ObjectSerializer.serialize(data, subType); + } else if (endsWith(type, optionalSuffix)) { + let subType: string = type.slice(0, -optionalSuffix.length); // Type | undefined => Type + return ObjectSerializer.serialize(data, subType); + } else if (startsWith(type, arrayPrefix)) { + let subType: string = type.slice(arrayPrefix.length, -arraySuffix.length); // Array => Type let transformedData: any[] = []; for (let index = 0; index < data.length; index++) { let datum = data[index]; transformedData.push(ObjectSerializer.serialize(datum, subType)); } return transformedData; + } else if (startsWith(type, mapPrefix)) { + let subType: string = type.slice(mapPrefix.length, -mapSuffix.length); // { [key: string]: Type; } => Type + let transformedData: { [key: string]: any } = {}; + for (let key in data) { + transformedData[key] = ObjectSerializer.serialize( + data[key], + subType, + ); + } + return transformedData; } else if (type === "Date") { return data.toISOString(); - } else if (type === "SaleToAcquirerData") { - const dataString = JSON.stringify(data); - return Buffer.from(dataString).toString("base64"); } else { if (enumsMap[type]) { return data; @@ -112,22 +145,37 @@ export class ObjectSerializer { } } - public static deserialize(data: any, type: string) { + public static deserialize(data: any, type: string): any { // polymorphism may change the actual type. type = ObjectSerializer.findCorrectType(data, type); if (data == undefined) { return data; } else if (primitives.indexOf(type.toLowerCase()) !== -1) { return data; - } else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6 - let subType: string = type.replace("Array<", ""); // Array => Type> - subType = subType.substring(0, subType.length - 1); // Type> => Type + } else if (endsWith(type, nullableSuffix)) { + let subType: string = type.slice(0, -nullableSuffix.length); // Type | null => Type + return ObjectSerializer.deserialize(data, subType); + } else if (endsWith(type, optionalSuffix)) { + let subType: string = type.slice(0, -optionalSuffix.length); // Type | undefined => Type + return ObjectSerializer.deserialize(data, subType); + } else if (startsWith(type, arrayPrefix)) { + let subType: string = type.slice(arrayPrefix.length, -arraySuffix.length); // Array => Type let transformedData: any[] = []; for (let index = 0; index < data.length; index++) { let datum = data[index]; transformedData.push(ObjectSerializer.deserialize(datum, subType)); } return transformedData; + } else if (startsWith(type, mapPrefix)) { + let subType: string = type.slice(mapPrefix.length, -mapSuffix.length); // { [key: string]: Type; } => Type + let transformedData: { [key: string]: any } = {}; + for (let key in data) { + transformedData[key] = ObjectSerializer.deserialize( + data[key], + subType, + ); + } + return transformedData; } else if (type === "Date") { return new Date(data); } else { @@ -148,3 +196,77 @@ export class ObjectSerializer { } } } + +export interface Authentication { + /** + * Apply authentication settings to header and query params. + */ + applyToRequest(requestOptions: localVarRequest.Options): Promise | void; +} + +export class HttpBasicAuth implements Authentication { + public username: string = ''; + public password: string = ''; + + applyToRequest(requestOptions: localVarRequest.Options): void { + requestOptions.auth = { + username: this.username, password: this.password + } + } +} + +export class HttpBearerAuth implements Authentication { + public accessToken: string | (() => string) = ''; + + applyToRequest(requestOptions: localVarRequest.Options): void { + if (requestOptions && requestOptions.headers) { + const accessToken = typeof this.accessToken === 'function' + ? this.accessToken() + : this.accessToken; + requestOptions.headers["Authorization"] = "Bearer " + accessToken; + } + } +} + +export class ApiKeyAuth implements Authentication { + public apiKey: string = ''; + + constructor(private location: string, private paramName: string) { + } + + applyToRequest(requestOptions: localVarRequest.Options): void { + if (this.location == "query") { + (requestOptions.qs)[this.paramName] = this.apiKey; + } else if (this.location == "header" && requestOptions && requestOptions.headers) { + requestOptions.headers[this.paramName] = this.apiKey; + } else if (this.location == 'cookie' && requestOptions && requestOptions.headers) { + if (requestOptions.headers['Cookie']) { + requestOptions.headers['Cookie'] += '; ' + this.paramName + '=' + encodeURIComponent(this.apiKey); + } + else { + requestOptions.headers['Cookie'] = this.paramName + '=' + encodeURIComponent(this.apiKey); + } + } + } +} + +export class OAuth implements Authentication { + public accessToken: string = ''; + + applyToRequest(requestOptions: localVarRequest.Options): void { + if (requestOptions && requestOptions.headers) { + requestOptions.headers["Authorization"] = "Bearer " + this.accessToken; + } + } +} + +export class VoidAuth implements Authentication { + public username: string = ''; + public password: string = ''; + + applyToRequest(_: localVarRequest.Options): void { + // Do nothing + } +} + +export type Interceptor = (requestOptions: localVarRequest.Options) => (Promise | void); diff --git a/src/typings/recurring/models.ts b/src/typings/recurring/models.ts index 69b1cb3ce..f0fbc65e5 100644 --- a/src/typings/recurring/models.ts +++ b/src/typings/recurring/models.ts @@ -1,12 +1,4 @@ -/* - * The version of the OpenAPI document: v68 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - +import localVarRequest from 'request'; export * from './address'; export * from './amount'; @@ -34,6 +26,18 @@ export * from './scheduleAccountUpdaterResult'; export * from './serviceError'; export * from './tokenDetails'; +import * as fs from 'fs'; + +export interface RequestDetailedFile { + value: Buffer; + options?: { + filename?: string; + contentType?: string; + } +} + +export type RequestFile = string | Buffer | fs.ReadStream | RequestDetailedFile; + import { Address } from './address'; import { Amount } from './amount'; @@ -106,6 +110,23 @@ let typeMap: {[index: string]: any} = { "TokenDetails": TokenDetails, } +// Check if a string starts with another string without using es6 features +function startsWith(str: string, match: string): boolean { + return str.substring(0, match.length) === match; +} + +// Check if a string ends with another string without using es6 features +function endsWith(str: string, match: string): boolean { + return str.length >= match.length && str.substring(str.length - match.length) === match; +} + +const nullableSuffix = " | null"; +const optionalSuffix = " | undefined"; +const arrayPrefix = "Array<"; +const arraySuffix = ">"; +const mapPrefix = "{ [key: string]: "; +const mapSuffix = "; }"; + export class ObjectSerializer { public static findCorrectType(data: any, expectedType: string) { if (data == undefined) { @@ -142,25 +163,37 @@ export class ObjectSerializer { } } - public static serialize(data: any, type: string) { + public static serialize(data: any, type: string): any { if (data == undefined) { return data; } else if (primitives.indexOf(type.toLowerCase()) !== -1) { return data; - } else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6 - let subType: string = type.replace("Array<", ""); // Array => Type> - subType = subType.substring(0, subType.length - 1); // Type> => Type + } else if (endsWith(type, nullableSuffix)) { + let subType: string = type.slice(0, -nullableSuffix.length); // Type | null => Type + return ObjectSerializer.serialize(data, subType); + } else if (endsWith(type, optionalSuffix)) { + let subType: string = type.slice(0, -optionalSuffix.length); // Type | undefined => Type + return ObjectSerializer.serialize(data, subType); + } else if (startsWith(type, arrayPrefix)) { + let subType: string = type.slice(arrayPrefix.length, -arraySuffix.length); // Array => Type let transformedData: any[] = []; for (let index = 0; index < data.length; index++) { let datum = data[index]; transformedData.push(ObjectSerializer.serialize(datum, subType)); } return transformedData; + } else if (startsWith(type, mapPrefix)) { + let subType: string = type.slice(mapPrefix.length, -mapSuffix.length); // { [key: string]: Type; } => Type + let transformedData: { [key: string]: any } = {}; + for (let key in data) { + transformedData[key] = ObjectSerializer.serialize( + data[key], + subType, + ); + } + return transformedData; } else if (type === "Date") { return data.toISOString(); - } else if (type === "SaleToAcquirerData") { - const dataString = JSON.stringify(data); - return Buffer.from(dataString).toString("base64"); } else { if (enumsMap[type]) { return data; @@ -183,22 +216,37 @@ export class ObjectSerializer { } } - public static deserialize(data: any, type: string) { + public static deserialize(data: any, type: string): any { // polymorphism may change the actual type. type = ObjectSerializer.findCorrectType(data, type); if (data == undefined) { return data; } else if (primitives.indexOf(type.toLowerCase()) !== -1) { return data; - } else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6 - let subType: string = type.replace("Array<", ""); // Array => Type> - subType = subType.substring(0, subType.length - 1); // Type> => Type + } else if (endsWith(type, nullableSuffix)) { + let subType: string = type.slice(0, -nullableSuffix.length); // Type | null => Type + return ObjectSerializer.deserialize(data, subType); + } else if (endsWith(type, optionalSuffix)) { + let subType: string = type.slice(0, -optionalSuffix.length); // Type | undefined => Type + return ObjectSerializer.deserialize(data, subType); + } else if (startsWith(type, arrayPrefix)) { + let subType: string = type.slice(arrayPrefix.length, -arraySuffix.length); // Array => Type let transformedData: any[] = []; for (let index = 0; index < data.length; index++) { let datum = data[index]; transformedData.push(ObjectSerializer.deserialize(datum, subType)); } return transformedData; + } else if (startsWith(type, mapPrefix)) { + let subType: string = type.slice(mapPrefix.length, -mapSuffix.length); // { [key: string]: Type; } => Type + let transformedData: { [key: string]: any } = {}; + for (let key in data) { + transformedData[key] = ObjectSerializer.deserialize( + data[key], + subType, + ); + } + return transformedData; } else if (type === "Date") { return new Date(data); } else { @@ -219,3 +267,77 @@ export class ObjectSerializer { } } } + +export interface Authentication { + /** + * Apply authentication settings to header and query params. + */ + applyToRequest(requestOptions: localVarRequest.Options): Promise | void; +} + +export class HttpBasicAuth implements Authentication { + public username: string = ''; + public password: string = ''; + + applyToRequest(requestOptions: localVarRequest.Options): void { + requestOptions.auth = { + username: this.username, password: this.password + } + } +} + +export class HttpBearerAuth implements Authentication { + public accessToken: string | (() => string) = ''; + + applyToRequest(requestOptions: localVarRequest.Options): void { + if (requestOptions && requestOptions.headers) { + const accessToken = typeof this.accessToken === 'function' + ? this.accessToken() + : this.accessToken; + requestOptions.headers["Authorization"] = "Bearer " + accessToken; + } + } +} + +export class ApiKeyAuth implements Authentication { + public apiKey: string = ''; + + constructor(private location: string, private paramName: string) { + } + + applyToRequest(requestOptions: localVarRequest.Options): void { + if (this.location == "query") { + (requestOptions.qs)[this.paramName] = this.apiKey; + } else if (this.location == "header" && requestOptions && requestOptions.headers) { + requestOptions.headers[this.paramName] = this.apiKey; + } else if (this.location == 'cookie' && requestOptions && requestOptions.headers) { + if (requestOptions.headers['Cookie']) { + requestOptions.headers['Cookie'] += '; ' + this.paramName + '=' + encodeURIComponent(this.apiKey); + } + else { + requestOptions.headers['Cookie'] = this.paramName + '=' + encodeURIComponent(this.apiKey); + } + } + } +} + +export class OAuth implements Authentication { + public accessToken: string = ''; + + applyToRequest(requestOptions: localVarRequest.Options): void { + if (requestOptions && requestOptions.headers) { + requestOptions.headers["Authorization"] = "Bearer " + this.accessToken; + } + } +} + +export class VoidAuth implements Authentication { + public username: string = ''; + public password: string = ''; + + applyToRequest(_: localVarRequest.Options): void { + // Do nothing + } +} + +export type Interceptor = (requestOptions: localVarRequest.Options) => (Promise | void); diff --git a/src/typings/recurring/permit.ts b/src/typings/recurring/permit.ts index d8c84c365..6ce24420b 100644 --- a/src/typings/recurring/permit.ts +++ b/src/typings/recurring/permit.ts @@ -18,7 +18,7 @@ export class Permit { * The profile to apply to this permit (when using the shared permits model). */ 'profileReference'?: string; - 'restriction'?: PermitRestriction | null; + 'restriction'?: PermitRestriction; /** * The key to link permit requests to permit results. */ @@ -44,7 +44,7 @@ export class Permit { { "name": "restriction", "baseName": "restriction", - "type": "PermitRestriction | null" + "type": "PermitRestriction" }, { "name": "resultKey", diff --git a/src/typings/recurring/permitRestriction.ts b/src/typings/recurring/permitRestriction.ts index 55725ff20..c1d4bd1b6 100644 --- a/src/typings/recurring/permitRestriction.ts +++ b/src/typings/recurring/permitRestriction.ts @@ -10,8 +10,8 @@ import { Amount } from './amount'; export class PermitRestriction { - 'maxAmount'?: Amount | null; - 'singleTransactionLimit'?: Amount | null; + 'maxAmount'?: Amount; + 'singleTransactionLimit'?: Amount; /** * Only a single payment can be made using this permit if set to true, otherwise multiple payments are allowed. */ @@ -23,12 +23,12 @@ export class PermitRestriction { { "name": "maxAmount", "baseName": "maxAmount", - "type": "Amount | null" + "type": "Amount" }, { "name": "singleTransactionLimit", "baseName": "singleTransactionLimit", - "type": "Amount | null" + "type": "Amount" }, { "name": "singleUse", diff --git a/src/typings/recurring/recurring.ts b/src/typings/recurring/recurring.ts index a65fef7c6..9eb5e7b5e 100644 --- a/src/typings/recurring/recurring.ts +++ b/src/typings/recurring/recurring.ts @@ -66,14 +66,14 @@ export class Recurring { export namespace Recurring { export enum ContractEnum { - Oneclick = 'ONECLICK', - Recurring = 'RECURRING', - Payout = 'PAYOUT' + Oneclick = 'ONECLICK', + Recurring = 'RECURRING', + Payout = 'PAYOUT' } export enum TokenServiceEnum { - Visatokenservice = 'VISATOKENSERVICE', - Mctokenservice = 'MCTOKENSERVICE', - Amextokenservice = 'AMEXTOKENSERVICE', - TokenSharing = 'TOKEN_SHARING' + Visatokenservice = 'VISATOKENSERVICE', + Mctokenservice = 'MCTOKENSERVICE', + Amextokenservice = 'AMEXTOKENSERVICE', + TokenSharing = 'TOKEN_SHARING' } } diff --git a/src/typings/recurring/recurringDetail.ts b/src/typings/recurring/recurringDetail.ts index e169b3b72..d97085299 100644 --- a/src/typings/recurring/recurringDetail.ts +++ b/src/typings/recurring/recurringDetail.ts @@ -26,9 +26,9 @@ export class RecurringDetail { * The alias type of the credit card number. Applies only to recurring contracts storing credit card details. */ 'aliasType'?: string; - 'bank'?: BankAccount | null; - 'billingAddress'?: Address | null; - 'card'?: Card | null; + 'bank'?: BankAccount; + 'billingAddress'?: Address; + 'card'?: Card; /** * Types of recurring contracts. */ @@ -57,12 +57,12 @@ export class RecurringDetail { * The reference that uniquely identifies the recurring detail. */ 'recurringDetailReference': string; - 'shopperName'?: Name | null; + 'shopperName'?: Name; /** * A shopper\'s social security number (only in countries where it is legal to collect). */ 'socialSecurityNumber'?: string; - 'tokenDetails'?: TokenDetails | null; + 'tokenDetails'?: TokenDetails; /** * The payment method, such as “mc\", \"visa\", \"ideal\", \"paypal\". */ @@ -89,17 +89,17 @@ export class RecurringDetail { { "name": "bank", "baseName": "bank", - "type": "BankAccount | null" + "type": "BankAccount" }, { "name": "billingAddress", "baseName": "billingAddress", - "type": "Address | null" + "type": "Address" }, { "name": "card", "baseName": "card", - "type": "Card | null" + "type": "Card" }, { "name": "contractTypes", @@ -139,7 +139,7 @@ export class RecurringDetail { { "name": "shopperName", "baseName": "shopperName", - "type": "Name | null" + "type": "Name" }, { "name": "socialSecurityNumber", @@ -149,7 +149,7 @@ export class RecurringDetail { { "name": "tokenDetails", "baseName": "tokenDetails", - "type": "TokenDetails | null" + "type": "TokenDetails" }, { "name": "variant", diff --git a/src/typings/recurring/recurringDetailWrapper.ts b/src/typings/recurring/recurringDetailWrapper.ts index 03dfe2361..f1977f3d2 100644 --- a/src/typings/recurring/recurringDetailWrapper.ts +++ b/src/typings/recurring/recurringDetailWrapper.ts @@ -10,7 +10,7 @@ import { RecurringDetail } from './recurringDetail'; export class RecurringDetailWrapper { - 'RecurringDetail'?: RecurringDetail | null; + 'RecurringDetail'?: RecurringDetail; static discriminator: string | undefined = undefined; @@ -18,7 +18,7 @@ export class RecurringDetailWrapper { { "name": "RecurringDetail", "baseName": "RecurringDetail", - "type": "RecurringDetail | null" + "type": "RecurringDetail" } ]; static getAttributeTypeMap() { diff --git a/src/typings/recurring/recurringDetailsRequest.ts b/src/typings/recurring/recurringDetailsRequest.ts index 293f2a2fc..e12a434c7 100644 --- a/src/typings/recurring/recurringDetailsRequest.ts +++ b/src/typings/recurring/recurringDetailsRequest.ts @@ -14,7 +14,7 @@ export class RecurringDetailsRequest { * The merchant account identifier you want to process the (transaction) request with. */ 'merchantAccount': string; - 'recurring'?: Recurring | null; + 'recurring'?: Recurring; /** * The reference you use to uniquely identify the shopper (e.g. user ID or account ID). */ @@ -31,7 +31,7 @@ export class RecurringDetailsRequest { { "name": "recurring", "baseName": "recurring", - "type": "Recurring | null" + "type": "Recurring" }, { "name": "shopperReference", diff --git a/src/typings/recurring/scheduleAccountUpdaterRequest.ts b/src/typings/recurring/scheduleAccountUpdaterRequest.ts index 22083e84b..166e63e40 100644 --- a/src/typings/recurring/scheduleAccountUpdaterRequest.ts +++ b/src/typings/recurring/scheduleAccountUpdaterRequest.ts @@ -14,7 +14,7 @@ export class ScheduleAccountUpdaterRequest { * This field contains additional data, which may be required for a particular request. */ 'additionalData'?: { [key: string]: string; }; - 'card'?: Card | null; + 'card'?: Card; /** * Account of the merchant. */ @@ -43,7 +43,7 @@ export class ScheduleAccountUpdaterRequest { { "name": "card", "baseName": "card", - "type": "Card | null" + "type": "Card" }, { "name": "merchantAccount", diff --git a/src/typings/reportWebhooks/models.ts b/src/typings/reportWebhooks/models.ts index 66ce762b1..6fa54bb16 100644 --- a/src/typings/reportWebhooks/models.ts +++ b/src/typings/reportWebhooks/models.ts @@ -1,12 +1,4 @@ -/* - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - +import localVarRequest from 'request'; export * from './balancePlatformNotificationResponse'; export * from './reportNotificationData'; @@ -14,6 +6,18 @@ export * from './reportNotificationRequest'; export * from './resource'; export * from './resourceReference'; +import * as fs from 'fs'; + +export interface RequestDetailedFile { + value: Buffer; + options?: { + filename?: string; + contentType?: string; + } +} + +export type RequestFile = string | Buffer | fs.ReadStream | RequestDetailedFile; + import { BalancePlatformNotificationResponse } from './balancePlatformNotificationResponse'; import { ReportNotificationData } from './reportNotificationData'; @@ -45,6 +49,23 @@ let typeMap: {[index: string]: any} = { "ResourceReference": ResourceReference, } +// Check if a string starts with another string without using es6 features +function startsWith(str: string, match: string): boolean { + return str.substring(0, match.length) === match; +} + +// Check if a string ends with another string without using es6 features +function endsWith(str: string, match: string): boolean { + return str.length >= match.length && str.substring(str.length - match.length) === match; +} + +const nullableSuffix = " | null"; +const optionalSuffix = " | undefined"; +const arrayPrefix = "Array<"; +const arraySuffix = ">"; +const mapPrefix = "{ [key: string]: "; +const mapSuffix = "; }"; + export class ObjectSerializer { public static findCorrectType(data: any, expectedType: string) { if (data == undefined) { @@ -81,25 +102,37 @@ export class ObjectSerializer { } } - public static serialize(data: any, type: string) { + public static serialize(data: any, type: string): any { if (data == undefined) { return data; } else if (primitives.indexOf(type.toLowerCase()) !== -1) { return data; - } else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6 - let subType: string = type.replace("Array<", ""); // Array => Type> - subType = subType.substring(0, subType.length - 1); // Type> => Type + } else if (endsWith(type, nullableSuffix)) { + let subType: string = type.slice(0, -nullableSuffix.length); // Type | null => Type + return ObjectSerializer.serialize(data, subType); + } else if (endsWith(type, optionalSuffix)) { + let subType: string = type.slice(0, -optionalSuffix.length); // Type | undefined => Type + return ObjectSerializer.serialize(data, subType); + } else if (startsWith(type, arrayPrefix)) { + let subType: string = type.slice(arrayPrefix.length, -arraySuffix.length); // Array => Type let transformedData: any[] = []; for (let index = 0; index < data.length; index++) { let datum = data[index]; transformedData.push(ObjectSerializer.serialize(datum, subType)); } return transformedData; + } else if (startsWith(type, mapPrefix)) { + let subType: string = type.slice(mapPrefix.length, -mapSuffix.length); // { [key: string]: Type; } => Type + let transformedData: { [key: string]: any } = {}; + for (let key in data) { + transformedData[key] = ObjectSerializer.serialize( + data[key], + subType, + ); + } + return transformedData; } else if (type === "Date") { return data.toISOString(); - } else if (type === "SaleToAcquirerData") { - const dataString = JSON.stringify(data); - return Buffer.from(dataString).toString("base64"); } else { if (enumsMap[type]) { return data; @@ -122,22 +155,37 @@ export class ObjectSerializer { } } - public static deserialize(data: any, type: string) { + public static deserialize(data: any, type: string): any { // polymorphism may change the actual type. type = ObjectSerializer.findCorrectType(data, type); if (data == undefined) { return data; } else if (primitives.indexOf(type.toLowerCase()) !== -1) { return data; - } else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6 - let subType: string = type.replace("Array<", ""); // Array => Type> - subType = subType.substring(0, subType.length - 1); // Type> => Type + } else if (endsWith(type, nullableSuffix)) { + let subType: string = type.slice(0, -nullableSuffix.length); // Type | null => Type + return ObjectSerializer.deserialize(data, subType); + } else if (endsWith(type, optionalSuffix)) { + let subType: string = type.slice(0, -optionalSuffix.length); // Type | undefined => Type + return ObjectSerializer.deserialize(data, subType); + } else if (startsWith(type, arrayPrefix)) { + let subType: string = type.slice(arrayPrefix.length, -arraySuffix.length); // Array => Type let transformedData: any[] = []; for (let index = 0; index < data.length; index++) { let datum = data[index]; transformedData.push(ObjectSerializer.deserialize(datum, subType)); } return transformedData; + } else if (startsWith(type, mapPrefix)) { + let subType: string = type.slice(mapPrefix.length, -mapSuffix.length); // { [key: string]: Type; } => Type + let transformedData: { [key: string]: any } = {}; + for (let key in data) { + transformedData[key] = ObjectSerializer.deserialize( + data[key], + subType, + ); + } + return transformedData; } else if (type === "Date") { return new Date(data); } else { @@ -158,3 +206,77 @@ export class ObjectSerializer { } } } + +export interface Authentication { + /** + * Apply authentication settings to header and query params. + */ + applyToRequest(requestOptions: localVarRequest.Options): Promise | void; +} + +export class HttpBasicAuth implements Authentication { + public username: string = ''; + public password: string = ''; + + applyToRequest(requestOptions: localVarRequest.Options): void { + requestOptions.auth = { + username: this.username, password: this.password + } + } +} + +export class HttpBearerAuth implements Authentication { + public accessToken: string | (() => string) = ''; + + applyToRequest(requestOptions: localVarRequest.Options): void { + if (requestOptions && requestOptions.headers) { + const accessToken = typeof this.accessToken === 'function' + ? this.accessToken() + : this.accessToken; + requestOptions.headers["Authorization"] = "Bearer " + accessToken; + } + } +} + +export class ApiKeyAuth implements Authentication { + public apiKey: string = ''; + + constructor(private location: string, private paramName: string) { + } + + applyToRequest(requestOptions: localVarRequest.Options): void { + if (this.location == "query") { + (requestOptions.qs)[this.paramName] = this.apiKey; + } else if (this.location == "header" && requestOptions && requestOptions.headers) { + requestOptions.headers[this.paramName] = this.apiKey; + } else if (this.location == 'cookie' && requestOptions && requestOptions.headers) { + if (requestOptions.headers['Cookie']) { + requestOptions.headers['Cookie'] += '; ' + this.paramName + '=' + encodeURIComponent(this.apiKey); + } + else { + requestOptions.headers['Cookie'] = this.paramName + '=' + encodeURIComponent(this.apiKey); + } + } + } +} + +export class OAuth implements Authentication { + public accessToken: string = ''; + + applyToRequest(requestOptions: localVarRequest.Options): void { + if (requestOptions && requestOptions.headers) { + requestOptions.headers["Authorization"] = "Bearer " + this.accessToken; + } + } +} + +export class VoidAuth implements Authentication { + public username: string = ''; + public password: string = ''; + + applyToRequest(_: localVarRequest.Options): void { + // Do nothing + } +} + +export type Interceptor = (requestOptions: localVarRequest.Options) => (Promise | void); diff --git a/src/typings/reportWebhooks/reportNotificationData.ts b/src/typings/reportWebhooks/reportNotificationData.ts index 2bd4465b4..d0556095d 100644 --- a/src/typings/reportWebhooks/reportNotificationData.ts +++ b/src/typings/reportWebhooks/reportNotificationData.ts @@ -10,8 +10,8 @@ import { ResourceReference } from './resourceReference'; export class ReportNotificationData { - 'accountHolder'?: ResourceReference | null; - 'balanceAccount'?: ResourceReference | null; + 'accountHolder'?: ResourceReference; + 'balanceAccount'?: ResourceReference; /** * The unique identifier of the balance platform. */ @@ -43,12 +43,12 @@ export class ReportNotificationData { { "name": "accountHolder", "baseName": "accountHolder", - "type": "ResourceReference | null" + "type": "ResourceReference" }, { "name": "balanceAccount", "baseName": "balanceAccount", - "type": "ResourceReference | null" + "type": "ResourceReference" }, { "name": "balancePlatform", diff --git a/src/typings/reportWebhooks/reportNotificationRequest.ts b/src/typings/reportWebhooks/reportNotificationRequest.ts index ea5546123..885822299 100644 --- a/src/typings/reportWebhooks/reportNotificationRequest.ts +++ b/src/typings/reportWebhooks/reportNotificationRequest.ts @@ -55,6 +55,6 @@ export class ReportNotificationRequest { export namespace ReportNotificationRequest { export enum TypeEnum { - BalancePlatformReportCreated = 'balancePlatform.report.created' + BalancePlatformReportCreated = 'balancePlatform.report.created' } } diff --git a/src/typings/sessionAuthentication/accountHolderResource.ts b/src/typings/sessionAuthentication/accountHolderResource.ts new file mode 100644 index 000000000..6d89294eb --- /dev/null +++ b/src/typings/sessionAuthentication/accountHolderResource.ts @@ -0,0 +1,34 @@ +/* + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { Resource } from './resource'; +import { ResourceType } from './resourceType'; + +export class AccountHolderResource extends Resource { + /** + * The unique identifier of the resource connected to the component. For [Platform Experience components](https://docs.adyen.com/platforms/build-user-dashboards), this is the account holder linked to the balance account shown in the component. + */ + 'accountHolderId': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "accountHolderId", + "baseName": "accountHolderId", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return super.getAttributeTypeMap().concat(AccountHolderResource.attributeTypeMap); + } +} + +export namespace AccountHolderResource { +} diff --git a/src/typings/sessionAuthentication/authenticationSessionRequest.ts b/src/typings/sessionAuthentication/authenticationSessionRequest.ts new file mode 100644 index 000000000..c9d1aa4fb --- /dev/null +++ b/src/typings/sessionAuthentication/authenticationSessionRequest.ts @@ -0,0 +1,46 @@ +/* + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { Policy } from './policy'; +import { ProductType } from './productType'; + +export class AuthenticationSessionRequest { + /** + * The URL where the component will appear. In your live environment, you must protect the URL with an SSL certificate and ensure that it starts with `https://`. + */ + 'allowOrigin': string; + 'policy': Policy; + 'product': ProductType; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "allowOrigin", + "baseName": "allowOrigin", + "type": "string" + }, + { + "name": "policy", + "baseName": "policy", + "type": "Policy" + }, + { + "name": "product", + "baseName": "product", + "type": "ProductType" + } ]; + + static getAttributeTypeMap() { + return AuthenticationSessionRequest.attributeTypeMap; + } +} + +export namespace AuthenticationSessionRequest { +} diff --git a/src/typings/sessionAuthentication/authenticationSessionResponse.ts b/src/typings/sessionAuthentication/authenticationSessionResponse.ts new file mode 100644 index 000000000..76f6c5eb1 --- /dev/null +++ b/src/typings/sessionAuthentication/authenticationSessionResponse.ts @@ -0,0 +1,39 @@ +/* + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + + +export class AuthenticationSessionResponse { + /** + * The unique identifier of the session. + */ + 'id'?: string; + /** + * The session token created. + */ + 'token'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "id", + "baseName": "id", + "type": "string" + }, + { + "name": "token", + "baseName": "token", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return AuthenticationSessionResponse.attributeTypeMap; + } +} + diff --git a/src/typings/sessionAuthentication/balanceAccountResource.ts b/src/typings/sessionAuthentication/balanceAccountResource.ts new file mode 100644 index 000000000..3a1750c11 --- /dev/null +++ b/src/typings/sessionAuthentication/balanceAccountResource.ts @@ -0,0 +1,31 @@ +/* + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { Resource } from './resource'; +import { ResourceType } from './resourceType'; + +export class BalanceAccountResource extends Resource { + 'balanceAccountId': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "balanceAccountId", + "baseName": "balanceAccountId", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return super.getAttributeTypeMap().concat(BalanceAccountResource.attributeTypeMap); + } +} + +export namespace BalanceAccountResource { +} diff --git a/src/typings/sessionAuthentication/defaultErrorResponseEntity.ts b/src/typings/sessionAuthentication/defaultErrorResponseEntity.ts new file mode 100644 index 000000000..e2529fc9b --- /dev/null +++ b/src/typings/sessionAuthentication/defaultErrorResponseEntity.ts @@ -0,0 +1,97 @@ +/* + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { InvalidField } from './invalidField'; + +/** +* Standardized error response following RFC-7807 format +*/ +export class DefaultErrorResponseEntity { + /** + * A human-readable explanation specific to this occurrence of the problem. + */ + 'detail'?: string; + /** + * Unique business error code. + */ + 'errorCode'?: string; + /** + * A URI that identifies the specific occurrence of the problem if applicable. + */ + 'instance'?: string; + /** + * Array of fields with validation errors when applicable. + */ + 'invalidFields'?: Array; + /** + * The unique reference for the request. + */ + 'requestId'?: string; + /** + * The HTTP status code. + */ + 'status'?: number; + /** + * A short, human-readable summary of the problem type. + */ + 'title'?: string; + /** + * A URI that identifies the validation error type. It points to human-readable documentation for the problem type. + */ + 'type'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "detail", + "baseName": "detail", + "type": "string" + }, + { + "name": "errorCode", + "baseName": "errorCode", + "type": "string" + }, + { + "name": "instance", + "baseName": "instance", + "type": "string" + }, + { + "name": "invalidFields", + "baseName": "invalidFields", + "type": "Array" + }, + { + "name": "requestId", + "baseName": "requestId", + "type": "string" + }, + { + "name": "status", + "baseName": "status", + "type": "number" + }, + { + "name": "title", + "baseName": "title", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return DefaultErrorResponseEntity.attributeTypeMap; + } +} + diff --git a/src/typings/sessionAuthentication/invalidField.ts b/src/typings/sessionAuthentication/invalidField.ts new file mode 100644 index 000000000..c0aa8956a --- /dev/null +++ b/src/typings/sessionAuthentication/invalidField.ts @@ -0,0 +1,48 @@ +/* + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + + +export class InvalidField { + /** + * The field that has an invalid value. + */ + 'name': string; + /** + * The invalid value. + */ + 'value': string; + /** + * Description of the validation error. + */ + 'message': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "value", + "baseName": "value", + "type": "string" + }, + { + "name": "message", + "baseName": "message", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return InvalidField.attributeTypeMap; + } +} + diff --git a/src/typings/sessionAuthentication/legalEntityResource.ts b/src/typings/sessionAuthentication/legalEntityResource.ts new file mode 100644 index 000000000..883d718bb --- /dev/null +++ b/src/typings/sessionAuthentication/legalEntityResource.ts @@ -0,0 +1,34 @@ +/* + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { Resource } from './resource'; +import { ResourceType } from './resourceType'; + +export class LegalEntityResource extends Resource { + /** + * The unique identifier of the resource connected to the component. For [Onboarding components](https://docs.adyen.com/platforms/onboard-users/components), this is the legal entity that has a contractual relationship with your platform and owns the [transfer instrument](https://docs.adyen.com/api-explorer/legalentity/latest/post/transferInstruments). For sole proprietorships, this is the legal entity of the individual owner. + */ + 'legalEntityId': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "legalEntityId", + "baseName": "legalEntityId", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return super.getAttributeTypeMap().concat(LegalEntityResource.attributeTypeMap); + } +} + +export namespace LegalEntityResource { +} diff --git a/src/typings/sessionAuthentication/merchantAccountResource.ts b/src/typings/sessionAuthentication/merchantAccountResource.ts new file mode 100644 index 000000000..8b46a4d49 --- /dev/null +++ b/src/typings/sessionAuthentication/merchantAccountResource.ts @@ -0,0 +1,31 @@ +/* + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { Resource } from './resource'; +import { ResourceType } from './resourceType'; + +export class MerchantAccountResource extends Resource { + 'merchantAccountCode'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "merchantAccountCode", + "baseName": "merchantAccountCode", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return super.getAttributeTypeMap().concat(MerchantAccountResource.attributeTypeMap); + } +} + +export namespace MerchantAccountResource { +} diff --git a/src/typings/sessionAuthentication/models.ts b/src/typings/sessionAuthentication/models.ts new file mode 100644 index 000000000..3adc258be --- /dev/null +++ b/src/typings/sessionAuthentication/models.ts @@ -0,0 +1,305 @@ +import localVarRequest from 'request'; + +export * from './accountHolderResource'; +export * from './authenticationSessionRequest'; +export * from './authenticationSessionResponse'; +export * from './balanceAccountResource'; +export * from './defaultErrorResponseEntity'; +export * from './invalidField'; +export * from './legalEntityResource'; +export * from './merchantAccountResource'; +export * from './paymentInstrumentResource'; +export * from './policy'; +export * from './productType'; +export * from './resource'; +export * from './resourceType'; + +import * as fs from 'fs'; + +export interface RequestDetailedFile { + value: Buffer; + options?: { + filename?: string; + contentType?: string; + } +} + +export type RequestFile = string | Buffer | fs.ReadStream | RequestDetailedFile; + + +import { AccountHolderResource } from './accountHolderResource'; +import { AuthenticationSessionRequest } from './authenticationSessionRequest'; +import { AuthenticationSessionResponse } from './authenticationSessionResponse'; +import { BalanceAccountResource } from './balanceAccountResource'; +import { DefaultErrorResponseEntity } from './defaultErrorResponseEntity'; +import { InvalidField } from './invalidField'; +import { LegalEntityResource } from './legalEntityResource'; +import { MerchantAccountResource } from './merchantAccountResource'; +import { PaymentInstrumentResource } from './paymentInstrumentResource'; +import { Policy } from './policy'; +import { ProductType } from './productType'; +import { Resource } from './resource'; +import { ResourceType } from './resourceType'; + +/* tslint:disable:no-unused-variable */ +let primitives = [ + "string", + "boolean", + "double", + "integer", + "long", + "float", + "number", + "any" + ]; + +let enumsMap: {[index: string]: any} = { + "ProductType": ProductType, + "ResourceType": ResourceType, +} + +let typeMap: {[index: string]: any} = { + "AccountHolderResource": AccountHolderResource, + "AuthenticationSessionRequest": AuthenticationSessionRequest, + "AuthenticationSessionResponse": AuthenticationSessionResponse, + "BalanceAccountResource": BalanceAccountResource, + "DefaultErrorResponseEntity": DefaultErrorResponseEntity, + "InvalidField": InvalidField, + "LegalEntityResource": LegalEntityResource, + "MerchantAccountResource": MerchantAccountResource, + "PaymentInstrumentResource": PaymentInstrumentResource, + "Policy": Policy, + "Resource": Resource, +} + +// Check if a string starts with another string without using es6 features +function startsWith(str: string, match: string): boolean { + return str.substring(0, match.length) === match; +} + +// Check if a string ends with another string without using es6 features +function endsWith(str: string, match: string): boolean { + return str.length >= match.length && str.substring(str.length - match.length) === match; +} + +const nullableSuffix = " | null"; +const optionalSuffix = " | undefined"; +const arrayPrefix = "Array<"; +const arraySuffix = ">"; +const mapPrefix = "{ [key: string]: "; +const mapSuffix = "; }"; + +export class ObjectSerializer { + public static findCorrectType(data: any, expectedType: string) { + if (data == undefined) { + return expectedType; + } else if (primitives.indexOf(expectedType.toLowerCase()) !== -1) { + return expectedType; + } else if (expectedType === "Date") { + return expectedType; + } else { + if (enumsMap[expectedType]) { + return expectedType; + } + + if (!typeMap[expectedType]) { + return expectedType; // w/e we don't know the type + } + + // Check the discriminator + let discriminatorProperty = typeMap[expectedType].discriminator; + if (discriminatorProperty == null) { + return expectedType; // the type does not have a discriminator. use it. + } else { + if (data[discriminatorProperty]) { + var discriminatorType = data[discriminatorProperty]; + if(typeMap[discriminatorType]){ + return discriminatorType; // use the type given in the discriminator + } else { + return expectedType; // discriminator did not map to a type + } + } else { + return expectedType; // discriminator was not present (or an empty string) + } + } + } + } + + public static serialize(data: any, type: string): any { + if (data == undefined) { + return data; + } else if (primitives.indexOf(type.toLowerCase()) !== -1) { + return data; + } else if (endsWith(type, nullableSuffix)) { + let subType: string = type.slice(0, -nullableSuffix.length); // Type | null => Type + return ObjectSerializer.serialize(data, subType); + } else if (endsWith(type, optionalSuffix)) { + let subType: string = type.slice(0, -optionalSuffix.length); // Type | undefined => Type + return ObjectSerializer.serialize(data, subType); + } else if (startsWith(type, arrayPrefix)) { + let subType: string = type.slice(arrayPrefix.length, -arraySuffix.length); // Array => Type + let transformedData: any[] = []; + for (let index = 0; index < data.length; index++) { + let datum = data[index]; + transformedData.push(ObjectSerializer.serialize(datum, subType)); + } + return transformedData; + } else if (startsWith(type, mapPrefix)) { + let subType: string = type.slice(mapPrefix.length, -mapSuffix.length); // { [key: string]: Type; } => Type + let transformedData: { [key: string]: any } = {}; + for (let key in data) { + transformedData[key] = ObjectSerializer.serialize( + data[key], + subType, + ); + } + return transformedData; + } else if (type === "Date") { + return data.toISOString(); + } else { + if (enumsMap[type]) { + return data; + } + if (!typeMap[type]) { // in case we dont know the type + return data; + } + + // Get the actual type of this object + type = this.findCorrectType(data, type); + + // get the map for the correct type. + let attributeTypes = typeMap[type].getAttributeTypeMap(); + let instance: {[index: string]: any} = {}; + for (let index = 0; index < attributeTypes.length; index++) { + let attributeType = attributeTypes[index]; + instance[attributeType.baseName] = ObjectSerializer.serialize(data[attributeType.name], attributeType.type); + } + return instance; + } + } + + public static deserialize(data: any, type: string): any { + // polymorphism may change the actual type. + type = ObjectSerializer.findCorrectType(data, type); + if (data == undefined) { + return data; + } else if (primitives.indexOf(type.toLowerCase()) !== -1) { + return data; + } else if (endsWith(type, nullableSuffix)) { + let subType: string = type.slice(0, -nullableSuffix.length); // Type | null => Type + return ObjectSerializer.deserialize(data, subType); + } else if (endsWith(type, optionalSuffix)) { + let subType: string = type.slice(0, -optionalSuffix.length); // Type | undefined => Type + return ObjectSerializer.deserialize(data, subType); + } else if (startsWith(type, arrayPrefix)) { + let subType: string = type.slice(arrayPrefix.length, -arraySuffix.length); // Array => Type + let transformedData: any[] = []; + for (let index = 0; index < data.length; index++) { + let datum = data[index]; + transformedData.push(ObjectSerializer.deserialize(datum, subType)); + } + return transformedData; + } else if (startsWith(type, mapPrefix)) { + let subType: string = type.slice(mapPrefix.length, -mapSuffix.length); // { [key: string]: Type; } => Type + let transformedData: { [key: string]: any } = {}; + for (let key in data) { + transformedData[key] = ObjectSerializer.deserialize( + data[key], + subType, + ); + } + return transformedData; + } else if (type === "Date") { + return new Date(data); + } else { + if (enumsMap[type]) {// is Enum + return data; + } + + if (!typeMap[type]) { // dont know the type + return data; + } + let instance = new typeMap[type](); + let attributeTypes = typeMap[type].getAttributeTypeMap(); + for (let index = 0; index < attributeTypes.length; index++) { + let attributeType = attributeTypes[index]; + instance[attributeType.name] = ObjectSerializer.deserialize(data[attributeType.baseName], attributeType.type); + } + return instance; + } + } +} + +export interface Authentication { + /** + * Apply authentication settings to header and query params. + */ + applyToRequest(requestOptions: localVarRequest.Options): Promise | void; +} + +export class HttpBasicAuth implements Authentication { + public username: string = ''; + public password: string = ''; + + applyToRequest(requestOptions: localVarRequest.Options): void { + requestOptions.auth = { + username: this.username, password: this.password + } + } +} + +export class HttpBearerAuth implements Authentication { + public accessToken: string | (() => string) = ''; + + applyToRequest(requestOptions: localVarRequest.Options): void { + if (requestOptions && requestOptions.headers) { + const accessToken = typeof this.accessToken === 'function' + ? this.accessToken() + : this.accessToken; + requestOptions.headers["Authorization"] = "Bearer " + accessToken; + } + } +} + +export class ApiKeyAuth implements Authentication { + public apiKey: string = ''; + + constructor(private location: string, private paramName: string) { + } + + applyToRequest(requestOptions: localVarRequest.Options): void { + if (this.location == "query") { + (requestOptions.qs)[this.paramName] = this.apiKey; + } else if (this.location == "header" && requestOptions && requestOptions.headers) { + requestOptions.headers[this.paramName] = this.apiKey; + } else if (this.location == 'cookie' && requestOptions && requestOptions.headers) { + if (requestOptions.headers['Cookie']) { + requestOptions.headers['Cookie'] += '; ' + this.paramName + '=' + encodeURIComponent(this.apiKey); + } + else { + requestOptions.headers['Cookie'] = this.paramName + '=' + encodeURIComponent(this.apiKey); + } + } + } +} + +export class OAuth implements Authentication { + public accessToken: string = ''; + + applyToRequest(requestOptions: localVarRequest.Options): void { + if (requestOptions && requestOptions.headers) { + requestOptions.headers["Authorization"] = "Bearer " + this.accessToken; + } + } +} + +export class VoidAuth implements Authentication { + public username: string = ''; + public password: string = ''; + + applyToRequest(_: localVarRequest.Options): void { + // Do nothing + } +} + +export type Interceptor = (requestOptions: localVarRequest.Options) => (Promise | void); diff --git a/src/typings/sessionAuthentication/paymentInstrumentResource.ts b/src/typings/sessionAuthentication/paymentInstrumentResource.ts new file mode 100644 index 000000000..acc3074e8 --- /dev/null +++ b/src/typings/sessionAuthentication/paymentInstrumentResource.ts @@ -0,0 +1,31 @@ +/* + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { Resource } from './resource'; +import { ResourceType } from './resourceType'; + +export class PaymentInstrumentResource extends Resource { + 'paymentInstrumentId': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "paymentInstrumentId", + "baseName": "paymentInstrumentId", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return super.getAttributeTypeMap().concat(PaymentInstrumentResource.attributeTypeMap); + } +} + +export namespace PaymentInstrumentResource { +} diff --git a/src/typings/sessionAuthentication/policy.ts b/src/typings/sessionAuthentication/policy.ts new file mode 100644 index 000000000..f01be6bf2 --- /dev/null +++ b/src/typings/sessionAuthentication/policy.ts @@ -0,0 +1,40 @@ +/* + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { Resource } from './resource'; + +export class Policy { + /** + * An object containing the type and the unique identifier of the user of the component. For [Onboarding components](https://docs.adyen.com/platforms/onboard-users/components), this is the ID of the legal entity that has a contractual relationship with your platform. For sole proprietorships, use the ID of the legal entity of the individual owner. For [Platform Experience components](https://docs.adyen.com/platforms/build-user-dashboards), this is the ID of the account holder that is associated with the balance account shown in the component. + */ + 'resources'?: Set; + /** + * The name of the role required to use the component. + */ + 'roles'?: Set; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "resources", + "baseName": "resources", + "type": "Set" + }, + { + "name": "roles", + "baseName": "roles", + "type": "Set" + } ]; + + static getAttributeTypeMap() { + return Policy.attributeTypeMap; + } +} + diff --git a/src/typings/sessionAuthentication/productType.ts b/src/typings/sessionAuthentication/productType.ts new file mode 100644 index 000000000..9b2e28738 --- /dev/null +++ b/src/typings/sessionAuthentication/productType.ts @@ -0,0 +1,14 @@ +/* + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + + +export enum ProductType { + Onboarding = 'onboarding', + Platform = 'platform' +} diff --git a/src/typings/sessionAuthentication/resource.ts b/src/typings/sessionAuthentication/resource.ts new file mode 100644 index 000000000..340a0dc2f --- /dev/null +++ b/src/typings/sessionAuthentication/resource.ts @@ -0,0 +1,30 @@ +/* + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { ResourceType } from './resourceType'; + +export class Resource { + 'type'?: ResourceType; + + static discriminator: string | undefined = "type"; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "type", + "baseName": "type", + "type": "ResourceType" + } ]; + + static getAttributeTypeMap() { + return Resource.attributeTypeMap; + } +} + +export namespace Resource { +} diff --git a/src/typings/sessionAuthentication/resourceType.ts b/src/typings/sessionAuthentication/resourceType.ts new file mode 100644 index 000000000..23dce13e7 --- /dev/null +++ b/src/typings/sessionAuthentication/resourceType.ts @@ -0,0 +1,17 @@ +/* + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + + +export enum ResourceType { + LegalEntity = 'legalEntity', + BalanceAccount = 'balanceAccount', + AccountHolder = 'accountHolder', + MerchantAccount = 'merchantAccount', + PaymentInstrument = 'paymentInstrument' +} diff --git a/src/typings/storedValue/models.ts b/src/typings/storedValue/models.ts index a6828afed..5a8a02936 100644 --- a/src/typings/storedValue/models.ts +++ b/src/typings/storedValue/models.ts @@ -1,12 +1,4 @@ -/* - * The version of the OpenAPI document: v46 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - +import localVarRequest from 'request'; export * from './amount'; export * from './serviceError'; @@ -23,6 +15,18 @@ export * from './storedValueStatusChangeResponse'; export * from './storedValueVoidRequest'; export * from './storedValueVoidResponse'; +import * as fs from 'fs'; + +export interface RequestDetailedFile { + value: Buffer; + options?: { + filename?: string; + contentType?: string; + } +} + +export type RequestFile = string | Buffer | fs.ReadStream | RequestDetailedFile; + import { Amount } from './amount'; import { ServiceError } from './serviceError'; @@ -84,6 +88,23 @@ let typeMap: {[index: string]: any} = { "StoredValueVoidResponse": StoredValueVoidResponse, } +// Check if a string starts with another string without using es6 features +function startsWith(str: string, match: string): boolean { + return str.substring(0, match.length) === match; +} + +// Check if a string ends with another string without using es6 features +function endsWith(str: string, match: string): boolean { + return str.length >= match.length && str.substring(str.length - match.length) === match; +} + +const nullableSuffix = " | null"; +const optionalSuffix = " | undefined"; +const arrayPrefix = "Array<"; +const arraySuffix = ">"; +const mapPrefix = "{ [key: string]: "; +const mapSuffix = "; }"; + export class ObjectSerializer { public static findCorrectType(data: any, expectedType: string) { if (data == undefined) { @@ -120,25 +141,37 @@ export class ObjectSerializer { } } - public static serialize(data: any, type: string) { + public static serialize(data: any, type: string): any { if (data == undefined) { return data; } else if (primitives.indexOf(type.toLowerCase()) !== -1) { return data; - } else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6 - let subType: string = type.replace("Array<", ""); // Array => Type> - subType = subType.substring(0, subType.length - 1); // Type> => Type + } else if (endsWith(type, nullableSuffix)) { + let subType: string = type.slice(0, -nullableSuffix.length); // Type | null => Type + return ObjectSerializer.serialize(data, subType); + } else if (endsWith(type, optionalSuffix)) { + let subType: string = type.slice(0, -optionalSuffix.length); // Type | undefined => Type + return ObjectSerializer.serialize(data, subType); + } else if (startsWith(type, arrayPrefix)) { + let subType: string = type.slice(arrayPrefix.length, -arraySuffix.length); // Array => Type let transformedData: any[] = []; for (let index = 0; index < data.length; index++) { let datum = data[index]; transformedData.push(ObjectSerializer.serialize(datum, subType)); } return transformedData; + } else if (startsWith(type, mapPrefix)) { + let subType: string = type.slice(mapPrefix.length, -mapSuffix.length); // { [key: string]: Type; } => Type + let transformedData: { [key: string]: any } = {}; + for (let key in data) { + transformedData[key] = ObjectSerializer.serialize( + data[key], + subType, + ); + } + return transformedData; } else if (type === "Date") { return data.toISOString(); - } else if (type === "SaleToAcquirerData") { - const dataString = JSON.stringify(data); - return Buffer.from(dataString).toString("base64"); } else { if (enumsMap[type]) { return data; @@ -161,22 +194,37 @@ export class ObjectSerializer { } } - public static deserialize(data: any, type: string) { + public static deserialize(data: any, type: string): any { // polymorphism may change the actual type. type = ObjectSerializer.findCorrectType(data, type); if (data == undefined) { return data; } else if (primitives.indexOf(type.toLowerCase()) !== -1) { return data; - } else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6 - let subType: string = type.replace("Array<", ""); // Array => Type> - subType = subType.substring(0, subType.length - 1); // Type> => Type + } else if (endsWith(type, nullableSuffix)) { + let subType: string = type.slice(0, -nullableSuffix.length); // Type | null => Type + return ObjectSerializer.deserialize(data, subType); + } else if (endsWith(type, optionalSuffix)) { + let subType: string = type.slice(0, -optionalSuffix.length); // Type | undefined => Type + return ObjectSerializer.deserialize(data, subType); + } else if (startsWith(type, arrayPrefix)) { + let subType: string = type.slice(arrayPrefix.length, -arraySuffix.length); // Array => Type let transformedData: any[] = []; for (let index = 0; index < data.length; index++) { let datum = data[index]; transformedData.push(ObjectSerializer.deserialize(datum, subType)); } return transformedData; + } else if (startsWith(type, mapPrefix)) { + let subType: string = type.slice(mapPrefix.length, -mapSuffix.length); // { [key: string]: Type; } => Type + let transformedData: { [key: string]: any } = {}; + for (let key in data) { + transformedData[key] = ObjectSerializer.deserialize( + data[key], + subType, + ); + } + return transformedData; } else if (type === "Date") { return new Date(data); } else { @@ -197,3 +245,77 @@ export class ObjectSerializer { } } } + +export interface Authentication { + /** + * Apply authentication settings to header and query params. + */ + applyToRequest(requestOptions: localVarRequest.Options): Promise | void; +} + +export class HttpBasicAuth implements Authentication { + public username: string = ''; + public password: string = ''; + + applyToRequest(requestOptions: localVarRequest.Options): void { + requestOptions.auth = { + username: this.username, password: this.password + } + } +} + +export class HttpBearerAuth implements Authentication { + public accessToken: string | (() => string) = ''; + + applyToRequest(requestOptions: localVarRequest.Options): void { + if (requestOptions && requestOptions.headers) { + const accessToken = typeof this.accessToken === 'function' + ? this.accessToken() + : this.accessToken; + requestOptions.headers["Authorization"] = "Bearer " + accessToken; + } + } +} + +export class ApiKeyAuth implements Authentication { + public apiKey: string = ''; + + constructor(private location: string, private paramName: string) { + } + + applyToRequest(requestOptions: localVarRequest.Options): void { + if (this.location == "query") { + (requestOptions.qs)[this.paramName] = this.apiKey; + } else if (this.location == "header" && requestOptions && requestOptions.headers) { + requestOptions.headers[this.paramName] = this.apiKey; + } else if (this.location == 'cookie' && requestOptions && requestOptions.headers) { + if (requestOptions.headers['Cookie']) { + requestOptions.headers['Cookie'] += '; ' + this.paramName + '=' + encodeURIComponent(this.apiKey); + } + else { + requestOptions.headers['Cookie'] = this.paramName + '=' + encodeURIComponent(this.apiKey); + } + } + } +} + +export class OAuth implements Authentication { + public accessToken: string = ''; + + applyToRequest(requestOptions: localVarRequest.Options): void { + if (requestOptions && requestOptions.headers) { + requestOptions.headers["Authorization"] = "Bearer " + this.accessToken; + } + } +} + +export class VoidAuth implements Authentication { + public username: string = ''; + public password: string = ''; + + applyToRequest(_: localVarRequest.Options): void { + // Do nothing + } +} + +export type Interceptor = (requestOptions: localVarRequest.Options) => (Promise | void); diff --git a/src/typings/storedValue/storedValueBalanceCheckRequest.ts b/src/typings/storedValue/storedValueBalanceCheckRequest.ts index 70dde2ec7..959483379 100644 --- a/src/typings/storedValue/storedValueBalanceCheckRequest.ts +++ b/src/typings/storedValue/storedValueBalanceCheckRequest.ts @@ -10,7 +10,7 @@ import { Amount } from './amount'; export class StoredValueBalanceCheckRequest { - 'amount'?: Amount | null; + 'amount'?: Amount; /** * The merchant account identifier, with which you want to process the transaction. */ @@ -40,7 +40,7 @@ export class StoredValueBalanceCheckRequest { { "name": "amount", "baseName": "amount", - "type": "Amount | null" + "type": "Amount" }, { "name": "merchantAccount", @@ -85,9 +85,9 @@ export class StoredValueBalanceCheckRequest { export namespace StoredValueBalanceCheckRequest { export enum ShopperInteractionEnum { - Ecommerce = 'Ecommerce', - ContAuth = 'ContAuth', - Moto = 'Moto', - Pos = 'POS' + Ecommerce = 'Ecommerce', + ContAuth = 'ContAuth', + Moto = 'Moto', + Pos = 'POS' } } diff --git a/src/typings/storedValue/storedValueBalanceCheckResponse.ts b/src/typings/storedValue/storedValueBalanceCheckResponse.ts index 3e5b40215..e6d69cfb9 100644 --- a/src/typings/storedValue/storedValueBalanceCheckResponse.ts +++ b/src/typings/storedValue/storedValueBalanceCheckResponse.ts @@ -10,7 +10,7 @@ import { Amount } from './amount'; export class StoredValueBalanceCheckResponse { - 'currentBalance'?: Amount | null; + 'currentBalance'?: Amount; /** * Adyen\'s 16-character string reference associated with the transaction/request. This value is globally unique; quote it when communicating with us about this request. */ @@ -34,7 +34,7 @@ export class StoredValueBalanceCheckResponse { { "name": "currentBalance", "baseName": "currentBalance", - "type": "Amount | null" + "type": "Amount" }, { "name": "pspReference", @@ -64,9 +64,9 @@ export class StoredValueBalanceCheckResponse { export namespace StoredValueBalanceCheckResponse { export enum ResultCodeEnum { - Success = 'Success', - Refused = 'Refused', - Error = 'Error', - NotEnoughBalance = 'NotEnoughBalance' + Success = 'Success', + Refused = 'Refused', + Error = 'Error', + NotEnoughBalance = 'NotEnoughBalance' } } diff --git a/src/typings/storedValue/storedValueBalanceMergeRequest.ts b/src/typings/storedValue/storedValueBalanceMergeRequest.ts index a75bea37e..0f9f89132 100644 --- a/src/typings/storedValue/storedValueBalanceMergeRequest.ts +++ b/src/typings/storedValue/storedValueBalanceMergeRequest.ts @@ -10,7 +10,7 @@ import { Amount } from './amount'; export class StoredValueBalanceMergeRequest { - 'amount'?: Amount | null; + 'amount'?: Amount; /** * The merchant account identifier, with which you want to process the transaction. */ @@ -44,7 +44,7 @@ export class StoredValueBalanceMergeRequest { { "name": "amount", "baseName": "amount", - "type": "Amount | null" + "type": "Amount" }, { "name": "merchantAccount", @@ -94,9 +94,9 @@ export class StoredValueBalanceMergeRequest { export namespace StoredValueBalanceMergeRequest { export enum ShopperInteractionEnum { - Ecommerce = 'Ecommerce', - ContAuth = 'ContAuth', - Moto = 'Moto', - Pos = 'POS' + Ecommerce = 'Ecommerce', + ContAuth = 'ContAuth', + Moto = 'Moto', + Pos = 'POS' } } diff --git a/src/typings/storedValue/storedValueBalanceMergeResponse.ts b/src/typings/storedValue/storedValueBalanceMergeResponse.ts index e8aafdbba..852077c37 100644 --- a/src/typings/storedValue/storedValueBalanceMergeResponse.ts +++ b/src/typings/storedValue/storedValueBalanceMergeResponse.ts @@ -14,7 +14,7 @@ export class StoredValueBalanceMergeResponse { * Authorisation code: * When the payment is authorised, this field holds the authorisation code for the payment. * When the payment is not authorised, this field is empty. */ 'authCode'?: string; - 'currentBalance'?: Amount | null; + 'currentBalance'?: Amount; /** * Adyen\'s 16-character string reference associated with the transaction/request. This value is globally unique; quote it when communicating with us about this request. */ @@ -43,7 +43,7 @@ export class StoredValueBalanceMergeResponse { { "name": "currentBalance", "baseName": "currentBalance", - "type": "Amount | null" + "type": "Amount" }, { "name": "pspReference", @@ -73,9 +73,9 @@ export class StoredValueBalanceMergeResponse { export namespace StoredValueBalanceMergeResponse { export enum ResultCodeEnum { - Success = 'Success', - Refused = 'Refused', - Error = 'Error', - NotEnoughBalance = 'NotEnoughBalance' + Success = 'Success', + Refused = 'Refused', + Error = 'Error', + NotEnoughBalance = 'NotEnoughBalance' } } diff --git a/src/typings/storedValue/storedValueIssueRequest.ts b/src/typings/storedValue/storedValueIssueRequest.ts index b83130538..0039ba2b0 100644 --- a/src/typings/storedValue/storedValueIssueRequest.ts +++ b/src/typings/storedValue/storedValueIssueRequest.ts @@ -10,7 +10,7 @@ import { Amount } from './amount'; export class StoredValueIssueRequest { - 'amount'?: Amount | null; + 'amount'?: Amount; /** * The merchant account identifier, with which you want to process the transaction. */ @@ -40,7 +40,7 @@ export class StoredValueIssueRequest { { "name": "amount", "baseName": "amount", - "type": "Amount | null" + "type": "Amount" }, { "name": "merchantAccount", @@ -85,9 +85,9 @@ export class StoredValueIssueRequest { export namespace StoredValueIssueRequest { export enum ShopperInteractionEnum { - Ecommerce = 'Ecommerce', - ContAuth = 'ContAuth', - Moto = 'Moto', - Pos = 'POS' + Ecommerce = 'Ecommerce', + ContAuth = 'ContAuth', + Moto = 'Moto', + Pos = 'POS' } } diff --git a/src/typings/storedValue/storedValueIssueResponse.ts b/src/typings/storedValue/storedValueIssueResponse.ts index 33ff163a5..963ab706f 100644 --- a/src/typings/storedValue/storedValueIssueResponse.ts +++ b/src/typings/storedValue/storedValueIssueResponse.ts @@ -14,7 +14,7 @@ export class StoredValueIssueResponse { * Authorisation code: * When the payment is authorised, this field holds the authorisation code for the payment. * When the payment is not authorised, this field is empty. */ 'authCode'?: string; - 'currentBalance'?: Amount | null; + 'currentBalance'?: Amount; /** * The collection that contains the type of the payment method and its specific information if available */ @@ -47,7 +47,7 @@ export class StoredValueIssueResponse { { "name": "currentBalance", "baseName": "currentBalance", - "type": "Amount | null" + "type": "Amount" }, { "name": "paymentMethod", @@ -82,9 +82,9 @@ export class StoredValueIssueResponse { export namespace StoredValueIssueResponse { export enum ResultCodeEnum { - Success = 'Success', - Refused = 'Refused', - Error = 'Error', - NotEnoughBalance = 'NotEnoughBalance' + Success = 'Success', + Refused = 'Refused', + Error = 'Error', + NotEnoughBalance = 'NotEnoughBalance' } } diff --git a/src/typings/storedValue/storedValueLoadRequest.ts b/src/typings/storedValue/storedValueLoadRequest.ts index 56f728dc4..afa505c76 100644 --- a/src/typings/storedValue/storedValueLoadRequest.ts +++ b/src/typings/storedValue/storedValueLoadRequest.ts @@ -94,13 +94,13 @@ export class StoredValueLoadRequest { export namespace StoredValueLoadRequest { export enum LoadTypeEnum { - MerchandiseReturn = 'merchandiseReturn', - Load = 'load' + MerchandiseReturn = 'merchandiseReturn', + Load = 'load' } export enum ShopperInteractionEnum { - Ecommerce = 'Ecommerce', - ContAuth = 'ContAuth', - Moto = 'Moto', - Pos = 'POS' + Ecommerce = 'Ecommerce', + ContAuth = 'ContAuth', + Moto = 'Moto', + Pos = 'POS' } } diff --git a/src/typings/storedValue/storedValueLoadResponse.ts b/src/typings/storedValue/storedValueLoadResponse.ts index 076d70322..aa8e5f246 100644 --- a/src/typings/storedValue/storedValueLoadResponse.ts +++ b/src/typings/storedValue/storedValueLoadResponse.ts @@ -14,7 +14,7 @@ export class StoredValueLoadResponse { * Authorisation code: * When the payment is authorised, this field holds the authorisation code for the payment. * When the payment is not authorised, this field is empty. */ 'authCode'?: string; - 'currentBalance'?: Amount | null; + 'currentBalance'?: Amount; /** * Adyen\'s 16-character string reference associated with the transaction/request. This value is globally unique; quote it when communicating with us about this request. */ @@ -43,7 +43,7 @@ export class StoredValueLoadResponse { { "name": "currentBalance", "baseName": "currentBalance", - "type": "Amount | null" + "type": "Amount" }, { "name": "pspReference", @@ -73,9 +73,9 @@ export class StoredValueLoadResponse { export namespace StoredValueLoadResponse { export enum ResultCodeEnum { - Success = 'Success', - Refused = 'Refused', - Error = 'Error', - NotEnoughBalance = 'NotEnoughBalance' + Success = 'Success', + Refused = 'Refused', + Error = 'Error', + NotEnoughBalance = 'NotEnoughBalance' } } diff --git a/src/typings/storedValue/storedValueStatusChangeRequest.ts b/src/typings/storedValue/storedValueStatusChangeRequest.ts index 10efa8cdd..8a5d50a80 100644 --- a/src/typings/storedValue/storedValueStatusChangeRequest.ts +++ b/src/typings/storedValue/storedValueStatusChangeRequest.ts @@ -10,7 +10,7 @@ import { Amount } from './amount'; export class StoredValueStatusChangeRequest { - 'amount'?: Amount | null; + 'amount'?: Amount; /** * The merchant account identifier, with which you want to process the transaction. */ @@ -44,7 +44,7 @@ export class StoredValueStatusChangeRequest { { "name": "amount", "baseName": "amount", - "type": "Amount | null" + "type": "Amount" }, { "name": "merchantAccount", @@ -94,13 +94,13 @@ export class StoredValueStatusChangeRequest { export namespace StoredValueStatusChangeRequest { export enum ShopperInteractionEnum { - Ecommerce = 'Ecommerce', - ContAuth = 'ContAuth', - Moto = 'Moto', - Pos = 'POS' + Ecommerce = 'Ecommerce', + ContAuth = 'ContAuth', + Moto = 'Moto', + Pos = 'POS' } export enum StatusEnum { - Active = 'active', - Inactive = 'inactive' + Active = 'active', + Inactive = 'inactive' } } diff --git a/src/typings/storedValue/storedValueStatusChangeResponse.ts b/src/typings/storedValue/storedValueStatusChangeResponse.ts index 722e5830e..3caefc823 100644 --- a/src/typings/storedValue/storedValueStatusChangeResponse.ts +++ b/src/typings/storedValue/storedValueStatusChangeResponse.ts @@ -14,7 +14,7 @@ export class StoredValueStatusChangeResponse { * Authorisation code: * When the payment is authorised, this field holds the authorisation code for the payment. * When the payment is not authorised, this field is empty. */ 'authCode'?: string; - 'currentBalance'?: Amount | null; + 'currentBalance'?: Amount; /** * Adyen\'s 16-character string reference associated with the transaction/request. This value is globally unique; quote it when communicating with us about this request. */ @@ -43,7 +43,7 @@ export class StoredValueStatusChangeResponse { { "name": "currentBalance", "baseName": "currentBalance", - "type": "Amount | null" + "type": "Amount" }, { "name": "pspReference", @@ -73,9 +73,9 @@ export class StoredValueStatusChangeResponse { export namespace StoredValueStatusChangeResponse { export enum ResultCodeEnum { - Success = 'Success', - Refused = 'Refused', - Error = 'Error', - NotEnoughBalance = 'NotEnoughBalance' + Success = 'Success', + Refused = 'Refused', + Error = 'Error', + NotEnoughBalance = 'NotEnoughBalance' } } diff --git a/src/typings/storedValue/storedValueVoidResponse.ts b/src/typings/storedValue/storedValueVoidResponse.ts index d671f894d..27d92e986 100644 --- a/src/typings/storedValue/storedValueVoidResponse.ts +++ b/src/typings/storedValue/storedValueVoidResponse.ts @@ -10,7 +10,7 @@ import { Amount } from './amount'; export class StoredValueVoidResponse { - 'currentBalance'?: Amount | null; + 'currentBalance'?: Amount; /** * Adyen\'s 16-character string reference associated with the transaction/request. This value is globally unique; quote it when communicating with us about this request. */ @@ -34,7 +34,7 @@ export class StoredValueVoidResponse { { "name": "currentBalance", "baseName": "currentBalance", - "type": "Amount | null" + "type": "Amount" }, { "name": "pspReference", @@ -64,9 +64,9 @@ export class StoredValueVoidResponse { export namespace StoredValueVoidResponse { export enum ResultCodeEnum { - Success = 'Success', - Refused = 'Refused', - Error = 'Error', - NotEnoughBalance = 'NotEnoughBalance' + Success = 'Success', + Refused = 'Refused', + Error = 'Error', + NotEnoughBalance = 'NotEnoughBalance' } } diff --git a/src/typings/terminalManagement/getTerminalDetailsResponse.ts b/src/typings/terminalManagement/getTerminalDetailsResponse.ts index 68a5c8aa7..d348dac77 100644 --- a/src/typings/terminalManagement/getTerminalDetailsResponse.ts +++ b/src/typings/terminalManagement/getTerminalDetailsResponse.ts @@ -90,7 +90,7 @@ export class GetTerminalDetailsResponse { * The store code of the store that the terminal is assigned to. */ 'store'?: string; - 'storeDetails'?: Store | null; + 'storeDetails'?: Store; /** * The unique terminal ID. */ @@ -214,7 +214,7 @@ export class GetTerminalDetailsResponse { { "name": "storeDetails", "baseName": "storeDetails", - "type": "Store | null" + "type": "Store" }, { "name": "terminal", @@ -244,17 +244,17 @@ export class GetTerminalDetailsResponse { export namespace GetTerminalDetailsResponse { export enum TerminalStatusEnum { - OnlineLast1Day = 'OnlineLast1Day', - OnlineLast2Days = 'OnlineLast2Days', - OnlineLast3Days = 'OnlineLast3Days', - OnlineLast4Days = 'OnlineLast4Days', - OnlineLast5Days = 'OnlineLast5Days', - OnlineLast6Days = 'OnlineLast6Days', - OnlineLast7Days = 'OnlineLast7Days', - OnlineToday = 'OnlineToday', - ReAssignToInventoryPending = 'ReAssignToInventoryPending', - ReAssignToMerchantInventoryPending = 'ReAssignToMerchantInventoryPending', - ReAssignToStorePending = 'ReAssignToStorePending', - SwitchedOff = 'SwitchedOff' + OnlineLast1Day = 'OnlineLast1Day', + OnlineLast2Days = 'OnlineLast2Days', + OnlineLast3Days = 'OnlineLast3Days', + OnlineLast4Days = 'OnlineLast4Days', + OnlineLast5Days = 'OnlineLast5Days', + OnlineLast6Days = 'OnlineLast6Days', + OnlineLast7Days = 'OnlineLast7Days', + OnlineToday = 'OnlineToday', + ReAssignToInventoryPending = 'ReAssignToInventoryPending', + ReAssignToMerchantInventoryPending = 'ReAssignToMerchantInventoryPending', + ReAssignToStorePending = 'ReAssignToStorePending', + SwitchedOff = 'SwitchedOff' } } diff --git a/src/typings/terminalManagement/models.ts b/src/typings/terminalManagement/models.ts index 07f847370..b8fa8801e 100644 --- a/src/typings/terminalManagement/models.ts +++ b/src/typings/terminalManagement/models.ts @@ -1,12 +1,4 @@ -/* - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - +import localVarRequest from 'request'; export * from './address'; export * from './assignTerminalsRequest'; @@ -23,6 +15,18 @@ export * from './merchantAccount'; export * from './serviceError'; export * from './store'; +import * as fs from 'fs'; + +export interface RequestDetailedFile { + value: Buffer; + options?: { + filename?: string; + contentType?: string; + } +} + +export type RequestFile = string | Buffer | fs.ReadStream | RequestDetailedFile; + import { Address } from './address'; import { AssignTerminalsRequest } from './assignTerminalsRequest'; @@ -72,6 +76,23 @@ let typeMap: {[index: string]: any} = { "Store": Store, } +// Check if a string starts with another string without using es6 features +function startsWith(str: string, match: string): boolean { + return str.substring(0, match.length) === match; +} + +// Check if a string ends with another string without using es6 features +function endsWith(str: string, match: string): boolean { + return str.length >= match.length && str.substring(str.length - match.length) === match; +} + +const nullableSuffix = " | null"; +const optionalSuffix = " | undefined"; +const arrayPrefix = "Array<"; +const arraySuffix = ">"; +const mapPrefix = "{ [key: string]: "; +const mapSuffix = "; }"; + export class ObjectSerializer { public static findCorrectType(data: any, expectedType: string) { if (data == undefined) { @@ -108,25 +129,37 @@ export class ObjectSerializer { } } - public static serialize(data: any, type: string) { + public static serialize(data: any, type: string): any { if (data == undefined) { return data; } else if (primitives.indexOf(type.toLowerCase()) !== -1) { return data; - } else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6 - let subType: string = type.replace("Array<", ""); // Array => Type> - subType = subType.substring(0, subType.length - 1); // Type> => Type + } else if (endsWith(type, nullableSuffix)) { + let subType: string = type.slice(0, -nullableSuffix.length); // Type | null => Type + return ObjectSerializer.serialize(data, subType); + } else if (endsWith(type, optionalSuffix)) { + let subType: string = type.slice(0, -optionalSuffix.length); // Type | undefined => Type + return ObjectSerializer.serialize(data, subType); + } else if (startsWith(type, arrayPrefix)) { + let subType: string = type.slice(arrayPrefix.length, -arraySuffix.length); // Array => Type let transformedData: any[] = []; for (let index = 0; index < data.length; index++) { let datum = data[index]; transformedData.push(ObjectSerializer.serialize(datum, subType)); } return transformedData; + } else if (startsWith(type, mapPrefix)) { + let subType: string = type.slice(mapPrefix.length, -mapSuffix.length); // { [key: string]: Type; } => Type + let transformedData: { [key: string]: any } = {}; + for (let key in data) { + transformedData[key] = ObjectSerializer.serialize( + data[key], + subType, + ); + } + return transformedData; } else if (type === "Date") { return data.toISOString(); - } else if (type === "SaleToAcquirerData") { - const dataString = JSON.stringify(data); - return Buffer.from(dataString).toString("base64"); } else { if (enumsMap[type]) { return data; @@ -149,22 +182,37 @@ export class ObjectSerializer { } } - public static deserialize(data: any, type: string) { + public static deserialize(data: any, type: string): any { // polymorphism may change the actual type. type = ObjectSerializer.findCorrectType(data, type); if (data == undefined) { return data; } else if (primitives.indexOf(type.toLowerCase()) !== -1) { return data; - } else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6 - let subType: string = type.replace("Array<", ""); // Array => Type> - subType = subType.substring(0, subType.length - 1); // Type> => Type + } else if (endsWith(type, nullableSuffix)) { + let subType: string = type.slice(0, -nullableSuffix.length); // Type | null => Type + return ObjectSerializer.deserialize(data, subType); + } else if (endsWith(type, optionalSuffix)) { + let subType: string = type.slice(0, -optionalSuffix.length); // Type | undefined => Type + return ObjectSerializer.deserialize(data, subType); + } else if (startsWith(type, arrayPrefix)) { + let subType: string = type.slice(arrayPrefix.length, -arraySuffix.length); // Array => Type let transformedData: any[] = []; for (let index = 0; index < data.length; index++) { let datum = data[index]; transformedData.push(ObjectSerializer.deserialize(datum, subType)); } return transformedData; + } else if (startsWith(type, mapPrefix)) { + let subType: string = type.slice(mapPrefix.length, -mapSuffix.length); // { [key: string]: Type; } => Type + let transformedData: { [key: string]: any } = {}; + for (let key in data) { + transformedData[key] = ObjectSerializer.deserialize( + data[key], + subType, + ); + } + return transformedData; } else if (type === "Date") { return new Date(data); } else { @@ -185,3 +233,77 @@ export class ObjectSerializer { } } } + +export interface Authentication { + /** + * Apply authentication settings to header and query params. + */ + applyToRequest(requestOptions: localVarRequest.Options): Promise | void; +} + +export class HttpBasicAuth implements Authentication { + public username: string = ''; + public password: string = ''; + + applyToRequest(requestOptions: localVarRequest.Options): void { + requestOptions.auth = { + username: this.username, password: this.password + } + } +} + +export class HttpBearerAuth implements Authentication { + public accessToken: string | (() => string) = ''; + + applyToRequest(requestOptions: localVarRequest.Options): void { + if (requestOptions && requestOptions.headers) { + const accessToken = typeof this.accessToken === 'function' + ? this.accessToken() + : this.accessToken; + requestOptions.headers["Authorization"] = "Bearer " + accessToken; + } + } +} + +export class ApiKeyAuth implements Authentication { + public apiKey: string = ''; + + constructor(private location: string, private paramName: string) { + } + + applyToRequest(requestOptions: localVarRequest.Options): void { + if (this.location == "query") { + (requestOptions.qs)[this.paramName] = this.apiKey; + } else if (this.location == "header" && requestOptions && requestOptions.headers) { + requestOptions.headers[this.paramName] = this.apiKey; + } else if (this.location == 'cookie' && requestOptions && requestOptions.headers) { + if (requestOptions.headers['Cookie']) { + requestOptions.headers['Cookie'] += '; ' + this.paramName + '=' + encodeURIComponent(this.apiKey); + } + else { + requestOptions.headers['Cookie'] = this.paramName + '=' + encodeURIComponent(this.apiKey); + } + } + } +} + +export class OAuth implements Authentication { + public accessToken: string = ''; + + applyToRequest(requestOptions: localVarRequest.Options): void { + if (requestOptions && requestOptions.headers) { + requestOptions.headers["Authorization"] = "Bearer " + this.accessToken; + } + } +} + +export class VoidAuth implements Authentication { + public username: string = ''; + public password: string = ''; + + applyToRequest(_: localVarRequest.Options): void { + // Do nothing + } +} + +export type Interceptor = (requestOptions: localVarRequest.Options) => (Promise | void); diff --git a/src/typings/terminalManagement/store.ts b/src/typings/terminalManagement/store.ts index 9780606c9..ce3696416 100644 --- a/src/typings/terminalManagement/store.ts +++ b/src/typings/terminalManagement/store.ts @@ -10,7 +10,7 @@ import { Address } from './address'; export class Store { - 'address'?: Address | null; + 'address'?: Address; /** * The description of the store. */ @@ -38,7 +38,7 @@ export class Store { { "name": "address", "baseName": "address", - "type": "Address | null" + "type": "Address" }, { "name": "description", diff --git a/src/typings/transactionWebhooks/bankCategoryData.ts b/src/typings/transactionWebhooks/bankCategoryData.ts index 40c4f1403..b77da7fc7 100644 --- a/src/typings/transactionWebhooks/bankCategoryData.ts +++ b/src/typings/transactionWebhooks/bankCategoryData.ts @@ -16,7 +16,7 @@ export class BankCategoryData { /** * **bank** */ - 'type'?: BankCategoryData.TypeEnum; + 'type'?: BankCategoryData.TypeEnum = BankCategoryData.TypeEnum.Bank; static discriminator: string | undefined = undefined; @@ -39,14 +39,14 @@ export class BankCategoryData { export namespace BankCategoryData { export enum PriorityEnum { - CrossBorder = 'crossBorder', - Fast = 'fast', - Instant = 'instant', - Internal = 'internal', - Regular = 'regular', - Wire = 'wire' + CrossBorder = 'crossBorder', + Fast = 'fast', + Instant = 'instant', + Internal = 'internal', + Regular = 'regular', + Wire = 'wire' } export enum TypeEnum { - Bank = 'bank' + Bank = 'bank' } } diff --git a/src/typings/transactionWebhooks/internalCategoryData.ts b/src/typings/transactionWebhooks/internalCategoryData.ts index 205518bb5..165c0720a 100644 --- a/src/typings/transactionWebhooks/internalCategoryData.ts +++ b/src/typings/transactionWebhooks/internalCategoryData.ts @@ -20,7 +20,7 @@ export class InternalCategoryData { /** * **internal** */ - 'type'?: InternalCategoryData.TypeEnum; + 'type'?: InternalCategoryData.TypeEnum = InternalCategoryData.TypeEnum.Internal; static discriminator: string | undefined = undefined; @@ -48,6 +48,6 @@ export class InternalCategoryData { export namespace InternalCategoryData { export enum TypeEnum { - Internal = 'internal' + Internal = 'internal' } } diff --git a/src/typings/transactionWebhooks/issuedCard.ts b/src/typings/transactionWebhooks/issuedCard.ts index 5abedca41..9916ae71d 100644 --- a/src/typings/transactionWebhooks/issuedCard.ts +++ b/src/typings/transactionWebhooks/issuedCard.ts @@ -23,7 +23,7 @@ export class IssuedCard { * Contains information about how the payment was processed. For example, **ecommerce** for online or **pos** for in-person payments. */ 'processingType'?: IssuedCard.ProcessingTypeEnum; - 'relayedAuthorisationData'?: RelayedAuthorisationData | null; + 'relayedAuthorisationData'?: RelayedAuthorisationData; /** * The identifier of the original payment. This ID is provided by the scheme and can be alphanumeric or numeric, depending on the scheme. The `schemeTraceID` should refer to an original `schemeUniqueTransactionID` provided in an earlier payment (not necessarily processed by Adyen). A `schemeTraceId` is typically available for authorization adjustments or recurring payments. */ @@ -35,7 +35,7 @@ export class IssuedCard { /** * **issuedCard** */ - 'type'?: IssuedCard.TypeEnum; + 'type'?: IssuedCard.TypeEnum = IssuedCard.TypeEnum.IssuedCard; /** * The evaluation of the validation facts. See [validation checks](https://docs.adyen.com/issuing/validation-checks) for more information. */ @@ -62,7 +62,7 @@ export class IssuedCard { { "name": "relayedAuthorisationData", "baseName": "relayedAuthorisationData", - "type": "RelayedAuthorisationData | null" + "type": "RelayedAuthorisationData" }, { "name": "schemeTraceId", @@ -92,25 +92,25 @@ export class IssuedCard { export namespace IssuedCard { export enum PanEntryModeEnum { - Chip = 'chip', - Cof = 'cof', - Contactless = 'contactless', - Ecommerce = 'ecommerce', - Magstripe = 'magstripe', - Manual = 'manual', - Token = 'token' + Chip = 'chip', + Cof = 'cof', + Contactless = 'contactless', + Ecommerce = 'ecommerce', + Magstripe = 'magstripe', + Manual = 'manual', + Token = 'token' } export enum ProcessingTypeEnum { - AtmWithdraw = 'atmWithdraw', - BalanceInquiry = 'balanceInquiry', - Ecommerce = 'ecommerce', - Moto = 'moto', - Pos = 'pos', - PurchaseWithCashback = 'purchaseWithCashback', - Recurring = 'recurring', - Token = 'token' + AtmWithdraw = 'atmWithdraw', + BalanceInquiry = 'balanceInquiry', + Ecommerce = 'ecommerce', + Moto = 'moto', + Pos = 'pos', + PurchaseWithCashback = 'purchaseWithCashback', + Recurring = 'recurring', + Token = 'token' } export enum TypeEnum { - IssuedCard = 'issuedCard' + IssuedCard = 'issuedCard' } } diff --git a/src/typings/transactionWebhooks/models.ts b/src/typings/transactionWebhooks/models.ts index 43befa041..466e747eb 100644 --- a/src/typings/transactionWebhooks/models.ts +++ b/src/typings/transactionWebhooks/models.ts @@ -1,12 +1,4 @@ -/* - * The version of the OpenAPI document: v4 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - +import localVarRequest from 'request'; export * from './amount'; export * from './balancePlatformNotificationResponse'; @@ -22,6 +14,19 @@ export * from './transaction'; export * from './transactionNotificationRequestV4'; export * from './transferNotificationValidationFact'; export * from './transferView'; +export * from './transferViewCategoryData'; + +import * as fs from 'fs'; + +export interface RequestDetailedFile { + value: Buffer; + options?: { + filename?: string; + contentType?: string; + } +} + +export type RequestFile = string | Buffer | fs.ReadStream | RequestDetailedFile; import { Amount } from './amount'; @@ -38,6 +43,7 @@ import { Transaction } from './transaction'; import { TransactionNotificationRequestV4 } from './transactionNotificationRequestV4'; import { TransferNotificationValidationFact } from './transferNotificationValidationFact'; import { TransferView } from './transferView'; +import { TransferViewCategoryData } from './transferViewCategoryData'; /* tslint:disable:no-unused-variable */ let primitives = [ @@ -62,6 +68,11 @@ let enumsMap: {[index: string]: any} = { "PlatformPayment.TypeEnum": PlatformPayment.TypeEnum, "Transaction.StatusEnum": Transaction.StatusEnum, "TransactionNotificationRequestV4.TypeEnum": TransactionNotificationRequestV4.TypeEnum, + "TransferViewCategoryData.PriorityEnum": TransferViewCategoryData.PriorityEnum, + "TransferViewCategoryData.TypeEnum": TransferViewCategoryData.TypeEnum, + "TransferViewCategoryData.PanEntryModeEnum": TransferViewCategoryData.PanEntryModeEnum, + "TransferViewCategoryData.ProcessingTypeEnum": TransferViewCategoryData.ProcessingTypeEnum, + "TransferViewCategoryData.PlatformPaymentTypeEnum": TransferViewCategoryData.PlatformPaymentTypeEnum, } let typeMap: {[index: string]: any} = { @@ -79,8 +90,26 @@ let typeMap: {[index: string]: any} = { "TransactionNotificationRequestV4": TransactionNotificationRequestV4, "TransferNotificationValidationFact": TransferNotificationValidationFact, "TransferView": TransferView, + "TransferViewCategoryData": TransferViewCategoryData, } +// Check if a string starts with another string without using es6 features +function startsWith(str: string, match: string): boolean { + return str.substring(0, match.length) === match; +} + +// Check if a string ends with another string without using es6 features +function endsWith(str: string, match: string): boolean { + return str.length >= match.length && str.substring(str.length - match.length) === match; +} + +const nullableSuffix = " | null"; +const optionalSuffix = " | undefined"; +const arrayPrefix = "Array<"; +const arraySuffix = ">"; +const mapPrefix = "{ [key: string]: "; +const mapSuffix = "; }"; + export class ObjectSerializer { public static findCorrectType(data: any, expectedType: string) { if (data == undefined) { @@ -117,25 +146,37 @@ export class ObjectSerializer { } } - public static serialize(data: any, type: string) { + public static serialize(data: any, type: string): any { if (data == undefined) { return data; } else if (primitives.indexOf(type.toLowerCase()) !== -1) { return data; - } else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6 - let subType: string = type.replace("Array<", ""); // Array => Type> - subType = subType.substring(0, subType.length - 1); // Type> => Type + } else if (endsWith(type, nullableSuffix)) { + let subType: string = type.slice(0, -nullableSuffix.length); // Type | null => Type + return ObjectSerializer.serialize(data, subType); + } else if (endsWith(type, optionalSuffix)) { + let subType: string = type.slice(0, -optionalSuffix.length); // Type | undefined => Type + return ObjectSerializer.serialize(data, subType); + } else if (startsWith(type, arrayPrefix)) { + let subType: string = type.slice(arrayPrefix.length, -arraySuffix.length); // Array => Type let transformedData: any[] = []; for (let index = 0; index < data.length; index++) { let datum = data[index]; transformedData.push(ObjectSerializer.serialize(datum, subType)); } return transformedData; + } else if (startsWith(type, mapPrefix)) { + let subType: string = type.slice(mapPrefix.length, -mapSuffix.length); // { [key: string]: Type; } => Type + let transformedData: { [key: string]: any } = {}; + for (let key in data) { + transformedData[key] = ObjectSerializer.serialize( + data[key], + subType, + ); + } + return transformedData; } else if (type === "Date") { return data.toISOString(); - } else if (type === "SaleToAcquirerData") { - const dataString = JSON.stringify(data); - return Buffer.from(dataString).toString("base64"); } else { if (enumsMap[type]) { return data; @@ -158,22 +199,37 @@ export class ObjectSerializer { } } - public static deserialize(data: any, type: string) { + public static deserialize(data: any, type: string): any { // polymorphism may change the actual type. type = ObjectSerializer.findCorrectType(data, type); if (data == undefined) { return data; } else if (primitives.indexOf(type.toLowerCase()) !== -1) { return data; - } else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6 - let subType: string = type.replace("Array<", ""); // Array => Type> - subType = subType.substring(0, subType.length - 1); // Type> => Type + } else if (endsWith(type, nullableSuffix)) { + let subType: string = type.slice(0, -nullableSuffix.length); // Type | null => Type + return ObjectSerializer.deserialize(data, subType); + } else if (endsWith(type, optionalSuffix)) { + let subType: string = type.slice(0, -optionalSuffix.length); // Type | undefined => Type + return ObjectSerializer.deserialize(data, subType); + } else if (startsWith(type, arrayPrefix)) { + let subType: string = type.slice(arrayPrefix.length, -arraySuffix.length); // Array => Type let transformedData: any[] = []; for (let index = 0; index < data.length; index++) { let datum = data[index]; transformedData.push(ObjectSerializer.deserialize(datum, subType)); } return transformedData; + } else if (startsWith(type, mapPrefix)) { + let subType: string = type.slice(mapPrefix.length, -mapSuffix.length); // { [key: string]: Type; } => Type + let transformedData: { [key: string]: any } = {}; + for (let key in data) { + transformedData[key] = ObjectSerializer.deserialize( + data[key], + subType, + ); + } + return transformedData; } else if (type === "Date") { return new Date(data); } else { @@ -194,3 +250,77 @@ export class ObjectSerializer { } } } + +export interface Authentication { + /** + * Apply authentication settings to header and query params. + */ + applyToRequest(requestOptions: localVarRequest.Options): Promise | void; +} + +export class HttpBasicAuth implements Authentication { + public username: string = ''; + public password: string = ''; + + applyToRequest(requestOptions: localVarRequest.Options): void { + requestOptions.auth = { + username: this.username, password: this.password + } + } +} + +export class HttpBearerAuth implements Authentication { + public accessToken: string | (() => string) = ''; + + applyToRequest(requestOptions: localVarRequest.Options): void { + if (requestOptions && requestOptions.headers) { + const accessToken = typeof this.accessToken === 'function' + ? this.accessToken() + : this.accessToken; + requestOptions.headers["Authorization"] = "Bearer " + accessToken; + } + } +} + +export class ApiKeyAuth implements Authentication { + public apiKey: string = ''; + + constructor(private location: string, private paramName: string) { + } + + applyToRequest(requestOptions: localVarRequest.Options): void { + if (this.location == "query") { + (requestOptions.qs)[this.paramName] = this.apiKey; + } else if (this.location == "header" && requestOptions && requestOptions.headers) { + requestOptions.headers[this.paramName] = this.apiKey; + } else if (this.location == 'cookie' && requestOptions && requestOptions.headers) { + if (requestOptions.headers['Cookie']) { + requestOptions.headers['Cookie'] += '; ' + this.paramName + '=' + encodeURIComponent(this.apiKey); + } + else { + requestOptions.headers['Cookie'] = this.paramName + '=' + encodeURIComponent(this.apiKey); + } + } + } +} + +export class OAuth implements Authentication { + public accessToken: string = ''; + + applyToRequest(requestOptions: localVarRequest.Options): void { + if (requestOptions && requestOptions.headers) { + requestOptions.headers["Authorization"] = "Bearer " + this.accessToken; + } + } +} + +export class VoidAuth implements Authentication { + public username: string = ''; + public password: string = ''; + + applyToRequest(_: localVarRequest.Options): void { + // Do nothing + } +} + +export type Interceptor = (requestOptions: localVarRequest.Options) => (Promise | void); diff --git a/src/typings/transactionWebhooks/platformPayment.ts b/src/typings/transactionWebhooks/platformPayment.ts index 0dd1a875f..37ae11ef8 100644 --- a/src/typings/transactionWebhooks/platformPayment.ts +++ b/src/typings/transactionWebhooks/platformPayment.ts @@ -22,7 +22,7 @@ export class PlatformPayment { */ 'paymentMerchantReference'?: string; /** - * Specifies the nature of the transfer. This parameter helps categorize transfers so you can reconcile transactions at a later time, using the Balance Platform Accounting Report for [marketplaces](https://docs.adyen.com/marketplaces/reports-and-fees/balance-platform-accounting-report/) or [platforms](https://docs.adyen.com/platforms/reports-and-fees/balance-platform-accounting-report/). Possible values: * **AcquiringFees**: for the acquiring fee incurred on a transaction. * **AdyenCommission**: for the transaction fee due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/guides/payments-training-guide/get-the-best-from-your-card-processing). * **AdyenFees**: for all the transaction fees due to Adyen. This is the sum of Adyen\'s commission and Adyen\'s markup. * **AdyenMarkup**: for the transaction fee due to Adyen under [Interchange++ pricing](https://www.adyen.com/pricing). * **BalanceAccount**: or the sale amount of a transaction. * **Commission**: for your platform\'s commission on a transaction. * **Interchange**: for the interchange fee (fee paid to the issuer) incurred on a transaction. * **PaymentFee**: for all of the transaction fees. * **Remainder**: for the left over amount after currency conversion. * **SchemeFee**: for the scheme fee incurred on a transaction. This is the sum of the interchange fees and the acquiring fees. * **Surcharge**: for the surcharge paid by the customer on a transaction. * **Tip**: for the tip paid by the customer. * **TopUp**: for an incoming transfer to top up your user\'s balance account. * **VAT**: for the Value Added Tax. + * Specifies the nature of the transfer. This parameter helps categorize transfers so you can reconcile transactions at a later time, using the Balance Platform Accounting Report for [marketplaces](https://docs.adyen.com/marketplaces/reports-and-fees/balance-platform-accounting-report/) or [platforms](https://docs.adyen.com/platforms/reports-and-fees/balance-platform-accounting-report/). Possible values: * **AcquiringFees**: for the acquiring fee incurred on a transaction. * **AdyenCommission**: for the transaction fee due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/guides/payments-training-guide/get-the-best-from-your-card-processing). * **AdyenFees**: for all the transaction fees due to Adyen. This is the sum of Adyen\'s commission and Adyen\'s markup. * **AdyenMarkup**: for the transaction fee due to Adyen under [Interchange++ pricing](https://www.adyen.com/pricing). * **BalanceAccount**: or the sale amount of a transaction. * **Commission**: for your platform\'s commission on a transaction. * **DCCPlatformCommission**: for the DCC Commission for the platform on a transaction. * **Interchange**: for the interchange fee (fee paid to the issuer) incurred on a transaction. * **PaymentFee**: for all of the transaction fees. * **Remainder**: for the left over amount after currency conversion. * **SchemeFee**: for the scheme fee incurred on a transaction. This is the sum of the interchange fees and the acquiring fees. * **Surcharge**: for the surcharge paid by the customer on a transaction. * **Tip**: for the tip paid by the customer. * **TopUp**: for an incoming transfer to top up your user\'s balance account. * **VAT**: for the Value Added Tax. */ 'platformPaymentType'?: PlatformPayment.PlatformPaymentTypeEnum; /** @@ -32,7 +32,7 @@ export class PlatformPayment { /** * **platformPayment** */ - 'type'?: PlatformPayment.TypeEnum; + 'type'?: PlatformPayment.TypeEnum = PlatformPayment.TypeEnum.PlatformPayment; static discriminator: string | undefined = undefined; @@ -75,23 +75,24 @@ export class PlatformPayment { export namespace PlatformPayment { export enum PlatformPaymentTypeEnum { - AcquiringFees = 'AcquiringFees', - AdyenCommission = 'AdyenCommission', - AdyenFees = 'AdyenFees', - AdyenMarkup = 'AdyenMarkup', - BalanceAccount = 'BalanceAccount', - Commission = 'Commission', - Default = 'Default', - Interchange = 'Interchange', - PaymentFee = 'PaymentFee', - Remainder = 'Remainder', - SchemeFee = 'SchemeFee', - Surcharge = 'Surcharge', - Tip = 'Tip', - TopUp = 'TopUp', - Vat = 'VAT' + AcquiringFees = 'AcquiringFees', + AdyenCommission = 'AdyenCommission', + AdyenFees = 'AdyenFees', + AdyenMarkup = 'AdyenMarkup', + BalanceAccount = 'BalanceAccount', + Commission = 'Commission', + DccPlatformCommission = 'DCCPlatformCommission', + Default = 'Default', + Interchange = 'Interchange', + PaymentFee = 'PaymentFee', + Remainder = 'Remainder', + SchemeFee = 'SchemeFee', + Surcharge = 'Surcharge', + Tip = 'Tip', + TopUp = 'TopUp', + Vat = 'VAT' } export enum TypeEnum { - PlatformPayment = 'platformPayment' + PlatformPayment = 'platformPayment' } } diff --git a/src/typings/transactionWebhooks/transaction.ts b/src/typings/transactionWebhooks/transaction.ts index 9eba58bb9..a1036ab1f 100644 --- a/src/typings/transactionWebhooks/transaction.ts +++ b/src/typings/transactionWebhooks/transaction.ts @@ -36,7 +36,7 @@ export class Transaction { * The unique identifier of the transaction. */ 'id': string; - 'paymentInstrument'?: PaymentInstrument | null; + 'paymentInstrument'?: PaymentInstrument; /** * The reference sent to or received from the counterparty. * For outgoing funds, this is the [`referenceForBeneficiary`](https://docs.adyen.com/api-explorer/#/transfers/latest/post/transfers__resParam_referenceForBeneficiary) from the [`/transfers`](https://docs.adyen.com/api-explorer/#/transfers/latest/post/transfers__reqParam_referenceForBeneficiary) request. * For incoming funds, this is the reference from the sender. */ @@ -45,7 +45,7 @@ export class Transaction { * The status of the transaction. Possible values: * **pending**: The transaction is still pending. * **booked**: The transaction has been booked to the balance account. */ 'status': Transaction.StatusEnum; - 'transfer'?: TransferView | null; + 'transfer'?: TransferView; /** * The date the transfer amount becomes available in the balance account. */ @@ -97,7 +97,7 @@ export class Transaction { { "name": "paymentInstrument", "baseName": "paymentInstrument", - "type": "PaymentInstrument | null" + "type": "PaymentInstrument" }, { "name": "referenceForBeneficiary", @@ -112,7 +112,7 @@ export class Transaction { { "name": "transfer", "baseName": "transfer", - "type": "TransferView | null" + "type": "TransferView" }, { "name": "valueDate", @@ -127,7 +127,7 @@ export class Transaction { export namespace Transaction { export enum StatusEnum { - Booked = 'booked', - Pending = 'pending' + Booked = 'booked', + Pending = 'pending' } } diff --git a/src/typings/transactionWebhooks/transactionNotificationRequestV4.ts b/src/typings/transactionWebhooks/transactionNotificationRequestV4.ts index c61a5b4c8..ae431eb33 100644 --- a/src/typings/transactionWebhooks/transactionNotificationRequestV4.ts +++ b/src/typings/transactionWebhooks/transactionNotificationRequestV4.ts @@ -55,6 +55,6 @@ export class TransactionNotificationRequestV4 { export namespace TransactionNotificationRequestV4 { export enum TypeEnum { - BalancePlatformTransactionCreated = 'balancePlatform.transaction.created' + BalancePlatformTransactionCreated = 'balancePlatform.transaction.created' } } diff --git a/src/typings/transactionWebhooks/transferView.ts b/src/typings/transactionWebhooks/transferView.ts index 885e4e78d..c89e28cce 100644 --- a/src/typings/transactionWebhooks/transferView.ts +++ b/src/typings/transactionWebhooks/transferView.ts @@ -7,16 +7,10 @@ * Do not edit this class manually. */ -import { BankCategoryData } from './bankCategoryData'; -import { InternalCategoryData } from './internalCategoryData'; -import { IssuedCard } from './issuedCard'; -import { PlatformPayment } from './platformPayment'; +import { TransferViewCategoryData } from './transferViewCategoryData'; export class TransferView { - /** - * The relevant data according to the transfer category. - */ - 'categoryData'?: BankCategoryData | InternalCategoryData | IssuedCard | PlatformPayment | null; + 'categoryData'?: TransferViewCategoryData; /** * The ID of the resource. */ @@ -32,7 +26,7 @@ export class TransferView { { "name": "categoryData", "baseName": "categoryData", - "type": "BankCategoryData | InternalCategoryData | IssuedCard | PlatformPayment | null" + "type": "TransferViewCategoryData" }, { "name": "id", diff --git a/src/typings/transactionWebhooks/transferViewCategoryData.ts b/src/typings/transactionWebhooks/transferViewCategoryData.ts new file mode 100644 index 000000000..a61a3e012 --- /dev/null +++ b/src/typings/transactionWebhooks/transferViewCategoryData.ts @@ -0,0 +1,206 @@ +/* + * The version of the OpenAPI document: v4 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { BankCategoryData } from './bankCategoryData'; +import { InternalCategoryData } from './internalCategoryData'; +import { IssuedCard } from './issuedCard'; +import { PlatformPayment } from './platformPayment'; +import { RelayedAuthorisationData } from './relayedAuthorisationData'; +import { TransferNotificationValidationFact } from './transferNotificationValidationFact'; + +/** +* The relevant data according to the transfer category. +*/ +export class TransferViewCategoryData { + /** + * The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**. Possible values: * **regular**: for normal, low-value transactions. * **fast**: 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). + */ + 'priority'?: TransferViewCategoryData.PriorityEnum; + /** + * **bank** + */ + 'type'?: TransferViewCategoryData.TypeEnum = TransferViewCategoryData.TypeEnum.Bank; + /** + * The capture\'s merchant reference included in the transfer. + */ + 'modificationMerchantReference'?: string; + /** + * The capture reference included in the transfer. + */ + 'modificationPspReference'?: string; + /** + * The authorisation type. For example, **defaultAuthorisation**, **preAuthorisation**, **finalAuthorisation** + */ + 'authorisationType'?: string; + /** + * Indicates the method used for entering the PAN to initiate a transaction. Possible values: **manual**, **chip**, **magstripe**, **contactless**, **cof**, **ecommerce**, **token**. + */ + 'panEntryMode'?: TransferViewCategoryData.PanEntryModeEnum; + /** + * Contains information about how the payment was processed. For example, **ecommerce** for online or **pos** for in-person payments. + */ + 'processingType'?: TransferViewCategoryData.ProcessingTypeEnum; + 'relayedAuthorisationData'?: RelayedAuthorisationData; + /** + * The identifier of the original payment. This ID is provided by the scheme and can be alphanumeric or numeric, depending on the scheme. The `schemeTraceID` should refer to an original `schemeUniqueTransactionID` provided in an earlier payment (not necessarily processed by Adyen). A `schemeTraceId` is typically available for authorization adjustments or recurring payments. + */ + 'schemeTraceId'?: string; + /** + * The unique identifier created by the scheme. This ID can be alphanumeric or numeric depending on the scheme. + */ + 'schemeUniqueTransactionId'?: string; + /** + * The evaluation of the validation facts. See [validation checks](https://docs.adyen.com/issuing/validation-checks) for more information. + */ + 'validationFacts'?: Array; + /** + * The payment\'s merchant reference included in the transfer. + */ + 'paymentMerchantReference'?: string; + /** + * Specifies the nature of the transfer. This parameter helps categorize transfers so you can reconcile transactions at a later time, using the Balance Platform Accounting Report for [marketplaces](https://docs.adyen.com/marketplaces/reports-and-fees/balance-platform-accounting-report/) or [platforms](https://docs.adyen.com/platforms/reports-and-fees/balance-platform-accounting-report/). Possible values: * **AcquiringFees**: for the acquiring fee incurred on a transaction. * **AdyenCommission**: for the transaction fee due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/guides/payments-training-guide/get-the-best-from-your-card-processing). * **AdyenFees**: for all the transaction fees due to Adyen. This is the sum of Adyen\'s commission and Adyen\'s markup. * **AdyenMarkup**: for the transaction fee due to Adyen under [Interchange++ pricing](https://www.adyen.com/pricing). * **BalanceAccount**: or the sale amount of a transaction. * **Commission**: for your platform\'s commission on a transaction. * **DCCPlatformCommission**: for the DCC Commission for the platform on a transaction. * **Interchange**: for the interchange fee (fee paid to the issuer) incurred on a transaction. * **PaymentFee**: for all of the transaction fees. * **Remainder**: for the left over amount after currency conversion. * **SchemeFee**: for the scheme fee incurred on a transaction. This is the sum of the interchange fees and the acquiring fees. * **Surcharge**: for the surcharge paid by the customer on a transaction. * **Tip**: for the tip paid by the customer. * **TopUp**: for an incoming transfer to top up your user\'s balance account. * **VAT**: for the Value Added Tax. + */ + 'platformPaymentType'?: TransferViewCategoryData.PlatformPaymentTypeEnum; + /** + * The payment reference included in the transfer. + */ + 'pspPaymentReference'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "priority", + "baseName": "priority", + "type": "TransferViewCategoryData.PriorityEnum" + }, + { + "name": "type", + "baseName": "type", + "type": "TransferViewCategoryData.TypeEnum" + }, + { + "name": "modificationMerchantReference", + "baseName": "modificationMerchantReference", + "type": "string" + }, + { + "name": "modificationPspReference", + "baseName": "modificationPspReference", + "type": "string" + }, + { + "name": "authorisationType", + "baseName": "authorisationType", + "type": "string" + }, + { + "name": "panEntryMode", + "baseName": "panEntryMode", + "type": "TransferViewCategoryData.PanEntryModeEnum" + }, + { + "name": "processingType", + "baseName": "processingType", + "type": "TransferViewCategoryData.ProcessingTypeEnum" + }, + { + "name": "relayedAuthorisationData", + "baseName": "relayedAuthorisationData", + "type": "RelayedAuthorisationData" + }, + { + "name": "schemeTraceId", + "baseName": "schemeTraceId", + "type": "string" + }, + { + "name": "schemeUniqueTransactionId", + "baseName": "schemeUniqueTransactionId", + "type": "string" + }, + { + "name": "validationFacts", + "baseName": "validationFacts", + "type": "Array" + }, + { + "name": "paymentMerchantReference", + "baseName": "paymentMerchantReference", + "type": "string" + }, + { + "name": "platformPaymentType", + "baseName": "platformPaymentType", + "type": "TransferViewCategoryData.PlatformPaymentTypeEnum" + }, + { + "name": "pspPaymentReference", + "baseName": "pspPaymentReference", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return TransferViewCategoryData.attributeTypeMap; + } +} + +export namespace TransferViewCategoryData { + export enum PriorityEnum { + CrossBorder = 'crossBorder', + Fast = 'fast', + Instant = 'instant', + Internal = 'internal', + Regular = 'regular', + Wire = 'wire' + } + export enum TypeEnum { + Bank = 'bank', + Internal = 'internal', + IssuedCard = 'issuedCard', + PlatformPayment = 'platformPayment' + } + export enum PanEntryModeEnum { + Chip = 'chip', + Cof = 'cof', + Contactless = 'contactless', + Ecommerce = 'ecommerce', + Magstripe = 'magstripe', + Manual = 'manual', + Token = 'token' + } + export enum ProcessingTypeEnum { + AtmWithdraw = 'atmWithdraw', + BalanceInquiry = 'balanceInquiry', + Ecommerce = 'ecommerce', + Moto = 'moto', + Pos = 'pos', + PurchaseWithCashback = 'purchaseWithCashback', + Recurring = 'recurring', + Token = 'token' + } + export enum PlatformPaymentTypeEnum { + AcquiringFees = 'AcquiringFees', + AdyenCommission = 'AdyenCommission', + AdyenFees = 'AdyenFees', + AdyenMarkup = 'AdyenMarkup', + BalanceAccount = 'BalanceAccount', + Commission = 'Commission', + DccPlatformCommission = 'DCCPlatformCommission', + Default = 'Default', + Interchange = 'Interchange', + PaymentFee = 'PaymentFee', + Remainder = 'Remainder', + SchemeFee = 'SchemeFee', + Surcharge = 'Surcharge', + Tip = 'Tip', + TopUp = 'TopUp', + Vat = 'VAT' + } +} diff --git a/src/typings/transferWebhooks/aULocalAccountIdentification.ts b/src/typings/transferWebhooks/aULocalAccountIdentification.ts index 3537211f3..88743023b 100644 --- a/src/typings/transferWebhooks/aULocalAccountIdentification.ts +++ b/src/typings/transferWebhooks/aULocalAccountIdentification.ts @@ -20,7 +20,7 @@ export class AULocalAccountIdentification { /** * **auLocal** */ - 'type': AULocalAccountIdentification.TypeEnum; + 'type': AULocalAccountIdentification.TypeEnum = AULocalAccountIdentification.TypeEnum.AuLocal; static discriminator: string | undefined = undefined; @@ -48,6 +48,6 @@ export class AULocalAccountIdentification { export namespace AULocalAccountIdentification { export enum TypeEnum { - AuLocal = 'auLocal' + AuLocal = 'auLocal' } } diff --git a/src/typings/transferWebhooks/additionalBankIdentification.ts b/src/typings/transferWebhooks/additionalBankIdentification.ts index df951d106..f3783e635 100644 --- a/src/typings/transferWebhooks/additionalBankIdentification.ts +++ b/src/typings/transferWebhooks/additionalBankIdentification.ts @@ -39,7 +39,7 @@ export class AdditionalBankIdentification { export namespace AdditionalBankIdentification { export enum TypeEnum { - GbSortCode = 'gbSortCode', - UsRoutingNumber = 'usRoutingNumber' + GbSortCode = 'gbSortCode', + UsRoutingNumber = 'usRoutingNumber' } } diff --git a/src/typings/transferWebhooks/amountAdjustment.ts b/src/typings/transferWebhooks/amountAdjustment.ts index 543097d5a..bf707a71b 100644 --- a/src/typings/transferWebhooks/amountAdjustment.ts +++ b/src/typings/transferWebhooks/amountAdjustment.ts @@ -10,7 +10,7 @@ import { Amount } from './amount'; export class AmountAdjustment { - 'amount'?: Amount | null; + 'amount'?: Amount; /** * The type of markup that is applied to an authorised payment. Possible values: **exchange**, **forexMarkup**, **authHoldReserve**, **atmMarkup**. */ @@ -26,7 +26,7 @@ export class AmountAdjustment { { "name": "amount", "baseName": "amount", - "type": "Amount | null" + "type": "Amount" }, { "name": "amountAdjustmentType", @@ -46,9 +46,9 @@ export class AmountAdjustment { export namespace AmountAdjustment { export enum AmountAdjustmentTypeEnum { - AtmMarkup = 'atmMarkup', - AuthHoldReserve = 'authHoldReserve', - Exchange = 'exchange', - ForexMarkup = 'forexMarkup' + AtmMarkup = 'atmMarkup', + AuthHoldReserve = 'authHoldReserve', + Exchange = 'exchange', + ForexMarkup = 'forexMarkup' } } diff --git a/src/typings/transferWebhooks/bRLocalAccountIdentification.ts b/src/typings/transferWebhooks/bRLocalAccountIdentification.ts index c43d43135..902f78276 100644 --- a/src/typings/transferWebhooks/bRLocalAccountIdentification.ts +++ b/src/typings/transferWebhooks/bRLocalAccountIdentification.ts @@ -28,7 +28,7 @@ export class BRLocalAccountIdentification { /** * **brLocal** */ - 'type': BRLocalAccountIdentification.TypeEnum; + 'type': BRLocalAccountIdentification.TypeEnum = BRLocalAccountIdentification.TypeEnum.BrLocal; static discriminator: string | undefined = undefined; @@ -66,6 +66,6 @@ export class BRLocalAccountIdentification { export namespace BRLocalAccountIdentification { export enum TypeEnum { - BrLocal = 'brLocal' + BrLocal = 'brLocal' } } diff --git a/src/typings/transferWebhooks/bankAccountV3.ts b/src/typings/transferWebhooks/bankAccountV3.ts index 503ebb97e..565ce4b47 100644 --- a/src/typings/transferWebhooks/bankAccountV3.ts +++ b/src/typings/transferWebhooks/bankAccountV3.ts @@ -7,30 +7,12 @@ * Do not edit this class manually. */ -import { AULocalAccountIdentification } from './aULocalAccountIdentification'; -import { BRLocalAccountIdentification } from './bRLocalAccountIdentification'; -import { CALocalAccountIdentification } from './cALocalAccountIdentification'; -import { CZLocalAccountIdentification } from './cZLocalAccountIdentification'; -import { DKLocalAccountIdentification } from './dKLocalAccountIdentification'; -import { HKLocalAccountIdentification } from './hKLocalAccountIdentification'; -import { HULocalAccountIdentification } from './hULocalAccountIdentification'; -import { IbanAccountIdentification } from './ibanAccountIdentification'; -import { NOLocalAccountIdentification } from './nOLocalAccountIdentification'; -import { NZLocalAccountIdentification } from './nZLocalAccountIdentification'; -import { NumberAndBicAccountIdentification } from './numberAndBicAccountIdentification'; -import { PLLocalAccountIdentification } from './pLLocalAccountIdentification'; +import { BankAccountV3AccountIdentification } from './bankAccountV3AccountIdentification'; import { PartyIdentification } from './partyIdentification'; -import { SELocalAccountIdentification } from './sELocalAccountIdentification'; -import { SGLocalAccountIdentification } from './sGLocalAccountIdentification'; -import { UKLocalAccountIdentification } from './uKLocalAccountIdentification'; -import { USLocalAccountIdentification } from './uSLocalAccountIdentification'; export class BankAccountV3 { 'accountHolder': PartyIdentification; - /** - * Contains the bank account details. The fields required in this object depend on the country of the bank account and the currency of the transfer. - */ - 'accountIdentification': AULocalAccountIdentification | BRLocalAccountIdentification | CALocalAccountIdentification | CZLocalAccountIdentification | DKLocalAccountIdentification | HKLocalAccountIdentification | HULocalAccountIdentification | IbanAccountIdentification | NOLocalAccountIdentification | NZLocalAccountIdentification | NumberAndBicAccountIdentification | PLLocalAccountIdentification | SELocalAccountIdentification | SGLocalAccountIdentification | UKLocalAccountIdentification | USLocalAccountIdentification; + 'accountIdentification': BankAccountV3AccountIdentification; static discriminator: string | undefined = undefined; @@ -43,7 +25,7 @@ export class BankAccountV3 { { "name": "accountIdentification", "baseName": "accountIdentification", - "type": "AULocalAccountIdentification | BRLocalAccountIdentification | CALocalAccountIdentification | CZLocalAccountIdentification | DKLocalAccountIdentification | HKLocalAccountIdentification | HULocalAccountIdentification | IbanAccountIdentification | NOLocalAccountIdentification | NZLocalAccountIdentification | NumberAndBicAccountIdentification | PLLocalAccountIdentification | SELocalAccountIdentification | SGLocalAccountIdentification | UKLocalAccountIdentification | USLocalAccountIdentification" + "type": "BankAccountV3AccountIdentification" } ]; static getAttributeTypeMap() { diff --git a/src/typings/transferWebhooks/bankAccountV3AccountIdentification.ts b/src/typings/transferWebhooks/bankAccountV3AccountIdentification.ts new file mode 100644 index 000000000..78c552b33 --- /dev/null +++ b/src/typings/transferWebhooks/bankAccountV3AccountIdentification.ts @@ -0,0 +1,206 @@ +/* + * The version of the OpenAPI document: v4 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { AULocalAccountIdentification } from './aULocalAccountIdentification'; +import { AdditionalBankIdentification } from './additionalBankIdentification'; +import { BRLocalAccountIdentification } from './bRLocalAccountIdentification'; +import { CALocalAccountIdentification } from './cALocalAccountIdentification'; +import { CZLocalAccountIdentification } from './cZLocalAccountIdentification'; +import { DKLocalAccountIdentification } from './dKLocalAccountIdentification'; +import { HKLocalAccountIdentification } from './hKLocalAccountIdentification'; +import { HULocalAccountIdentification } from './hULocalAccountIdentification'; +import { IbanAccountIdentification } from './ibanAccountIdentification'; +import { NOLocalAccountIdentification } from './nOLocalAccountIdentification'; +import { NZLocalAccountIdentification } from './nZLocalAccountIdentification'; +import { NumberAndBicAccountIdentification } from './numberAndBicAccountIdentification'; +import { PLLocalAccountIdentification } from './pLLocalAccountIdentification'; +import { SELocalAccountIdentification } from './sELocalAccountIdentification'; +import { SGLocalAccountIdentification } from './sGLocalAccountIdentification'; +import { UKLocalAccountIdentification } from './uKLocalAccountIdentification'; +import { USLocalAccountIdentification } from './uSLocalAccountIdentification'; + +/** +* Contains the bank account details. The fields required in this object depend on the country of the bank account and the currency of the transfer. +*/ +export class BankAccountV3AccountIdentification { + /** + * The bank account number, without separators or whitespace. + */ + 'accountNumber': string; + /** + * The 6-digit [Bank State Branch (BSB) code](https://en.wikipedia.org/wiki/Bank_state_branch), without separators or whitespace. + */ + 'bsbCode': string; + /** + * **auLocal** + */ + 'type': BankAccountV3AccountIdentification.TypeEnum = BankAccountV3AccountIdentification.TypeEnum.AuLocal; + /** + * The 4-digit bank code (Registreringsnummer) (without separators or whitespace). + */ + 'bankCode': string; + /** + * The bank account branch number, without separators or whitespace. + */ + 'branchNumber': string; + /** + * The 8-digit ISPB, with leading zeros. + */ + 'ispb'?: string; + /** + * The bank account type. Possible values: **checking** or **savings**. Defaults to **checking**. + */ + 'accountType'?: BankAccountV3AccountIdentification.AccountTypeEnum = BankAccountV3AccountIdentification.AccountTypeEnum.Checking; + /** + * The 3-digit institution number, without separators or whitespace. + */ + 'institutionNumber': string; + /** + * The 5-digit transit number, without separators or whitespace. + */ + 'transitNumber': string; + /** + * The 3-digit clearing code, without separators or whitespace. + */ + 'clearingCode': string; + /** + * The international bank account number as defined in the [ISO-13616](https://www.iso.org/standard/81090.html) standard. + */ + 'iban': string; + 'additionalBankIdentification'?: AdditionalBankIdentification; + /** + * The bank\'s 8- or 11-character BIC or SWIFT code. + */ + 'bic': string; + /** + * The 4- to 5-digit clearing number ([Clearingnummer](https://sv.wikipedia.org/wiki/Clearingnummer)), without separators or whitespace. + */ + 'clearingNumber': string; + /** + * The 6-digit [sort code](https://en.wikipedia.org/wiki/Sort_code), without separators or whitespace. + */ + 'sortCode': string; + /** + * The 9-digit [routing number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without separators or whitespace. + */ + 'routingNumber': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "accountNumber", + "baseName": "accountNumber", + "type": "string" + }, + { + "name": "bsbCode", + "baseName": "bsbCode", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "BankAccountV3AccountIdentification.TypeEnum" + }, + { + "name": "bankCode", + "baseName": "bankCode", + "type": "string" + }, + { + "name": "branchNumber", + "baseName": "branchNumber", + "type": "string" + }, + { + "name": "ispb", + "baseName": "ispb", + "type": "string" + }, + { + "name": "accountType", + "baseName": "accountType", + "type": "BankAccountV3AccountIdentification.AccountTypeEnum" + }, + { + "name": "institutionNumber", + "baseName": "institutionNumber", + "type": "string" + }, + { + "name": "transitNumber", + "baseName": "transitNumber", + "type": "string" + }, + { + "name": "clearingCode", + "baseName": "clearingCode", + "type": "string" + }, + { + "name": "iban", + "baseName": "iban", + "type": "string" + }, + { + "name": "additionalBankIdentification", + "baseName": "additionalBankIdentification", + "type": "AdditionalBankIdentification" + }, + { + "name": "bic", + "baseName": "bic", + "type": "string" + }, + { + "name": "clearingNumber", + "baseName": "clearingNumber", + "type": "string" + }, + { + "name": "sortCode", + "baseName": "sortCode", + "type": "string" + }, + { + "name": "routingNumber", + "baseName": "routingNumber", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return BankAccountV3AccountIdentification.attributeTypeMap; + } +} + +export namespace BankAccountV3AccountIdentification { + export enum TypeEnum { + AuLocal = 'auLocal', + BrLocal = 'brLocal', + CaLocal = 'caLocal', + CzLocal = 'czLocal', + DkLocal = 'dkLocal', + HkLocal = 'hkLocal', + HuLocal = 'huLocal', + Iban = 'iban', + NoLocal = 'noLocal', + NzLocal = 'nzLocal', + NumberAndBic = 'numberAndBic', + PlLocal = 'plLocal', + SeLocal = 'seLocal', + SgLocal = 'sgLocal', + UkLocal = 'ukLocal', + UsLocal = 'usLocal' + } + export enum AccountTypeEnum { + Checking = 'checking', + Savings = 'savings' + } +} diff --git a/src/typings/transferWebhooks/bankCategoryData.ts b/src/typings/transferWebhooks/bankCategoryData.ts index 40c4f1403..b77da7fc7 100644 --- a/src/typings/transferWebhooks/bankCategoryData.ts +++ b/src/typings/transferWebhooks/bankCategoryData.ts @@ -16,7 +16,7 @@ export class BankCategoryData { /** * **bank** */ - 'type'?: BankCategoryData.TypeEnum; + 'type'?: BankCategoryData.TypeEnum = BankCategoryData.TypeEnum.Bank; static discriminator: string | undefined = undefined; @@ -39,14 +39,14 @@ export class BankCategoryData { export namespace BankCategoryData { export enum PriorityEnum { - CrossBorder = 'crossBorder', - Fast = 'fast', - Instant = 'instant', - Internal = 'internal', - Regular = 'regular', - Wire = 'wire' + CrossBorder = 'crossBorder', + Fast = 'fast', + Instant = 'instant', + Internal = 'internal', + Regular = 'regular', + Wire = 'wire' } export enum TypeEnum { - Bank = 'bank' + Bank = 'bank' } } diff --git a/src/typings/transferWebhooks/cALocalAccountIdentification.ts b/src/typings/transferWebhooks/cALocalAccountIdentification.ts index 1e0e9ef87..7393c12ad 100644 --- a/src/typings/transferWebhooks/cALocalAccountIdentification.ts +++ b/src/typings/transferWebhooks/cALocalAccountIdentification.ts @@ -16,7 +16,7 @@ export class CALocalAccountIdentification { /** * The bank account type. Possible values: **checking** or **savings**. Defaults to **checking**. */ - 'accountType'?: CALocalAccountIdentification.AccountTypeEnum; + 'accountType'?: CALocalAccountIdentification.AccountTypeEnum = CALocalAccountIdentification.AccountTypeEnum.Checking; /** * The 3-digit institution number, without separators or whitespace. */ @@ -28,7 +28,7 @@ export class CALocalAccountIdentification { /** * **caLocal** */ - 'type': CALocalAccountIdentification.TypeEnum; + 'type': CALocalAccountIdentification.TypeEnum = CALocalAccountIdentification.TypeEnum.CaLocal; static discriminator: string | undefined = undefined; @@ -66,10 +66,10 @@ export class CALocalAccountIdentification { export namespace CALocalAccountIdentification { export enum AccountTypeEnum { - Checking = 'checking', - Savings = 'savings' + Checking = 'checking', + Savings = 'savings' } export enum TypeEnum { - CaLocal = 'caLocal' + CaLocal = 'caLocal' } } diff --git a/src/typings/transferWebhooks/cZLocalAccountIdentification.ts b/src/typings/transferWebhooks/cZLocalAccountIdentification.ts index 3b94b7b4a..2b4f64881 100644 --- a/src/typings/transferWebhooks/cZLocalAccountIdentification.ts +++ b/src/typings/transferWebhooks/cZLocalAccountIdentification.ts @@ -20,7 +20,7 @@ export class CZLocalAccountIdentification { /** * **czLocal** */ - 'type': CZLocalAccountIdentification.TypeEnum; + 'type': CZLocalAccountIdentification.TypeEnum = CZLocalAccountIdentification.TypeEnum.CzLocal; static discriminator: string | undefined = undefined; @@ -48,6 +48,6 @@ export class CZLocalAccountIdentification { export namespace CZLocalAccountIdentification { export enum TypeEnum { - CzLocal = 'czLocal' + CzLocal = 'czLocal' } } diff --git a/src/typings/transferWebhooks/confirmationTrackingData.ts b/src/typings/transferWebhooks/confirmationTrackingData.ts index 68f5d340a..14bda9e99 100644 --- a/src/typings/transferWebhooks/confirmationTrackingData.ts +++ b/src/typings/transferWebhooks/confirmationTrackingData.ts @@ -16,7 +16,7 @@ export class ConfirmationTrackingData { /** * The type of the tracking event. Possible values: - **confirmation**: the transfer passed Adyen\'s internal review. */ - 'type': ConfirmationTrackingData.TypeEnum; + 'type': ConfirmationTrackingData.TypeEnum = ConfirmationTrackingData.TypeEnum.Confirmation; static discriminator: string | undefined = undefined; @@ -39,9 +39,9 @@ export class ConfirmationTrackingData { export namespace ConfirmationTrackingData { export enum StatusEnum { - Credited = 'credited' + Credited = 'credited' } export enum TypeEnum { - Confirmation = 'confirmation' + Confirmation = 'confirmation' } } diff --git a/src/typings/transferWebhooks/counterpartyV3.ts b/src/typings/transferWebhooks/counterpartyV3.ts index 992d86700..069cd3fb9 100644 --- a/src/typings/transferWebhooks/counterpartyV3.ts +++ b/src/typings/transferWebhooks/counterpartyV3.ts @@ -16,9 +16,9 @@ export class CounterpartyV3 { * The unique identifier of the counterparty [balance account](https://docs.adyen.com/api-explorer/balanceplatform/latest/post/balanceAccounts#responses-200-id). */ 'balanceAccountId'?: string; - 'bankAccount'?: BankAccountV3 | null; - 'card'?: Card | null; - 'merchant'?: MerchantData | null; + 'bankAccount'?: BankAccountV3; + 'card'?: Card; + 'merchant'?: MerchantData; /** * The unique identifier of the counterparty [transfer instrument](https://docs.adyen.com/api-explorer/legalentity/latest/post/transferInstruments#responses-200-id). */ @@ -35,17 +35,17 @@ export class CounterpartyV3 { { "name": "bankAccount", "baseName": "bankAccount", - "type": "BankAccountV3 | null" + "type": "BankAccountV3" }, { "name": "card", "baseName": "card", - "type": "Card | null" + "type": "Card" }, { "name": "merchant", "baseName": "merchant", - "type": "MerchantData | null" + "type": "MerchantData" }, { "name": "transferInstrumentId", diff --git a/src/typings/transferWebhooks/dKLocalAccountIdentification.ts b/src/typings/transferWebhooks/dKLocalAccountIdentification.ts index 6aec27ad5..6c3b73d64 100644 --- a/src/typings/transferWebhooks/dKLocalAccountIdentification.ts +++ b/src/typings/transferWebhooks/dKLocalAccountIdentification.ts @@ -20,7 +20,7 @@ export class DKLocalAccountIdentification { /** * **dkLocal** */ - 'type': DKLocalAccountIdentification.TypeEnum; + 'type': DKLocalAccountIdentification.TypeEnum = DKLocalAccountIdentification.TypeEnum.DkLocal; static discriminator: string | undefined = undefined; @@ -48,6 +48,6 @@ export class DKLocalAccountIdentification { export namespace DKLocalAccountIdentification { export enum TypeEnum { - DkLocal = 'dkLocal' + DkLocal = 'dkLocal' } } diff --git a/src/typings/transferWebhooks/estimationTrackingData.ts b/src/typings/transferWebhooks/estimationTrackingData.ts index 154feeaa0..dd3dcb769 100644 --- a/src/typings/transferWebhooks/estimationTrackingData.ts +++ b/src/typings/transferWebhooks/estimationTrackingData.ts @@ -16,7 +16,7 @@ export class EstimationTrackingData { /** * The type of tracking event. Possible values: - **estimation**: the estimated date and time of when the funds will be credited has been determined. */ - 'type': EstimationTrackingData.TypeEnum; + 'type': EstimationTrackingData.TypeEnum = EstimationTrackingData.TypeEnum.Estimation; static discriminator: string | undefined = undefined; @@ -39,6 +39,6 @@ export class EstimationTrackingData { export namespace EstimationTrackingData { export enum TypeEnum { - Estimation = 'estimation' + Estimation = 'estimation' } } diff --git a/src/typings/transferWebhooks/hKLocalAccountIdentification.ts b/src/typings/transferWebhooks/hKLocalAccountIdentification.ts index b3e237ed6..758fc7f35 100644 --- a/src/typings/transferWebhooks/hKLocalAccountIdentification.ts +++ b/src/typings/transferWebhooks/hKLocalAccountIdentification.ts @@ -20,7 +20,7 @@ export class HKLocalAccountIdentification { /** * **hkLocal** */ - 'type': HKLocalAccountIdentification.TypeEnum; + 'type': HKLocalAccountIdentification.TypeEnum = HKLocalAccountIdentification.TypeEnum.HkLocal; static discriminator: string | undefined = undefined; @@ -48,6 +48,6 @@ export class HKLocalAccountIdentification { export namespace HKLocalAccountIdentification { export enum TypeEnum { - HkLocal = 'hkLocal' + HkLocal = 'hkLocal' } } diff --git a/src/typings/transferWebhooks/hULocalAccountIdentification.ts b/src/typings/transferWebhooks/hULocalAccountIdentification.ts index 6cc1939be..74243a11d 100644 --- a/src/typings/transferWebhooks/hULocalAccountIdentification.ts +++ b/src/typings/transferWebhooks/hULocalAccountIdentification.ts @@ -16,7 +16,7 @@ export class HULocalAccountIdentification { /** * **huLocal** */ - 'type': HULocalAccountIdentification.TypeEnum; + 'type': HULocalAccountIdentification.TypeEnum = HULocalAccountIdentification.TypeEnum.HuLocal; static discriminator: string | undefined = undefined; @@ -39,6 +39,6 @@ export class HULocalAccountIdentification { export namespace HULocalAccountIdentification { export enum TypeEnum { - HuLocal = 'huLocal' + HuLocal = 'huLocal' } } diff --git a/src/typings/transferWebhooks/ibanAccountIdentification.ts b/src/typings/transferWebhooks/ibanAccountIdentification.ts index e73563c93..da1b37825 100644 --- a/src/typings/transferWebhooks/ibanAccountIdentification.ts +++ b/src/typings/transferWebhooks/ibanAccountIdentification.ts @@ -16,7 +16,7 @@ export class IbanAccountIdentification { /** * **iban** */ - 'type': IbanAccountIdentification.TypeEnum; + 'type': IbanAccountIdentification.TypeEnum = IbanAccountIdentification.TypeEnum.Iban; static discriminator: string | undefined = undefined; @@ -39,6 +39,6 @@ export class IbanAccountIdentification { export namespace IbanAccountIdentification { export enum TypeEnum { - Iban = 'iban' + Iban = 'iban' } } diff --git a/src/typings/transferWebhooks/internalCategoryData.ts b/src/typings/transferWebhooks/internalCategoryData.ts index 205518bb5..165c0720a 100644 --- a/src/typings/transferWebhooks/internalCategoryData.ts +++ b/src/typings/transferWebhooks/internalCategoryData.ts @@ -20,7 +20,7 @@ export class InternalCategoryData { /** * **internal** */ - 'type'?: InternalCategoryData.TypeEnum; + 'type'?: InternalCategoryData.TypeEnum = InternalCategoryData.TypeEnum.Internal; static discriminator: string | undefined = undefined; @@ -48,6 +48,6 @@ export class InternalCategoryData { export namespace InternalCategoryData { export enum TypeEnum { - Internal = 'internal' + Internal = 'internal' } } diff --git a/src/typings/transferWebhooks/internalReviewTrackingData.ts b/src/typings/transferWebhooks/internalReviewTrackingData.ts index a43cc44bb..1e6aaf9fb 100644 --- a/src/typings/transferWebhooks/internalReviewTrackingData.ts +++ b/src/typings/transferWebhooks/internalReviewTrackingData.ts @@ -20,7 +20,7 @@ export class InternalReviewTrackingData { /** * The type of tracking event. Possible values: - **internalReview**: the transfer was flagged because it does not comply with Adyen\'s risk policy. */ - 'type': InternalReviewTrackingData.TypeEnum; + 'type': InternalReviewTrackingData.TypeEnum = InternalReviewTrackingData.TypeEnum.InternalReview; static discriminator: string | undefined = undefined; @@ -48,13 +48,13 @@ export class InternalReviewTrackingData { export namespace InternalReviewTrackingData { export enum ReasonEnum { - RefusedForRegulatoryReasons = 'refusedForRegulatoryReasons' + RefusedForRegulatoryReasons = 'refusedForRegulatoryReasons' } export enum StatusEnum { - Pending = 'pending', - Failed = 'failed' + Pending = 'pending', + Failed = 'failed' } export enum TypeEnum { - InternalReview = 'internalReview' + InternalReview = 'internalReview' } } diff --git a/src/typings/transferWebhooks/issuedCard.ts b/src/typings/transferWebhooks/issuedCard.ts index 5abedca41..9916ae71d 100644 --- a/src/typings/transferWebhooks/issuedCard.ts +++ b/src/typings/transferWebhooks/issuedCard.ts @@ -23,7 +23,7 @@ export class IssuedCard { * Contains information about how the payment was processed. For example, **ecommerce** for online or **pos** for in-person payments. */ 'processingType'?: IssuedCard.ProcessingTypeEnum; - 'relayedAuthorisationData'?: RelayedAuthorisationData | null; + 'relayedAuthorisationData'?: RelayedAuthorisationData; /** * The identifier of the original payment. This ID is provided by the scheme and can be alphanumeric or numeric, depending on the scheme. The `schemeTraceID` should refer to an original `schemeUniqueTransactionID` provided in an earlier payment (not necessarily processed by Adyen). A `schemeTraceId` is typically available for authorization adjustments or recurring payments. */ @@ -35,7 +35,7 @@ export class IssuedCard { /** * **issuedCard** */ - 'type'?: IssuedCard.TypeEnum; + 'type'?: IssuedCard.TypeEnum = IssuedCard.TypeEnum.IssuedCard; /** * The evaluation of the validation facts. See [validation checks](https://docs.adyen.com/issuing/validation-checks) for more information. */ @@ -62,7 +62,7 @@ export class IssuedCard { { "name": "relayedAuthorisationData", "baseName": "relayedAuthorisationData", - "type": "RelayedAuthorisationData | null" + "type": "RelayedAuthorisationData" }, { "name": "schemeTraceId", @@ -92,25 +92,25 @@ export class IssuedCard { export namespace IssuedCard { export enum PanEntryModeEnum { - Chip = 'chip', - Cof = 'cof', - Contactless = 'contactless', - Ecommerce = 'ecommerce', - Magstripe = 'magstripe', - Manual = 'manual', - Token = 'token' + Chip = 'chip', + Cof = 'cof', + Contactless = 'contactless', + Ecommerce = 'ecommerce', + Magstripe = 'magstripe', + Manual = 'manual', + Token = 'token' } export enum ProcessingTypeEnum { - AtmWithdraw = 'atmWithdraw', - BalanceInquiry = 'balanceInquiry', - Ecommerce = 'ecommerce', - Moto = 'moto', - Pos = 'pos', - PurchaseWithCashback = 'purchaseWithCashback', - Recurring = 'recurring', - Token = 'token' + AtmWithdraw = 'atmWithdraw', + BalanceInquiry = 'balanceInquiry', + Ecommerce = 'ecommerce', + Moto = 'moto', + Pos = 'pos', + PurchaseWithCashback = 'purchaseWithCashback', + Recurring = 'recurring', + Token = 'token' } export enum TypeEnum { - IssuedCard = 'issuedCard' + IssuedCard = 'issuedCard' } } diff --git a/src/typings/transferWebhooks/lodging.ts b/src/typings/transferWebhooks/lodging.ts new file mode 100644 index 000000000..b9d0142bb --- /dev/null +++ b/src/typings/transferWebhooks/lodging.ts @@ -0,0 +1,39 @@ +/* + * The version of the OpenAPI document: v4 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + + +export class Lodging { + /** + * The check-in date. + */ + 'checkInDate'?: string; + /** + * The total number of nights the room is booked for. + */ + 'numberOfNights'?: number; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "checkInDate", + "baseName": "checkInDate", + "type": "string" + }, + { + "name": "numberOfNights", + "baseName": "numberOfNights", + "type": "number" + } ]; + + static getAttributeTypeMap() { + return Lodging.attributeTypeMap; + } +} + diff --git a/src/typings/transferWebhooks/merchantData.ts b/src/typings/transferWebhooks/merchantData.ts index 79339cee2..436784fc6 100644 --- a/src/typings/transferWebhooks/merchantData.ts +++ b/src/typings/transferWebhooks/merchantData.ts @@ -19,12 +19,12 @@ export class MerchantData { */ 'mcc'?: string; /** - * The merchant identifier. + * The unique identifier of the merchant. */ 'merchantId'?: string; - 'nameLocation'?: NameLocation | null; + 'nameLocation'?: NameLocation; /** - * The merchant postal code. + * The postal code of the merchant. */ 'postalCode'?: string; @@ -49,7 +49,7 @@ export class MerchantData { { "name": "nameLocation", "baseName": "nameLocation", - "type": "NameLocation | null" + "type": "NameLocation" }, { "name": "postalCode", diff --git a/src/typings/transferWebhooks/merchantPurchaseData.ts b/src/typings/transferWebhooks/merchantPurchaseData.ts index 7082ef34a..1cc77671f 100644 --- a/src/typings/transferWebhooks/merchantPurchaseData.ts +++ b/src/typings/transferWebhooks/merchantPurchaseData.ts @@ -8,13 +8,18 @@ */ import { Airline } from './airline'; +import { Lodging } from './lodging'; export class MerchantPurchaseData { - 'airline'?: Airline | null; + 'airline'?: Airline; + /** + * Lodging information. + */ + 'lodging'?: Array; /** * The type of events data. Possible values: - **merchantPurchaseData**: merchant purchase data */ - 'type': MerchantPurchaseData.TypeEnum; + 'type': MerchantPurchaseData.TypeEnum = MerchantPurchaseData.TypeEnum.MerchantPurchaseData; static discriminator: string | undefined = undefined; @@ -22,7 +27,12 @@ export class MerchantPurchaseData { { "name": "airline", "baseName": "airline", - "type": "Airline | null" + "type": "Airline" + }, + { + "name": "lodging", + "baseName": "lodging", + "type": "Array" }, { "name": "type", @@ -37,6 +47,6 @@ export class MerchantPurchaseData { export namespace MerchantPurchaseData { export enum TypeEnum { - MerchantPurchaseData = 'merchantPurchaseData' + MerchantPurchaseData = 'merchantPurchaseData' } } diff --git a/src/typings/transferWebhooks/models.ts b/src/typings/transferWebhooks/models.ts index 3527dbef3..6099e698f 100644 --- a/src/typings/transferWebhooks/models.ts +++ b/src/typings/transferWebhooks/models.ts @@ -1,12 +1,4 @@ -/* - * The version of the OpenAPI document: v4 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - +import localVarRequest from 'request'; export * from './aULocalAccountIdentification'; export * from './additionalBankIdentification'; @@ -18,6 +10,7 @@ export * from './bRLocalAccountIdentification'; export * from './balanceMutation'; export * from './balancePlatformNotificationResponse'; export * from './bankAccountV3'; +export * from './bankAccountV3AccountIdentification'; export * from './bankCategoryData'; export * from './cALocalAccountIdentification'; export * from './cZLocalAccountIdentification'; @@ -36,6 +29,7 @@ export * from './internalCategoryData'; export * from './internalReviewTrackingData'; export * from './issuedCard'; export * from './leg'; +export * from './lodging'; export * from './merchantData'; export * from './merchantPurchaseData'; export * from './modification'; @@ -57,7 +51,11 @@ export * from './transactionRuleReference'; export * from './transactionRuleSource'; export * from './transactionRulesResult'; export * from './transferData'; +export * from './transferDataCategoryData'; +export * from './transferDataTracking'; export * from './transferEvent'; +export * from './transferEventEventsDataInner'; +export * from './transferEventTrackingData'; export * from './transferNotificationCounterParty'; export * from './transferNotificationMerchantData'; export * from './transferNotificationRequest'; @@ -66,6 +64,18 @@ export * from './transferReview'; export * from './uKLocalAccountIdentification'; export * from './uSLocalAccountIdentification'; +import * as fs from 'fs'; + +export interface RequestDetailedFile { + value: Buffer; + options?: { + filename?: string; + contentType?: string; + } +} + +export type RequestFile = string | Buffer | fs.ReadStream | RequestDetailedFile; + import { AULocalAccountIdentification } from './aULocalAccountIdentification'; import { AdditionalBankIdentification } from './additionalBankIdentification'; @@ -77,6 +87,7 @@ import { BRLocalAccountIdentification } from './bRLocalAccountIdentification'; import { BalanceMutation } from './balanceMutation'; import { BalancePlatformNotificationResponse } from './balancePlatformNotificationResponse'; import { BankAccountV3 } from './bankAccountV3'; +import { BankAccountV3AccountIdentification } from './bankAccountV3AccountIdentification'; import { BankCategoryData } from './bankCategoryData'; import { CALocalAccountIdentification } from './cALocalAccountIdentification'; import { CZLocalAccountIdentification } from './cZLocalAccountIdentification'; @@ -95,6 +106,7 @@ import { InternalCategoryData } from './internalCategoryData'; import { InternalReviewTrackingData } from './internalReviewTrackingData'; import { IssuedCard } from './issuedCard'; import { Leg } from './leg'; +import { Lodging } from './lodging'; import { MerchantData } from './merchantData'; import { MerchantPurchaseData } from './merchantPurchaseData'; import { Modification } from './modification'; @@ -116,7 +128,11 @@ import { TransactionRuleReference } from './transactionRuleReference'; import { TransactionRuleSource } from './transactionRuleSource'; import { TransactionRulesResult } from './transactionRulesResult'; import { TransferData } from './transferData'; +import { TransferDataCategoryData } from './transferDataCategoryData'; +import { TransferDataTracking } from './transferDataTracking'; import { TransferEvent } from './transferEvent'; +import { TransferEventEventsDataInner } from './transferEventEventsDataInner'; +import { TransferEventTrackingData } from './transferEventTrackingData'; import { TransferNotificationCounterParty } from './transferNotificationCounterParty'; import { TransferNotificationMerchantData } from './transferNotificationMerchantData'; import { TransferNotificationRequest } from './transferNotificationRequest'; @@ -142,6 +158,8 @@ let enumsMap: {[index: string]: any} = { "AdditionalBankIdentification.TypeEnum": AdditionalBankIdentification.TypeEnum, "AmountAdjustment.AmountAdjustmentTypeEnum": AmountAdjustment.AmountAdjustmentTypeEnum, "BRLocalAccountIdentification.TypeEnum": BRLocalAccountIdentification.TypeEnum, + "BankAccountV3AccountIdentification.TypeEnum": BankAccountV3AccountIdentification.TypeEnum, + "BankAccountV3AccountIdentification.AccountTypeEnum": BankAccountV3AccountIdentification.AccountTypeEnum, "BankCategoryData.PriorityEnum": BankCategoryData.PriorityEnum, "BankCategoryData.TypeEnum": BankCategoryData.TypeEnum, "CALocalAccountIdentification.AccountTypeEnum": CALocalAccountIdentification.AccountTypeEnum, @@ -177,9 +195,21 @@ let enumsMap: {[index: string]: any} = { "TransferData.ReasonEnum": TransferData.ReasonEnum, "TransferData.StatusEnum": TransferData.StatusEnum, "TransferData.TypeEnum": TransferData.TypeEnum, + "TransferDataCategoryData.PriorityEnum": TransferDataCategoryData.PriorityEnum, + "TransferDataCategoryData.TypeEnum": TransferDataCategoryData.TypeEnum, + "TransferDataCategoryData.PanEntryModeEnum": TransferDataCategoryData.PanEntryModeEnum, + "TransferDataCategoryData.ProcessingTypeEnum": TransferDataCategoryData.ProcessingTypeEnum, + "TransferDataCategoryData.PlatformPaymentTypeEnum": TransferDataCategoryData.PlatformPaymentTypeEnum, + "TransferDataTracking.StatusEnum": TransferDataTracking.StatusEnum, + "TransferDataTracking.TypeEnum": TransferDataTracking.TypeEnum, + "TransferDataTracking.ReasonEnum": TransferDataTracking.ReasonEnum, "TransferEvent.ReasonEnum": TransferEvent.ReasonEnum, "TransferEvent.StatusEnum": TransferEvent.StatusEnum, "TransferEvent.TypeEnum": TransferEvent.TypeEnum, + "TransferEventEventsDataInner.TypeEnum": TransferEventEventsDataInner.TypeEnum, + "TransferEventTrackingData.StatusEnum": TransferEventTrackingData.StatusEnum, + "TransferEventTrackingData.TypeEnum": TransferEventTrackingData.TypeEnum, + "TransferEventTrackingData.ReasonEnum": TransferEventTrackingData.ReasonEnum, "TransferNotificationRequest.TypeEnum": TransferNotificationRequest.TypeEnum, "UKLocalAccountIdentification.TypeEnum": UKLocalAccountIdentification.TypeEnum, "USLocalAccountIdentification.AccountTypeEnum": USLocalAccountIdentification.AccountTypeEnum, @@ -197,6 +227,7 @@ let typeMap: {[index: string]: any} = { "BalanceMutation": BalanceMutation, "BalancePlatformNotificationResponse": BalancePlatformNotificationResponse, "BankAccountV3": BankAccountV3, + "BankAccountV3AccountIdentification": BankAccountV3AccountIdentification, "BankCategoryData": BankCategoryData, "CALocalAccountIdentification": CALocalAccountIdentification, "CZLocalAccountIdentification": CZLocalAccountIdentification, @@ -215,6 +246,7 @@ let typeMap: {[index: string]: any} = { "InternalReviewTrackingData": InternalReviewTrackingData, "IssuedCard": IssuedCard, "Leg": Leg, + "Lodging": Lodging, "MerchantData": MerchantData, "MerchantPurchaseData": MerchantPurchaseData, "Modification": Modification, @@ -236,7 +268,11 @@ let typeMap: {[index: string]: any} = { "TransactionRuleSource": TransactionRuleSource, "TransactionRulesResult": TransactionRulesResult, "TransferData": TransferData, + "TransferDataCategoryData": TransferDataCategoryData, + "TransferDataTracking": TransferDataTracking, "TransferEvent": TransferEvent, + "TransferEventEventsDataInner": TransferEventEventsDataInner, + "TransferEventTrackingData": TransferEventTrackingData, "TransferNotificationCounterParty": TransferNotificationCounterParty, "TransferNotificationMerchantData": TransferNotificationMerchantData, "TransferNotificationRequest": TransferNotificationRequest, @@ -246,6 +282,23 @@ let typeMap: {[index: string]: any} = { "USLocalAccountIdentification": USLocalAccountIdentification, } +// Check if a string starts with another string without using es6 features +function startsWith(str: string, match: string): boolean { + return str.substring(0, match.length) === match; +} + +// Check if a string ends with another string without using es6 features +function endsWith(str: string, match: string): boolean { + return str.length >= match.length && str.substring(str.length - match.length) === match; +} + +const nullableSuffix = " | null"; +const optionalSuffix = " | undefined"; +const arrayPrefix = "Array<"; +const arraySuffix = ">"; +const mapPrefix = "{ [key: string]: "; +const mapSuffix = "; }"; + export class ObjectSerializer { public static findCorrectType(data: any, expectedType: string) { if (data == undefined) { @@ -282,25 +335,37 @@ export class ObjectSerializer { } } - public static serialize(data: any, type: string) { + public static serialize(data: any, type: string): any { if (data == undefined) { return data; } else if (primitives.indexOf(type.toLowerCase()) !== -1) { return data; - } else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6 - let subType: string = type.replace("Array<", ""); // Array => Type> - subType = subType.substring(0, subType.length - 1); // Type> => Type + } else if (endsWith(type, nullableSuffix)) { + let subType: string = type.slice(0, -nullableSuffix.length); // Type | null => Type + return ObjectSerializer.serialize(data, subType); + } else if (endsWith(type, optionalSuffix)) { + let subType: string = type.slice(0, -optionalSuffix.length); // Type | undefined => Type + return ObjectSerializer.serialize(data, subType); + } else if (startsWith(type, arrayPrefix)) { + let subType: string = type.slice(arrayPrefix.length, -arraySuffix.length); // Array => Type let transformedData: any[] = []; for (let index = 0; index < data.length; index++) { let datum = data[index]; transformedData.push(ObjectSerializer.serialize(datum, subType)); } return transformedData; + } else if (startsWith(type, mapPrefix)) { + let subType: string = type.slice(mapPrefix.length, -mapSuffix.length); // { [key: string]: Type; } => Type + let transformedData: { [key: string]: any } = {}; + for (let key in data) { + transformedData[key] = ObjectSerializer.serialize( + data[key], + subType, + ); + } + return transformedData; } else if (type === "Date") { return data.toISOString(); - } else if (type === "SaleToAcquirerData") { - const dataString = JSON.stringify(data); - return Buffer.from(dataString).toString("base64"); } else { if (enumsMap[type]) { return data; @@ -323,22 +388,37 @@ export class ObjectSerializer { } } - public static deserialize(data: any, type: string) { + public static deserialize(data: any, type: string): any { // polymorphism may change the actual type. type = ObjectSerializer.findCorrectType(data, type); if (data == undefined) { return data; } else if (primitives.indexOf(type.toLowerCase()) !== -1) { return data; - } else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6 - let subType: string = type.replace("Array<", ""); // Array => Type> - subType = subType.substring(0, subType.length - 1); // Type> => Type + } else if (endsWith(type, nullableSuffix)) { + let subType: string = type.slice(0, -nullableSuffix.length); // Type | null => Type + return ObjectSerializer.deserialize(data, subType); + } else if (endsWith(type, optionalSuffix)) { + let subType: string = type.slice(0, -optionalSuffix.length); // Type | undefined => Type + return ObjectSerializer.deserialize(data, subType); + } else if (startsWith(type, arrayPrefix)) { + let subType: string = type.slice(arrayPrefix.length, -arraySuffix.length); // Array => Type let transformedData: any[] = []; for (let index = 0; index < data.length; index++) { let datum = data[index]; transformedData.push(ObjectSerializer.deserialize(datum, subType)); } return transformedData; + } else if (startsWith(type, mapPrefix)) { + let subType: string = type.slice(mapPrefix.length, -mapSuffix.length); // { [key: string]: Type; } => Type + let transformedData: { [key: string]: any } = {}; + for (let key in data) { + transformedData[key] = ObjectSerializer.deserialize( + data[key], + subType, + ); + } + return transformedData; } else if (type === "Date") { return new Date(data); } else { @@ -359,3 +439,77 @@ export class ObjectSerializer { } } } + +export interface Authentication { + /** + * Apply authentication settings to header and query params. + */ + applyToRequest(requestOptions: localVarRequest.Options): Promise | void; +} + +export class HttpBasicAuth implements Authentication { + public username: string = ''; + public password: string = ''; + + applyToRequest(requestOptions: localVarRequest.Options): void { + requestOptions.auth = { + username: this.username, password: this.password + } + } +} + +export class HttpBearerAuth implements Authentication { + public accessToken: string | (() => string) = ''; + + applyToRequest(requestOptions: localVarRequest.Options): void { + if (requestOptions && requestOptions.headers) { + const accessToken = typeof this.accessToken === 'function' + ? this.accessToken() + : this.accessToken; + requestOptions.headers["Authorization"] = "Bearer " + accessToken; + } + } +} + +export class ApiKeyAuth implements Authentication { + public apiKey: string = ''; + + constructor(private location: string, private paramName: string) { + } + + applyToRequest(requestOptions: localVarRequest.Options): void { + if (this.location == "query") { + (requestOptions.qs)[this.paramName] = this.apiKey; + } else if (this.location == "header" && requestOptions && requestOptions.headers) { + requestOptions.headers[this.paramName] = this.apiKey; + } else if (this.location == 'cookie' && requestOptions && requestOptions.headers) { + if (requestOptions.headers['Cookie']) { + requestOptions.headers['Cookie'] += '; ' + this.paramName + '=' + encodeURIComponent(this.apiKey); + } + else { + requestOptions.headers['Cookie'] = this.paramName + '=' + encodeURIComponent(this.apiKey); + } + } + } +} + +export class OAuth implements Authentication { + public accessToken: string = ''; + + applyToRequest(requestOptions: localVarRequest.Options): void { + if (requestOptions && requestOptions.headers) { + requestOptions.headers["Authorization"] = "Bearer " + this.accessToken; + } + } +} + +export class VoidAuth implements Authentication { + public username: string = ''; + public password: string = ''; + + applyToRequest(_: localVarRequest.Options): void { + // Do nothing + } +} + +export type Interceptor = (requestOptions: localVarRequest.Options) => (Promise | void); diff --git a/src/typings/transferWebhooks/modification.ts b/src/typings/transferWebhooks/modification.ts index 8dd6de71f..63b5b75ad 100644 --- a/src/typings/transferWebhooks/modification.ts +++ b/src/typings/transferWebhooks/modification.ts @@ -66,72 +66,72 @@ export class Modification { export namespace Modification { export enum StatusEnum { - ApprovalPending = 'approvalPending', - AtmWithdrawal = 'atmWithdrawal', - AtmWithdrawalReversalPending = 'atmWithdrawalReversalPending', - AtmWithdrawalReversed = 'atmWithdrawalReversed', - AuthAdjustmentAuthorised = 'authAdjustmentAuthorised', - AuthAdjustmentError = 'authAdjustmentError', - AuthAdjustmentRefused = 'authAdjustmentRefused', - Authorised = 'authorised', - BankTransfer = 'bankTransfer', - BankTransferPending = 'bankTransferPending', - Booked = 'booked', - BookingPending = 'bookingPending', - Cancelled = 'cancelled', - CapturePending = 'capturePending', - CaptureReversalPending = 'captureReversalPending', - CaptureReversed = 'captureReversed', - Captured = 'captured', - CapturedExternally = 'capturedExternally', - Chargeback = 'chargeback', - ChargebackExternally = 'chargebackExternally', - ChargebackPending = 'chargebackPending', - ChargebackReversalPending = 'chargebackReversalPending', - ChargebackReversed = 'chargebackReversed', - Credited = 'credited', - DepositCorrection = 'depositCorrection', - DepositCorrectionPending = 'depositCorrectionPending', - Dispute = 'dispute', - DisputeClosed = 'disputeClosed', - DisputeExpired = 'disputeExpired', - DisputeNeedsReview = 'disputeNeedsReview', - Error = 'error', - Expired = 'expired', - Failed = 'failed', - Fee = 'fee', - FeePending = 'feePending', - InternalTransfer = 'internalTransfer', - InternalTransferPending = 'internalTransferPending', - InvoiceDeduction = 'invoiceDeduction', - InvoiceDeductionPending = 'invoiceDeductionPending', - ManualCorrectionPending = 'manualCorrectionPending', - ManuallyCorrected = 'manuallyCorrected', - MatchedStatement = 'matchedStatement', - MatchedStatementPending = 'matchedStatementPending', - MerchantPayin = 'merchantPayin', - MerchantPayinPending = 'merchantPayinPending', - MerchantPayinReversed = 'merchantPayinReversed', - MerchantPayinReversedPending = 'merchantPayinReversedPending', - MiscCost = 'miscCost', - MiscCostPending = 'miscCostPending', - PaymentCost = 'paymentCost', - PaymentCostPending = 'paymentCostPending', - PendingApproval = 'pendingApproval', - PendingExecution = 'pendingExecution', - Received = 'received', - RefundPending = 'refundPending', - RefundReversalPending = 'refundReversalPending', - RefundReversed = 'refundReversed', - Refunded = 'refunded', - RefundedExternally = 'refundedExternally', - Refused = 'refused', - Rejected = 'rejected', - ReserveAdjustment = 'reserveAdjustment', - ReserveAdjustmentPending = 'reserveAdjustmentPending', - Returned = 'returned', - SecondChargeback = 'secondChargeback', - SecondChargebackPending = 'secondChargebackPending', - Undefined = 'undefined' + ApprovalPending = 'approvalPending', + AtmWithdrawal = 'atmWithdrawal', + AtmWithdrawalReversalPending = 'atmWithdrawalReversalPending', + AtmWithdrawalReversed = 'atmWithdrawalReversed', + AuthAdjustmentAuthorised = 'authAdjustmentAuthorised', + AuthAdjustmentError = 'authAdjustmentError', + AuthAdjustmentRefused = 'authAdjustmentRefused', + Authorised = 'authorised', + BankTransfer = 'bankTransfer', + BankTransferPending = 'bankTransferPending', + Booked = 'booked', + BookingPending = 'bookingPending', + Cancelled = 'cancelled', + CapturePending = 'capturePending', + CaptureReversalPending = 'captureReversalPending', + CaptureReversed = 'captureReversed', + Captured = 'captured', + CapturedExternally = 'capturedExternally', + Chargeback = 'chargeback', + ChargebackExternally = 'chargebackExternally', + ChargebackPending = 'chargebackPending', + ChargebackReversalPending = 'chargebackReversalPending', + ChargebackReversed = 'chargebackReversed', + Credited = 'credited', + DepositCorrection = 'depositCorrection', + DepositCorrectionPending = 'depositCorrectionPending', + Dispute = 'dispute', + DisputeClosed = 'disputeClosed', + DisputeExpired = 'disputeExpired', + DisputeNeedsReview = 'disputeNeedsReview', + Error = 'error', + Expired = 'expired', + Failed = 'failed', + Fee = 'fee', + FeePending = 'feePending', + InternalTransfer = 'internalTransfer', + InternalTransferPending = 'internalTransferPending', + InvoiceDeduction = 'invoiceDeduction', + InvoiceDeductionPending = 'invoiceDeductionPending', + ManualCorrectionPending = 'manualCorrectionPending', + ManuallyCorrected = 'manuallyCorrected', + MatchedStatement = 'matchedStatement', + MatchedStatementPending = 'matchedStatementPending', + MerchantPayin = 'merchantPayin', + MerchantPayinPending = 'merchantPayinPending', + MerchantPayinReversed = 'merchantPayinReversed', + MerchantPayinReversedPending = 'merchantPayinReversedPending', + MiscCost = 'miscCost', + MiscCostPending = 'miscCostPending', + PaymentCost = 'paymentCost', + PaymentCostPending = 'paymentCostPending', + PendingApproval = 'pendingApproval', + PendingExecution = 'pendingExecution', + Received = 'received', + RefundPending = 'refundPending', + RefundReversalPending = 'refundReversalPending', + RefundReversed = 'refundReversed', + Refunded = 'refunded', + RefundedExternally = 'refundedExternally', + Refused = 'refused', + Rejected = 'rejected', + ReserveAdjustment = 'reserveAdjustment', + ReserveAdjustmentPending = 'reserveAdjustmentPending', + Returned = 'returned', + SecondChargeback = 'secondChargeback', + SecondChargebackPending = 'secondChargebackPending', + Undefined = 'undefined' } } diff --git a/src/typings/transferWebhooks/nOLocalAccountIdentification.ts b/src/typings/transferWebhooks/nOLocalAccountIdentification.ts index bf78b8301..fe29c71e5 100644 --- a/src/typings/transferWebhooks/nOLocalAccountIdentification.ts +++ b/src/typings/transferWebhooks/nOLocalAccountIdentification.ts @@ -16,7 +16,7 @@ export class NOLocalAccountIdentification { /** * **noLocal** */ - 'type': NOLocalAccountIdentification.TypeEnum; + 'type': NOLocalAccountIdentification.TypeEnum = NOLocalAccountIdentification.TypeEnum.NoLocal; static discriminator: string | undefined = undefined; @@ -39,6 +39,6 @@ export class NOLocalAccountIdentification { export namespace NOLocalAccountIdentification { export enum TypeEnum { - NoLocal = 'noLocal' + NoLocal = 'noLocal' } } diff --git a/src/typings/transferWebhooks/nZLocalAccountIdentification.ts b/src/typings/transferWebhooks/nZLocalAccountIdentification.ts index e883d2d38..1da805ae2 100644 --- a/src/typings/transferWebhooks/nZLocalAccountIdentification.ts +++ b/src/typings/transferWebhooks/nZLocalAccountIdentification.ts @@ -16,7 +16,7 @@ export class NZLocalAccountIdentification { /** * **nzLocal** */ - 'type': NZLocalAccountIdentification.TypeEnum; + 'type': NZLocalAccountIdentification.TypeEnum = NZLocalAccountIdentification.TypeEnum.NzLocal; static discriminator: string | undefined = undefined; @@ -39,6 +39,6 @@ export class NZLocalAccountIdentification { export namespace NZLocalAccountIdentification { export enum TypeEnum { - NzLocal = 'nzLocal' + NzLocal = 'nzLocal' } } diff --git a/src/typings/transferWebhooks/numberAndBicAccountIdentification.ts b/src/typings/transferWebhooks/numberAndBicAccountIdentification.ts index c64f5e5e7..07a245980 100644 --- a/src/typings/transferWebhooks/numberAndBicAccountIdentification.ts +++ b/src/typings/transferWebhooks/numberAndBicAccountIdentification.ts @@ -14,7 +14,7 @@ export class NumberAndBicAccountIdentification { * The bank account number, without separators or whitespace. The length and format depends on the bank or country. */ 'accountNumber': string; - 'additionalBankIdentification'?: AdditionalBankIdentification | null; + 'additionalBankIdentification'?: AdditionalBankIdentification; /** * The bank\'s 8- or 11-character BIC or SWIFT code. */ @@ -22,7 +22,7 @@ export class NumberAndBicAccountIdentification { /** * **numberAndBic** */ - 'type': NumberAndBicAccountIdentification.TypeEnum; + 'type': NumberAndBicAccountIdentification.TypeEnum = NumberAndBicAccountIdentification.TypeEnum.NumberAndBic; static discriminator: string | undefined = undefined; @@ -35,7 +35,7 @@ export class NumberAndBicAccountIdentification { { "name": "additionalBankIdentification", "baseName": "additionalBankIdentification", - "type": "AdditionalBankIdentification | null" + "type": "AdditionalBankIdentification" }, { "name": "bic", @@ -55,6 +55,6 @@ export class NumberAndBicAccountIdentification { export namespace NumberAndBicAccountIdentification { export enum TypeEnum { - NumberAndBic = 'numberAndBic' + NumberAndBic = 'numberAndBic' } } diff --git a/src/typings/transferWebhooks/pLLocalAccountIdentification.ts b/src/typings/transferWebhooks/pLLocalAccountIdentification.ts index f7abd24b7..a8454005b 100644 --- a/src/typings/transferWebhooks/pLLocalAccountIdentification.ts +++ b/src/typings/transferWebhooks/pLLocalAccountIdentification.ts @@ -16,7 +16,7 @@ export class PLLocalAccountIdentification { /** * **plLocal** */ - 'type': PLLocalAccountIdentification.TypeEnum; + 'type': PLLocalAccountIdentification.TypeEnum = PLLocalAccountIdentification.TypeEnum.PlLocal; static discriminator: string | undefined = undefined; @@ -39,6 +39,6 @@ export class PLLocalAccountIdentification { export namespace PLLocalAccountIdentification { export enum TypeEnum { - PlLocal = 'plLocal' + PlLocal = 'plLocal' } } diff --git a/src/typings/transferWebhooks/partyIdentification.ts b/src/typings/transferWebhooks/partyIdentification.ts index 4dabeeece..2ab13171c 100644 --- a/src/typings/transferWebhooks/partyIdentification.ts +++ b/src/typings/transferWebhooks/partyIdentification.ts @@ -10,7 +10,7 @@ import { Address } from './address'; export class PartyIdentification { - 'address'?: Address | null; + 'address'?: Address; /** * The date of birth of the individual in [ISO-8601](https://www.w3.org/TR/NOTE-datetime) format. For example, **YYYY-MM-DD**. Allowed only when `type` is **individual**. */ @@ -34,7 +34,7 @@ export class PartyIdentification { /** * The type of entity that owns the bank account or card. Possible values: **individual**, **organization**, or **unknown**. Required when `category` is **card**. In this case, the value must be **individual**. */ - 'type'?: PartyIdentification.TypeEnum; + 'type'?: PartyIdentification.TypeEnum = PartyIdentification.TypeEnum.Unknown; static discriminator: string | undefined = undefined; @@ -42,7 +42,7 @@ export class PartyIdentification { { "name": "address", "baseName": "address", - "type": "Address | null" + "type": "Address" }, { "name": "dateOfBirth", @@ -82,8 +82,8 @@ export class PartyIdentification { export namespace PartyIdentification { export enum TypeEnum { - Individual = 'individual', - Organization = 'organization', - Unknown = 'unknown' + Individual = 'individual', + Organization = 'organization', + Unknown = 'unknown' } } diff --git a/src/typings/transferWebhooks/platformPayment.ts b/src/typings/transferWebhooks/platformPayment.ts index 0dd1a875f..37ae11ef8 100644 --- a/src/typings/transferWebhooks/platformPayment.ts +++ b/src/typings/transferWebhooks/platformPayment.ts @@ -22,7 +22,7 @@ export class PlatformPayment { */ 'paymentMerchantReference'?: string; /** - * Specifies the nature of the transfer. This parameter helps categorize transfers so you can reconcile transactions at a later time, using the Balance Platform Accounting Report for [marketplaces](https://docs.adyen.com/marketplaces/reports-and-fees/balance-platform-accounting-report/) or [platforms](https://docs.adyen.com/platforms/reports-and-fees/balance-platform-accounting-report/). Possible values: * **AcquiringFees**: for the acquiring fee incurred on a transaction. * **AdyenCommission**: for the transaction fee due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/guides/payments-training-guide/get-the-best-from-your-card-processing). * **AdyenFees**: for all the transaction fees due to Adyen. This is the sum of Adyen\'s commission and Adyen\'s markup. * **AdyenMarkup**: for the transaction fee due to Adyen under [Interchange++ pricing](https://www.adyen.com/pricing). * **BalanceAccount**: or the sale amount of a transaction. * **Commission**: for your platform\'s commission on a transaction. * **Interchange**: for the interchange fee (fee paid to the issuer) incurred on a transaction. * **PaymentFee**: for all of the transaction fees. * **Remainder**: for the left over amount after currency conversion. * **SchemeFee**: for the scheme fee incurred on a transaction. This is the sum of the interchange fees and the acquiring fees. * **Surcharge**: for the surcharge paid by the customer on a transaction. * **Tip**: for the tip paid by the customer. * **TopUp**: for an incoming transfer to top up your user\'s balance account. * **VAT**: for the Value Added Tax. + * Specifies the nature of the transfer. This parameter helps categorize transfers so you can reconcile transactions at a later time, using the Balance Platform Accounting Report for [marketplaces](https://docs.adyen.com/marketplaces/reports-and-fees/balance-platform-accounting-report/) or [platforms](https://docs.adyen.com/platforms/reports-and-fees/balance-platform-accounting-report/). Possible values: * **AcquiringFees**: for the acquiring fee incurred on a transaction. * **AdyenCommission**: for the transaction fee due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/guides/payments-training-guide/get-the-best-from-your-card-processing). * **AdyenFees**: for all the transaction fees due to Adyen. This is the sum of Adyen\'s commission and Adyen\'s markup. * **AdyenMarkup**: for the transaction fee due to Adyen under [Interchange++ pricing](https://www.adyen.com/pricing). * **BalanceAccount**: or the sale amount of a transaction. * **Commission**: for your platform\'s commission on a transaction. * **DCCPlatformCommission**: for the DCC Commission for the platform on a transaction. * **Interchange**: for the interchange fee (fee paid to the issuer) incurred on a transaction. * **PaymentFee**: for all of the transaction fees. * **Remainder**: for the left over amount after currency conversion. * **SchemeFee**: for the scheme fee incurred on a transaction. This is the sum of the interchange fees and the acquiring fees. * **Surcharge**: for the surcharge paid by the customer on a transaction. * **Tip**: for the tip paid by the customer. * **TopUp**: for an incoming transfer to top up your user\'s balance account. * **VAT**: for the Value Added Tax. */ 'platformPaymentType'?: PlatformPayment.PlatformPaymentTypeEnum; /** @@ -32,7 +32,7 @@ export class PlatformPayment { /** * **platformPayment** */ - 'type'?: PlatformPayment.TypeEnum; + 'type'?: PlatformPayment.TypeEnum = PlatformPayment.TypeEnum.PlatformPayment; static discriminator: string | undefined = undefined; @@ -75,23 +75,24 @@ export class PlatformPayment { export namespace PlatformPayment { export enum PlatformPaymentTypeEnum { - AcquiringFees = 'AcquiringFees', - AdyenCommission = 'AdyenCommission', - AdyenFees = 'AdyenFees', - AdyenMarkup = 'AdyenMarkup', - BalanceAccount = 'BalanceAccount', - Commission = 'Commission', - Default = 'Default', - Interchange = 'Interchange', - PaymentFee = 'PaymentFee', - Remainder = 'Remainder', - SchemeFee = 'SchemeFee', - Surcharge = 'Surcharge', - Tip = 'Tip', - TopUp = 'TopUp', - Vat = 'VAT' + AcquiringFees = 'AcquiringFees', + AdyenCommission = 'AdyenCommission', + AdyenFees = 'AdyenFees', + AdyenMarkup = 'AdyenMarkup', + BalanceAccount = 'BalanceAccount', + Commission = 'Commission', + DccPlatformCommission = 'DCCPlatformCommission', + Default = 'Default', + Interchange = 'Interchange', + PaymentFee = 'PaymentFee', + Remainder = 'Remainder', + SchemeFee = 'SchemeFee', + Surcharge = 'Surcharge', + Tip = 'Tip', + TopUp = 'TopUp', + Vat = 'VAT' } export enum TypeEnum { - PlatformPayment = 'platformPayment' + PlatformPayment = 'platformPayment' } } diff --git a/src/typings/transferWebhooks/sELocalAccountIdentification.ts b/src/typings/transferWebhooks/sELocalAccountIdentification.ts index 2af713ce3..67ccf81ae 100644 --- a/src/typings/transferWebhooks/sELocalAccountIdentification.ts +++ b/src/typings/transferWebhooks/sELocalAccountIdentification.ts @@ -20,7 +20,7 @@ export class SELocalAccountIdentification { /** * **seLocal** */ - 'type': SELocalAccountIdentification.TypeEnum; + 'type': SELocalAccountIdentification.TypeEnum = SELocalAccountIdentification.TypeEnum.SeLocal; static discriminator: string | undefined = undefined; @@ -48,6 +48,6 @@ export class SELocalAccountIdentification { export namespace SELocalAccountIdentification { export enum TypeEnum { - SeLocal = 'seLocal' + SeLocal = 'seLocal' } } diff --git a/src/typings/transferWebhooks/sGLocalAccountIdentification.ts b/src/typings/transferWebhooks/sGLocalAccountIdentification.ts index c18f742ea..b7a2fa2a5 100644 --- a/src/typings/transferWebhooks/sGLocalAccountIdentification.ts +++ b/src/typings/transferWebhooks/sGLocalAccountIdentification.ts @@ -20,7 +20,7 @@ export class SGLocalAccountIdentification { /** * **sgLocal** */ - 'type'?: SGLocalAccountIdentification.TypeEnum; + 'type'?: SGLocalAccountIdentification.TypeEnum = SGLocalAccountIdentification.TypeEnum.SgLocal; static discriminator: string | undefined = undefined; @@ -48,6 +48,6 @@ export class SGLocalAccountIdentification { export namespace SGLocalAccountIdentification { export enum TypeEnum { - SgLocal = 'sgLocal' + SgLocal = 'sgLocal' } } diff --git a/src/typings/transferWebhooks/transactionEventViolation.ts b/src/typings/transferWebhooks/transactionEventViolation.ts index 4d65525bb..318ffc6ce 100644 --- a/src/typings/transferWebhooks/transactionEventViolation.ts +++ b/src/typings/transferWebhooks/transactionEventViolation.ts @@ -15,8 +15,8 @@ export class TransactionEventViolation { * An explanation about why the transaction rule failed. */ 'reason'?: string; - 'transactionRule'?: TransactionRuleReference | null; - 'transactionRuleSource'?: TransactionRuleSource | null; + 'transactionRule'?: TransactionRuleReference; + 'transactionRuleSource'?: TransactionRuleSource; static discriminator: string | undefined = undefined; @@ -29,12 +29,12 @@ export class TransactionEventViolation { { "name": "transactionRule", "baseName": "transactionRule", - "type": "TransactionRuleReference | null" + "type": "TransactionRuleReference" }, { "name": "transactionRuleSource", "baseName": "transactionRuleSource", - "type": "TransactionRuleSource | null" + "type": "TransactionRuleSource" } ]; static getAttributeTypeMap() { diff --git a/src/typings/transferWebhooks/transferData.ts b/src/typings/transferWebhooks/transferData.ts index 733570f5a..01a416166 100644 --- a/src/typings/transferWebhooks/transferData.ts +++ b/src/typings/transferWebhooks/transferData.ts @@ -9,25 +9,20 @@ import { Amount } from './amount'; import { BalanceMutation } from './balanceMutation'; -import { BankCategoryData } from './bankCategoryData'; -import { ConfirmationTrackingData } from './confirmationTrackingData'; import { DirectDebitInformation } from './directDebitInformation'; -import { EstimationTrackingData } from './estimationTrackingData'; -import { InternalCategoryData } from './internalCategoryData'; -import { InternalReviewTrackingData } from './internalReviewTrackingData'; -import { IssuedCard } from './issuedCard'; import { PaymentInstrument } from './paymentInstrument'; -import { PlatformPayment } from './platformPayment'; import { ResourceReference } from './resourceReference'; import { TransactionRulesResult } from './transactionRulesResult'; +import { TransferDataCategoryData } from './transferDataCategoryData'; +import { TransferDataTracking } from './transferDataTracking'; import { TransferEvent } from './transferEvent'; import { TransferNotificationCounterParty } from './transferNotificationCounterParty'; import { TransferReview } from './transferReview'; export class TransferData { - 'accountHolder'?: ResourceReference | null; + 'accountHolder'?: ResourceReference; 'amount': Amount; - 'balanceAccount'?: ResourceReference | null; + 'balanceAccount'?: ResourceReference; /** * The unique identifier of the balance platform. */ @@ -40,11 +35,8 @@ export class TransferData { * The category of the transfer. Possible values: - **bank**: a transfer involving a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. - **card**: a transfer involving a third-party card. - **internal**: a transfer between [balance accounts](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. - **issuedCard**: a transfer initiated by a Adyen-issued card. - **platformPayment**: funds movements related to payments that are acquired for your users. - **topUp**: an incoming transfer initiated by your user to top up their balance account. */ 'category': TransferData.CategoryEnum; - /** - * The relevant data according to the transfer category. - */ - 'categoryData'?: BankCategoryData | InternalCategoryData | IssuedCard | PlatformPayment | null; - 'counterparty'?: TransferNotificationCounterParty | null; + 'categoryData'?: TransferDataCategoryData; + 'counterparty'?: TransferNotificationCounterParty; /** * The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**. */ @@ -53,7 +45,7 @@ export class TransferData { * Your description for the transfer. It is used by most banks as the transfer description. We recommend sending a maximum of 140 characters, otherwise the description may be truncated. Supported characters: **[a-z] [A-Z] [0-9] / - ?** **: ( ) . , \' + Space** Supported characters for **regular** and **fast** transfers to a US counterparty: **[a-z] [A-Z] [0-9] & $ % # @** **~ = + - _ \' \" ! ?** */ 'description'?: string; - 'directDebitInformation'?: DirectDebitInformation | null; + 'directDebitInformation'?: DirectDebitInformation; /** * The direction of the transfer. Possible values: **incoming**, **outgoing**. */ @@ -70,7 +62,7 @@ export class TransferData { * The ID of the resource. */ 'id'?: string; - 'paymentInstrument'?: PaymentInstrument | null; + 'paymentInstrument'?: PaymentInstrument; /** * Additional information about the status of the transfer. */ @@ -83,7 +75,7 @@ export class TransferData { * A reference that is sent to the recipient. This reference is also sent in all webhooks related to the transfer, so you can use it to track statuses for both the source and recipient of funds. Supported characters: **a-z**, **A-Z**, **0-9**.The maximum length depends on the `category`. - **internal**: 80 characters - **bank**: 35 characters when transferring to an IBAN, 15 characters for others. */ 'referenceForBeneficiary'?: string; - 'review'?: TransferReview | null; + 'review'?: TransferReview; /** * The sequence number of the transfer webhook. The numbers start from 1 and increase with each new webhook for a specific transfer. The sequence number can help you restore the correct sequence of events even if they arrive out of order. */ @@ -92,11 +84,8 @@ export class TransferData { * The result of the transfer. For example, **authorised**, **refused**, or **error**. */ 'status': TransferData.StatusEnum; - /** - * The latest tracking information of the transfer. - */ - 'tracking'?: ConfirmationTrackingData | EstimationTrackingData | InternalReviewTrackingData | null; - 'transactionRulesResult'?: TransactionRulesResult | null; + 'tracking'?: TransferDataTracking; + 'transactionRulesResult'?: TransactionRulesResult; /** * The type of transfer or transaction. For example, **refund**, **payment**, **internalTransfer**, **bankTransfer**. */ @@ -108,7 +97,7 @@ export class TransferData { { "name": "accountHolder", "baseName": "accountHolder", - "type": "ResourceReference | null" + "type": "ResourceReference" }, { "name": "amount", @@ -118,7 +107,7 @@ export class TransferData { { "name": "balanceAccount", "baseName": "balanceAccount", - "type": "ResourceReference | null" + "type": "ResourceReference" }, { "name": "balancePlatform", @@ -138,12 +127,12 @@ export class TransferData { { "name": "categoryData", "baseName": "categoryData", - "type": "BankCategoryData | InternalCategoryData | IssuedCard | PlatformPayment | null" + "type": "TransferDataCategoryData" }, { "name": "counterparty", "baseName": "counterparty", - "type": "TransferNotificationCounterParty | null" + "type": "TransferNotificationCounterParty" }, { "name": "creationDate", @@ -158,7 +147,7 @@ export class TransferData { { "name": "directDebitInformation", "baseName": "directDebitInformation", - "type": "DirectDebitInformation | null" + "type": "DirectDebitInformation" }, { "name": "direction", @@ -183,7 +172,7 @@ export class TransferData { { "name": "paymentInstrument", "baseName": "paymentInstrument", - "type": "PaymentInstrument | null" + "type": "PaymentInstrument" }, { "name": "reason", @@ -203,7 +192,7 @@ export class TransferData { { "name": "review", "baseName": "review", - "type": "TransferReview | null" + "type": "TransferReview" }, { "name": "sequenceNumber", @@ -218,12 +207,12 @@ export class TransferData { { "name": "tracking", "baseName": "tracking", - "type": "ConfirmationTrackingData | EstimationTrackingData | InternalReviewTrackingData | null" + "type": "TransferDataTracking" }, { "name": "transactionRulesResult", "baseName": "transactionRulesResult", - "type": "TransactionRulesResult | null" + "type": "TransactionRulesResult" }, { "name": "type", @@ -238,149 +227,149 @@ export class TransferData { export namespace TransferData { export enum CategoryEnum { - Bank = 'bank', - Card = 'card', - Internal = 'internal', - IssuedCard = 'issuedCard', - PlatformPayment = 'platformPayment', - TopUp = 'topUp' + Bank = 'bank', + Card = 'card', + Internal = 'internal', + IssuedCard = 'issuedCard', + PlatformPayment = 'platformPayment', + TopUp = 'topUp' } export enum DirectionEnum { - Incoming = 'incoming', - Outgoing = 'outgoing' + Incoming = 'incoming', + Outgoing = 'outgoing' } export enum ReasonEnum { - AccountHierarchyNotActive = 'accountHierarchyNotActive', - AmountLimitExceeded = 'amountLimitExceeded', - Approved = 'approved', - BalanceAccountTemporarilyBlockedByTransactionRule = 'balanceAccountTemporarilyBlockedByTransactionRule', - CounterpartyAccountBlocked = 'counterpartyAccountBlocked', - CounterpartyAccountClosed = 'counterpartyAccountClosed', - CounterpartyAccountNotFound = 'counterpartyAccountNotFound', - CounterpartyAddressRequired = 'counterpartyAddressRequired', - CounterpartyBankTimedOut = 'counterpartyBankTimedOut', - CounterpartyBankUnavailable = 'counterpartyBankUnavailable', - Declined = 'declined', - DeclinedByTransactionRule = 'declinedByTransactionRule', - DirectDebitNotSupported = 'directDebitNotSupported', - Error = 'error', - NotEnoughBalance = 'notEnoughBalance', - PendingApproval = 'pendingApproval', - PendingExecution = 'pendingExecution', - RefusedByCounterpartyBank = 'refusedByCounterpartyBank', - RefusedByCustomer = 'refusedByCustomer', - RouteNotFound = 'routeNotFound', - ScaFailed = 'scaFailed', - TransferInstrumentDoesNotExist = 'transferInstrumentDoesNotExist', - Unknown = 'unknown' + AccountHierarchyNotActive = 'accountHierarchyNotActive', + AmountLimitExceeded = 'amountLimitExceeded', + Approved = 'approved', + BalanceAccountTemporarilyBlockedByTransactionRule = 'balanceAccountTemporarilyBlockedByTransactionRule', + CounterpartyAccountBlocked = 'counterpartyAccountBlocked', + CounterpartyAccountClosed = 'counterpartyAccountClosed', + CounterpartyAccountNotFound = 'counterpartyAccountNotFound', + CounterpartyAddressRequired = 'counterpartyAddressRequired', + CounterpartyBankTimedOut = 'counterpartyBankTimedOut', + CounterpartyBankUnavailable = 'counterpartyBankUnavailable', + Declined = 'declined', + DeclinedByTransactionRule = 'declinedByTransactionRule', + DirectDebitNotSupported = 'directDebitNotSupported', + Error = 'error', + NotEnoughBalance = 'notEnoughBalance', + PendingApproval = 'pendingApproval', + PendingExecution = 'pendingExecution', + RefusedByCounterpartyBank = 'refusedByCounterpartyBank', + RefusedByCustomer = 'refusedByCustomer', + RouteNotFound = 'routeNotFound', + ScaFailed = 'scaFailed', + TransferInstrumentDoesNotExist = 'transferInstrumentDoesNotExist', + Unknown = 'unknown' } export enum StatusEnum { - ApprovalPending = 'approvalPending', - AtmWithdrawal = 'atmWithdrawal', - AtmWithdrawalReversalPending = 'atmWithdrawalReversalPending', - AtmWithdrawalReversed = 'atmWithdrawalReversed', - AuthAdjustmentAuthorised = 'authAdjustmentAuthorised', - AuthAdjustmentError = 'authAdjustmentError', - AuthAdjustmentRefused = 'authAdjustmentRefused', - Authorised = 'authorised', - BankTransfer = 'bankTransfer', - BankTransferPending = 'bankTransferPending', - Booked = 'booked', - BookingPending = 'bookingPending', - Cancelled = 'cancelled', - CapturePending = 'capturePending', - CaptureReversalPending = 'captureReversalPending', - CaptureReversed = 'captureReversed', - Captured = 'captured', - CapturedExternally = 'capturedExternally', - Chargeback = 'chargeback', - ChargebackExternally = 'chargebackExternally', - ChargebackPending = 'chargebackPending', - ChargebackReversalPending = 'chargebackReversalPending', - ChargebackReversed = 'chargebackReversed', - Credited = 'credited', - DepositCorrection = 'depositCorrection', - DepositCorrectionPending = 'depositCorrectionPending', - Dispute = 'dispute', - DisputeClosed = 'disputeClosed', - DisputeExpired = 'disputeExpired', - DisputeNeedsReview = 'disputeNeedsReview', - Error = 'error', - Expired = 'expired', - Failed = 'failed', - Fee = 'fee', - FeePending = 'feePending', - InternalTransfer = 'internalTransfer', - InternalTransferPending = 'internalTransferPending', - InvoiceDeduction = 'invoiceDeduction', - InvoiceDeductionPending = 'invoiceDeductionPending', - ManualCorrectionPending = 'manualCorrectionPending', - ManuallyCorrected = 'manuallyCorrected', - MatchedStatement = 'matchedStatement', - MatchedStatementPending = 'matchedStatementPending', - MerchantPayin = 'merchantPayin', - MerchantPayinPending = 'merchantPayinPending', - MerchantPayinReversed = 'merchantPayinReversed', - MerchantPayinReversedPending = 'merchantPayinReversedPending', - MiscCost = 'miscCost', - MiscCostPending = 'miscCostPending', - PaymentCost = 'paymentCost', - PaymentCostPending = 'paymentCostPending', - PendingApproval = 'pendingApproval', - PendingExecution = 'pendingExecution', - Received = 'received', - RefundPending = 'refundPending', - RefundReversalPending = 'refundReversalPending', - RefundReversed = 'refundReversed', - Refunded = 'refunded', - RefundedExternally = 'refundedExternally', - Refused = 'refused', - Rejected = 'rejected', - ReserveAdjustment = 'reserveAdjustment', - ReserveAdjustmentPending = 'reserveAdjustmentPending', - Returned = 'returned', - SecondChargeback = 'secondChargeback', - SecondChargebackPending = 'secondChargebackPending', - Undefined = 'undefined' + ApprovalPending = 'approvalPending', + AtmWithdrawal = 'atmWithdrawal', + AtmWithdrawalReversalPending = 'atmWithdrawalReversalPending', + AtmWithdrawalReversed = 'atmWithdrawalReversed', + AuthAdjustmentAuthorised = 'authAdjustmentAuthorised', + AuthAdjustmentError = 'authAdjustmentError', + AuthAdjustmentRefused = 'authAdjustmentRefused', + Authorised = 'authorised', + BankTransfer = 'bankTransfer', + BankTransferPending = 'bankTransferPending', + Booked = 'booked', + BookingPending = 'bookingPending', + Cancelled = 'cancelled', + CapturePending = 'capturePending', + CaptureReversalPending = 'captureReversalPending', + CaptureReversed = 'captureReversed', + Captured = 'captured', + CapturedExternally = 'capturedExternally', + Chargeback = 'chargeback', + ChargebackExternally = 'chargebackExternally', + ChargebackPending = 'chargebackPending', + ChargebackReversalPending = 'chargebackReversalPending', + ChargebackReversed = 'chargebackReversed', + Credited = 'credited', + DepositCorrection = 'depositCorrection', + DepositCorrectionPending = 'depositCorrectionPending', + Dispute = 'dispute', + DisputeClosed = 'disputeClosed', + DisputeExpired = 'disputeExpired', + DisputeNeedsReview = 'disputeNeedsReview', + Error = 'error', + Expired = 'expired', + Failed = 'failed', + Fee = 'fee', + FeePending = 'feePending', + InternalTransfer = 'internalTransfer', + InternalTransferPending = 'internalTransferPending', + InvoiceDeduction = 'invoiceDeduction', + InvoiceDeductionPending = 'invoiceDeductionPending', + ManualCorrectionPending = 'manualCorrectionPending', + ManuallyCorrected = 'manuallyCorrected', + MatchedStatement = 'matchedStatement', + MatchedStatementPending = 'matchedStatementPending', + MerchantPayin = 'merchantPayin', + MerchantPayinPending = 'merchantPayinPending', + MerchantPayinReversed = 'merchantPayinReversed', + MerchantPayinReversedPending = 'merchantPayinReversedPending', + MiscCost = 'miscCost', + MiscCostPending = 'miscCostPending', + PaymentCost = 'paymentCost', + PaymentCostPending = 'paymentCostPending', + PendingApproval = 'pendingApproval', + PendingExecution = 'pendingExecution', + Received = 'received', + RefundPending = 'refundPending', + RefundReversalPending = 'refundReversalPending', + RefundReversed = 'refundReversed', + Refunded = 'refunded', + RefundedExternally = 'refundedExternally', + Refused = 'refused', + Rejected = 'rejected', + ReserveAdjustment = 'reserveAdjustment', + ReserveAdjustmentPending = 'reserveAdjustmentPending', + Returned = 'returned', + SecondChargeback = 'secondChargeback', + SecondChargebackPending = 'secondChargebackPending', + Undefined = 'undefined' } export enum TypeEnum { - Payment = 'payment', - Capture = 'capture', - CaptureReversal = 'captureReversal', - Refund = 'refund', - RefundReversal = 'refundReversal', - Chargeback = 'chargeback', - ChargebackCorrection = 'chargebackCorrection', - ChargebackReversal = 'chargebackReversal', - ChargebackReversalCorrection = 'chargebackReversalCorrection', - SecondChargeback = 'secondChargeback', - SecondChargebackCorrection = 'secondChargebackCorrection', - AtmWithdrawal = 'atmWithdrawal', - AtmWithdrawalReversal = 'atmWithdrawalReversal', - InternalTransfer = 'internalTransfer', - InternalDirectDebit = 'internalDirectDebit', - ManualCorrection = 'manualCorrection', - InvoiceDeduction = 'invoiceDeduction', - DepositCorrection = 'depositCorrection', - ReserveAdjustment = 'reserveAdjustment', - BankTransfer = 'bankTransfer', - BankDirectDebit = 'bankDirectDebit', - CardTransfer = 'cardTransfer', - MiscCost = 'miscCost', - PaymentCost = 'paymentCost', - Fee = 'fee', - Leftover = 'leftover', - Grant = 'grant', - CapitalFundsCollection = 'capitalFundsCollection', - CashOutInstruction = 'cashOutInstruction', - CashoutFee = 'cashoutFee', - CashoutRepayment = 'cashoutRepayment', - CashoutFunding = 'cashoutFunding', - Repayment = 'repayment', - Installment = 'installment', - InstallmentReversal = 'installmentReversal', - BalanceAdjustment = 'balanceAdjustment', - BalanceRollover = 'balanceRollover', - BalanceMigration = 'balanceMigration' + Payment = 'payment', + Capture = 'capture', + CaptureReversal = 'captureReversal', + Refund = 'refund', + RefundReversal = 'refundReversal', + Chargeback = 'chargeback', + ChargebackCorrection = 'chargebackCorrection', + ChargebackReversal = 'chargebackReversal', + ChargebackReversalCorrection = 'chargebackReversalCorrection', + SecondChargeback = 'secondChargeback', + SecondChargebackCorrection = 'secondChargebackCorrection', + AtmWithdrawal = 'atmWithdrawal', + AtmWithdrawalReversal = 'atmWithdrawalReversal', + InternalTransfer = 'internalTransfer', + InternalDirectDebit = 'internalDirectDebit', + ManualCorrection = 'manualCorrection', + InvoiceDeduction = 'invoiceDeduction', + DepositCorrection = 'depositCorrection', + ReserveAdjustment = 'reserveAdjustment', + BankTransfer = 'bankTransfer', + BankDirectDebit = 'bankDirectDebit', + CardTransfer = 'cardTransfer', + MiscCost = 'miscCost', + PaymentCost = 'paymentCost', + Fee = 'fee', + Leftover = 'leftover', + Grant = 'grant', + CapitalFundsCollection = 'capitalFundsCollection', + CashOutInstruction = 'cashOutInstruction', + CashoutFee = 'cashoutFee', + CashoutRepayment = 'cashoutRepayment', + CashoutFunding = 'cashoutFunding', + Repayment = 'repayment', + Installment = 'installment', + InstallmentReversal = 'installmentReversal', + BalanceAdjustment = 'balanceAdjustment', + BalanceRollover = 'balanceRollover', + BalanceMigration = 'balanceMigration' } } diff --git a/src/typings/transferWebhooks/transferDataCategoryData.ts b/src/typings/transferWebhooks/transferDataCategoryData.ts new file mode 100644 index 000000000..944141627 --- /dev/null +++ b/src/typings/transferWebhooks/transferDataCategoryData.ts @@ -0,0 +1,206 @@ +/* + * The version of the OpenAPI document: v4 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { BankCategoryData } from './bankCategoryData'; +import { InternalCategoryData } from './internalCategoryData'; +import { IssuedCard } from './issuedCard'; +import { PlatformPayment } from './platformPayment'; +import { RelayedAuthorisationData } from './relayedAuthorisationData'; +import { TransferNotificationValidationFact } from './transferNotificationValidationFact'; + +/** +* The relevant data according to the transfer category. +*/ +export class TransferDataCategoryData { + /** + * The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**. Possible values: * **regular**: for normal, low-value transactions. * **fast**: 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). + */ + 'priority'?: TransferDataCategoryData.PriorityEnum; + /** + * **bank** + */ + 'type'?: TransferDataCategoryData.TypeEnum = TransferDataCategoryData.TypeEnum.Bank; + /** + * The capture\'s merchant reference included in the transfer. + */ + 'modificationMerchantReference'?: string; + /** + * The capture reference included in the transfer. + */ + 'modificationPspReference'?: string; + /** + * The authorisation type. For example, **defaultAuthorisation**, **preAuthorisation**, **finalAuthorisation** + */ + 'authorisationType'?: string; + /** + * Indicates the method used for entering the PAN to initiate a transaction. Possible values: **manual**, **chip**, **magstripe**, **contactless**, **cof**, **ecommerce**, **token**. + */ + 'panEntryMode'?: TransferDataCategoryData.PanEntryModeEnum; + /** + * Contains information about how the payment was processed. For example, **ecommerce** for online or **pos** for in-person payments. + */ + 'processingType'?: TransferDataCategoryData.ProcessingTypeEnum; + 'relayedAuthorisationData'?: RelayedAuthorisationData; + /** + * The identifier of the original payment. This ID is provided by the scheme and can be alphanumeric or numeric, depending on the scheme. The `schemeTraceID` should refer to an original `schemeUniqueTransactionID` provided in an earlier payment (not necessarily processed by Adyen). A `schemeTraceId` is typically available for authorization adjustments or recurring payments. + */ + 'schemeTraceId'?: string; + /** + * The unique identifier created by the scheme. This ID can be alphanumeric or numeric depending on the scheme. + */ + 'schemeUniqueTransactionId'?: string; + /** + * The evaluation of the validation facts. See [validation checks](https://docs.adyen.com/issuing/validation-checks) for more information. + */ + 'validationFacts'?: Array; + /** + * The payment\'s merchant reference included in the transfer. + */ + 'paymentMerchantReference'?: string; + /** + * Specifies the nature of the transfer. This parameter helps categorize transfers so you can reconcile transactions at a later time, using the Balance Platform Accounting Report for [marketplaces](https://docs.adyen.com/marketplaces/reports-and-fees/balance-platform-accounting-report/) or [platforms](https://docs.adyen.com/platforms/reports-and-fees/balance-platform-accounting-report/). Possible values: * **AcquiringFees**: for the acquiring fee incurred on a transaction. * **AdyenCommission**: for the transaction fee due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/guides/payments-training-guide/get-the-best-from-your-card-processing). * **AdyenFees**: for all the transaction fees due to Adyen. This is the sum of Adyen\'s commission and Adyen\'s markup. * **AdyenMarkup**: for the transaction fee due to Adyen under [Interchange++ pricing](https://www.adyen.com/pricing). * **BalanceAccount**: or the sale amount of a transaction. * **Commission**: for your platform\'s commission on a transaction. * **DCCPlatformCommission**: for the DCC Commission for the platform on a transaction. * **Interchange**: for the interchange fee (fee paid to the issuer) incurred on a transaction. * **PaymentFee**: for all of the transaction fees. * **Remainder**: for the left over amount after currency conversion. * **SchemeFee**: for the scheme fee incurred on a transaction. This is the sum of the interchange fees and the acquiring fees. * **Surcharge**: for the surcharge paid by the customer on a transaction. * **Tip**: for the tip paid by the customer. * **TopUp**: for an incoming transfer to top up your user\'s balance account. * **VAT**: for the Value Added Tax. + */ + 'platformPaymentType'?: TransferDataCategoryData.PlatformPaymentTypeEnum; + /** + * The payment reference included in the transfer. + */ + 'pspPaymentReference'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "priority", + "baseName": "priority", + "type": "TransferDataCategoryData.PriorityEnum" + }, + { + "name": "type", + "baseName": "type", + "type": "TransferDataCategoryData.TypeEnum" + }, + { + "name": "modificationMerchantReference", + "baseName": "modificationMerchantReference", + "type": "string" + }, + { + "name": "modificationPspReference", + "baseName": "modificationPspReference", + "type": "string" + }, + { + "name": "authorisationType", + "baseName": "authorisationType", + "type": "string" + }, + { + "name": "panEntryMode", + "baseName": "panEntryMode", + "type": "TransferDataCategoryData.PanEntryModeEnum" + }, + { + "name": "processingType", + "baseName": "processingType", + "type": "TransferDataCategoryData.ProcessingTypeEnum" + }, + { + "name": "relayedAuthorisationData", + "baseName": "relayedAuthorisationData", + "type": "RelayedAuthorisationData" + }, + { + "name": "schemeTraceId", + "baseName": "schemeTraceId", + "type": "string" + }, + { + "name": "schemeUniqueTransactionId", + "baseName": "schemeUniqueTransactionId", + "type": "string" + }, + { + "name": "validationFacts", + "baseName": "validationFacts", + "type": "Array" + }, + { + "name": "paymentMerchantReference", + "baseName": "paymentMerchantReference", + "type": "string" + }, + { + "name": "platformPaymentType", + "baseName": "platformPaymentType", + "type": "TransferDataCategoryData.PlatformPaymentTypeEnum" + }, + { + "name": "pspPaymentReference", + "baseName": "pspPaymentReference", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return TransferDataCategoryData.attributeTypeMap; + } +} + +export namespace TransferDataCategoryData { + export enum PriorityEnum { + CrossBorder = 'crossBorder', + Fast = 'fast', + Instant = 'instant', + Internal = 'internal', + Regular = 'regular', + Wire = 'wire' + } + export enum TypeEnum { + Bank = 'bank', + Internal = 'internal', + IssuedCard = 'issuedCard', + PlatformPayment = 'platformPayment' + } + export enum PanEntryModeEnum { + Chip = 'chip', + Cof = 'cof', + Contactless = 'contactless', + Ecommerce = 'ecommerce', + Magstripe = 'magstripe', + Manual = 'manual', + Token = 'token' + } + export enum ProcessingTypeEnum { + AtmWithdraw = 'atmWithdraw', + BalanceInquiry = 'balanceInquiry', + Ecommerce = 'ecommerce', + Moto = 'moto', + Pos = 'pos', + PurchaseWithCashback = 'purchaseWithCashback', + Recurring = 'recurring', + Token = 'token' + } + export enum PlatformPaymentTypeEnum { + AcquiringFees = 'AcquiringFees', + AdyenCommission = 'AdyenCommission', + AdyenFees = 'AdyenFees', + AdyenMarkup = 'AdyenMarkup', + BalanceAccount = 'BalanceAccount', + Commission = 'Commission', + DccPlatformCommission = 'DCCPlatformCommission', + Default = 'Default', + Interchange = 'Interchange', + PaymentFee = 'PaymentFee', + Remainder = 'Remainder', + SchemeFee = 'SchemeFee', + Surcharge = 'Surcharge', + Tip = 'Tip', + TopUp = 'TopUp', + Vat = 'VAT' + } +} diff --git a/src/typings/transferWebhooks/transferDataTracking.ts b/src/typings/transferWebhooks/transferDataTracking.ts new file mode 100644 index 000000000..4e81b3be5 --- /dev/null +++ b/src/typings/transferWebhooks/transferDataTracking.ts @@ -0,0 +1,77 @@ +/* + * The version of the OpenAPI document: v4 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { ConfirmationTrackingData } from './confirmationTrackingData'; +import { EstimationTrackingData } from './estimationTrackingData'; +import { InternalReviewTrackingData } from './internalReviewTrackingData'; + +/** +* The latest tracking information of the transfer. +*/ +export class TransferDataTracking { + /** + * The status of the transfer. Possible values: - **pending**: the transfer is under internal review. - **failed**: the transfer failed Adyen\'s internal review. For details, see `reason`. + */ + 'status': TransferDataTracking.StatusEnum; + /** + * The type of the tracking event. Possible values: - **confirmation**: the transfer passed Adyen\'s internal review. + */ + 'type': TransferDataTracking.TypeEnum = TransferDataTracking.TypeEnum.Confirmation; + /** + * The estimated time the beneficiary should have access to the funds. + */ + 'estimatedArrivalTime': Date; + /** + * The reason why the transfer failed Adyen\'s internal review. Possible values: - **refusedForRegulatoryReasons**: the transfer does not comply with Adyen\'s risk policy. For more information, [contact the Support Team](https://www.adyen.help/hc/en-us/requests/new). + */ + 'reason'?: TransferDataTracking.ReasonEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "status", + "baseName": "status", + "type": "TransferDataTracking.StatusEnum" + }, + { + "name": "type", + "baseName": "type", + "type": "TransferDataTracking.TypeEnum" + }, + { + "name": "estimatedArrivalTime", + "baseName": "estimatedArrivalTime", + "type": "Date" + }, + { + "name": "reason", + "baseName": "reason", + "type": "TransferDataTracking.ReasonEnum" + } ]; + + static getAttributeTypeMap() { + return TransferDataTracking.attributeTypeMap; + } +} + +export namespace TransferDataTracking { + export enum StatusEnum { + Pending = 'pending', + Failed = 'failed' + } + export enum TypeEnum { + Confirmation = 'confirmation', + Estimation = 'estimation', + InternalReview = 'internalReview' + } + export enum ReasonEnum { + RefusedForRegulatoryReasons = 'refusedForRegulatoryReasons' + } +} diff --git a/src/typings/transferWebhooks/transferEvent.ts b/src/typings/transferWebhooks/transferEvent.ts index 8fbdcf6a3..87dce70a6 100644 --- a/src/typings/transferWebhooks/transferEvent.ts +++ b/src/typings/transferWebhooks/transferEvent.ts @@ -10,17 +10,15 @@ import { Amount } from './amount'; import { AmountAdjustment } from './amountAdjustment'; import { BalanceMutation } from './balanceMutation'; -import { ConfirmationTrackingData } from './confirmationTrackingData'; -import { EstimationTrackingData } from './estimationTrackingData'; import { ExternalReason } from './externalReason'; -import { InternalReviewTrackingData } from './internalReviewTrackingData'; -import { MerchantPurchaseData } from './merchantPurchaseData'; import { Modification } from './modification'; +import { TransferEventEventsDataInner } from './transferEventEventsDataInner'; +import { TransferEventTrackingData } from './transferEventTrackingData'; export class TransferEvent { - 'amount'?: Amount | null; + 'amount'?: Amount; /** - * The amount adjustments in this transfer. + * The amount adjustments in this transfer. Only applicable for [issuing](https://docs.adyen.com/issuing/) integrations. */ 'amountAdjustments'?: Array; /** @@ -38,18 +36,18 @@ export class TransferEvent { /** * A list of event data. */ - 'eventsData'?: Array; - 'externalReason'?: ExternalReason | null; + 'eventsData'?: Array; + 'externalReason'?: ExternalReason; /** * The unique identifier of the transfer event. */ 'id'?: string; - 'modification'?: Modification | null; + 'modification'?: Modification; /** * The list of balance mutations per event. */ 'mutations'?: Array; - 'originalAmount'?: Amount | null; + 'originalAmount'?: Amount; /** * The reason for the transfer status. */ @@ -58,10 +56,7 @@ export class TransferEvent { * The status of the transfer event. */ 'status'?: TransferEvent.StatusEnum; - /** - * Additional information for the tracking event. - */ - 'trackingData'?: ConfirmationTrackingData | EstimationTrackingData | InternalReviewTrackingData | null; + 'trackingData'?: TransferEventTrackingData; /** * The id of the transaction that is related to this accounting event. Only sent for events of type **accounting** where the balance changes. */ @@ -85,7 +80,7 @@ export class TransferEvent { { "name": "amount", "baseName": "amount", - "type": "Amount | null" + "type": "Amount" }, { "name": "amountAdjustments", @@ -110,12 +105,12 @@ export class TransferEvent { { "name": "eventsData", "baseName": "eventsData", - "type": "Array" + "type": "Array" }, { "name": "externalReason", "baseName": "externalReason", - "type": "ExternalReason | null" + "type": "ExternalReason" }, { "name": "id", @@ -125,7 +120,7 @@ export class TransferEvent { { "name": "modification", "baseName": "modification", - "type": "Modification | null" + "type": "Modification" }, { "name": "mutations", @@ -135,7 +130,7 @@ export class TransferEvent { { "name": "originalAmount", "baseName": "originalAmount", - "type": "Amount | null" + "type": "Amount" }, { "name": "reason", @@ -150,7 +145,7 @@ export class TransferEvent { { "name": "trackingData", "baseName": "trackingData", - "type": "ConfirmationTrackingData | EstimationTrackingData | InternalReviewTrackingData | null" + "type": "TransferEventTrackingData" }, { "name": "transactionId", @@ -180,101 +175,101 @@ export class TransferEvent { export namespace TransferEvent { export enum ReasonEnum { - AccountHierarchyNotActive = 'accountHierarchyNotActive', - AmountLimitExceeded = 'amountLimitExceeded', - Approved = 'approved', - BalanceAccountTemporarilyBlockedByTransactionRule = 'balanceAccountTemporarilyBlockedByTransactionRule', - CounterpartyAccountBlocked = 'counterpartyAccountBlocked', - CounterpartyAccountClosed = 'counterpartyAccountClosed', - CounterpartyAccountNotFound = 'counterpartyAccountNotFound', - CounterpartyAddressRequired = 'counterpartyAddressRequired', - CounterpartyBankTimedOut = 'counterpartyBankTimedOut', - CounterpartyBankUnavailable = 'counterpartyBankUnavailable', - Declined = 'declined', - DeclinedByTransactionRule = 'declinedByTransactionRule', - DirectDebitNotSupported = 'directDebitNotSupported', - Error = 'error', - NotEnoughBalance = 'notEnoughBalance', - PendingApproval = 'pendingApproval', - PendingExecution = 'pendingExecution', - RefusedByCounterpartyBank = 'refusedByCounterpartyBank', - RefusedByCustomer = 'refusedByCustomer', - RouteNotFound = 'routeNotFound', - ScaFailed = 'scaFailed', - TransferInstrumentDoesNotExist = 'transferInstrumentDoesNotExist', - Unknown = 'unknown' + AccountHierarchyNotActive = 'accountHierarchyNotActive', + AmountLimitExceeded = 'amountLimitExceeded', + Approved = 'approved', + BalanceAccountTemporarilyBlockedByTransactionRule = 'balanceAccountTemporarilyBlockedByTransactionRule', + CounterpartyAccountBlocked = 'counterpartyAccountBlocked', + CounterpartyAccountClosed = 'counterpartyAccountClosed', + CounterpartyAccountNotFound = 'counterpartyAccountNotFound', + CounterpartyAddressRequired = 'counterpartyAddressRequired', + CounterpartyBankTimedOut = 'counterpartyBankTimedOut', + CounterpartyBankUnavailable = 'counterpartyBankUnavailable', + Declined = 'declined', + DeclinedByTransactionRule = 'declinedByTransactionRule', + DirectDebitNotSupported = 'directDebitNotSupported', + Error = 'error', + NotEnoughBalance = 'notEnoughBalance', + PendingApproval = 'pendingApproval', + PendingExecution = 'pendingExecution', + RefusedByCounterpartyBank = 'refusedByCounterpartyBank', + RefusedByCustomer = 'refusedByCustomer', + RouteNotFound = 'routeNotFound', + ScaFailed = 'scaFailed', + TransferInstrumentDoesNotExist = 'transferInstrumentDoesNotExist', + Unknown = 'unknown' } export enum StatusEnum { - ApprovalPending = 'approvalPending', - AtmWithdrawal = 'atmWithdrawal', - AtmWithdrawalReversalPending = 'atmWithdrawalReversalPending', - AtmWithdrawalReversed = 'atmWithdrawalReversed', - AuthAdjustmentAuthorised = 'authAdjustmentAuthorised', - AuthAdjustmentError = 'authAdjustmentError', - AuthAdjustmentRefused = 'authAdjustmentRefused', - Authorised = 'authorised', - BankTransfer = 'bankTransfer', - BankTransferPending = 'bankTransferPending', - Booked = 'booked', - BookingPending = 'bookingPending', - Cancelled = 'cancelled', - CapturePending = 'capturePending', - CaptureReversalPending = 'captureReversalPending', - CaptureReversed = 'captureReversed', - Captured = 'captured', - CapturedExternally = 'capturedExternally', - Chargeback = 'chargeback', - ChargebackExternally = 'chargebackExternally', - ChargebackPending = 'chargebackPending', - ChargebackReversalPending = 'chargebackReversalPending', - ChargebackReversed = 'chargebackReversed', - Credited = 'credited', - DepositCorrection = 'depositCorrection', - DepositCorrectionPending = 'depositCorrectionPending', - Dispute = 'dispute', - DisputeClosed = 'disputeClosed', - DisputeExpired = 'disputeExpired', - DisputeNeedsReview = 'disputeNeedsReview', - Error = 'error', - Expired = 'expired', - Failed = 'failed', - Fee = 'fee', - FeePending = 'feePending', - InternalTransfer = 'internalTransfer', - InternalTransferPending = 'internalTransferPending', - InvoiceDeduction = 'invoiceDeduction', - InvoiceDeductionPending = 'invoiceDeductionPending', - ManualCorrectionPending = 'manualCorrectionPending', - ManuallyCorrected = 'manuallyCorrected', - MatchedStatement = 'matchedStatement', - MatchedStatementPending = 'matchedStatementPending', - MerchantPayin = 'merchantPayin', - MerchantPayinPending = 'merchantPayinPending', - MerchantPayinReversed = 'merchantPayinReversed', - MerchantPayinReversedPending = 'merchantPayinReversedPending', - MiscCost = 'miscCost', - MiscCostPending = 'miscCostPending', - PaymentCost = 'paymentCost', - PaymentCostPending = 'paymentCostPending', - PendingApproval = 'pendingApproval', - PendingExecution = 'pendingExecution', - Received = 'received', - RefundPending = 'refundPending', - RefundReversalPending = 'refundReversalPending', - RefundReversed = 'refundReversed', - Refunded = 'refunded', - RefundedExternally = 'refundedExternally', - Refused = 'refused', - Rejected = 'rejected', - ReserveAdjustment = 'reserveAdjustment', - ReserveAdjustmentPending = 'reserveAdjustmentPending', - Returned = 'returned', - SecondChargeback = 'secondChargeback', - SecondChargebackPending = 'secondChargebackPending', - Undefined = 'undefined' + ApprovalPending = 'approvalPending', + AtmWithdrawal = 'atmWithdrawal', + AtmWithdrawalReversalPending = 'atmWithdrawalReversalPending', + AtmWithdrawalReversed = 'atmWithdrawalReversed', + AuthAdjustmentAuthorised = 'authAdjustmentAuthorised', + AuthAdjustmentError = 'authAdjustmentError', + AuthAdjustmentRefused = 'authAdjustmentRefused', + Authorised = 'authorised', + BankTransfer = 'bankTransfer', + BankTransferPending = 'bankTransferPending', + Booked = 'booked', + BookingPending = 'bookingPending', + Cancelled = 'cancelled', + CapturePending = 'capturePending', + CaptureReversalPending = 'captureReversalPending', + CaptureReversed = 'captureReversed', + Captured = 'captured', + CapturedExternally = 'capturedExternally', + Chargeback = 'chargeback', + ChargebackExternally = 'chargebackExternally', + ChargebackPending = 'chargebackPending', + ChargebackReversalPending = 'chargebackReversalPending', + ChargebackReversed = 'chargebackReversed', + Credited = 'credited', + DepositCorrection = 'depositCorrection', + DepositCorrectionPending = 'depositCorrectionPending', + Dispute = 'dispute', + DisputeClosed = 'disputeClosed', + DisputeExpired = 'disputeExpired', + DisputeNeedsReview = 'disputeNeedsReview', + Error = 'error', + Expired = 'expired', + Failed = 'failed', + Fee = 'fee', + FeePending = 'feePending', + InternalTransfer = 'internalTransfer', + InternalTransferPending = 'internalTransferPending', + InvoiceDeduction = 'invoiceDeduction', + InvoiceDeductionPending = 'invoiceDeductionPending', + ManualCorrectionPending = 'manualCorrectionPending', + ManuallyCorrected = 'manuallyCorrected', + MatchedStatement = 'matchedStatement', + MatchedStatementPending = 'matchedStatementPending', + MerchantPayin = 'merchantPayin', + MerchantPayinPending = 'merchantPayinPending', + MerchantPayinReversed = 'merchantPayinReversed', + MerchantPayinReversedPending = 'merchantPayinReversedPending', + MiscCost = 'miscCost', + MiscCostPending = 'miscCostPending', + PaymentCost = 'paymentCost', + PaymentCostPending = 'paymentCostPending', + PendingApproval = 'pendingApproval', + PendingExecution = 'pendingExecution', + Received = 'received', + RefundPending = 'refundPending', + RefundReversalPending = 'refundReversalPending', + RefundReversed = 'refundReversed', + Refunded = 'refunded', + RefundedExternally = 'refundedExternally', + Refused = 'refused', + Rejected = 'rejected', + ReserveAdjustment = 'reserveAdjustment', + ReserveAdjustmentPending = 'reserveAdjustmentPending', + Returned = 'returned', + SecondChargeback = 'secondChargeback', + SecondChargebackPending = 'secondChargebackPending', + Undefined = 'undefined' } export enum TypeEnum { - Accounting = 'accounting', - Tracking = 'tracking' + Accounting = 'accounting', + Tracking = 'tracking' } } diff --git a/src/typings/transferWebhooks/transferEventEventsDataInner.ts b/src/typings/transferWebhooks/transferEventEventsDataInner.ts new file mode 100644 index 000000000..82f422f7f --- /dev/null +++ b/src/typings/transferWebhooks/transferEventEventsDataInner.ts @@ -0,0 +1,53 @@ +/* + * The version of the OpenAPI document: v4 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { Airline } from './airline'; +import { Lodging } from './lodging'; +import { MerchantPurchaseData } from './merchantPurchaseData'; + +export class TransferEventEventsDataInner { + 'airline'?: Airline; + /** + * Lodging information. + */ + 'lodging'?: Array; + /** + * The type of events data. Possible values: - **merchantPurchaseData**: merchant purchase data + */ + 'type': TransferEventEventsDataInner.TypeEnum = TransferEventEventsDataInner.TypeEnum.MerchantPurchaseData; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "airline", + "baseName": "airline", + "type": "Airline" + }, + { + "name": "lodging", + "baseName": "lodging", + "type": "Array" + }, + { + "name": "type", + "baseName": "type", + "type": "TransferEventEventsDataInner.TypeEnum" + } ]; + + static getAttributeTypeMap() { + return TransferEventEventsDataInner.attributeTypeMap; + } +} + +export namespace TransferEventEventsDataInner { + export enum TypeEnum { + MerchantPurchaseData = 'merchantPurchaseData' + } +} diff --git a/src/typings/transferWebhooks/transferEventTrackingData.ts b/src/typings/transferWebhooks/transferEventTrackingData.ts new file mode 100644 index 000000000..62da3f4ad --- /dev/null +++ b/src/typings/transferWebhooks/transferEventTrackingData.ts @@ -0,0 +1,77 @@ +/* + * The version of the OpenAPI document: v4 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { ConfirmationTrackingData } from './confirmationTrackingData'; +import { EstimationTrackingData } from './estimationTrackingData'; +import { InternalReviewTrackingData } from './internalReviewTrackingData'; + +/** +* Additional information for the tracking event. +*/ +export class TransferEventTrackingData { + /** + * The status of the transfer. Possible values: - **pending**: the transfer is under internal review. - **failed**: the transfer failed Adyen\'s internal review. For details, see `reason`. + */ + 'status': TransferEventTrackingData.StatusEnum; + /** + * The type of the tracking event. Possible values: - **confirmation**: the transfer passed Adyen\'s internal review. + */ + 'type': TransferEventTrackingData.TypeEnum = TransferEventTrackingData.TypeEnum.Confirmation; + /** + * The estimated time the beneficiary should have access to the funds. + */ + 'estimatedArrivalTime': Date; + /** + * The reason why the transfer failed Adyen\'s internal review. Possible values: - **refusedForRegulatoryReasons**: the transfer does not comply with Adyen\'s risk policy. For more information, [contact the Support Team](https://www.adyen.help/hc/en-us/requests/new). + */ + 'reason'?: TransferEventTrackingData.ReasonEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "status", + "baseName": "status", + "type": "TransferEventTrackingData.StatusEnum" + }, + { + "name": "type", + "baseName": "type", + "type": "TransferEventTrackingData.TypeEnum" + }, + { + "name": "estimatedArrivalTime", + "baseName": "estimatedArrivalTime", + "type": "Date" + }, + { + "name": "reason", + "baseName": "reason", + "type": "TransferEventTrackingData.ReasonEnum" + } ]; + + static getAttributeTypeMap() { + return TransferEventTrackingData.attributeTypeMap; + } +} + +export namespace TransferEventTrackingData { + export enum StatusEnum { + Pending = 'pending', + Failed = 'failed' + } + export enum TypeEnum { + Confirmation = 'confirmation', + Estimation = 'estimation', + InternalReview = 'internalReview' + } + export enum ReasonEnum { + RefusedForRegulatoryReasons = 'refusedForRegulatoryReasons' + } +} diff --git a/src/typings/transferWebhooks/transferNotificationCounterParty.ts b/src/typings/transferWebhooks/transferNotificationCounterParty.ts index 0eec761b2..1e7fe6509 100644 --- a/src/typings/transferWebhooks/transferNotificationCounterParty.ts +++ b/src/typings/transferWebhooks/transferNotificationCounterParty.ts @@ -16,9 +16,9 @@ export class TransferNotificationCounterParty { * The unique identifier of the counterparty [balance account](https://docs.adyen.com/api-explorer/balanceplatform/latest/post/balanceAccounts#responses-200-id). */ 'balanceAccountId'?: string; - 'bankAccount'?: BankAccountV3 | null; - 'card'?: Card | null; - 'merchant'?: TransferNotificationMerchantData | null; + 'bankAccount'?: BankAccountV3; + 'card'?: Card; + 'merchant'?: TransferNotificationMerchantData; /** * The unique identifier of the counterparty [transfer instrument](https://docs.adyen.com/api-explorer/legalentity/latest/post/transferInstruments#responses-200-id). */ @@ -35,17 +35,17 @@ export class TransferNotificationCounterParty { { "name": "bankAccount", "baseName": "bankAccount", - "type": "BankAccountV3 | null" + "type": "BankAccountV3" }, { "name": "card", "baseName": "card", - "type": "Card | null" + "type": "Card" }, { "name": "merchant", "baseName": "merchant", - "type": "TransferNotificationMerchantData | null" + "type": "TransferNotificationMerchantData" }, { "name": "transferInstrumentId", diff --git a/src/typings/transferWebhooks/transferNotificationMerchantData.ts b/src/typings/transferWebhooks/transferNotificationMerchantData.ts index 866e91117..b5eb2e961 100644 --- a/src/typings/transferWebhooks/transferNotificationMerchantData.ts +++ b/src/typings/transferWebhooks/transferNotificationMerchantData.ts @@ -26,7 +26,7 @@ export class TransferNotificationMerchantData { */ 'mcc'?: string; /** - * The merchant identifier. + * The unique identifier of the merchant. */ 'merchantId'?: string; /** @@ -34,7 +34,7 @@ export class TransferNotificationMerchantData { */ 'name'?: string; /** - * The merchant postal code. + * The postal code of the merchant. */ 'postalCode'?: string; diff --git a/src/typings/transferWebhooks/transferNotificationRequest.ts b/src/typings/transferWebhooks/transferNotificationRequest.ts index d58ad3805..08a30670b 100644 --- a/src/typings/transferWebhooks/transferNotificationRequest.ts +++ b/src/typings/transferWebhooks/transferNotificationRequest.ts @@ -55,7 +55,7 @@ export class TransferNotificationRequest { export namespace TransferNotificationRequest { export enum TypeEnum { - Created = 'balancePlatform.transfer.created', - Updated = 'balancePlatform.transfer.updated' + BalancePlatformTransferCreated = 'balancePlatform.transfer.created', + BalancePlatformTransferUpdated = 'balancePlatform.transfer.updated' } } diff --git a/src/typings/transferWebhooks/uKLocalAccountIdentification.ts b/src/typings/transferWebhooks/uKLocalAccountIdentification.ts index 98e350892..b76d49e7d 100644 --- a/src/typings/transferWebhooks/uKLocalAccountIdentification.ts +++ b/src/typings/transferWebhooks/uKLocalAccountIdentification.ts @@ -20,7 +20,7 @@ export class UKLocalAccountIdentification { /** * **ukLocal** */ - 'type': UKLocalAccountIdentification.TypeEnum; + 'type': UKLocalAccountIdentification.TypeEnum = UKLocalAccountIdentification.TypeEnum.UkLocal; static discriminator: string | undefined = undefined; @@ -48,6 +48,6 @@ export class UKLocalAccountIdentification { export namespace UKLocalAccountIdentification { export enum TypeEnum { - UkLocal = 'ukLocal' + UkLocal = 'ukLocal' } } diff --git a/src/typings/transferWebhooks/uSLocalAccountIdentification.ts b/src/typings/transferWebhooks/uSLocalAccountIdentification.ts index 492cc4707..5ee445cc6 100644 --- a/src/typings/transferWebhooks/uSLocalAccountIdentification.ts +++ b/src/typings/transferWebhooks/uSLocalAccountIdentification.ts @@ -16,7 +16,7 @@ export class USLocalAccountIdentification { /** * The bank account type. Possible values: **checking** or **savings**. Defaults to **checking**. */ - 'accountType'?: USLocalAccountIdentification.AccountTypeEnum; + 'accountType'?: USLocalAccountIdentification.AccountTypeEnum = USLocalAccountIdentification.AccountTypeEnum.Checking; /** * The 9-digit [routing number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without separators or whitespace. */ @@ -24,7 +24,7 @@ export class USLocalAccountIdentification { /** * **usLocal** */ - 'type': USLocalAccountIdentification.TypeEnum; + 'type': USLocalAccountIdentification.TypeEnum = USLocalAccountIdentification.TypeEnum.UsLocal; static discriminator: string | undefined = undefined; @@ -57,10 +57,10 @@ export class USLocalAccountIdentification { export namespace USLocalAccountIdentification { export enum AccountTypeEnum { - Checking = 'checking', - Savings = 'savings' + Checking = 'checking', + Savings = 'savings' } export enum TypeEnum { - UsLocal = 'usLocal' + UsLocal = 'usLocal' } } diff --git a/src/typings/transfers/aULocalAccountIdentification.ts b/src/typings/transfers/aULocalAccountIdentification.ts index 3537211f3..88743023b 100644 --- a/src/typings/transfers/aULocalAccountIdentification.ts +++ b/src/typings/transfers/aULocalAccountIdentification.ts @@ -20,7 +20,7 @@ export class AULocalAccountIdentification { /** * **auLocal** */ - 'type': AULocalAccountIdentification.TypeEnum; + 'type': AULocalAccountIdentification.TypeEnum = AULocalAccountIdentification.TypeEnum.AuLocal; static discriminator: string | undefined = undefined; @@ -48,6 +48,6 @@ export class AULocalAccountIdentification { export namespace AULocalAccountIdentification { export enum TypeEnum { - AuLocal = 'auLocal' + AuLocal = 'auLocal' } } diff --git a/src/typings/transfers/additionalBankIdentification.ts b/src/typings/transfers/additionalBankIdentification.ts index df951d106..f3783e635 100644 --- a/src/typings/transfers/additionalBankIdentification.ts +++ b/src/typings/transfers/additionalBankIdentification.ts @@ -39,7 +39,7 @@ export class AdditionalBankIdentification { export namespace AdditionalBankIdentification { export enum TypeEnum { - GbSortCode = 'gbSortCode', - UsRoutingNumber = 'usRoutingNumber' + GbSortCode = 'gbSortCode', + UsRoutingNumber = 'usRoutingNumber' } } diff --git a/src/typings/transfers/amountAdjustment.ts b/src/typings/transfers/amountAdjustment.ts index 543097d5a..bf707a71b 100644 --- a/src/typings/transfers/amountAdjustment.ts +++ b/src/typings/transfers/amountAdjustment.ts @@ -10,7 +10,7 @@ import { Amount } from './amount'; export class AmountAdjustment { - 'amount'?: Amount | null; + 'amount'?: Amount; /** * The type of markup that is applied to an authorised payment. Possible values: **exchange**, **forexMarkup**, **authHoldReserve**, **atmMarkup**. */ @@ -26,7 +26,7 @@ export class AmountAdjustment { { "name": "amount", "baseName": "amount", - "type": "Amount | null" + "type": "Amount" }, { "name": "amountAdjustmentType", @@ -46,9 +46,9 @@ export class AmountAdjustment { export namespace AmountAdjustment { export enum AmountAdjustmentTypeEnum { - AtmMarkup = 'atmMarkup', - AuthHoldReserve = 'authHoldReserve', - Exchange = 'exchange', - ForexMarkup = 'forexMarkup' + AtmMarkup = 'atmMarkup', + AuthHoldReserve = 'authHoldReserve', + Exchange = 'exchange', + ForexMarkup = 'forexMarkup' } } diff --git a/src/typings/transfers/bRLocalAccountIdentification.ts b/src/typings/transfers/bRLocalAccountIdentification.ts index c43d43135..902f78276 100644 --- a/src/typings/transfers/bRLocalAccountIdentification.ts +++ b/src/typings/transfers/bRLocalAccountIdentification.ts @@ -28,7 +28,7 @@ export class BRLocalAccountIdentification { /** * **brLocal** */ - 'type': BRLocalAccountIdentification.TypeEnum; + 'type': BRLocalAccountIdentification.TypeEnum = BRLocalAccountIdentification.TypeEnum.BrLocal; static discriminator: string | undefined = undefined; @@ -66,6 +66,6 @@ export class BRLocalAccountIdentification { export namespace BRLocalAccountIdentification { export enum TypeEnum { - BrLocal = 'brLocal' + BrLocal = 'brLocal' } } diff --git a/src/typings/transfers/bankAccountV3.ts b/src/typings/transfers/bankAccountV3.ts index 503ebb97e..565ce4b47 100644 --- a/src/typings/transfers/bankAccountV3.ts +++ b/src/typings/transfers/bankAccountV3.ts @@ -7,30 +7,12 @@ * Do not edit this class manually. */ -import { AULocalAccountIdentification } from './aULocalAccountIdentification'; -import { BRLocalAccountIdentification } from './bRLocalAccountIdentification'; -import { CALocalAccountIdentification } from './cALocalAccountIdentification'; -import { CZLocalAccountIdentification } from './cZLocalAccountIdentification'; -import { DKLocalAccountIdentification } from './dKLocalAccountIdentification'; -import { HKLocalAccountIdentification } from './hKLocalAccountIdentification'; -import { HULocalAccountIdentification } from './hULocalAccountIdentification'; -import { IbanAccountIdentification } from './ibanAccountIdentification'; -import { NOLocalAccountIdentification } from './nOLocalAccountIdentification'; -import { NZLocalAccountIdentification } from './nZLocalAccountIdentification'; -import { NumberAndBicAccountIdentification } from './numberAndBicAccountIdentification'; -import { PLLocalAccountIdentification } from './pLLocalAccountIdentification'; +import { BankAccountV3AccountIdentification } from './bankAccountV3AccountIdentification'; import { PartyIdentification } from './partyIdentification'; -import { SELocalAccountIdentification } from './sELocalAccountIdentification'; -import { SGLocalAccountIdentification } from './sGLocalAccountIdentification'; -import { UKLocalAccountIdentification } from './uKLocalAccountIdentification'; -import { USLocalAccountIdentification } from './uSLocalAccountIdentification'; export class BankAccountV3 { 'accountHolder': PartyIdentification; - /** - * Contains the bank account details. The fields required in this object depend on the country of the bank account and the currency of the transfer. - */ - 'accountIdentification': AULocalAccountIdentification | BRLocalAccountIdentification | CALocalAccountIdentification | CZLocalAccountIdentification | DKLocalAccountIdentification | HKLocalAccountIdentification | HULocalAccountIdentification | IbanAccountIdentification | NOLocalAccountIdentification | NZLocalAccountIdentification | NumberAndBicAccountIdentification | PLLocalAccountIdentification | SELocalAccountIdentification | SGLocalAccountIdentification | UKLocalAccountIdentification | USLocalAccountIdentification; + 'accountIdentification': BankAccountV3AccountIdentification; static discriminator: string | undefined = undefined; @@ -43,7 +25,7 @@ export class BankAccountV3 { { "name": "accountIdentification", "baseName": "accountIdentification", - "type": "AULocalAccountIdentification | BRLocalAccountIdentification | CALocalAccountIdentification | CZLocalAccountIdentification | DKLocalAccountIdentification | HKLocalAccountIdentification | HULocalAccountIdentification | IbanAccountIdentification | NOLocalAccountIdentification | NZLocalAccountIdentification | NumberAndBicAccountIdentification | PLLocalAccountIdentification | SELocalAccountIdentification | SGLocalAccountIdentification | UKLocalAccountIdentification | USLocalAccountIdentification" + "type": "BankAccountV3AccountIdentification" } ]; static getAttributeTypeMap() { diff --git a/src/typings/transfers/bankAccountV3AccountIdentification.ts b/src/typings/transfers/bankAccountV3AccountIdentification.ts new file mode 100644 index 000000000..78c552b33 --- /dev/null +++ b/src/typings/transfers/bankAccountV3AccountIdentification.ts @@ -0,0 +1,206 @@ +/* + * The version of the OpenAPI document: v4 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { AULocalAccountIdentification } from './aULocalAccountIdentification'; +import { AdditionalBankIdentification } from './additionalBankIdentification'; +import { BRLocalAccountIdentification } from './bRLocalAccountIdentification'; +import { CALocalAccountIdentification } from './cALocalAccountIdentification'; +import { CZLocalAccountIdentification } from './cZLocalAccountIdentification'; +import { DKLocalAccountIdentification } from './dKLocalAccountIdentification'; +import { HKLocalAccountIdentification } from './hKLocalAccountIdentification'; +import { HULocalAccountIdentification } from './hULocalAccountIdentification'; +import { IbanAccountIdentification } from './ibanAccountIdentification'; +import { NOLocalAccountIdentification } from './nOLocalAccountIdentification'; +import { NZLocalAccountIdentification } from './nZLocalAccountIdentification'; +import { NumberAndBicAccountIdentification } from './numberAndBicAccountIdentification'; +import { PLLocalAccountIdentification } from './pLLocalAccountIdentification'; +import { SELocalAccountIdentification } from './sELocalAccountIdentification'; +import { SGLocalAccountIdentification } from './sGLocalAccountIdentification'; +import { UKLocalAccountIdentification } from './uKLocalAccountIdentification'; +import { USLocalAccountIdentification } from './uSLocalAccountIdentification'; + +/** +* Contains the bank account details. The fields required in this object depend on the country of the bank account and the currency of the transfer. +*/ +export class BankAccountV3AccountIdentification { + /** + * The bank account number, without separators or whitespace. + */ + 'accountNumber': string; + /** + * The 6-digit [Bank State Branch (BSB) code](https://en.wikipedia.org/wiki/Bank_state_branch), without separators or whitespace. + */ + 'bsbCode': string; + /** + * **auLocal** + */ + 'type': BankAccountV3AccountIdentification.TypeEnum = BankAccountV3AccountIdentification.TypeEnum.AuLocal; + /** + * The 4-digit bank code (Registreringsnummer) (without separators or whitespace). + */ + 'bankCode': string; + /** + * The bank account branch number, without separators or whitespace. + */ + 'branchNumber': string; + /** + * The 8-digit ISPB, with leading zeros. + */ + 'ispb'?: string; + /** + * The bank account type. Possible values: **checking** or **savings**. Defaults to **checking**. + */ + 'accountType'?: BankAccountV3AccountIdentification.AccountTypeEnum = BankAccountV3AccountIdentification.AccountTypeEnum.Checking; + /** + * The 3-digit institution number, without separators or whitespace. + */ + 'institutionNumber': string; + /** + * The 5-digit transit number, without separators or whitespace. + */ + 'transitNumber': string; + /** + * The 3-digit clearing code, without separators or whitespace. + */ + 'clearingCode': string; + /** + * The international bank account number as defined in the [ISO-13616](https://www.iso.org/standard/81090.html) standard. + */ + 'iban': string; + 'additionalBankIdentification'?: AdditionalBankIdentification; + /** + * The bank\'s 8- or 11-character BIC or SWIFT code. + */ + 'bic': string; + /** + * The 4- to 5-digit clearing number ([Clearingnummer](https://sv.wikipedia.org/wiki/Clearingnummer)), without separators or whitespace. + */ + 'clearingNumber': string; + /** + * The 6-digit [sort code](https://en.wikipedia.org/wiki/Sort_code), without separators or whitespace. + */ + 'sortCode': string; + /** + * The 9-digit [routing number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without separators or whitespace. + */ + 'routingNumber': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "accountNumber", + "baseName": "accountNumber", + "type": "string" + }, + { + "name": "bsbCode", + "baseName": "bsbCode", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "BankAccountV3AccountIdentification.TypeEnum" + }, + { + "name": "bankCode", + "baseName": "bankCode", + "type": "string" + }, + { + "name": "branchNumber", + "baseName": "branchNumber", + "type": "string" + }, + { + "name": "ispb", + "baseName": "ispb", + "type": "string" + }, + { + "name": "accountType", + "baseName": "accountType", + "type": "BankAccountV3AccountIdentification.AccountTypeEnum" + }, + { + "name": "institutionNumber", + "baseName": "institutionNumber", + "type": "string" + }, + { + "name": "transitNumber", + "baseName": "transitNumber", + "type": "string" + }, + { + "name": "clearingCode", + "baseName": "clearingCode", + "type": "string" + }, + { + "name": "iban", + "baseName": "iban", + "type": "string" + }, + { + "name": "additionalBankIdentification", + "baseName": "additionalBankIdentification", + "type": "AdditionalBankIdentification" + }, + { + "name": "bic", + "baseName": "bic", + "type": "string" + }, + { + "name": "clearingNumber", + "baseName": "clearingNumber", + "type": "string" + }, + { + "name": "sortCode", + "baseName": "sortCode", + "type": "string" + }, + { + "name": "routingNumber", + "baseName": "routingNumber", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return BankAccountV3AccountIdentification.attributeTypeMap; + } +} + +export namespace BankAccountV3AccountIdentification { + export enum TypeEnum { + AuLocal = 'auLocal', + BrLocal = 'brLocal', + CaLocal = 'caLocal', + CzLocal = 'czLocal', + DkLocal = 'dkLocal', + HkLocal = 'hkLocal', + HuLocal = 'huLocal', + Iban = 'iban', + NoLocal = 'noLocal', + NzLocal = 'nzLocal', + NumberAndBic = 'numberAndBic', + PlLocal = 'plLocal', + SeLocal = 'seLocal', + SgLocal = 'sgLocal', + UkLocal = 'ukLocal', + UsLocal = 'usLocal' + } + export enum AccountTypeEnum { + Checking = 'checking', + Savings = 'savings' + } +} diff --git a/src/typings/transfers/bankCategoryData.ts b/src/typings/transfers/bankCategoryData.ts index 40c4f1403..b77da7fc7 100644 --- a/src/typings/transfers/bankCategoryData.ts +++ b/src/typings/transfers/bankCategoryData.ts @@ -16,7 +16,7 @@ export class BankCategoryData { /** * **bank** */ - 'type'?: BankCategoryData.TypeEnum; + 'type'?: BankCategoryData.TypeEnum = BankCategoryData.TypeEnum.Bank; static discriminator: string | undefined = undefined; @@ -39,14 +39,14 @@ export class BankCategoryData { export namespace BankCategoryData { export enum PriorityEnum { - CrossBorder = 'crossBorder', - Fast = 'fast', - Instant = 'instant', - Internal = 'internal', - Regular = 'regular', - Wire = 'wire' + CrossBorder = 'crossBorder', + Fast = 'fast', + Instant = 'instant', + Internal = 'internal', + Regular = 'regular', + Wire = 'wire' } export enum TypeEnum { - Bank = 'bank' + Bank = 'bank' } } diff --git a/src/typings/transfers/cALocalAccountIdentification.ts b/src/typings/transfers/cALocalAccountIdentification.ts index 1e0e9ef87..7393c12ad 100644 --- a/src/typings/transfers/cALocalAccountIdentification.ts +++ b/src/typings/transfers/cALocalAccountIdentification.ts @@ -16,7 +16,7 @@ export class CALocalAccountIdentification { /** * The bank account type. Possible values: **checking** or **savings**. Defaults to **checking**. */ - 'accountType'?: CALocalAccountIdentification.AccountTypeEnum; + 'accountType'?: CALocalAccountIdentification.AccountTypeEnum = CALocalAccountIdentification.AccountTypeEnum.Checking; /** * The 3-digit institution number, without separators or whitespace. */ @@ -28,7 +28,7 @@ export class CALocalAccountIdentification { /** * **caLocal** */ - 'type': CALocalAccountIdentification.TypeEnum; + 'type': CALocalAccountIdentification.TypeEnum = CALocalAccountIdentification.TypeEnum.CaLocal; static discriminator: string | undefined = undefined; @@ -66,10 +66,10 @@ export class CALocalAccountIdentification { export namespace CALocalAccountIdentification { export enum AccountTypeEnum { - Checking = 'checking', - Savings = 'savings' + Checking = 'checking', + Savings = 'savings' } export enum TypeEnum { - CaLocal = 'caLocal' + CaLocal = 'caLocal' } } diff --git a/src/typings/transfers/cZLocalAccountIdentification.ts b/src/typings/transfers/cZLocalAccountIdentification.ts index 3b94b7b4a..2b4f64881 100644 --- a/src/typings/transfers/cZLocalAccountIdentification.ts +++ b/src/typings/transfers/cZLocalAccountIdentification.ts @@ -20,7 +20,7 @@ export class CZLocalAccountIdentification { /** * **czLocal** */ - 'type': CZLocalAccountIdentification.TypeEnum; + 'type': CZLocalAccountIdentification.TypeEnum = CZLocalAccountIdentification.TypeEnum.CzLocal; static discriminator: string | undefined = undefined; @@ -48,6 +48,6 @@ export class CZLocalAccountIdentification { export namespace CZLocalAccountIdentification { export enum TypeEnum { - CzLocal = 'czLocal' + CzLocal = 'czLocal' } } diff --git a/src/typings/transfers/capitalGrant.ts b/src/typings/transfers/capitalGrant.ts index 85f40ef43..9c477055c 100644 --- a/src/typings/transfers/capitalGrant.ts +++ b/src/typings/transfers/capitalGrant.ts @@ -14,10 +14,10 @@ import { Fee } from './fee'; import { Repayment } from './repayment'; export class CapitalGrant { - 'amount'?: Amount | null; + 'amount'?: Amount; 'balances': CapitalBalance; - 'counterparty'?: Counterparty | null; - 'fee'?: Fee | null; + 'counterparty'?: Counterparty; + 'fee'?: Fee; /** * The identifier of the grant account used for the grant. */ @@ -30,9 +30,9 @@ export class CapitalGrant { * The identifier of the grant reference. */ 'id': string; - 'repayment'?: Repayment | null; + 'repayment'?: Repayment; /** - * The current status of the grant. Possible values: **Pending**, **Active**, **Repaid**. + * The current status of the grant. Possible values: **Pending**, **Active**, **Repaid**, **WrittenOff**, **Failed**, **Revoked**. */ 'status': CapitalGrant.StatusEnum; @@ -42,7 +42,7 @@ export class CapitalGrant { { "name": "amount", "baseName": "amount", - "type": "Amount | null" + "type": "Amount" }, { "name": "balances", @@ -52,12 +52,12 @@ export class CapitalGrant { { "name": "counterparty", "baseName": "counterparty", - "type": "Counterparty | null" + "type": "Counterparty" }, { "name": "fee", "baseName": "fee", - "type": "Fee | null" + "type": "Fee" }, { "name": "grantAccountId", @@ -77,7 +77,7 @@ export class CapitalGrant { { "name": "repayment", "baseName": "repayment", - "type": "Repayment | null" + "type": "Repayment" }, { "name": "status", @@ -92,8 +92,11 @@ export class CapitalGrant { export namespace CapitalGrant { export enum StatusEnum { - Pending = 'Pending', - Active = 'Active', - Repaid = 'Repaid' + Pending = 'Pending', + Active = 'Active', + Repaid = 'Repaid', + Failed = 'Failed', + WrittenOff = 'WrittenOff', + Revoked = 'Revoked' } } diff --git a/src/typings/transfers/capitalGrantInfo.ts b/src/typings/transfers/capitalGrantInfo.ts index a241baac8..385f4a6ef 100644 --- a/src/typings/transfers/capitalGrantInfo.ts +++ b/src/typings/transfers/capitalGrantInfo.ts @@ -10,7 +10,7 @@ import { Counterparty } from './counterparty'; export class CapitalGrantInfo { - 'counterparty'?: Counterparty | null; + 'counterparty'?: Counterparty; /** * The identifier of the grant account used for the grant. */ @@ -26,7 +26,7 @@ export class CapitalGrantInfo { { "name": "counterparty", "baseName": "counterparty", - "type": "Counterparty | null" + "type": "Counterparty" }, { "name": "grantAccountId", diff --git a/src/typings/transfers/confirmationTrackingData.ts b/src/typings/transfers/confirmationTrackingData.ts index 68f5d340a..14bda9e99 100644 --- a/src/typings/transfers/confirmationTrackingData.ts +++ b/src/typings/transfers/confirmationTrackingData.ts @@ -16,7 +16,7 @@ export class ConfirmationTrackingData { /** * The type of the tracking event. Possible values: - **confirmation**: the transfer passed Adyen\'s internal review. */ - 'type': ConfirmationTrackingData.TypeEnum; + 'type': ConfirmationTrackingData.TypeEnum = ConfirmationTrackingData.TypeEnum.Confirmation; static discriminator: string | undefined = undefined; @@ -39,9 +39,9 @@ export class ConfirmationTrackingData { export namespace ConfirmationTrackingData { export enum StatusEnum { - Credited = 'credited' + Credited = 'credited' } export enum TypeEnum { - Confirmation = 'confirmation' + Confirmation = 'confirmation' } } diff --git a/src/typings/transfers/counterpartyInfoV3.ts b/src/typings/transfers/counterpartyInfoV3.ts index ec633760f..9674886a6 100644 --- a/src/typings/transfers/counterpartyInfoV3.ts +++ b/src/typings/transfers/counterpartyInfoV3.ts @@ -15,8 +15,8 @@ export class CounterpartyInfoV3 { * The unique identifier of the counterparty [balance account](https://docs.adyen.com/api-explorer/balanceplatform/latest/post/balanceAccounts#responses-200-id). */ 'balanceAccountId'?: string; - 'bankAccount'?: BankAccountV3 | null; - 'card'?: Card | null; + 'bankAccount'?: BankAccountV3; + 'card'?: Card; /** * The unique identifier of the counterparty [transfer instrument](https://docs.adyen.com/api-explorer/legalentity/latest/post/transferInstruments#responses-200-id). */ @@ -33,12 +33,12 @@ export class CounterpartyInfoV3 { { "name": "bankAccount", "baseName": "bankAccount", - "type": "BankAccountV3 | null" + "type": "BankAccountV3" }, { "name": "card", "baseName": "card", - "type": "Card | null" + "type": "Card" }, { "name": "transferInstrumentId", diff --git a/src/typings/transfers/counterpartyV3.ts b/src/typings/transfers/counterpartyV3.ts index 992d86700..069cd3fb9 100644 --- a/src/typings/transfers/counterpartyV3.ts +++ b/src/typings/transfers/counterpartyV3.ts @@ -16,9 +16,9 @@ export class CounterpartyV3 { * The unique identifier of the counterparty [balance account](https://docs.adyen.com/api-explorer/balanceplatform/latest/post/balanceAccounts#responses-200-id). */ 'balanceAccountId'?: string; - 'bankAccount'?: BankAccountV3 | null; - 'card'?: Card | null; - 'merchant'?: MerchantData | null; + 'bankAccount'?: BankAccountV3; + 'card'?: Card; + 'merchant'?: MerchantData; /** * The unique identifier of the counterparty [transfer instrument](https://docs.adyen.com/api-explorer/legalentity/latest/post/transferInstruments#responses-200-id). */ @@ -35,17 +35,17 @@ export class CounterpartyV3 { { "name": "bankAccount", "baseName": "bankAccount", - "type": "BankAccountV3 | null" + "type": "BankAccountV3" }, { "name": "card", "baseName": "card", - "type": "Card | null" + "type": "Card" }, { "name": "merchant", "baseName": "merchant", - "type": "MerchantData | null" + "type": "MerchantData" }, { "name": "transferInstrumentId", diff --git a/src/typings/transfers/dKLocalAccountIdentification.ts b/src/typings/transfers/dKLocalAccountIdentification.ts index 6aec27ad5..6c3b73d64 100644 --- a/src/typings/transfers/dKLocalAccountIdentification.ts +++ b/src/typings/transfers/dKLocalAccountIdentification.ts @@ -20,7 +20,7 @@ export class DKLocalAccountIdentification { /** * **dkLocal** */ - 'type': DKLocalAccountIdentification.TypeEnum; + 'type': DKLocalAccountIdentification.TypeEnum = DKLocalAccountIdentification.TypeEnum.DkLocal; static discriminator: string | undefined = undefined; @@ -48,6 +48,6 @@ export class DKLocalAccountIdentification { export namespace DKLocalAccountIdentification { export enum TypeEnum { - DkLocal = 'dkLocal' + DkLocal = 'dkLocal' } } diff --git a/src/typings/transfers/estimationTrackingData.ts b/src/typings/transfers/estimationTrackingData.ts index 154feeaa0..dd3dcb769 100644 --- a/src/typings/transfers/estimationTrackingData.ts +++ b/src/typings/transfers/estimationTrackingData.ts @@ -16,7 +16,7 @@ export class EstimationTrackingData { /** * The type of tracking event. Possible values: - **estimation**: the estimated date and time of when the funds will be credited has been determined. */ - 'type': EstimationTrackingData.TypeEnum; + 'type': EstimationTrackingData.TypeEnum = EstimationTrackingData.TypeEnum.Estimation; static discriminator: string | undefined = undefined; @@ -39,6 +39,6 @@ export class EstimationTrackingData { export namespace EstimationTrackingData { export enum TypeEnum { - Estimation = 'estimation' + Estimation = 'estimation' } } diff --git a/src/typings/transfers/findTransfersResponse.ts b/src/typings/transfers/findTransfersResponse.ts index 9af498784..1e55b8f70 100644 --- a/src/typings/transfers/findTransfersResponse.ts +++ b/src/typings/transfers/findTransfersResponse.ts @@ -11,7 +11,7 @@ import { Links } from './links'; import { TransferData } from './transferData'; export class FindTransfersResponse { - '_links'?: Links | null; + '_links'?: Links; /** * Contains the transfers that match the query parameters. */ @@ -23,7 +23,7 @@ export class FindTransfersResponse { { "name": "_links", "baseName": "_links", - "type": "Links | null" + "type": "Links" }, { "name": "data", diff --git a/src/typings/transfers/hKLocalAccountIdentification.ts b/src/typings/transfers/hKLocalAccountIdentification.ts index b3e237ed6..758fc7f35 100644 --- a/src/typings/transfers/hKLocalAccountIdentification.ts +++ b/src/typings/transfers/hKLocalAccountIdentification.ts @@ -20,7 +20,7 @@ export class HKLocalAccountIdentification { /** * **hkLocal** */ - 'type': HKLocalAccountIdentification.TypeEnum; + 'type': HKLocalAccountIdentification.TypeEnum = HKLocalAccountIdentification.TypeEnum.HkLocal; static discriminator: string | undefined = undefined; @@ -48,6 +48,6 @@ export class HKLocalAccountIdentification { export namespace HKLocalAccountIdentification { export enum TypeEnum { - HkLocal = 'hkLocal' + HkLocal = 'hkLocal' } } diff --git a/src/typings/transfers/hULocalAccountIdentification.ts b/src/typings/transfers/hULocalAccountIdentification.ts index 6cc1939be..74243a11d 100644 --- a/src/typings/transfers/hULocalAccountIdentification.ts +++ b/src/typings/transfers/hULocalAccountIdentification.ts @@ -16,7 +16,7 @@ export class HULocalAccountIdentification { /** * **huLocal** */ - 'type': HULocalAccountIdentification.TypeEnum; + 'type': HULocalAccountIdentification.TypeEnum = HULocalAccountIdentification.TypeEnum.HuLocal; static discriminator: string | undefined = undefined; @@ -39,6 +39,6 @@ export class HULocalAccountIdentification { export namespace HULocalAccountIdentification { export enum TypeEnum { - HuLocal = 'huLocal' + HuLocal = 'huLocal' } } diff --git a/src/typings/transfers/ibanAccountIdentification.ts b/src/typings/transfers/ibanAccountIdentification.ts index e73563c93..da1b37825 100644 --- a/src/typings/transfers/ibanAccountIdentification.ts +++ b/src/typings/transfers/ibanAccountIdentification.ts @@ -16,7 +16,7 @@ export class IbanAccountIdentification { /** * **iban** */ - 'type': IbanAccountIdentification.TypeEnum; + 'type': IbanAccountIdentification.TypeEnum = IbanAccountIdentification.TypeEnum.Iban; static discriminator: string | undefined = undefined; @@ -39,6 +39,6 @@ export class IbanAccountIdentification { export namespace IbanAccountIdentification { export enum TypeEnum { - Iban = 'iban' + Iban = 'iban' } } diff --git a/src/typings/transfers/internalCategoryData.ts b/src/typings/transfers/internalCategoryData.ts index 205518bb5..165c0720a 100644 --- a/src/typings/transfers/internalCategoryData.ts +++ b/src/typings/transfers/internalCategoryData.ts @@ -20,7 +20,7 @@ export class InternalCategoryData { /** * **internal** */ - 'type'?: InternalCategoryData.TypeEnum; + 'type'?: InternalCategoryData.TypeEnum = InternalCategoryData.TypeEnum.Internal; static discriminator: string | undefined = undefined; @@ -48,6 +48,6 @@ export class InternalCategoryData { export namespace InternalCategoryData { export enum TypeEnum { - Internal = 'internal' + Internal = 'internal' } } diff --git a/src/typings/transfers/internalReviewTrackingData.ts b/src/typings/transfers/internalReviewTrackingData.ts index a43cc44bb..1e6aaf9fb 100644 --- a/src/typings/transfers/internalReviewTrackingData.ts +++ b/src/typings/transfers/internalReviewTrackingData.ts @@ -20,7 +20,7 @@ export class InternalReviewTrackingData { /** * The type of tracking event. Possible values: - **internalReview**: the transfer was flagged because it does not comply with Adyen\'s risk policy. */ - 'type': InternalReviewTrackingData.TypeEnum; + 'type': InternalReviewTrackingData.TypeEnum = InternalReviewTrackingData.TypeEnum.InternalReview; static discriminator: string | undefined = undefined; @@ -48,13 +48,13 @@ export class InternalReviewTrackingData { export namespace InternalReviewTrackingData { export enum ReasonEnum { - RefusedForRegulatoryReasons = 'refusedForRegulatoryReasons' + RefusedForRegulatoryReasons = 'refusedForRegulatoryReasons' } export enum StatusEnum { - Pending = 'pending', - Failed = 'failed' + Pending = 'pending', + Failed = 'failed' } export enum TypeEnum { - InternalReview = 'internalReview' + InternalReview = 'internalReview' } } diff --git a/src/typings/transfers/issuedCard.ts b/src/typings/transfers/issuedCard.ts index 5abedca41..9916ae71d 100644 --- a/src/typings/transfers/issuedCard.ts +++ b/src/typings/transfers/issuedCard.ts @@ -23,7 +23,7 @@ export class IssuedCard { * Contains information about how the payment was processed. For example, **ecommerce** for online or **pos** for in-person payments. */ 'processingType'?: IssuedCard.ProcessingTypeEnum; - 'relayedAuthorisationData'?: RelayedAuthorisationData | null; + 'relayedAuthorisationData'?: RelayedAuthorisationData; /** * The identifier of the original payment. This ID is provided by the scheme and can be alphanumeric or numeric, depending on the scheme. The `schemeTraceID` should refer to an original `schemeUniqueTransactionID` provided in an earlier payment (not necessarily processed by Adyen). A `schemeTraceId` is typically available for authorization adjustments or recurring payments. */ @@ -35,7 +35,7 @@ export class IssuedCard { /** * **issuedCard** */ - 'type'?: IssuedCard.TypeEnum; + 'type'?: IssuedCard.TypeEnum = IssuedCard.TypeEnum.IssuedCard; /** * The evaluation of the validation facts. See [validation checks](https://docs.adyen.com/issuing/validation-checks) for more information. */ @@ -62,7 +62,7 @@ export class IssuedCard { { "name": "relayedAuthorisationData", "baseName": "relayedAuthorisationData", - "type": "RelayedAuthorisationData | null" + "type": "RelayedAuthorisationData" }, { "name": "schemeTraceId", @@ -92,25 +92,25 @@ export class IssuedCard { export namespace IssuedCard { export enum PanEntryModeEnum { - Chip = 'chip', - Cof = 'cof', - Contactless = 'contactless', - Ecommerce = 'ecommerce', - Magstripe = 'magstripe', - Manual = 'manual', - Token = 'token' + Chip = 'chip', + Cof = 'cof', + Contactless = 'contactless', + Ecommerce = 'ecommerce', + Magstripe = 'magstripe', + Manual = 'manual', + Token = 'token' } export enum ProcessingTypeEnum { - AtmWithdraw = 'atmWithdraw', - BalanceInquiry = 'balanceInquiry', - Ecommerce = 'ecommerce', - Moto = 'moto', - Pos = 'pos', - PurchaseWithCashback = 'purchaseWithCashback', - Recurring = 'recurring', - Token = 'token' + AtmWithdraw = 'atmWithdraw', + BalanceInquiry = 'balanceInquiry', + Ecommerce = 'ecommerce', + Moto = 'moto', + Pos = 'pos', + PurchaseWithCashback = 'purchaseWithCashback', + Recurring = 'recurring', + Token = 'token' } export enum TypeEnum { - IssuedCard = 'issuedCard' + IssuedCard = 'issuedCard' } } diff --git a/src/typings/transfers/links.ts b/src/typings/transfers/links.ts index cc68f1870..8a302d344 100644 --- a/src/typings/transfers/links.ts +++ b/src/typings/transfers/links.ts @@ -10,8 +10,8 @@ import { Link } from './link'; export class Links { - 'next'?: Link | null; - 'prev'?: Link | null; + 'next'?: Link; + 'prev'?: Link; static discriminator: string | undefined = undefined; @@ -19,12 +19,12 @@ export class Links { { "name": "next", "baseName": "next", - "type": "Link | null" + "type": "Link" }, { "name": "prev", "baseName": "prev", - "type": "Link | null" + "type": "Link" } ]; static getAttributeTypeMap() { diff --git a/src/typings/transfers/lodging.ts b/src/typings/transfers/lodging.ts new file mode 100644 index 000000000..b9d0142bb --- /dev/null +++ b/src/typings/transfers/lodging.ts @@ -0,0 +1,39 @@ +/* + * The version of the OpenAPI document: v4 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + + +export class Lodging { + /** + * The check-in date. + */ + 'checkInDate'?: string; + /** + * The total number of nights the room is booked for. + */ + 'numberOfNights'?: number; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "checkInDate", + "baseName": "checkInDate", + "type": "string" + }, + { + "name": "numberOfNights", + "baseName": "numberOfNights", + "type": "number" + } ]; + + static getAttributeTypeMap() { + return Lodging.attributeTypeMap; + } +} + diff --git a/src/typings/transfers/merchantData.ts b/src/typings/transfers/merchantData.ts index 79339cee2..436784fc6 100644 --- a/src/typings/transfers/merchantData.ts +++ b/src/typings/transfers/merchantData.ts @@ -19,12 +19,12 @@ export class MerchantData { */ 'mcc'?: string; /** - * The merchant identifier. + * The unique identifier of the merchant. */ 'merchantId'?: string; - 'nameLocation'?: NameLocation | null; + 'nameLocation'?: NameLocation; /** - * The merchant postal code. + * The postal code of the merchant. */ 'postalCode'?: string; @@ -49,7 +49,7 @@ export class MerchantData { { "name": "nameLocation", "baseName": "nameLocation", - "type": "NameLocation | null" + "type": "NameLocation" }, { "name": "postalCode", diff --git a/src/typings/transfers/merchantPurchaseData.ts b/src/typings/transfers/merchantPurchaseData.ts index 7082ef34a..1cc77671f 100644 --- a/src/typings/transfers/merchantPurchaseData.ts +++ b/src/typings/transfers/merchantPurchaseData.ts @@ -8,13 +8,18 @@ */ import { Airline } from './airline'; +import { Lodging } from './lodging'; export class MerchantPurchaseData { - 'airline'?: Airline | null; + 'airline'?: Airline; + /** + * Lodging information. + */ + 'lodging'?: Array; /** * The type of events data. Possible values: - **merchantPurchaseData**: merchant purchase data */ - 'type': MerchantPurchaseData.TypeEnum; + 'type': MerchantPurchaseData.TypeEnum = MerchantPurchaseData.TypeEnum.MerchantPurchaseData; static discriminator: string | undefined = undefined; @@ -22,7 +27,12 @@ export class MerchantPurchaseData { { "name": "airline", "baseName": "airline", - "type": "Airline | null" + "type": "Airline" + }, + { + "name": "lodging", + "baseName": "lodging", + "type": "Array" }, { "name": "type", @@ -37,6 +47,6 @@ export class MerchantPurchaseData { export namespace MerchantPurchaseData { export enum TypeEnum { - MerchantPurchaseData = 'merchantPurchaseData' + MerchantPurchaseData = 'merchantPurchaseData' } } diff --git a/src/typings/transfers/models.ts b/src/typings/transfers/models.ts index f2fd3d86b..89287dc90 100644 --- a/src/typings/transfers/models.ts +++ b/src/typings/transfers/models.ts @@ -1,12 +1,4 @@ -/* - * The version of the OpenAPI document: v4 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - +import localVarRequest from 'request'; export * from './aULocalAccountIdentification'; export * from './additionalBankIdentification'; @@ -18,6 +10,7 @@ export * from './approveTransfersRequest'; export * from './bRLocalAccountIdentification'; export * from './balanceMutation'; export * from './bankAccountV3'; +export * from './bankAccountV3AccountIdentification'; export * from './bankCategoryData'; export * from './cALocalAccountIdentification'; export * from './cZLocalAccountIdentification'; @@ -48,6 +41,7 @@ export * from './issuedCard'; export * from './leg'; export * from './link'; export * from './links'; +export * from './lodging'; export * from './merchantData'; export * from './merchantPurchaseData'; export * from './modification'; @@ -78,8 +72,12 @@ export * from './transactionRuleSource'; export * from './transactionRulesResult'; export * from './transactionSearchResponse'; export * from './transfer'; +export * from './transferCategoryData'; export * from './transferData'; +export * from './transferDataTracking'; export * from './transferEvent'; +export * from './transferEventEventsDataInner'; +export * from './transferEventTrackingData'; export * from './transferInfo'; export * from './transferNotificationCounterParty'; export * from './transferNotificationMerchantData'; @@ -92,6 +90,18 @@ export * from './uKLocalAccountIdentification'; export * from './uSLocalAccountIdentification'; export * from './ultimatePartyIdentification'; +import * as fs from 'fs'; + +export interface RequestDetailedFile { + value: Buffer; + options?: { + filename?: string; + contentType?: string; + } +} + +export type RequestFile = string | Buffer | fs.ReadStream | RequestDetailedFile; + import { AULocalAccountIdentification } from './aULocalAccountIdentification'; import { AdditionalBankIdentification } from './additionalBankIdentification'; @@ -103,6 +113,7 @@ import { ApproveTransfersRequest } from './approveTransfersRequest'; import { BRLocalAccountIdentification } from './bRLocalAccountIdentification'; import { BalanceMutation } from './balanceMutation'; import { BankAccountV3 } from './bankAccountV3'; +import { BankAccountV3AccountIdentification } from './bankAccountV3AccountIdentification'; import { BankCategoryData } from './bankCategoryData'; import { CALocalAccountIdentification } from './cALocalAccountIdentification'; import { CZLocalAccountIdentification } from './cZLocalAccountIdentification'; @@ -133,6 +144,7 @@ import { IssuedCard } from './issuedCard'; import { Leg } from './leg'; import { Link } from './link'; import { Links } from './links'; +import { Lodging } from './lodging'; import { MerchantData } from './merchantData'; import { MerchantPurchaseData } from './merchantPurchaseData'; import { Modification } from './modification'; @@ -163,8 +175,12 @@ import { TransactionRuleSource } from './transactionRuleSource'; import { TransactionRulesResult } from './transactionRulesResult'; import { TransactionSearchResponse } from './transactionSearchResponse'; import { Transfer } from './transfer'; +import { TransferCategoryData } from './transferCategoryData'; import { TransferData } from './transferData'; +import { TransferDataTracking } from './transferDataTracking'; import { TransferEvent } from './transferEvent'; +import { TransferEventEventsDataInner } from './transferEventEventsDataInner'; +import { TransferEventTrackingData } from './transferEventTrackingData'; import { TransferInfo } from './transferInfo'; import { TransferNotificationCounterParty } from './transferNotificationCounterParty'; import { TransferNotificationMerchantData } from './transferNotificationMerchantData'; @@ -194,6 +210,8 @@ let enumsMap: {[index: string]: any} = { "AdditionalBankIdentification.TypeEnum": AdditionalBankIdentification.TypeEnum, "AmountAdjustment.AmountAdjustmentTypeEnum": AmountAdjustment.AmountAdjustmentTypeEnum, "BRLocalAccountIdentification.TypeEnum": BRLocalAccountIdentification.TypeEnum, + "BankAccountV3AccountIdentification.TypeEnum": BankAccountV3AccountIdentification.TypeEnum, + "BankAccountV3AccountIdentification.AccountTypeEnum": BankAccountV3AccountIdentification.AccountTypeEnum, "BankCategoryData.PriorityEnum": BankCategoryData.PriorityEnum, "BankCategoryData.TypeEnum": BankCategoryData.TypeEnum, "CALocalAccountIdentification.AccountTypeEnum": CALocalAccountIdentification.AccountTypeEnum, @@ -233,14 +251,26 @@ let enumsMap: {[index: string]: any} = { "Transfer.ReasonEnum": Transfer.ReasonEnum, "Transfer.StatusEnum": Transfer.StatusEnum, "Transfer.TypeEnum": Transfer.TypeEnum, + "TransferCategoryData.PriorityEnum": TransferCategoryData.PriorityEnum, + "TransferCategoryData.TypeEnum": TransferCategoryData.TypeEnum, + "TransferCategoryData.PanEntryModeEnum": TransferCategoryData.PanEntryModeEnum, + "TransferCategoryData.ProcessingTypeEnum": TransferCategoryData.ProcessingTypeEnum, + "TransferCategoryData.PlatformPaymentTypeEnum": TransferCategoryData.PlatformPaymentTypeEnum, "TransferData.CategoryEnum": TransferData.CategoryEnum, "TransferData.DirectionEnum": TransferData.DirectionEnum, "TransferData.ReasonEnum": TransferData.ReasonEnum, "TransferData.StatusEnum": TransferData.StatusEnum, "TransferData.TypeEnum": TransferData.TypeEnum, + "TransferDataTracking.StatusEnum": TransferDataTracking.StatusEnum, + "TransferDataTracking.TypeEnum": TransferDataTracking.TypeEnum, + "TransferDataTracking.ReasonEnum": TransferDataTracking.ReasonEnum, "TransferEvent.ReasonEnum": TransferEvent.ReasonEnum, "TransferEvent.StatusEnum": TransferEvent.StatusEnum, "TransferEvent.TypeEnum": TransferEvent.TypeEnum, + "TransferEventEventsDataInner.TypeEnum": TransferEventEventsDataInner.TypeEnum, + "TransferEventTrackingData.StatusEnum": TransferEventTrackingData.StatusEnum, + "TransferEventTrackingData.TypeEnum": TransferEventTrackingData.TypeEnum, + "TransferEventTrackingData.ReasonEnum": TransferEventTrackingData.ReasonEnum, "TransferInfo.CategoryEnum": TransferInfo.CategoryEnum, "TransferInfo.PrioritiesEnum": TransferInfo.PrioritiesEnum, "TransferInfo.PriorityEnum": TransferInfo.PriorityEnum, @@ -262,6 +292,7 @@ let typeMap: {[index: string]: any} = { "BRLocalAccountIdentification": BRLocalAccountIdentification, "BalanceMutation": BalanceMutation, "BankAccountV3": BankAccountV3, + "BankAccountV3AccountIdentification": BankAccountV3AccountIdentification, "BankCategoryData": BankCategoryData, "CALocalAccountIdentification": CALocalAccountIdentification, "CZLocalAccountIdentification": CZLocalAccountIdentification, @@ -292,6 +323,7 @@ let typeMap: {[index: string]: any} = { "Leg": Leg, "Link": Link, "Links": Links, + "Lodging": Lodging, "MerchantData": MerchantData, "MerchantPurchaseData": MerchantPurchaseData, "Modification": Modification, @@ -322,8 +354,12 @@ let typeMap: {[index: string]: any} = { "TransactionRulesResult": TransactionRulesResult, "TransactionSearchResponse": TransactionSearchResponse, "Transfer": Transfer, + "TransferCategoryData": TransferCategoryData, "TransferData": TransferData, + "TransferDataTracking": TransferDataTracking, "TransferEvent": TransferEvent, + "TransferEventEventsDataInner": TransferEventEventsDataInner, + "TransferEventTrackingData": TransferEventTrackingData, "TransferInfo": TransferInfo, "TransferNotificationCounterParty": TransferNotificationCounterParty, "TransferNotificationMerchantData": TransferNotificationMerchantData, @@ -337,6 +373,23 @@ let typeMap: {[index: string]: any} = { "UltimatePartyIdentification": UltimatePartyIdentification, } +// Check if a string starts with another string without using es6 features +function startsWith(str: string, match: string): boolean { + return str.substring(0, match.length) === match; +} + +// Check if a string ends with another string without using es6 features +function endsWith(str: string, match: string): boolean { + return str.length >= match.length && str.substring(str.length - match.length) === match; +} + +const nullableSuffix = " | null"; +const optionalSuffix = " | undefined"; +const arrayPrefix = "Array<"; +const arraySuffix = ">"; +const mapPrefix = "{ [key: string]: "; +const mapSuffix = "; }"; + export class ObjectSerializer { public static findCorrectType(data: any, expectedType: string) { if (data == undefined) { @@ -373,25 +426,37 @@ export class ObjectSerializer { } } - public static serialize(data: any, type: string) { + public static serialize(data: any, type: string): any { if (data == undefined) { return data; } else if (primitives.indexOf(type.toLowerCase()) !== -1) { return data; - } else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6 - let subType: string = type.replace("Array<", ""); // Array => Type> - subType = subType.substring(0, subType.length - 1); // Type> => Type + } else if (endsWith(type, nullableSuffix)) { + let subType: string = type.slice(0, -nullableSuffix.length); // Type | null => Type + return ObjectSerializer.serialize(data, subType); + } else if (endsWith(type, optionalSuffix)) { + let subType: string = type.slice(0, -optionalSuffix.length); // Type | undefined => Type + return ObjectSerializer.serialize(data, subType); + } else if (startsWith(type, arrayPrefix)) { + let subType: string = type.slice(arrayPrefix.length, -arraySuffix.length); // Array => Type let transformedData: any[] = []; for (let index = 0; index < data.length; index++) { let datum = data[index]; transformedData.push(ObjectSerializer.serialize(datum, subType)); } return transformedData; + } else if (startsWith(type, mapPrefix)) { + let subType: string = type.slice(mapPrefix.length, -mapSuffix.length); // { [key: string]: Type; } => Type + let transformedData: { [key: string]: any } = {}; + for (let key in data) { + transformedData[key] = ObjectSerializer.serialize( + data[key], + subType, + ); + } + return transformedData; } else if (type === "Date") { return data.toISOString(); - } else if (type === "SaleToAcquirerData") { - const dataString = JSON.stringify(data); - return Buffer.from(dataString).toString("base64"); } else { if (enumsMap[type]) { return data; @@ -414,22 +479,37 @@ export class ObjectSerializer { } } - public static deserialize(data: any, type: string) { + public static deserialize(data: any, type: string): any { // polymorphism may change the actual type. type = ObjectSerializer.findCorrectType(data, type); if (data == undefined) { return data; } else if (primitives.indexOf(type.toLowerCase()) !== -1) { return data; - } else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6 - let subType: string = type.replace("Array<", ""); // Array => Type> - subType = subType.substring(0, subType.length - 1); // Type> => Type + } else if (endsWith(type, nullableSuffix)) { + let subType: string = type.slice(0, -nullableSuffix.length); // Type | null => Type + return ObjectSerializer.deserialize(data, subType); + } else if (endsWith(type, optionalSuffix)) { + let subType: string = type.slice(0, -optionalSuffix.length); // Type | undefined => Type + return ObjectSerializer.deserialize(data, subType); + } else if (startsWith(type, arrayPrefix)) { + let subType: string = type.slice(arrayPrefix.length, -arraySuffix.length); // Array => Type let transformedData: any[] = []; for (let index = 0; index < data.length; index++) { let datum = data[index]; transformedData.push(ObjectSerializer.deserialize(datum, subType)); } return transformedData; + } else if (startsWith(type, mapPrefix)) { + let subType: string = type.slice(mapPrefix.length, -mapSuffix.length); // { [key: string]: Type; } => Type + let transformedData: { [key: string]: any } = {}; + for (let key in data) { + transformedData[key] = ObjectSerializer.deserialize( + data[key], + subType, + ); + } + return transformedData; } else if (type === "Date") { return new Date(data); } else { @@ -450,3 +530,77 @@ export class ObjectSerializer { } } } + +export interface Authentication { + /** + * Apply authentication settings to header and query params. + */ + applyToRequest(requestOptions: localVarRequest.Options): Promise | void; +} + +export class HttpBasicAuth implements Authentication { + public username: string = ''; + public password: string = ''; + + applyToRequest(requestOptions: localVarRequest.Options): void { + requestOptions.auth = { + username: this.username, password: this.password + } + } +} + +export class HttpBearerAuth implements Authentication { + public accessToken: string | (() => string) = ''; + + applyToRequest(requestOptions: localVarRequest.Options): void { + if (requestOptions && requestOptions.headers) { + const accessToken = typeof this.accessToken === 'function' + ? this.accessToken() + : this.accessToken; + requestOptions.headers["Authorization"] = "Bearer " + accessToken; + } + } +} + +export class ApiKeyAuth implements Authentication { + public apiKey: string = ''; + + constructor(private location: string, private paramName: string) { + } + + applyToRequest(requestOptions: localVarRequest.Options): void { + if (this.location == "query") { + (requestOptions.qs)[this.paramName] = this.apiKey; + } else if (this.location == "header" && requestOptions && requestOptions.headers) { + requestOptions.headers[this.paramName] = this.apiKey; + } else if (this.location == 'cookie' && requestOptions && requestOptions.headers) { + if (requestOptions.headers['Cookie']) { + requestOptions.headers['Cookie'] += '; ' + this.paramName + '=' + encodeURIComponent(this.apiKey); + } + else { + requestOptions.headers['Cookie'] = this.paramName + '=' + encodeURIComponent(this.apiKey); + } + } + } +} + +export class OAuth implements Authentication { + public accessToken: string = ''; + + applyToRequest(requestOptions: localVarRequest.Options): void { + if (requestOptions && requestOptions.headers) { + requestOptions.headers["Authorization"] = "Bearer " + this.accessToken; + } + } +} + +export class VoidAuth implements Authentication { + public username: string = ''; + public password: string = ''; + + applyToRequest(_: localVarRequest.Options): void { + // Do nothing + } +} + +export type Interceptor = (requestOptions: localVarRequest.Options) => (Promise | void); diff --git a/src/typings/transfers/modification.ts b/src/typings/transfers/modification.ts index 8dd6de71f..63b5b75ad 100644 --- a/src/typings/transfers/modification.ts +++ b/src/typings/transfers/modification.ts @@ -66,72 +66,72 @@ export class Modification { export namespace Modification { export enum StatusEnum { - ApprovalPending = 'approvalPending', - AtmWithdrawal = 'atmWithdrawal', - AtmWithdrawalReversalPending = 'atmWithdrawalReversalPending', - AtmWithdrawalReversed = 'atmWithdrawalReversed', - AuthAdjustmentAuthorised = 'authAdjustmentAuthorised', - AuthAdjustmentError = 'authAdjustmentError', - AuthAdjustmentRefused = 'authAdjustmentRefused', - Authorised = 'authorised', - BankTransfer = 'bankTransfer', - BankTransferPending = 'bankTransferPending', - Booked = 'booked', - BookingPending = 'bookingPending', - Cancelled = 'cancelled', - CapturePending = 'capturePending', - CaptureReversalPending = 'captureReversalPending', - CaptureReversed = 'captureReversed', - Captured = 'captured', - CapturedExternally = 'capturedExternally', - Chargeback = 'chargeback', - ChargebackExternally = 'chargebackExternally', - ChargebackPending = 'chargebackPending', - ChargebackReversalPending = 'chargebackReversalPending', - ChargebackReversed = 'chargebackReversed', - Credited = 'credited', - DepositCorrection = 'depositCorrection', - DepositCorrectionPending = 'depositCorrectionPending', - Dispute = 'dispute', - DisputeClosed = 'disputeClosed', - DisputeExpired = 'disputeExpired', - DisputeNeedsReview = 'disputeNeedsReview', - Error = 'error', - Expired = 'expired', - Failed = 'failed', - Fee = 'fee', - FeePending = 'feePending', - InternalTransfer = 'internalTransfer', - InternalTransferPending = 'internalTransferPending', - InvoiceDeduction = 'invoiceDeduction', - InvoiceDeductionPending = 'invoiceDeductionPending', - ManualCorrectionPending = 'manualCorrectionPending', - ManuallyCorrected = 'manuallyCorrected', - MatchedStatement = 'matchedStatement', - MatchedStatementPending = 'matchedStatementPending', - MerchantPayin = 'merchantPayin', - MerchantPayinPending = 'merchantPayinPending', - MerchantPayinReversed = 'merchantPayinReversed', - MerchantPayinReversedPending = 'merchantPayinReversedPending', - MiscCost = 'miscCost', - MiscCostPending = 'miscCostPending', - PaymentCost = 'paymentCost', - PaymentCostPending = 'paymentCostPending', - PendingApproval = 'pendingApproval', - PendingExecution = 'pendingExecution', - Received = 'received', - RefundPending = 'refundPending', - RefundReversalPending = 'refundReversalPending', - RefundReversed = 'refundReversed', - Refunded = 'refunded', - RefundedExternally = 'refundedExternally', - Refused = 'refused', - Rejected = 'rejected', - ReserveAdjustment = 'reserveAdjustment', - ReserveAdjustmentPending = 'reserveAdjustmentPending', - Returned = 'returned', - SecondChargeback = 'secondChargeback', - SecondChargebackPending = 'secondChargebackPending', - Undefined = 'undefined' + ApprovalPending = 'approvalPending', + AtmWithdrawal = 'atmWithdrawal', + AtmWithdrawalReversalPending = 'atmWithdrawalReversalPending', + AtmWithdrawalReversed = 'atmWithdrawalReversed', + AuthAdjustmentAuthorised = 'authAdjustmentAuthorised', + AuthAdjustmentError = 'authAdjustmentError', + AuthAdjustmentRefused = 'authAdjustmentRefused', + Authorised = 'authorised', + BankTransfer = 'bankTransfer', + BankTransferPending = 'bankTransferPending', + Booked = 'booked', + BookingPending = 'bookingPending', + Cancelled = 'cancelled', + CapturePending = 'capturePending', + CaptureReversalPending = 'captureReversalPending', + CaptureReversed = 'captureReversed', + Captured = 'captured', + CapturedExternally = 'capturedExternally', + Chargeback = 'chargeback', + ChargebackExternally = 'chargebackExternally', + ChargebackPending = 'chargebackPending', + ChargebackReversalPending = 'chargebackReversalPending', + ChargebackReversed = 'chargebackReversed', + Credited = 'credited', + DepositCorrection = 'depositCorrection', + DepositCorrectionPending = 'depositCorrectionPending', + Dispute = 'dispute', + DisputeClosed = 'disputeClosed', + DisputeExpired = 'disputeExpired', + DisputeNeedsReview = 'disputeNeedsReview', + Error = 'error', + Expired = 'expired', + Failed = 'failed', + Fee = 'fee', + FeePending = 'feePending', + InternalTransfer = 'internalTransfer', + InternalTransferPending = 'internalTransferPending', + InvoiceDeduction = 'invoiceDeduction', + InvoiceDeductionPending = 'invoiceDeductionPending', + ManualCorrectionPending = 'manualCorrectionPending', + ManuallyCorrected = 'manuallyCorrected', + MatchedStatement = 'matchedStatement', + MatchedStatementPending = 'matchedStatementPending', + MerchantPayin = 'merchantPayin', + MerchantPayinPending = 'merchantPayinPending', + MerchantPayinReversed = 'merchantPayinReversed', + MerchantPayinReversedPending = 'merchantPayinReversedPending', + MiscCost = 'miscCost', + MiscCostPending = 'miscCostPending', + PaymentCost = 'paymentCost', + PaymentCostPending = 'paymentCostPending', + PendingApproval = 'pendingApproval', + PendingExecution = 'pendingExecution', + Received = 'received', + RefundPending = 'refundPending', + RefundReversalPending = 'refundReversalPending', + RefundReversed = 'refundReversed', + Refunded = 'refunded', + RefundedExternally = 'refundedExternally', + Refused = 'refused', + Rejected = 'rejected', + ReserveAdjustment = 'reserveAdjustment', + ReserveAdjustmentPending = 'reserveAdjustmentPending', + Returned = 'returned', + SecondChargeback = 'secondChargeback', + SecondChargebackPending = 'secondChargebackPending', + Undefined = 'undefined' } } diff --git a/src/typings/transfers/nOLocalAccountIdentification.ts b/src/typings/transfers/nOLocalAccountIdentification.ts index bf78b8301..fe29c71e5 100644 --- a/src/typings/transfers/nOLocalAccountIdentification.ts +++ b/src/typings/transfers/nOLocalAccountIdentification.ts @@ -16,7 +16,7 @@ export class NOLocalAccountIdentification { /** * **noLocal** */ - 'type': NOLocalAccountIdentification.TypeEnum; + 'type': NOLocalAccountIdentification.TypeEnum = NOLocalAccountIdentification.TypeEnum.NoLocal; static discriminator: string | undefined = undefined; @@ -39,6 +39,6 @@ export class NOLocalAccountIdentification { export namespace NOLocalAccountIdentification { export enum TypeEnum { - NoLocal = 'noLocal' + NoLocal = 'noLocal' } } diff --git a/src/typings/transfers/nZLocalAccountIdentification.ts b/src/typings/transfers/nZLocalAccountIdentification.ts index e883d2d38..1da805ae2 100644 --- a/src/typings/transfers/nZLocalAccountIdentification.ts +++ b/src/typings/transfers/nZLocalAccountIdentification.ts @@ -16,7 +16,7 @@ export class NZLocalAccountIdentification { /** * **nzLocal** */ - 'type': NZLocalAccountIdentification.TypeEnum; + 'type': NZLocalAccountIdentification.TypeEnum = NZLocalAccountIdentification.TypeEnum.NzLocal; static discriminator: string | undefined = undefined; @@ -39,6 +39,6 @@ export class NZLocalAccountIdentification { export namespace NZLocalAccountIdentification { export enum TypeEnum { - NzLocal = 'nzLocal' + NzLocal = 'nzLocal' } } diff --git a/src/typings/transfers/numberAndBicAccountIdentification.ts b/src/typings/transfers/numberAndBicAccountIdentification.ts index c64f5e5e7..07a245980 100644 --- a/src/typings/transfers/numberAndBicAccountIdentification.ts +++ b/src/typings/transfers/numberAndBicAccountIdentification.ts @@ -14,7 +14,7 @@ export class NumberAndBicAccountIdentification { * The bank account number, without separators or whitespace. The length and format depends on the bank or country. */ 'accountNumber': string; - 'additionalBankIdentification'?: AdditionalBankIdentification | null; + 'additionalBankIdentification'?: AdditionalBankIdentification; /** * The bank\'s 8- or 11-character BIC or SWIFT code. */ @@ -22,7 +22,7 @@ export class NumberAndBicAccountIdentification { /** * **numberAndBic** */ - 'type': NumberAndBicAccountIdentification.TypeEnum; + 'type': NumberAndBicAccountIdentification.TypeEnum = NumberAndBicAccountIdentification.TypeEnum.NumberAndBic; static discriminator: string | undefined = undefined; @@ -35,7 +35,7 @@ export class NumberAndBicAccountIdentification { { "name": "additionalBankIdentification", "baseName": "additionalBankIdentification", - "type": "AdditionalBankIdentification | null" + "type": "AdditionalBankIdentification" }, { "name": "bic", @@ -55,6 +55,6 @@ export class NumberAndBicAccountIdentification { export namespace NumberAndBicAccountIdentification { export enum TypeEnum { - NumberAndBic = 'numberAndBic' + NumberAndBic = 'numberAndBic' } } diff --git a/src/typings/transfers/pLLocalAccountIdentification.ts b/src/typings/transfers/pLLocalAccountIdentification.ts index f7abd24b7..a8454005b 100644 --- a/src/typings/transfers/pLLocalAccountIdentification.ts +++ b/src/typings/transfers/pLLocalAccountIdentification.ts @@ -16,7 +16,7 @@ export class PLLocalAccountIdentification { /** * **plLocal** */ - 'type': PLLocalAccountIdentification.TypeEnum; + 'type': PLLocalAccountIdentification.TypeEnum = PLLocalAccountIdentification.TypeEnum.PlLocal; static discriminator: string | undefined = undefined; @@ -39,6 +39,6 @@ export class PLLocalAccountIdentification { export namespace PLLocalAccountIdentification { export enum TypeEnum { - PlLocal = 'plLocal' + PlLocal = 'plLocal' } } diff --git a/src/typings/transfers/partyIdentification.ts b/src/typings/transfers/partyIdentification.ts index 4dabeeece..2ab13171c 100644 --- a/src/typings/transfers/partyIdentification.ts +++ b/src/typings/transfers/partyIdentification.ts @@ -10,7 +10,7 @@ import { Address } from './address'; export class PartyIdentification { - 'address'?: Address | null; + 'address'?: Address; /** * The date of birth of the individual in [ISO-8601](https://www.w3.org/TR/NOTE-datetime) format. For example, **YYYY-MM-DD**. Allowed only when `type` is **individual**. */ @@ -34,7 +34,7 @@ export class PartyIdentification { /** * The type of entity that owns the bank account or card. Possible values: **individual**, **organization**, or **unknown**. Required when `category` is **card**. In this case, the value must be **individual**. */ - 'type'?: PartyIdentification.TypeEnum; + 'type'?: PartyIdentification.TypeEnum = PartyIdentification.TypeEnum.Unknown; static discriminator: string | undefined = undefined; @@ -42,7 +42,7 @@ export class PartyIdentification { { "name": "address", "baseName": "address", - "type": "Address | null" + "type": "Address" }, { "name": "dateOfBirth", @@ -82,8 +82,8 @@ export class PartyIdentification { export namespace PartyIdentification { export enum TypeEnum { - Individual = 'individual', - Organization = 'organization', - Unknown = 'unknown' + Individual = 'individual', + Organization = 'organization', + Unknown = 'unknown' } } diff --git a/src/typings/transfers/platformPayment.ts b/src/typings/transfers/platformPayment.ts index 0dd1a875f..37ae11ef8 100644 --- a/src/typings/transfers/platformPayment.ts +++ b/src/typings/transfers/platformPayment.ts @@ -22,7 +22,7 @@ export class PlatformPayment { */ 'paymentMerchantReference'?: string; /** - * Specifies the nature of the transfer. This parameter helps categorize transfers so you can reconcile transactions at a later time, using the Balance Platform Accounting Report for [marketplaces](https://docs.adyen.com/marketplaces/reports-and-fees/balance-platform-accounting-report/) or [platforms](https://docs.adyen.com/platforms/reports-and-fees/balance-platform-accounting-report/). Possible values: * **AcquiringFees**: for the acquiring fee incurred on a transaction. * **AdyenCommission**: for the transaction fee due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/guides/payments-training-guide/get-the-best-from-your-card-processing). * **AdyenFees**: for all the transaction fees due to Adyen. This is the sum of Adyen\'s commission and Adyen\'s markup. * **AdyenMarkup**: for the transaction fee due to Adyen under [Interchange++ pricing](https://www.adyen.com/pricing). * **BalanceAccount**: or the sale amount of a transaction. * **Commission**: for your platform\'s commission on a transaction. * **Interchange**: for the interchange fee (fee paid to the issuer) incurred on a transaction. * **PaymentFee**: for all of the transaction fees. * **Remainder**: for the left over amount after currency conversion. * **SchemeFee**: for the scheme fee incurred on a transaction. This is the sum of the interchange fees and the acquiring fees. * **Surcharge**: for the surcharge paid by the customer on a transaction. * **Tip**: for the tip paid by the customer. * **TopUp**: for an incoming transfer to top up your user\'s balance account. * **VAT**: for the Value Added Tax. + * Specifies the nature of the transfer. This parameter helps categorize transfers so you can reconcile transactions at a later time, using the Balance Platform Accounting Report for [marketplaces](https://docs.adyen.com/marketplaces/reports-and-fees/balance-platform-accounting-report/) or [platforms](https://docs.adyen.com/platforms/reports-and-fees/balance-platform-accounting-report/). Possible values: * **AcquiringFees**: for the acquiring fee incurred on a transaction. * **AdyenCommission**: for the transaction fee due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/guides/payments-training-guide/get-the-best-from-your-card-processing). * **AdyenFees**: for all the transaction fees due to Adyen. This is the sum of Adyen\'s commission and Adyen\'s markup. * **AdyenMarkup**: for the transaction fee due to Adyen under [Interchange++ pricing](https://www.adyen.com/pricing). * **BalanceAccount**: or the sale amount of a transaction. * **Commission**: for your platform\'s commission on a transaction. * **DCCPlatformCommission**: for the DCC Commission for the platform on a transaction. * **Interchange**: for the interchange fee (fee paid to the issuer) incurred on a transaction. * **PaymentFee**: for all of the transaction fees. * **Remainder**: for the left over amount after currency conversion. * **SchemeFee**: for the scheme fee incurred on a transaction. This is the sum of the interchange fees and the acquiring fees. * **Surcharge**: for the surcharge paid by the customer on a transaction. * **Tip**: for the tip paid by the customer. * **TopUp**: for an incoming transfer to top up your user\'s balance account. * **VAT**: for the Value Added Tax. */ 'platformPaymentType'?: PlatformPayment.PlatformPaymentTypeEnum; /** @@ -32,7 +32,7 @@ export class PlatformPayment { /** * **platformPayment** */ - 'type'?: PlatformPayment.TypeEnum; + 'type'?: PlatformPayment.TypeEnum = PlatformPayment.TypeEnum.PlatformPayment; static discriminator: string | undefined = undefined; @@ -75,23 +75,24 @@ export class PlatformPayment { export namespace PlatformPayment { export enum PlatformPaymentTypeEnum { - AcquiringFees = 'AcquiringFees', - AdyenCommission = 'AdyenCommission', - AdyenFees = 'AdyenFees', - AdyenMarkup = 'AdyenMarkup', - BalanceAccount = 'BalanceAccount', - Commission = 'Commission', - Default = 'Default', - Interchange = 'Interchange', - PaymentFee = 'PaymentFee', - Remainder = 'Remainder', - SchemeFee = 'SchemeFee', - Surcharge = 'Surcharge', - Tip = 'Tip', - TopUp = 'TopUp', - Vat = 'VAT' + AcquiringFees = 'AcquiringFees', + AdyenCommission = 'AdyenCommission', + AdyenFees = 'AdyenFees', + AdyenMarkup = 'AdyenMarkup', + BalanceAccount = 'BalanceAccount', + Commission = 'Commission', + DccPlatformCommission = 'DCCPlatformCommission', + Default = 'Default', + Interchange = 'Interchange', + PaymentFee = 'PaymentFee', + Remainder = 'Remainder', + SchemeFee = 'SchemeFee', + Surcharge = 'Surcharge', + Tip = 'Tip', + TopUp = 'TopUp', + Vat = 'VAT' } export enum TypeEnum { - PlatformPayment = 'platformPayment' + PlatformPayment = 'platformPayment' } } diff --git a/src/typings/transfers/repayment.ts b/src/typings/transfers/repayment.ts index 17f32ffda..5aa3cdd3b 100644 --- a/src/typings/transfers/repayment.ts +++ b/src/typings/transfers/repayment.ts @@ -15,8 +15,8 @@ export class Repayment { * The repayment that is deducted daily from incoming net volume, in [basis points](https://www.investopedia.com/terms/b/basispoint.asp). */ 'basisPoints': number; - 'term'?: RepaymentTerm | null; - 'threshold'?: ThresholdRepayment | null; + 'term'?: RepaymentTerm; + 'threshold'?: ThresholdRepayment; static discriminator: string | undefined = undefined; @@ -29,12 +29,12 @@ export class Repayment { { "name": "term", "baseName": "term", - "type": "RepaymentTerm | null" + "type": "RepaymentTerm" }, { "name": "threshold", "baseName": "threshold", - "type": "ThresholdRepayment | null" + "type": "ThresholdRepayment" } ]; static getAttributeTypeMap() { diff --git a/src/typings/transfers/returnTransferResponse.ts b/src/typings/transfers/returnTransferResponse.ts index 53949653a..dcfda3170 100644 --- a/src/typings/transfers/returnTransferResponse.ts +++ b/src/typings/transfers/returnTransferResponse.ts @@ -57,7 +57,7 @@ export class ReturnTransferResponse { export namespace ReturnTransferResponse { export enum StatusEnum { - Authorised = 'Authorised', - Declined = 'Declined' + Authorised = 'Authorised', + Declined = 'Declined' } } diff --git a/src/typings/transfers/routingDetails.ts b/src/typings/transfers/routingDetails.ts index 71eb881b9..8711c8605 100644 --- a/src/typings/transfers/routingDetails.ts +++ b/src/typings/transfers/routingDetails.ts @@ -57,11 +57,11 @@ export class RoutingDetails { export namespace RoutingDetails { export enum PriorityEnum { - CrossBorder = 'crossBorder', - Fast = 'fast', - Instant = 'instant', - Internal = 'internal', - Regular = 'regular', - Wire = 'wire' + CrossBorder = 'crossBorder', + Fast = 'fast', + Instant = 'instant', + Internal = 'internal', + Regular = 'regular', + Wire = 'wire' } } diff --git a/src/typings/transfers/sELocalAccountIdentification.ts b/src/typings/transfers/sELocalAccountIdentification.ts index 2af713ce3..67ccf81ae 100644 --- a/src/typings/transfers/sELocalAccountIdentification.ts +++ b/src/typings/transfers/sELocalAccountIdentification.ts @@ -20,7 +20,7 @@ export class SELocalAccountIdentification { /** * **seLocal** */ - 'type': SELocalAccountIdentification.TypeEnum; + 'type': SELocalAccountIdentification.TypeEnum = SELocalAccountIdentification.TypeEnum.SeLocal; static discriminator: string | undefined = undefined; @@ -48,6 +48,6 @@ export class SELocalAccountIdentification { export namespace SELocalAccountIdentification { export enum TypeEnum { - SeLocal = 'seLocal' + SeLocal = 'seLocal' } } diff --git a/src/typings/transfers/sGLocalAccountIdentification.ts b/src/typings/transfers/sGLocalAccountIdentification.ts index c18f742ea..b7a2fa2a5 100644 --- a/src/typings/transfers/sGLocalAccountIdentification.ts +++ b/src/typings/transfers/sGLocalAccountIdentification.ts @@ -20,7 +20,7 @@ export class SGLocalAccountIdentification { /** * **sgLocal** */ - 'type'?: SGLocalAccountIdentification.TypeEnum; + 'type'?: SGLocalAccountIdentification.TypeEnum = SGLocalAccountIdentification.TypeEnum.SgLocal; static discriminator: string | undefined = undefined; @@ -48,6 +48,6 @@ export class SGLocalAccountIdentification { export namespace SGLocalAccountIdentification { export enum TypeEnum { - SgLocal = 'sgLocal' + SgLocal = 'sgLocal' } } diff --git a/src/typings/transfers/transaction.ts b/src/typings/transfers/transaction.ts index 9eba58bb9..a1036ab1f 100644 --- a/src/typings/transfers/transaction.ts +++ b/src/typings/transfers/transaction.ts @@ -36,7 +36,7 @@ export class Transaction { * The unique identifier of the transaction. */ 'id': string; - 'paymentInstrument'?: PaymentInstrument | null; + 'paymentInstrument'?: PaymentInstrument; /** * The reference sent to or received from the counterparty. * For outgoing funds, this is the [`referenceForBeneficiary`](https://docs.adyen.com/api-explorer/#/transfers/latest/post/transfers__resParam_referenceForBeneficiary) from the [`/transfers`](https://docs.adyen.com/api-explorer/#/transfers/latest/post/transfers__reqParam_referenceForBeneficiary) request. * For incoming funds, this is the reference from the sender. */ @@ -45,7 +45,7 @@ export class Transaction { * The status of the transaction. Possible values: * **pending**: The transaction is still pending. * **booked**: The transaction has been booked to the balance account. */ 'status': Transaction.StatusEnum; - 'transfer'?: TransferView | null; + 'transfer'?: TransferView; /** * The date the transfer amount becomes available in the balance account. */ @@ -97,7 +97,7 @@ export class Transaction { { "name": "paymentInstrument", "baseName": "paymentInstrument", - "type": "PaymentInstrument | null" + "type": "PaymentInstrument" }, { "name": "referenceForBeneficiary", @@ -112,7 +112,7 @@ export class Transaction { { "name": "transfer", "baseName": "transfer", - "type": "TransferView | null" + "type": "TransferView" }, { "name": "valueDate", @@ -127,7 +127,7 @@ export class Transaction { export namespace Transaction { export enum StatusEnum { - Booked = 'booked', - Pending = 'pending' + Booked = 'booked', + Pending = 'pending' } } diff --git a/src/typings/transfers/transactionEventViolation.ts b/src/typings/transfers/transactionEventViolation.ts index 4d65525bb..318ffc6ce 100644 --- a/src/typings/transfers/transactionEventViolation.ts +++ b/src/typings/transfers/transactionEventViolation.ts @@ -15,8 +15,8 @@ export class TransactionEventViolation { * An explanation about why the transaction rule failed. */ 'reason'?: string; - 'transactionRule'?: TransactionRuleReference | null; - 'transactionRuleSource'?: TransactionRuleSource | null; + 'transactionRule'?: TransactionRuleReference; + 'transactionRuleSource'?: TransactionRuleSource; static discriminator: string | undefined = undefined; @@ -29,12 +29,12 @@ export class TransactionEventViolation { { "name": "transactionRule", "baseName": "transactionRule", - "type": "TransactionRuleReference | null" + "type": "TransactionRuleReference" }, { "name": "transactionRuleSource", "baseName": "transactionRuleSource", - "type": "TransactionRuleSource | null" + "type": "TransactionRuleSource" } ]; static getAttributeTypeMap() { diff --git a/src/typings/transfers/transactionSearchResponse.ts b/src/typings/transfers/transactionSearchResponse.ts index 920b3e19b..f7be8bde3 100644 --- a/src/typings/transfers/transactionSearchResponse.ts +++ b/src/typings/transfers/transactionSearchResponse.ts @@ -11,7 +11,7 @@ import { Links } from './links'; import { Transaction } from './transaction'; export class TransactionSearchResponse { - '_links'?: Links | null; + '_links'?: Links; /** * Contains the transactions that match the query parameters. */ @@ -23,7 +23,7 @@ export class TransactionSearchResponse { { "name": "_links", "baseName": "_links", - "type": "Links | null" + "type": "Links" }, { "name": "data", diff --git a/src/typings/transfers/transfer.ts b/src/typings/transfers/transfer.ts index c50ff60fb..ae644c7db 100644 --- a/src/typings/transfers/transfer.ts +++ b/src/typings/transfers/transfer.ts @@ -8,28 +8,22 @@ */ import { Amount } from './amount'; -import { BankCategoryData } from './bankCategoryData'; import { CounterpartyV3 } from './counterpartyV3'; import { DirectDebitInformation } from './directDebitInformation'; -import { InternalCategoryData } from './internalCategoryData'; -import { IssuedCard } from './issuedCard'; import { PaymentInstrument } from './paymentInstrument'; -import { PlatformPayment } from './platformPayment'; import { ResourceReference } from './resourceReference'; +import { TransferCategoryData } from './transferCategoryData'; import { TransferReview } from './transferReview'; export class Transfer { - 'accountHolder'?: ResourceReference | null; + 'accountHolder'?: ResourceReference; 'amount': Amount; - 'balanceAccount'?: ResourceReference | null; + 'balanceAccount'?: ResourceReference; /** * The category of the transfer. Possible values: - **bank**: a transfer involving a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. - **card**: a transfer involving a third-party card. - **internal**: a transfer between [balance accounts](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. - **issuedCard**: a transfer initiated by a Adyen-issued card. - **platformPayment**: funds movements related to payments that are acquired for your users. - **topUp**: an incoming transfer initiated by your user to top up their balance account. */ 'category': Transfer.CategoryEnum; - /** - * The relevant data according to the transfer category. - */ - 'categoryData'?: BankCategoryData | InternalCategoryData | IssuedCard | PlatformPayment | null; + 'categoryData'?: TransferCategoryData; 'counterparty': CounterpartyV3; /** * The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**. @@ -39,7 +33,7 @@ export class Transfer { * Your description for the transfer. It is used by most banks as the transfer description. We recommend sending a maximum of 140 characters, otherwise the description may be truncated. Supported characters: **[a-z] [A-Z] [0-9] / - ?** **: ( ) . , \' + Space** Supported characters for **regular** and **fast** transfers to a US counterparty: **[a-z] [A-Z] [0-9] & $ % # @** **~ = + - _ \' \" ! ?** */ 'description'?: string; - 'directDebitInformation'?: DirectDebitInformation | null; + 'directDebitInformation'?: DirectDebitInformation; /** * The direction of the transfer. Possible values: **incoming**, **outgoing**. */ @@ -48,7 +42,7 @@ export class Transfer { * The ID of the resource. */ 'id'?: string; - 'paymentInstrument'?: PaymentInstrument | null; + 'paymentInstrument'?: PaymentInstrument; /** * Additional information about the status of the transfer. */ @@ -61,7 +55,7 @@ export class Transfer { * A reference that is sent to the recipient. This reference is also sent in all webhooks related to the transfer, so you can use it to track statuses for both the source and recipient of funds. Supported characters: **a-z**, **A-Z**, **0-9**.The maximum length depends on the `category`. - **internal**: 80 characters - **bank**: 35 characters when transferring to an IBAN, 15 characters for others. */ 'referenceForBeneficiary'?: string; - 'review'?: TransferReview | null; + 'review'?: TransferReview; /** * The result of the transfer. For example, **authorised**, **refused**, or **error**. */ @@ -77,7 +71,7 @@ export class Transfer { { "name": "accountHolder", "baseName": "accountHolder", - "type": "ResourceReference | null" + "type": "ResourceReference" }, { "name": "amount", @@ -87,7 +81,7 @@ export class Transfer { { "name": "balanceAccount", "baseName": "balanceAccount", - "type": "ResourceReference | null" + "type": "ResourceReference" }, { "name": "category", @@ -97,7 +91,7 @@ export class Transfer { { "name": "categoryData", "baseName": "categoryData", - "type": "BankCategoryData | InternalCategoryData | IssuedCard | PlatformPayment | null" + "type": "TransferCategoryData" }, { "name": "counterparty", @@ -117,7 +111,7 @@ export class Transfer { { "name": "directDebitInformation", "baseName": "directDebitInformation", - "type": "DirectDebitInformation | null" + "type": "DirectDebitInformation" }, { "name": "direction", @@ -132,7 +126,7 @@ export class Transfer { { "name": "paymentInstrument", "baseName": "paymentInstrument", - "type": "PaymentInstrument | null" + "type": "PaymentInstrument" }, { "name": "reason", @@ -152,7 +146,7 @@ export class Transfer { { "name": "review", "baseName": "review", - "type": "TransferReview | null" + "type": "TransferReview" }, { "name": "status", @@ -172,149 +166,149 @@ export class Transfer { export namespace Transfer { export enum CategoryEnum { - Bank = 'bank', - Card = 'card', - Internal = 'internal', - IssuedCard = 'issuedCard', - PlatformPayment = 'platformPayment', - TopUp = 'topUp' + Bank = 'bank', + Card = 'card', + Internal = 'internal', + IssuedCard = 'issuedCard', + PlatformPayment = 'platformPayment', + TopUp = 'topUp' } export enum DirectionEnum { - Incoming = 'incoming', - Outgoing = 'outgoing' + Incoming = 'incoming', + Outgoing = 'outgoing' } export enum ReasonEnum { - AccountHierarchyNotActive = 'accountHierarchyNotActive', - AmountLimitExceeded = 'amountLimitExceeded', - Approved = 'approved', - BalanceAccountTemporarilyBlockedByTransactionRule = 'balanceAccountTemporarilyBlockedByTransactionRule', - CounterpartyAccountBlocked = 'counterpartyAccountBlocked', - CounterpartyAccountClosed = 'counterpartyAccountClosed', - CounterpartyAccountNotFound = 'counterpartyAccountNotFound', - CounterpartyAddressRequired = 'counterpartyAddressRequired', - CounterpartyBankTimedOut = 'counterpartyBankTimedOut', - CounterpartyBankUnavailable = 'counterpartyBankUnavailable', - Declined = 'declined', - DeclinedByTransactionRule = 'declinedByTransactionRule', - DirectDebitNotSupported = 'directDebitNotSupported', - Error = 'error', - NotEnoughBalance = 'notEnoughBalance', - PendingApproval = 'pendingApproval', - PendingExecution = 'pendingExecution', - RefusedByCounterpartyBank = 'refusedByCounterpartyBank', - RefusedByCustomer = 'refusedByCustomer', - RouteNotFound = 'routeNotFound', - ScaFailed = 'scaFailed', - TransferInstrumentDoesNotExist = 'transferInstrumentDoesNotExist', - Unknown = 'unknown' + AccountHierarchyNotActive = 'accountHierarchyNotActive', + AmountLimitExceeded = 'amountLimitExceeded', + Approved = 'approved', + BalanceAccountTemporarilyBlockedByTransactionRule = 'balanceAccountTemporarilyBlockedByTransactionRule', + CounterpartyAccountBlocked = 'counterpartyAccountBlocked', + CounterpartyAccountClosed = 'counterpartyAccountClosed', + CounterpartyAccountNotFound = 'counterpartyAccountNotFound', + CounterpartyAddressRequired = 'counterpartyAddressRequired', + CounterpartyBankTimedOut = 'counterpartyBankTimedOut', + CounterpartyBankUnavailable = 'counterpartyBankUnavailable', + Declined = 'declined', + DeclinedByTransactionRule = 'declinedByTransactionRule', + DirectDebitNotSupported = 'directDebitNotSupported', + Error = 'error', + NotEnoughBalance = 'notEnoughBalance', + PendingApproval = 'pendingApproval', + PendingExecution = 'pendingExecution', + RefusedByCounterpartyBank = 'refusedByCounterpartyBank', + RefusedByCustomer = 'refusedByCustomer', + RouteNotFound = 'routeNotFound', + ScaFailed = 'scaFailed', + TransferInstrumentDoesNotExist = 'transferInstrumentDoesNotExist', + Unknown = 'unknown' } export enum StatusEnum { - ApprovalPending = 'approvalPending', - AtmWithdrawal = 'atmWithdrawal', - AtmWithdrawalReversalPending = 'atmWithdrawalReversalPending', - AtmWithdrawalReversed = 'atmWithdrawalReversed', - AuthAdjustmentAuthorised = 'authAdjustmentAuthorised', - AuthAdjustmentError = 'authAdjustmentError', - AuthAdjustmentRefused = 'authAdjustmentRefused', - Authorised = 'authorised', - BankTransfer = 'bankTransfer', - BankTransferPending = 'bankTransferPending', - Booked = 'booked', - BookingPending = 'bookingPending', - Cancelled = 'cancelled', - CapturePending = 'capturePending', - CaptureReversalPending = 'captureReversalPending', - CaptureReversed = 'captureReversed', - Captured = 'captured', - CapturedExternally = 'capturedExternally', - Chargeback = 'chargeback', - ChargebackExternally = 'chargebackExternally', - ChargebackPending = 'chargebackPending', - ChargebackReversalPending = 'chargebackReversalPending', - ChargebackReversed = 'chargebackReversed', - Credited = 'credited', - DepositCorrection = 'depositCorrection', - DepositCorrectionPending = 'depositCorrectionPending', - Dispute = 'dispute', - DisputeClosed = 'disputeClosed', - DisputeExpired = 'disputeExpired', - DisputeNeedsReview = 'disputeNeedsReview', - Error = 'error', - Expired = 'expired', - Failed = 'failed', - Fee = 'fee', - FeePending = 'feePending', - InternalTransfer = 'internalTransfer', - InternalTransferPending = 'internalTransferPending', - InvoiceDeduction = 'invoiceDeduction', - InvoiceDeductionPending = 'invoiceDeductionPending', - ManualCorrectionPending = 'manualCorrectionPending', - ManuallyCorrected = 'manuallyCorrected', - MatchedStatement = 'matchedStatement', - MatchedStatementPending = 'matchedStatementPending', - MerchantPayin = 'merchantPayin', - MerchantPayinPending = 'merchantPayinPending', - MerchantPayinReversed = 'merchantPayinReversed', - MerchantPayinReversedPending = 'merchantPayinReversedPending', - MiscCost = 'miscCost', - MiscCostPending = 'miscCostPending', - PaymentCost = 'paymentCost', - PaymentCostPending = 'paymentCostPending', - PendingApproval = 'pendingApproval', - PendingExecution = 'pendingExecution', - Received = 'received', - RefundPending = 'refundPending', - RefundReversalPending = 'refundReversalPending', - RefundReversed = 'refundReversed', - Refunded = 'refunded', - RefundedExternally = 'refundedExternally', - Refused = 'refused', - Rejected = 'rejected', - ReserveAdjustment = 'reserveAdjustment', - ReserveAdjustmentPending = 'reserveAdjustmentPending', - Returned = 'returned', - SecondChargeback = 'secondChargeback', - SecondChargebackPending = 'secondChargebackPending', - Undefined = 'undefined' + ApprovalPending = 'approvalPending', + AtmWithdrawal = 'atmWithdrawal', + AtmWithdrawalReversalPending = 'atmWithdrawalReversalPending', + AtmWithdrawalReversed = 'atmWithdrawalReversed', + AuthAdjustmentAuthorised = 'authAdjustmentAuthorised', + AuthAdjustmentError = 'authAdjustmentError', + AuthAdjustmentRefused = 'authAdjustmentRefused', + Authorised = 'authorised', + BankTransfer = 'bankTransfer', + BankTransferPending = 'bankTransferPending', + Booked = 'booked', + BookingPending = 'bookingPending', + Cancelled = 'cancelled', + CapturePending = 'capturePending', + CaptureReversalPending = 'captureReversalPending', + CaptureReversed = 'captureReversed', + Captured = 'captured', + CapturedExternally = 'capturedExternally', + Chargeback = 'chargeback', + ChargebackExternally = 'chargebackExternally', + ChargebackPending = 'chargebackPending', + ChargebackReversalPending = 'chargebackReversalPending', + ChargebackReversed = 'chargebackReversed', + Credited = 'credited', + DepositCorrection = 'depositCorrection', + DepositCorrectionPending = 'depositCorrectionPending', + Dispute = 'dispute', + DisputeClosed = 'disputeClosed', + DisputeExpired = 'disputeExpired', + DisputeNeedsReview = 'disputeNeedsReview', + Error = 'error', + Expired = 'expired', + Failed = 'failed', + Fee = 'fee', + FeePending = 'feePending', + InternalTransfer = 'internalTransfer', + InternalTransferPending = 'internalTransferPending', + InvoiceDeduction = 'invoiceDeduction', + InvoiceDeductionPending = 'invoiceDeductionPending', + ManualCorrectionPending = 'manualCorrectionPending', + ManuallyCorrected = 'manuallyCorrected', + MatchedStatement = 'matchedStatement', + MatchedStatementPending = 'matchedStatementPending', + MerchantPayin = 'merchantPayin', + MerchantPayinPending = 'merchantPayinPending', + MerchantPayinReversed = 'merchantPayinReversed', + MerchantPayinReversedPending = 'merchantPayinReversedPending', + MiscCost = 'miscCost', + MiscCostPending = 'miscCostPending', + PaymentCost = 'paymentCost', + PaymentCostPending = 'paymentCostPending', + PendingApproval = 'pendingApproval', + PendingExecution = 'pendingExecution', + Received = 'received', + RefundPending = 'refundPending', + RefundReversalPending = 'refundReversalPending', + RefundReversed = 'refundReversed', + Refunded = 'refunded', + RefundedExternally = 'refundedExternally', + Refused = 'refused', + Rejected = 'rejected', + ReserveAdjustment = 'reserveAdjustment', + ReserveAdjustmentPending = 'reserveAdjustmentPending', + Returned = 'returned', + SecondChargeback = 'secondChargeback', + SecondChargebackPending = 'secondChargebackPending', + Undefined = 'undefined' } export enum TypeEnum { - Payment = 'payment', - Capture = 'capture', - CaptureReversal = 'captureReversal', - Refund = 'refund', - RefundReversal = 'refundReversal', - Chargeback = 'chargeback', - ChargebackCorrection = 'chargebackCorrection', - ChargebackReversal = 'chargebackReversal', - ChargebackReversalCorrection = 'chargebackReversalCorrection', - SecondChargeback = 'secondChargeback', - SecondChargebackCorrection = 'secondChargebackCorrection', - AtmWithdrawal = 'atmWithdrawal', - AtmWithdrawalReversal = 'atmWithdrawalReversal', - InternalTransfer = 'internalTransfer', - InternalDirectDebit = 'internalDirectDebit', - ManualCorrection = 'manualCorrection', - InvoiceDeduction = 'invoiceDeduction', - DepositCorrection = 'depositCorrection', - ReserveAdjustment = 'reserveAdjustment', - BankTransfer = 'bankTransfer', - BankDirectDebit = 'bankDirectDebit', - CardTransfer = 'cardTransfer', - MiscCost = 'miscCost', - PaymentCost = 'paymentCost', - Fee = 'fee', - Leftover = 'leftover', - Grant = 'grant', - CapitalFundsCollection = 'capitalFundsCollection', - CashOutInstruction = 'cashOutInstruction', - CashoutFee = 'cashoutFee', - CashoutRepayment = 'cashoutRepayment', - CashoutFunding = 'cashoutFunding', - Repayment = 'repayment', - Installment = 'installment', - InstallmentReversal = 'installmentReversal', - BalanceAdjustment = 'balanceAdjustment', - BalanceRollover = 'balanceRollover', - BalanceMigration = 'balanceMigration' + Payment = 'payment', + Capture = 'capture', + CaptureReversal = 'captureReversal', + Refund = 'refund', + RefundReversal = 'refundReversal', + Chargeback = 'chargeback', + ChargebackCorrection = 'chargebackCorrection', + ChargebackReversal = 'chargebackReversal', + ChargebackReversalCorrection = 'chargebackReversalCorrection', + SecondChargeback = 'secondChargeback', + SecondChargebackCorrection = 'secondChargebackCorrection', + AtmWithdrawal = 'atmWithdrawal', + AtmWithdrawalReversal = 'atmWithdrawalReversal', + InternalTransfer = 'internalTransfer', + InternalDirectDebit = 'internalDirectDebit', + ManualCorrection = 'manualCorrection', + InvoiceDeduction = 'invoiceDeduction', + DepositCorrection = 'depositCorrection', + ReserveAdjustment = 'reserveAdjustment', + BankTransfer = 'bankTransfer', + BankDirectDebit = 'bankDirectDebit', + CardTransfer = 'cardTransfer', + MiscCost = 'miscCost', + PaymentCost = 'paymentCost', + Fee = 'fee', + Leftover = 'leftover', + Grant = 'grant', + CapitalFundsCollection = 'capitalFundsCollection', + CashOutInstruction = 'cashOutInstruction', + CashoutFee = 'cashoutFee', + CashoutRepayment = 'cashoutRepayment', + CashoutFunding = 'cashoutFunding', + Repayment = 'repayment', + Installment = 'installment', + InstallmentReversal = 'installmentReversal', + BalanceAdjustment = 'balanceAdjustment', + BalanceRollover = 'balanceRollover', + BalanceMigration = 'balanceMigration' } } diff --git a/src/typings/transfers/transferCategoryData.ts b/src/typings/transfers/transferCategoryData.ts new file mode 100644 index 000000000..cf9fdd7fb --- /dev/null +++ b/src/typings/transfers/transferCategoryData.ts @@ -0,0 +1,206 @@ +/* + * The version of the OpenAPI document: v4 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { BankCategoryData } from './bankCategoryData'; +import { InternalCategoryData } from './internalCategoryData'; +import { IssuedCard } from './issuedCard'; +import { PlatformPayment } from './platformPayment'; +import { RelayedAuthorisationData } from './relayedAuthorisationData'; +import { TransferNotificationValidationFact } from './transferNotificationValidationFact'; + +/** +* The relevant data according to the transfer category. +*/ +export class TransferCategoryData { + /** + * The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**. Possible values: * **regular**: for normal, low-value transactions. * **fast**: 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). + */ + 'priority'?: TransferCategoryData.PriorityEnum; + /** + * **bank** + */ + 'type'?: TransferCategoryData.TypeEnum = TransferCategoryData.TypeEnum.Bank; + /** + * The capture\'s merchant reference included in the transfer. + */ + 'modificationMerchantReference'?: string; + /** + * The capture reference included in the transfer. + */ + 'modificationPspReference'?: string; + /** + * The authorisation type. For example, **defaultAuthorisation**, **preAuthorisation**, **finalAuthorisation** + */ + 'authorisationType'?: string; + /** + * Indicates the method used for entering the PAN to initiate a transaction. Possible values: **manual**, **chip**, **magstripe**, **contactless**, **cof**, **ecommerce**, **token**. + */ + 'panEntryMode'?: TransferCategoryData.PanEntryModeEnum; + /** + * Contains information about how the payment was processed. For example, **ecommerce** for online or **pos** for in-person payments. + */ + 'processingType'?: TransferCategoryData.ProcessingTypeEnum; + 'relayedAuthorisationData'?: RelayedAuthorisationData; + /** + * The identifier of the original payment. This ID is provided by the scheme and can be alphanumeric or numeric, depending on the scheme. The `schemeTraceID` should refer to an original `schemeUniqueTransactionID` provided in an earlier payment (not necessarily processed by Adyen). A `schemeTraceId` is typically available for authorization adjustments or recurring payments. + */ + 'schemeTraceId'?: string; + /** + * The unique identifier created by the scheme. This ID can be alphanumeric or numeric depending on the scheme. + */ + 'schemeUniqueTransactionId'?: string; + /** + * The evaluation of the validation facts. See [validation checks](https://docs.adyen.com/issuing/validation-checks) for more information. + */ + 'validationFacts'?: Array; + /** + * The payment\'s merchant reference included in the transfer. + */ + 'paymentMerchantReference'?: string; + /** + * Specifies the nature of the transfer. This parameter helps categorize transfers so you can reconcile transactions at a later time, using the Balance Platform Accounting Report for [marketplaces](https://docs.adyen.com/marketplaces/reports-and-fees/balance-platform-accounting-report/) or [platforms](https://docs.adyen.com/platforms/reports-and-fees/balance-platform-accounting-report/). Possible values: * **AcquiringFees**: for the acquiring fee incurred on a transaction. * **AdyenCommission**: for the transaction fee due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/guides/payments-training-guide/get-the-best-from-your-card-processing). * **AdyenFees**: for all the transaction fees due to Adyen. This is the sum of Adyen\'s commission and Adyen\'s markup. * **AdyenMarkup**: for the transaction fee due to Adyen under [Interchange++ pricing](https://www.adyen.com/pricing). * **BalanceAccount**: or the sale amount of a transaction. * **Commission**: for your platform\'s commission on a transaction. * **DCCPlatformCommission**: for the DCC Commission for the platform on a transaction. * **Interchange**: for the interchange fee (fee paid to the issuer) incurred on a transaction. * **PaymentFee**: for all of the transaction fees. * **Remainder**: for the left over amount after currency conversion. * **SchemeFee**: for the scheme fee incurred on a transaction. This is the sum of the interchange fees and the acquiring fees. * **Surcharge**: for the surcharge paid by the customer on a transaction. * **Tip**: for the tip paid by the customer. * **TopUp**: for an incoming transfer to top up your user\'s balance account. * **VAT**: for the Value Added Tax. + */ + 'platformPaymentType'?: TransferCategoryData.PlatformPaymentTypeEnum; + /** + * The payment reference included in the transfer. + */ + 'pspPaymentReference'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "priority", + "baseName": "priority", + "type": "TransferCategoryData.PriorityEnum" + }, + { + "name": "type", + "baseName": "type", + "type": "TransferCategoryData.TypeEnum" + }, + { + "name": "modificationMerchantReference", + "baseName": "modificationMerchantReference", + "type": "string" + }, + { + "name": "modificationPspReference", + "baseName": "modificationPspReference", + "type": "string" + }, + { + "name": "authorisationType", + "baseName": "authorisationType", + "type": "string" + }, + { + "name": "panEntryMode", + "baseName": "panEntryMode", + "type": "TransferCategoryData.PanEntryModeEnum" + }, + { + "name": "processingType", + "baseName": "processingType", + "type": "TransferCategoryData.ProcessingTypeEnum" + }, + { + "name": "relayedAuthorisationData", + "baseName": "relayedAuthorisationData", + "type": "RelayedAuthorisationData" + }, + { + "name": "schemeTraceId", + "baseName": "schemeTraceId", + "type": "string" + }, + { + "name": "schemeUniqueTransactionId", + "baseName": "schemeUniqueTransactionId", + "type": "string" + }, + { + "name": "validationFacts", + "baseName": "validationFacts", + "type": "Array" + }, + { + "name": "paymentMerchantReference", + "baseName": "paymentMerchantReference", + "type": "string" + }, + { + "name": "platformPaymentType", + "baseName": "platformPaymentType", + "type": "TransferCategoryData.PlatformPaymentTypeEnum" + }, + { + "name": "pspPaymentReference", + "baseName": "pspPaymentReference", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return TransferCategoryData.attributeTypeMap; + } +} + +export namespace TransferCategoryData { + export enum PriorityEnum { + CrossBorder = 'crossBorder', + Fast = 'fast', + Instant = 'instant', + Internal = 'internal', + Regular = 'regular', + Wire = 'wire' + } + export enum TypeEnum { + Bank = 'bank', + Internal = 'internal', + IssuedCard = 'issuedCard', + PlatformPayment = 'platformPayment' + } + export enum PanEntryModeEnum { + Chip = 'chip', + Cof = 'cof', + Contactless = 'contactless', + Ecommerce = 'ecommerce', + Magstripe = 'magstripe', + Manual = 'manual', + Token = 'token' + } + export enum ProcessingTypeEnum { + AtmWithdraw = 'atmWithdraw', + BalanceInquiry = 'balanceInquiry', + Ecommerce = 'ecommerce', + Moto = 'moto', + Pos = 'pos', + PurchaseWithCashback = 'purchaseWithCashback', + Recurring = 'recurring', + Token = 'token' + } + export enum PlatformPaymentTypeEnum { + AcquiringFees = 'AcquiringFees', + AdyenCommission = 'AdyenCommission', + AdyenFees = 'AdyenFees', + AdyenMarkup = 'AdyenMarkup', + BalanceAccount = 'BalanceAccount', + Commission = 'Commission', + DccPlatformCommission = 'DCCPlatformCommission', + Default = 'Default', + Interchange = 'Interchange', + PaymentFee = 'PaymentFee', + Remainder = 'Remainder', + SchemeFee = 'SchemeFee', + Surcharge = 'Surcharge', + Tip = 'Tip', + TopUp = 'TopUp', + Vat = 'VAT' + } +} diff --git a/src/typings/transfers/transferData.ts b/src/typings/transfers/transferData.ts index 733570f5a..40c5bb0f3 100644 --- a/src/typings/transfers/transferData.ts +++ b/src/typings/transfers/transferData.ts @@ -9,25 +9,20 @@ import { Amount } from './amount'; import { BalanceMutation } from './balanceMutation'; -import { BankCategoryData } from './bankCategoryData'; -import { ConfirmationTrackingData } from './confirmationTrackingData'; import { DirectDebitInformation } from './directDebitInformation'; -import { EstimationTrackingData } from './estimationTrackingData'; -import { InternalCategoryData } from './internalCategoryData'; -import { InternalReviewTrackingData } from './internalReviewTrackingData'; -import { IssuedCard } from './issuedCard'; import { PaymentInstrument } from './paymentInstrument'; -import { PlatformPayment } from './platformPayment'; import { ResourceReference } from './resourceReference'; import { TransactionRulesResult } from './transactionRulesResult'; +import { TransferCategoryData } from './transferCategoryData'; +import { TransferDataTracking } from './transferDataTracking'; import { TransferEvent } from './transferEvent'; import { TransferNotificationCounterParty } from './transferNotificationCounterParty'; import { TransferReview } from './transferReview'; export class TransferData { - 'accountHolder'?: ResourceReference | null; + 'accountHolder'?: ResourceReference; 'amount': Amount; - 'balanceAccount'?: ResourceReference | null; + 'balanceAccount'?: ResourceReference; /** * The unique identifier of the balance platform. */ @@ -40,11 +35,8 @@ export class TransferData { * The category of the transfer. Possible values: - **bank**: a transfer involving a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. - **card**: a transfer involving a third-party card. - **internal**: a transfer between [balance accounts](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. - **issuedCard**: a transfer initiated by a Adyen-issued card. - **platformPayment**: funds movements related to payments that are acquired for your users. - **topUp**: an incoming transfer initiated by your user to top up their balance account. */ 'category': TransferData.CategoryEnum; - /** - * The relevant data according to the transfer category. - */ - 'categoryData'?: BankCategoryData | InternalCategoryData | IssuedCard | PlatformPayment | null; - 'counterparty'?: TransferNotificationCounterParty | null; + 'categoryData'?: TransferCategoryData; + 'counterparty'?: TransferNotificationCounterParty; /** * The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**. */ @@ -53,7 +45,7 @@ export class TransferData { * Your description for the transfer. It is used by most banks as the transfer description. We recommend sending a maximum of 140 characters, otherwise the description may be truncated. Supported characters: **[a-z] [A-Z] [0-9] / - ?** **: ( ) . , \' + Space** Supported characters for **regular** and **fast** transfers to a US counterparty: **[a-z] [A-Z] [0-9] & $ % # @** **~ = + - _ \' \" ! ?** */ 'description'?: string; - 'directDebitInformation'?: DirectDebitInformation | null; + 'directDebitInformation'?: DirectDebitInformation; /** * The direction of the transfer. Possible values: **incoming**, **outgoing**. */ @@ -70,7 +62,7 @@ export class TransferData { * The ID of the resource. */ 'id'?: string; - 'paymentInstrument'?: PaymentInstrument | null; + 'paymentInstrument'?: PaymentInstrument; /** * Additional information about the status of the transfer. */ @@ -83,7 +75,7 @@ export class TransferData { * A reference that is sent to the recipient. This reference is also sent in all webhooks related to the transfer, so you can use it to track statuses for both the source and recipient of funds. Supported characters: **a-z**, **A-Z**, **0-9**.The maximum length depends on the `category`. - **internal**: 80 characters - **bank**: 35 characters when transferring to an IBAN, 15 characters for others. */ 'referenceForBeneficiary'?: string; - 'review'?: TransferReview | null; + 'review'?: TransferReview; /** * The sequence number of the transfer webhook. The numbers start from 1 and increase with each new webhook for a specific transfer. The sequence number can help you restore the correct sequence of events even if they arrive out of order. */ @@ -92,11 +84,8 @@ export class TransferData { * The result of the transfer. For example, **authorised**, **refused**, or **error**. */ 'status': TransferData.StatusEnum; - /** - * The latest tracking information of the transfer. - */ - 'tracking'?: ConfirmationTrackingData | EstimationTrackingData | InternalReviewTrackingData | null; - 'transactionRulesResult'?: TransactionRulesResult | null; + 'tracking'?: TransferDataTracking; + 'transactionRulesResult'?: TransactionRulesResult; /** * The type of transfer or transaction. For example, **refund**, **payment**, **internalTransfer**, **bankTransfer**. */ @@ -108,7 +97,7 @@ export class TransferData { { "name": "accountHolder", "baseName": "accountHolder", - "type": "ResourceReference | null" + "type": "ResourceReference" }, { "name": "amount", @@ -118,7 +107,7 @@ export class TransferData { { "name": "balanceAccount", "baseName": "balanceAccount", - "type": "ResourceReference | null" + "type": "ResourceReference" }, { "name": "balancePlatform", @@ -138,12 +127,12 @@ export class TransferData { { "name": "categoryData", "baseName": "categoryData", - "type": "BankCategoryData | InternalCategoryData | IssuedCard | PlatformPayment | null" + "type": "TransferCategoryData" }, { "name": "counterparty", "baseName": "counterparty", - "type": "TransferNotificationCounterParty | null" + "type": "TransferNotificationCounterParty" }, { "name": "creationDate", @@ -158,7 +147,7 @@ export class TransferData { { "name": "directDebitInformation", "baseName": "directDebitInformation", - "type": "DirectDebitInformation | null" + "type": "DirectDebitInformation" }, { "name": "direction", @@ -183,7 +172,7 @@ export class TransferData { { "name": "paymentInstrument", "baseName": "paymentInstrument", - "type": "PaymentInstrument | null" + "type": "PaymentInstrument" }, { "name": "reason", @@ -203,7 +192,7 @@ export class TransferData { { "name": "review", "baseName": "review", - "type": "TransferReview | null" + "type": "TransferReview" }, { "name": "sequenceNumber", @@ -218,12 +207,12 @@ export class TransferData { { "name": "tracking", "baseName": "tracking", - "type": "ConfirmationTrackingData | EstimationTrackingData | InternalReviewTrackingData | null" + "type": "TransferDataTracking" }, { "name": "transactionRulesResult", "baseName": "transactionRulesResult", - "type": "TransactionRulesResult | null" + "type": "TransactionRulesResult" }, { "name": "type", @@ -238,149 +227,149 @@ export class TransferData { export namespace TransferData { export enum CategoryEnum { - Bank = 'bank', - Card = 'card', - Internal = 'internal', - IssuedCard = 'issuedCard', - PlatformPayment = 'platformPayment', - TopUp = 'topUp' + Bank = 'bank', + Card = 'card', + Internal = 'internal', + IssuedCard = 'issuedCard', + PlatformPayment = 'platformPayment', + TopUp = 'topUp' } export enum DirectionEnum { - Incoming = 'incoming', - Outgoing = 'outgoing' + Incoming = 'incoming', + Outgoing = 'outgoing' } export enum ReasonEnum { - AccountHierarchyNotActive = 'accountHierarchyNotActive', - AmountLimitExceeded = 'amountLimitExceeded', - Approved = 'approved', - BalanceAccountTemporarilyBlockedByTransactionRule = 'balanceAccountTemporarilyBlockedByTransactionRule', - CounterpartyAccountBlocked = 'counterpartyAccountBlocked', - CounterpartyAccountClosed = 'counterpartyAccountClosed', - CounterpartyAccountNotFound = 'counterpartyAccountNotFound', - CounterpartyAddressRequired = 'counterpartyAddressRequired', - CounterpartyBankTimedOut = 'counterpartyBankTimedOut', - CounterpartyBankUnavailable = 'counterpartyBankUnavailable', - Declined = 'declined', - DeclinedByTransactionRule = 'declinedByTransactionRule', - DirectDebitNotSupported = 'directDebitNotSupported', - Error = 'error', - NotEnoughBalance = 'notEnoughBalance', - PendingApproval = 'pendingApproval', - PendingExecution = 'pendingExecution', - RefusedByCounterpartyBank = 'refusedByCounterpartyBank', - RefusedByCustomer = 'refusedByCustomer', - RouteNotFound = 'routeNotFound', - ScaFailed = 'scaFailed', - TransferInstrumentDoesNotExist = 'transferInstrumentDoesNotExist', - Unknown = 'unknown' + AccountHierarchyNotActive = 'accountHierarchyNotActive', + AmountLimitExceeded = 'amountLimitExceeded', + Approved = 'approved', + BalanceAccountTemporarilyBlockedByTransactionRule = 'balanceAccountTemporarilyBlockedByTransactionRule', + CounterpartyAccountBlocked = 'counterpartyAccountBlocked', + CounterpartyAccountClosed = 'counterpartyAccountClosed', + CounterpartyAccountNotFound = 'counterpartyAccountNotFound', + CounterpartyAddressRequired = 'counterpartyAddressRequired', + CounterpartyBankTimedOut = 'counterpartyBankTimedOut', + CounterpartyBankUnavailable = 'counterpartyBankUnavailable', + Declined = 'declined', + DeclinedByTransactionRule = 'declinedByTransactionRule', + DirectDebitNotSupported = 'directDebitNotSupported', + Error = 'error', + NotEnoughBalance = 'notEnoughBalance', + PendingApproval = 'pendingApproval', + PendingExecution = 'pendingExecution', + RefusedByCounterpartyBank = 'refusedByCounterpartyBank', + RefusedByCustomer = 'refusedByCustomer', + RouteNotFound = 'routeNotFound', + ScaFailed = 'scaFailed', + TransferInstrumentDoesNotExist = 'transferInstrumentDoesNotExist', + Unknown = 'unknown' } export enum StatusEnum { - ApprovalPending = 'approvalPending', - AtmWithdrawal = 'atmWithdrawal', - AtmWithdrawalReversalPending = 'atmWithdrawalReversalPending', - AtmWithdrawalReversed = 'atmWithdrawalReversed', - AuthAdjustmentAuthorised = 'authAdjustmentAuthorised', - AuthAdjustmentError = 'authAdjustmentError', - AuthAdjustmentRefused = 'authAdjustmentRefused', - Authorised = 'authorised', - BankTransfer = 'bankTransfer', - BankTransferPending = 'bankTransferPending', - Booked = 'booked', - BookingPending = 'bookingPending', - Cancelled = 'cancelled', - CapturePending = 'capturePending', - CaptureReversalPending = 'captureReversalPending', - CaptureReversed = 'captureReversed', - Captured = 'captured', - CapturedExternally = 'capturedExternally', - Chargeback = 'chargeback', - ChargebackExternally = 'chargebackExternally', - ChargebackPending = 'chargebackPending', - ChargebackReversalPending = 'chargebackReversalPending', - ChargebackReversed = 'chargebackReversed', - Credited = 'credited', - DepositCorrection = 'depositCorrection', - DepositCorrectionPending = 'depositCorrectionPending', - Dispute = 'dispute', - DisputeClosed = 'disputeClosed', - DisputeExpired = 'disputeExpired', - DisputeNeedsReview = 'disputeNeedsReview', - Error = 'error', - Expired = 'expired', - Failed = 'failed', - Fee = 'fee', - FeePending = 'feePending', - InternalTransfer = 'internalTransfer', - InternalTransferPending = 'internalTransferPending', - InvoiceDeduction = 'invoiceDeduction', - InvoiceDeductionPending = 'invoiceDeductionPending', - ManualCorrectionPending = 'manualCorrectionPending', - ManuallyCorrected = 'manuallyCorrected', - MatchedStatement = 'matchedStatement', - MatchedStatementPending = 'matchedStatementPending', - MerchantPayin = 'merchantPayin', - MerchantPayinPending = 'merchantPayinPending', - MerchantPayinReversed = 'merchantPayinReversed', - MerchantPayinReversedPending = 'merchantPayinReversedPending', - MiscCost = 'miscCost', - MiscCostPending = 'miscCostPending', - PaymentCost = 'paymentCost', - PaymentCostPending = 'paymentCostPending', - PendingApproval = 'pendingApproval', - PendingExecution = 'pendingExecution', - Received = 'received', - RefundPending = 'refundPending', - RefundReversalPending = 'refundReversalPending', - RefundReversed = 'refundReversed', - Refunded = 'refunded', - RefundedExternally = 'refundedExternally', - Refused = 'refused', - Rejected = 'rejected', - ReserveAdjustment = 'reserveAdjustment', - ReserveAdjustmentPending = 'reserveAdjustmentPending', - Returned = 'returned', - SecondChargeback = 'secondChargeback', - SecondChargebackPending = 'secondChargebackPending', - Undefined = 'undefined' + ApprovalPending = 'approvalPending', + AtmWithdrawal = 'atmWithdrawal', + AtmWithdrawalReversalPending = 'atmWithdrawalReversalPending', + AtmWithdrawalReversed = 'atmWithdrawalReversed', + AuthAdjustmentAuthorised = 'authAdjustmentAuthorised', + AuthAdjustmentError = 'authAdjustmentError', + AuthAdjustmentRefused = 'authAdjustmentRefused', + Authorised = 'authorised', + BankTransfer = 'bankTransfer', + BankTransferPending = 'bankTransferPending', + Booked = 'booked', + BookingPending = 'bookingPending', + Cancelled = 'cancelled', + CapturePending = 'capturePending', + CaptureReversalPending = 'captureReversalPending', + CaptureReversed = 'captureReversed', + Captured = 'captured', + CapturedExternally = 'capturedExternally', + Chargeback = 'chargeback', + ChargebackExternally = 'chargebackExternally', + ChargebackPending = 'chargebackPending', + ChargebackReversalPending = 'chargebackReversalPending', + ChargebackReversed = 'chargebackReversed', + Credited = 'credited', + DepositCorrection = 'depositCorrection', + DepositCorrectionPending = 'depositCorrectionPending', + Dispute = 'dispute', + DisputeClosed = 'disputeClosed', + DisputeExpired = 'disputeExpired', + DisputeNeedsReview = 'disputeNeedsReview', + Error = 'error', + Expired = 'expired', + Failed = 'failed', + Fee = 'fee', + FeePending = 'feePending', + InternalTransfer = 'internalTransfer', + InternalTransferPending = 'internalTransferPending', + InvoiceDeduction = 'invoiceDeduction', + InvoiceDeductionPending = 'invoiceDeductionPending', + ManualCorrectionPending = 'manualCorrectionPending', + ManuallyCorrected = 'manuallyCorrected', + MatchedStatement = 'matchedStatement', + MatchedStatementPending = 'matchedStatementPending', + MerchantPayin = 'merchantPayin', + MerchantPayinPending = 'merchantPayinPending', + MerchantPayinReversed = 'merchantPayinReversed', + MerchantPayinReversedPending = 'merchantPayinReversedPending', + MiscCost = 'miscCost', + MiscCostPending = 'miscCostPending', + PaymentCost = 'paymentCost', + PaymentCostPending = 'paymentCostPending', + PendingApproval = 'pendingApproval', + PendingExecution = 'pendingExecution', + Received = 'received', + RefundPending = 'refundPending', + RefundReversalPending = 'refundReversalPending', + RefundReversed = 'refundReversed', + Refunded = 'refunded', + RefundedExternally = 'refundedExternally', + Refused = 'refused', + Rejected = 'rejected', + ReserveAdjustment = 'reserveAdjustment', + ReserveAdjustmentPending = 'reserveAdjustmentPending', + Returned = 'returned', + SecondChargeback = 'secondChargeback', + SecondChargebackPending = 'secondChargebackPending', + Undefined = 'undefined' } export enum TypeEnum { - Payment = 'payment', - Capture = 'capture', - CaptureReversal = 'captureReversal', - Refund = 'refund', - RefundReversal = 'refundReversal', - Chargeback = 'chargeback', - ChargebackCorrection = 'chargebackCorrection', - ChargebackReversal = 'chargebackReversal', - ChargebackReversalCorrection = 'chargebackReversalCorrection', - SecondChargeback = 'secondChargeback', - SecondChargebackCorrection = 'secondChargebackCorrection', - AtmWithdrawal = 'atmWithdrawal', - AtmWithdrawalReversal = 'atmWithdrawalReversal', - InternalTransfer = 'internalTransfer', - InternalDirectDebit = 'internalDirectDebit', - ManualCorrection = 'manualCorrection', - InvoiceDeduction = 'invoiceDeduction', - DepositCorrection = 'depositCorrection', - ReserveAdjustment = 'reserveAdjustment', - BankTransfer = 'bankTransfer', - BankDirectDebit = 'bankDirectDebit', - CardTransfer = 'cardTransfer', - MiscCost = 'miscCost', - PaymentCost = 'paymentCost', - Fee = 'fee', - Leftover = 'leftover', - Grant = 'grant', - CapitalFundsCollection = 'capitalFundsCollection', - CashOutInstruction = 'cashOutInstruction', - CashoutFee = 'cashoutFee', - CashoutRepayment = 'cashoutRepayment', - CashoutFunding = 'cashoutFunding', - Repayment = 'repayment', - Installment = 'installment', - InstallmentReversal = 'installmentReversal', - BalanceAdjustment = 'balanceAdjustment', - BalanceRollover = 'balanceRollover', - BalanceMigration = 'balanceMigration' + Payment = 'payment', + Capture = 'capture', + CaptureReversal = 'captureReversal', + Refund = 'refund', + RefundReversal = 'refundReversal', + Chargeback = 'chargeback', + ChargebackCorrection = 'chargebackCorrection', + ChargebackReversal = 'chargebackReversal', + ChargebackReversalCorrection = 'chargebackReversalCorrection', + SecondChargeback = 'secondChargeback', + SecondChargebackCorrection = 'secondChargebackCorrection', + AtmWithdrawal = 'atmWithdrawal', + AtmWithdrawalReversal = 'atmWithdrawalReversal', + InternalTransfer = 'internalTransfer', + InternalDirectDebit = 'internalDirectDebit', + ManualCorrection = 'manualCorrection', + InvoiceDeduction = 'invoiceDeduction', + DepositCorrection = 'depositCorrection', + ReserveAdjustment = 'reserveAdjustment', + BankTransfer = 'bankTransfer', + BankDirectDebit = 'bankDirectDebit', + CardTransfer = 'cardTransfer', + MiscCost = 'miscCost', + PaymentCost = 'paymentCost', + Fee = 'fee', + Leftover = 'leftover', + Grant = 'grant', + CapitalFundsCollection = 'capitalFundsCollection', + CashOutInstruction = 'cashOutInstruction', + CashoutFee = 'cashoutFee', + CashoutRepayment = 'cashoutRepayment', + CashoutFunding = 'cashoutFunding', + Repayment = 'repayment', + Installment = 'installment', + InstallmentReversal = 'installmentReversal', + BalanceAdjustment = 'balanceAdjustment', + BalanceRollover = 'balanceRollover', + BalanceMigration = 'balanceMigration' } } diff --git a/src/typings/transfers/transferDataTracking.ts b/src/typings/transfers/transferDataTracking.ts new file mode 100644 index 000000000..4e81b3be5 --- /dev/null +++ b/src/typings/transfers/transferDataTracking.ts @@ -0,0 +1,77 @@ +/* + * The version of the OpenAPI document: v4 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { ConfirmationTrackingData } from './confirmationTrackingData'; +import { EstimationTrackingData } from './estimationTrackingData'; +import { InternalReviewTrackingData } from './internalReviewTrackingData'; + +/** +* The latest tracking information of the transfer. +*/ +export class TransferDataTracking { + /** + * The status of the transfer. Possible values: - **pending**: the transfer is under internal review. - **failed**: the transfer failed Adyen\'s internal review. For details, see `reason`. + */ + 'status': TransferDataTracking.StatusEnum; + /** + * The type of the tracking event. Possible values: - **confirmation**: the transfer passed Adyen\'s internal review. + */ + 'type': TransferDataTracking.TypeEnum = TransferDataTracking.TypeEnum.Confirmation; + /** + * The estimated time the beneficiary should have access to the funds. + */ + 'estimatedArrivalTime': Date; + /** + * The reason why the transfer failed Adyen\'s internal review. Possible values: - **refusedForRegulatoryReasons**: the transfer does not comply with Adyen\'s risk policy. For more information, [contact the Support Team](https://www.adyen.help/hc/en-us/requests/new). + */ + 'reason'?: TransferDataTracking.ReasonEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "status", + "baseName": "status", + "type": "TransferDataTracking.StatusEnum" + }, + { + "name": "type", + "baseName": "type", + "type": "TransferDataTracking.TypeEnum" + }, + { + "name": "estimatedArrivalTime", + "baseName": "estimatedArrivalTime", + "type": "Date" + }, + { + "name": "reason", + "baseName": "reason", + "type": "TransferDataTracking.ReasonEnum" + } ]; + + static getAttributeTypeMap() { + return TransferDataTracking.attributeTypeMap; + } +} + +export namespace TransferDataTracking { + export enum StatusEnum { + Pending = 'pending', + Failed = 'failed' + } + export enum TypeEnum { + Confirmation = 'confirmation', + Estimation = 'estimation', + InternalReview = 'internalReview' + } + export enum ReasonEnum { + RefusedForRegulatoryReasons = 'refusedForRegulatoryReasons' + } +} diff --git a/src/typings/transfers/transferEvent.ts b/src/typings/transfers/transferEvent.ts index 8fbdcf6a3..87dce70a6 100644 --- a/src/typings/transfers/transferEvent.ts +++ b/src/typings/transfers/transferEvent.ts @@ -10,17 +10,15 @@ import { Amount } from './amount'; import { AmountAdjustment } from './amountAdjustment'; import { BalanceMutation } from './balanceMutation'; -import { ConfirmationTrackingData } from './confirmationTrackingData'; -import { EstimationTrackingData } from './estimationTrackingData'; import { ExternalReason } from './externalReason'; -import { InternalReviewTrackingData } from './internalReviewTrackingData'; -import { MerchantPurchaseData } from './merchantPurchaseData'; import { Modification } from './modification'; +import { TransferEventEventsDataInner } from './transferEventEventsDataInner'; +import { TransferEventTrackingData } from './transferEventTrackingData'; export class TransferEvent { - 'amount'?: Amount | null; + 'amount'?: Amount; /** - * The amount adjustments in this transfer. + * The amount adjustments in this transfer. Only applicable for [issuing](https://docs.adyen.com/issuing/) integrations. */ 'amountAdjustments'?: Array; /** @@ -38,18 +36,18 @@ export class TransferEvent { /** * A list of event data. */ - 'eventsData'?: Array; - 'externalReason'?: ExternalReason | null; + 'eventsData'?: Array; + 'externalReason'?: ExternalReason; /** * The unique identifier of the transfer event. */ 'id'?: string; - 'modification'?: Modification | null; + 'modification'?: Modification; /** * The list of balance mutations per event. */ 'mutations'?: Array; - 'originalAmount'?: Amount | null; + 'originalAmount'?: Amount; /** * The reason for the transfer status. */ @@ -58,10 +56,7 @@ export class TransferEvent { * The status of the transfer event. */ 'status'?: TransferEvent.StatusEnum; - /** - * Additional information for the tracking event. - */ - 'trackingData'?: ConfirmationTrackingData | EstimationTrackingData | InternalReviewTrackingData | null; + 'trackingData'?: TransferEventTrackingData; /** * The id of the transaction that is related to this accounting event. Only sent for events of type **accounting** where the balance changes. */ @@ -85,7 +80,7 @@ export class TransferEvent { { "name": "amount", "baseName": "amount", - "type": "Amount | null" + "type": "Amount" }, { "name": "amountAdjustments", @@ -110,12 +105,12 @@ export class TransferEvent { { "name": "eventsData", "baseName": "eventsData", - "type": "Array" + "type": "Array" }, { "name": "externalReason", "baseName": "externalReason", - "type": "ExternalReason | null" + "type": "ExternalReason" }, { "name": "id", @@ -125,7 +120,7 @@ export class TransferEvent { { "name": "modification", "baseName": "modification", - "type": "Modification | null" + "type": "Modification" }, { "name": "mutations", @@ -135,7 +130,7 @@ export class TransferEvent { { "name": "originalAmount", "baseName": "originalAmount", - "type": "Amount | null" + "type": "Amount" }, { "name": "reason", @@ -150,7 +145,7 @@ export class TransferEvent { { "name": "trackingData", "baseName": "trackingData", - "type": "ConfirmationTrackingData | EstimationTrackingData | InternalReviewTrackingData | null" + "type": "TransferEventTrackingData" }, { "name": "transactionId", @@ -180,101 +175,101 @@ export class TransferEvent { export namespace TransferEvent { export enum ReasonEnum { - AccountHierarchyNotActive = 'accountHierarchyNotActive', - AmountLimitExceeded = 'amountLimitExceeded', - Approved = 'approved', - BalanceAccountTemporarilyBlockedByTransactionRule = 'balanceAccountTemporarilyBlockedByTransactionRule', - CounterpartyAccountBlocked = 'counterpartyAccountBlocked', - CounterpartyAccountClosed = 'counterpartyAccountClosed', - CounterpartyAccountNotFound = 'counterpartyAccountNotFound', - CounterpartyAddressRequired = 'counterpartyAddressRequired', - CounterpartyBankTimedOut = 'counterpartyBankTimedOut', - CounterpartyBankUnavailable = 'counterpartyBankUnavailable', - Declined = 'declined', - DeclinedByTransactionRule = 'declinedByTransactionRule', - DirectDebitNotSupported = 'directDebitNotSupported', - Error = 'error', - NotEnoughBalance = 'notEnoughBalance', - PendingApproval = 'pendingApproval', - PendingExecution = 'pendingExecution', - RefusedByCounterpartyBank = 'refusedByCounterpartyBank', - RefusedByCustomer = 'refusedByCustomer', - RouteNotFound = 'routeNotFound', - ScaFailed = 'scaFailed', - TransferInstrumentDoesNotExist = 'transferInstrumentDoesNotExist', - Unknown = 'unknown' + AccountHierarchyNotActive = 'accountHierarchyNotActive', + AmountLimitExceeded = 'amountLimitExceeded', + Approved = 'approved', + BalanceAccountTemporarilyBlockedByTransactionRule = 'balanceAccountTemporarilyBlockedByTransactionRule', + CounterpartyAccountBlocked = 'counterpartyAccountBlocked', + CounterpartyAccountClosed = 'counterpartyAccountClosed', + CounterpartyAccountNotFound = 'counterpartyAccountNotFound', + CounterpartyAddressRequired = 'counterpartyAddressRequired', + CounterpartyBankTimedOut = 'counterpartyBankTimedOut', + CounterpartyBankUnavailable = 'counterpartyBankUnavailable', + Declined = 'declined', + DeclinedByTransactionRule = 'declinedByTransactionRule', + DirectDebitNotSupported = 'directDebitNotSupported', + Error = 'error', + NotEnoughBalance = 'notEnoughBalance', + PendingApproval = 'pendingApproval', + PendingExecution = 'pendingExecution', + RefusedByCounterpartyBank = 'refusedByCounterpartyBank', + RefusedByCustomer = 'refusedByCustomer', + RouteNotFound = 'routeNotFound', + ScaFailed = 'scaFailed', + TransferInstrumentDoesNotExist = 'transferInstrumentDoesNotExist', + Unknown = 'unknown' } export enum StatusEnum { - ApprovalPending = 'approvalPending', - AtmWithdrawal = 'atmWithdrawal', - AtmWithdrawalReversalPending = 'atmWithdrawalReversalPending', - AtmWithdrawalReversed = 'atmWithdrawalReversed', - AuthAdjustmentAuthorised = 'authAdjustmentAuthorised', - AuthAdjustmentError = 'authAdjustmentError', - AuthAdjustmentRefused = 'authAdjustmentRefused', - Authorised = 'authorised', - BankTransfer = 'bankTransfer', - BankTransferPending = 'bankTransferPending', - Booked = 'booked', - BookingPending = 'bookingPending', - Cancelled = 'cancelled', - CapturePending = 'capturePending', - CaptureReversalPending = 'captureReversalPending', - CaptureReversed = 'captureReversed', - Captured = 'captured', - CapturedExternally = 'capturedExternally', - Chargeback = 'chargeback', - ChargebackExternally = 'chargebackExternally', - ChargebackPending = 'chargebackPending', - ChargebackReversalPending = 'chargebackReversalPending', - ChargebackReversed = 'chargebackReversed', - Credited = 'credited', - DepositCorrection = 'depositCorrection', - DepositCorrectionPending = 'depositCorrectionPending', - Dispute = 'dispute', - DisputeClosed = 'disputeClosed', - DisputeExpired = 'disputeExpired', - DisputeNeedsReview = 'disputeNeedsReview', - Error = 'error', - Expired = 'expired', - Failed = 'failed', - Fee = 'fee', - FeePending = 'feePending', - InternalTransfer = 'internalTransfer', - InternalTransferPending = 'internalTransferPending', - InvoiceDeduction = 'invoiceDeduction', - InvoiceDeductionPending = 'invoiceDeductionPending', - ManualCorrectionPending = 'manualCorrectionPending', - ManuallyCorrected = 'manuallyCorrected', - MatchedStatement = 'matchedStatement', - MatchedStatementPending = 'matchedStatementPending', - MerchantPayin = 'merchantPayin', - MerchantPayinPending = 'merchantPayinPending', - MerchantPayinReversed = 'merchantPayinReversed', - MerchantPayinReversedPending = 'merchantPayinReversedPending', - MiscCost = 'miscCost', - MiscCostPending = 'miscCostPending', - PaymentCost = 'paymentCost', - PaymentCostPending = 'paymentCostPending', - PendingApproval = 'pendingApproval', - PendingExecution = 'pendingExecution', - Received = 'received', - RefundPending = 'refundPending', - RefundReversalPending = 'refundReversalPending', - RefundReversed = 'refundReversed', - Refunded = 'refunded', - RefundedExternally = 'refundedExternally', - Refused = 'refused', - Rejected = 'rejected', - ReserveAdjustment = 'reserveAdjustment', - ReserveAdjustmentPending = 'reserveAdjustmentPending', - Returned = 'returned', - SecondChargeback = 'secondChargeback', - SecondChargebackPending = 'secondChargebackPending', - Undefined = 'undefined' + ApprovalPending = 'approvalPending', + AtmWithdrawal = 'atmWithdrawal', + AtmWithdrawalReversalPending = 'atmWithdrawalReversalPending', + AtmWithdrawalReversed = 'atmWithdrawalReversed', + AuthAdjustmentAuthorised = 'authAdjustmentAuthorised', + AuthAdjustmentError = 'authAdjustmentError', + AuthAdjustmentRefused = 'authAdjustmentRefused', + Authorised = 'authorised', + BankTransfer = 'bankTransfer', + BankTransferPending = 'bankTransferPending', + Booked = 'booked', + BookingPending = 'bookingPending', + Cancelled = 'cancelled', + CapturePending = 'capturePending', + CaptureReversalPending = 'captureReversalPending', + CaptureReversed = 'captureReversed', + Captured = 'captured', + CapturedExternally = 'capturedExternally', + Chargeback = 'chargeback', + ChargebackExternally = 'chargebackExternally', + ChargebackPending = 'chargebackPending', + ChargebackReversalPending = 'chargebackReversalPending', + ChargebackReversed = 'chargebackReversed', + Credited = 'credited', + DepositCorrection = 'depositCorrection', + DepositCorrectionPending = 'depositCorrectionPending', + Dispute = 'dispute', + DisputeClosed = 'disputeClosed', + DisputeExpired = 'disputeExpired', + DisputeNeedsReview = 'disputeNeedsReview', + Error = 'error', + Expired = 'expired', + Failed = 'failed', + Fee = 'fee', + FeePending = 'feePending', + InternalTransfer = 'internalTransfer', + InternalTransferPending = 'internalTransferPending', + InvoiceDeduction = 'invoiceDeduction', + InvoiceDeductionPending = 'invoiceDeductionPending', + ManualCorrectionPending = 'manualCorrectionPending', + ManuallyCorrected = 'manuallyCorrected', + MatchedStatement = 'matchedStatement', + MatchedStatementPending = 'matchedStatementPending', + MerchantPayin = 'merchantPayin', + MerchantPayinPending = 'merchantPayinPending', + MerchantPayinReversed = 'merchantPayinReversed', + MerchantPayinReversedPending = 'merchantPayinReversedPending', + MiscCost = 'miscCost', + MiscCostPending = 'miscCostPending', + PaymentCost = 'paymentCost', + PaymentCostPending = 'paymentCostPending', + PendingApproval = 'pendingApproval', + PendingExecution = 'pendingExecution', + Received = 'received', + RefundPending = 'refundPending', + RefundReversalPending = 'refundReversalPending', + RefundReversed = 'refundReversed', + Refunded = 'refunded', + RefundedExternally = 'refundedExternally', + Refused = 'refused', + Rejected = 'rejected', + ReserveAdjustment = 'reserveAdjustment', + ReserveAdjustmentPending = 'reserveAdjustmentPending', + Returned = 'returned', + SecondChargeback = 'secondChargeback', + SecondChargebackPending = 'secondChargebackPending', + Undefined = 'undefined' } export enum TypeEnum { - Accounting = 'accounting', - Tracking = 'tracking' + Accounting = 'accounting', + Tracking = 'tracking' } } diff --git a/src/typings/transfers/transferEventEventsDataInner.ts b/src/typings/transfers/transferEventEventsDataInner.ts new file mode 100644 index 000000000..82f422f7f --- /dev/null +++ b/src/typings/transfers/transferEventEventsDataInner.ts @@ -0,0 +1,53 @@ +/* + * The version of the OpenAPI document: v4 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { Airline } from './airline'; +import { Lodging } from './lodging'; +import { MerchantPurchaseData } from './merchantPurchaseData'; + +export class TransferEventEventsDataInner { + 'airline'?: Airline; + /** + * Lodging information. + */ + 'lodging'?: Array; + /** + * The type of events data. Possible values: - **merchantPurchaseData**: merchant purchase data + */ + 'type': TransferEventEventsDataInner.TypeEnum = TransferEventEventsDataInner.TypeEnum.MerchantPurchaseData; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "airline", + "baseName": "airline", + "type": "Airline" + }, + { + "name": "lodging", + "baseName": "lodging", + "type": "Array" + }, + { + "name": "type", + "baseName": "type", + "type": "TransferEventEventsDataInner.TypeEnum" + } ]; + + static getAttributeTypeMap() { + return TransferEventEventsDataInner.attributeTypeMap; + } +} + +export namespace TransferEventEventsDataInner { + export enum TypeEnum { + MerchantPurchaseData = 'merchantPurchaseData' + } +} diff --git a/src/typings/transfers/transferEventTrackingData.ts b/src/typings/transfers/transferEventTrackingData.ts new file mode 100644 index 000000000..62da3f4ad --- /dev/null +++ b/src/typings/transfers/transferEventTrackingData.ts @@ -0,0 +1,77 @@ +/* + * The version of the OpenAPI document: v4 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { ConfirmationTrackingData } from './confirmationTrackingData'; +import { EstimationTrackingData } from './estimationTrackingData'; +import { InternalReviewTrackingData } from './internalReviewTrackingData'; + +/** +* Additional information for the tracking event. +*/ +export class TransferEventTrackingData { + /** + * The status of the transfer. Possible values: - **pending**: the transfer is under internal review. - **failed**: the transfer failed Adyen\'s internal review. For details, see `reason`. + */ + 'status': TransferEventTrackingData.StatusEnum; + /** + * The type of the tracking event. Possible values: - **confirmation**: the transfer passed Adyen\'s internal review. + */ + 'type': TransferEventTrackingData.TypeEnum = TransferEventTrackingData.TypeEnum.Confirmation; + /** + * The estimated time the beneficiary should have access to the funds. + */ + 'estimatedArrivalTime': Date; + /** + * The reason why the transfer failed Adyen\'s internal review. Possible values: - **refusedForRegulatoryReasons**: the transfer does not comply with Adyen\'s risk policy. For more information, [contact the Support Team](https://www.adyen.help/hc/en-us/requests/new). + */ + 'reason'?: TransferEventTrackingData.ReasonEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "status", + "baseName": "status", + "type": "TransferEventTrackingData.StatusEnum" + }, + { + "name": "type", + "baseName": "type", + "type": "TransferEventTrackingData.TypeEnum" + }, + { + "name": "estimatedArrivalTime", + "baseName": "estimatedArrivalTime", + "type": "Date" + }, + { + "name": "reason", + "baseName": "reason", + "type": "TransferEventTrackingData.ReasonEnum" + } ]; + + static getAttributeTypeMap() { + return TransferEventTrackingData.attributeTypeMap; + } +} + +export namespace TransferEventTrackingData { + export enum StatusEnum { + Pending = 'pending', + Failed = 'failed' + } + export enum TypeEnum { + Confirmation = 'confirmation', + Estimation = 'estimation', + InternalReview = 'internalReview' + } + export enum ReasonEnum { + RefusedForRegulatoryReasons = 'refusedForRegulatoryReasons' + } +} diff --git a/src/typings/transfers/transferInfo.ts b/src/typings/transfers/transferInfo.ts index b3001b3ed..83d380a72 100644 --- a/src/typings/transfers/transferInfo.ts +++ b/src/typings/transfers/transferInfo.ts @@ -47,12 +47,12 @@ export class TransferInfo { * A reference that is sent to the recipient. This reference is also sent in all webhooks related to the transfer, so you can use it to track statuses for both parties involved in the funds movement. Supported characters: **a-z**, **A-Z**, **0-9**. The maximum length depends on the `category`. - **internal**: 80 characters - **bank**: 35 characters when transferring to an IBAN, 15 characters for others. */ 'referenceForBeneficiary'?: string; - 'review'?: TransferRequestReview | null; + 'review'?: TransferRequestReview; /** * 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**. */ 'type'?: TransferInfo.TypeEnum; - 'ultimateParty'?: UltimatePartyIdentification | null; + 'ultimateParty'?: UltimatePartyIdentification; static discriminator: string | undefined = undefined; @@ -110,7 +110,7 @@ export class TransferInfo { { "name": "review", "baseName": "review", - "type": "TransferRequestReview | null" + "type": "TransferRequestReview" }, { "name": "type", @@ -120,7 +120,7 @@ export class TransferInfo { { "name": "ultimateParty", "baseName": "ultimateParty", - "type": "UltimatePartyIdentification | null" + "type": "UltimatePartyIdentification" } ]; static getAttributeTypeMap() { @@ -130,32 +130,32 @@ export class TransferInfo { export namespace TransferInfo { export enum CategoryEnum { - Bank = 'bank', - Card = 'card', - Internal = 'internal', - IssuedCard = 'issuedCard', - PlatformPayment = 'platformPayment', - TopUp = 'topUp' + Bank = 'bank', + Card = 'card', + Internal = 'internal', + IssuedCard = 'issuedCard', + PlatformPayment = 'platformPayment', + TopUp = 'topUp' } export enum PrioritiesEnum { - CrossBorder = 'crossBorder', - Fast = 'fast', - Instant = 'instant', - Internal = 'internal', - Regular = 'regular', - Wire = 'wire' + CrossBorder = 'crossBorder', + Fast = 'fast', + Instant = 'instant', + Internal = 'internal', + Regular = 'regular', + Wire = 'wire' } export enum PriorityEnum { - CrossBorder = 'crossBorder', - Fast = 'fast', - Instant = 'instant', - Internal = 'internal', - Regular = 'regular', - Wire = 'wire' + CrossBorder = 'crossBorder', + Fast = 'fast', + Instant = 'instant', + Internal = 'internal', + Regular = 'regular', + Wire = 'wire' } export enum TypeEnum { - BankTransfer = 'bankTransfer', - InternalTransfer = 'internalTransfer', - InternalDirectDebit = 'internalDirectDebit' + BankTransfer = 'bankTransfer', + InternalTransfer = 'internalTransfer', + InternalDirectDebit = 'internalDirectDebit' } } diff --git a/src/typings/transfers/transferNotificationCounterParty.ts b/src/typings/transfers/transferNotificationCounterParty.ts index 0eec761b2..1e7fe6509 100644 --- a/src/typings/transfers/transferNotificationCounterParty.ts +++ b/src/typings/transfers/transferNotificationCounterParty.ts @@ -16,9 +16,9 @@ export class TransferNotificationCounterParty { * The unique identifier of the counterparty [balance account](https://docs.adyen.com/api-explorer/balanceplatform/latest/post/balanceAccounts#responses-200-id). */ 'balanceAccountId'?: string; - 'bankAccount'?: BankAccountV3 | null; - 'card'?: Card | null; - 'merchant'?: TransferNotificationMerchantData | null; + 'bankAccount'?: BankAccountV3; + 'card'?: Card; + 'merchant'?: TransferNotificationMerchantData; /** * The unique identifier of the counterparty [transfer instrument](https://docs.adyen.com/api-explorer/legalentity/latest/post/transferInstruments#responses-200-id). */ @@ -35,17 +35,17 @@ export class TransferNotificationCounterParty { { "name": "bankAccount", "baseName": "bankAccount", - "type": "BankAccountV3 | null" + "type": "BankAccountV3" }, { "name": "card", "baseName": "card", - "type": "Card | null" + "type": "Card" }, { "name": "merchant", "baseName": "merchant", - "type": "TransferNotificationMerchantData | null" + "type": "TransferNotificationMerchantData" }, { "name": "transferInstrumentId", diff --git a/src/typings/transfers/transferNotificationMerchantData.ts b/src/typings/transfers/transferNotificationMerchantData.ts index 866e91117..b5eb2e961 100644 --- a/src/typings/transfers/transferNotificationMerchantData.ts +++ b/src/typings/transfers/transferNotificationMerchantData.ts @@ -26,7 +26,7 @@ export class TransferNotificationMerchantData { */ 'mcc'?: string; /** - * The merchant identifier. + * The unique identifier of the merchant. */ 'merchantId'?: string; /** @@ -34,7 +34,7 @@ export class TransferNotificationMerchantData { */ 'name'?: string; /** - * The merchant postal code. + * The postal code of the merchant. */ 'postalCode'?: string; diff --git a/src/typings/transfers/transferView.ts b/src/typings/transfers/transferView.ts index 885e4e78d..07de834e5 100644 --- a/src/typings/transfers/transferView.ts +++ b/src/typings/transfers/transferView.ts @@ -7,16 +7,10 @@ * Do not edit this class manually. */ -import { BankCategoryData } from './bankCategoryData'; -import { InternalCategoryData } from './internalCategoryData'; -import { IssuedCard } from './issuedCard'; -import { PlatformPayment } from './platformPayment'; +import { TransferCategoryData } from './transferCategoryData'; export class TransferView { - /** - * The relevant data according to the transfer category. - */ - 'categoryData'?: BankCategoryData | InternalCategoryData | IssuedCard | PlatformPayment | null; + 'categoryData'?: TransferCategoryData; /** * The ID of the resource. */ @@ -32,7 +26,7 @@ export class TransferView { { "name": "categoryData", "baseName": "categoryData", - "type": "BankCategoryData | InternalCategoryData | IssuedCard | PlatformPayment | null" + "type": "TransferCategoryData" }, { "name": "id", diff --git a/src/typings/transfers/uKLocalAccountIdentification.ts b/src/typings/transfers/uKLocalAccountIdentification.ts index 98e350892..b76d49e7d 100644 --- a/src/typings/transfers/uKLocalAccountIdentification.ts +++ b/src/typings/transfers/uKLocalAccountIdentification.ts @@ -20,7 +20,7 @@ export class UKLocalAccountIdentification { /** * **ukLocal** */ - 'type': UKLocalAccountIdentification.TypeEnum; + 'type': UKLocalAccountIdentification.TypeEnum = UKLocalAccountIdentification.TypeEnum.UkLocal; static discriminator: string | undefined = undefined; @@ -48,6 +48,6 @@ export class UKLocalAccountIdentification { export namespace UKLocalAccountIdentification { export enum TypeEnum { - UkLocal = 'ukLocal' + UkLocal = 'ukLocal' } } diff --git a/src/typings/transfers/uSLocalAccountIdentification.ts b/src/typings/transfers/uSLocalAccountIdentification.ts index 492cc4707..5ee445cc6 100644 --- a/src/typings/transfers/uSLocalAccountIdentification.ts +++ b/src/typings/transfers/uSLocalAccountIdentification.ts @@ -16,7 +16,7 @@ export class USLocalAccountIdentification { /** * The bank account type. Possible values: **checking** or **savings**. Defaults to **checking**. */ - 'accountType'?: USLocalAccountIdentification.AccountTypeEnum; + 'accountType'?: USLocalAccountIdentification.AccountTypeEnum = USLocalAccountIdentification.AccountTypeEnum.Checking; /** * The 9-digit [routing number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without separators or whitespace. */ @@ -24,7 +24,7 @@ export class USLocalAccountIdentification { /** * **usLocal** */ - 'type': USLocalAccountIdentification.TypeEnum; + 'type': USLocalAccountIdentification.TypeEnum = USLocalAccountIdentification.TypeEnum.UsLocal; static discriminator: string | undefined = undefined; @@ -57,10 +57,10 @@ export class USLocalAccountIdentification { export namespace USLocalAccountIdentification { export enum AccountTypeEnum { - Checking = 'checking', - Savings = 'savings' + Checking = 'checking', + Savings = 'savings' } export enum TypeEnum { - UsLocal = 'usLocal' + UsLocal = 'usLocal' } } diff --git a/src/typings/transfers/ultimatePartyIdentification.ts b/src/typings/transfers/ultimatePartyIdentification.ts index 581c10a70..8c9301a29 100644 --- a/src/typings/transfers/ultimatePartyIdentification.ts +++ b/src/typings/transfers/ultimatePartyIdentification.ts @@ -10,7 +10,7 @@ import { Address } from './address'; export class UltimatePartyIdentification { - 'address'?: Address | null; + 'address'?: Address; /** * The date of birth of the individual in [ISO-8601](https://www.w3.org/TR/NOTE-datetime) format. For example, **YYYY-MM-DD**. Allowed only when `type` is **individual**. */ @@ -34,7 +34,7 @@ export class UltimatePartyIdentification { /** * The type of entity that owns the bank account or card. Possible values: **individual**, **organization**, or **unknown**. Required when `category` is **card**. In this case, the value must be **individual**. */ - 'type'?: UltimatePartyIdentification.TypeEnum; + 'type'?: UltimatePartyIdentification.TypeEnum = UltimatePartyIdentification.TypeEnum.Unknown; static discriminator: string | undefined = undefined; @@ -42,7 +42,7 @@ export class UltimatePartyIdentification { { "name": "address", "baseName": "address", - "type": "Address | null" + "type": "Address" }, { "name": "dateOfBirth", @@ -82,8 +82,8 @@ export class UltimatePartyIdentification { export namespace UltimatePartyIdentification { export enum TypeEnum { - Individual = 'individual', - Organization = 'organization', - Unknown = 'unknown' + Individual = 'individual', + Organization = 'organization', + Unknown = 'unknown' } } diff --git a/templates-v7/config.yaml b/templates-v7/config.yaml new file mode 100644 index 000000000..e87a71386 --- /dev/null +++ b/templates-v7/config.yaml @@ -0,0 +1,11 @@ +templateDir: ./templates-v7/typescript-node +files: + api-index.mustache: + destinationFilename: index.ts + templateType: SupportingFiles + api-single.mustache: + destinationFilename: .ts + templateType: API + api-root.mustache: + destinationFilename: Root.ts + templateType: API diff --git a/templates-v7/typescript/api-all.mustache b/templates-v7/typescript/api-all.mustache new file mode 100644 index 000000000..33bcad63c --- /dev/null +++ b/templates-v7/typescript/api-all.mustache @@ -0,0 +1,25 @@ +{{>licenseInfo}} + +{{#apiInfo}} +import Service from "../service"; +import Client from "../client"; + +{{#apis}} +{{#operations}} +import {{ classname }} from "./{{serviceName}}/{{ classFilename }}"; +{{/operations}} +{{/apis}} + +export default class {{#lambda.titlecase}}{{serviceName}}{{/lambda.titlecase}} extends Service { + public constructor(client: Client) { + super(client); + } +{{#apis}} + {{#operations}} + public get {{ classname }}() { + return new {{ classname }}(this.client); + } + {{/operations}} +{{/apis}} +} +{{/apiInfo}} \ No newline at end of file diff --git a/templates-v7/typescript/api-index.mustache b/templates-v7/typescript/api-index.mustache new file mode 100644 index 000000000..406d4289c --- /dev/null +++ b/templates-v7/typescript/api-index.mustache @@ -0,0 +1,28 @@ +{{>licenseInfo}} +{{#apiInfo}} +{{#apis}} +{{#operations}} +import { {{ classname }} } from "./{{ classFilename }}"; +{{/operations}} +{{/apis}} +{{/apiInfo}} + +import Service from "../../service"; +import Client from "../../client"; + +export default class {{#lambda.pascalcase}}{{ apiPackage }}{{/lambda.pascalcase}}API extends Service { + + public constructor(client: Client) { + super(client); + } +{{#apiInfo}} +{{#apis}} +{{#operations}} + + public get {{classname}}() { + return new {{classname}}(this.client); + } +{{/operations}} +{{/apis}} +{{/apiInfo}} +} diff --git a/templates-v7/typescript/api-root.mustache b/templates-v7/typescript/api-root.mustache new file mode 100644 index 000000000..4b9970a4e --- /dev/null +++ b/templates-v7/typescript/api-root.mustache @@ -0,0 +1,45 @@ +{{>licenseInfo}} +import Client from "../client"; +import getJsonResponse from "../helpers/getJsonResponse"; +import Service from "../service"; +{{#imports}} +import { {{classname}} } from "../typings/{{serviceName}}/models"; +{{/imports}} +import { IRequest } from "../typings/requestOptions"; +import Resource from "./resource"; +import { ObjectSerializer } from "../typings/{{serviceName}}/models"; + +{{#operations}} +export class {{#lambda.pascalcase}}{{ apiPackage }}{{/lambda.pascalcase}}API extends Service { + + private readonly API_BASEPATH: string = "{{{basePath}}}"; + private baseUrl: string; + + public constructor(client: Client) { + super(client); + this.baseUrl = this.createBaseUrl(this.API_BASEPATH); + } +{{#operation}} + +{{>api_summary}} + public async {{#vendorExtensions.x-methodName}}{{.}}{{/vendorExtensions.x-methodName}}{{^vendorExtensions.x-methodName}}{{nickname}}{{/vendorExtensions.x-methodName}}({{#pathParams}}{{paramName}}: {{{dataType}}}, {{/pathParams}}{{#bodyParams}}{{paramName}}: {{{dataType}}}, {{/bodyParams}}requestOptions?: IRequest.Options): Promise<{{#returnType}}{{{.}}}{{/returnType}}{{^returnType}}void{{/returnType}}> { + const endpoint = `${this.baseUrl}{{{path}}}`{{#pathParams}} + .replace("{" + "{{baseName}}" + "}", encodeURIComponent(String({{paramName}}))){{/pathParams}}; + const resource = new Resource(this, endpoint); +{{#bodyParam}} + const request: {{{dataType}}} = ObjectSerializer.serialize({{paramName}}, "{{{dataType}}}"); +{{/bodyParam}} + {{#returnType}}const response = {{/returnType}}await getJsonResponse<{{#bodyParam}}{{{dataType}}}{{/bodyParam}}{{^bodyParam}}string{{/bodyParam}}, {{#returnType}}{{{.}}}{{/returnType}}{{^returnType}}void{{/returnType}}>( + resource, + {{#bodyParam}}request{{/bodyParam}}{{^bodyParam}}""{{/bodyParam}}, + { ...requestOptions, method: "{{httpMethod}}" } + ); + {{#returnType}} + return ObjectSerializer.deserialize(response, "{{{.}}}"); + {{/returnType}} + } +{{/operation}} +} + +export default {{#lambda.pascalcase}}{{ apiPackage }}{{/lambda.pascalcase}}API; +{{/operations}} diff --git a/templates-v7/typescript/api-single.mustache b/templates-v7/typescript/api-single.mustache new file mode 100644 index 000000000..09943dde2 --- /dev/null +++ b/templates-v7/typescript/api-single.mustache @@ -0,0 +1,55 @@ +{{>licenseInfo}} +import getJsonResponse from "../../helpers/getJsonResponse"; +import Service from "../../service"; +import Client from "../../client"; +import { +{{#imports}} + {{classname}}, +{{/imports}} + ObjectSerializer +} from "../../typings/{{serviceName}}/models"; +import { IRequest } from "../../typings/requestOptions"; +import Resource from "../resource"; + +{{#operations}} +export class {{classname}} extends Service { + + private readonly API_BASEPATH: string = "{{{basePath}}}"; + private baseUrl: string; + + public constructor(client: Client){ + super(client); + this.baseUrl = this.createBaseUrl(this.API_BASEPATH); + } +{{#operation}} + +{{>api_summary}} + public async {{#vendorExtensions.x-methodName}}{{.}}{{/vendorExtensions.x-methodName}}{{^vendorExtensions.x-methodName}}{{nickname}}{{/vendorExtensions.x-methodName}}({{#pathParams}}{{paramName}}: {{{dataType}}}, {{/pathParams}}{{#bodyParams}}{{paramName}}: {{{dataType}}}, {{/bodyParams}}{{#queryParams}}{{paramName}}?: {{{dataType}}}, {{/queryParams}}requestOptions?: IRequest.Options): Promise<{{#returnType}}{{{.}}}{{/returnType}}{{^returnType}}void{{/returnType}}> { + const endpoint = `${this.baseUrl}{{{path}}}`{{#pathParams}} + .replace("{" + "{{baseName}}" + "}", encodeURIComponent(String({{paramName}}))){{/pathParams}}; + const resource = new Resource(this, endpoint); +{{#bodyParam}} + const request: {{{dataType}}} = ObjectSerializer.serialize({{paramName}}, "{{{dataType}}}"); +{{/bodyParam}} +{{#hasQueryParams}} + const hasDefinedQueryParams = {{#queryParams}}{{paramName}}{{^-last}} ?? {{/-last}}{{/queryParams}}; + if(hasDefinedQueryParams) { + if(!requestOptions) requestOptions = {}; + if(!requestOptions.params) requestOptions.params = {}; +{{#queryParams}} + if({{paramName}}) requestOptions.params["{{paramName}}"] = {{paramName}}{{#isDateTime}}.toISOString(){{/isDateTime}}; +{{/queryParams}} + } +{{/hasQueryParams}} + {{#returnType}}const response = {{/returnType}}await getJsonResponse<{{#bodyParam}}{{{dataType}}}{{/bodyParam}}{{^bodyParam}}string{{/bodyParam}}, {{#returnType}}{{{.}}}{{/returnType}}{{^returnType}}void{{/returnType}}>( + resource, + {{#bodyParam}}request{{/bodyParam}}{{^bodyParam}}""{{/bodyParam}}, + { ...requestOptions, method: "{{httpMethod}}" } + ); + {{#returnType}} + return ObjectSerializer.deserialize(response, "{{{.}}}"); + {{/returnType}} + } +{{/operation}} +} +{{/operations}} diff --git a/templates-v7/typescript/api_summary.mustache b/templates-v7/typescript/api_summary.mustache new file mode 100644 index 000000000..6220e451b --- /dev/null +++ b/templates-v7/typescript/api_summary.mustache @@ -0,0 +1,23 @@ + /** +{{#summary}} + * @summary {{&summary}} +{{/summary}} +{{#pathParams}} + * @param {{paramName}} {@link {{dataType}} } {{description}} +{{/pathParams}} +{{#bodyParams}} + * @param {{paramName}} {@link {{dataType}} } {{description}} +{{/bodyParams}} + * @param requestOptions {@link IRequest.Options } +{{#queryParams}} + * @param {{paramName}} {@link {{dataType}} } {{description}} +{{/queryParams}} +{{#returnType}} + * @return {@link {{.}} } +{{/returnType}} +{{#isDeprecated}} + * + * @deprecated {{#vendorExtensions.x-deprecatedInVersion}}since {{#appName}}{{{.}}}{{/appName}} v{{.}}{{/vendorExtensions.x-deprecatedInVersion}}{{#vendorExtensions.x-deprecatedMessage}} + * {{{.}}}{{/vendorExtensions.x-deprecatedMessage}} +{{/isDeprecated}} + */ \ No newline at end of file diff --git a/templates-v7/typescript/licenseInfo.mustache b/templates-v7/typescript/licenseInfo.mustache new file mode 100644 index 000000000..c3a1bc0d3 --- /dev/null +++ b/templates-v7/typescript/licenseInfo.mustache @@ -0,0 +1,8 @@ +/* + * {{#version}}The version of the OpenAPI document: v{{{.}}}{{/version}} + * {{#infoEmail}}Contact: {{{.}}}{{/infoEmail}} + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ diff --git a/templates-v7/typescript/model.mustache b/templates-v7/typescript/model.mustache new file mode 100644 index 000000000..1c029050a --- /dev/null +++ b/templates-v7/typescript/model.mustache @@ -0,0 +1,93 @@ +{{>licenseInfo}} +{{#models}} +{{#model}} +{{#tsImports}} +import { {{classname}} } from '{{filename}}'; +{{/tsImports}} + +{{#description}} +/** +* {{{.}}} +*/ +{{/description}} +{{^isEnum}} +export class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{ +{{#vars}} +{{#description}} + /** + * {{{.}}} + {{#deprecated}} + * + * @deprecated {{#vendorExtensions.x-deprecatedInVersion}}since {{#appName}}{{{.}}}{{/appName}} v{{.}}{{/vendorExtensions.x-deprecatedInVersion}}{{#vendorExtensions.x-deprecatedMessage}} + * {{{.}}}{{/vendorExtensions.x-deprecatedMessage}} + {{/deprecated}} + */ +{{/description}} +{{^description}} + {{#deprecated}} + /** + * @deprecated {{#vendorExtensions.x-deprecatedInVersion}}since {{#appName}}{{{.}}}{{/appName}} v{{.}}{{/vendorExtensions.x-deprecatedInVersion}}{{#vendorExtensions.x-deprecatedMessage}} + * {{{.}}}{{/vendorExtensions.x-deprecatedMessage}} + */ + {{/deprecated}} +{{/description}} + '{{name}}'{{^required}}?{{/required}}: {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{#isNullable}} | null{{/isNullable}}{{/isEnum}}{{#defaultValue}} = {{#isEnum}}{{classname}}.{{/isEnum}}{{{.}}}{{/defaultValue}}; +{{/vars}} + + {{#discriminator}} + static discriminator: string | undefined = "{{discriminatorName}}"; + {{/discriminator}} + {{^discriminator}} + static discriminator: string | undefined = undefined; + {{/discriminator}} + + {{^isArray}} + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + {{#vars}} + { + "name": "{{name}}", + "baseName": "{{baseName}}", + "type": "{{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}" + }{{^-last}}, + {{/-last}} + {{/vars}} + ]; + + static getAttributeTypeMap() { + {{#parent}} + return super.getAttributeTypeMap().concat({{classname}}.attributeTypeMap); + {{/parent}} + {{^parent}} + return {{classname}}.attributeTypeMap; + {{/parent}} + } + {{/isArray}} +} + +{{#hasEnums}} +export namespace {{classname}} { +{{#vars}} +{{#isEnum}} + export enum {{enumName}} { + {{#allowableValues}} + {{#enumVars}} + {{name}} = {{{value}}}{{^-last}},{{/-last}} + {{/enumVars}} + {{/allowableValues}} + } +{{/isEnum}} +{{/vars}} +} +{{/hasEnums}} +{{/isEnum}} +{{#isEnum}} +export enum {{classname}} { + {{#allowableValues}} + {{#enumVars}} + {{name}} = {{{value}}}{{^-last}},{{/-last}} + {{/enumVars}} + {{/allowableValues}} +} +{{/isEnum}} +{{/model}} +{{/models}} \ No newline at end of file diff --git a/templates-v7/typescript/models.mustache b/templates-v7/typescript/models.mustache new file mode 100644 index 000000000..4e943f519 --- /dev/null +++ b/templates-v7/typescript/models.mustache @@ -0,0 +1,302 @@ +{{#generateApis}} +import localVarRequest from 'request'; +{{/generateApis}} + +{{#models}} +{{#model}} +export * from '{{{ classFilename }}}'; +{{/model}} +{{/models}} + +import * as fs from 'fs'; + +export interface RequestDetailedFile { + value: Buffer; + options?: { + filename?: string; + contentType?: string; + } +} + +export type RequestFile = string | Buffer | fs.ReadStream | RequestDetailedFile; + +{{! Object serialization only relevant if generating APIs, too }} +{{#generateApis}} + +{{#models}} +{{#model}} +import { {{classname}} } from '{{{ classFilename }}}'; +{{/model}} +{{/models}} + +/* tslint:disable:no-unused-variable */ +let primitives = [ + "string", + "boolean", + "double", + "integer", + "long", + "float", + "number", + "any" + ]; + +let enumsMap: {[index: string]: any} = { + {{#models}} + {{#model}} + {{#hasEnums}} + {{#vars}} + {{#isEnum}} + {{#isContainer}}"{{classname}}.{{enumName}}": {{classname}}.{{enumName}}{{/isContainer}}{{^isContainer}}"{{datatypeWithEnum}}": {{datatypeWithEnum}}{{/isContainer}}, + {{/isEnum}} + {{/vars}} + {{/hasEnums}} + {{#isEnum}} + "{{classname}}": {{classname}}, + {{/isEnum}} + {{/model}} + {{/models}} +} + +let typeMap: {[index: string]: any} = { + {{#models}} + {{#model}} + {{^isEnum}} + "{{classname}}": {{classname}}, + {{/isEnum}} + {{/model}} + {{/models}} +} + +// Check if a string starts with another string without using es6 features +function startsWith(str: string, match: string): boolean { + return str.substring(0, match.length) === match; +} + +// Check if a string ends with another string without using es6 features +function endsWith(str: string, match: string): boolean { + return str.length >= match.length && str.substring(str.length - match.length) === match; +} + +const nullableSuffix = " | null"; +const optionalSuffix = " | undefined"; +const arrayPrefix = "Array<"; +const arraySuffix = ">"; +const mapPrefix = "{ [key: string]: "; +const mapSuffix = "; }"; + +export class ObjectSerializer { + public static findCorrectType(data: any, expectedType: string) { + if (data == undefined) { + return expectedType; + } else if (primitives.indexOf(expectedType.toLowerCase()) !== -1) { + return expectedType; + } else if (expectedType === "Date") { + return expectedType; + } else { + if (enumsMap[expectedType]) { + return expectedType; + } + + if (!typeMap[expectedType]) { + return expectedType; // w/e we don't know the type + } + + // Check the discriminator + let discriminatorProperty = typeMap[expectedType].discriminator; + if (discriminatorProperty == null) { + return expectedType; // the type does not have a discriminator. use it. + } else { + if (data[discriminatorProperty]) { + var discriminatorType = data[discriminatorProperty]; + if(typeMap[discriminatorType]){ + return discriminatorType; // use the type given in the discriminator + } else { + return expectedType; // discriminator did not map to a type + } + } else { + return expectedType; // discriminator was not present (or an empty string) + } + } + } + } + + public static serialize(data: any, type: string): any { + if (data == undefined) { + return data; + } else if (primitives.indexOf(type.toLowerCase()) !== -1) { + return data; + } else if (endsWith(type, nullableSuffix)) { + let subType: string = type.slice(0, -nullableSuffix.length); // Type | null => Type + return ObjectSerializer.serialize(data, subType); + } else if (endsWith(type, optionalSuffix)) { + let subType: string = type.slice(0, -optionalSuffix.length); // Type | undefined => Type + return ObjectSerializer.serialize(data, subType); + } else if (startsWith(type, arrayPrefix)) { + let subType: string = type.slice(arrayPrefix.length, -arraySuffix.length); // Array => Type + let transformedData: any[] = []; + for (let index = 0; index < data.length; index++) { + let datum = data[index]; + transformedData.push(ObjectSerializer.serialize(datum, subType)); + } + return transformedData; + } else if (startsWith(type, mapPrefix)) { + let subType: string = type.slice(mapPrefix.length, -mapSuffix.length); // { [key: string]: Type; } => Type + let transformedData: { [key: string]: any } = {}; + for (let key in data) { + transformedData[key] = ObjectSerializer.serialize( + data[key], + subType, + ); + } + return transformedData; + } else if (type === "Date") { + return data.toISOString(); + } else { + if (enumsMap[type]) { + return data; + } + if (!typeMap[type]) { // in case we dont know the type + return data; + } + + // Get the actual type of this object + type = this.findCorrectType(data, type); + + // get the map for the correct type. + let attributeTypes = typeMap[type].getAttributeTypeMap(); + let instance: {[index: string]: any} = {}; + for (let index = 0; index < attributeTypes.length; index++) { + let attributeType = attributeTypes[index]; + instance[attributeType.baseName] = ObjectSerializer.serialize(data[attributeType.name], attributeType.type); + } + return instance; + } + } + + public static deserialize(data: any, type: string): any { + // polymorphism may change the actual type. + type = ObjectSerializer.findCorrectType(data, type); + if (data == undefined) { + return data; + } else if (primitives.indexOf(type.toLowerCase()) !== -1) { + return data; + } else if (endsWith(type, nullableSuffix)) { + let subType: string = type.slice(0, -nullableSuffix.length); // Type | null => Type + return ObjectSerializer.deserialize(data, subType); + } else if (endsWith(type, optionalSuffix)) { + let subType: string = type.slice(0, -optionalSuffix.length); // Type | undefined => Type + return ObjectSerializer.deserialize(data, subType); + } else if (startsWith(type, arrayPrefix)) { + let subType: string = type.slice(arrayPrefix.length, -arraySuffix.length); // Array => Type + let transformedData: any[] = []; + for (let index = 0; index < data.length; index++) { + let datum = data[index]; + transformedData.push(ObjectSerializer.deserialize(datum, subType)); + } + return transformedData; + } else if (startsWith(type, mapPrefix)) { + let subType: string = type.slice(mapPrefix.length, -mapSuffix.length); // { [key: string]: Type; } => Type + let transformedData: { [key: string]: any } = {}; + for (let key in data) { + transformedData[key] = ObjectSerializer.deserialize( + data[key], + subType, + ); + } + return transformedData; + } else if (type === "Date") { + return new Date(data); + } else { + if (enumsMap[type]) {// is Enum + return data; + } + + if (!typeMap[type]) { // dont know the type + return data; + } + let instance = new typeMap[type](); + let attributeTypes = typeMap[type].getAttributeTypeMap(); + for (let index = 0; index < attributeTypes.length; index++) { + let attributeType = attributeTypes[index]; + instance[attributeType.name] = ObjectSerializer.deserialize(data[attributeType.baseName], attributeType.type); + } + return instance; + } + } +} + +export interface Authentication { + /** + * Apply authentication settings to header and query params. + */ + applyToRequest(requestOptions: localVarRequest.Options): Promise | void; +} + +export class HttpBasicAuth implements Authentication { + public username: string = ''; + public password: string = ''; + + applyToRequest(requestOptions: localVarRequest.Options): void { + requestOptions.auth = { + username: this.username, password: this.password + } + } +} + +export class HttpBearerAuth implements Authentication { + public accessToken: string | (() => string) = ''; + + applyToRequest(requestOptions: localVarRequest.Options): void { + if (requestOptions && requestOptions.headers) { + const accessToken = typeof this.accessToken === 'function' + ? this.accessToken() + : this.accessToken; + requestOptions.headers["Authorization"] = "Bearer " + accessToken; + } + } +} + +export class ApiKeyAuth implements Authentication { + public apiKey: string = ''; + + constructor(private location: string, private paramName: string) { + } + + applyToRequest(requestOptions: localVarRequest.Options): void { + if (this.location == "query") { + (requestOptions.qs)[this.paramName] = this.apiKey; + } else if (this.location == "header" && requestOptions && requestOptions.headers) { + requestOptions.headers[this.paramName] = this.apiKey; + } else if (this.location == 'cookie' && requestOptions && requestOptions.headers) { + if (requestOptions.headers['Cookie']) { + requestOptions.headers['Cookie'] += '; ' + this.paramName + '=' + encodeURIComponent(this.apiKey); + } + else { + requestOptions.headers['Cookie'] = this.paramName + '=' + encodeURIComponent(this.apiKey); + } + } + } +} + +export class OAuth implements Authentication { + public accessToken: string = ''; + + applyToRequest(requestOptions: localVarRequest.Options): void { + if (requestOptions && requestOptions.headers) { + requestOptions.headers["Authorization"] = "Bearer " + this.accessToken; + } + } +} + +export class VoidAuth implements Authentication { + public username: string = ''; + public password: string = ''; + + applyToRequest(_: localVarRequest.Options): void { + // Do nothing + } +} + +export type Interceptor = (requestOptions: localVarRequest.Options) => (Promise | void); +{{/generateApis}} \ No newline at end of file