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.
Files changed (169) hide show
  1. package/.eslintrc.js +10 -0
  2. package/.prettierrc +6 -0
  3. package/LICENSE +7 -0
  4. package/README.md +198 -0
  5. package/build +10 -0
  6. package/core.ts +746 -0
  7. package/dist/cjs/core.d.ts +215 -0
  8. package/dist/cjs/core.js +815 -0
  9. package/dist/cjs/core.js.map +1 -0
  10. package/dist/cjs/index.d.ts +118 -0
  11. package/dist/cjs/index.js +128 -0
  12. package/dist/cjs/index.js.map +1 -0
  13. package/dist/cjs/pagination.d.ts +14 -0
  14. package/dist/cjs/pagination.js +22 -0
  15. package/dist/cjs/pagination.js.map +1 -0
  16. package/dist/cjs/resource.d.ts +11 -0
  17. package/dist/cjs/resource.js +16 -0
  18. package/dist/cjs/resource.js.map +1 -0
  19. package/dist/cjs/resources/counterparties.d.ts +500 -0
  20. package/dist/cjs/resources/counterparties.js +57 -0
  21. package/dist/cjs/resources/counterparties.js.map +1 -0
  22. package/dist/cjs/resources/documents.d.ts +66 -0
  23. package/dist/cjs/resources/documents.js +23 -0
  24. package/dist/cjs/resources/documents.js.map +1 -0
  25. package/dist/cjs/resources/events.d.ts +53 -0
  26. package/dist/cjs/resources/events.js +22 -0
  27. package/dist/cjs/resources/events.js.map +1 -0
  28. package/dist/cjs/resources/expected-payments.d.ts +928 -0
  29. package/dist/cjs/resources/expected-payments.js +31 -0
  30. package/dist/cjs/resources/expected-payments.js.map +1 -0
  31. package/dist/cjs/resources/external-accounts.d.ts +597 -0
  32. package/dist/cjs/resources/external-accounts.js +51 -0
  33. package/dist/cjs/resources/external-accounts.js.map +1 -0
  34. package/dist/cjs/resources/incoming-payment-details.d.ts +487 -0
  35. package/dist/cjs/resources/incoming-payment-details.js +35 -0
  36. package/dist/cjs/resources/incoming-payment-details.js.map +1 -0
  37. package/dist/cjs/resources/index.d.ts +15 -0
  38. package/dist/cjs/resources/index.js +46 -0
  39. package/dist/cjs/resources/index.js.map +1 -0
  40. package/dist/cjs/resources/internal-accounts.d.ts +666 -0
  41. package/dist/cjs/resources/internal-accounts.js +31 -0
  42. package/dist/cjs/resources/internal-accounts.js.map +1 -0
  43. package/dist/cjs/resources/line-items.d.ts +90 -0
  44. package/dist/cjs/resources/line-items.js +38 -0
  45. package/dist/cjs/resources/line-items.js.map +1 -0
  46. package/dist/cjs/resources/paper-items.d.ts +279 -0
  47. package/dist/cjs/resources/paper-items.js +25 -0
  48. package/dist/cjs/resources/paper-items.js.map +1 -0
  49. package/dist/cjs/resources/payment-orders/index.d.ts +2 -0
  50. package/dist/cjs/resources/payment-orders/index.js +33 -0
  51. package/dist/cjs/resources/payment-orders/index.js.map +1 -0
  52. package/dist/cjs/resources/payment-orders/payment-orders.d.ts +2180 -0
  53. package/dist/cjs/resources/payment-orders/payment-orders.js +56 -0
  54. package/dist/cjs/resources/payment-orders/payment-orders.js.map +1 -0
  55. package/dist/cjs/resources/payment-orders/reversals.d.ts +46 -0
  56. package/dist/cjs/resources/payment-orders/reversals.js +23 -0
  57. package/dist/cjs/resources/payment-orders/reversals.js.map +1 -0
  58. package/dist/cjs/resources/returns.d.ts +487 -0
  59. package/dist/cjs/resources/returns.js +31 -0
  60. package/dist/cjs/resources/returns.js.map +1 -0
  61. package/dist/cjs/resources/top-level.d.ts +3 -0
  62. package/dist/cjs/resources/top-level.js +4 -0
  63. package/dist/cjs/resources/top-level.js.map +1 -0
  64. package/dist/cjs/resources/transactions.d.ts +377 -0
  65. package/dist/cjs/resources/transactions.js +31 -0
  66. package/dist/cjs/resources/transactions.js.map +1 -0
  67. package/dist/cjs/resources/validations.d.ts +97 -0
  68. package/dist/cjs/resources/validations.js +16 -0
  69. package/dist/cjs/resources/validations.js.map +1 -0
  70. package/dist/cjs/resources/webhooks.d.ts +31 -0
  71. package/dist/cjs/resources/webhooks.js +44 -0
  72. package/dist/cjs/resources/webhooks.js.map +1 -0
  73. package/dist/cjs/tests/api-resources/counterparties.test.d.ts +1 -0
  74. package/dist/cjs/tests/api-resources/counterparties.test.js +275 -0
  75. package/dist/cjs/tests/api-resources/counterparties.test.js.map +1 -0
  76. package/dist/cjs/tests/api-resources/documents.test.d.ts +1 -0
  77. package/dist/cjs/tests/api-resources/documents.test.js +78 -0
  78. package/dist/cjs/tests/api-resources/documents.test.js.map +1 -0
  79. package/dist/cjs/tests/api-resources/events.test.d.ts +1 -0
  80. package/dist/cjs/tests/api-resources/events.test.js +100 -0
  81. package/dist/cjs/tests/api-resources/events.test.js.map +1 -0
  82. package/dist/cjs/tests/api-resources/expected-payments.test.d.ts +1 -0
  83. package/dist/cjs/tests/api-resources/expected-payments.test.js +176 -0
  84. package/dist/cjs/tests/api-resources/expected-payments.test.js.map +1 -0
  85. package/dist/cjs/tests/api-resources/external-accounts.test.d.ts +1 -0
  86. package/dist/cjs/tests/api-resources/external-accounts.test.js +248 -0
  87. package/dist/cjs/tests/api-resources/external-accounts.test.js.map +1 -0
  88. package/dist/cjs/tests/api-resources/incoming-payment-details.test.d.ts +1 -0
  89. package/dist/cjs/tests/api-resources/incoming-payment-details.test.js +130 -0
  90. package/dist/cjs/tests/api-resources/incoming-payment-details.test.js.map +1 -0
  91. package/dist/cjs/tests/api-resources/internal-accounts.test.d.ts +1 -0
  92. package/dist/cjs/tests/api-resources/internal-accounts.test.js +144 -0
  93. package/dist/cjs/tests/api-resources/internal-accounts.test.js.map +1 -0
  94. package/dist/cjs/tests/api-resources/line-items.test.d.ts +1 -0
  95. package/dist/cjs/tests/api-resources/line-items.test.js +123 -0
  96. package/dist/cjs/tests/api-resources/line-items.test.js.map +1 -0
  97. package/dist/cjs/tests/api-resources/paper-items.test.d.ts +1 -0
  98. package/dist/cjs/tests/api-resources/paper-items.test.js +96 -0
  99. package/dist/cjs/tests/api-resources/paper-items.test.js.map +1 -0
  100. package/dist/cjs/tests/api-resources/payment-orders/payment-orders.test.d.ts +1 -0
  101. package/dist/cjs/tests/api-resources/payment-orders/payment-orders.test.js +77 -0
  102. package/dist/cjs/tests/api-resources/payment-orders/payment-orders.test.js.map +1 -0
  103. package/dist/cjs/tests/api-resources/returns.test.d.ts +1 -0
  104. package/dist/cjs/tests/api-resources/returns.test.js +116 -0
  105. package/dist/cjs/tests/api-resources/returns.test.js.map +1 -0
  106. package/dist/cjs/tests/api-resources/top-level.test.d.ts +1 -0
  107. package/dist/cjs/tests/api-resources/top-level.test.js +59 -0
  108. package/dist/cjs/tests/api-resources/top-level.test.js.map +1 -0
  109. package/dist/cjs/tests/api-resources/transactions.test.d.ts +1 -0
  110. package/dist/cjs/tests/api-resources/transactions.test.js +134 -0
  111. package/dist/cjs/tests/api-resources/transactions.test.js.map +1 -0
  112. package/dist/cjs/tests/api-resources/validations.test.d.ts +1 -0
  113. package/dist/cjs/tests/api-resources/validations.test.js +62 -0
  114. package/dist/cjs/tests/api-resources/validations.test.js.map +1 -0
  115. package/dist/cjs/tests/api-resources/webhooks.test.d.ts +1 -0
  116. package/dist/cjs/tests/api-resources/webhooks.test.js +100 -0
  117. package/dist/cjs/tests/api-resources/webhooks.test.js.map +1 -0
  118. package/dist/cjs/tests/form.test.d.ts +1 -0
  119. package/dist/cjs/tests/form.test.js +61 -0
  120. package/dist/cjs/tests/form.test.js.map +1 -0
  121. package/dist/cjs/tests/index.test.d.ts +1 -0
  122. package/dist/cjs/tests/index.test.js +57 -0
  123. package/dist/cjs/tests/index.test.js.map +1 -0
  124. package/dist/cjs/tests/responses.test.d.ts +1 -0
  125. package/dist/cjs/tests/responses.test.js +60 -0
  126. package/dist/cjs/tests/responses.test.js.map +1 -0
  127. package/index.ts +175 -0
  128. package/jest.config.js +8 -0
  129. package/package.json +47 -0
  130. package/pagination.ts +36 -0
  131. package/resource.ts +22 -0
  132. package/resources/counterparties.ts +666 -0
  133. package/resources/documents.ts +97 -0
  134. package/resources/events.ts +86 -0
  135. package/resources/expected-payments.ts +1016 -0
  136. package/resources/external-accounts.ts +762 -0
  137. package/resources/incoming-payment-details.ts +592 -0
  138. package/resources/index.ts +16 -0
  139. package/resources/internal-accounts.ts +774 -0
  140. package/resources/line-items.ts +138 -0
  141. package/resources/paper-items.ts +317 -0
  142. package/resources/payment-orders/index.ts +3 -0
  143. package/resources/payment-orders/payment-orders.ts +2486 -0
  144. package/resources/payment-orders/reversals.ts +72 -0
  145. package/resources/returns.ts +545 -0
  146. package/resources/top-level.ts +5 -0
  147. package/resources/transactions.ts +441 -0
  148. package/resources/validations.ts +115 -0
  149. package/resources/webhooks.ts +48 -0
  150. package/tests/api-resources/counterparties.test.ts +237 -0
  151. package/tests/api-resources/documents.test.ts +40 -0
  152. package/tests/api-resources/events.test.ts +62 -0
  153. package/tests/api-resources/expected-payments.test.ts +138 -0
  154. package/tests/api-resources/external-accounts.test.ts +210 -0
  155. package/tests/api-resources/incoming-payment-details.test.ts +92 -0
  156. package/tests/api-resources/internal-accounts.test.ts +103 -0
  157. package/tests/api-resources/line-items.test.ts +85 -0
  158. package/tests/api-resources/paper-items.test.ts +58 -0
  159. package/tests/api-resources/payment-orders/payment-orders.test.ts +39 -0
  160. package/tests/api-resources/returns.test.ts +78 -0
  161. package/tests/api-resources/top-level.test.ts +21 -0
  162. package/tests/api-resources/transactions.test.ts +96 -0
  163. package/tests/api-resources/validations.test.ts +24 -0
  164. package/tests/api-resources/webhooks.test.ts +102 -0
  165. package/tests/form.test.ts +27 -0
  166. package/tests/index.test.ts +62 -0
  167. package/tests/responses.test.ts +25 -0
  168. package/tsconfig.cjs.json +8 -0
  169. package/tsconfig.json +36 -0
