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