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,592 @@
|
|
|
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 IncomingPaymentDetails extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Get an existing Incoming Payment Detail.
|
|
11
|
+
*/
|
|
12
|
+
retrieve(id: string, options?: Core.RequestOptions): Promise<Core.APIResponse<IncomingPaymentDetail>> {
|
|
13
|
+
return this.get(`/api/incoming_payment_details/${id}`, options);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Update an existing Incoming Payment Detail.
|
|
18
|
+
*/
|
|
19
|
+
update(
|
|
20
|
+
id: string,
|
|
21
|
+
body?: IncomingPaymentDetailUpdateParams,
|
|
22
|
+
options?: Core.RequestOptions,
|
|
23
|
+
): Promise<Core.APIResponse<IncomingPaymentDetail>>;
|
|
24
|
+
update(id: string, options?: Core.RequestOptions): Promise<Core.APIResponse<IncomingPaymentDetail>>;
|
|
25
|
+
update(
|
|
26
|
+
id: string,
|
|
27
|
+
body: IncomingPaymentDetailUpdateParams | Core.RequestOptions = {},
|
|
28
|
+
options?: Core.RequestOptions,
|
|
29
|
+
): Promise<Core.APIResponse<IncomingPaymentDetail>> {
|
|
30
|
+
if (isRequestOptions(body)) {
|
|
31
|
+
return this.update(id, {}, body);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
return this.patch(`/api/incoming_payment_details/${id}`, { body, ...options });
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Get a list of Incoming Payment Details.
|
|
39
|
+
*/
|
|
40
|
+
list(
|
|
41
|
+
query?: IncomingPaymentDetailListParams,
|
|
42
|
+
options?: Core.RequestOptions,
|
|
43
|
+
): Core.PagePromise<IncomingPaymentDetailsPage>;
|
|
44
|
+
list(options?: Core.RequestOptions): Core.PagePromise<IncomingPaymentDetailsPage>;
|
|
45
|
+
list(
|
|
46
|
+
query: IncomingPaymentDetailListParams | Core.RequestOptions = {},
|
|
47
|
+
options?: Core.RequestOptions,
|
|
48
|
+
): Core.PagePromise<IncomingPaymentDetailsPage> {
|
|
49
|
+
if (isRequestOptions(query)) {
|
|
50
|
+
return this.list({}, query);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
return this.getAPIList('/api/incoming_payment_details', IncomingPaymentDetailsPage, {
|
|
54
|
+
query,
|
|
55
|
+
...options,
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export class IncomingPaymentDetailsPage extends Page<IncomingPaymentDetail> {}
|
|
61
|
+
|
|
62
|
+
export interface IncomingPaymentDetail {
|
|
63
|
+
/**
|
|
64
|
+
* Value in specified currency's smallest unit. e.g. $10 would be represented
|
|
65
|
+
* as 1000.
|
|
66
|
+
*/
|
|
67
|
+
amount?: number;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* The date on which the corresponding transaction will occur.
|
|
71
|
+
*/
|
|
72
|
+
as_of_date?: string;
|
|
73
|
+
|
|
74
|
+
created_at?: string;
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* The currency of the incoming payment detail.
|
|
78
|
+
*/
|
|
79
|
+
currency?:
|
|
80
|
+
| 'AED'
|
|
81
|
+
| 'AFN'
|
|
82
|
+
| 'ALL'
|
|
83
|
+
| 'AMD'
|
|
84
|
+
| 'ANG'
|
|
85
|
+
| 'AOA'
|
|
86
|
+
| 'ARS'
|
|
87
|
+
| 'AUD'
|
|
88
|
+
| 'AWG'
|
|
89
|
+
| 'AZN'
|
|
90
|
+
| 'BAM'
|
|
91
|
+
| 'BBD'
|
|
92
|
+
| 'BCH'
|
|
93
|
+
| 'BDT'
|
|
94
|
+
| 'BGN'
|
|
95
|
+
| 'BHD'
|
|
96
|
+
| 'BIF'
|
|
97
|
+
| 'BMD'
|
|
98
|
+
| 'BND'
|
|
99
|
+
| 'BOB'
|
|
100
|
+
| 'BRL'
|
|
101
|
+
| 'BSD'
|
|
102
|
+
| 'BTC'
|
|
103
|
+
| 'BTN'
|
|
104
|
+
| 'BWP'
|
|
105
|
+
| 'BYN'
|
|
106
|
+
| 'BYR'
|
|
107
|
+
| 'BZD'
|
|
108
|
+
| 'CAD'
|
|
109
|
+
| 'CDF'
|
|
110
|
+
| 'CHF'
|
|
111
|
+
| 'CLF'
|
|
112
|
+
| 'CLP'
|
|
113
|
+
| 'CNH'
|
|
114
|
+
| 'CNY'
|
|
115
|
+
| 'COP'
|
|
116
|
+
| 'CRC'
|
|
117
|
+
| 'CUC'
|
|
118
|
+
| 'CUP'
|
|
119
|
+
| 'CVE'
|
|
120
|
+
| 'CZK'
|
|
121
|
+
| 'DJF'
|
|
122
|
+
| 'DKK'
|
|
123
|
+
| 'DOP'
|
|
124
|
+
| 'DZD'
|
|
125
|
+
| 'EEK'
|
|
126
|
+
| 'EGP'
|
|
127
|
+
| 'ERN'
|
|
128
|
+
| 'ETB'
|
|
129
|
+
| 'EUR'
|
|
130
|
+
| 'FJD'
|
|
131
|
+
| 'FKP'
|
|
132
|
+
| 'GBP'
|
|
133
|
+
| 'GBX'
|
|
134
|
+
| 'GEL'
|
|
135
|
+
| 'GGP'
|
|
136
|
+
| 'GHS'
|
|
137
|
+
| 'GIP'
|
|
138
|
+
| 'GMD'
|
|
139
|
+
| 'GNF'
|
|
140
|
+
| 'GTQ'
|
|
141
|
+
| 'GYD'
|
|
142
|
+
| 'HKD'
|
|
143
|
+
| 'HNL'
|
|
144
|
+
| 'HRK'
|
|
145
|
+
| 'HTG'
|
|
146
|
+
| 'HUF'
|
|
147
|
+
| 'IDR'
|
|
148
|
+
| 'ILS'
|
|
149
|
+
| 'IMP'
|
|
150
|
+
| 'INR'
|
|
151
|
+
| 'IQD'
|
|
152
|
+
| 'IRR'
|
|
153
|
+
| 'ISK'
|
|
154
|
+
| 'JEP'
|
|
155
|
+
| 'JMD'
|
|
156
|
+
| 'JOD'
|
|
157
|
+
| 'JPY'
|
|
158
|
+
| 'KES'
|
|
159
|
+
| 'KGS'
|
|
160
|
+
| 'KHR'
|
|
161
|
+
| 'KMF'
|
|
162
|
+
| 'KPW'
|
|
163
|
+
| 'KRW'
|
|
164
|
+
| 'KWD'
|
|
165
|
+
| 'KYD'
|
|
166
|
+
| 'KZT'
|
|
167
|
+
| 'LAK'
|
|
168
|
+
| 'LBP'
|
|
169
|
+
| 'LKR'
|
|
170
|
+
| 'LRD'
|
|
171
|
+
| 'LSL'
|
|
172
|
+
| 'LTL'
|
|
173
|
+
| 'LVL'
|
|
174
|
+
| 'LYD'
|
|
175
|
+
| 'MAD'
|
|
176
|
+
| 'MDL'
|
|
177
|
+
| 'MGA'
|
|
178
|
+
| 'MKD'
|
|
179
|
+
| 'MMK'
|
|
180
|
+
| 'MNT'
|
|
181
|
+
| 'MOP'
|
|
182
|
+
| 'MRO'
|
|
183
|
+
| 'MRU'
|
|
184
|
+
| 'MTL'
|
|
185
|
+
| 'MUR'
|
|
186
|
+
| 'MVR'
|
|
187
|
+
| 'MWK'
|
|
188
|
+
| 'MXN'
|
|
189
|
+
| 'MYR'
|
|
190
|
+
| 'MZN'
|
|
191
|
+
| 'NAD'
|
|
192
|
+
| 'NGN'
|
|
193
|
+
| 'NIO'
|
|
194
|
+
| 'NOK'
|
|
195
|
+
| 'NPR'
|
|
196
|
+
| 'NZD'
|
|
197
|
+
| 'OMR'
|
|
198
|
+
| 'PAB'
|
|
199
|
+
| 'PEN'
|
|
200
|
+
| 'PGK'
|
|
201
|
+
| 'PHP'
|
|
202
|
+
| 'PKR'
|
|
203
|
+
| 'PLN'
|
|
204
|
+
| 'PYG'
|
|
205
|
+
| 'QAR'
|
|
206
|
+
| 'RON'
|
|
207
|
+
| 'RSD'
|
|
208
|
+
| 'RUB'
|
|
209
|
+
| 'RWF'
|
|
210
|
+
| 'SAR'
|
|
211
|
+
| 'SBD'
|
|
212
|
+
| 'SCR'
|
|
213
|
+
| 'SDG'
|
|
214
|
+
| 'SEK'
|
|
215
|
+
| 'SGD'
|
|
216
|
+
| 'SHP'
|
|
217
|
+
| 'SKK'
|
|
218
|
+
| 'SLL'
|
|
219
|
+
| 'SOS'
|
|
220
|
+
| 'SRD'
|
|
221
|
+
| 'SSP'
|
|
222
|
+
| 'STD'
|
|
223
|
+
| 'SVC'
|
|
224
|
+
| 'SYP'
|
|
225
|
+
| 'SZL'
|
|
226
|
+
| 'THB'
|
|
227
|
+
| 'TJS'
|
|
228
|
+
| 'TMM'
|
|
229
|
+
| 'TMT'
|
|
230
|
+
| 'TND'
|
|
231
|
+
| 'TOP'
|
|
232
|
+
| 'TRY'
|
|
233
|
+
| 'TTD'
|
|
234
|
+
| 'TWD'
|
|
235
|
+
| 'TZS'
|
|
236
|
+
| 'UAH'
|
|
237
|
+
| 'UGX'
|
|
238
|
+
| 'USD'
|
|
239
|
+
| 'UYU'
|
|
240
|
+
| 'UZS'
|
|
241
|
+
| 'VEF'
|
|
242
|
+
| 'VES'
|
|
243
|
+
| 'VND'
|
|
244
|
+
| 'VUV'
|
|
245
|
+
| 'WST'
|
|
246
|
+
| 'XAF'
|
|
247
|
+
| 'XAG'
|
|
248
|
+
| 'XAU'
|
|
249
|
+
| 'XBA'
|
|
250
|
+
| 'XBB'
|
|
251
|
+
| 'XBC'
|
|
252
|
+
| 'XBD'
|
|
253
|
+
| 'XCD'
|
|
254
|
+
| 'XDR'
|
|
255
|
+
| 'XFU'
|
|
256
|
+
| 'XOF'
|
|
257
|
+
| 'XPD'
|
|
258
|
+
| 'XPF'
|
|
259
|
+
| 'XPT'
|
|
260
|
+
| 'XTS'
|
|
261
|
+
| 'YER'
|
|
262
|
+
| 'ZAR'
|
|
263
|
+
| 'ZMK'
|
|
264
|
+
| 'ZMW'
|
|
265
|
+
| 'ZWD'
|
|
266
|
+
| 'ZWL'
|
|
267
|
+
| 'ZWN'
|
|
268
|
+
| 'ZWR';
|
|
269
|
+
|
|
270
|
+
/**
|
|
271
|
+
* The raw data from the payment pre-notification file that we get from the bank.
|
|
272
|
+
*/
|
|
273
|
+
data?: unknown;
|
|
274
|
+
|
|
275
|
+
/**
|
|
276
|
+
* One of `credit` or `debit`.
|
|
277
|
+
*/
|
|
278
|
+
direction?: 'credit' | 'debit';
|
|
279
|
+
|
|
280
|
+
id?: string;
|
|
281
|
+
|
|
282
|
+
/**
|
|
283
|
+
* The ID of the Internal Account for the incoming payment detail. This is always
|
|
284
|
+
* present.
|
|
285
|
+
*/
|
|
286
|
+
internal_account_id?: string;
|
|
287
|
+
|
|
288
|
+
/**
|
|
289
|
+
* This field will be true if this object exists in the live environment or false
|
|
290
|
+
* if it exists in the test environment.
|
|
291
|
+
*/
|
|
292
|
+
live_mode?: boolean;
|
|
293
|
+
|
|
294
|
+
/**
|
|
295
|
+
* Additional data represented as key-value pairs. Both the key and value must be
|
|
296
|
+
* strings.
|
|
297
|
+
*/
|
|
298
|
+
metadata?: Record<string, string>;
|
|
299
|
+
|
|
300
|
+
object?: string;
|
|
301
|
+
|
|
302
|
+
/**
|
|
303
|
+
* The current status of the incoming payment order. One of `pending`, `completed`,
|
|
304
|
+
* or `returned`.
|
|
305
|
+
*/
|
|
306
|
+
status?: 'completed' | 'pending' | 'returned';
|
|
307
|
+
|
|
308
|
+
/**
|
|
309
|
+
* The ID of the reconciled Transaction or `null`.
|
|
310
|
+
*/
|
|
311
|
+
transaction_id?: string | null;
|
|
312
|
+
|
|
313
|
+
/**
|
|
314
|
+
* The ID of the reconciled Transaction Line Item or `null`.
|
|
315
|
+
*/
|
|
316
|
+
transaction_line_item_id?: string | null;
|
|
317
|
+
|
|
318
|
+
/**
|
|
319
|
+
* One of: `ach`, `wire`, `check`, `rtp`, `sepa`, `signet`.
|
|
320
|
+
*/
|
|
321
|
+
type?: 'ach' | 'book' | 'check' | 'rtp' | 'sepa' | 'signet' | 'wire';
|
|
322
|
+
|
|
323
|
+
updated_at?: string;
|
|
324
|
+
|
|
325
|
+
/**
|
|
326
|
+
* The identifier of the vendor bank.
|
|
327
|
+
*/
|
|
328
|
+
vendor_id?: string | null;
|
|
329
|
+
|
|
330
|
+
/**
|
|
331
|
+
* If the incoming payment detail is in a virtual account, the serialized virtual
|
|
332
|
+
* account object.
|
|
333
|
+
*/
|
|
334
|
+
virtual_account?: IncomingPaymentDetail.VirtualAccount | null;
|
|
335
|
+
|
|
336
|
+
/**
|
|
337
|
+
* If the incoming payment detail is in a virtual account, the ID of the Virtual
|
|
338
|
+
* Account.
|
|
339
|
+
*/
|
|
340
|
+
virtual_account_id?: string | null;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
export namespace IncomingPaymentDetail {
|
|
344
|
+
export interface VirtualAccount {
|
|
345
|
+
/**
|
|
346
|
+
* An array of account detail objects.
|
|
347
|
+
*/
|
|
348
|
+
account_details?: Array<VirtualAccount.AccountDetails>;
|
|
349
|
+
|
|
350
|
+
/**
|
|
351
|
+
* The ID of a counterparty that the virtual account belongs to. Optional.
|
|
352
|
+
*/
|
|
353
|
+
counterparty_id?: string | null;
|
|
354
|
+
|
|
355
|
+
created_at?: string;
|
|
356
|
+
|
|
357
|
+
/**
|
|
358
|
+
* The ID of a credit normal ledger account. When money enters the virtual account,
|
|
359
|
+
* this ledger account will be credited. Must be accompanied by a
|
|
360
|
+
* debit_ledger_account_id if present.
|
|
361
|
+
*/
|
|
362
|
+
credit_ledger_account_id?: string | null;
|
|
363
|
+
|
|
364
|
+
/**
|
|
365
|
+
* The ID of a debit normal ledger account. When money enters the virtual account,
|
|
366
|
+
* this ledger account will be debited. Must be accompanied by a
|
|
367
|
+
* credit_ledger_account_id if present.
|
|
368
|
+
*/
|
|
369
|
+
debit_ledger_account_id?: string | null;
|
|
370
|
+
|
|
371
|
+
/**
|
|
372
|
+
* An optional free-form description for internal use.
|
|
373
|
+
*/
|
|
374
|
+
description?: string | null;
|
|
375
|
+
|
|
376
|
+
discarded_at?: string | null;
|
|
377
|
+
|
|
378
|
+
id?: string;
|
|
379
|
+
|
|
380
|
+
/**
|
|
381
|
+
* The ID of the internal account that the virtual account is in.
|
|
382
|
+
*/
|
|
383
|
+
internal_account_id?: string;
|
|
384
|
+
|
|
385
|
+
/**
|
|
386
|
+
* This field will be true if this object exists in the live environment or false
|
|
387
|
+
* if it exists in the test environment.
|
|
388
|
+
*/
|
|
389
|
+
live_mode?: boolean;
|
|
390
|
+
|
|
391
|
+
/**
|
|
392
|
+
* Additional data represented as key-value pairs. Both the key and value must be
|
|
393
|
+
* strings.
|
|
394
|
+
*/
|
|
395
|
+
metadata?: Record<string, string>;
|
|
396
|
+
|
|
397
|
+
/**
|
|
398
|
+
* The name of the virtual account.
|
|
399
|
+
*/
|
|
400
|
+
name?: string;
|
|
401
|
+
|
|
402
|
+
object?: string;
|
|
403
|
+
|
|
404
|
+
/**
|
|
405
|
+
* An array of routing detail objects. These will be the routing details of the
|
|
406
|
+
* internal account.
|
|
407
|
+
*/
|
|
408
|
+
routing_details?: Array<VirtualAccount.RoutingDetails>;
|
|
409
|
+
|
|
410
|
+
updated_at?: string;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
export namespace VirtualAccount {
|
|
414
|
+
export interface AccountDetails {
|
|
415
|
+
account_number?: string;
|
|
416
|
+
|
|
417
|
+
/**
|
|
418
|
+
* Supports iban and clabe, otherwise other if the bank account number is in a
|
|
419
|
+
* generic format.
|
|
420
|
+
*/
|
|
421
|
+
account_number_type?: 'iban' | 'clabe' | 'wallet_address' | 'pan' | 'other';
|
|
422
|
+
|
|
423
|
+
created_at?: string;
|
|
424
|
+
|
|
425
|
+
discarded_at?: string | null;
|
|
426
|
+
|
|
427
|
+
id?: string;
|
|
428
|
+
|
|
429
|
+
/**
|
|
430
|
+
* This field will be true if this object exists in the live environment or false
|
|
431
|
+
* if it exists in the test environment.
|
|
432
|
+
*/
|
|
433
|
+
live_mode?: boolean;
|
|
434
|
+
|
|
435
|
+
object?: string;
|
|
436
|
+
|
|
437
|
+
updated_at?: string;
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
export interface RoutingDetails {
|
|
441
|
+
bank_address?: RoutingDetails.BankAddress | null;
|
|
442
|
+
|
|
443
|
+
bank_name?: string;
|
|
444
|
+
|
|
445
|
+
created_at?: string;
|
|
446
|
+
|
|
447
|
+
discarded_at?: string | null;
|
|
448
|
+
|
|
449
|
+
id?: string;
|
|
450
|
+
|
|
451
|
+
/**
|
|
452
|
+
* This field will be true if this object exists in the live environment or false
|
|
453
|
+
* if it exists in the test environment.
|
|
454
|
+
*/
|
|
455
|
+
live_mode?: boolean;
|
|
456
|
+
|
|
457
|
+
object?: string;
|
|
458
|
+
|
|
459
|
+
/**
|
|
460
|
+
* If the routing detail is to be used for a specific payment type this field will
|
|
461
|
+
* be populated, otherwise null.
|
|
462
|
+
*/
|
|
463
|
+
payment_type?:
|
|
464
|
+
| 'ach'
|
|
465
|
+
| 'au_becs'
|
|
466
|
+
| 'bacs'
|
|
467
|
+
| 'book'
|
|
468
|
+
| 'card'
|
|
469
|
+
| 'check'
|
|
470
|
+
| 'eft'
|
|
471
|
+
| 'interac'
|
|
472
|
+
| 'provxchange'
|
|
473
|
+
| 'rtp'
|
|
474
|
+
| 'sen'
|
|
475
|
+
| 'sepa'
|
|
476
|
+
| 'signet'
|
|
477
|
+
| 'wire'
|
|
478
|
+
| null;
|
|
479
|
+
|
|
480
|
+
/**
|
|
481
|
+
* The routing number of the bank.
|
|
482
|
+
*/
|
|
483
|
+
routing_number?: string;
|
|
484
|
+
|
|
485
|
+
routing_number_type?:
|
|
486
|
+
| 'aba'
|
|
487
|
+
| 'swift'
|
|
488
|
+
| 'au_bsb'
|
|
489
|
+
| 'ca_cpa'
|
|
490
|
+
| 'cnaps'
|
|
491
|
+
| 'gb_sort_code'
|
|
492
|
+
| 'in_ifsc'
|
|
493
|
+
| 'my_branch_code'
|
|
494
|
+
| 'br_codigo';
|
|
495
|
+
|
|
496
|
+
updated_at?: string;
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
export namespace RoutingDetails {
|
|
500
|
+
export interface BankAddress {
|
|
501
|
+
/**
|
|
502
|
+
* Country code conforms to [ISO 3166-1 alpha-2]
|
|
503
|
+
*/
|
|
504
|
+
country?: string | null;
|
|
505
|
+
|
|
506
|
+
created_at?: string;
|
|
507
|
+
|
|
508
|
+
id?: string;
|
|
509
|
+
|
|
510
|
+
line1?: string | null;
|
|
511
|
+
|
|
512
|
+
line2?: string | null;
|
|
513
|
+
|
|
514
|
+
/**
|
|
515
|
+
* This field will be true if this object exists in the live environment or false
|
|
516
|
+
* if it exists in the test environment.
|
|
517
|
+
*/
|
|
518
|
+
live_mode?: boolean;
|
|
519
|
+
|
|
520
|
+
/**
|
|
521
|
+
* Locality or City.
|
|
522
|
+
*/
|
|
523
|
+
locality?: string | null;
|
|
524
|
+
|
|
525
|
+
object?: string;
|
|
526
|
+
|
|
527
|
+
/**
|
|
528
|
+
* The postal code of the address.
|
|
529
|
+
*/
|
|
530
|
+
postal_code?: string | null;
|
|
531
|
+
|
|
532
|
+
/**
|
|
533
|
+
* Region or State.
|
|
534
|
+
*/
|
|
535
|
+
region?: string | null;
|
|
536
|
+
|
|
537
|
+
updated_at?: string;
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
export interface IncomingPaymentDetailUpdateParams {
|
|
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
|
+
export interface IncomingPaymentDetailListParams extends PageParams {
|
|
552
|
+
/**
|
|
553
|
+
* Filters incoming payment details with an as_of_date starting on or before the
|
|
554
|
+
* specified date (YYYY-MM-DD).
|
|
555
|
+
*/
|
|
556
|
+
as_of_date_end?: string;
|
|
557
|
+
|
|
558
|
+
/**
|
|
559
|
+
* Filters incoming payment details with an as_of_date starting on or after the
|
|
560
|
+
* specified date (YYYY-MM-DD).
|
|
561
|
+
*/
|
|
562
|
+
as_of_date_start?: string;
|
|
563
|
+
|
|
564
|
+
/**
|
|
565
|
+
* One of `credit` or `debit`.
|
|
566
|
+
*/
|
|
567
|
+
direction?: 'credit' | 'debit';
|
|
568
|
+
|
|
569
|
+
/**
|
|
570
|
+
* For example, if you want to query for records with metadata key `Type` and value
|
|
571
|
+
* `Loan`, the query would be `metadata%5BType%5D=Loan`. This encodes the query
|
|
572
|
+
* parameters.
|
|
573
|
+
*/
|
|
574
|
+
metadata?: Record<string, string>;
|
|
575
|
+
|
|
576
|
+
/**
|
|
577
|
+
* The current status of the incoming payment order. One of `pending`, `completed`,
|
|
578
|
+
* or `returned`.
|
|
579
|
+
*/
|
|
580
|
+
status?: 'completed' | 'pending' | 'returned';
|
|
581
|
+
|
|
582
|
+
/**
|
|
583
|
+
* One of: `ach`, `wire`, `check`, `rtp`, `sepa`, `signet`.
|
|
584
|
+
*/
|
|
585
|
+
type?: 'ach' | 'book' | 'check' | 'rtp' | 'sepa' | 'signet' | 'wire';
|
|
586
|
+
|
|
587
|
+
/**
|
|
588
|
+
* If the incoming payment detail is in a virtual account, the ID of the Virtual
|
|
589
|
+
* Account.
|
|
590
|
+
*/
|
|
591
|
+
virtual_account_id?: string;
|
|
592
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless.
|
|
2
|
+
export * from './counterparties';
|
|
3
|
+
export * from './documents';
|
|
4
|
+
export * from './events';
|
|
5
|
+
export * from './expected-payments';
|
|
6
|
+
export * from './external-accounts';
|
|
7
|
+
export * from './incoming-payment-details';
|
|
8
|
+
export * from './internal-accounts';
|
|
9
|
+
export * from './line-items';
|
|
10
|
+
export * from './paper-items';
|
|
11
|
+
export * from './payment-orders/payment-orders';
|
|
12
|
+
export * from './returns';
|
|
13
|
+
export * from './top-level';
|
|
14
|
+
export * from './transactions';
|
|
15
|
+
export * from './validations';
|
|
16
|
+
export * from './webhooks';
|