@@ -0,0 +1,1016 @@
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 ExpectedPayments extends APIResource {
9
+ create(
10
+ body: ExpectedPaymentCreateParams,
11
+ options?: Core.RequestOptions,
12
+ ): Promise<Core.APIResponse<ExpectedPayment>> {
13
+ return this.post('/api/expected_payments', { body, ...options });
14
+ }
15
+
16
+ retrieve(id: string, options?: Core.RequestOptions): Promise<Core.APIResponse<ExpectedPayment>> {
17
+ return this.get(`/api/expected_payments/${id}`, options);
18
+ }
19
+
20
+ update(
21
+ id: string,
22
+ body: ExpectedPaymentUpdateParams,
23
+ options?: Core.RequestOptions,
24
+ ): Promise<Core.APIResponse<ExpectedPayment>> {
25
+ return this.patch(`/api/expected_payments/${id}`, { body, ...options });
26
+ }
27
+
28
+ list(
29
+ query?: ExpectedPaymentListParams,
30
+ options?: Core.RequestOptions,
31
+ ): Core.PagePromise<ExpectedPaymentsPage>;
32
+ list(options?: Core.RequestOptions): Core.PagePromise<ExpectedPaymentsPage>;
33
+ list(
34
+ query: ExpectedPaymentListParams | Core.RequestOptions = {},
35
+ options?: Core.RequestOptions,
36
+ ): Core.PagePromise<ExpectedPaymentsPage> {
37
+ if (isRequestOptions(query)) {
38
+ return this.list({}, query);
39
+ }
40
+
41
+ return this.getAPIList('/api/expected_payments', ExpectedPaymentsPage, { query, ...options });
42
+ }
43
+
44
+ del(id: string, options?: Core.RequestOptions): Promise<Core.APIResponse<ExpectedPayment>> {
45
+ return this.delete(`/api/expected_payments/${id}`, options);
46
+ }
47
+ }
48
+
49
+ export class ExpectedPaymentsPage extends Page<ExpectedPayment> {}
50
+
51
+ export interface ExpectedPayment {
52
+ /**
53
+ * The lowest amount this expected payment may be equal to. Value in specified
54
+ * currency's smallest unit. e.g. $10 would be represented as 1000.
55
+ */
56
+ amount_lower_bound?: number;
57
+
58
+ /**
59
+ * The highest amount this expected payment may be equal to. Value in specified
60
+ * currency's smallest unit. e.g. $10 would be represented as 1000.
61
+ */
62
+ amount_upper_bound?: number;
63
+
64
+ /**
65
+ * The ID of the counterparty you expect for this payment.
66
+ */
67
+ counterparty_id?: string | null;
68
+
69
+ created_at?: string;
70
+
71
+ /**
72
+ * Must conform to ISO 4217. Defaults to the currency of the internal account.
73
+ */
74
+ currency?:
75
+ | 'AED'
76
+ | 'AFN'
77
+ | 'ALL'
78
+ | 'AMD'
79
+ | 'ANG'
80
+ | 'AOA'
81
+ | 'ARS'
82
+ | 'AUD'
83
+ | 'AWG'
84
+ | 'AZN'
85
+ | 'BAM'
86
+ | 'BBD'
87
+ | 'BCH'
88
+ | 'BDT'
89
+ | 'BGN'
90
+ | 'BHD'
91
+ | 'BIF'
92
+ | 'BMD'
93
+ | 'BND'
94
+ | 'BOB'
95
+ | 'BRL'
96
+ | 'BSD'
97
+ | 'BTC'
98
+ | 'BTN'
99
+ | 'BWP'
100
+ | 'BYN'
101
+ | 'BYR'
102
+ | 'BZD'
103
+ | 'CAD'
104
+ | 'CDF'
105
+ | 'CHF'
106
+ | 'CLF'
107
+ | 'CLP'
108
+ | 'CNH'
109
+ | 'CNY'
110
+ | 'COP'
111
+ | 'CRC'
112
+ | 'CUC'
113
+ | 'CUP'
114
+ | 'CVE'
115
+ | 'CZK'
116
+ | 'DJF'
117
+ | 'DKK'
118
+ | 'DOP'
119
+ | 'DZD'
120
+ | 'EEK'
121
+ | 'EGP'
122
+ | 'ERN'
123
+ | 'ETB'
124
+ | 'EUR'
125
+ | 'FJD'
126
+ | 'FKP'
127
+ | 'GBP'
128
+ | 'GBX'
129
+ | 'GEL'
130
+ | 'GGP'
131
+ | 'GHS'
132
+ | 'GIP'
133
+ | 'GMD'
134
+ | 'GNF'
135
+ | 'GTQ'
136
+ | 'GYD'
137
+ | 'HKD'
138
+ | 'HNL'
139
+ | 'HRK'
140
+ | 'HTG'
141
+ | 'HUF'
142
+ | 'IDR'
143
+ | 'ILS'
144
+ | 'IMP'
145
+ | 'INR'
146
+ | 'IQD'
147
+ | 'IRR'
148
+ | 'ISK'
149
+ | 'JEP'
150
+ | 'JMD'
151
+ | 'JOD'
152
+ | 'JPY'
153
+ | 'KES'
154
+ | 'KGS'
155
+ | 'KHR'
156
+ | 'KMF'
157
+ | 'KPW'
158
+ | 'KRW'
159
+ | 'KWD'
160
+ | 'KYD'
161
+ | 'KZT'
162
+ | 'LAK'
163
+ | 'LBP'
164
+ | 'LKR'
165
+ | 'LRD'
166
+ | 'LSL'
167
+ | 'LTL'
168
+ | 'LVL'
169
+ | 'LYD'
170
+ | 'MAD'
171
+ | 'MDL'
172
+ | 'MGA'
173
+ | 'MKD'
174
+ | 'MMK'
175
+ | 'MNT'
176
+ | 'MOP'
177
+ | 'MRO'
178
+ | 'MRU'
179
+ | 'MTL'
180
+ | 'MUR'
181
+ | 'MVR'
182
+ | 'MWK'
183
+ | 'MXN'
184
+ | 'MYR'
185
+ | 'MZN'
186
+ | 'NAD'
187
+ | 'NGN'
188
+ | 'NIO'
189
+ | 'NOK'
190
+ | 'NPR'
191
+ | 'NZD'
192
+ | 'OMR'
193
+ | 'PAB'
194
+ | 'PEN'
195
+ | 'PGK'
196
+ | 'PHP'
197
+ | 'PKR'
198
+ | 'PLN'
199
+ | 'PYG'
200
+ | 'QAR'
201
+ | 'RON'
202
+ | 'RSD'
203
+ | 'RUB'
204
+ | 'RWF'
205
+ | 'SAR'
206
+ | 'SBD'
207
+ | 'SCR'
208
+ | 'SDG'
209
+ | 'SEK'
210
+ | 'SGD'
211
+ | 'SHP'
212
+ | 'SKK'
213
+ | 'SLL'
214
+ | 'SOS'
215
+ | 'SRD'
216
+ | 'SSP'
217
+ | 'STD'
218
+ | 'SVC'
219
+ | 'SYP'
220
+ | 'SZL'
221
+ | 'THB'
222
+ | 'TJS'
223
+ | 'TMM'
224
+ | 'TMT'
225
+ | 'TND'
226
+ | 'TOP'
227
+ | 'TRY'
228
+ | 'TTD'
229
+ | 'TWD'
230
+ | 'TZS'
231
+ | 'UAH'
232
+ | 'UGX'
233
+ | 'USD'
234
+ | 'UYU'
235
+ | 'UZS'
236
+ | 'VEF'
237
+ | 'VES'
238
+ | 'VND'
239
+ | 'VUV'
240
+ | 'WST'
241
+ | 'XAF'
242
+ | 'XAG'
243
+ | 'XAU'
244
+ | 'XBA'
245
+ | 'XBB'
246
+ | 'XBC'
247
+ | 'XBD'
248
+ | 'XCD'
249
+ | 'XDR'
250
+ | 'XFU'
251
+ | 'XOF'
252
+ | 'XPD'
253
+ | 'XPF'
254
+ | 'XPT'
255
+ | 'XTS'
256
+ | 'YER'
257
+ | 'ZAR'
258
+ | 'ZMK'
259
+ | 'ZMW'
260
+ | 'ZWD'
261
+ | 'ZWL'
262
+ | 'ZWN'
263
+ | 'ZWR';
264
+
265
+ /**
266
+ * The earliest date the payment may come in. Format: yyyy-mm-dd
267
+ */
268
+ date_lower_bound?: string | null;
269
+
270
+ /**
271
+ * The latest date the payment may come in. Format: yyyy-mm-dd
272
+ */
273
+ date_upper_bound?: string | null;
274
+
275
+ /**
276
+ * An optional description for internal use.
277
+ */
278
+ description?: string | null;
279
+
280
+ /**
281
+ * One of credit or debit. When you are receiving money, use credit. When you are
282
+ * being charged, use debit.
283
+ */
284
+ direction?: 'credit' | 'debit';
285
+
286
+ id?: string;
287
+
288
+ /**
289
+ * The ID of the Internal Account for the expected payment.
290
+ */
291
+ internal_account_id?: string;
292
+
293
+ /**
294
+ * This field will be true if this object exists in the live environment or false
295
+ * if it exists in the test environment.
296
+ */
297
+ live_mode?: boolean;
298
+
299
+ /**
300
+ * Additional data represented as key-value pairs. Both the key and value must be
301
+ * strings.
302
+ */
303
+ metadata?: Record<string, string>;
304
+
305
+ object?: string;
306
+
307
+ /**
308
+ * One of manual if this expected payment was manually reconciled in the dashboard,
309
+ * automatic if it was automatically reconciled by Modern Treasury, or null if it
310
+ * is unreconciled.
311
+ */
312
+ reconciliation_method?: 'automatic' | 'manual' | null;
313
+
314
+ /**
315
+ * For `ach`, this field will be passed through on an addenda record. For `wire`
316
+ * payments the field will be passed through as the "Originator to Beneficiary
317
+ * Information", also known as OBI or Fedwire tag 6000.
318
+ */
319
+ remittance_information?: string | null;
320
+
321
+ /**
322
+ * The statement description you expect to see on the transaction. For ACH
323
+ * payments, this will be the full line item passed from the bank. For wire
324
+ * payments, this will be the OBI field on the wire. For check payments, this will
325
+ * be the memo field.
326
+ */
327
+ statement_descriptor?: string | null;
328
+
329
+ /**
330
+ * One of unreconciled, reconciled, or archived.
331
+ */
332
+ status?: 'archived' | 'reconciled' | 'unreconciled';
333
+
334
+ /**
335
+ * The ID of the Transaction this expected payment object has been matched to.
336
+ */
337
+ transaction_id?: string | null;
338
+
339
+ /**
340
+ * The ID of the Transaction Line Item this expected payment has been matched to.
341
+ */
342
+ transaction_line_item_id?: string | null;
343
+
344
+ /**
345
+ * One of: ach, au_becs, bacs, book, check, eft, interac, provxchange, rtp, sen,
346
+ * sepa, signet, wire.
347
+ */
348
+ type?:
349
+ | 'ach'
350
+ | 'au_becs'
351
+ | 'bacs'
352
+ | 'book'
353
+ | 'card'
354
+ | 'check'
355
+ | 'eft'
356
+ | 'interac'
357
+ | 'provxchange'
358
+ | 'rtp'
359
+ | 'sen'
360
+ | 'sepa'
361
+ | 'signet'
362
+ | 'wire'
363
+ | null;
364
+
365
+ updated_at?: string;
366
+ }
367
+
368
+ export interface ExpectedPaymentCreateParams {
369
+ /**
370
+ * The lowest amount this expected payment may be equal to. Value in specified
371
+ * currency's smallest unit. e.g. $10 would be represented as 1000.
372
+ */
373
+ amount_lower_bound: number;
374
+
375
+ /**
376
+ * The highest amount this expected payment may be equal to. Value in specified
377
+ * currency's smallest unit. e.g. $10 would be represented as 1000.
378
+ */
379
+ amount_upper_bound: number;
380
+
381
+ /**
382
+ * One of credit or debit. When you are receiving money, use credit. When you are
383
+ * being charged, use debit.
384
+ */
385
+ direction: 'credit' | 'debit';
386
+
387
+ /**
388
+ * The ID of the Internal Account for the expected payment.
389
+ */
390
+ internal_account_id: string;
391
+
392
+ /**
393
+ * The ID of the counterparty you expect for this payment.
394
+ */
395
+ counterparty_id?: string | null;
396
+
397
+ /**
398
+ * Must conform to ISO 4217. Defaults to the currency of the internal account.
399
+ */
400
+ currency?:
401
+ | 'AED'
402
+ | 'AFN'
403
+ | 'ALL'
404
+ | 'AMD'
405
+ | 'ANG'
406
+ | 'AOA'
407
+ | 'ARS'
408
+ | 'AUD'
409
+ | 'AWG'
410
+ | 'AZN'
411
+ | 'BAM'
412
+ | 'BBD'
413
+ | 'BCH'
414
+ | 'BDT'
415
+ | 'BGN'
416
+ | 'BHD'
417
+ | 'BIF'
418
+ | 'BMD'
419
+ | 'BND'
420
+ | 'BOB'
421
+ | 'BRL'
422
+ | 'BSD'
423
+ | 'BTC'
424
+ | 'BTN'
425
+ | 'BWP'
426
+ | 'BYN'
427
+ | 'BYR'
428
+ | 'BZD'
429
+ | 'CAD'
430
+ | 'CDF'
431
+ | 'CHF'
432
+ | 'CLF'
433
+ | 'CLP'
434
+ | 'CNH'
435
+ | 'CNY'
436
+ | 'COP'
437
+ | 'CRC'
438
+ | 'CUC'
439
+ | 'CUP'
440
+ | 'CVE'
441
+ | 'CZK'
442
+ | 'DJF'
443
+ | 'DKK'
444
+ | 'DOP'
445
+ | 'DZD'
446
+ | 'EEK'
447
+ | 'EGP'
448
+ | 'ERN'
449
+ | 'ETB'
450
+ | 'EUR'
451
+ | 'FJD'
452
+ | 'FKP'
453
+ | 'GBP'
454
+ | 'GBX'
455
+ | 'GEL'
456
+ | 'GGP'
457
+ | 'GHS'
458
+ | 'GIP'
459
+ | 'GMD'
460
+ | 'GNF'
461
+ | 'GTQ'
462
+ | 'GYD'
463
+ | 'HKD'
464
+ | 'HNL'
465
+ | 'HRK'
466
+ | 'HTG'
467
+ | 'HUF'
468
+ | 'IDR'
469
+ | 'ILS'
470
+ | 'IMP'
471
+ | 'INR'
472
+ | 'IQD'
473
+ | 'IRR'
474
+ | 'ISK'
475
+ | 'JEP'
476
+ | 'JMD'
477
+ | 'JOD'
478
+ | 'JPY'
479
+ | 'KES'
480
+ | 'KGS'
481
+ | 'KHR'
482
+ | 'KMF'
483
+ | 'KPW'
484
+ | 'KRW'
485
+ | 'KWD'
486
+ | 'KYD'
487
+ | 'KZT'
488
+ | 'LAK'
489
+ | 'LBP'
490
+ | 'LKR'
491
+ | 'LRD'
492
+ | 'LSL'
493
+ | 'LTL'
494
+ | 'LVL'
495
+ | 'LYD'
496
+ | 'MAD'
497
+ | 'MDL'
498
+ | 'MGA'
499
+ | 'MKD'
500
+ | 'MMK'
501
+ | 'MNT'
502
+ | 'MOP'
503
+ | 'MRO'
504
+ | 'MRU'
505
+ | 'MTL'
506
+ | 'MUR'
507
+ | 'MVR'
508
+ | 'MWK'
509
+ | 'MXN'
510
+ | 'MYR'
511
+ | 'MZN'
512
+ | 'NAD'
513
+ | 'NGN'
514
+ | 'NIO'
515
+ | 'NOK'
516
+ | 'NPR'
517
+ | 'NZD'
518
+ | 'OMR'
519
+ | 'PAB'
520
+ | 'PEN'
521
+ | 'PGK'
522
+ | 'PHP'
523
+ | 'PKR'
524
+ | 'PLN'
525
+ | 'PYG'
526
+ | 'QAR'
527
+ | 'RON'
528
+ | 'RSD'
529
+ | 'RUB'
530
+ | 'RWF'
531
+ | 'SAR'
532
+ | 'SBD'
533
+ | 'SCR'
534
+ | 'SDG'
535
+ | 'SEK'
536
+ | 'SGD'
537
+ | 'SHP'
538
+ | 'SKK'
539
+ | 'SLL'
540
+ | 'SOS'
541
+ | 'SRD'
542
+ | 'SSP'
543
+ | 'STD'
544
+ | 'SVC'
545
+ | 'SYP'
546
+ | 'SZL'
547
+ | 'THB'
548
+ | 'TJS'
549
+ | 'TMM'
550
+ | 'TMT'
551
+ | 'TND'
552
+ | 'TOP'
553
+ | 'TRY'
554
+ | 'TTD'
555
+ | 'TWD'
556
+ | 'TZS'
557
+ | 'UAH'
558
+ | 'UGX'
559
+ | 'USD'
560
+ | 'UYU'
561
+ | 'UZS'
562
+ | 'VEF'
563
+ | 'VES'
564
+ | 'VND'
565
+ | 'VUV'
566
+ | 'WST'
567
+ | 'XAF'
568
+ | 'XAG'
569
+ | 'XAU'
570
+ | 'XBA'
571
+ | 'XBB'
572
+ | 'XBC'
573
+ | 'XBD'
574
+ | 'XCD'
575
+ | 'XDR'
576
+ | 'XFU'
577
+ | 'XOF'
578
+ | 'XPD'
579
+ | 'XPF'
580
+ | 'XPT'
581
+ | 'XTS'
582
+ | 'YER'
583
+ | 'ZAR'
584
+ | 'ZMK'
585
+ | 'ZMW'
586
+ | 'ZWD'
587
+ | 'ZWL'
588
+ | 'ZWN'
589
+ | 'ZWR';
590
+
591
+ /**
592
+ * The earliest date the payment may come in. Format: yyyy-mm-dd
593
+ */
594
+ date_lower_bound?: string | null;
595
+
596
+ /**
597
+ * The latest date the payment may come in. Format: yyyy-mm-dd
598
+ */
599
+ date_upper_bound?: string | null;
600
+
601
+ /**
602
+ * An optional description for internal use.
603
+ */
604
+ description?: string | null;
605
+
606
+ line_items?: Array<ExpectedPaymentCreateParams.LineItems>;
607
+
608
+ /**
609
+ * Additional data represented as key-value pairs. Both the key and value must be
610
+ * strings.
611
+ */
612
+ metadata?: Record<string, string>;
613
+
614
+ /**
615
+ * For `ach`, this field will be passed through on an addenda record. For `wire`
616
+ * payments the field will be passed through as the "Originator to Beneficiary
617
+ * Information", also known as OBI or Fedwire tag 6000.
618
+ */
619
+ remittance_information?: string | null;
620
+
621
+ /**
622
+ * The statement description you expect to see on the transaction. For ACH
623
+ * payments, this will be the full line item passed from the bank. For wire
624
+ * payments, this will be the OBI field on the wire. For check payments, this will
625
+ * be the memo field.
626
+ */
627
+ statement_descriptor?: string | null;
628
+
629
+ /**
630
+ * One of: ach, au_becs, bacs, book, check, eft, interac, provxchange, rtp, sen,
631
+ * sepa, signet, wire.
632
+ */
633
+ type?:
634
+ | 'ach'
635
+ | 'au_becs'
636
+ | 'bacs'
637
+ | 'book'
638
+ | 'card'
639
+ | 'check'
640
+ | 'eft'
641
+ | 'interac'
642
+ | 'provxchange'
643
+ | 'rtp'
644
+ | 'sen'
645
+ | 'sepa'
646
+ | 'signet'
647
+ | 'wire'
648
+ | null;
649
+ }
650
+
651
+ export namespace ExpectedPaymentCreateParams {
652
+ export interface LineItems {
653
+ /**
654
+ * Value in specified currency's smallest unit. e.g. $10 would be represented
655
+ * as 1000.
656
+ */
657
+ amount: number;
658
+
659
+ /**
660
+ * The ID of one of your accounting categories. Note that these will only be
661
+ * accessible if your accounting system has been connected.
662
+ */
663
+ accounting_category_id?: string | null;
664
+
665
+ /**
666
+ * A free-form description of the line item.
667
+ */
668
+ description?: string | null;
669
+
670
+ /**
671
+ * Additional data represented as key-value pairs. Both the key and value must be
672
+ * strings.
673
+ */
674
+ metadata?: Record<string, string>;
675
+ }
676
+ }
677
+
678
+ export interface ExpectedPaymentUpdateParams {
679
+ /**
680
+ * The lowest amount this expected payment may be equal to. Value in specified
681
+ * currency's smallest unit. e.g. $10 would be represented as 1000.
682
+ */
683
+ amount_lower_bound: number;
684
+
685
+ /**
686
+ * The highest amount this expected payment may be equal to. Value in specified
687
+ * currency's smallest unit. e.g. $10 would be represented as 1000.
688
+ */
689
+ amount_upper_bound: number;
690
+
691
+ /**
692
+ * One of credit or debit. When you are receiving money, use credit. When you are
693
+ * being charged, use debit.
694
+ */
695
+ direction: 'credit' | 'debit';
696
+
697
+ /**
698
+ * The ID of the Internal Account for the expected payment.
699
+ */
700
+ internal_account_id: string;
701
+
702
+ /**
703
+ * The ID of the counterparty you expect for this payment.
704
+ */
705
+ counterparty_id?: string | null;
706
+
707
+ /**
708
+ * Must conform to ISO 4217. Defaults to the currency of the internal account.
709
+ */
710
+ currency?:
711
+ | 'AED'
712
+ | 'AFN'
713
+ | 'ALL'
714
+ | 'AMD'
715
+ | 'ANG'
716
+ | 'AOA'
717
+ | 'ARS'
718
+ | 'AUD'
719
+ | 'AWG'
720
+ | 'AZN'
721
+ | 'BAM'
722
+ | 'BBD'
723
+ | 'BCH'
724
+ | 'BDT'
725
+ | 'BGN'
726
+ | 'BHD'
727
+ | 'BIF'
728
+ | 'BMD'
729
+ | 'BND'
730
+ | 'BOB'
731
+ | 'BRL'
732
+ | 'BSD'
733
+ | 'BTC'
734
+ | 'BTN'
735
+ | 'BWP'
736
+ | 'BYN'
737
+ | 'BYR'
738
+ | 'BZD'
739
+ | 'CAD'
740
+ | 'CDF'
741
+ | 'CHF'
742
+ | 'CLF'
743
+ | 'CLP'
744
+ | 'CNH'
745
+ | 'CNY'
746
+ | 'COP'
747
+ | 'CRC'
748
+ | 'CUC'
749
+ | 'CUP'
750
+ | 'CVE'
751
+ | 'CZK'
752
+ | 'DJF'
753
+ | 'DKK'
754
+ | 'DOP'
755
+ | 'DZD'
756
+ | 'EEK'
757
+ | 'EGP'
758
+ | 'ERN'
759
+ | 'ETB'
760
+ | 'EUR'
761
+ | 'FJD'
762
+ | 'FKP'
763
+ | 'GBP'
764
+ | 'GBX'
765
+ | 'GEL'
766
+ | 'GGP'
767
+ | 'GHS'
768
+ | 'GIP'
769
+ | 'GMD'
770
+ | 'GNF'
771
+ | 'GTQ'
772
+ | 'GYD'
773
+ | 'HKD'
774
+ | 'HNL'
775
+ | 'HRK'
776
+ | 'HTG'
777
+ | 'HUF'
778
+ | 'IDR'
779
+ | 'ILS'
780
+ | 'IMP'
781
+ | 'INR'
782
+ | 'IQD'
783
+ | 'IRR'
784
+ | 'ISK'
785
+ | 'JEP'
786
+ | 'JMD'
787
+ | 'JOD'
788
+ | 'JPY'
789
+ | 'KES'
790
+ | 'KGS'
791
+ | 'KHR'
792
+ | 'KMF'
793
+ | 'KPW'
794
+ | 'KRW'
795
+ | 'KWD'
796
+ | 'KYD'
797
+ | 'KZT'
798
+ | 'LAK'
799
+ | 'LBP'
800
+ | 'LKR'
801
+ | 'LRD'
802
+ | 'LSL'
803
+ | 'LTL'
804
+ | 'LVL'
805
+ | 'LYD'
806
+ | 'MAD'
807
+ | 'MDL'
808
+ | 'MGA'
809
+ | 'MKD'
810
+ | 'MMK'
811
+ | 'MNT'
812
+ | 'MOP'
813
+ | 'MRO'
814
+ | 'MRU'
815
+ | 'MTL'
816
+ | 'MUR'
817
+ | 'MVR'
818
+ | 'MWK'
819
+ | 'MXN'
820
+ | 'MYR'
821
+ | 'MZN'
822
+ | 'NAD'
823
+ | 'NGN'
824
+ | 'NIO'
825
+ | 'NOK'
826
+ | 'NPR'
827
+ | 'NZD'
828
+ | 'OMR'
829
+ | 'PAB'
830
+ | 'PEN'
831
+ | 'PGK'
832
+ | 'PHP'
833
+ | 'PKR'
834
+ | 'PLN'
835
+ | 'PYG'
836
+ | 'QAR'
837
+ | 'RON'
838
+ | 'RSD'
839
+ | 'RUB'
840
+ | 'RWF'
841
+ | 'SAR'
842
+ | 'SBD'
843
+ | 'SCR'
844
+ | 'SDG'
845
+ | 'SEK'
846
+ | 'SGD'
847
+ | 'SHP'
848
+ | 'SKK'
849
+ | 'SLL'
850
+ | 'SOS'
851
+ | 'SRD'
852
+ | 'SSP'
853
+ | 'STD'
854
+ | 'SVC'
855
+ | 'SYP'
856
+ | 'SZL'
857
+ | 'THB'
858
+ | 'TJS'
859
+ | 'TMM'
860
+ | 'TMT'
861
+ | 'TND'
862
+ | 'TOP'
863
+ | 'TRY'
864
+ | 'TTD'
865
+ | 'TWD'
866
+ | 'TZS'
867
+ | 'UAH'
868
+ | 'UGX'
869
+ | 'USD'
870
+ | 'UYU'
871
+ | 'UZS'
872
+ | 'VEF'
873
+ | 'VES'
874
+ | 'VND'
875
+ | 'VUV'
876
+ | 'WST'
877
+ | 'XAF'
878
+ | 'XAG'
879
+ | 'XAU'
880
+ | 'XBA'
881
+ | 'XBB'
882
+ | 'XBC'
883
+ | 'XBD'
884
+ | 'XCD'
885
+ | 'XDR'
886
+ | 'XFU'
887
+ | 'XOF'
888
+ | 'XPD'
889
+ | 'XPF'
890
+ | 'XPT'
891
+ | 'XTS'
892
+ | 'YER'
893
+ | 'ZAR'
894
+ | 'ZMK'
895
+ | 'ZMW'
896
+ | 'ZWD'
897
+ | 'ZWL'
898
+ | 'ZWN'
899
+ | 'ZWR';
900
+
901
+ /**
902
+ * The earliest date the payment may come in. Format: yyyy-mm-dd
903
+ */
904
+ date_lower_bound?: string | null;
905
+
906
+ /**
907
+ * The latest date the payment may come in. Format: yyyy-mm-dd
908
+ */
909
+ date_upper_bound?: string | null;
910
+
911
+ /**
912
+ * An optional description for internal use.
913
+ */
914
+ description?: string | null;
915
+
916
+ /**
917
+ * Additional data represented as key-value pairs. Both the key and value must be
918
+ * strings.
919
+ */
920
+ metadata?: Record<string, string>;
921
+
922
+ /**
923
+ * For `ach`, this field will be passed through on an addenda record. For `wire`
924
+ * payments the field will be passed through as the "Originator to Beneficiary
925
+ * Information", also known as OBI or Fedwire tag 6000.
926
+ */
927
+ remittance_information?: string | null;
928
+
929
+ /**
930
+ * The statement description you expect to see on the transaction. For ACH
931
+ * payments, this will be the full line item passed from the bank. For wire
932
+ * payments, this will be the OBI field on the wire. For check payments, this will
933
+ * be the memo field.
934
+ */
935
+ statement_descriptor?: string | null;
936
+
937
+ /**
938
+ * One of: ach, au_becs, bacs, book, check, eft, interac, provxchange, rtp, sen,
939
+ * sepa, signet, wire.
940
+ */
941
+ type?:
942
+ | 'ach'
943
+ | 'au_becs'
944
+ | 'bacs'
945
+ | 'book'
946
+ | 'card'
947
+ | 'check'
948
+ | 'eft'
949
+ | 'interac'
950
+ | 'provxchange'
951
+ | 'rtp'
952
+ | 'sen'
953
+ | 'sepa'
954
+ | 'signet'
955
+ | 'wire'
956
+ | null;
957
+ }
958
+
959
+ export interface ExpectedPaymentListParams extends PageParams {
960
+ /**
961
+ * Specify counterparty_id to see expected_payments for a specific account.
962
+ */
963
+ counterparty_id?: string;
964
+
965
+ /**
966
+ * Used to return expected payments created after some datetime
967
+ */
968
+ created_at_lower_bound?: string;
969
+
970
+ /**
971
+ * Used to return expected payments created before some datetime
972
+ */
973
+ created_at_upper_bound?: string;
974
+
975
+ /**
976
+ * One of credit, debit
977
+ */
978
+ direction?: 'credit' | 'debit';
979
+
980
+ /**
981
+ * Specify internal_account_id to see expected_payments for a specific account.
982
+ */
983
+ internal_account_id?: string;
984
+
985
+ /**
986
+ * For example, if you want to query for records with metadata key `Type` and value
987
+ * `Loan`, the query would be `metadata%5BType%5D=Loan`. This encodes the query
988
+ * parameters.
989
+ */
990
+ metadata?: Record<string, string>;
991
+
992
+ /**
993
+ * One of unreconciled, reconciled, or archived.
994
+ */
995
+ status?: 'archived' | 'reconciled' | 'unreconciled';
996
+
997
+ /**
998
+ * One of: ach, au_becs, bacs, book, check, eft, interac, provxchange, rtp,sen,
999
+ * sepa, signet, wire
1000
+ */
1001
+ type?:
1002
+ | 'ach'
1003
+ | 'au_becs'
1004
+ | 'bacs'
1005
+ | 'book'
1006
+ | 'card'
1007
+ | 'check'
1008
+ | 'eft'
1009
+ | 'interac'
1010
+ | 'provxchange'
1011
+ | 'rtp'
1012
+ | 'sen'
1013
+ | 'sepa'
1014
+ | 'signet'
1015
+ | 'wire';
1016
+ }