modern-treasury 0.0.1
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/.eslintrc.js +10 -0
- package/.prettierrc +6 -0
- package/LICENSE +7 -0
- package/README.md +198 -0
- package/build +10 -0
- package/core.ts +746 -0
- package/dist/cjs/core.d.ts +215 -0
- package/dist/cjs/core.js +815 -0
- package/dist/cjs/core.js.map +1 -0
- package/dist/cjs/index.d.ts +118 -0
- package/dist/cjs/index.js +128 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/pagination.d.ts +14 -0
- package/dist/cjs/pagination.js +22 -0
- package/dist/cjs/pagination.js.map +1 -0
- package/dist/cjs/resource.d.ts +11 -0
- package/dist/cjs/resource.js +16 -0
- package/dist/cjs/resource.js.map +1 -0
- package/dist/cjs/resources/counterparties.d.ts +500 -0
- package/dist/cjs/resources/counterparties.js +57 -0
- package/dist/cjs/resources/counterparties.js.map +1 -0
- package/dist/cjs/resources/documents.d.ts +66 -0
- package/dist/cjs/resources/documents.js +23 -0
- package/dist/cjs/resources/documents.js.map +1 -0
- package/dist/cjs/resources/events.d.ts +53 -0
- package/dist/cjs/resources/events.js +22 -0
- package/dist/cjs/resources/events.js.map +1 -0
- package/dist/cjs/resources/expected-payments.d.ts +928 -0
- package/dist/cjs/resources/expected-payments.js +31 -0
- package/dist/cjs/resources/expected-payments.js.map +1 -0
- package/dist/cjs/resources/external-accounts.d.ts +597 -0
- package/dist/cjs/resources/external-accounts.js +51 -0
- package/dist/cjs/resources/external-accounts.js.map +1 -0
- package/dist/cjs/resources/incoming-payment-details.d.ts +487 -0
- package/dist/cjs/resources/incoming-payment-details.js +35 -0
- package/dist/cjs/resources/incoming-payment-details.js.map +1 -0
- package/dist/cjs/resources/index.d.ts +15 -0
- package/dist/cjs/resources/index.js +46 -0
- package/dist/cjs/resources/index.js.map +1 -0
- package/dist/cjs/resources/internal-accounts.d.ts +666 -0
- package/dist/cjs/resources/internal-accounts.js +31 -0
- package/dist/cjs/resources/internal-accounts.js.map +1 -0
- package/dist/cjs/resources/line-items.d.ts +90 -0
- package/dist/cjs/resources/line-items.js +38 -0
- package/dist/cjs/resources/line-items.js.map +1 -0
- package/dist/cjs/resources/paper-items.d.ts +279 -0
- package/dist/cjs/resources/paper-items.js +25 -0
- package/dist/cjs/resources/paper-items.js.map +1 -0
- package/dist/cjs/resources/payment-orders/index.d.ts +2 -0
- package/dist/cjs/resources/payment-orders/index.js +33 -0
- package/dist/cjs/resources/payment-orders/index.js.map +1 -0
- package/dist/cjs/resources/payment-orders/payment-orders.d.ts +2180 -0
- package/dist/cjs/resources/payment-orders/payment-orders.js +56 -0
- package/dist/cjs/resources/payment-orders/payment-orders.js.map +1 -0
- package/dist/cjs/resources/payment-orders/reversals.d.ts +46 -0
- package/dist/cjs/resources/payment-orders/reversals.js +23 -0
- package/dist/cjs/resources/payment-orders/reversals.js.map +1 -0
- package/dist/cjs/resources/returns.d.ts +487 -0
- package/dist/cjs/resources/returns.js +31 -0
- package/dist/cjs/resources/returns.js.map +1 -0
- package/dist/cjs/resources/top-level.d.ts +3 -0
- package/dist/cjs/resources/top-level.js +4 -0
- package/dist/cjs/resources/top-level.js.map +1 -0
- package/dist/cjs/resources/transactions.d.ts +377 -0
- package/dist/cjs/resources/transactions.js +31 -0
- package/dist/cjs/resources/transactions.js.map +1 -0
- package/dist/cjs/resources/validations.d.ts +97 -0
- package/dist/cjs/resources/validations.js +16 -0
- package/dist/cjs/resources/validations.js.map +1 -0
- package/dist/cjs/resources/webhooks.d.ts +31 -0
- package/dist/cjs/resources/webhooks.js +44 -0
- package/dist/cjs/resources/webhooks.js.map +1 -0
- package/dist/cjs/tests/api-resources/counterparties.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/counterparties.test.js +275 -0
- package/dist/cjs/tests/api-resources/counterparties.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/documents.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/documents.test.js +78 -0
- package/dist/cjs/tests/api-resources/documents.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/events.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/events.test.js +100 -0
- package/dist/cjs/tests/api-resources/events.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/expected-payments.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/expected-payments.test.js +176 -0
- package/dist/cjs/tests/api-resources/expected-payments.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/external-accounts.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/external-accounts.test.js +248 -0
- package/dist/cjs/tests/api-resources/external-accounts.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/incoming-payment-details.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/incoming-payment-details.test.js +130 -0
- package/dist/cjs/tests/api-resources/incoming-payment-details.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/internal-accounts.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/internal-accounts.test.js +144 -0
- package/dist/cjs/tests/api-resources/internal-accounts.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/line-items.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/line-items.test.js +123 -0
- package/dist/cjs/tests/api-resources/line-items.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/paper-items.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/paper-items.test.js +96 -0
- package/dist/cjs/tests/api-resources/paper-items.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/payment-orders/payment-orders.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/payment-orders/payment-orders.test.js +77 -0
- package/dist/cjs/tests/api-resources/payment-orders/payment-orders.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/returns.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/returns.test.js +116 -0
- package/dist/cjs/tests/api-resources/returns.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/top-level.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/top-level.test.js +59 -0
- package/dist/cjs/tests/api-resources/top-level.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/transactions.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/transactions.test.js +134 -0
- package/dist/cjs/tests/api-resources/transactions.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/validations.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/validations.test.js +62 -0
- package/dist/cjs/tests/api-resources/validations.test.js.map +1 -0
- package/dist/cjs/tests/api-resources/webhooks.test.d.ts +1 -0
- package/dist/cjs/tests/api-resources/webhooks.test.js +100 -0
- package/dist/cjs/tests/api-resources/webhooks.test.js.map +1 -0
- package/dist/cjs/tests/form.test.d.ts +1 -0
- package/dist/cjs/tests/form.test.js +61 -0
- package/dist/cjs/tests/form.test.js.map +1 -0
- package/dist/cjs/tests/index.test.d.ts +1 -0
- package/dist/cjs/tests/index.test.js +57 -0
- package/dist/cjs/tests/index.test.js.map +1 -0
- package/dist/cjs/tests/responses.test.d.ts +1 -0
- package/dist/cjs/tests/responses.test.js +60 -0
- package/dist/cjs/tests/responses.test.js.map +1 -0
- package/index.ts +175 -0
- package/jest.config.js +8 -0
- package/package.json +47 -0
- package/pagination.ts +36 -0
- package/resource.ts +22 -0
- package/resources/counterparties.ts +666 -0
- package/resources/documents.ts +97 -0
- package/resources/events.ts +86 -0
- package/resources/expected-payments.ts +1016 -0
- package/resources/external-accounts.ts +762 -0
- package/resources/incoming-payment-details.ts +592 -0
- package/resources/index.ts +16 -0
- package/resources/internal-accounts.ts +774 -0
- package/resources/line-items.ts +138 -0
- package/resources/paper-items.ts +317 -0
- package/resources/payment-orders/index.ts +3 -0
- package/resources/payment-orders/payment-orders.ts +2486 -0
- package/resources/payment-orders/reversals.ts +72 -0
- package/resources/returns.ts +545 -0
- package/resources/top-level.ts +5 -0
- package/resources/transactions.ts +441 -0
- package/resources/validations.ts +115 -0
- package/resources/webhooks.ts +48 -0
- package/tests/api-resources/counterparties.test.ts +237 -0
- package/tests/api-resources/documents.test.ts +40 -0
- package/tests/api-resources/events.test.ts +62 -0
- package/tests/api-resources/expected-payments.test.ts +138 -0
- package/tests/api-resources/external-accounts.test.ts +210 -0
- package/tests/api-resources/incoming-payment-details.test.ts +92 -0
- package/tests/api-resources/internal-accounts.test.ts +103 -0
- package/tests/api-resources/line-items.test.ts +85 -0
- package/tests/api-resources/paper-items.test.ts +58 -0
- package/tests/api-resources/payment-orders/payment-orders.test.ts +39 -0
- package/tests/api-resources/returns.test.ts +78 -0
- package/tests/api-resources/top-level.test.ts +21 -0
- package/tests/api-resources/transactions.test.ts +96 -0
- package/tests/api-resources/validations.test.ts +24 -0
- package/tests/api-resources/webhooks.test.ts +102 -0
- package/tests/form.test.ts +27 -0
- package/tests/index.test.ts +62 -0
- package/tests/responses.test.ts +25 -0
- package/tsconfig.cjs.json +8 -0
- package/tsconfig.json +36 -0
|
@@ -0,0 +1,774 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless.
|
|
2
|
+
|
|
3
|
+
import * as Core from '~/core';
|
|
4
|
+
import { APIResource } from '~/resource';
|
|
5
|
+
import { isRequestOptions } from '~/core';
|
|
6
|
+
import { Page, PageParams } from '~/pagination';
|
|
7
|
+
|
|
8
|
+
export class InternalAccounts extends APIResource {
|
|
9
|
+
create(
|
|
10
|
+
body: InternalAccountCreateParams,
|
|
11
|
+
options?: Core.RequestOptions,
|
|
12
|
+
): Promise<Core.APIResponse<InternalAccount>> {
|
|
13
|
+
return this.post('/api/internal_accounts', { body, ...options });
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
retrieve(id: string, options?: Core.RequestOptions): Promise<Core.APIResponse<InternalAccount>> {
|
|
17
|
+
return this.get(`/api/internal_accounts/${id}`, options);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
update(
|
|
21
|
+
id: string,
|
|
22
|
+
body?: InternalAccountUpdateParams,
|
|
23
|
+
options?: Core.RequestOptions,
|
|
24
|
+
): Promise<Core.APIResponse<InternalAccount>>;
|
|
25
|
+
update(id: string, options?: Core.RequestOptions): Promise<Core.APIResponse<InternalAccount>>;
|
|
26
|
+
update(
|
|
27
|
+
id: string,
|
|
28
|
+
body: InternalAccountUpdateParams | Core.RequestOptions = {},
|
|
29
|
+
options?: Core.RequestOptions,
|
|
30
|
+
): Promise<Core.APIResponse<InternalAccount>> {
|
|
31
|
+
if (isRequestOptions(body)) {
|
|
32
|
+
return this.update(id, {}, body);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
return this.patch(`/api/internal_accounts/${id}`, { body, ...options });
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
list(
|
|
39
|
+
query?: InternalAccountListParams,
|
|
40
|
+
options?: Core.RequestOptions,
|
|
41
|
+
): Core.PagePromise<InternalAccountsPage>;
|
|
42
|
+
list(options?: Core.RequestOptions): Core.PagePromise<InternalAccountsPage>;
|
|
43
|
+
list(
|
|
44
|
+
query: InternalAccountListParams | Core.RequestOptions = {},
|
|
45
|
+
options?: Core.RequestOptions,
|
|
46
|
+
): Core.PagePromise<InternalAccountsPage> {
|
|
47
|
+
if (isRequestOptions(query)) {
|
|
48
|
+
return this.list({}, query);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
return this.getAPIList('/api/internal_accounts', InternalAccountsPage, { query, ...options });
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export class InternalAccountsPage extends Page<InternalAccount> {}
|
|
56
|
+
|
|
57
|
+
export interface InternalAccount {
|
|
58
|
+
/**
|
|
59
|
+
* An array of account detail objects.
|
|
60
|
+
*/
|
|
61
|
+
account_details?: Array<InternalAccount.AccountDetails>;
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Can be checking, savings or other.
|
|
65
|
+
*/
|
|
66
|
+
account_type?: 'checking' | 'other' | 'savings' | null;
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Specifies which financial institution the accounts belong to.
|
|
70
|
+
*/
|
|
71
|
+
connection?: InternalAccount.Connection;
|
|
72
|
+
|
|
73
|
+
created_at?: string;
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* The currency of the account.
|
|
77
|
+
*/
|
|
78
|
+
currency?:
|
|
79
|
+
| 'AED'
|
|
80
|
+
| 'AFN'
|
|
81
|
+
| 'ALL'
|
|
82
|
+
| 'AMD'
|
|
83
|
+
| 'ANG'
|
|
84
|
+
| 'AOA'
|
|
85
|
+
| 'ARS'
|
|
86
|
+
| 'AUD'
|
|
87
|
+
| 'AWG'
|
|
88
|
+
| 'AZN'
|
|
89
|
+
| 'BAM'
|
|
90
|
+
| 'BBD'
|
|
91
|
+
| 'BCH'
|
|
92
|
+
| 'BDT'
|
|
93
|
+
| 'BGN'
|
|
94
|
+
| 'BHD'
|
|
95
|
+
| 'BIF'
|
|
96
|
+
| 'BMD'
|
|
97
|
+
| 'BND'
|
|
98
|
+
| 'BOB'
|
|
99
|
+
| 'BRL'
|
|
100
|
+
| 'BSD'
|
|
101
|
+
| 'BTC'
|
|
102
|
+
| 'BTN'
|
|
103
|
+
| 'BWP'
|
|
104
|
+
| 'BYN'
|
|
105
|
+
| 'BYR'
|
|
106
|
+
| 'BZD'
|
|
107
|
+
| 'CAD'
|
|
108
|
+
| 'CDF'
|
|
109
|
+
| 'CHF'
|
|
110
|
+
| 'CLF'
|
|
111
|
+
| 'CLP'
|
|
112
|
+
| 'CNH'
|
|
113
|
+
| 'CNY'
|
|
114
|
+
| 'COP'
|
|
115
|
+
| 'CRC'
|
|
116
|
+
| 'CUC'
|
|
117
|
+
| 'CUP'
|
|
118
|
+
| 'CVE'
|
|
119
|
+
| 'CZK'
|
|
120
|
+
| 'DJF'
|
|
121
|
+
| 'DKK'
|
|
122
|
+
| 'DOP'
|
|
123
|
+
| 'DZD'
|
|
124
|
+
| 'EEK'
|
|
125
|
+
| 'EGP'
|
|
126
|
+
| 'ERN'
|
|
127
|
+
| 'ETB'
|
|
128
|
+
| 'EUR'
|
|
129
|
+
| 'FJD'
|
|
130
|
+
| 'FKP'
|
|
131
|
+
| 'GBP'
|
|
132
|
+
| 'GBX'
|
|
133
|
+
| 'GEL'
|
|
134
|
+
| 'GGP'
|
|
135
|
+
| 'GHS'
|
|
136
|
+
| 'GIP'
|
|
137
|
+
| 'GMD'
|
|
138
|
+
| 'GNF'
|
|
139
|
+
| 'GTQ'
|
|
140
|
+
| 'GYD'
|
|
141
|
+
| 'HKD'
|
|
142
|
+
| 'HNL'
|
|
143
|
+
| 'HRK'
|
|
144
|
+
| 'HTG'
|
|
145
|
+
| 'HUF'
|
|
146
|
+
| 'IDR'
|
|
147
|
+
| 'ILS'
|
|
148
|
+
| 'IMP'
|
|
149
|
+
| 'INR'
|
|
150
|
+
| 'IQD'
|
|
151
|
+
| 'IRR'
|
|
152
|
+
| 'ISK'
|
|
153
|
+
| 'JEP'
|
|
154
|
+
| 'JMD'
|
|
155
|
+
| 'JOD'
|
|
156
|
+
| 'JPY'
|
|
157
|
+
| 'KES'
|
|
158
|
+
| 'KGS'
|
|
159
|
+
| 'KHR'
|
|
160
|
+
| 'KMF'
|
|
161
|
+
| 'KPW'
|
|
162
|
+
| 'KRW'
|
|
163
|
+
| 'KWD'
|
|
164
|
+
| 'KYD'
|
|
165
|
+
| 'KZT'
|
|
166
|
+
| 'LAK'
|
|
167
|
+
| 'LBP'
|
|
168
|
+
| 'LKR'
|
|
169
|
+
| 'LRD'
|
|
170
|
+
| 'LSL'
|
|
171
|
+
| 'LTL'
|
|
172
|
+
| 'LVL'
|
|
173
|
+
| 'LYD'
|
|
174
|
+
| 'MAD'
|
|
175
|
+
| 'MDL'
|
|
176
|
+
| 'MGA'
|
|
177
|
+
| 'MKD'
|
|
178
|
+
| 'MMK'
|
|
179
|
+
| 'MNT'
|
|
180
|
+
| 'MOP'
|
|
181
|
+
| 'MRO'
|
|
182
|
+
| 'MRU'
|
|
183
|
+
| 'MTL'
|
|
184
|
+
| 'MUR'
|
|
185
|
+
| 'MVR'
|
|
186
|
+
| 'MWK'
|
|
187
|
+
| 'MXN'
|
|
188
|
+
| 'MYR'
|
|
189
|
+
| 'MZN'
|
|
190
|
+
| 'NAD'
|
|
191
|
+
| 'NGN'
|
|
192
|
+
| 'NIO'
|
|
193
|
+
| 'NOK'
|
|
194
|
+
| 'NPR'
|
|
195
|
+
| 'NZD'
|
|
196
|
+
| 'OMR'
|
|
197
|
+
| 'PAB'
|
|
198
|
+
| 'PEN'
|
|
199
|
+
| 'PGK'
|
|
200
|
+
| 'PHP'
|
|
201
|
+
| 'PKR'
|
|
202
|
+
| 'PLN'
|
|
203
|
+
| 'PYG'
|
|
204
|
+
| 'QAR'
|
|
205
|
+
| 'RON'
|
|
206
|
+
| 'RSD'
|
|
207
|
+
| 'RUB'
|
|
208
|
+
| 'RWF'
|
|
209
|
+
| 'SAR'
|
|
210
|
+
| 'SBD'
|
|
211
|
+
| 'SCR'
|
|
212
|
+
| 'SDG'
|
|
213
|
+
| 'SEK'
|
|
214
|
+
| 'SGD'
|
|
215
|
+
| 'SHP'
|
|
216
|
+
| 'SKK'
|
|
217
|
+
| 'SLL'
|
|
218
|
+
| 'SOS'
|
|
219
|
+
| 'SRD'
|
|
220
|
+
| 'SSP'
|
|
221
|
+
| 'STD'
|
|
222
|
+
| 'SVC'
|
|
223
|
+
| 'SYP'
|
|
224
|
+
| 'SZL'
|
|
225
|
+
| 'THB'
|
|
226
|
+
| 'TJS'
|
|
227
|
+
| 'TMM'
|
|
228
|
+
| 'TMT'
|
|
229
|
+
| 'TND'
|
|
230
|
+
| 'TOP'
|
|
231
|
+
| 'TRY'
|
|
232
|
+
| 'TTD'
|
|
233
|
+
| 'TWD'
|
|
234
|
+
| 'TZS'
|
|
235
|
+
| 'UAH'
|
|
236
|
+
| 'UGX'
|
|
237
|
+
| 'USD'
|
|
238
|
+
| 'UYU'
|
|
239
|
+
| 'UZS'
|
|
240
|
+
| 'VEF'
|
|
241
|
+
| 'VES'
|
|
242
|
+
| 'VND'
|
|
243
|
+
| 'VUV'
|
|
244
|
+
| 'WST'
|
|
245
|
+
| 'XAF'
|
|
246
|
+
| 'XAG'
|
|
247
|
+
| 'XAU'
|
|
248
|
+
| 'XBA'
|
|
249
|
+
| 'XBB'
|
|
250
|
+
| 'XBC'
|
|
251
|
+
| 'XBD'
|
|
252
|
+
| 'XCD'
|
|
253
|
+
| 'XDR'
|
|
254
|
+
| 'XFU'
|
|
255
|
+
| 'XOF'
|
|
256
|
+
| 'XPD'
|
|
257
|
+
| 'XPF'
|
|
258
|
+
| 'XPT'
|
|
259
|
+
| 'XTS'
|
|
260
|
+
| 'YER'
|
|
261
|
+
| 'ZAR'
|
|
262
|
+
| 'ZMK'
|
|
263
|
+
| 'ZMW'
|
|
264
|
+
| 'ZWD'
|
|
265
|
+
| 'ZWL'
|
|
266
|
+
| 'ZWN'
|
|
267
|
+
| 'ZWR';
|
|
268
|
+
|
|
269
|
+
id?: string;
|
|
270
|
+
|
|
271
|
+
/**
|
|
272
|
+
* This field will be true if this object exists in the live environment or false
|
|
273
|
+
* if it exists in the test environment.
|
|
274
|
+
*/
|
|
275
|
+
live_mode?: boolean;
|
|
276
|
+
|
|
277
|
+
/**
|
|
278
|
+
* Additional data represented as key-value pairs. Both the key and value must be
|
|
279
|
+
* strings.
|
|
280
|
+
*/
|
|
281
|
+
metadata?: Record<string, string>;
|
|
282
|
+
|
|
283
|
+
/**
|
|
284
|
+
* A nickname for the account.
|
|
285
|
+
*/
|
|
286
|
+
name?: string | null;
|
|
287
|
+
|
|
288
|
+
object?: string;
|
|
289
|
+
|
|
290
|
+
/**
|
|
291
|
+
* The address associated with the owner or null.
|
|
292
|
+
*/
|
|
293
|
+
party_address?: InternalAccount.PartyAddress | null;
|
|
294
|
+
|
|
295
|
+
/**
|
|
296
|
+
* The legal name of the entity which owns the account.
|
|
297
|
+
*/
|
|
298
|
+
party_name?: string;
|
|
299
|
+
|
|
300
|
+
/**
|
|
301
|
+
* Either individual or business.
|
|
302
|
+
*/
|
|
303
|
+
party_type?: 'business' | 'individual' | null;
|
|
304
|
+
|
|
305
|
+
/**
|
|
306
|
+
* An array of routing detail objects.
|
|
307
|
+
*/
|
|
308
|
+
routing_details?: Array<InternalAccount.RoutingDetails>;
|
|
309
|
+
|
|
310
|
+
updated_at?: string;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
export namespace InternalAccount {
|
|
314
|
+
export interface PartyAddress {
|
|
315
|
+
/**
|
|
316
|
+
* Country code conforms to [ISO 3166-1 alpha-2]
|
|
317
|
+
*/
|
|
318
|
+
country?: string | null;
|
|
319
|
+
|
|
320
|
+
created_at?: string;
|
|
321
|
+
|
|
322
|
+
id?: string;
|
|
323
|
+
|
|
324
|
+
line1?: string | null;
|
|
325
|
+
|
|
326
|
+
line2?: string | null;
|
|
327
|
+
|
|
328
|
+
/**
|
|
329
|
+
* This field will be true if this object exists in the live environment or false
|
|
330
|
+
* if it exists in the test environment.
|
|
331
|
+
*/
|
|
332
|
+
live_mode?: boolean;
|
|
333
|
+
|
|
334
|
+
/**
|
|
335
|
+
* Locality or City.
|
|
336
|
+
*/
|
|
337
|
+
locality?: string | null;
|
|
338
|
+
|
|
339
|
+
object?: string;
|
|
340
|
+
|
|
341
|
+
/**
|
|
342
|
+
* The postal code of the address.
|
|
343
|
+
*/
|
|
344
|
+
postal_code?: string | null;
|
|
345
|
+
|
|
346
|
+
/**
|
|
347
|
+
* Region or State.
|
|
348
|
+
*/
|
|
349
|
+
region?: string | null;
|
|
350
|
+
|
|
351
|
+
updated_at?: string;
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
export interface AccountDetails {
|
|
355
|
+
account_number?: string;
|
|
356
|
+
|
|
357
|
+
/**
|
|
358
|
+
* Supports iban and clabe, otherwise other if the bank account number is in a
|
|
359
|
+
* generic format.
|
|
360
|
+
*/
|
|
361
|
+
account_number_type?: 'iban' | 'clabe' | 'wallet_address' | 'pan' | 'other';
|
|
362
|
+
|
|
363
|
+
created_at?: string;
|
|
364
|
+
|
|
365
|
+
discarded_at?: string | null;
|
|
366
|
+
|
|
367
|
+
id?: string;
|
|
368
|
+
|
|
369
|
+
/**
|
|
370
|
+
* This field will be true if this object exists in the live environment or false
|
|
371
|
+
* if it exists in the test environment.
|
|
372
|
+
*/
|
|
373
|
+
live_mode?: boolean;
|
|
374
|
+
|
|
375
|
+
object?: string;
|
|
376
|
+
|
|
377
|
+
updated_at?: string;
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
export interface RoutingDetails {
|
|
381
|
+
bank_address?: RoutingDetails.BankAddress | null;
|
|
382
|
+
|
|
383
|
+
bank_name?: string;
|
|
384
|
+
|
|
385
|
+
created_at?: string;
|
|
386
|
+
|
|
387
|
+
discarded_at?: string | null;
|
|
388
|
+
|
|
389
|
+
id?: string;
|
|
390
|
+
|
|
391
|
+
/**
|
|
392
|
+
* This field will be true if this object exists in the live environment or false
|
|
393
|
+
* if it exists in the test environment.
|
|
394
|
+
*/
|
|
395
|
+
live_mode?: boolean;
|
|
396
|
+
|
|
397
|
+
object?: string;
|
|
398
|
+
|
|
399
|
+
/**
|
|
400
|
+
* If the routing detail is to be used for a specific payment type this field will
|
|
401
|
+
* be populated, otherwise null.
|
|
402
|
+
*/
|
|
403
|
+
payment_type?:
|
|
404
|
+
| 'ach'
|
|
405
|
+
| 'au_becs'
|
|
406
|
+
| 'bacs'
|
|
407
|
+
| 'book'
|
|
408
|
+
| 'card'
|
|
409
|
+
| 'check'
|
|
410
|
+
| 'eft'
|
|
411
|
+
| 'interac'
|
|
412
|
+
| 'provxchange'
|
|
413
|
+
| 'rtp'
|
|
414
|
+
| 'sen'
|
|
415
|
+
| 'sepa'
|
|
416
|
+
| 'signet'
|
|
417
|
+
| 'wire'
|
|
418
|
+
| null;
|
|
419
|
+
|
|
420
|
+
/**
|
|
421
|
+
* The routing number of the bank.
|
|
422
|
+
*/
|
|
423
|
+
routing_number?: string;
|
|
424
|
+
|
|
425
|
+
routing_number_type?:
|
|
426
|
+
| 'aba'
|
|
427
|
+
| 'swift'
|
|
428
|
+
| 'au_bsb'
|
|
429
|
+
| 'ca_cpa'
|
|
430
|
+
| 'cnaps'
|
|
431
|
+
| 'gb_sort_code'
|
|
432
|
+
| 'in_ifsc'
|
|
433
|
+
| 'my_branch_code'
|
|
434
|
+
| 'br_codigo';
|
|
435
|
+
|
|
436
|
+
updated_at?: string;
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
export namespace RoutingDetails {
|
|
440
|
+
export interface BankAddress {
|
|
441
|
+
/**
|
|
442
|
+
* Country code conforms to [ISO 3166-1 alpha-2]
|
|
443
|
+
*/
|
|
444
|
+
country?: string | null;
|
|
445
|
+
|
|
446
|
+
created_at?: string;
|
|
447
|
+
|
|
448
|
+
id?: string;
|
|
449
|
+
|
|
450
|
+
line1?: string | null;
|
|
451
|
+
|
|
452
|
+
line2?: string | null;
|
|
453
|
+
|
|
454
|
+
/**
|
|
455
|
+
* This field will be true if this object exists in the live environment or false
|
|
456
|
+
* if it exists in the test environment.
|
|
457
|
+
*/
|
|
458
|
+
live_mode?: boolean;
|
|
459
|
+
|
|
460
|
+
/**
|
|
461
|
+
* Locality or City.
|
|
462
|
+
*/
|
|
463
|
+
locality?: string | null;
|
|
464
|
+
|
|
465
|
+
object?: string;
|
|
466
|
+
|
|
467
|
+
/**
|
|
468
|
+
* The postal code of the address.
|
|
469
|
+
*/
|
|
470
|
+
postal_code?: string | null;
|
|
471
|
+
|
|
472
|
+
/**
|
|
473
|
+
* Region or State.
|
|
474
|
+
*/
|
|
475
|
+
region?: string | null;
|
|
476
|
+
|
|
477
|
+
updated_at?: string;
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
export interface Connection {
|
|
482
|
+
created_at?: string;
|
|
483
|
+
|
|
484
|
+
discarded_at?: string | null;
|
|
485
|
+
|
|
486
|
+
id?: string;
|
|
487
|
+
|
|
488
|
+
/**
|
|
489
|
+
* This field will be true if this object exists in the live environment or false
|
|
490
|
+
* if it exists in the test environment.
|
|
491
|
+
*/
|
|
492
|
+
live_mode?: boolean;
|
|
493
|
+
|
|
494
|
+
object?: string;
|
|
495
|
+
|
|
496
|
+
updated_at?: string;
|
|
497
|
+
|
|
498
|
+
/**
|
|
499
|
+
* The identifier of the vendor bank.
|
|
500
|
+
*/
|
|
501
|
+
vendor_customer_id?: string | null;
|
|
502
|
+
|
|
503
|
+
/**
|
|
504
|
+
* The identifier of the vendor bank.
|
|
505
|
+
*/
|
|
506
|
+
vendor_id?: string;
|
|
507
|
+
|
|
508
|
+
/**
|
|
509
|
+
* The name of the vendor bank.
|
|
510
|
+
*/
|
|
511
|
+
vendor_name?: string;
|
|
512
|
+
}
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
export interface InternalAccountCreateParams {
|
|
516
|
+
/**
|
|
517
|
+
* The identifier of the financial institution the account belongs to.
|
|
518
|
+
*/
|
|
519
|
+
connection_id: string;
|
|
520
|
+
|
|
521
|
+
/**
|
|
522
|
+
* Either "USD" or "CAD". Internal accounts created at Increase only supports
|
|
523
|
+
* "USD".
|
|
524
|
+
*/
|
|
525
|
+
currency: 'USD' | 'CAD';
|
|
526
|
+
|
|
527
|
+
/**
|
|
528
|
+
* The nickname of the account.
|
|
529
|
+
*/
|
|
530
|
+
name: string;
|
|
531
|
+
|
|
532
|
+
/**
|
|
533
|
+
* The legal name of the entity which owns the account.
|
|
534
|
+
*/
|
|
535
|
+
party_name: string;
|
|
536
|
+
|
|
537
|
+
/**
|
|
538
|
+
* The identifier of the entity at Increase which owns the account.
|
|
539
|
+
*/
|
|
540
|
+
entity_id?: string;
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
export interface InternalAccountUpdateParams {
|
|
544
|
+
/**
|
|
545
|
+
* Additional data in the form of key-value pairs. Pairs can be removed by passing
|
|
546
|
+
* an empty string or `null` as the value.
|
|
547
|
+
*/
|
|
548
|
+
metadata?: Record<string, string>;
|
|
549
|
+
|
|
550
|
+
/**
|
|
551
|
+
* The nickname for the internal account.
|
|
552
|
+
*/
|
|
553
|
+
name?: string;
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
export interface InternalAccountListParams extends PageParams {
|
|
557
|
+
/**
|
|
558
|
+
* The currency associated with the internal account.
|
|
559
|
+
*/
|
|
560
|
+
currency?:
|
|
561
|
+
| 'AED'
|
|
562
|
+
| 'AFN'
|
|
563
|
+
| 'ALL'
|
|
564
|
+
| 'AMD'
|
|
565
|
+
| 'ANG'
|
|
566
|
+
| 'AOA'
|
|
567
|
+
| 'ARS'
|
|
568
|
+
| 'AUD'
|
|
569
|
+
| 'AWG'
|
|
570
|
+
| 'AZN'
|
|
571
|
+
| 'BAM'
|
|
572
|
+
| 'BBD'
|
|
573
|
+
| 'BCH'
|
|
574
|
+
| 'BDT'
|
|
575
|
+
| 'BGN'
|
|
576
|
+
| 'BHD'
|
|
577
|
+
| 'BIF'
|
|
578
|
+
| 'BMD'
|
|
579
|
+
| 'BND'
|
|
580
|
+
| 'BOB'
|
|
581
|
+
| 'BRL'
|
|
582
|
+
| 'BSD'
|
|
583
|
+
| 'BTC'
|
|
584
|
+
| 'BTN'
|
|
585
|
+
| 'BWP'
|
|
586
|
+
| 'BYN'
|
|
587
|
+
| 'BYR'
|
|
588
|
+
| 'BZD'
|
|
589
|
+
| 'CAD'
|
|
590
|
+
| 'CDF'
|
|
591
|
+
| 'CHF'
|
|
592
|
+
| 'CLF'
|
|
593
|
+
| 'CLP'
|
|
594
|
+
| 'CNH'
|
|
595
|
+
| 'CNY'
|
|
596
|
+
| 'COP'
|
|
597
|
+
| 'CRC'
|
|
598
|
+
| 'CUC'
|
|
599
|
+
| 'CUP'
|
|
600
|
+
| 'CVE'
|
|
601
|
+
| 'CZK'
|
|
602
|
+
| 'DJF'
|
|
603
|
+
| 'DKK'
|
|
604
|
+
| 'DOP'
|
|
605
|
+
| 'DZD'
|
|
606
|
+
| 'EEK'
|
|
607
|
+
| 'EGP'
|
|
608
|
+
| 'ERN'
|
|
609
|
+
| 'ETB'
|
|
610
|
+
| 'EUR'
|
|
611
|
+
| 'FJD'
|
|
612
|
+
| 'FKP'
|
|
613
|
+
| 'GBP'
|
|
614
|
+
| 'GBX'
|
|
615
|
+
| 'GEL'
|
|
616
|
+
| 'GGP'
|
|
617
|
+
| 'GHS'
|
|
618
|
+
| 'GIP'
|
|
619
|
+
| 'GMD'
|
|
620
|
+
| 'GNF'
|
|
621
|
+
| 'GTQ'
|
|
622
|
+
| 'GYD'
|
|
623
|
+
| 'HKD'
|
|
624
|
+
| 'HNL'
|
|
625
|
+
| 'HRK'
|
|
626
|
+
| 'HTG'
|
|
627
|
+
| 'HUF'
|
|
628
|
+
| 'IDR'
|
|
629
|
+
| 'ILS'
|
|
630
|
+
| 'IMP'
|
|
631
|
+
| 'INR'
|
|
632
|
+
| 'IQD'
|
|
633
|
+
| 'IRR'
|
|
634
|
+
| 'ISK'
|
|
635
|
+
| 'JEP'
|
|
636
|
+
| 'JMD'
|
|
637
|
+
| 'JOD'
|
|
638
|
+
| 'JPY'
|
|
639
|
+
| 'KES'
|
|
640
|
+
| 'KGS'
|
|
641
|
+
| 'KHR'
|
|
642
|
+
| 'KMF'
|
|
643
|
+
| 'KPW'
|
|
644
|
+
| 'KRW'
|
|
645
|
+
| 'KWD'
|
|
646
|
+
| 'KYD'
|
|
647
|
+
| 'KZT'
|
|
648
|
+
| 'LAK'
|
|
649
|
+
| 'LBP'
|
|
650
|
+
| 'LKR'
|
|
651
|
+
| 'LRD'
|
|
652
|
+
| 'LSL'
|
|
653
|
+
| 'LTL'
|
|
654
|
+
| 'LVL'
|
|
655
|
+
| 'LYD'
|
|
656
|
+
| 'MAD'
|
|
657
|
+
| 'MDL'
|
|
658
|
+
| 'MGA'
|
|
659
|
+
| 'MKD'
|
|
660
|
+
| 'MMK'
|
|
661
|
+
| 'MNT'
|
|
662
|
+
| 'MOP'
|
|
663
|
+
| 'MRO'
|
|
664
|
+
| 'MRU'
|
|
665
|
+
| 'MTL'
|
|
666
|
+
| 'MUR'
|
|
667
|
+
| 'MVR'
|
|
668
|
+
| 'MWK'
|
|
669
|
+
| 'MXN'
|
|
670
|
+
| 'MYR'
|
|
671
|
+
| 'MZN'
|
|
672
|
+
| 'NAD'
|
|
673
|
+
| 'NGN'
|
|
674
|
+
| 'NIO'
|
|
675
|
+
| 'NOK'
|
|
676
|
+
| 'NPR'
|
|
677
|
+
| 'NZD'
|
|
678
|
+
| 'OMR'
|
|
679
|
+
| 'PAB'
|
|
680
|
+
| 'PEN'
|
|
681
|
+
| 'PGK'
|
|
682
|
+
| 'PHP'
|
|
683
|
+
| 'PKR'
|
|
684
|
+
| 'PLN'
|
|
685
|
+
| 'PYG'
|
|
686
|
+
| 'QAR'
|
|
687
|
+
| 'RON'
|
|
688
|
+
| 'RSD'
|
|
689
|
+
| 'RUB'
|
|
690
|
+
| 'RWF'
|
|
691
|
+
| 'SAR'
|
|
692
|
+
| 'SBD'
|
|
693
|
+
| 'SCR'
|
|
694
|
+
| 'SDG'
|
|
695
|
+
| 'SEK'
|
|
696
|
+
| 'SGD'
|
|
697
|
+
| 'SHP'
|
|
698
|
+
| 'SKK'
|
|
699
|
+
| 'SLL'
|
|
700
|
+
| 'SOS'
|
|
701
|
+
| 'SRD'
|
|
702
|
+
| 'SSP'
|
|
703
|
+
| 'STD'
|
|
704
|
+
| 'SVC'
|
|
705
|
+
| 'SYP'
|
|
706
|
+
| 'SZL'
|
|
707
|
+
| 'THB'
|
|
708
|
+
| 'TJS'
|
|
709
|
+
| 'TMM'
|
|
710
|
+
| 'TMT'
|
|
711
|
+
| 'TND'
|
|
712
|
+
| 'TOP'
|
|
713
|
+
| 'TRY'
|
|
714
|
+
| 'TTD'
|
|
715
|
+
| 'TWD'
|
|
716
|
+
| 'TZS'
|
|
717
|
+
| 'UAH'
|
|
718
|
+
| 'UGX'
|
|
719
|
+
| 'USD'
|
|
720
|
+
| 'UYU'
|
|
721
|
+
| 'UZS'
|
|
722
|
+
| 'VEF'
|
|
723
|
+
| 'VES'
|
|
724
|
+
| 'VND'
|
|
725
|
+
| 'VUV'
|
|
726
|
+
| 'WST'
|
|
727
|
+
| 'XAF'
|
|
728
|
+
| 'XAG'
|
|
729
|
+
| 'XAU'
|
|
730
|
+
| 'XBA'
|
|
731
|
+
| 'XBB'
|
|
732
|
+
| 'XBC'
|
|
733
|
+
| 'XBD'
|
|
734
|
+
| 'XCD'
|
|
735
|
+
| 'XDR'
|
|
736
|
+
| 'XFU'
|
|
737
|
+
| 'XOF'
|
|
738
|
+
| 'XPD'
|
|
739
|
+
| 'XPF'
|
|
740
|
+
| 'XPT'
|
|
741
|
+
| 'XTS'
|
|
742
|
+
| 'YER'
|
|
743
|
+
| 'ZAR'
|
|
744
|
+
| 'ZMK'
|
|
745
|
+
| 'ZMW'
|
|
746
|
+
| 'ZWD'
|
|
747
|
+
| 'ZWL'
|
|
748
|
+
| 'ZWN'
|
|
749
|
+
| 'ZWR';
|
|
750
|
+
|
|
751
|
+
/**
|
|
752
|
+
* The direction of payments that can be made by internal account.
|
|
753
|
+
*/
|
|
754
|
+
payment_direction?: 'credit' | 'debit';
|
|
755
|
+
|
|
756
|
+
/**
|
|
757
|
+
* The type of payment that can be made by the internal account.
|
|
758
|
+
*/
|
|
759
|
+
payment_type?:
|
|
760
|
+
| 'ach'
|
|
761
|
+
| 'au_becs'
|
|
762
|
+
| 'bacs'
|
|
763
|
+
| 'book'
|
|
764
|
+
| 'card'
|
|
765
|
+
| 'check'
|
|
766
|
+
| 'eft'
|
|
767
|
+
| 'interac'
|
|
768
|
+
| 'provxchange'
|
|
769
|
+
| 'rtp'
|
|
770
|
+
| 'sen'
|
|
771
|
+
| 'sepa'
|
|
772
|
+
| 'signet'
|
|
773
|
+
| 'wire';
|
|
774
|
+
}
|