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,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 BalanceReports extends APIResource {
|
|
11
11
|
/**
|
|
@@ -15,7 +15,7 @@ export class BalanceReports extends APIResource {
|
|
|
15
15
|
internalAccountId: string,
|
|
16
16
|
id: string,
|
|
17
17
|
options?: Core.RequestOptions,
|
|
18
|
-
):
|
|
18
|
+
): Core.APIPromise<BalanceReport> {
|
|
19
19
|
return this.get(`/api/internal_accounts/${internalAccountId}/balance_reports/${id}`, options);
|
|
20
20
|
}
|
|
21
21
|
|
|
@@ -26,13 +26,16 @@ export class BalanceReports extends APIResource {
|
|
|
26
26
|
internalAccountId: string,
|
|
27
27
|
query?: BalanceReportListParams,
|
|
28
28
|
options?: Core.RequestOptions,
|
|
29
|
-
): Core.PagePromise<BalanceReportsPage>;
|
|
30
|
-
list(
|
|
29
|
+
): Core.PagePromise<BalanceReportsPage, BalanceReport>;
|
|
30
|
+
list(
|
|
31
|
+
internalAccountId: string,
|
|
32
|
+
options?: Core.RequestOptions,
|
|
33
|
+
): Core.PagePromise<BalanceReportsPage, BalanceReport>;
|
|
31
34
|
list(
|
|
32
35
|
internalAccountId: string,
|
|
33
36
|
query: BalanceReportListParams | Core.RequestOptions = {},
|
|
34
37
|
options?: Core.RequestOptions,
|
|
35
|
-
): Core.PagePromise<BalanceReportsPage> {
|
|
38
|
+
): Core.PagePromise<BalanceReportsPage, BalanceReport> {
|
|
36
39
|
if (isRequestOptions(query)) {
|
|
37
40
|
return this.list(internalAccountId, {}, query);
|
|
38
41
|
}
|
|
@@ -5,7 +5,7 @@ export {
|
|
|
5
5
|
BalanceReportListParams,
|
|
6
6
|
BalanceReportsPage,
|
|
7
7
|
BalanceReports,
|
|
8
|
-
} from './balance-reports';
|
|
8
|
+
} from './balance-reports.js';
|
|
9
9
|
export {
|
|
10
10
|
InternalAccount,
|
|
11
11
|
InternalAccountCreateParams,
|
|
@@ -13,4 +13,4 @@ export {
|
|
|
13
13
|
InternalAccountListParams,
|
|
14
14
|
InternalAccountsPage,
|
|
15
15
|
InternalAccounts,
|
|
16
|
-
} from './internal-accounts';
|
|
16
|
+
} from './internal-accounts.js';
|
|
@@ -1,15 +1,15 @@
|
|
|
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 Connections from '../connections';
|
|
9
|
-
import * as Shared from '../shared';
|
|
10
|
-
import { BalanceReports } from './balance-reports';
|
|
11
|
-
import * as API from './index';
|
|
12
|
-
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 Connections from '../connections.js';
|
|
9
|
+
import * as Shared from '../shared.js';
|
|
10
|
+
import { BalanceReports } from './balance-reports.js';
|
|
11
|
+
import * as API from './index.js';
|
|
12
|
+
import { Page, PageParams } from '../../pagination.js';
|
|
13
13
|
|
|
14
14
|
export class InternalAccounts extends APIResource {
|
|
15
15
|
balanceReports: BalanceReports = new BalanceReports(this.client);
|
|
@@ -20,19 +20,25 @@ export class InternalAccounts extends APIResource {
|
|
|
20
20
|
create(
|
|
21
21
|
params: InternalAccountCreateParams,
|
|
22
22
|
options?: Core.RequestOptions,
|
|
23
|
-
):
|
|
23
|
+
): Core.APIPromise<InternalAccount> {
|
|
24
|
+
// @ts-expect-error idempotency key header isn't defined anymore but is included here for back-compat
|
|
24
25
|
const { 'Idempotency-Key': idempotencyKey, ...body } = params;
|
|
26
|
+
if (idempotencyKey) {
|
|
27
|
+
console.warn(
|
|
28
|
+
"The Idempotency-Key request param is deprecated, the 'idempotencyToken' option should be set instead",
|
|
29
|
+
);
|
|
30
|
+
}
|
|
25
31
|
return this.post('/api/internal_accounts', {
|
|
26
32
|
body,
|
|
27
33
|
...options,
|
|
28
|
-
headers: { 'Idempotency-Key': idempotencyKey
|
|
34
|
+
headers: { 'Idempotency-Key': idempotencyKey, ...options?.headers },
|
|
29
35
|
});
|
|
30
36
|
}
|
|
31
37
|
|
|
32
38
|
/**
|
|
33
39
|
* get internal account
|
|
34
40
|
*/
|
|
35
|
-
retrieve(id: string, options?: Core.RequestOptions):
|
|
41
|
+
retrieve(id: string, options?: Core.RequestOptions): Core.APIPromise<InternalAccount> {
|
|
36
42
|
return this.get(`/api/internal_accounts/${id}`, options);
|
|
37
43
|
}
|
|
38
44
|
|
|
@@ -43,13 +49,13 @@ export class InternalAccounts extends APIResource {
|
|
|
43
49
|
id: string,
|
|
44
50
|
body?: InternalAccountUpdateParams,
|
|
45
51
|
options?: Core.RequestOptions,
|
|
46
|
-
):
|
|
47
|
-
update(id: string, options?: Core.RequestOptions):
|
|
52
|
+
): Core.APIPromise<InternalAccount>;
|
|
53
|
+
update(id: string, options?: Core.RequestOptions): Core.APIPromise<InternalAccount>;
|
|
48
54
|
update(
|
|
49
55
|
id: string,
|
|
50
56
|
body: InternalAccountUpdateParams | Core.RequestOptions = {},
|
|
51
57
|
options?: Core.RequestOptions,
|
|
52
|
-
):
|
|
58
|
+
): Core.APIPromise<InternalAccount> {
|
|
53
59
|
if (isRequestOptions(body)) {
|
|
54
60
|
return this.update(id, {}, body);
|
|
55
61
|
}
|
|
@@ -62,12 +68,12 @@ export class InternalAccounts extends APIResource {
|
|
|
62
68
|
list(
|
|
63
69
|
query?: InternalAccountListParams,
|
|
64
70
|
options?: Core.RequestOptions,
|
|
65
|
-
): Core.PagePromise<InternalAccountsPage>;
|
|
66
|
-
list(options?: Core.RequestOptions): Core.PagePromise<InternalAccountsPage>;
|
|
71
|
+
): Core.PagePromise<InternalAccountsPage, InternalAccount>;
|
|
72
|
+
list(options?: Core.RequestOptions): Core.PagePromise<InternalAccountsPage, InternalAccount>;
|
|
67
73
|
list(
|
|
68
74
|
query: InternalAccountListParams | Core.RequestOptions = {},
|
|
69
75
|
options?: Core.RequestOptions,
|
|
70
|
-
): Core.PagePromise<InternalAccountsPage> {
|
|
76
|
+
): Core.PagePromise<InternalAccountsPage, InternalAccount> {
|
|
71
77
|
if (isRequestOptions(query)) {
|
|
72
78
|
return this.list({}, query);
|
|
73
79
|
}
|
|
@@ -209,52 +215,46 @@ export namespace InternalAccount {
|
|
|
209
215
|
|
|
210
216
|
export interface InternalAccountCreateParams {
|
|
211
217
|
/**
|
|
212
|
-
*
|
|
218
|
+
* The identifier of the financial institution the account belongs to.
|
|
213
219
|
*/
|
|
214
220
|
connection_id: string;
|
|
215
221
|
|
|
216
222
|
/**
|
|
217
|
-
*
|
|
218
|
-
*
|
|
223
|
+
* Either "USD" or "CAD". Internal accounts created at Increase only supports
|
|
224
|
+
* "USD".
|
|
219
225
|
*/
|
|
220
226
|
currency: 'USD' | 'CAD';
|
|
221
227
|
|
|
222
228
|
/**
|
|
223
|
-
*
|
|
229
|
+
* The nickname of the account.
|
|
224
230
|
*/
|
|
225
231
|
name: string;
|
|
226
232
|
|
|
227
233
|
/**
|
|
228
|
-
*
|
|
234
|
+
* The legal name of the entity which owns the account.
|
|
229
235
|
*/
|
|
230
236
|
party_name: string;
|
|
231
237
|
|
|
232
238
|
/**
|
|
233
|
-
*
|
|
239
|
+
* The Counterparty associated to this account.
|
|
234
240
|
*/
|
|
235
241
|
counterparty_id?: string;
|
|
236
242
|
|
|
237
243
|
/**
|
|
238
|
-
*
|
|
244
|
+
* The parent internal account of this new account.
|
|
239
245
|
*/
|
|
240
246
|
parent_account_id?: string;
|
|
241
247
|
|
|
242
248
|
/**
|
|
243
|
-
*
|
|
249
|
+
* The address associated with the owner or null.
|
|
244
250
|
*/
|
|
245
251
|
party_address?: InternalAccountCreateParams.PartyAddress;
|
|
246
252
|
|
|
247
253
|
/**
|
|
248
|
-
*
|
|
249
|
-
*
|
|
254
|
+
* A hash of vendor specific attributes that will be used when creating the account
|
|
255
|
+
* at the vendor specified by the given connection.
|
|
250
256
|
*/
|
|
251
257
|
vendor_attributes?: Record<string, string>;
|
|
252
|
-
|
|
253
|
-
/**
|
|
254
|
-
* Header param: This key should be something unique, preferably something like an
|
|
255
|
-
* UUID.
|
|
256
|
-
*/
|
|
257
|
-
'Idempotency-Key'?: string;
|
|
258
258
|
}
|
|
259
259
|
|
|
260
260
|
export namespace InternalAccountCreateParams {
|
|
@@ -7,7 +7,7 @@ export {
|
|
|
7
7
|
InvoiceListParams,
|
|
8
8
|
InvoicesPage,
|
|
9
9
|
Invoices,
|
|
10
|
-
} from './invoices';
|
|
10
|
+
} from './invoices.js';
|
|
11
11
|
export {
|
|
12
12
|
InvoiceLineItem,
|
|
13
13
|
LineItemCreateParams,
|
|
@@ -15,4 +15,4 @@ export {
|
|
|
15
15
|
LineItemListParams,
|
|
16
16
|
InvoiceLineItemsPage,
|
|
17
17
|
LineItems,
|
|
18
|
-
} from './line-items';
|
|
18
|
+
} from './line-items.js';
|
|
@@ -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 PaymentOrders from '../payment-orders/index';
|
|
7
|
-
import * as Shared from '../shared';
|
|
8
|
-
import { LineItems } from './line-items';
|
|
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 PaymentOrders from '../payment-orders/index.js';
|
|
7
|
+
import * as Shared from '../shared.js';
|
|
8
|
+
import { LineItems } from './line-items.js';
|
|
9
|
+
import * as API from './index.js';
|
|
10
|
+
import { Page, PageParams } from '../../pagination.js';
|
|
11
11
|
|
|
12
12
|
export class Invoices extends APIResource {
|
|
13
13
|
lineItems: LineItems = new LineItems(this.client);
|
|
@@ -15,36 +15,38 @@ export class Invoices extends APIResource {
|
|
|
15
15
|
/**
|
|
16
16
|
* create invoice
|
|
17
17
|
*/
|
|
18
|
-
create(params: InvoiceCreateParams, options?: Core.RequestOptions):
|
|
18
|
+
create(params: InvoiceCreateParams, options?: Core.RequestOptions): Core.APIPromise<Invoice> {
|
|
19
|
+
// @ts-expect-error idempotency key header isn't defined anymore but is included here for back-compat
|
|
19
20
|
const { 'Idempotency-Key': idempotencyKey, ...body } = params;
|
|
21
|
+
if (idempotencyKey) {
|
|
22
|
+
console.warn(
|
|
23
|
+
"The Idempotency-Key request param is deprecated, the 'idempotencyToken' option should be set instead",
|
|
24
|
+
);
|
|
25
|
+
}
|
|
20
26
|
return this.post('/api/invoices', {
|
|
21
27
|
body,
|
|
22
28
|
...options,
|
|
23
|
-
headers: { 'Idempotency-Key': idempotencyKey
|
|
29
|
+
headers: { 'Idempotency-Key': idempotencyKey, ...options?.headers },
|
|
24
30
|
});
|
|
25
31
|
}
|
|
26
32
|
|
|
27
33
|
/**
|
|
28
34
|
* get invoice
|
|
29
35
|
*/
|
|
30
|
-
retrieve(id: string, options?: Core.RequestOptions):
|
|
36
|
+
retrieve(id: string, options?: Core.RequestOptions): Core.APIPromise<Invoice> {
|
|
31
37
|
return this.get(`/api/invoices/${id}`, options);
|
|
32
38
|
}
|
|
33
39
|
|
|
34
40
|
/**
|
|
35
41
|
* update invoice
|
|
36
42
|
*/
|
|
37
|
-
update(
|
|
38
|
-
|
|
39
|
-
body?: InvoiceUpdateParams,
|
|
40
|
-
options?: Core.RequestOptions,
|
|
41
|
-
): Promise<Core.APIResponse<Invoice>>;
|
|
42
|
-
update(id: string, options?: Core.RequestOptions): Promise<Core.APIResponse<Invoice>>;
|
|
43
|
+
update(id: string, body?: InvoiceUpdateParams, options?: Core.RequestOptions): Core.APIPromise<Invoice>;
|
|
44
|
+
update(id: string, options?: Core.RequestOptions): Core.APIPromise<Invoice>;
|
|
43
45
|
update(
|
|
44
46
|
id: string,
|
|
45
47
|
body: InvoiceUpdateParams | Core.RequestOptions = {},
|
|
46
48
|
options?: Core.RequestOptions,
|
|
47
|
-
):
|
|
49
|
+
): Core.APIPromise<Invoice> {
|
|
48
50
|
if (isRequestOptions(body)) {
|
|
49
51
|
return this.update(id, {}, body);
|
|
50
52
|
}
|
|
@@ -54,12 +56,12 @@ export class Invoices extends APIResource {
|
|
|
54
56
|
/**
|
|
55
57
|
* list invoices
|
|
56
58
|
*/
|
|
57
|
-
list(query?: InvoiceListParams, options?: Core.RequestOptions): Core.PagePromise<InvoicesPage>;
|
|
58
|
-
list(options?: Core.RequestOptions): Core.PagePromise<InvoicesPage>;
|
|
59
|
+
list(query?: InvoiceListParams, options?: Core.RequestOptions): Core.PagePromise<InvoicesPage, Invoice>;
|
|
60
|
+
list(options?: Core.RequestOptions): Core.PagePromise<InvoicesPage, Invoice>;
|
|
59
61
|
list(
|
|
60
62
|
query: InvoiceListParams | Core.RequestOptions = {},
|
|
61
63
|
options?: Core.RequestOptions,
|
|
62
|
-
): Core.PagePromise<InvoicesPage> {
|
|
64
|
+
): Core.PagePromise<InvoicesPage, Invoice> {
|
|
63
65
|
if (isRequestOptions(query)) {
|
|
64
66
|
return this.list({}, query);
|
|
65
67
|
}
|
|
@@ -127,6 +129,19 @@ export interface Invoice {
|
|
|
127
129
|
*/
|
|
128
130
|
live_mode: boolean;
|
|
129
131
|
|
|
132
|
+
/**
|
|
133
|
+
* Emails in addition to the counterparty email to send invoice status
|
|
134
|
+
* notifications to. At least one email is required if notifications are enabled
|
|
135
|
+
* and the counterparty doesn't have an email.
|
|
136
|
+
*/
|
|
137
|
+
notification_email_addresses: Array<string> | null;
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* If true, the invoice will send email notifications to the invoice recipients
|
|
141
|
+
* about invoice status changes.
|
|
142
|
+
*/
|
|
143
|
+
notifications_enabled: boolean;
|
|
144
|
+
|
|
130
145
|
/**
|
|
131
146
|
* A unique record number assigned to each invoice that is issued.
|
|
132
147
|
*/
|
|
@@ -159,7 +174,7 @@ export interface Invoice {
|
|
|
159
174
|
payment_orders: Array<PaymentOrders.PaymentOrder>;
|
|
160
175
|
|
|
161
176
|
/**
|
|
162
|
-
* One of `ach` or `eft
|
|
177
|
+
* One of `ach` or `eft`.
|
|
163
178
|
*/
|
|
164
179
|
payment_type: 'eft' | 'ach' | null;
|
|
165
180
|
|
|
@@ -184,6 +199,11 @@ export interface Invoice {
|
|
|
184
199
|
*/
|
|
185
200
|
total_amount: number;
|
|
186
201
|
|
|
202
|
+
/**
|
|
203
|
+
* IDs of transaction line items associated with an invoice.
|
|
204
|
+
*/
|
|
205
|
+
transaction_line_item_ids: Array<string>;
|
|
206
|
+
|
|
187
207
|
updated_at: string;
|
|
188
208
|
}
|
|
189
209
|
|
|
@@ -300,73 +320,83 @@ export namespace Invoice {
|
|
|
300
320
|
|
|
301
321
|
export interface InvoiceCreateParams {
|
|
302
322
|
/**
|
|
303
|
-
*
|
|
323
|
+
* The ID of the counterparty receiving the invoice.
|
|
304
324
|
*/
|
|
305
325
|
counterparty_id: string;
|
|
306
326
|
|
|
307
327
|
/**
|
|
308
|
-
*
|
|
328
|
+
* A future date by when the invoice needs to be paid.
|
|
309
329
|
*/
|
|
310
330
|
due_date: string;
|
|
311
331
|
|
|
312
332
|
/**
|
|
313
|
-
*
|
|
333
|
+
* The ID of the internal account the invoice should be paid to.
|
|
314
334
|
*/
|
|
315
335
|
originating_account_id: string;
|
|
316
336
|
|
|
317
337
|
/**
|
|
318
|
-
*
|
|
338
|
+
* The invoicer's contact details displayed at the top of the invoice.
|
|
319
339
|
*/
|
|
320
340
|
contact_details?: Array<InvoiceCreateParams.ContactDetail>;
|
|
321
341
|
|
|
322
342
|
/**
|
|
323
|
-
*
|
|
343
|
+
* The counterparty's billing address.
|
|
324
344
|
*/
|
|
325
345
|
counterparty_billing_address?: InvoiceCreateParams.CounterpartyBillingAddress | null;
|
|
326
346
|
|
|
327
347
|
/**
|
|
328
|
-
*
|
|
329
|
-
* delivered.
|
|
348
|
+
* The counterparty's shipping address where physical goods should be delivered.
|
|
330
349
|
*/
|
|
331
350
|
counterparty_shipping_address?: InvoiceCreateParams.CounterpartyShippingAddress | null;
|
|
332
351
|
|
|
333
352
|
/**
|
|
334
|
-
*
|
|
335
|
-
* not provided.
|
|
353
|
+
* Currency that the invoice is denominated in. Defaults to `USD` if not provided.
|
|
336
354
|
*/
|
|
337
355
|
currency?: Shared.Currency | null;
|
|
338
356
|
|
|
339
357
|
/**
|
|
340
|
-
*
|
|
358
|
+
* A free-form description of the invoice.
|
|
341
359
|
*/
|
|
342
360
|
description?: string;
|
|
343
361
|
|
|
344
362
|
/**
|
|
345
|
-
*
|
|
363
|
+
* The invoice issuer's business address.
|
|
346
364
|
*/
|
|
347
365
|
invoicer_address?: InvoiceCreateParams.InvoicerAddress | null;
|
|
348
366
|
|
|
349
367
|
/**
|
|
350
|
-
*
|
|
351
|
-
*
|
|
352
|
-
*
|
|
368
|
+
* Emails in addition to the counterparty email to send invoice status
|
|
369
|
+
* notifications to. At least one email is required if notifications are enabled
|
|
370
|
+
* and the counterparty doesn't have an email.
|
|
371
|
+
*/
|
|
372
|
+
notification_email_addresses?: Array<string> | null;
|
|
373
|
+
|
|
374
|
+
/**
|
|
375
|
+
* If true, the invoice will send email notifications to the invoice recipients
|
|
376
|
+
* about invoice status changes.
|
|
377
|
+
*/
|
|
378
|
+
notifications_enabled?: boolean;
|
|
379
|
+
|
|
380
|
+
/**
|
|
381
|
+
* Date transactions are to be posted to the participants' account. Defaults to the
|
|
382
|
+
* current business day or the next business day if the current day is a bank
|
|
383
|
+
* holiday or weekend. Format: yyyy-mm-dd.
|
|
353
384
|
*/
|
|
354
385
|
payment_effective_date?: string;
|
|
355
386
|
|
|
356
387
|
/**
|
|
357
|
-
*
|
|
358
|
-
*
|
|
359
|
-
*
|
|
360
|
-
*
|
|
361
|
-
*
|
|
362
|
-
*
|
|
363
|
-
* `automatic`.
|
|
388
|
+
* The method by which the invoice can be paid. `ui` will show the embedded payment
|
|
389
|
+
* collection flow. `automatic` will automatically initiate payment based upon the
|
|
390
|
+
* account details of the receiving_account id.\nIf the invoice amount is positive,
|
|
391
|
+
* the automatically initiated payment order's direction will be debit. If the
|
|
392
|
+
* invoice amount is negative, the automatically initiated payment order's
|
|
393
|
+
* direction will be credit. One of `manual`, `ui`, or `automatic`.
|
|
364
394
|
*/
|
|
365
395
|
payment_method?: 'ui' | 'manual' | 'automatic';
|
|
366
396
|
|
|
367
397
|
/**
|
|
368
|
-
*
|
|
369
|
-
* `
|
|
398
|
+
* One of `ach`, `eft`, `wire`, `check`, `sen`, `book`, `rtp`, `sepa`, `bacs`,
|
|
399
|
+
* `au_becs`, `interac`, `signet`, `provexchange`.
|
|
370
400
|
*/
|
|
371
401
|
payment_type?:
|
|
372
402
|
| 'ach'
|
|
@@ -388,15 +418,9 @@ export interface InvoiceCreateParams {
|
|
|
388
418
|
| 'wire';
|
|
389
419
|
|
|
390
420
|
/**
|
|
391
|
-
*
|
|
421
|
+
* The receiving account ID. Can be an `external_account`.
|
|
392
422
|
*/
|
|
393
423
|
receiving_account_id?: string;
|
|
394
|
-
|
|
395
|
-
/**
|
|
396
|
-
* Header param: This key should be something unique, preferably something like an
|
|
397
|
-
* UUID.
|
|
398
|
-
*/
|
|
399
|
-
'Idempotency-Key'?: string;
|
|
400
424
|
}
|
|
401
425
|
|
|
402
426
|
export namespace InvoiceCreateParams {
|
|
@@ -551,6 +575,19 @@ export interface InvoiceUpdateParams {
|
|
|
551
575
|
*/
|
|
552
576
|
invoicer_address?: InvoiceUpdateParams.InvoicerAddress | null;
|
|
553
577
|
|
|
578
|
+
/**
|
|
579
|
+
* Emails in addition to the counterparty email to send invoice status
|
|
580
|
+
* notifications to. At least one email is required if notifications are enabled
|
|
581
|
+
* and the counterparty doesn't have an email.
|
|
582
|
+
*/
|
|
583
|
+
notification_email_addresses?: Array<string> | null;
|
|
584
|
+
|
|
585
|
+
/**
|
|
586
|
+
* If true, the invoice will send email notifications to the invoice recipients
|
|
587
|
+
* about invoice status changes.
|
|
588
|
+
*/
|
|
589
|
+
notifications_enabled?: boolean;
|
|
590
|
+
|
|
554
591
|
/**
|
|
555
592
|
* The ID of the internal account the invoice should be paid to.
|
|
556
593
|
*/
|
|
@@ -603,8 +640,8 @@ export interface InvoiceUpdateParams {
|
|
|
603
640
|
|
|
604
641
|
/**
|
|
605
642
|
* Invoice status must be updated in a `PATCH` request that does not modify any
|
|
606
|
-
* other invoice attributes. Valid state transitions are `draft` to `unpaid
|
|
607
|
-
* `draft` or `unpaid` to `voided`.
|
|
643
|
+
* other invoice attributes. Valid state transitions are `draft` to `unpaid`,
|
|
644
|
+
* `draft` or `unpaid` to `voided`, and `draft` or `unpaid` to `paid`.
|
|
608
645
|
*/
|
|
609
646
|
status?: string;
|
|
610
647
|
}
|