mangopay4-nodejs-sdk 1.64.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/node.js.yml +32 -0
- package/.github/workflows/npm-publish.yml +26 -0
- package/.jshintrc +16 -0
- package/CHANGELOG.md +946 -0
- package/LICENSE +21 -0
- package/README.md +179 -0
- package/docs/BankAccounts.md +35 -0
- package/docs/BankingAliases.md +108 -0
- package/docs/CardPreAuthorizations.md +55 -0
- package/docs/CardRegistrations.md +55 -0
- package/docs/Cards.md +82 -0
- package/docs/Clients.md +142 -0
- package/docs/DisputeDocuments.md +53 -0
- package/docs/Disputes.md +292 -0
- package/docs/Events.md +23 -0
- package/docs/Hooks.md +68 -0
- package/docs/Idempotency.md +11 -0
- package/docs/KycDocuments.md +52 -0
- package/docs/Mandates.md +125 -0
- package/docs/OptionsHelper.md +32 -0
- package/docs/PayIns.md +72 -0
- package/docs/PayOuts.md +55 -0
- package/docs/README.md +131 -0
- package/docs/Refunds.md +25 -0
- package/docs/Reports.md +63 -0
- package/docs/Repudiations.md +25 -0
- package/docs/Responses.md +33 -0
- package/docs/Transfers.md +72 -0
- package/docs/UboDeclarations.md +70 -0
- package/docs/Users.md +322 -0
- package/docs/Wallets.md +70 -0
- package/docs/templates/class.mustache +11 -0
- package/docs/templates/file.mustache +53 -0
- package/docs/templates/function.mustache +33 -0
- package/docs/templates/index.mustache +26 -0
- package/docs/templates/overview.mustache +1 -0
- package/examples/createUsers.js +112 -0
- package/examples/createWallet.js +28 -0
- package/examples/failedRequest.js +20 -0
- package/examples/getBankAccounts.js +29 -0
- package/examples/getUserEmoney.js +16 -0
- package/examples/getUsers.js +32 -0
- package/examples/readResponseHeaders.js +42 -0
- package/index.js +1 -0
- package/lib/Model.js +58 -0
- package/lib/api.js +467 -0
- package/lib/apiMethods.js +270 -0
- package/lib/config.js +57 -0
- package/lib/log.js +9 -0
- package/lib/mangopay.js +8 -0
- package/lib/models/Address.js +32 -0
- package/lib/models/BankAccount.js +45 -0
- package/lib/models/BankAccountDetails.js +7 -0
- package/lib/models/BankAccountDetailsCA.js +12 -0
- package/lib/models/BankAccountDetailsGB.js +10 -0
- package/lib/models/BankAccountDetailsIBAN.js +10 -0
- package/lib/models/BankAccountDetailsOTHER.js +16 -0
- package/lib/models/BankAccountDetailsUS.js +14 -0
- package/lib/models/BankAccountType.js +8 -0
- package/lib/models/BankingAlias.js +37 -0
- package/lib/models/BankingAliasIBAN.js +27 -0
- package/lib/models/Billing.js +14 -0
- package/lib/models/BinData.js +16 -0
- package/lib/models/Birthplace.js +10 -0
- package/lib/models/BrowserInfo.js +15 -0
- package/lib/models/Card.js +19 -0
- package/lib/models/CardInfo.js +32 -0
- package/lib/models/CardPreAuthorization.js +144 -0
- package/lib/models/CardRegistration.js +29 -0
- package/lib/models/CardValidation.js +19 -0
- package/lib/models/CategorizeUserLegal.js +15 -0
- package/lib/models/CategorizeUserNatural.js +18 -0
- package/lib/models/Check.js +13 -0
- package/lib/models/CheckData.js +8 -0
- package/lib/models/Client.js +62 -0
- package/lib/models/ClientWallet.js +28 -0
- package/lib/models/Conversion.js +19 -0
- package/lib/models/ConversionRate.js +10 -0
- package/lib/models/CountryAuthorization.js +12 -0
- package/lib/models/DebitedBankAccount.js +15 -0
- package/lib/models/DeclaredUbo.js +29 -0
- package/lib/models/DeclaredUboStatus.js +17 -0
- package/lib/models/Deposit.js +29 -0
- package/lib/models/Dispute.js +46 -0
- package/lib/models/DisputeDocument.js +10 -0
- package/lib/models/DisputeDocumentPage.js +12 -0
- package/lib/models/DisputeReason.js +11 -0
- package/lib/models/Document.js +12 -0
- package/lib/models/DocumentPageConsult.js +17 -0
- package/lib/models/EMoney.js +30 -0
- package/lib/models/EntityBase.js +70 -0
- package/lib/models/Hook.js +19 -0
- package/lib/models/IdempotencyResponse.js +11 -0
- package/lib/models/IdentityVerification.js +12 -0
- package/lib/models/KycDocument.js +11 -0
- package/lib/models/KycDocumentStatus.js +7 -0
- package/lib/models/KycDocumentType.js +7 -0
- package/lib/models/KycPage.js +12 -0
- package/lib/models/LegalPersonType.js +7 -0
- package/lib/models/LegalRepresentative.js +16 -0
- package/lib/models/Mandate.js +69 -0
- package/lib/models/MandateStatus.js +7 -0
- package/lib/models/Money.js +16 -0
- package/lib/models/PayByBankSupportedBank.js +7 -0
- package/lib/models/PayIn.js +36 -0
- package/lib/models/PayInExecutionDetails.js +7 -0
- package/lib/models/PayInExecutionDetailsBankingAlias.js +19 -0
- package/lib/models/PayInExecutionDetailsDirect.js +29 -0
- package/lib/models/PayInExecutionDetailsWeb.js +40 -0
- package/lib/models/PayInExecutionType.js +5 -0
- package/lib/models/PayInIntent.js +20 -0
- package/lib/models/PayInIntentSplit.js +14 -0
- package/lib/models/PayInIntentSplits.js +7 -0
- package/lib/models/PayInPaymentDetails.js +7 -0
- package/lib/models/PayInPaymentDetailsApplePay.js +19 -0
- package/lib/models/PayInPaymentDetailsBancontact.js +13 -0
- package/lib/models/PayInPaymentDetailsBankWire.js +23 -0
- package/lib/models/PayInPaymentDetailsBankingAlias.js +18 -0
- package/lib/models/PayInPaymentDetailsBizum.js +23 -0
- package/lib/models/PayInPaymentDetailsBlik.js +17 -0
- package/lib/models/PayInPaymentDetailsCard.js +10 -0
- package/lib/models/PayInPaymentDetailsCardDirect.js +14 -0
- package/lib/models/PayInPaymentDetailsCardWeb.js +28 -0
- package/lib/models/PayInPaymentDetailsDirectDebitDirect.js +22 -0
- package/lib/models/PayInPaymentDetailsDirectDebitWeb.js +13 -0
- package/lib/models/PayInPaymentDetailsGiropay.js +15 -0
- package/lib/models/PayInPaymentDetailsGooglePay.js +35 -0
- package/lib/models/PayInPaymentDetailsIdeal.js +25 -0
- package/lib/models/PayInPaymentDetailsKlarna.js +36 -0
- package/lib/models/PayInPaymentDetailsMbway.js +20 -0
- package/lib/models/PayInPaymentDetailsMultibanco.js +14 -0
- package/lib/models/PayInPaymentDetailsPayByBank.js +71 -0
- package/lib/models/PayInPaymentDetailsPayPal.js +63 -0
- package/lib/models/PayInPaymentDetailsPayconiq.js +23 -0
- package/lib/models/PayInPaymentDetailsPreAuthorized.js +10 -0
- package/lib/models/PayInPaymentDetailsSatispay.js +19 -0
- package/lib/models/PayInPaymentDetailsSwish.js +35 -0
- package/lib/models/PayInPaymentDetailsTwint.js +15 -0
- package/lib/models/PayInPaymentType.js +21 -0
- package/lib/models/PayInRecurringRegistration.js +64 -0
- package/lib/models/PayInTemplateURLOptions.js +10 -0
- package/lib/models/PayOut.js +24 -0
- package/lib/models/PayOutPaymentDetails.js +7 -0
- package/lib/models/PayOutPaymentDetailsBankWire.js +32 -0
- package/lib/models/PayOutPaymentType.js +3 -0
- package/lib/models/PaymentData.js +20 -0
- package/lib/models/PaymentMethodMetadata.js +38 -0
- package/lib/models/PayoutMethods.js +7 -0
- package/lib/models/PendingUserAction.js +16 -0
- package/lib/models/PersonType.js +5 -0
- package/lib/models/PlatformCategorization.js +16 -0
- package/lib/models/PlatformType.js +10 -0
- package/lib/models/Quote.js +11 -0
- package/lib/models/Recipient.js +20 -0
- package/lib/models/RecipientSchema.js +17 -0
- package/lib/models/RecurringPayIn.js +10 -0
- package/lib/models/RecurringPayInCIT.js +32 -0
- package/lib/models/RecurringPayInCurrentState.js +24 -0
- package/lib/models/RecurringPayInMIT.js +27 -0
- package/lib/models/RecurringPayInPut.js +24 -0
- package/lib/models/Refund.js +26 -0
- package/lib/models/RefundReasonDetails.js +10 -0
- package/lib/models/Report.js +54 -0
- package/lib/models/ReportFilter.js +52 -0
- package/lib/models/ReportFilterV2.js +11 -0
- package/lib/models/ReportV2.js +28 -0
- package/lib/models/Repudiation.js +51 -0
- package/lib/models/SecurityInfo.js +12 -0
- package/lib/models/Settlement.js +16 -0
- package/lib/models/SettlementTransfer.js +37 -0
- package/lib/models/Shipping.js +14 -0
- package/lib/models/ShippingAddress.js +25 -0
- package/lib/models/ShippingPreference.js +5 -0
- package/lib/models/Transaction.js +50 -0
- package/lib/models/Transfer.js +13 -0
- package/lib/models/Ubo.js +19 -0
- package/lib/models/UboDeclaration.js +42 -0
- package/lib/models/UboDeclarationRefusedReasonType.js +23 -0
- package/lib/models/UboDeclarationStatus.js +26 -0
- package/lib/models/UboRefusedReasonType.js +14 -0
- package/lib/models/User.js +66 -0
- package/lib/models/UserCategory.js +5 -0
- package/lib/models/UserConsent.js +7 -0
- package/lib/models/UserDataFormatValidation.js +7 -0
- package/lib/models/UserEnrollmentResult.js +7 -0
- package/lib/models/UserLegal.js +65 -0
- package/lib/models/UserLegalOwner.js +66 -0
- package/lib/models/UserLegalPayer.js +66 -0
- package/lib/models/UserLegalSca.js +57 -0
- package/lib/models/UserNatural.js +51 -0
- package/lib/models/UserNaturalCapacity.js +13 -0
- package/lib/models/UserNaturalOwner.js +55 -0
- package/lib/models/UserNaturalPayer.js +55 -0
- package/lib/models/UserNaturalPut.js +49 -0
- package/lib/models/UserNaturalSca.js +56 -0
- package/lib/models/VirtualAccount.js +22 -0
- package/lib/models/Wallet.js +32 -0
- package/lib/models/index.js +102 -0
- package/lib/service.js +14 -0
- package/lib/services/BankAccounts.js +31 -0
- package/lib/services/BankingAliases.js +137 -0
- package/lib/services/CardPreAuthorizations.js +75 -0
- package/lib/services/CardRegistrations.js +64 -0
- package/lib/services/Cards.js +168 -0
- package/lib/services/Clients.js +196 -0
- package/lib/services/Conversions.js +155 -0
- package/lib/services/Deposits.js +109 -0
- package/lib/services/DisputeDocuments.js +65 -0
- package/lib/services/Disputes.js +409 -0
- package/lib/services/Events.js +24 -0
- package/lib/services/Hooks.js +81 -0
- package/lib/services/Idempotency.js +17 -0
- package/lib/services/IdentityVerifications.js +48 -0
- package/lib/services/KycDocuments.js +66 -0
- package/lib/services/Mandates.js +161 -0
- package/lib/services/OptionsHelper.js +20 -0
- package/lib/services/PayIns.js +690 -0
- package/lib/services/PayOuts.js +110 -0
- package/lib/services/Recipients.js +117 -0
- package/lib/services/Refunds.js +29 -0
- package/lib/services/Regulatory.js +29 -0
- package/lib/services/Reports.js +61 -0
- package/lib/services/ReportsV2.js +55 -0
- package/lib/services/Repudiations.js +33 -0
- package/lib/services/Responses.js +23 -0
- package/lib/services/Settlements.js +74 -0
- package/lib/services/Transfers.js +87 -0
- package/lib/services/UboDeclarations.js +135 -0
- package/lib/services/Users.js +831 -0
- package/lib/services/VirtualAccounts.js +99 -0
- package/lib/services/Wallets.js +85 -0
- package/lib/services/index.js +34 -0
- package/lib/utils.js +36 -0
- package/package.json +40 -0
- package/test/TestKycPageFile.png +0 -0
- package/test/helpers.js +1431 -0
- package/test/main.js +10 -0
- package/test/mocha.opts +3 -0
- package/test/services/BankAccounts.js +46 -0
- package/test/services/BankingAliases.js +89 -0
- package/test/services/CardPreAuthorizations.js +70 -0
- package/test/services/CardRegistrations.js +239 -0
- package/test/services/Cards.js +54 -0
- package/test/services/Clients.js +235 -0
- package/test/services/Conversions.js +308 -0
- package/test/services/Deposits.js +148 -0
- package/test/services/Disputes.js +542 -0
- package/test/services/EMoney.js +54 -0
- package/test/services/Events.js +143 -0
- package/test/services/Hooks.js +109 -0
- package/test/services/Idempotency.js +46 -0
- package/test/services/IdentityVerifications.js +68 -0
- package/test/services/KycDocuments.js +73 -0
- package/test/services/Mandates.js +256 -0
- package/test/services/PayIns.js +2553 -0
- package/test/services/PayOuts.js +106 -0
- package/test/services/RateLimit.js +48 -0
- package/test/services/Recipients.js +234 -0
- package/test/services/Refunds.js +123 -0
- package/test/services/Regulatory.js +45 -0
- package/test/services/Reports.js +114 -0
- package/test/services/ReportsV2.js +306 -0
- package/test/services/Repudiations.js +22 -0
- package/test/services/Settlements.js +58 -0
- package/test/services/Tokens.js +55 -0
- package/test/services/Transfers.js +137 -0
- package/test/services/UboDeclarations.js +135 -0
- package/test/services/Users.js +1303 -0
- package/test/services/VirtualAccounts.js +105 -0
- package/test/services/Wallets.js +132 -0
- package/test/settlement_sample.csv +8 -0
- package/typings/base.d.ts +308 -0
- package/typings/enums.d.ts +204 -0
- package/typings/index.d.ts +885 -0
- package/typings/index.test-d.ts +1535 -0
- package/typings/models/address.d.ts +70 -0
- package/typings/models/bankAccount.d.ts +235 -0
- package/typings/models/bankingAlias.d.ts +97 -0
- package/typings/models/billing.d.ts +42 -0
- package/typings/models/birthplace.d.ts +9 -0
- package/typings/models/card.d.ts +119 -0
- package/typings/models/cardPreauthorization.d.ts +157 -0
- package/typings/models/cardRegistration.d.ts +83 -0
- package/typings/models/cardValidation.d.ts +125 -0
- package/typings/models/client.d.ts +208 -0
- package/typings/models/conversion.d.ts +225 -0
- package/typings/models/conversionRate.d.ts +29 -0
- package/typings/models/countryAuthorization.d.ts +16 -0
- package/typings/models/deposit.d.ts +104 -0
- package/typings/models/dispute.d.ts +116 -0
- package/typings/models/disputeDocument.d.ts +119 -0
- package/typings/models/entityBase.d.ts +9 -0
- package/typings/models/event.d.ts +142 -0
- package/typings/models/hook.d.ts +39 -0
- package/typings/models/idempotency.d.ts +36 -0
- package/typings/models/identityVerification.d.ts +98 -0
- package/typings/models/kycDocument.d.ts +114 -0
- package/typings/models/mandate.d.ts +93 -0
- package/typings/models/money.d.ts +45 -0
- package/typings/models/payIn.d.ts +3742 -0
- package/typings/models/payOut.d.ts +144 -0
- package/typings/models/recipient.d.ts +242 -0
- package/typings/models/refund.d.ts +92 -0
- package/typings/models/report.d.ts +234 -0
- package/typings/models/reportV2.d.ts +145 -0
- package/typings/models/repudiation.d.ts +26 -0
- package/typings/models/securityInfo.d.ts +12 -0
- package/typings/models/settlement.d.ts +50 -0
- package/typings/models/settlementTransfer.d.ts +37 -0
- package/typings/models/shipping.d.ts +37 -0
- package/typings/models/shippingAddress.d.ts +15 -0
- package/typings/models/transaction.d.ts +85 -0
- package/typings/models/transfer.d.ts +119 -0
- package/typings/models/uboDeclaration.d.ts +100 -0
- package/typings/models/user.d.ts +1001 -0
- package/typings/models/virtualAccount.d.ts +182 -0
- package/typings/models/wallet.d.ts +46 -0
- package/typings/models.d.ts +74 -0
- package/typings/services/BankAccounts.d.ts +12 -0
- package/typings/services/BankingAliases.d.ts +51 -0
- package/typings/services/CardPreauthorizations.d.ts +44 -0
- package/typings/services/CardRegistrations.d.ts +43 -0
- package/typings/services/Cards.d.ts +80 -0
- package/typings/services/Clients.d.ts +77 -0
- package/typings/services/Conversions.d.ts +23 -0
- package/typings/services/Deposits.d.ts +20 -0
- package/typings/services/DisputeDocuments.d.ts +27 -0
- package/typings/services/Disputes.d.ts +169 -0
- package/typings/services/Events.d.ts +11 -0
- package/typings/services/Hooks.d.ts +33 -0
- package/typings/services/Idempotency.d.ts +7 -0
- package/typings/services/IdentityVerifications.d.ts +29 -0
- package/typings/services/KycDocuments.d.ts +38 -0
- package/typings/services/Mandates.d.ts +59 -0
- package/typings/services/OptionsHelper.d.ts +11 -0
- package/typings/services/PayIns.d.ts +319 -0
- package/typings/services/PayOuts.d.ts +34 -0
- package/typings/services/Recipients.d.ts +55 -0
- package/typings/services/Refunds.d.ts +12 -0
- package/typings/services/Regulatory.d.ts +17 -0
- package/typings/services/Reports.d.ts +26 -0
- package/typings/services/ReportsV2.d.ts +26 -0
- package/typings/services/Repudiations.d.ts +12 -0
- package/typings/services/Responses.d.ts +10 -0
- package/typings/services/Settlements.d.ts +28 -0
- package/typings/services/Transfers.d.ts +38 -0
- package/typings/services/UboDeclarations.d.ts +81 -0
- package/typings/services/Users.d.ts +308 -0
- package/typings/services/VirtualAccounts.d.ts +42 -0
- package/typings/services/Wallets.d.ts +36 -0
- package/typings/tsconfig.json +20 -0
- package/typings/tslint.json +11 -0
- package/typings/types.d.ts +652 -0
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { CountryISO } from "../types";
|
|
2
|
+
import { Models } from "../models";
|
|
3
|
+
|
|
4
|
+
export namespace address {
|
|
5
|
+
type AddressType = string | AddressData | Models.Address | CreateAddress;
|
|
6
|
+
|
|
7
|
+
interface AddressData {
|
|
8
|
+
/**
|
|
9
|
+
* The first line of the address
|
|
10
|
+
*/
|
|
11
|
+
AddressLine1: string;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* The second line of the address
|
|
15
|
+
*/
|
|
16
|
+
AddressLine2?: string;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* The city of the address
|
|
20
|
+
*/
|
|
21
|
+
City: string;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* The region of the address - this is optional except if the Country is US, CA or MX
|
|
25
|
+
*/
|
|
26
|
+
Region?: string;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* The postal code of the address - can be alphanumeric, dashes or spaces
|
|
30
|
+
*/
|
|
31
|
+
PostalCode: string;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* The Country of the Address
|
|
35
|
+
*/
|
|
36
|
+
Country: CountryISO;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
interface CreateAddress {
|
|
40
|
+
/**
|
|
41
|
+
* The first line of the address
|
|
42
|
+
*/
|
|
43
|
+
AddressLine1: string;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* The second line of the address
|
|
47
|
+
*/
|
|
48
|
+
AddressLine2?: string;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* The city of the address
|
|
52
|
+
*/
|
|
53
|
+
City: string;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* The region of the address - this is optional except if the Country is US, CA or MX
|
|
57
|
+
*/
|
|
58
|
+
Region?: string;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* The postal code of the address - can be alphanumeric, dashes or spaces
|
|
62
|
+
*/
|
|
63
|
+
PostalCode: string;
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* The Country of the Address
|
|
67
|
+
*/
|
|
68
|
+
Country: CountryISO;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
import { Models } from "../models";
|
|
2
|
+
import { CountryISO } from "../types";
|
|
3
|
+
import { address } from "./address";
|
|
4
|
+
import { entityBase } from "./entityBase";
|
|
5
|
+
|
|
6
|
+
export namespace bankAccount {
|
|
7
|
+
type CAData = BaseData & CADetails;
|
|
8
|
+
|
|
9
|
+
type USData = BaseData & USDetails;
|
|
10
|
+
|
|
11
|
+
type BankAccountType = "IBAN" | "GB" | "US" | "CA" | "OTHER";
|
|
12
|
+
|
|
13
|
+
type DepositAccountType = "CHECKING" | "SAVINGS";
|
|
14
|
+
|
|
15
|
+
type GBData = BaseData & GBDetails;
|
|
16
|
+
|
|
17
|
+
type OtherData = BaseData & OtherDetails;
|
|
18
|
+
|
|
19
|
+
type IBANData = BaseData & IBANDetails;
|
|
20
|
+
|
|
21
|
+
type Data = OtherData | CAData | GBData | IBANData | USData;
|
|
22
|
+
|
|
23
|
+
type DataIntersection = OtherData & CAData & GBData & IBANData & USData;
|
|
24
|
+
|
|
25
|
+
type CreationDetails =
|
|
26
|
+
| OtherDetails
|
|
27
|
+
| CADetails
|
|
28
|
+
| GBDetails
|
|
29
|
+
| IBANDetails
|
|
30
|
+
| USDetails;
|
|
31
|
+
|
|
32
|
+
interface BaseData extends entityBase.EntityBaseData {
|
|
33
|
+
/**
|
|
34
|
+
* The object owner's UserId
|
|
35
|
+
*/
|
|
36
|
+
UserId: string;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* The type of bank account
|
|
40
|
+
*/
|
|
41
|
+
Type: BankAccountType;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* The name of the owner of the bank account
|
|
45
|
+
*/
|
|
46
|
+
OwnerName: string;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* The address of the owner of the bank account
|
|
50
|
+
*/
|
|
51
|
+
OwnerAddress: address.AddressType;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* @deprecated
|
|
55
|
+
*/
|
|
56
|
+
Details?: Models.BankAccountDetails;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Whether the bank account is active or not
|
|
60
|
+
*/
|
|
61
|
+
Active: boolean;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
interface IBANDetails {
|
|
65
|
+
Type: "IBAN";
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* The address of the owner of the bank account
|
|
69
|
+
*/
|
|
70
|
+
OwnerAddress: address.AddressType;
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* The name of the owner of the bank account
|
|
74
|
+
*/
|
|
75
|
+
OwnerName: string;
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* The IBAN of the bank account
|
|
79
|
+
*/
|
|
80
|
+
IBAN: string;
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* The BIC of the bank account
|
|
84
|
+
*/
|
|
85
|
+
BIC?: string;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
interface USDetails {
|
|
89
|
+
Type: "US";
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* The address of the owner of the bank account
|
|
93
|
+
*/
|
|
94
|
+
OwnerAddress: address.AddressType;
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* The name of the owner of the bank account
|
|
98
|
+
*/
|
|
99
|
+
OwnerName: string;
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* The account number of the bank account. US account numbers must be digits only.
|
|
103
|
+
*/
|
|
104
|
+
AccountNumber: string;
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* The ABA of the bank account. Must be numbers only, and 9 digits long
|
|
108
|
+
*/
|
|
109
|
+
ABA: string;
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* The type of account
|
|
113
|
+
*/
|
|
114
|
+
DepositAccountType?: DepositAccountType;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
interface CADetails {
|
|
118
|
+
Type: "CA";
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* The address of the owner of the bank account
|
|
122
|
+
*/
|
|
123
|
+
OwnerAddress: address.AddressType;
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* The name of the owner of the bank account
|
|
127
|
+
*/
|
|
128
|
+
OwnerName: string;
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* The branch code of the bank where the bank account. Must be numbers only, and 5 digits long
|
|
132
|
+
*/
|
|
133
|
+
BranchCode: string;
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* The institution number of the bank account. Must be numbers only, and 3 or 4 digits long
|
|
137
|
+
*/
|
|
138
|
+
InstitutionNumber: string;
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* The account number of the bank account. Must be numbers only. Canadian account numbers must be a maximum of 20 digits.
|
|
142
|
+
*/
|
|
143
|
+
AccountNumber: string;
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* The name of the bank where the account is held. Must be letters or numbers only and maximum 50 characters long.
|
|
147
|
+
*/
|
|
148
|
+
BankName: string;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
interface GBDetails {
|
|
152
|
+
Type: "GB";
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* The address of the owner of the bank account
|
|
156
|
+
*/
|
|
157
|
+
OwnerAddress: address.AddressType;
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* The name of the owner of the bank account
|
|
161
|
+
*/
|
|
162
|
+
OwnerName: string;
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* The sort code of the bank account. Must be numbers only, and 6 digits long
|
|
166
|
+
*/
|
|
167
|
+
SortCode: string;
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* The account number of the bank account. Must be numbers only. GB account numbers must be 8 digits long.
|
|
171
|
+
*/
|
|
172
|
+
AccountNumber: string;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
interface OtherDetails {
|
|
176
|
+
Type: "OTHER";
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* The address of the owner of the bank account
|
|
180
|
+
*/
|
|
181
|
+
OwnerAddress: address.AddressType;
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* The name of the owner of the bank account
|
|
185
|
+
*/
|
|
186
|
+
OwnerName: string;
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* The Country of the Address
|
|
190
|
+
*/
|
|
191
|
+
Country: CountryISO;
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* The BIC of the bank account
|
|
195
|
+
*/
|
|
196
|
+
BIC: string;
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* The account number of the bank account. Must be numbers only. Canadian account numbers must be a maximum of 20 digits.
|
|
200
|
+
*/
|
|
201
|
+
AccountNumber: string;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
interface DebitedBankAccountData {
|
|
205
|
+
/**
|
|
206
|
+
* The name of the owner of the bank account
|
|
207
|
+
*/
|
|
208
|
+
OwnerName: string;
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* The account number of the bank account. Must be numbers only. Canadian account numbers must be a maximum of 20 digits.
|
|
212
|
+
*/
|
|
213
|
+
AccountNumber: string;
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* The IBAN of the bank account
|
|
217
|
+
*/
|
|
218
|
+
IBAN: string;
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* The BIC of the bank account
|
|
222
|
+
*/
|
|
223
|
+
BIC: string;
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* The Type of the bank account
|
|
227
|
+
*/
|
|
228
|
+
Type: BankAccountType;
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
* The Country ISO
|
|
232
|
+
*/
|
|
233
|
+
Country: CountryISO;
|
|
234
|
+
}
|
|
235
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { CountryISO, PickPartialRequired } from "../types";
|
|
2
|
+
import { entityBase } from "./entityBase";
|
|
3
|
+
|
|
4
|
+
export namespace bankingAlias {
|
|
5
|
+
type BankingAliasType = "IBAN";
|
|
6
|
+
|
|
7
|
+
interface BankingAliasData extends entityBase.EntityBaseData {
|
|
8
|
+
/**
|
|
9
|
+
* The user ID who is credited (defaults to the owner of the wallet)
|
|
10
|
+
*/
|
|
11
|
+
CreditedUserId: string;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* The ID of a wallet
|
|
15
|
+
*/
|
|
16
|
+
WalletId: string;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* The Country of the Address
|
|
20
|
+
*/
|
|
21
|
+
Country: CountryISO;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* The type of banking alias (note that only IBAN is available at present)
|
|
25
|
+
*/
|
|
26
|
+
Type: BankingAliasType;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* The owner of the wallet/banking alias
|
|
30
|
+
*/
|
|
31
|
+
OwnerName: string;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Whether the banking alias is active or not
|
|
35
|
+
*/
|
|
36
|
+
Active: boolean;
|
|
37
|
+
|
|
38
|
+
VirtualAccountPurpose: string;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
interface IBANBankingAliasData extends BankingAliasData {
|
|
42
|
+
/**
|
|
43
|
+
* The type of banking alias (note that only IBAN is available at present)
|
|
44
|
+
*/
|
|
45
|
+
Type: "IBAN";
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* The IBAN of the banking alias
|
|
49
|
+
*/
|
|
50
|
+
IBAN: string;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* The BIC of the banking alias
|
|
54
|
+
*/
|
|
55
|
+
BIC: string;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
interface CreateIBANBankingAlias {
|
|
59
|
+
/**
|
|
60
|
+
* The type of banking alias (note that only IBAN is available at present)
|
|
61
|
+
*/
|
|
62
|
+
Type: "IBAN";
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* The ID of a wallet
|
|
66
|
+
*/
|
|
67
|
+
WalletId: string;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* The owner of the wallet/banking alias
|
|
71
|
+
*/
|
|
72
|
+
OwnerName: string;
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* The Country of the Address
|
|
76
|
+
*/
|
|
77
|
+
Country: CountryISO;
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Custom data that you can add to this object
|
|
81
|
+
*/
|
|
82
|
+
Tag?: string;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
interface UpdateIBANBankingAlias {
|
|
86
|
+
/**
|
|
87
|
+
* The ID of the BankingAlias
|
|
88
|
+
*/
|
|
89
|
+
Id: string;
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Whether the banking alias is active or not
|
|
93
|
+
* Caution: Setting this value to false is irreversible
|
|
94
|
+
*/
|
|
95
|
+
Active?: boolean;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Models } from "../models";
|
|
2
|
+
import { address } from "./address";
|
|
3
|
+
|
|
4
|
+
export namespace billing {
|
|
5
|
+
interface BillingData {
|
|
6
|
+
Address: Models.Address | address.AddressData | string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
interface CompleteBillingData {
|
|
10
|
+
FirstName: string;
|
|
11
|
+
|
|
12
|
+
LastName: string;
|
|
13
|
+
|
|
14
|
+
Address: address.AddressData;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// todo: replace with CompleteBillingData
|
|
18
|
+
interface BillingOrShippingRecurringPayInData {
|
|
19
|
+
FirstName: string;
|
|
20
|
+
|
|
21
|
+
LastName: string;
|
|
22
|
+
|
|
23
|
+
Address: address.AddressData;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
interface CreateBilling {
|
|
27
|
+
/**
|
|
28
|
+
* The name of the user
|
|
29
|
+
*/
|
|
30
|
+
FirstName: string;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* The last name of the user
|
|
34
|
+
*/
|
|
35
|
+
LastName: string;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* The address
|
|
39
|
+
*/
|
|
40
|
+
Address: address.CreateAddress;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { CountryISO, CurrencyISO } from "../types";
|
|
2
|
+
import { entityBase } from "./entityBase";
|
|
3
|
+
|
|
4
|
+
export namespace card {
|
|
5
|
+
type CardType = "CB_VISA_MASTERCARD" | "DINERS" | "MASTERPASS" | "MAESTRO" | "P24" | "IDEAL" | "BCMC" | "PAYLIB";
|
|
6
|
+
|
|
7
|
+
type CardStatus = "CREATED" | "VALIDATED" | "ERROR";
|
|
8
|
+
|
|
9
|
+
type CardValidity = "UNKNOWN" | "VALID" | "INVALID";
|
|
10
|
+
|
|
11
|
+
type CardInfoType = "DEBIT" | "CREDIT" | "CHARGE CARD";
|
|
12
|
+
|
|
13
|
+
interface CardData extends entityBase.EntityBaseData {
|
|
14
|
+
/**
|
|
15
|
+
* The expiry date of the card - must be in format MMYY
|
|
16
|
+
*/
|
|
17
|
+
ExpirationDate: string;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* A partially obfuscated version of the credit card number
|
|
21
|
+
*/
|
|
22
|
+
Alias: string;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* The provider of the card
|
|
26
|
+
*/
|
|
27
|
+
CardProvider: string;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* The type of card
|
|
31
|
+
*/
|
|
32
|
+
CardType: CardType;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* The Country of the Address
|
|
36
|
+
*/
|
|
37
|
+
Country: string;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* The card product type - more info
|
|
41
|
+
*/
|
|
42
|
+
Product: string;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* The bank code
|
|
46
|
+
*/
|
|
47
|
+
BankCode: string;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Whether the card is active or not
|
|
51
|
+
*/
|
|
52
|
+
Active: boolean;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* The currency - should be ISO_4217 format
|
|
56
|
+
*/
|
|
57
|
+
Currency: CurrencyISO;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Whether the card is valid or not. Once they process (or attempt to process) a payment with the card we are able to indicate if it is "valid" or "invalid".
|
|
61
|
+
* If they didn’t process a payment yet the "Validity" stay at "unknown".
|
|
62
|
+
*/
|
|
63
|
+
Validity: CardValidity;
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* The unique identifier of the user the card belongs to.
|
|
68
|
+
*/
|
|
69
|
+
UserId: string;
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* A unique representation of a 16-digits card number
|
|
73
|
+
*/
|
|
74
|
+
Fingerprint: string;
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* The cardholder’s name shown on the payment card
|
|
78
|
+
*/
|
|
79
|
+
CardHolderName: string;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
interface UpdateCard {
|
|
83
|
+
Id: string;
|
|
84
|
+
Active?: false;
|
|
85
|
+
CardHolderName?: string;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
interface CardInfoData {
|
|
89
|
+
/**
|
|
90
|
+
* The 6-digit bank identification number (BIN) of the card issuer.
|
|
91
|
+
*/
|
|
92
|
+
BIN: string;
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* The name of the card issuer.
|
|
96
|
+
*/
|
|
97
|
+
IssuingBank: string;
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* The country where the card was issued.
|
|
101
|
+
*/
|
|
102
|
+
IssuerCountryCode: CountryISO;
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* The type of card product: DEBIT, CREDIT, CHARGE CARD.
|
|
106
|
+
*/
|
|
107
|
+
Type: CardInfoType;
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* The card brand. Examples include: AMERICAN EXPRESS, DISCOVER, JCB, MASTERCARD, VISA, etc.
|
|
111
|
+
*/
|
|
112
|
+
Brand: string;
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* The subtype of the card product. Examples include: CLASSIC, GOLD, PLATINUM, PREPAID, etc.
|
|
116
|
+
*/
|
|
117
|
+
SubType: string;
|
|
118
|
+
}
|
|
119
|
+
}
|