modern-treasury 2.2.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 +75 -0
- package/README.md +43 -15
- package/_shims/ReadableStream-node.d.ts +6 -0
- package/_shims/ReadableStream-node.d.ts.map +1 -0
- package/_shims/ReadableStream-node.js +14 -0
- package/_shims/ReadableStream-node.js.map +1 -0
- package/_shims/ReadableStream-node.mjs +3 -0
- package/_shims/ReadableStream-node.mjs.map +1 -0
- package/_shims/ReadableStream.d.ts +38 -0
- package/_shims/ReadableStream.js +5 -0
- package/_shims/ReadableStream.mjs +7 -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/_shims/{fetch.node.d.ts → fetch-node.d.ts} +12 -1
- package/_shims/fetch.d.ts +9 -1
- 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 +91 -34
- package/core.d.ts.map +1 -1
- package/core.js +201 -70
- package/core.js.map +1 -1
- package/core.mjs +195 -70
- package/core.mjs.map +1 -1
- package/index.d.mts +19 -7
- package/index.d.ts +19 -7
- package/index.d.ts.map +1 -1
- package/index.js +23 -9
- package/index.js.map +1 -1
- package/index.mjs +23 -9
- package/index.mjs.map +1 -1
- package/package.json +32 -9
- package/pagination.d.ts +2 -2
- package/pagination.d.ts.map +1 -1
- package/pagination.js +5 -5
- package/pagination.js.map +1 -1
- package/pagination.mjs +5 -5
- package/pagination.mjs.map +1 -1
- package/resources/account-collection-flows.d.ts +8 -33
- 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 +8 -13
- 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.d.ts +5 -2
- package/resources/connections.d.ts.map +1 -1
- package/resources/connections.js +3 -3
- package/resources/connections.js.map +1 -1
- package/resources/connections.mjs +3 -3
- package/resources/connections.mjs.map +1 -1
- package/resources/counterparties.d.ts +37 -51
- 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 +6 -17
- package/resources/documents.d.ts.map +1 -1
- package/resources/documents.js +13 -7
- package/resources/documents.js.map +1 -1
- package/resources/documents.mjs +13 -7
- package/resources/documents.mjs.map +1 -1
- package/resources/events.d.ts +3 -3
- package/resources/events.d.ts.map +1 -1
- package/resources/events.js +3 -3
- package/resources/events.mjs +3 -3
- package/resources/expected-payments.d.ts +30 -39
- 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 +27 -61
- 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 +20 -21
- 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 -3
- 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.d.ts +6 -3
- package/resources/internal-accounts/balance-reports.d.ts.map +1 -1
- package/resources/internal-accounts/balance-reports.js +3 -3
- package/resources/internal-accounts/balance-reports.js.map +1 -1
- package/resources/internal-accounts/balance-reports.mjs +3 -3
- package/resources/internal-accounts/balance-reports.mjs.map +1 -1
- package/resources/internal-accounts/internal-accounts.d.ts +16 -21
- 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 +67 -42
- 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 +32 -185
- 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 +47 -87
- package/resources/ledger-account-categories.d.ts.map +1 -1
- package/resources/ledger-account-categories.js +21 -17
- package/resources/ledger-account-categories.js.map +1 -1
- package/resources/ledger-account-categories.mjs +21 -17
- package/resources/ledger-account-categories.mjs.map +1 -1
- package/resources/ledger-account-payouts.d.ts +33 -22
- 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 +11 -16
- 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 +30 -30
- 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.d.ts +20 -6
- package/resources/ledger-entries.d.ts.map +1 -1
- package/resources/ledger-entries.js +3 -3
- package/resources/ledger-entries.js.map +1 -1
- package/resources/ledger-entries.mjs +3 -3
- package/resources/ledger-entries.mjs.map +1 -1
- package/resources/ledger-event-handlers.d.ts +12 -24
- 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 +48 -37
- package/resources/ledger-transactions/ledger-transactions.d.ts.map +1 -1
- package/resources/ledger-transactions/ledger-transactions.js +13 -7
- package/resources/ledger-transactions/ledger-transactions.js.map +1 -1
- package/resources/ledger-transactions/ledger-transactions.mjs +13 -7
- package/resources/ledger-transactions/ledger-transactions.mjs.map +1 -1
- package/resources/ledger-transactions/versions.d.ts +4 -2
- package/resources/ledger-transactions/versions.d.ts.map +1 -1
- package/resources/ledger-transactions/versions.js +3 -3
- package/resources/ledger-transactions/versions.js.map +1 -1
- package/resources/ledger-transactions/versions.mjs +3 -3
- package/resources/ledger-transactions/versions.mjs.map +1 -1
- package/resources/ledgerable-events.d.ts +13 -18
- 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 +16 -20
- 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.d.ts +5 -5
- package/resources/line-items.d.ts.map +1 -1
- package/resources/line-items.js +3 -3
- package/resources/line-items.mjs +3 -3
- package/resources/paper-items.d.ts +6 -3
- package/resources/paper-items.d.ts.map +1 -1
- package/resources/paper-items.js +3 -3
- package/resources/paper-items.js.map +1 -1
- package/resources/paper-items.mjs +3 -3
- package/resources/paper-items.mjs.map +1 -1
- package/resources/payment-flows.d.ts +18 -42
- 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 +172 -191
- package/resources/payment-orders/payment-orders.d.ts.map +1 -1
- package/resources/payment-orders/payment-orders.js +21 -11
- package/resources/payment-orders/payment-orders.js.map +1 -1
- package/resources/payment-orders/payment-orders.mjs +21 -11
- package/resources/payment-orders/payment-orders.mjs.map +1 -1
- package/resources/payment-orders/reversals.d.ts +21 -22
- 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.d.ts +3 -3
- package/resources/payment-references.d.ts.map +1 -1
- package/resources/payment-references.js +3 -3
- package/resources/payment-references.mjs +3 -3
- package/resources/returns.d.ts +16 -19
- 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 +9 -15
- 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.d.ts +5 -2
- package/resources/transactions/line-items.d.ts.map +1 -1
- package/resources/transactions/line-items.js +3 -3
- package/resources/transactions/line-items.js.map +1 -1
- package/resources/transactions/line-items.mjs +3 -3
- package/resources/transactions/line-items.mjs.map +1 -1
- package/resources/transactions/transactions.d.ts +8 -5
- package/resources/transactions/transactions.d.ts.map +1 -1
- package/resources/transactions/transactions.js +3 -3
- package/resources/transactions/transactions.js.map +1 -1
- package/resources/transactions/transactions.mjs +3 -3
- package/resources/transactions/transactions.mjs.map +1 -1
- package/resources/validations.d.ts +1 -1
- package/resources/validations.d.ts.map +1 -1
- package/resources/validations.js +1 -1
- package/resources/validations.mjs +1 -1
- package/resources/virtual-accounts.d.ts +19 -28
- 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-node.ts +6 -0
- package/src/_shims/ReadableStream.d.ts +38 -0
- package/src/_shims/ReadableStream.js +5 -0
- package/src/_shims/ReadableStream.mjs +7 -0
- package/src/_shims/agent.ts +1 -1
- package/src/_shims/{fetch.node.d.ts → fetch-node.d.ts} +20 -9
- package/src/_shims/fetch.d.ts +18 -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 +275 -97
- package/src/error.ts +1 -1
- package/src/index.ts +31 -18
- package/src/pagination.ts +6 -6
- package/src/resource.ts +1 -1
- package/src/resources/account-collection-flows.ts +29 -57
- package/src/resources/account-details.ts +22 -22
- package/src/resources/connections.ts +11 -8
- package/src/resources/counterparties.ts +61 -65
- package/src/resources/documents.ts +21 -30
- package/src/resources/events.ts +9 -9
- package/src/resources/expected-payments.ts +45 -49
- package/src/resources/external-accounts.ts +59 -78
- package/src/resources/incoming-payment-details.ts +38 -33
- package/src/resources/index.ts +39 -36
- package/src/resources/internal-accounts/balance-reports.ts +13 -10
- package/src/resources/internal-accounts/index.ts +2 -2
- package/src/resources/internal-accounts/internal-accounts.ts +35 -35
- package/src/resources/invoices/index.ts +2 -2
- package/src/resources/invoices/invoices.ts +91 -54
- package/src/resources/invoices/line-items.ts +46 -228
- package/src/resources/ledger-account-categories.ts +67 -111
- package/src/resources/ledger-account-payouts.ts +49 -30
- package/src/resources/ledger-account-statements.ts +21 -21
- package/src/resources/ledger-accounts.ts +46 -40
- package/src/resources/ledger-entries.ts +29 -13
- package/src/resources/ledger-event-handlers.ts +25 -35
- package/src/resources/ledger-transactions/index.ts +2 -2
- package/src/resources/ledger-transactions/ledger-transactions.ts +73 -53
- package/src/resources/ledger-transactions/versions.ts +10 -8
- package/src/resources/ledgerable-events.ts +23 -23
- package/src/resources/ledgers.ts +31 -29
- package/src/resources/line-items.ts +12 -12
- package/src/resources/paper-items.ts +13 -10
- package/src/resources/payment-flows.ts +39 -66
- package/src/resources/payment-orders/index.ts +2 -2
- package/src/resources/payment-orders/payment-orders.ts +204 -216
- package/src/resources/payment-orders/reversals.ts +36 -31
- package/src/resources/payment-references.ts +9 -9
- package/src/resources/returns.ts +30 -28
- package/src/resources/routing-details.ts +23 -24
- package/src/resources/top-level.ts +1 -1
- package/src/resources/transactions/index.ts +7 -2
- package/src/resources/transactions/line-items.ts +11 -8
- package/src/resources/transactions/transactions.ts +17 -14
- package/src/resources/validations.ts +4 -4
- package/src/resources/virtual-accounts.ts +35 -39
- 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/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/{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,34 +1,37 @@
|
|
|
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
|
-
create(
|
|
17
|
-
|
|
18
|
-
options?: Core.RequestOptions,
|
|
19
|
-
): Promise<Core.APIResponse<Counterparty>> {
|
|
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
|
|
20
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
|
+
}
|
|
21
24
|
return this.post('/api/counterparties', {
|
|
22
25
|
body,
|
|
23
26
|
...options,
|
|
24
|
-
headers: { 'Idempotency-Key': idempotencyKey
|
|
27
|
+
headers: { 'Idempotency-Key': idempotencyKey, ...options?.headers },
|
|
25
28
|
});
|
|
26
29
|
}
|
|
27
30
|
|
|
28
31
|
/**
|
|
29
32
|
* Get details on a single counterparty.
|
|
30
33
|
*/
|
|
31
|
-
retrieve(id: string, options?: Core.RequestOptions):
|
|
34
|
+
retrieve(id: string, options?: Core.RequestOptions): Core.APIPromise<Counterparty> {
|
|
32
35
|
return this.get(`/api/counterparties/${id}`, options);
|
|
33
36
|
}
|
|
34
37
|
|
|
@@ -39,13 +42,13 @@ export class Counterparties extends APIResource {
|
|
|
39
42
|
id: string,
|
|
40
43
|
body?: CounterpartyUpdateParams,
|
|
41
44
|
options?: Core.RequestOptions,
|
|
42
|
-
):
|
|
43
|
-
update(id: string, options?: Core.RequestOptions):
|
|
45
|
+
): Core.APIPromise<Counterparty>;
|
|
46
|
+
update(id: string, options?: Core.RequestOptions): Core.APIPromise<Counterparty>;
|
|
44
47
|
update(
|
|
45
48
|
id: string,
|
|
46
49
|
body: CounterpartyUpdateParams | Core.RequestOptions = {},
|
|
47
50
|
options?: Core.RequestOptions,
|
|
48
|
-
):
|
|
51
|
+
): Core.APIPromise<Counterparty> {
|
|
49
52
|
if (isRequestOptions(body)) {
|
|
50
53
|
return this.update(id, {}, body);
|
|
51
54
|
}
|
|
@@ -55,12 +58,15 @@ export class Counterparties extends APIResource {
|
|
|
55
58
|
/**
|
|
56
59
|
* Get a paginated list of all counterparties.
|
|
57
60
|
*/
|
|
58
|
-
list(
|
|
59
|
-
|
|
61
|
+
list(
|
|
62
|
+
query?: CounterpartyListParams,
|
|
63
|
+
options?: Core.RequestOptions,
|
|
64
|
+
): Core.PagePromise<CounterpartiesPage, Counterparty>;
|
|
65
|
+
list(options?: Core.RequestOptions): Core.PagePromise<CounterpartiesPage, Counterparty>;
|
|
60
66
|
list(
|
|
61
67
|
query: CounterpartyListParams | Core.RequestOptions = {},
|
|
62
68
|
options?: Core.RequestOptions,
|
|
63
|
-
): Core.PagePromise<CounterpartiesPage> {
|
|
69
|
+
): Core.PagePromise<CounterpartiesPage, Counterparty> {
|
|
64
70
|
if (isRequestOptions(query)) {
|
|
65
71
|
return this.list({}, query);
|
|
66
72
|
}
|
|
@@ -70,7 +76,7 @@ export class Counterparties extends APIResource {
|
|
|
70
76
|
/**
|
|
71
77
|
* Deletes a given counterparty.
|
|
72
78
|
*/
|
|
73
|
-
del(id: string, options?: Core.RequestOptions):
|
|
79
|
+
del(id: string, options?: Core.RequestOptions): Core.APIPromise<void> {
|
|
74
80
|
return this.delete(`/api/counterparties/${id}`, {
|
|
75
81
|
...options,
|
|
76
82
|
headers: { Accept: '', ...options?.headers },
|
|
@@ -84,12 +90,18 @@ export class Counterparties extends APIResource {
|
|
|
84
90
|
id: string,
|
|
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,27 +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
|
-
|
|
15
|
-
|
|
16
|
-
options?: Core.RequestOptions,
|
|
17
|
-
): Promise<Core.APIResponse<Document>> {
|
|
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
|
|
18
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
|
+
}
|
|
19
22
|
return this.post(
|
|
20
23
|
'/api/documents',
|
|
21
|
-
|
|
24
|
+
multipartFormRequestOptions({
|
|
22
25
|
body,
|
|
23
26
|
...options,
|
|
24
|
-
headers: { 'Idempotency-Key': idempotencyKey
|
|
27
|
+
headers: { 'Idempotency-Key': idempotencyKey, ...options?.headers },
|
|
25
28
|
}),
|
|
26
29
|
);
|
|
27
30
|
}
|
|
@@ -29,19 +32,19 @@ export class Documents extends APIResource {
|
|
|
29
32
|
/**
|
|
30
33
|
* Get an existing document.
|
|
31
34
|
*/
|
|
32
|
-
retrieve(id: string, options?: Core.RequestOptions):
|
|
35
|
+
retrieve(id: string, options?: Core.RequestOptions): Core.APIPromise<Document> {
|
|
33
36
|
return this.get(`/api/documents/${id}`, options);
|
|
34
37
|
}
|
|
35
38
|
|
|
36
39
|
/**
|
|
37
40
|
* Get a list of documents.
|
|
38
41
|
*/
|
|
39
|
-
list(query?: DocumentListParams, options?: Core.RequestOptions): Core.PagePromise<DocumentsPage>;
|
|
40
|
-
list(options?: Core.RequestOptions): Core.PagePromise<DocumentsPage>;
|
|
42
|
+
list(query?: DocumentListParams, options?: Core.RequestOptions): Core.PagePromise<DocumentsPage, Document>;
|
|
43
|
+
list(options?: Core.RequestOptions): Core.PagePromise<DocumentsPage, Document>;
|
|
41
44
|
list(
|
|
42
45
|
query: DocumentListParams | Core.RequestOptions = {},
|
|
43
46
|
options?: Core.RequestOptions,
|
|
44
|
-
): Core.PagePromise<DocumentsPage> {
|
|
47
|
+
): Core.PagePromise<DocumentsPage, Document> {
|
|
45
48
|
if (isRequestOptions(query)) {
|
|
46
49
|
return this.list({}, query);
|
|
47
50
|
}
|
|
@@ -151,13 +154,10 @@ export namespace Document {
|
|
|
151
154
|
|
|
152
155
|
export interface DocumentCreateParams {
|
|
153
156
|
/**
|
|
154
|
-
*
|
|
157
|
+
* The unique identifier for the associated object.
|
|
155
158
|
*/
|
|
156
159
|
documentable_id: string;
|
|
157
160
|
|
|
158
|
-
/**
|
|
159
|
-
* Body param:
|
|
160
|
-
*/
|
|
161
161
|
documentable_type:
|
|
162
162
|
| 'cases'
|
|
163
163
|
| 'counterparties'
|
|
@@ -171,21 +171,12 @@ export interface DocumentCreateParams {
|
|
|
171
171
|
| 'decisions'
|
|
172
172
|
| 'connections';
|
|
173
173
|
|
|
174
|
-
/**
|
|
175
|
-
* Body param:
|
|
176
|
-
*/
|
|
177
174
|
file: Uploadable;
|
|
178
175
|
|
|
179
176
|
/**
|
|
180
|
-
*
|
|
177
|
+
* A category given to the document, can be `null`.
|
|
181
178
|
*/
|
|
182
179
|
document_type?: string;
|
|
183
|
-
|
|
184
|
-
/**
|
|
185
|
-
* Header param: This key should be something unique, preferably something like an
|
|
186
|
-
* UUID.
|
|
187
|
-
*/
|
|
188
|
-
'Idempotency-Key'?: string;
|
|
189
180
|
}
|
|
190
181
|
|
|
191
182
|
export interface DocumentListParams extends PageParams {
|
package/src/resources/events.ts
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
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
|
/**
|
|
11
11
|
* get event
|
|
12
12
|
*/
|
|
13
|
-
retrieve(id: string, options?: Core.RequestOptions):
|
|
13
|
+
retrieve(id: string, options?: Core.RequestOptions): Core.APIPromise<Event> {
|
|
14
14
|
return this.get(`/api/events/${id}`, options);
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* list events
|
|
19
19
|
*/
|
|
20
|
-
list(query?: EventListParams, options?: Core.RequestOptions): Core.PagePromise<EventsPage>;
|
|
21
|
-
list(options?: Core.RequestOptions): Core.PagePromise<EventsPage>;
|
|
20
|
+
list(query?: EventListParams, options?: Core.RequestOptions): Core.PagePromise<EventsPage, Event>;
|
|
21
|
+
list(options?: Core.RequestOptions): Core.PagePromise<EventsPage, Event>;
|
|
22
22
|
list(
|
|
23
23
|
query: EventListParams | Core.RequestOptions = {},
|
|
24
24
|
options?: Core.RequestOptions,
|
|
25
|
-
): Core.PagePromise<EventsPage> {
|
|
25
|
+
): Core.PagePromise<EventsPage, Event> {
|
|
26
26
|
if (isRequestOptions(query)) {
|
|
27
27
|
return this.list({}, query);
|
|
28
28
|
}
|
|
@@ -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
|
/**
|
|
@@ -14,19 +14,25 @@ export class ExpectedPayments extends APIResource {
|
|
|
14
14
|
create(
|
|
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
|
|
|
26
32
|
/**
|
|
27
33
|
* get expected payment
|
|
28
34
|
*/
|
|
29
|
-
retrieve(id: string, options?: Core.RequestOptions):
|
|
35
|
+
retrieve(id: string, options?: Core.RequestOptions): Core.APIPromise<ExpectedPayment> {
|
|
30
36
|
return this.get(`/api/expected_payments/${id}`, options);
|
|
31
37
|
}
|
|
32
38
|
|
|
@@ -37,13 +43,13 @@ export class ExpectedPayments extends APIResource {
|
|
|
37
43
|
id: string,
|
|
38
44
|
body?: ExpectedPaymentUpdateParams,
|
|
39
45
|
options?: Core.RequestOptions,
|
|
40
|
-
):
|
|
41
|
-
update(id: string, options?: Core.RequestOptions):
|
|
46
|
+
): Core.APIPromise<ExpectedPayment>;
|
|
47
|
+
update(id: string, options?: Core.RequestOptions): Core.APIPromise<ExpectedPayment>;
|
|
42
48
|
update(
|
|
43
49
|
id: string,
|
|
44
50
|
body: ExpectedPaymentUpdateParams | Core.RequestOptions = {},
|
|
45
51
|
options?: Core.RequestOptions,
|
|
46
|
-
):
|
|
52
|
+
): Core.APIPromise<ExpectedPayment> {
|
|
47
53
|
if (isRequestOptions(body)) {
|
|
48
54
|
return this.update(id, {}, body);
|
|
49
55
|
}
|
|
@@ -56,12 +62,12 @@ export class ExpectedPayments extends APIResource {
|
|
|
56
62
|
list(
|
|
57
63
|
query?: ExpectedPaymentListParams,
|
|
58
64
|
options?: Core.RequestOptions,
|
|
59
|
-
): Core.PagePromise<ExpectedPaymentsPage>;
|
|
60
|
-
list(options?: Core.RequestOptions): Core.PagePromise<ExpectedPaymentsPage>;
|
|
65
|
+
): Core.PagePromise<ExpectedPaymentsPage, ExpectedPayment>;
|
|
66
|
+
list(options?: Core.RequestOptions): Core.PagePromise<ExpectedPaymentsPage, ExpectedPayment>;
|
|
61
67
|
list(
|
|
62
68
|
query: ExpectedPaymentListParams | Core.RequestOptions = {},
|
|
63
69
|
options?: Core.RequestOptions,
|
|
64
|
-
): Core.PagePromise<ExpectedPaymentsPage> {
|
|
70
|
+
): Core.PagePromise<ExpectedPaymentsPage, ExpectedPayment> {
|
|
65
71
|
if (isRequestOptions(query)) {
|
|
66
72
|
return this.list({}, query);
|
|
67
73
|
}
|
|
@@ -71,7 +77,7 @@ export class ExpectedPayments extends APIResource {
|
|
|
71
77
|
/**
|
|
72
78
|
* delete expected payment
|
|
73
79
|
*/
|
|
74
|
-
del(id: string, options?: Core.RequestOptions):
|
|
80
|
+
del(id: string, options?: Core.RequestOptions): Core.APIPromise<ExpectedPayment> {
|
|
75
81
|
return this.delete(`/api/expected_payments/${id}`, options);
|
|
76
82
|
}
|
|
77
83
|
}
|
|
@@ -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 {
|