modern-treasury 2.3.0 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +31 -0
- package/README.md +2 -0
- package/_shims/{ReadableStream.node.d.ts → ReadableStream-node.d.ts} +1 -1
- package/_shims/ReadableStream-node.d.ts.map +1 -0
- package/_shims/{ReadableStream.node.js → ReadableStream-node.js} +1 -1
- package/_shims/ReadableStream-node.js.map +1 -0
- package/_shims/{ReadableStream.node.mjs → ReadableStream-node.mjs} +1 -1
- package/_shims/ReadableStream-node.mjs.map +1 -0
- package/_shims/{agent.node.d.ts → agent-node.d.ts} +1 -1
- package/_shims/agent-node.d.ts.map +1 -0
- package/_shims/{agent.node.js → agent-node.js} +1 -1
- package/_shims/{agent.node.js.map → agent-node.js.map} +1 -1
- package/_shims/{agent.node.mjs → agent-node.mjs} +1 -1
- package/_shims/{agent.node.mjs.map → agent-node.mjs.map} +1 -1
- package/_shims/agent.d.ts +1 -1
- package/_shims/agent.js +1 -1
- package/_shims/agent.mjs +1 -1
- package/{src/_shims/fetch.node.d.ts → _shims/fetch-node.d.ts} +1 -0
- package/_shims/fetch.d.ts +1 -0
- package/_shims/{fileFromPath.node.d.ts → fileFromPath-node.d.ts} +2 -2
- package/_shims/{fileFromPath.node.d.ts.map → fileFromPath-node.d.ts.map} +1 -1
- package/_shims/{fileFromPath.node.js → fileFromPath-node.js} +1 -1
- package/_shims/{fileFromPath.node.js.map → fileFromPath-node.js.map} +1 -1
- package/_shims/{fileFromPath.node.mjs → fileFromPath-node.mjs} +1 -1
- package/_shims/{fileFromPath.node.mjs.map → fileFromPath-node.mjs.map} +1 -1
- package/_shims/fileFromPath.d.ts +2 -2
- package/_shims/fileFromPath.d.ts.map +1 -1
- package/_shims/fileFromPath.js +1 -1
- package/_shims/fileFromPath.mjs +1 -1
- package/_shims/form-data.js +17 -0
- package/_shims/form-data.mjs +20 -0
- package/_shims/{getMultipartRequestOptions.node.d.ts → getMultipartRequestOptions-node.d.ts} +2 -2
- package/_shims/getMultipartRequestOptions-node.d.ts.map +1 -0
- package/_shims/{getMultipartRequestOptions.node.js → getMultipartRequestOptions-node.js} +1 -1
- package/_shims/{getMultipartRequestOptions.node.js.map → getMultipartRequestOptions-node.js.map} +1 -1
- package/_shims/{getMultipartRequestOptions.node.mjs → getMultipartRequestOptions-node.mjs} +1 -1
- package/_shims/{getMultipartRequestOptions.node.mjs.map → getMultipartRequestOptions-node.mjs.map} +1 -1
- package/_shims/getMultipartRequestOptions.d.ts +1 -1
- package/_shims/getMultipartRequestOptions.d.ts.map +1 -1
- package/_shims/{node-readable.node.d.ts → node-readable-node.d.ts} +1 -1
- package/_shims/{node-readable.node.d.ts.map → node-readable-node.d.ts.map} +1 -1
- package/_shims/{node-readable.node.js → node-readable-node.js} +1 -1
- package/_shims/node-readable-node.js.map +1 -0
- package/_shims/{node-readable.node.mjs → node-readable-node.mjs} +1 -1
- package/_shims/node-readable-node.mjs.map +1 -0
- package/core.d.ts +13 -5
- package/core.d.ts.map +1 -1
- package/core.js +17 -10
- package/core.js.map +1 -1
- package/core.mjs +17 -10
- package/core.mjs.map +1 -1
- package/index.d.mts +18 -5
- package/index.d.ts +18 -5
- package/index.d.ts.map +1 -1
- package/index.js +21 -7
- package/index.js.map +1 -1
- package/index.mjs +21 -7
- package/index.mjs.map +1 -1
- package/package.json +32 -9
- package/resources/account-collection-flows.d.ts +3 -28
- package/resources/account-collection-flows.d.ts.map +1 -1
- package/resources/account-collection-flows.js +22 -17
- package/resources/account-collection-flows.js.map +1 -1
- package/resources/account-collection-flows.mjs +22 -17
- package/resources/account-collection-flows.mjs.map +1 -1
- package/resources/account-details.d.ts +3 -8
- package/resources/account-details.d.ts.map +1 -1
- package/resources/account-details.js +10 -4
- package/resources/account-details.js.map +1 -1
- package/resources/account-details.mjs +10 -4
- package/resources/account-details.mjs.map +1 -1
- package/resources/connections.js +3 -3
- package/resources/connections.mjs +3 -3
- package/resources/counterparties.d.ts +26 -40
- package/resources/counterparties.d.ts.map +1 -1
- package/resources/counterparties.js +17 -5
- package/resources/counterparties.js.map +1 -1
- package/resources/counterparties.mjs +17 -5
- package/resources/counterparties.mjs.map +1 -1
- package/resources/documents.d.ts +2 -13
- package/resources/documents.d.ts.map +1 -1
- package/resources/documents.js +11 -5
- package/resources/documents.js.map +1 -1
- package/resources/documents.mjs +11 -5
- package/resources/documents.mjs.map +1 -1
- package/resources/events.js +3 -3
- package/resources/events.mjs +3 -3
- package/resources/expected-payments.d.ts +23 -32
- package/resources/expected-payments.d.ts.map +1 -1
- package/resources/expected-payments.js +10 -4
- package/resources/expected-payments.js.map +1 -1
- package/resources/expected-payments.mjs +10 -4
- package/resources/expected-payments.mjs.map +1 -1
- package/resources/external-accounts.d.ts +17 -51
- package/resources/external-accounts.d.ts.map +1 -1
- package/resources/external-accounts.js +24 -6
- package/resources/external-accounts.js.map +1 -1
- package/resources/external-accounts.mjs +24 -6
- package/resources/external-accounts.mjs.map +1 -1
- package/resources/incoming-payment-details.d.ts +10 -15
- package/resources/incoming-payment-details.d.ts.map +1 -1
- package/resources/incoming-payment-details.js +10 -4
- package/resources/incoming-payment-details.js.map +1 -1
- package/resources/incoming-payment-details.mjs +10 -4
- package/resources/incoming-payment-details.mjs.map +1 -1
- package/resources/index.d.ts +0 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/internal-accounts/balance-reports.js +3 -3
- package/resources/internal-accounts/balance-reports.mjs +3 -3
- package/resources/internal-accounts/internal-accounts.d.ts +10 -15
- package/resources/internal-accounts/internal-accounts.d.ts.map +1 -1
- package/resources/internal-accounts/internal-accounts.js +10 -4
- package/resources/internal-accounts/internal-accounts.js.map +1 -1
- package/resources/internal-accounts/internal-accounts.mjs +10 -4
- package/resources/internal-accounts/internal-accounts.mjs.map +1 -1
- package/resources/invoices/invoices.d.ts +24 -32
- package/resources/invoices/invoices.d.ts.map +1 -1
- package/resources/invoices/invoices.js +10 -4
- package/resources/invoices/invoices.js.map +1 -1
- package/resources/invoices/invoices.mjs +10 -4
- package/resources/invoices/invoices.mjs.map +1 -1
- package/resources/invoices/line-items.d.ts +9 -14
- package/resources/invoices/line-items.d.ts.map +1 -1
- package/resources/invoices/line-items.js +10 -4
- package/resources/invoices/line-items.js.map +1 -1
- package/resources/invoices/line-items.mjs +10 -4
- package/resources/invoices/line-items.mjs.map +1 -1
- package/resources/ledger-account-categories.d.ts +8 -13
- package/resources/ledger-account-categories.d.ts.map +1 -1
- package/resources/ledger-account-categories.js +10 -4
- package/resources/ledger-account-categories.js.map +1 -1
- package/resources/ledger-account-categories.mjs +10 -4
- package/resources/ledger-account-categories.mjs.map +1 -1
- package/resources/ledger-account-payouts.d.ts +14 -19
- package/resources/ledger-account-payouts.d.ts.map +1 -1
- package/resources/ledger-account-payouts.js +10 -4
- package/resources/ledger-account-payouts.js.map +1 -1
- package/resources/ledger-account-payouts.mjs +10 -4
- package/resources/ledger-account-payouts.mjs.map +1 -1
- package/resources/ledger-account-statements.d.ts +9 -14
- package/resources/ledger-account-statements.d.ts.map +1 -1
- package/resources/ledger-account-statements.js +8 -2
- package/resources/ledger-account-statements.js.map +1 -1
- package/resources/ledger-account-statements.mjs +8 -2
- package/resources/ledger-account-statements.mjs.map +1 -1
- package/resources/ledger-accounts.d.ts +13 -18
- package/resources/ledger-accounts.d.ts.map +1 -1
- package/resources/ledger-accounts.js +10 -4
- package/resources/ledger-accounts.js.map +1 -1
- package/resources/ledger-accounts.mjs +10 -4
- package/resources/ledger-accounts.mjs.map +1 -1
- package/resources/ledger-entries.js +3 -3
- package/resources/ledger-entries.mjs +3 -3
- package/resources/ledger-event-handlers.d.ts +5 -16
- package/resources/ledger-event-handlers.d.ts.map +1 -1
- package/resources/ledger-event-handlers.js +10 -4
- package/resources/ledger-event-handlers.js.map +1 -1
- package/resources/ledger-event-handlers.mjs +10 -4
- package/resources/ledger-event-handlers.mjs.map +1 -1
- package/resources/ledger-transactions/ledger-transactions.d.ts +16 -22
- package/resources/ledger-transactions/ledger-transactions.d.ts.map +1 -1
- package/resources/ledger-transactions/ledger-transactions.js +10 -4
- package/resources/ledger-transactions/ledger-transactions.js.map +1 -1
- package/resources/ledger-transactions/ledger-transactions.mjs +10 -4
- package/resources/ledger-transactions/ledger-transactions.mjs.map +1 -1
- package/resources/ledger-transactions/versions.js +3 -3
- package/resources/ledger-transactions/versions.mjs +3 -3
- package/resources/ledgerable-events.d.ts +11 -16
- package/resources/ledgerable-events.d.ts.map +1 -1
- package/resources/ledgerable-events.js +8 -2
- package/resources/ledgerable-events.js.map +1 -1
- package/resources/ledgerable-events.mjs +8 -2
- package/resources/ledgerable-events.mjs.map +1 -1
- package/resources/ledgers.d.ts +4 -9
- package/resources/ledgers.d.ts.map +1 -1
- package/resources/ledgers.js +10 -4
- package/resources/ledgers.js.map +1 -1
- package/resources/ledgers.mjs +10 -4
- package/resources/ledgers.mjs.map +1 -1
- package/resources/line-items.js +3 -3
- package/resources/line-items.mjs +3 -3
- package/resources/paper-items.js +3 -3
- package/resources/paper-items.mjs +3 -3
- package/resources/payment-flows.d.ts +10 -34
- package/resources/payment-flows.d.ts.map +1 -1
- package/resources/payment-flows.js +22 -17
- package/resources/payment-flows.js.map +1 -1
- package/resources/payment-flows.mjs +22 -17
- package/resources/payment-flows.mjs.map +1 -1
- package/resources/payment-orders/payment-orders.d.ts +142 -167
- package/resources/payment-orders/payment-orders.d.ts.map +1 -1
- package/resources/payment-orders/payment-orders.js +18 -6
- package/resources/payment-orders/payment-orders.js.map +1 -1
- package/resources/payment-orders/payment-orders.mjs +18 -6
- package/resources/payment-orders/payment-orders.mjs.map +1 -1
- package/resources/payment-orders/reversals.d.ts +7 -13
- package/resources/payment-orders/reversals.d.ts.map +1 -1
- package/resources/payment-orders/reversals.js +10 -4
- package/resources/payment-orders/reversals.js.map +1 -1
- package/resources/payment-orders/reversals.mjs +10 -4
- package/resources/payment-orders/reversals.mjs.map +1 -1
- package/resources/payment-references.js +3 -3
- package/resources/payment-references.mjs +3 -3
- package/resources/returns.d.ts +9 -15
- package/resources/returns.d.ts.map +1 -1
- package/resources/returns.js +10 -4
- package/resources/returns.js.map +1 -1
- package/resources/returns.mjs +10 -4
- package/resources/returns.mjs.map +1 -1
- package/resources/routing-details.d.ts +4 -10
- package/resources/routing-details.d.ts.map +1 -1
- package/resources/routing-details.js +10 -4
- package/resources/routing-details.js.map +1 -1
- package/resources/routing-details.mjs +10 -4
- package/resources/routing-details.mjs.map +1 -1
- package/resources/transactions/line-items.js +3 -3
- package/resources/transactions/line-items.mjs +3 -3
- package/resources/transactions/transactions.js +3 -3
- package/resources/transactions/transactions.mjs +3 -3
- package/resources/validations.js +1 -1
- package/resources/validations.mjs +1 -1
- package/resources/virtual-accounts.d.ts +12 -18
- package/resources/virtual-accounts.d.ts.map +1 -1
- package/resources/virtual-accounts.js +10 -4
- package/resources/virtual-accounts.js.map +1 -1
- package/resources/virtual-accounts.mjs +10 -4
- package/resources/virtual-accounts.mjs.map +1 -1
- package/resources/webhooks.js +2 -2
- package/resources/webhooks.mjs +2 -2
- package/src/_shims/ReadableStream.d.ts +5 -5
- package/src/_shims/agent.ts +1 -1
- package/{_shims/fetch.node.d.ts → src/_shims/fetch-node.d.ts} +9 -8
- package/src/_shims/fetch.d.ts +11 -10
- package/src/_shims/{fileFromPath.node.ts → fileFromPath-node.ts} +1 -1
- package/src/_shims/fileFromPath.ts +2 -2
- package/src/_shims/{formdata.node.d.ts → form-data-node.d.ts} +4 -4
- package/src/_shims/{formdata.d.ts → form-data.d.ts} +4 -4
- package/src/_shims/form-data.js +17 -0
- package/src/_shims/form-data.mjs +20 -0
- package/src/_shims/{getMultipartRequestOptions.node.ts → getMultipartRequestOptions-node.ts} +3 -3
- package/src/_shims/getMultipartRequestOptions.ts +3 -3
- package/src/core.ts +35 -22
- package/src/error.ts +1 -1
- package/src/index.ts +27 -13
- package/src/pagination.ts +1 -1
- package/src/resource.ts +1 -1
- package/src/resources/account-collection-flows.ts +24 -52
- package/src/resources/account-details.ts +16 -16
- package/src/resources/connections.ts +5 -5
- package/src/resources/counterparties.ts +48 -52
- package/src/resources/documents.ts +15 -21
- package/src/resources/events.ts +5 -5
- package/src/resources/expected-payments.ts +36 -40
- package/src/resources/external-accounts.ts +46 -65
- package/src/resources/incoming-payment-details.ts +24 -24
- package/src/resources/index.ts +39 -35
- package/src/resources/internal-accounts/balance-reports.ts +6 -6
- package/src/resources/internal-accounts/index.ts +2 -2
- package/src/resources/internal-accounts/internal-accounts.ts +27 -27
- package/src/resources/invoices/index.ts +2 -2
- package/src/resources/invoices/invoices.ts +39 -42
- package/src/resources/invoices/line-items.ts +21 -21
- package/src/resources/ledger-account-categories.ts +20 -20
- package/src/resources/ledger-account-payouts.ts +26 -26
- package/src/resources/ledger-account-statements.ts +19 -19
- package/src/resources/ledger-accounts.ts +25 -25
- package/src/resources/ledger-entries.ts +5 -5
- package/src/resources/ledger-event-handlers.ts +17 -23
- package/src/resources/ledger-transactions/index.ts +2 -2
- package/src/resources/ledger-transactions/ledger-transactions.ts +30 -31
- package/src/resources/ledger-transactions/versions.ts +5 -5
- package/src/resources/ledgerable-events.ts +21 -21
- package/src/resources/ledgers.ts +16 -16
- package/src/resources/line-items.ts +5 -5
- package/src/resources/paper-items.ts +6 -6
- package/src/resources/payment-flows.ts +31 -58
- package/src/resources/payment-orders/index.ts +2 -2
- package/src/resources/payment-orders/payment-orders.ts +166 -181
- package/src/resources/payment-orders/reversals.ts +19 -20
- package/src/resources/payment-references.ts +5 -5
- package/src/resources/returns.ts +22 -23
- package/src/resources/routing-details.ts +17 -18
- package/src/resources/top-level.ts +1 -1
- package/src/resources/transactions/index.ts +7 -2
- package/src/resources/transactions/line-items.ts +5 -5
- package/src/resources/transactions/transactions.ts +7 -7
- package/src/resources/validations.ts +3 -3
- package/src/resources/virtual-accounts.ts +26 -27
- package/src/resources/webhooks.ts +3 -3
- package/src/tsconfig.json +11 -0
- package/src/uploads.ts +6 -6
- package/src/version.ts +1 -1
- package/uploads.d.ts +1 -1
- package/uploads.d.ts.map +1 -1
- package/uploads.js +7 -7
- package/uploads.js.map +1 -1
- package/uploads.mjs +4 -4
- package/uploads.mjs.map +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/_shims/ReadableStream.node.d.ts.map +0 -1
- package/_shims/ReadableStream.node.js.map +0 -1
- package/_shims/ReadableStream.node.mjs.map +0 -1
- package/_shims/agent.node.d.ts.map +0 -1
- package/_shims/formdata.js +0 -9
- package/_shims/formdata.mjs +0 -11
- package/_shims/getMultipartRequestOptions.node.d.ts.map +0 -1
- package/_shims/node-readable.node.js.map +0 -1
- package/_shims/node-readable.node.mjs.map +0 -1
- package/src/_shims/fetch.deno.ts +0 -23
- package/src/_shims/formdata.deno.ts +0 -16
- package/src/_shims/formdata.js +0 -9
- package/src/_shims/formdata.mjs +0 -11
- /package/_shims/{fetch.node.js → fetch-node.js} +0 -0
- /package/_shims/{fetch.node.mjs → fetch-node.mjs} +0 -0
- /package/_shims/{formdata.node.d.ts → form-data-node.d.ts} +0 -0
- /package/_shims/{formdata.node.js → form-data-node.js} +0 -0
- /package/_shims/{formdata.node.mjs → form-data-node.mjs} +0 -0
- /package/_shims/{formdata.d.ts → form-data.d.ts} +0 -0
- /package/src/_shims/{ReadableStream.node.ts → ReadableStream-node.ts} +0 -0
- /package/src/_shims/{agent.node.ts → agent-node.ts} +0 -0
- /package/src/_shims/{fetch.node.js → fetch-node.js} +0 -0
- /package/src/_shims/{fetch.node.mjs → fetch-node.mjs} +0 -0
- /package/src/_shims/{formdata.node.js → form-data-node.js} +0 -0
- /package/src/_shims/{formdata.node.mjs → form-data-node.mjs} +0 -0
- /package/src/_shims/{node-readable.node.ts → node-readable-node.ts} +0 -0
|
@@ -1,24 +1,30 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless.
|
|
2
2
|
|
|
3
|
-
import * as Core from '../core';
|
|
4
|
-
import { APIResource } from '../resource';
|
|
5
|
-
import { isRequestOptions } from '../core';
|
|
6
|
-
import * as ExternalAccounts from './external-accounts';
|
|
7
|
-
import * as AccountDetails from './account-details';
|
|
8
|
-
import * as RoutingDetails from './routing-details';
|
|
9
|
-
import * as API from './index';
|
|
10
|
-
import { Page, PageParams } from '../pagination';
|
|
3
|
+
import * as Core from '../core.js';
|
|
4
|
+
import { APIResource } from '../resource.js';
|
|
5
|
+
import { isRequestOptions } from '../core.js';
|
|
6
|
+
import * as ExternalAccounts from './external-accounts.js';
|
|
7
|
+
import * as AccountDetails from './account-details.js';
|
|
8
|
+
import * as RoutingDetails from './routing-details.js';
|
|
9
|
+
import * as API from './index.js';
|
|
10
|
+
import { Page, PageParams } from '../pagination.js';
|
|
11
11
|
|
|
12
12
|
export class Counterparties extends APIResource {
|
|
13
13
|
/**
|
|
14
14
|
* Create a new counterparty.
|
|
15
15
|
*/
|
|
16
16
|
create(params: CounterpartyCreateParams, options?: Core.RequestOptions): Core.APIPromise<Counterparty> {
|
|
17
|
+
// @ts-expect-error idempotency key header isn't defined anymore but is included here for back-compat
|
|
17
18
|
const { 'Idempotency-Key': idempotencyKey, ...body } = params;
|
|
19
|
+
if (idempotencyKey) {
|
|
20
|
+
console.warn(
|
|
21
|
+
"The Idempotency-Key request param is deprecated, the 'idempotencyToken' option should be set instead",
|
|
22
|
+
);
|
|
23
|
+
}
|
|
18
24
|
return this.post('/api/counterparties', {
|
|
19
25
|
body,
|
|
20
26
|
...options,
|
|
21
|
-
headers: { 'Idempotency-Key': idempotencyKey
|
|
27
|
+
headers: { 'Idempotency-Key': idempotencyKey, ...options?.headers },
|
|
22
28
|
});
|
|
23
29
|
}
|
|
24
30
|
|
|
@@ -85,11 +91,17 @@ export class Counterparties extends APIResource {
|
|
|
85
91
|
params: CounterpartyCollectAccountParams,
|
|
86
92
|
options?: Core.RequestOptions,
|
|
87
93
|
): Core.APIPromise<CounterpartyCollectAccountResponse> {
|
|
94
|
+
// @ts-expect-error idempotency key header isn't defined anymore but is included here for back-compat
|
|
88
95
|
const { 'Idempotency-Key': idempotencyKey, ...body } = params;
|
|
96
|
+
if (idempotencyKey) {
|
|
97
|
+
console.warn(
|
|
98
|
+
"The Idempotency-Key request param is deprecated, the 'idempotencyToken' option should be set instead",
|
|
99
|
+
);
|
|
100
|
+
}
|
|
89
101
|
return this.post(`/api/counterparties/${id}/collect_account`, {
|
|
90
102
|
body,
|
|
91
103
|
...options,
|
|
92
|
-
headers: { 'Idempotency-Key': idempotencyKey
|
|
104
|
+
headers: { 'Idempotency-Key': idempotencyKey, ...options?.headers },
|
|
93
105
|
});
|
|
94
106
|
}
|
|
95
107
|
}
|
|
@@ -304,58 +316,49 @@ export interface CounterpartyCollectAccountResponse {
|
|
|
304
316
|
|
|
305
317
|
export interface CounterpartyCreateParams {
|
|
306
318
|
/**
|
|
307
|
-
*
|
|
319
|
+
* A human friendly name for this counterparty.
|
|
308
320
|
*/
|
|
309
321
|
name: string | null;
|
|
310
322
|
|
|
311
|
-
/**
|
|
312
|
-
* Body param:
|
|
313
|
-
*/
|
|
314
323
|
accounting?: CounterpartyCreateParams.Accounting;
|
|
315
324
|
|
|
316
325
|
/**
|
|
317
|
-
*
|
|
326
|
+
* The accounts for this counterparty.
|
|
318
327
|
*/
|
|
319
328
|
accounts?: Array<CounterpartyCreateParams.Account>;
|
|
320
329
|
|
|
321
330
|
/**
|
|
322
|
-
*
|
|
331
|
+
* The counterparty's email.
|
|
323
332
|
*/
|
|
324
333
|
email?: string | null;
|
|
325
334
|
|
|
326
335
|
/**
|
|
327
|
-
*
|
|
328
|
-
*
|
|
336
|
+
* An optional type to auto-sync the counterparty to your ledger. Either `customer`
|
|
337
|
+
* or `vendor`.
|
|
329
338
|
*/
|
|
330
339
|
ledger_type?: 'customer' | 'vendor';
|
|
331
340
|
|
|
332
341
|
/**
|
|
333
|
-
*
|
|
334
|
-
*
|
|
342
|
+
* Additional data represented as key-value pairs. Both the key and value must be
|
|
343
|
+
* strings.
|
|
335
344
|
*/
|
|
336
345
|
metadata?: Record<string, string>;
|
|
337
346
|
|
|
338
347
|
/**
|
|
339
|
-
*
|
|
340
|
-
*
|
|
348
|
+
* Send an email to the counterparty whenever an associated payment order is sent
|
|
349
|
+
* to the bank.
|
|
341
350
|
*/
|
|
342
351
|
send_remittance_advice?: boolean;
|
|
343
352
|
|
|
344
353
|
/**
|
|
345
|
-
*
|
|
354
|
+
* Either a valid SSN or EIN.
|
|
346
355
|
*/
|
|
347
356
|
taxpayer_identifier?: string;
|
|
348
357
|
|
|
349
358
|
/**
|
|
350
|
-
*
|
|
359
|
+
* The verification status of the counterparty.
|
|
351
360
|
*/
|
|
352
361
|
verification_status?: 'denied' | 'needs_approval' | 'unverified' | 'verified';
|
|
353
|
-
|
|
354
|
-
/**
|
|
355
|
-
* Header param: This key should be something unique, preferably something like an
|
|
356
|
-
* UUID.
|
|
357
|
-
*/
|
|
358
|
-
'Idempotency-Key'?: string;
|
|
359
362
|
}
|
|
360
363
|
|
|
361
364
|
export namespace CounterpartyCreateParams {
|
|
@@ -623,26 +626,25 @@ export interface CounterpartyListParams extends PageParams {
|
|
|
623
626
|
|
|
624
627
|
export interface CounterpartyCollectAccountParams {
|
|
625
628
|
/**
|
|
626
|
-
*
|
|
627
|
-
*
|
|
628
|
-
*
|
|
629
|
+
* One of `credit` or `debit`. Use `credit` when you want to pay a counterparty.
|
|
630
|
+
* Use `debit` when you need to charge a counterparty. This field helps us send a
|
|
631
|
+
* more tailored email to your counterparties."
|
|
629
632
|
*/
|
|
630
633
|
direction: 'credit' | 'debit';
|
|
631
634
|
|
|
632
635
|
/**
|
|
633
|
-
*
|
|
634
|
-
*
|
|
635
|
-
*
|
|
636
|
+
* The URL you want your customer to visit upon filling out the form. By default,
|
|
637
|
+
* they will be sent to a Modern Treasury landing page. This must be a valid HTTPS
|
|
638
|
+
* URL if set.
|
|
636
639
|
*/
|
|
637
640
|
custom_redirect?: string;
|
|
638
641
|
|
|
639
642
|
/**
|
|
640
|
-
*
|
|
641
|
-
*
|
|
642
|
-
* \"
|
|
643
|
-
*
|
|
644
|
-
* \"
|
|
645
|
-
* \"swiftCode\"].
|
|
643
|
+
* The list of fields you want on the form. This field is optional and if it is not
|
|
644
|
+
* set, will default to [\"nameOnAccount\", \"accountType\", \"accountNumber\",
|
|
645
|
+
* \"routingNumber\", \"address\"]. The full list of options is [\"name\",
|
|
646
|
+
* \"nameOnAccount\", \"taxpayerIdentifier\", \"accountType\", \"accountNumber\",
|
|
647
|
+
* \"routingNumber\", \"address\", \"ibanNumber\", \"swiftCode\"].
|
|
646
648
|
*/
|
|
647
649
|
fields?: Array<
|
|
648
650
|
| 'name'
|
|
@@ -669,18 +671,12 @@ export interface CounterpartyCollectAccountParams {
|
|
|
669
671
|
>;
|
|
670
672
|
|
|
671
673
|
/**
|
|
672
|
-
*
|
|
673
|
-
*
|
|
674
|
-
*
|
|
675
|
-
*
|
|
674
|
+
* By default, Modern Treasury will send an email to your counterparty that
|
|
675
|
+
* includes a link to the form they must fill out. However, if you would like to
|
|
676
|
+
* send the counterparty the link, you can set this parameter to `false`. The JSON
|
|
677
|
+
* body will include the link to the secure Modern Treasury form.
|
|
676
678
|
*/
|
|
677
679
|
send_email?: boolean;
|
|
678
|
-
|
|
679
|
-
/**
|
|
680
|
-
* Header param: This key should be something unique, preferably something like an
|
|
681
|
-
* UUID.
|
|
682
|
-
*/
|
|
683
|
-
'Idempotency-Key'?: string;
|
|
684
680
|
}
|
|
685
681
|
|
|
686
682
|
export namespace Counterparties {
|
|
@@ -1,24 +1,30 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless.
|
|
2
2
|
|
|
3
|
-
import * as Core from '../core';
|
|
4
|
-
import { APIResource } from '../resource';
|
|
5
|
-
import { isRequestOptions } from '../core';
|
|
6
|
-
import * as API from './index';
|
|
7
|
-
import { type Uploadable, multipartFormRequestOptions } from '../core';
|
|
8
|
-
import { Page, PageParams } from '../pagination';
|
|
3
|
+
import * as Core from '../core.js';
|
|
4
|
+
import { APIResource } from '../resource.js';
|
|
5
|
+
import { isRequestOptions } from '../core.js';
|
|
6
|
+
import * as API from './index.js';
|
|
7
|
+
import { type Uploadable, multipartFormRequestOptions } from '../core.js';
|
|
8
|
+
import { Page, PageParams } from '../pagination.js';
|
|
9
9
|
|
|
10
10
|
export class Documents extends APIResource {
|
|
11
11
|
/**
|
|
12
12
|
* Create a document.
|
|
13
13
|
*/
|
|
14
14
|
create(params: DocumentCreateParams, options?: Core.RequestOptions): Core.APIPromise<Document> {
|
|
15
|
+
// @ts-expect-error idempotency key header isn't defined anymore but is included here for back-compat
|
|
15
16
|
const { 'Idempotency-Key': idempotencyKey, ...body } = params;
|
|
17
|
+
if (idempotencyKey) {
|
|
18
|
+
console.warn(
|
|
19
|
+
"The Idempotency-Key request param is deprecated, the 'idempotencyToken' option should be set instead",
|
|
20
|
+
);
|
|
21
|
+
}
|
|
16
22
|
return this.post(
|
|
17
23
|
'/api/documents',
|
|
18
24
|
multipartFormRequestOptions({
|
|
19
25
|
body,
|
|
20
26
|
...options,
|
|
21
|
-
headers: { 'Idempotency-Key': idempotencyKey
|
|
27
|
+
headers: { 'Idempotency-Key': idempotencyKey, ...options?.headers },
|
|
22
28
|
}),
|
|
23
29
|
);
|
|
24
30
|
}
|
|
@@ -148,13 +154,10 @@ export namespace Document {
|
|
|
148
154
|
|
|
149
155
|
export interface DocumentCreateParams {
|
|
150
156
|
/**
|
|
151
|
-
*
|
|
157
|
+
* The unique identifier for the associated object.
|
|
152
158
|
*/
|
|
153
159
|
documentable_id: string;
|
|
154
160
|
|
|
155
|
-
/**
|
|
156
|
-
* Body param:
|
|
157
|
-
*/
|
|
158
161
|
documentable_type:
|
|
159
162
|
| 'cases'
|
|
160
163
|
| 'counterparties'
|
|
@@ -168,21 +171,12 @@ export interface DocumentCreateParams {
|
|
|
168
171
|
| 'decisions'
|
|
169
172
|
| 'connections';
|
|
170
173
|
|
|
171
|
-
/**
|
|
172
|
-
* Body param:
|
|
173
|
-
*/
|
|
174
174
|
file: Uploadable;
|
|
175
175
|
|
|
176
176
|
/**
|
|
177
|
-
*
|
|
177
|
+
* A category given to the document, can be `null`.
|
|
178
178
|
*/
|
|
179
179
|
document_type?: string;
|
|
180
|
-
|
|
181
|
-
/**
|
|
182
|
-
* Header param: This key should be something unique, preferably something like an
|
|
183
|
-
* UUID.
|
|
184
|
-
*/
|
|
185
|
-
'Idempotency-Key'?: string;
|
|
186
180
|
}
|
|
187
181
|
|
|
188
182
|
export interface DocumentListParams extends PageParams {
|
package/src/resources/events.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless.
|
|
2
2
|
|
|
3
|
-
import * as Core from '../core';
|
|
4
|
-
import { APIResource } from '../resource';
|
|
5
|
-
import { isRequestOptions } from '../core';
|
|
6
|
-
import * as API from './index';
|
|
7
|
-
import { Page, PageParams } from '../pagination';
|
|
3
|
+
import * as Core from '../core.js';
|
|
4
|
+
import { APIResource } from '../resource.js';
|
|
5
|
+
import { isRequestOptions } from '../core.js';
|
|
6
|
+
import * as API from './index.js';
|
|
7
|
+
import { Page, PageParams } from '../pagination.js';
|
|
8
8
|
|
|
9
9
|
export class Events extends APIResource {
|
|
10
10
|
/**
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless.
|
|
2
2
|
|
|
3
|
-
import * as Core from '../core';
|
|
4
|
-
import { APIResource } from '../resource';
|
|
5
|
-
import { isRequestOptions } from '../core';
|
|
6
|
-
import * as Shared from './shared';
|
|
7
|
-
import * as API from './index';
|
|
8
|
-
import { Page, PageParams } from '../pagination';
|
|
3
|
+
import * as Core from '../core.js';
|
|
4
|
+
import { APIResource } from '../resource.js';
|
|
5
|
+
import { isRequestOptions } from '../core.js';
|
|
6
|
+
import * as Shared from './shared.js';
|
|
7
|
+
import * as API from './index.js';
|
|
8
|
+
import { Page, PageParams } from '../pagination.js';
|
|
9
9
|
|
|
10
10
|
export class ExpectedPayments extends APIResource {
|
|
11
11
|
/**
|
|
@@ -15,11 +15,17 @@ export class ExpectedPayments extends APIResource {
|
|
|
15
15
|
params: ExpectedPaymentCreateParams,
|
|
16
16
|
options?: Core.RequestOptions,
|
|
17
17
|
): Core.APIPromise<ExpectedPayment> {
|
|
18
|
+
// @ts-expect-error idempotency key header isn't defined anymore but is included here for back-compat
|
|
18
19
|
const { 'Idempotency-Key': idempotencyKey, ...body } = params;
|
|
20
|
+
if (idempotencyKey) {
|
|
21
|
+
console.warn(
|
|
22
|
+
"The Idempotency-Key request param is deprecated, the 'idempotencyToken' option should be set instead",
|
|
23
|
+
);
|
|
24
|
+
}
|
|
19
25
|
return this.post('/api/expected_payments', {
|
|
20
26
|
body,
|
|
21
27
|
...options,
|
|
22
|
-
headers: { 'Idempotency-Key': idempotencyKey
|
|
28
|
+
headers: { 'Idempotency-Key': idempotencyKey, ...options?.headers },
|
|
23
29
|
});
|
|
24
30
|
}
|
|
25
31
|
|
|
@@ -234,101 +240,91 @@ export type ExpectedPaymentType =
|
|
|
234
240
|
|
|
235
241
|
export interface ExpectedPaymentCreateParams {
|
|
236
242
|
/**
|
|
237
|
-
*
|
|
238
|
-
*
|
|
243
|
+
* The lowest amount this expected payment may be equal to. Value in specified
|
|
244
|
+
* currency's smallest unit. e.g. $10 would be represented as 1000.
|
|
239
245
|
*/
|
|
240
246
|
amount_lower_bound: number;
|
|
241
247
|
|
|
242
248
|
/**
|
|
243
|
-
*
|
|
244
|
-
*
|
|
249
|
+
* The highest amount this expected payment may be equal to. Value in specified
|
|
250
|
+
* currency's smallest unit. e.g. $10 would be represented as 1000.
|
|
245
251
|
*/
|
|
246
252
|
amount_upper_bound: number;
|
|
247
253
|
|
|
248
254
|
/**
|
|
249
|
-
*
|
|
250
|
-
*
|
|
255
|
+
* One of credit or debit. When you are receiving money, use credit. When you are
|
|
256
|
+
* being charged, use debit.
|
|
251
257
|
*/
|
|
252
258
|
direction: 'credit' | 'debit';
|
|
253
259
|
|
|
254
260
|
/**
|
|
255
|
-
*
|
|
261
|
+
* The ID of the Internal Account for the expected payment.
|
|
256
262
|
*/
|
|
257
263
|
internal_account_id: string;
|
|
258
264
|
|
|
259
265
|
/**
|
|
260
|
-
*
|
|
266
|
+
* The ID of the counterparty you expect for this payment.
|
|
261
267
|
*/
|
|
262
268
|
counterparty_id?: string | null;
|
|
263
269
|
|
|
264
270
|
/**
|
|
265
|
-
*
|
|
266
|
-
* account.
|
|
271
|
+
* Must conform to ISO 4217. Defaults to the currency of the internal account.
|
|
267
272
|
*/
|
|
268
273
|
currency?: Shared.Currency | null;
|
|
269
274
|
|
|
270
275
|
/**
|
|
271
|
-
*
|
|
276
|
+
* The earliest date the payment may come in. Format: yyyy-mm-dd
|
|
272
277
|
*/
|
|
273
278
|
date_lower_bound?: string | null;
|
|
274
279
|
|
|
275
280
|
/**
|
|
276
|
-
*
|
|
281
|
+
* The latest date the payment may come in. Format: yyyy-mm-dd
|
|
277
282
|
*/
|
|
278
283
|
date_upper_bound?: string | null;
|
|
279
284
|
|
|
280
285
|
/**
|
|
281
|
-
*
|
|
286
|
+
* An optional description for internal use.
|
|
282
287
|
*/
|
|
283
288
|
description?: string | null;
|
|
284
289
|
|
|
285
|
-
/**
|
|
286
|
-
* Body param:
|
|
287
|
-
*/
|
|
288
290
|
line_items?: Array<ExpectedPaymentCreateParams.LineItem>;
|
|
289
291
|
|
|
290
292
|
/**
|
|
291
|
-
*
|
|
292
|
-
*
|
|
293
|
+
* Additional data represented as key-value pairs. Both the key and value must be
|
|
294
|
+
* strings.
|
|
293
295
|
*/
|
|
294
296
|
metadata?: Record<string, string>;
|
|
295
297
|
|
|
296
298
|
/**
|
|
297
|
-
*
|
|
299
|
+
* The reconciliation filters you have for this payment.
|
|
298
300
|
*/
|
|
299
301
|
reconciliation_filters?: unknown | null;
|
|
300
302
|
|
|
301
303
|
/**
|
|
302
|
-
*
|
|
304
|
+
* The reconciliation groups you have for this payment.
|
|
303
305
|
*/
|
|
304
306
|
reconciliation_groups?: unknown | null;
|
|
305
307
|
|
|
306
308
|
/**
|
|
307
|
-
*
|
|
308
|
-
*
|
|
309
|
-
*
|
|
309
|
+
* For `ach`, this field will be passed through on an addenda record. For `wire`
|
|
310
|
+
* payments the field will be passed through as the "Originator to Beneficiary
|
|
311
|
+
* Information", also known as OBI or Fedwire tag 6000.
|
|
310
312
|
*/
|
|
311
313
|
remittance_information?: string | null;
|
|
312
314
|
|
|
313
315
|
/**
|
|
314
|
-
*
|
|
315
|
-
*
|
|
316
|
+
* The statement description you expect to see on the transaction. For ACH
|
|
317
|
+
* payments, this will be the full line item passed from the bank. For wire
|
|
316
318
|
* payments, this will be the OBI field on the wire. For check payments, this will
|
|
317
319
|
* be the memo field.
|
|
318
320
|
*/
|
|
319
321
|
statement_descriptor?: string | null;
|
|
320
322
|
|
|
321
323
|
/**
|
|
322
|
-
*
|
|
323
|
-
*
|
|
324
|
+
* One of: ach, au_becs, bacs, book, check, eft, interac, provxchange, rtp, sen,
|
|
325
|
+
* sepa, signet, wire.
|
|
324
326
|
*/
|
|
325
327
|
type?: ExpectedPaymentType | null;
|
|
326
|
-
|
|
327
|
-
/**
|
|
328
|
-
* Header param: This key should be something unique, preferably something like an
|
|
329
|
-
* UUID.
|
|
330
|
-
*/
|
|
331
|
-
'Idempotency-Key'?: string;
|
|
332
328
|
}
|
|
333
329
|
|
|
334
330
|
export namespace ExpectedPaymentCreateParams {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless.
|
|
2
2
|
|
|
3
|
-
import * as Core from '../core';
|
|
4
|
-
import { APIResource } from '../resource';
|
|
5
|
-
import { isRequestOptions } from '../core';
|
|
6
|
-
import * as AccountDetails from './account-details';
|
|
7
|
-
import * as RoutingDetails from './routing-details';
|
|
8
|
-
import * as Shared from './shared';
|
|
9
|
-
import * as API from './index';
|
|
10
|
-
import { Page, PageParams } from '../pagination';
|
|
3
|
+
import * as Core from '../core.js';
|
|
4
|
+
import { APIResource } from '../resource.js';
|
|
5
|
+
import { isRequestOptions } from '../core.js';
|
|
6
|
+
import * as AccountDetails from './account-details.js';
|
|
7
|
+
import * as RoutingDetails from './routing-details.js';
|
|
8
|
+
import * as Shared from './shared.js';
|
|
9
|
+
import * as API from './index.js';
|
|
10
|
+
import { Page, PageParams } from '../pagination.js';
|
|
11
11
|
|
|
12
12
|
export class ExternalAccounts extends APIResource {
|
|
13
13
|
/**
|
|
@@ -17,11 +17,17 @@ export class ExternalAccounts extends APIResource {
|
|
|
17
17
|
params: ExternalAccountCreateParams,
|
|
18
18
|
options?: Core.RequestOptions,
|
|
19
19
|
): Core.APIPromise<ExternalAccount> {
|
|
20
|
+
// @ts-expect-error idempotency key header isn't defined anymore but is included here for back-compat
|
|
20
21
|
const { 'Idempotency-Key': idempotencyKey, ...body } = params;
|
|
22
|
+
if (idempotencyKey) {
|
|
23
|
+
console.warn(
|
|
24
|
+
"The Idempotency-Key request param is deprecated, the 'idempotencyToken' option should be set instead",
|
|
25
|
+
);
|
|
26
|
+
}
|
|
21
27
|
return this.post('/api/external_accounts', {
|
|
22
28
|
body,
|
|
23
29
|
...options,
|
|
24
|
-
headers: { 'Idempotency-Key': idempotencyKey
|
|
30
|
+
headers: { 'Idempotency-Key': idempotencyKey, ...options?.headers },
|
|
25
31
|
});
|
|
26
32
|
}
|
|
27
33
|
|
|
@@ -97,11 +103,17 @@ export class ExternalAccounts extends APIResource {
|
|
|
97
103
|
if (isRequestOptions(params)) {
|
|
98
104
|
return this.completeVerification(id, {}, params);
|
|
99
105
|
}
|
|
106
|
+
// @ts-expect-error idempotency key header isn't defined anymore but is included here for back-compat
|
|
100
107
|
const { 'Idempotency-Key': idempotencyKey, ...body } = params;
|
|
108
|
+
if (idempotencyKey) {
|
|
109
|
+
console.warn(
|
|
110
|
+
"The Idempotency-Key request param is deprecated, the 'idempotencyToken' option should be set instead",
|
|
111
|
+
);
|
|
112
|
+
}
|
|
101
113
|
return this.post(`/api/external_accounts/${id}/complete_verification`, {
|
|
102
114
|
body,
|
|
103
115
|
...options,
|
|
104
|
-
headers: { 'Idempotency-Key': idempotencyKey
|
|
116
|
+
headers: { 'Idempotency-Key': idempotencyKey, ...options?.headers },
|
|
105
117
|
});
|
|
106
118
|
}
|
|
107
119
|
|
|
@@ -113,11 +125,17 @@ export class ExternalAccounts extends APIResource {
|
|
|
113
125
|
params: ExternalAccountVerifyParams,
|
|
114
126
|
options?: Core.RequestOptions,
|
|
115
127
|
): Core.APIPromise<ExternalAccount> {
|
|
128
|
+
// @ts-expect-error idempotency key header isn't defined anymore but is included here for back-compat
|
|
116
129
|
const { 'Idempotency-Key': idempotencyKey, ...body } = params;
|
|
130
|
+
if (idempotencyKey) {
|
|
131
|
+
console.warn(
|
|
132
|
+
"The Idempotency-Key request param is deprecated, the 'idempotencyToken' option should be set instead",
|
|
133
|
+
);
|
|
134
|
+
}
|
|
117
135
|
return this.post(`/api/external_accounts/${id}/verify`, {
|
|
118
136
|
body,
|
|
119
137
|
...options,
|
|
120
|
-
headers: { 'Idempotency-Key': idempotencyKey
|
|
138
|
+
headers: { 'Idempotency-Key': idempotencyKey, ...options?.headers },
|
|
121
139
|
});
|
|
122
140
|
}
|
|
123
141
|
}
|
|
@@ -272,84 +290,62 @@ export type ExternalAccountType =
|
|
|
272
290
|
| 'savings';
|
|
273
291
|
|
|
274
292
|
export interface ExternalAccountCreateParams {
|
|
275
|
-
/**
|
|
276
|
-
* Body param:
|
|
277
|
-
*/
|
|
278
293
|
counterparty_id: string | null;
|
|
279
294
|
|
|
280
|
-
/**
|
|
281
|
-
* Body param:
|
|
282
|
-
*/
|
|
283
295
|
account_details?: Array<ExternalAccountCreateParams.AccountDetail>;
|
|
284
296
|
|
|
285
297
|
/**
|
|
286
|
-
*
|
|
298
|
+
* Can be `checking`, `savings` or `other`.
|
|
287
299
|
*/
|
|
288
300
|
account_type?: ExternalAccountType;
|
|
289
301
|
|
|
290
|
-
/**
|
|
291
|
-
* Body param:
|
|
292
|
-
*/
|
|
293
302
|
contact_details?: Array<ExternalAccountCreateParams.ContactDetail>;
|
|
294
303
|
|
|
295
304
|
/**
|
|
296
|
-
*
|
|
297
|
-
*
|
|
298
|
-
*
|
|
305
|
+
* Specifies a ledger account object that will be created with the external
|
|
306
|
+
* account. The resulting ledger account is linked to the external account for
|
|
307
|
+
* auto-ledgering Payment objects. See
|
|
299
308
|
* https://docs.moderntreasury.com/docs/linking-to-other-modern-treasury-objects
|
|
300
309
|
* for more details.
|
|
301
310
|
*/
|
|
302
311
|
ledger_account?: ExternalAccountCreateParams.LedgerAccount;
|
|
303
312
|
|
|
304
313
|
/**
|
|
305
|
-
*
|
|
306
|
-
*
|
|
314
|
+
* Additional data represented as key-value pairs. Both the key and value must be
|
|
315
|
+
* strings.
|
|
307
316
|
*/
|
|
308
317
|
metadata?: Record<string, string>;
|
|
309
318
|
|
|
310
319
|
/**
|
|
311
|
-
*
|
|
312
|
-
*
|
|
320
|
+
* A nickname for the external account. This is only for internal usage and won't
|
|
321
|
+
* affect any payments
|
|
313
322
|
*/
|
|
314
323
|
name?: string | null;
|
|
315
324
|
|
|
316
325
|
/**
|
|
317
|
-
*
|
|
326
|
+
* Required if receiving wire payments.
|
|
318
327
|
*/
|
|
319
328
|
party_address?: ExternalAccountCreateParams.PartyAddress;
|
|
320
329
|
|
|
321
|
-
/**
|
|
322
|
-
* Body param:
|
|
323
|
-
*/
|
|
324
330
|
party_identifier?: string;
|
|
325
331
|
|
|
326
332
|
/**
|
|
327
|
-
*
|
|
328
|
-
* counterparty's name.
|
|
333
|
+
* If this value isn't provided, it will be inherited from the counterparty's name.
|
|
329
334
|
*/
|
|
330
335
|
party_name?: string;
|
|
331
336
|
|
|
332
337
|
/**
|
|
333
|
-
*
|
|
338
|
+
* Either `individual` or `business`.
|
|
334
339
|
*/
|
|
335
340
|
party_type?: 'business' | 'individual' | null;
|
|
336
341
|
|
|
337
342
|
/**
|
|
338
|
-
*
|
|
339
|
-
*
|
|
343
|
+
* If you've enabled the Modern Treasury + Plaid integration in your Plaid account,
|
|
344
|
+
* you can pass the processor token in this field.
|
|
340
345
|
*/
|
|
341
346
|
plaid_processor_token?: string;
|
|
342
347
|
|
|
343
|
-
/**
|
|
344
|
-
* Body param:
|
|
345
|
-
*/
|
|
346
348
|
routing_details?: Array<ExternalAccountCreateParams.RoutingDetail>;
|
|
347
|
-
|
|
348
|
-
/**
|
|
349
|
-
* Header param: This key should be something unique, preferably something like an
|
|
350
|
-
* UUID.
|
|
351
|
-
*/
|
|
352
|
-
'Idempotency-Key'?: string;
|
|
353
349
|
}
|
|
354
350
|
|
|
355
351
|
export namespace ExternalAccountCreateParams {
|
|
@@ -566,27 +562,18 @@ export interface ExternalAccountListParams extends PageParams {
|
|
|
566
562
|
}
|
|
567
563
|
|
|
568
564
|
export interface ExternalAccountCompleteVerificationParams {
|
|
569
|
-
/**
|
|
570
|
-
* Body param:
|
|
571
|
-
*/
|
|
572
565
|
amounts?: Array<number>;
|
|
573
|
-
|
|
574
|
-
/**
|
|
575
|
-
* Header param: This key should be something unique, preferably something like an
|
|
576
|
-
* UUID.
|
|
577
|
-
*/
|
|
578
|
-
'Idempotency-Key'?: string;
|
|
579
566
|
}
|
|
580
567
|
|
|
581
568
|
export interface ExternalAccountVerifyParams {
|
|
582
569
|
/**
|
|
583
|
-
*
|
|
584
|
-
*
|
|
570
|
+
* The ID of the internal account where the micro-deposits originate from. Both
|
|
571
|
+
* credit and debit capabilities must be enabled.
|
|
585
572
|
*/
|
|
586
573
|
originating_account_id: string;
|
|
587
574
|
|
|
588
575
|
/**
|
|
589
|
-
*
|
|
576
|
+
* Both ach and eft are supported payment types.
|
|
590
577
|
*/
|
|
591
578
|
payment_type:
|
|
592
579
|
| 'ach'
|
|
@@ -608,15 +595,9 @@ export interface ExternalAccountVerifyParams {
|
|
|
608
595
|
| 'wire';
|
|
609
596
|
|
|
610
597
|
/**
|
|
611
|
-
*
|
|
598
|
+
* Defaults to the currency of the originating account.
|
|
612
599
|
*/
|
|
613
600
|
currency?: Shared.Currency | null;
|
|
614
|
-
|
|
615
|
-
/**
|
|
616
|
-
* Header param: This key should be something unique, preferably something like an
|
|
617
|
-
* UUID.
|
|
618
|
-
*/
|
|
619
|
-
'Idempotency-Key'?: string;
|
|
620
601
|
}
|
|
621
602
|
|
|
622
603
|
export namespace ExternalAccounts {
|