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
|
@@ -2,47 +2,52 @@
|
|
|
2
2
|
// File generated from our OpenAPI spec by Stainless.
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
exports.AccountCollectionFlowsPage = exports.AccountCollectionFlows = void 0;
|
|
5
|
-
const resource_1 = require('modern-treasury/resource');
|
|
6
|
-
const core_1 = require('modern-treasury/core');
|
|
7
|
-
const pagination_1 = require('modern-treasury/pagination');
|
|
5
|
+
const resource_1 = require('modern-treasury/resource.js');
|
|
6
|
+
const core_1 = require('modern-treasury/core.js');
|
|
7
|
+
const pagination_1 = require('modern-treasury/pagination.js');
|
|
8
8
|
class AccountCollectionFlows extends resource_1.APIResource {
|
|
9
9
|
/**
|
|
10
10
|
* create account_collection_flow
|
|
11
11
|
*/
|
|
12
12
|
create(params, options) {
|
|
13
|
+
// @ts-expect-error idempotency key header isn't defined anymore but is included here for back-compat
|
|
13
14
|
const { 'Idempotency-Key': idempotencyKey, ...body } = params;
|
|
15
|
+
if (idempotencyKey) {
|
|
16
|
+
console.warn(
|
|
17
|
+
"The Idempotency-Key request param is deprecated, the 'idempotencyToken' option should be set instead",
|
|
18
|
+
);
|
|
19
|
+
}
|
|
14
20
|
return this.post('/api/account_collection_flows', {
|
|
15
21
|
body,
|
|
16
22
|
...options,
|
|
17
23
|
headers: {
|
|
18
|
-
'Idempotency-Key': idempotencyKey
|
|
24
|
+
'Idempotency-Key': idempotencyKey,
|
|
19
25
|
...(options === null || options === void 0 ? void 0 : options.headers),
|
|
20
26
|
},
|
|
21
27
|
});
|
|
22
28
|
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
return this.get(`/api/account_collection_flows/${id}`, {
|
|
29
|
-
...options,
|
|
30
|
-
headers: {
|
|
31
|
-
'Idempotency-Key': idempotencyKey || '',
|
|
32
|
-
...(options === null || options === void 0 ? void 0 : options.headers),
|
|
33
|
-
},
|
|
34
|
-
});
|
|
29
|
+
/**
|
|
30
|
+
* get account_collection_flow
|
|
31
|
+
*/
|
|
32
|
+
retrieve(id, options) {
|
|
33
|
+
return this.get(`/api/account_collection_flows/${id}`, options);
|
|
35
34
|
}
|
|
36
35
|
/**
|
|
37
36
|
* update account_collection_flow
|
|
38
37
|
*/
|
|
39
38
|
update(id, params, options) {
|
|
39
|
+
// @ts-expect-error idempotency key header isn't defined anymore but is included here for back-compat
|
|
40
40
|
const { 'Idempotency-Key': idempotencyKey, ...body } = params;
|
|
41
|
+
if (idempotencyKey) {
|
|
42
|
+
console.warn(
|
|
43
|
+
"The Idempotency-Key request param is deprecated, the 'idempotencyToken' option should be set instead",
|
|
44
|
+
);
|
|
45
|
+
}
|
|
41
46
|
return this.patch(`/api/account_collection_flows/${id}`, {
|
|
42
47
|
body,
|
|
43
48
|
...options,
|
|
44
49
|
headers: {
|
|
45
|
-
'Idempotency-Key': idempotencyKey
|
|
50
|
+
'Idempotency-Key': idempotencyKey,
|
|
46
51
|
...(options === null || options === void 0 ? void 0 : options.headers),
|
|
47
52
|
},
|
|
48
53
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"account-collection-flows.js","sourceRoot":"","sources":["../src/resources/account-collection-flows.ts"],"names":[],"mappings":";AAAA,qDAAqD;;;AAGrD,uDAAuD;AACvD,+CAAwD;AAExD,2DAA8D;AAE9D,MAAa,sBAAuB,SAAQ,sBAAW;IACrD;;OAEG;IACH,MAAM,CACJ,MAAyC,EACzC,OAA6B;QAE7B,MAAM,EAAE,iBAAiB,EAAE,cAAc,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAC9D,OAAO,IAAI,CAAC,IAAI,CAAC,+BAA+B,EAAE;YAChD,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,iBAAiB,EAAE,cAAc,
|
|
1
|
+
{"version":3,"file":"account-collection-flows.js","sourceRoot":"","sources":["../src/resources/account-collection-flows.ts"],"names":[],"mappings":";AAAA,qDAAqD;;;AAGrD,uDAAuD;AACvD,+CAAwD;AAExD,2DAA8D;AAE9D,MAAa,sBAAuB,SAAQ,sBAAW;IACrD;;OAEG;IACH,MAAM,CACJ,MAAyC,EACzC,OAA6B;QAE7B,qGAAqG;QACrG,MAAM,EAAE,iBAAiB,EAAE,cAAc,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAC9D,IAAI,cAAc,EA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EAA8E;AAwE9E,WAAiB,sBAAsB;AAMvC,CAAC,EANgB,sBAAsB,GAAtB,8BAAsB,KAAtB,8BAAsB,QAMtC"}
|
|
@@ -1,45 +1,50 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless.
|
|
2
|
-
import { APIResource } from 'modern-treasury/resource';
|
|
3
|
-
import { isRequestOptions } from 'modern-treasury/core';
|
|
4
|
-
import { Page } from 'modern-treasury/pagination';
|
|
2
|
+
import { APIResource } from 'modern-treasury/resource.mjs';
|
|
3
|
+
import { isRequestOptions } from 'modern-treasury/core.mjs';
|
|
4
|
+
import { Page } from 'modern-treasury/pagination.mjs';
|
|
5
5
|
export class AccountCollectionFlows extends APIResource {
|
|
6
6
|
/**
|
|
7
7
|
* create account_collection_flow
|
|
8
8
|
*/
|
|
9
9
|
create(params, options) {
|
|
10
|
+
// @ts-expect-error idempotency key header isn't defined anymore but is included here for back-compat
|
|
10
11
|
const { 'Idempotency-Key': idempotencyKey, ...body } = params;
|
|
12
|
+
if (idempotencyKey) {
|
|
13
|
+
console.warn(
|
|
14
|
+
"The Idempotency-Key request param is deprecated, the 'idempotencyToken' option should be set instead",
|
|
15
|
+
);
|
|
16
|
+
}
|
|
11
17
|
return this.post('/api/account_collection_flows', {
|
|
12
18
|
body,
|
|
13
19
|
...options,
|
|
14
20
|
headers: {
|
|
15
|
-
'Idempotency-Key': idempotencyKey
|
|
21
|
+
'Idempotency-Key': idempotencyKey,
|
|
16
22
|
...(options === null || options === void 0 ? void 0 : options.headers),
|
|
17
23
|
},
|
|
18
24
|
});
|
|
19
25
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
return this.get(`/api/account_collection_flows/${id}`, {
|
|
26
|
-
...options,
|
|
27
|
-
headers: {
|
|
28
|
-
'Idempotency-Key': idempotencyKey || '',
|
|
29
|
-
...(options === null || options === void 0 ? void 0 : options.headers),
|
|
30
|
-
},
|
|
31
|
-
});
|
|
26
|
+
/**
|
|
27
|
+
* get account_collection_flow
|
|
28
|
+
*/
|
|
29
|
+
retrieve(id, options) {
|
|
30
|
+
return this.get(`/api/account_collection_flows/${id}`, options);
|
|
32
31
|
}
|
|
33
32
|
/**
|
|
34
33
|
* update account_collection_flow
|
|
35
34
|
*/
|
|
36
35
|
update(id, params, options) {
|
|
36
|
+
// @ts-expect-error idempotency key header isn't defined anymore but is included here for back-compat
|
|
37
37
|
const { 'Idempotency-Key': idempotencyKey, ...body } = params;
|
|
38
|
+
if (idempotencyKey) {
|
|
39
|
+
console.warn(
|
|
40
|
+
"The Idempotency-Key request param is deprecated, the 'idempotencyToken' option should be set instead",
|
|
41
|
+
);
|
|
42
|
+
}
|
|
38
43
|
return this.patch(`/api/account_collection_flows/${id}`, {
|
|
39
44
|
body,
|
|
40
45
|
...options,
|
|
41
46
|
headers: {
|
|
42
|
-
'Idempotency-Key': idempotencyKey
|
|
47
|
+
'Idempotency-Key': idempotencyKey,
|
|
43
48
|
...(options === null || options === void 0 ? void 0 : options.headers),
|
|
44
49
|
},
|
|
45
50
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"account-collection-flows.mjs","sourceRoot":"","sources":["../src/resources/account-collection-flows.ts"],"names":[],"mappings":"AAAA,qDAAqD;OAG9C,EAAE,WAAW,EAAE,MAAM,0BAA0B;OAC/C,EAAE,gBAAgB,EAAE,MAAM,sBAAsB;OAEhD,EAAE,IAAI,EAAc,MAAM,4BAA4B;AAE7D,MAAM,OAAO,sBAAuB,SAAQ,WAAW;IACrD;;OAEG;IACH,MAAM,CACJ,MAAyC,EACzC,OAA6B;QAE7B,MAAM,EAAE,iBAAiB,EAAE,cAAc,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAC9D,OAAO,IAAI,CAAC,IAAI,CAAC,+BAA+B,EAAE;YAChD,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,iBAAiB,EAAE,cAAc,
|
|
1
|
+
{"version":3,"file":"account-collection-flows.mjs","sourceRoot":"","sources":["../src/resources/account-collection-flows.ts"],"names":[],"mappings":"AAAA,qDAAqD;OAG9C,EAAE,WAAW,EAAE,MAAM,0BAA0B;OAC/C,EAAE,gBAAgB,EAAE,MAAM,sBAAsB;OAEhD,EAAE,IAAI,EAAc,MAAM,4BAA4B;AAE7D,MAAM,OAAO,sBAAuB,SAAQ,WAAW;IACrD;;OAEG;IACH,MAAM,CACJ,MAAyC,EACzC,OAA6B;QAE7B,qGAAqG;QACrG,MAAM,EAAE,iBAAiB,EAAE,cAAc,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAC9D,IAAI,cAAc,EAAE;YAClB,OAAO,CAAC,IAAI,CACV,sGAAsG,CACvG,CAAC;SACH;QACD,OAAO,IAAI,CAAC,IAAI,CAAC,+BAA+B,EAAE;YAChD,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,iBAAiB,EAAE,cAAc,EAAE,GAAG,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,EAAE;SACpE,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,EAAU,EAAE,OAA6B;QAChD,OAAO,IAAI,CAAC,GAAG,CAAC,iCAAiC,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAClE,CAAC;IAED;;OAEG;IACH,MAAM,CACJ,EAAU,EACV,MAAyC,EACzC,OAA6B;QAE7B,qGAAqG;QACrG,MAAM,EAAE,iBAAiB,EAAE,cAAc,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAC9D,IAAI,cAAc,EAAE;YAClB,OAAO,CAAC,IAAI,CACV,sGAAsG,CACvG,CAAC;SACH;QACD,OAAO,IAAI,CAAC,KAAK,CAAC,iCAAiC,EAAE,EAAE,EAAE;YACvD,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,iBAAiB,EAAE,cAAc,EAAE,GAAG,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,EAAE;SACpE,CAAC,CAAC;IACL,CAAC;IAUD,IAAI,CACF,QAA+D,EAAE,EACjE,OAA6B;QAE7B,IAAI,gBAAgB,CAAC,KAAK,CAAC,EAAE;YAC3B,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;SAC7B;QACD,OAAO,IAAI,CAAC,UAAU,CAAC,+BAA+B,EAAE,0BAA0B,EAAE;YAClF,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF;AAED,MAAM,OAAO,0BAA2B,SAAQ,IAA2B;CAAG;AAwE9E,WAAiB,sBAAsB;AAMvC,CAAC,EANgB,sBAAsB,KAAtB,sBAAsB,QAMtC"}
|
|
@@ -12,7 +12,7 @@ export declare class AccountDetails extends APIResource {
|
|
|
12
12
|
accountId: string,
|
|
13
13
|
params: AccountDetailCreateParams,
|
|
14
14
|
options?: Core.RequestOptions,
|
|
15
|
-
):
|
|
15
|
+
): Core.APIPromise<AccountDetail>;
|
|
16
16
|
/**
|
|
17
17
|
* Get a single account detail for a single internal or external account.
|
|
18
18
|
*/
|
|
@@ -21,7 +21,7 @@ export declare class AccountDetails extends APIResource {
|
|
|
21
21
|
accountId: string,
|
|
22
22
|
id: string,
|
|
23
23
|
options?: Core.RequestOptions,
|
|
24
|
-
):
|
|
24
|
+
): Core.APIPromise<AccountDetail>;
|
|
25
25
|
/**
|
|
26
26
|
* Get a list of account details for a single internal or external account.
|
|
27
27
|
*/
|
|
@@ -30,12 +30,12 @@ export declare class AccountDetails extends APIResource {
|
|
|
30
30
|
accountId: string,
|
|
31
31
|
query?: AccountDetailListParams,
|
|
32
32
|
options?: Core.RequestOptions,
|
|
33
|
-
): Core.PagePromise<AccountDetailsPage>;
|
|
33
|
+
): Core.PagePromise<AccountDetailsPage, AccountDetail>;
|
|
34
34
|
list(
|
|
35
35
|
accountsType: Shared.AccountsType,
|
|
36
36
|
accountId: string,
|
|
37
37
|
options?: Core.RequestOptions,
|
|
38
|
-
): Core.PagePromise<AccountDetailsPage>;
|
|
38
|
+
): Core.PagePromise<AccountDetailsPage, AccountDetail>;
|
|
39
39
|
/**
|
|
40
40
|
* Delete a single account detail for an external account.
|
|
41
41
|
*/
|
|
@@ -44,7 +44,7 @@ export declare class AccountDetails extends APIResource {
|
|
|
44
44
|
accountId: string,
|
|
45
45
|
id: string,
|
|
46
46
|
options?: Core.RequestOptions,
|
|
47
|
-
):
|
|
47
|
+
): Core.APIPromise<void>;
|
|
48
48
|
}
|
|
49
49
|
export declare class AccountDetailsPage extends Page<AccountDetail> {}
|
|
50
50
|
type _AccountDetailsPage = AccountDetailsPage;
|
|
@@ -75,19 +75,14 @@ export interface AccountDetail {
|
|
|
75
75
|
}
|
|
76
76
|
export interface AccountDetailCreateParams {
|
|
77
77
|
/**
|
|
78
|
-
*
|
|
78
|
+
* The account number for the bank account.
|
|
79
79
|
*/
|
|
80
80
|
account_number: string;
|
|
81
81
|
/**
|
|
82
|
-
*
|
|
83
|
-
*
|
|
82
|
+
* One of `iban`, `clabe`, `wallet_address`, or `other`. Use `other` if the bank
|
|
83
|
+
* account number is in a generic format.
|
|
84
84
|
*/
|
|
85
85
|
account_number_type?: 'clabe' | 'iban' | 'other' | 'pan' | 'wallet_address';
|
|
86
|
-
/**
|
|
87
|
-
* Header param: This key should be something unique, preferably something like an
|
|
88
|
-
* UUID.
|
|
89
|
-
*/
|
|
90
|
-
'Idempotency-Key'?: string;
|
|
91
86
|
}
|
|
92
87
|
export interface AccountDetailListParams extends PageParams {}
|
|
93
88
|
export declare namespace AccountDetails {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"account-details.d.ts","sourceRoot":"","sources":["../src/resources/account-details.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,IAAI,MAAM,sBAAsB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,OAAO,KAAK,MAAM,M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,aAAa,CAAC;IAChD,KAAY,kBAAkB,GAAG,mBAAmB,CAAC;IACrD,MAAM,QAAQ,yBAAyB,GAAG,GAAG,CAAC,yBAAyB,CAAC;IACxE,MAAM,QAAQ,uBAAuB,GAAG,GAAG,CAAC,uBAAuB,CAAC;CACrE"}
|
|
@@ -2,20 +2,26 @@
|
|
|
2
2
|
// File generated from our OpenAPI spec by Stainless.
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
exports.AccountDetailsPage = exports.AccountDetails = void 0;
|
|
5
|
-
const resource_1 = require('modern-treasury/resource');
|
|
6
|
-
const core_1 = require('modern-treasury/core');
|
|
7
|
-
const pagination_1 = require('modern-treasury/pagination');
|
|
5
|
+
const resource_1 = require('modern-treasury/resource.js');
|
|
6
|
+
const core_1 = require('modern-treasury/core.js');
|
|
7
|
+
const pagination_1 = require('modern-treasury/pagination.js');
|
|
8
8
|
class AccountDetails extends resource_1.APIResource {
|
|
9
9
|
/**
|
|
10
10
|
* Create an account detail for an external account.
|
|
11
11
|
*/
|
|
12
12
|
create(accountsType, accountId, params, options) {
|
|
13
|
+
// @ts-expect-error idempotency key header isn't defined anymore but is included here for back-compat
|
|
13
14
|
const { 'Idempotency-Key': idempotencyKey, ...body } = params;
|
|
15
|
+
if (idempotencyKey) {
|
|
16
|
+
console.warn(
|
|
17
|
+
"The Idempotency-Key request param is deprecated, the 'idempotencyToken' option should be set instead",
|
|
18
|
+
);
|
|
19
|
+
}
|
|
14
20
|
return this.post(`/api/${accountsType}/${accountId}/account_details`, {
|
|
15
21
|
body,
|
|
16
22
|
...options,
|
|
17
23
|
headers: {
|
|
18
|
-
'Idempotency-Key': idempotencyKey
|
|
24
|
+
'Idempotency-Key': idempotencyKey,
|
|
19
25
|
...(options === null || options === void 0 ? void 0 : options.headers),
|
|
20
26
|
},
|
|
21
27
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"account-details.js","sourceRoot":"","sources":["../src/resources/account-details.ts"],"names":[],"mappings":";AAAA,qDAAqD;;;AAGrD,uDAAuD;AACvD,+CAAwD;AAGxD,2DAA8D;AAE9D,MAAa,cAAe,SAAQ,sBAAW;IAC7C;;OAEG;IACH,MAAM,CACJ,YAAiC,EACjC,SAAiB,EACjB,MAAiC,EACjC,OAA6B;QAE7B,MAAM,EAAE,iBAAiB,EAAE,cAAc,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAC9D,OAAO,IAAI,CAAC,IAAI,CAAC,QAAQ,YAAY,IAAI,SAAS,kBAAkB,EAAE;YACpE,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,iBAAiB,EAAE,cAAc,
|
|
1
|
+
{"version":3,"file":"account-details.js","sourceRoot":"","sources":["../src/resources/account-details.ts"],"names":[],"mappings":";AAAA,qDAAqD;;;AAGrD,uDAAuD;AACvD,+CAAwD;AAGxD,2DAA8D;AAE9D,MAAa,cAAe,SAAQ,sBAAW;IAC7C;;OAEG;IACH,MAAM,CACJ,YAAiC,EACjC,SAAiB,EACjB,MAAiC,EACjC,OAA6B;QAE7B,qGAAqG;QACrG,MAAM,EAAE,iBAAiB,EAAE,cAAc,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAC9D,IAAI,cAAc,EAAE;YAClB,OAAO,CAAC,IAAI,CACV,sGAAsG,CACvG,CAAC;SACH;QACD,OAAO,IAAI,CAAC,IAAI,CAAC,QAAQ,YAAY,IAAI,SAAS,kBAAkB,EAAE;YACpE,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,iBAAiB,EAAE,cAAc,EAAE,GAAG,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,EAAE;SACpE,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,QAAQ,CACN,YAAiC,EACjC,SAAiB,EACjB,EAAU,EACV,OAA6B;QAE7B,OAAO,IAAI,CAAC,GAAG,CAAC,QAAQ,YAAY,IAAI,SAAS,oBAAoB,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IACtF,CAAC;IAgBD,IAAI,CACF,YAAiC,EACjC,SAAiB,EACjB,QAAuD,EAAE,EACzD,OAA6B;QAE7B,IAAI,IAAA,uBAAgB,EAAC,KAAK,CAAC,EAAE;YAC3B,OAAO,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,SAAS,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;SACtD;QACD,OAAO,IAAI,CAAC,UAAU,CAAC,QAAQ,YAAY,IAAI,SAAS,kBAAkB,EAAE,kBAAkB,EAAE;YAC9F,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,GAAG,CACD,YAAiC,EACjC,SAAiB,EACjB,EAAU,EACV,OAA6B;QAE7B,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,YAAY,IAAI,SAAS,oBAAoB,EAAE,EAAE,EAAE;YAC5E,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,GAAG,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,EAAE;SAC7C,CAAC,CAAC;IACL,CAAC;CACF;AA/ED,wCA+EC;AAED,MAAa,kBAAmB,SAAQ,iBAAmB;CAAG;AAA9D,gDAA8D;AAqD9D,WAAiB,cAAc;AAK/B,CAAC,EALgB,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAK9B"}
|
|
@@ -1,18 +1,24 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless.
|
|
2
|
-
import { APIResource } from 'modern-treasury/resource';
|
|
3
|
-
import { isRequestOptions } from 'modern-treasury/core';
|
|
4
|
-
import { Page } from 'modern-treasury/pagination';
|
|
2
|
+
import { APIResource } from 'modern-treasury/resource.mjs';
|
|
3
|
+
import { isRequestOptions } from 'modern-treasury/core.mjs';
|
|
4
|
+
import { Page } from 'modern-treasury/pagination.mjs';
|
|
5
5
|
export class AccountDetails extends APIResource {
|
|
6
6
|
/**
|
|
7
7
|
* Create an account detail for an external account.
|
|
8
8
|
*/
|
|
9
9
|
create(accountsType, accountId, params, options) {
|
|
10
|
+
// @ts-expect-error idempotency key header isn't defined anymore but is included here for back-compat
|
|
10
11
|
const { 'Idempotency-Key': idempotencyKey, ...body } = params;
|
|
12
|
+
if (idempotencyKey) {
|
|
13
|
+
console.warn(
|
|
14
|
+
"The Idempotency-Key request param is deprecated, the 'idempotencyToken' option should be set instead",
|
|
15
|
+
);
|
|
16
|
+
}
|
|
11
17
|
return this.post(`/api/${accountsType}/${accountId}/account_details`, {
|
|
12
18
|
body,
|
|
13
19
|
...options,
|
|
14
20
|
headers: {
|
|
15
|
-
'Idempotency-Key': idempotencyKey
|
|
21
|
+
'Idempotency-Key': idempotencyKey,
|
|
16
22
|
...(options === null || options === void 0 ? void 0 : options.headers),
|
|
17
23
|
},
|
|
18
24
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"account-details.mjs","sourceRoot":"","sources":["../src/resources/account-details.ts"],"names":[],"mappings":"AAAA,qDAAqD;OAG9C,EAAE,WAAW,EAAE,MAAM,0BAA0B;OAC/C,EAAE,gBAAgB,EAAE,MAAM,sBAAsB;OAGhD,EAAE,IAAI,EAAc,MAAM,4BAA4B;AAE7D,MAAM,OAAO,cAAe,SAAQ,WAAW;IAC7C;;OAEG;IACH,MAAM,CACJ,YAAiC,EACjC,SAAiB,EACjB,MAAiC,EACjC,OAA6B;QAE7B,MAAM,EAAE,iBAAiB,EAAE,cAAc,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAC9D,OAAO,IAAI,CAAC,IAAI,CAAC,QAAQ,YAAY,IAAI,SAAS,kBAAkB,EAAE;YACpE,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,iBAAiB,EAAE,cAAc,
|
|
1
|
+
{"version":3,"file":"account-details.mjs","sourceRoot":"","sources":["../src/resources/account-details.ts"],"names":[],"mappings":"AAAA,qDAAq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ACD,YAAiC,EACjC,SAAiB,EACjB,EAAU,EACV,OAA6B;QAE7B,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,YAAY,IAAI,SAAS,oBAAoB,EAAE,EAAE,EAAE;YAC5E,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,GAAG,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,EAAE;SAC7C,CAAC,CAAC;IACL,CAAC;CACF;AAED,MAAM,OAAO,kBAAmB,SAAQ,IAAmB;CAAG;AAqD9D,WAAiB,cAAc;AAK/B,CAAC,EALgB,cAAc,KAAd,cAAc,QAK9B"}
|
|
@@ -6,8 +6,11 @@ export declare class Connections extends APIResource {
|
|
|
6
6
|
/**
|
|
7
7
|
* Get a list of all connections.
|
|
8
8
|
*/
|
|
9
|
-
list(
|
|
10
|
-
|
|
9
|
+
list(
|
|
10
|
+
query?: ConnectionListParams,
|
|
11
|
+
options?: Core.RequestOptions,
|
|
12
|
+
): Core.PagePromise<ConnectionsPage, Connection>;
|
|
13
|
+
list(options?: Core.RequestOptions): Core.PagePromise<ConnectionsPage, Connection>;
|
|
11
14
|
}
|
|
12
15
|
export declare class ConnectionsPage extends Page<Connection> {}
|
|
13
16
|
type _ConnectionsPage = ConnectionsPage;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connections.d.ts","sourceRoot":"","sources":["../src/resources/connections.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,IAAI,MAAM,sBAAsB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,OAAO,KAAK,GAAG,MAAM,SAAS,CAAC;AAC/B,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAE9D,qBAAa,WAAY,SAAQ,WAAW;IAC1C;;OAEG;IACH,IAAI,
|
|
1
|
+
{"version":3,"file":"connections.d.ts","sourceRoot":"","sources":["../src/resources/connections.ts"],"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AAY,eAAe,GAAG,gBAAgB,CAAC;IAC/C,MAAM,QAAQ,oBAAoB,GAAG,GAAG,CAAC,oBAAoB,CAAC;CAC/D"}
|
package/resources/connections.js
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
// File generated from our OpenAPI spec by Stainless.
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
exports.ConnectionsPage = exports.Connections = void 0;
|
|
5
|
-
const resource_1 = require('modern-treasury/resource');
|
|
6
|
-
const core_1 = require('modern-treasury/core');
|
|
7
|
-
const pagination_1 = require('modern-treasury/pagination');
|
|
5
|
+
const resource_1 = require('modern-treasury/resource.js');
|
|
6
|
+
const core_1 = require('modern-treasury/core.js');
|
|
7
|
+
const pagination_1 = require('modern-treasury/pagination.js');
|
|
8
8
|
class Connections extends resource_1.APIResource {
|
|
9
9
|
list(query = {}, options) {
|
|
10
10
|
if ((0, core_1.isRequestOptions)(query)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connections.js","sourceRoot":"","sources":["../src/resources/connections.ts"],"names":[],"mappings":";AAAA,qDAAqD;;;AAGrD,uDAAuD;AACvD,+CAAwD;AAExD,2DAA8D;AAE9D,MAAa,WAAY,SAAQ,sBAAW;
|
|
1
|
+
{"version":3,"file":"connections.js","sourceRoot":"","sources":["../src/resources/connections.ts"],"names":[],"mappings":";AAAA,qDAAqD;;;AAGrD,uDAAuD;AACvD,+CAAwD;AAExD,2DAA8D;AAE9D,MAAa,WAAY,SAAQ,sBAAW;IAS1C,IAAI,CACF,QAAoD,EAAE,EACtD,OAA6B;QAE7B,IAAI,IAAA,uBAAgB,EAAC,KAAK,CAAC,EAAE;YAC3B,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;SAC7B;QACD,OAAO,IAAI,CAAC,UAAU,CAAC,kBAAkB,EAAE,eAAe,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrF,CAAC;CACF;AAlBD,kCAkBC;AAED,MAAa,eAAgB,SAAQ,iBAAgB;CAAG;AAAxD,0CAAwD;AAiDxD,WAAiB,WAAW;AAI5B,CAAC,EAJgB,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAI3B"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless.
|
|
2
|
-
import { APIResource } from 'modern-treasury/resource';
|
|
3
|
-
import { isRequestOptions } from 'modern-treasury/core';
|
|
4
|
-
import { Page } from 'modern-treasury/pagination';
|
|
2
|
+
import { APIResource } from 'modern-treasury/resource.mjs';
|
|
3
|
+
import { isRequestOptions } from 'modern-treasury/core.mjs';
|
|
4
|
+
import { Page } from 'modern-treasury/pagination.mjs';
|
|
5
5
|
export class Connections extends APIResource {
|
|
6
6
|
list(query = {}, options) {
|
|
7
7
|
if (isRequestOptions(query)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connections.mjs","sourceRoot":"","sources":["../src/resources/connections.ts"],"names":[],"mappings":"AAAA,qDAAqD;OAG9C,EAAE,WAAW,EAAE,MAAM,0BAA0B;OAC/C,EAAE,gBAAgB,EAAE,MAAM,sBAAsB;OAEhD,EAAE,IAAI,EAAc,MAAM,4BAA4B;AAE7D,MAAM,OAAO,WAAY,SAAQ,WAAW;
|
|
1
|
+
{"version":3,"file":"connections.mjs","sourceRoot":"","sources":["../src/resources/connections.ts"],"names":[],"mappings":"AAAA,qDAAqD;OAG9C,EAAE,WAAW,EAAE,MAAM,0BAA0B;OAC/C,EAAE,gBAAgB,EAAE,MAAM,sBAAsB;OAEhD,EAAE,IAAI,EAAc,MAAM,4BAA4B;AAE7D,MAAM,OAAO,WAAY,SAAQ,WAAW;IAS1C,IAAI,CACF,QAAoD,EAAE,EACtD,OAA6B;QAE7B,IAAI,gBAAgB,CAAC,KAAK,CAAC,EAAE;YAC3B,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;SAC7B;QACD,OAAO,IAAI,CAAC,UAAU,CAAC,kBAAkB,EAAE,eAAe,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrF,CAAC;CACF;AAED,MAAM,OAAO,eAAgB,SAAQ,IAAgB;CAAG;AAiDxD,WAAiB,WAAW;AAI5B,CAAC,EAJgB,WAAW,KAAX,WAAW,QAI3B"}
|
|
@@ -9,14 +9,11 @@ export declare class Counterparties extends APIResource {
|
|
|
9
9
|
/**
|
|
10
10
|
* Create a new counterparty.
|
|
11
11
|
*/
|
|
12
|
-
create(
|
|
13
|
-
params: CounterpartyCreateParams,
|
|
14
|
-
options?: Core.RequestOptions,
|
|
15
|
-
): Promise<Core.APIResponse<Counterparty>>;
|
|
12
|
+
create(params: CounterpartyCreateParams, options?: Core.RequestOptions): Core.APIPromise<Counterparty>;
|
|
16
13
|
/**
|
|
17
14
|
* Get details on a single counterparty.
|
|
18
15
|
*/
|
|
19
|
-
retrieve(id: string, options?: Core.RequestOptions):
|
|
16
|
+
retrieve(id: string, options?: Core.RequestOptions): Core.APIPromise<Counterparty>;
|
|
20
17
|
/**
|
|
21
18
|
* Updates a given counterparty with new information.
|
|
22
19
|
*/
|
|
@@ -24,17 +21,20 @@ export declare class Counterparties extends APIResource {
|
|
|
24
21
|
id: string,
|
|
25
22
|
body?: CounterpartyUpdateParams,
|
|
26
23
|
options?: Core.RequestOptions,
|
|
27
|
-
):
|
|
28
|
-
update(id: string, options?: Core.RequestOptions):
|
|
24
|
+
): Core.APIPromise<Counterparty>;
|
|
25
|
+
update(id: string, options?: Core.RequestOptions): Core.APIPromise<Counterparty>;
|
|
29
26
|
/**
|
|
30
27
|
* Get a paginated list of all counterparties.
|
|
31
28
|
*/
|
|
32
|
-
list(
|
|
33
|
-
|
|
29
|
+
list(
|
|
30
|
+
query?: CounterpartyListParams,
|
|
31
|
+
options?: Core.RequestOptions,
|
|
32
|
+
): Core.PagePromise<CounterpartiesPage, Counterparty>;
|
|
33
|
+
list(options?: Core.RequestOptions): Core.PagePromise<CounterpartiesPage, Counterparty>;
|
|
34
34
|
/**
|
|
35
35
|
* Deletes a given counterparty.
|
|
36
36
|
*/
|
|
37
|
-
del(id: string, options?: Core.RequestOptions):
|
|
37
|
+
del(id: string, options?: Core.RequestOptions): Core.APIPromise<void>;
|
|
38
38
|
/**
|
|
39
39
|
* Send an email requesting account details.
|
|
40
40
|
*/
|
|
@@ -42,7 +42,7 @@ export declare class Counterparties extends APIResource {
|
|
|
42
42
|
id: string,
|
|
43
43
|
params: CounterpartyCollectAccountParams,
|
|
44
44
|
options?: Core.RequestOptions,
|
|
45
|
-
):
|
|
45
|
+
): Core.APIPromise<CounterpartyCollectAccountResponse>;
|
|
46
46
|
}
|
|
47
47
|
export declare class CounterpartiesPage extends Page<Counterparty> {}
|
|
48
48
|
type _CounterpartiesPage = CounterpartiesPage;
|
|
@@ -201,49 +201,41 @@ export interface CounterpartyCollectAccountResponse {
|
|
|
201
201
|
}
|
|
202
202
|
export interface CounterpartyCreateParams {
|
|
203
203
|
/**
|
|
204
|
-
*
|
|
204
|
+
* A human friendly name for this counterparty.
|
|
205
205
|
*/
|
|
206
206
|
name: string | null;
|
|
207
|
-
/**
|
|
208
|
-
* Body param:
|
|
209
|
-
*/
|
|
210
207
|
accounting?: CounterpartyCreateParams.Accounting;
|
|
211
208
|
/**
|
|
212
|
-
*
|
|
209
|
+
* The accounts for this counterparty.
|
|
213
210
|
*/
|
|
214
211
|
accounts?: Array<CounterpartyCreateParams.Account>;
|
|
215
212
|
/**
|
|
216
|
-
*
|
|
213
|
+
* The counterparty's email.
|
|
217
214
|
*/
|
|
218
215
|
email?: string | null;
|
|
219
216
|
/**
|
|
220
|
-
*
|
|
221
|
-
*
|
|
217
|
+
* An optional type to auto-sync the counterparty to your ledger. Either `customer`
|
|
218
|
+
* or `vendor`.
|
|
222
219
|
*/
|
|
223
220
|
ledger_type?: 'customer' | 'vendor';
|
|
224
221
|
/**
|
|
225
|
-
*
|
|
226
|
-
*
|
|
222
|
+
* Additional data represented as key-value pairs. Both the key and value must be
|
|
223
|
+
* strings.
|
|
227
224
|
*/
|
|
228
225
|
metadata?: Record<string, string>;
|
|
229
226
|
/**
|
|
230
|
-
*
|
|
231
|
-
*
|
|
227
|
+
* Send an email to the counterparty whenever an associated payment order is sent
|
|
228
|
+
* to the bank.
|
|
232
229
|
*/
|
|
233
230
|
send_remittance_advice?: boolean;
|
|
234
231
|
/**
|
|
235
|
-
*
|
|
232
|
+
* Either a valid SSN or EIN.
|
|
236
233
|
*/
|
|
237
234
|
taxpayer_identifier?: string;
|
|
238
235
|
/**
|
|
239
|
-
*
|
|
236
|
+
* The verification status of the counterparty.
|
|
240
237
|
*/
|
|
241
238
|
verification_status?: 'denied' | 'needs_approval' | 'unverified' | 'verified';
|
|
242
|
-
/**
|
|
243
|
-
* Header param: This key should be something unique, preferably something like an
|
|
244
|
-
* UUID.
|
|
245
|
-
*/
|
|
246
|
-
'Idempotency-Key'?: string;
|
|
247
239
|
}
|
|
248
240
|
export declare namespace CounterpartyCreateParams {
|
|
249
241
|
interface Accounting {
|
|
@@ -465,24 +457,23 @@ export interface CounterpartyListParams extends PageParams {
|
|
|
465
457
|
}
|
|
466
458
|
export interface CounterpartyCollectAccountParams {
|
|
467
459
|
/**
|
|
468
|
-
*
|
|
469
|
-
*
|
|
470
|
-
*
|
|
460
|
+
* One of `credit` or `debit`. Use `credit` when you want to pay a counterparty.
|
|
461
|
+
* Use `debit` when you need to charge a counterparty. This field helps us send a
|
|
462
|
+
* more tailored email to your counterparties."
|
|
471
463
|
*/
|
|
472
464
|
direction: 'credit' | 'debit';
|
|
473
465
|
/**
|
|
474
|
-
*
|
|
475
|
-
*
|
|
476
|
-
*
|
|
466
|
+
* The URL you want your customer to visit upon filling out the form. By default,
|
|
467
|
+
* they will be sent to a Modern Treasury landing page. This must be a valid HTTPS
|
|
468
|
+
* URL if set.
|
|
477
469
|
*/
|
|
478
470
|
custom_redirect?: string;
|
|
479
471
|
/**
|
|
480
|
-
*
|
|
481
|
-
*
|
|
482
|
-
* \"
|
|
483
|
-
*
|
|
484
|
-
* \"
|
|
485
|
-
* \"swiftCode\"].
|
|
472
|
+
* The list of fields you want on the form. This field is optional and if it is not
|
|
473
|
+
* set, will default to [\"nameOnAccount\", \"accountType\", \"accountNumber\",
|
|
474
|
+
* \"routingNumber\", \"address\"]. The full list of options is [\"name\",
|
|
475
|
+
* \"nameOnAccount\", \"taxpayerIdentifier\", \"accountType\", \"accountNumber\",
|
|
476
|
+
* \"routingNumber\", \"address\", \"ibanNumber\", \"swiftCode\"].
|
|
486
477
|
*/
|
|
487
478
|
fields?: Array<
|
|
488
479
|
| 'name'
|
|
@@ -508,17 +499,12 @@ export interface CounterpartyCollectAccountParams {
|
|
|
508
499
|
| 'address'
|
|
509
500
|
>;
|
|
510
501
|
/**
|
|
511
|
-
*
|
|
512
|
-
*
|
|
513
|
-
*
|
|
514
|
-
*
|
|
502
|
+
* By default, Modern Treasury will send an email to your counterparty that
|
|
503
|
+
* includes a link to the form they must fill out. However, if you would like to
|
|
504
|
+
* send the counterparty the link, you can set this parameter to `false`. The JSON
|
|
505
|
+
* body will include the link to the secure Modern Treasury form.
|
|
515
506
|
*/
|
|
516
507
|
send_email?: boolean;
|
|
517
|
-
/**
|
|
518
|
-
* Header param: This key should be something unique, preferably something like an
|
|
519
|
-
* UUID.
|
|
520
|
-
*/
|
|
521
|
-
'Idempotency-Key'?: string;
|
|
522
508
|
}
|
|
523
509
|
export declare namespace Counterparties {
|
|
524
510
|
export import Counterparty = API.Counterparty;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"counterparties.d.ts","sourceRoot":"","sources":["../src/resources/counterparties.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,IAAI,MAAM,sBAAsB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,OAAO,KAAK,gBAAgB,MAAM,6CAA6C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