modern-treasury 2.3.0 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +31 -0
- package/README.md +2 -0
- package/_shims/{ReadableStream.node.d.ts → ReadableStream-node.d.ts} +1 -1
- package/_shims/ReadableStream-node.d.ts.map +1 -0
- package/_shims/{ReadableStream.node.js → ReadableStream-node.js} +1 -1
- package/_shims/ReadableStream-node.js.map +1 -0
- package/_shims/{ReadableStream.node.mjs → ReadableStream-node.mjs} +1 -1
- package/_shims/ReadableStream-node.mjs.map +1 -0
- package/_shims/{agent.node.d.ts → agent-node.d.ts} +1 -1
- package/_shims/agent-node.d.ts.map +1 -0
- package/_shims/{agent.node.js → agent-node.js} +1 -1
- package/_shims/{agent.node.js.map → agent-node.js.map} +1 -1
- package/_shims/{agent.node.mjs → agent-node.mjs} +1 -1
- package/_shims/{agent.node.mjs.map → agent-node.mjs.map} +1 -1
- package/_shims/agent.d.ts +1 -1
- package/_shims/agent.js +1 -1
- package/_shims/agent.mjs +1 -1
- package/{src/_shims/fetch.node.d.ts → _shims/fetch-node.d.ts} +1 -0
- package/_shims/fetch.d.ts +1 -0
- package/_shims/{fileFromPath.node.d.ts → fileFromPath-node.d.ts} +2 -2
- package/_shims/{fileFromPath.node.d.ts.map → fileFromPath-node.d.ts.map} +1 -1
- package/_shims/{fileFromPath.node.js → fileFromPath-node.js} +1 -1
- package/_shims/{fileFromPath.node.js.map → fileFromPath-node.js.map} +1 -1
- package/_shims/{fileFromPath.node.mjs → fileFromPath-node.mjs} +1 -1
- package/_shims/{fileFromPath.node.mjs.map → fileFromPath-node.mjs.map} +1 -1
- package/_shims/fileFromPath.d.ts +2 -2
- package/_shims/fileFromPath.d.ts.map +1 -1
- package/_shims/fileFromPath.js +1 -1
- package/_shims/fileFromPath.mjs +1 -1
- package/_shims/form-data.js +17 -0
- package/_shims/form-data.mjs +20 -0
- package/_shims/{getMultipartRequestOptions.node.d.ts → getMultipartRequestOptions-node.d.ts} +2 -2
- package/_shims/getMultipartRequestOptions-node.d.ts.map +1 -0
- package/_shims/{getMultipartRequestOptions.node.js → getMultipartRequestOptions-node.js} +1 -1
- package/_shims/{getMultipartRequestOptions.node.js.map → getMultipartRequestOptions-node.js.map} +1 -1
- package/_shims/{getMultipartRequestOptions.node.mjs → getMultipartRequestOptions-node.mjs} +1 -1
- package/_shims/{getMultipartRequestOptions.node.mjs.map → getMultipartRequestOptions-node.mjs.map} +1 -1
- package/_shims/getMultipartRequestOptions.d.ts +1 -1
- package/_shims/getMultipartRequestOptions.d.ts.map +1 -1
- package/_shims/{node-readable.node.d.ts → node-readable-node.d.ts} +1 -1
- package/_shims/{node-readable.node.d.ts.map → node-readable-node.d.ts.map} +1 -1
- package/_shims/{node-readable.node.js → node-readable-node.js} +1 -1
- package/_shims/node-readable-node.js.map +1 -0
- package/_shims/{node-readable.node.mjs → node-readable-node.mjs} +1 -1
- package/_shims/node-readable-node.mjs.map +1 -0
- package/core.d.ts +13 -5
- package/core.d.ts.map +1 -1
- package/core.js +17 -10
- package/core.js.map +1 -1
- package/core.mjs +17 -10
- package/core.mjs.map +1 -1
- package/index.d.mts +18 -5
- package/index.d.ts +18 -5
- package/index.d.ts.map +1 -1
- package/index.js +21 -7
- package/index.js.map +1 -1
- package/index.mjs +21 -7
- package/index.mjs.map +1 -1
- package/package.json +32 -9
- package/resources/account-collection-flows.d.ts +3 -28
- package/resources/account-collection-flows.d.ts.map +1 -1
- package/resources/account-collection-flows.js +22 -17
- package/resources/account-collection-flows.js.map +1 -1
- package/resources/account-collection-flows.mjs +22 -17
- package/resources/account-collection-flows.mjs.map +1 -1
- package/resources/account-details.d.ts +3 -8
- package/resources/account-details.d.ts.map +1 -1
- package/resources/account-details.js +10 -4
- package/resources/account-details.js.map +1 -1
- package/resources/account-details.mjs +10 -4
- package/resources/account-details.mjs.map +1 -1
- package/resources/connections.js +3 -3
- package/resources/connections.mjs +3 -3
- package/resources/counterparties.d.ts +26 -40
- package/resources/counterparties.d.ts.map +1 -1
- package/resources/counterparties.js +17 -5
- package/resources/counterparties.js.map +1 -1
- package/resources/counterparties.mjs +17 -5
- package/resources/counterparties.mjs.map +1 -1
- package/resources/documents.d.ts +2 -13
- package/resources/documents.d.ts.map +1 -1
- package/resources/documents.js +11 -5
- package/resources/documents.js.map +1 -1
- package/resources/documents.mjs +11 -5
- package/resources/documents.mjs.map +1 -1
- package/resources/events.js +3 -3
- package/resources/events.mjs +3 -3
- package/resources/expected-payments.d.ts +23 -32
- package/resources/expected-payments.d.ts.map +1 -1
- package/resources/expected-payments.js +10 -4
- package/resources/expected-payments.js.map +1 -1
- package/resources/expected-payments.mjs +10 -4
- package/resources/expected-payments.mjs.map +1 -1
- package/resources/external-accounts.d.ts +17 -51
- package/resources/external-accounts.d.ts.map +1 -1
- package/resources/external-accounts.js +24 -6
- package/resources/external-accounts.js.map +1 -1
- package/resources/external-accounts.mjs +24 -6
- package/resources/external-accounts.mjs.map +1 -1
- package/resources/incoming-payment-details.d.ts +10 -15
- package/resources/incoming-payment-details.d.ts.map +1 -1
- package/resources/incoming-payment-details.js +10 -4
- package/resources/incoming-payment-details.js.map +1 -1
- package/resources/incoming-payment-details.mjs +10 -4
- package/resources/incoming-payment-details.mjs.map +1 -1
- package/resources/index.d.ts +0 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/internal-accounts/balance-reports.js +3 -3
- package/resources/internal-accounts/balance-reports.mjs +3 -3
- package/resources/internal-accounts/internal-accounts.d.ts +10 -15
- package/resources/internal-accounts/internal-accounts.d.ts.map +1 -1
- package/resources/internal-accounts/internal-accounts.js +10 -4
- package/resources/internal-accounts/internal-accounts.js.map +1 -1
- package/resources/internal-accounts/internal-accounts.mjs +10 -4
- package/resources/internal-accounts/internal-accounts.mjs.map +1 -1
- package/resources/invoices/invoices.d.ts +24 -32
- package/resources/invoices/invoices.d.ts.map +1 -1
- package/resources/invoices/invoices.js +10 -4
- package/resources/invoices/invoices.js.map +1 -1
- package/resources/invoices/invoices.mjs +10 -4
- package/resources/invoices/invoices.mjs.map +1 -1
- package/resources/invoices/line-items.d.ts +9 -14
- package/resources/invoices/line-items.d.ts.map +1 -1
- package/resources/invoices/line-items.js +10 -4
- package/resources/invoices/line-items.js.map +1 -1
- package/resources/invoices/line-items.mjs +10 -4
- package/resources/invoices/line-items.mjs.map +1 -1
- package/resources/ledger-account-categories.d.ts +8 -13
- package/resources/ledger-account-categories.d.ts.map +1 -1
- package/resources/ledger-account-categories.js +10 -4
- package/resources/ledger-account-categories.js.map +1 -1
- package/resources/ledger-account-categories.mjs +10 -4
- package/resources/ledger-account-categories.mjs.map +1 -1
- package/resources/ledger-account-payouts.d.ts +14 -19
- package/resources/ledger-account-payouts.d.ts.map +1 -1
- package/resources/ledger-account-payouts.js +10 -4
- package/resources/ledger-account-payouts.js.map +1 -1
- package/resources/ledger-account-payouts.mjs +10 -4
- package/resources/ledger-account-payouts.mjs.map +1 -1
- package/resources/ledger-account-statements.d.ts +9 -14
- package/resources/ledger-account-statements.d.ts.map +1 -1
- package/resources/ledger-account-statements.js +8 -2
- package/resources/ledger-account-statements.js.map +1 -1
- package/resources/ledger-account-statements.mjs +8 -2
- package/resources/ledger-account-statements.mjs.map +1 -1
- package/resources/ledger-accounts.d.ts +13 -18
- package/resources/ledger-accounts.d.ts.map +1 -1
- package/resources/ledger-accounts.js +10 -4
- package/resources/ledger-accounts.js.map +1 -1
- package/resources/ledger-accounts.mjs +10 -4
- package/resources/ledger-accounts.mjs.map +1 -1
- package/resources/ledger-entries.js +3 -3
- package/resources/ledger-entries.mjs +3 -3
- package/resources/ledger-event-handlers.d.ts +5 -16
- package/resources/ledger-event-handlers.d.ts.map +1 -1
- package/resources/ledger-event-handlers.js +10 -4
- package/resources/ledger-event-handlers.js.map +1 -1
- package/resources/ledger-event-handlers.mjs +10 -4
- package/resources/ledger-event-handlers.mjs.map +1 -1
- package/resources/ledger-transactions/ledger-transactions.d.ts +16 -22
- package/resources/ledger-transactions/ledger-transactions.d.ts.map +1 -1
- package/resources/ledger-transactions/ledger-transactions.js +10 -4
- package/resources/ledger-transactions/ledger-transactions.js.map +1 -1
- package/resources/ledger-transactions/ledger-transactions.mjs +10 -4
- package/resources/ledger-transactions/ledger-transactions.mjs.map +1 -1
- package/resources/ledger-transactions/versions.js +3 -3
- package/resources/ledger-transactions/versions.mjs +3 -3
- package/resources/ledgerable-events.d.ts +11 -16
- package/resources/ledgerable-events.d.ts.map +1 -1
- package/resources/ledgerable-events.js +8 -2
- package/resources/ledgerable-events.js.map +1 -1
- package/resources/ledgerable-events.mjs +8 -2
- package/resources/ledgerable-events.mjs.map +1 -1
- package/resources/ledgers.d.ts +4 -9
- package/resources/ledgers.d.ts.map +1 -1
- package/resources/ledgers.js +10 -4
- package/resources/ledgers.js.map +1 -1
- package/resources/ledgers.mjs +10 -4
- package/resources/ledgers.mjs.map +1 -1
- package/resources/line-items.js +3 -3
- package/resources/line-items.mjs +3 -3
- package/resources/paper-items.js +3 -3
- package/resources/paper-items.mjs +3 -3
- package/resources/payment-flows.d.ts +10 -34
- package/resources/payment-flows.d.ts.map +1 -1
- package/resources/payment-flows.js +22 -17
- package/resources/payment-flows.js.map +1 -1
- package/resources/payment-flows.mjs +22 -17
- package/resources/payment-flows.mjs.map +1 -1
- package/resources/payment-orders/payment-orders.d.ts +142 -167
- package/resources/payment-orders/payment-orders.d.ts.map +1 -1
- package/resources/payment-orders/payment-orders.js +18 -6
- package/resources/payment-orders/payment-orders.js.map +1 -1
- package/resources/payment-orders/payment-orders.mjs +18 -6
- package/resources/payment-orders/payment-orders.mjs.map +1 -1
- package/resources/payment-orders/reversals.d.ts +7 -13
- package/resources/payment-orders/reversals.d.ts.map +1 -1
- package/resources/payment-orders/reversals.js +10 -4
- package/resources/payment-orders/reversals.js.map +1 -1
- package/resources/payment-orders/reversals.mjs +10 -4
- package/resources/payment-orders/reversals.mjs.map +1 -1
- package/resources/payment-references.js +3 -3
- package/resources/payment-references.mjs +3 -3
- package/resources/returns.d.ts +9 -15
- package/resources/returns.d.ts.map +1 -1
- package/resources/returns.js +10 -4
- package/resources/returns.js.map +1 -1
- package/resources/returns.mjs +10 -4
- package/resources/returns.mjs.map +1 -1
- package/resources/routing-details.d.ts +4 -10
- package/resources/routing-details.d.ts.map +1 -1
- package/resources/routing-details.js +10 -4
- package/resources/routing-details.js.map +1 -1
- package/resources/routing-details.mjs +10 -4
- package/resources/routing-details.mjs.map +1 -1
- package/resources/transactions/line-items.js +3 -3
- package/resources/transactions/line-items.mjs +3 -3
- package/resources/transactions/transactions.js +3 -3
- package/resources/transactions/transactions.mjs +3 -3
- package/resources/validations.js +1 -1
- package/resources/validations.mjs +1 -1
- package/resources/virtual-accounts.d.ts +12 -18
- package/resources/virtual-accounts.d.ts.map +1 -1
- package/resources/virtual-accounts.js +10 -4
- package/resources/virtual-accounts.js.map +1 -1
- package/resources/virtual-accounts.mjs +10 -4
- package/resources/virtual-accounts.mjs.map +1 -1
- package/resources/webhooks.js +2 -2
- package/resources/webhooks.mjs +2 -2
- package/src/_shims/ReadableStream.d.ts +5 -5
- package/src/_shims/agent.ts +1 -1
- package/{_shims/fetch.node.d.ts → src/_shims/fetch-node.d.ts} +9 -8
- package/src/_shims/fetch.d.ts +11 -10
- package/src/_shims/{fileFromPath.node.ts → fileFromPath-node.ts} +1 -1
- package/src/_shims/fileFromPath.ts +2 -2
- package/src/_shims/{formdata.node.d.ts → form-data-node.d.ts} +4 -4
- package/src/_shims/{formdata.d.ts → form-data.d.ts} +4 -4
- package/src/_shims/form-data.js +17 -0
- package/src/_shims/form-data.mjs +20 -0
- package/src/_shims/{getMultipartRequestOptions.node.ts → getMultipartRequestOptions-node.ts} +3 -3
- package/src/_shims/getMultipartRequestOptions.ts +3 -3
- package/src/core.ts +35 -22
- package/src/error.ts +1 -1
- package/src/index.ts +27 -13
- package/src/pagination.ts +1 -1
- package/src/resource.ts +1 -1
- package/src/resources/account-collection-flows.ts +24 -52
- package/src/resources/account-details.ts +16 -16
- package/src/resources/connections.ts +5 -5
- package/src/resources/counterparties.ts +48 -52
- package/src/resources/documents.ts +15 -21
- package/src/resources/events.ts +5 -5
- package/src/resources/expected-payments.ts +36 -40
- package/src/resources/external-accounts.ts +46 -65
- package/src/resources/incoming-payment-details.ts +24 -24
- package/src/resources/index.ts +39 -35
- package/src/resources/internal-accounts/balance-reports.ts +6 -6
- package/src/resources/internal-accounts/index.ts +2 -2
- package/src/resources/internal-accounts/internal-accounts.ts +27 -27
- package/src/resources/invoices/index.ts +2 -2
- package/src/resources/invoices/invoices.ts +39 -42
- package/src/resources/invoices/line-items.ts +21 -21
- package/src/resources/ledger-account-categories.ts +20 -20
- package/src/resources/ledger-account-payouts.ts +26 -26
- package/src/resources/ledger-account-statements.ts +19 -19
- package/src/resources/ledger-accounts.ts +25 -25
- package/src/resources/ledger-entries.ts +5 -5
- package/src/resources/ledger-event-handlers.ts +17 -23
- package/src/resources/ledger-transactions/index.ts +2 -2
- package/src/resources/ledger-transactions/ledger-transactions.ts +30 -31
- package/src/resources/ledger-transactions/versions.ts +5 -5
- package/src/resources/ledgerable-events.ts +21 -21
- package/src/resources/ledgers.ts +16 -16
- package/src/resources/line-items.ts +5 -5
- package/src/resources/paper-items.ts +6 -6
- package/src/resources/payment-flows.ts +31 -58
- package/src/resources/payment-orders/index.ts +2 -2
- package/src/resources/payment-orders/payment-orders.ts +166 -181
- package/src/resources/payment-orders/reversals.ts +19 -20
- package/src/resources/payment-references.ts +5 -5
- package/src/resources/returns.ts +22 -23
- package/src/resources/routing-details.ts +17 -18
- package/src/resources/top-level.ts +1 -1
- package/src/resources/transactions/index.ts +7 -2
- package/src/resources/transactions/line-items.ts +5 -5
- package/src/resources/transactions/transactions.ts +7 -7
- package/src/resources/validations.ts +3 -3
- package/src/resources/virtual-accounts.ts +26 -27
- package/src/resources/webhooks.ts +3 -3
- package/src/tsconfig.json +11 -0
- package/src/uploads.ts +6 -6
- package/src/version.ts +1 -1
- package/uploads.d.ts +1 -1
- package/uploads.d.ts.map +1 -1
- package/uploads.js +7 -7
- package/uploads.js.map +1 -1
- package/uploads.mjs +4 -4
- package/uploads.mjs.map +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/_shims/ReadableStream.node.d.ts.map +0 -1
- package/_shims/ReadableStream.node.js.map +0 -1
- package/_shims/ReadableStream.node.mjs.map +0 -1
- package/_shims/agent.node.d.ts.map +0 -1
- package/_shims/formdata.js +0 -9
- package/_shims/formdata.mjs +0 -11
- package/_shims/getMultipartRequestOptions.node.d.ts.map +0 -1
- package/_shims/node-readable.node.js.map +0 -1
- package/_shims/node-readable.node.mjs.map +0 -1
- package/src/_shims/fetch.deno.ts +0 -23
- package/src/_shims/formdata.deno.ts +0 -16
- package/src/_shims/formdata.js +0 -9
- package/src/_shims/formdata.mjs +0 -11
- /package/_shims/{fetch.node.js → fetch-node.js} +0 -0
- /package/_shims/{fetch.node.mjs → fetch-node.mjs} +0 -0
- /package/_shims/{formdata.node.d.ts → form-data-node.d.ts} +0 -0
- /package/_shims/{formdata.node.js → form-data-node.js} +0 -0
- /package/_shims/{formdata.node.mjs → form-data-node.mjs} +0 -0
- /package/_shims/{formdata.d.ts → form-data.d.ts} +0 -0
- /package/src/_shims/{ReadableStream.node.ts → ReadableStream-node.ts} +0 -0
- /package/src/_shims/{agent.node.ts → agent-node.ts} +0 -0
- /package/src/_shims/{fetch.node.js → fetch-node.js} +0 -0
- /package/src/_shims/{fetch.node.mjs → fetch-node.mjs} +0 -0
- /package/src/_shims/{formdata.node.js → form-data-node.js} +0 -0
- /package/src/_shims/{formdata.node.mjs → form-data-node.mjs} +0 -0
- /package/src/_shims/{node-readable.node.ts → node-readable-node.ts} +0 -0
package/resources/ledgers.mjs
CHANGED
|
@@ -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 Ledgers extends APIResource {
|
|
6
6
|
/**
|
|
7
7
|
* Create a ledger.
|
|
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/ledgers', {
|
|
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":"ledgers.mjs","sourceRoot":"","sources":["../src/resources/ledgers.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,OAAQ,SAAQ,WAAW;IACtC;;OAEG;IACH,MAAM,CAAC,MAA0B,EAAE,OAA6B;QAC9D,MAAM,EAAE,iBAAiB,EAAE,cAAc,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAC9D,OAAO,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE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I,CACF,QAAgD,EAAE,EAClD,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,cAAc,EAAE,WAAW,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7E,CAAC;IAED;;OAEG;IACH,GAAG,CAAC,EAAU,EAAE,OAA6B;QAC3C,OAAO,IAAI,CAAC,MAAM,CAAC,gBAAgB,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IACpD,CAAC;CACF;AAED,MAAM,OAAO,WAAY,SAAQ,IAAY;CAAG;AAiGhD,WAAiB,OAAO;AAMxB,CAAC,EANgB,OAAO,KAAP,OAAO,QAMvB"}
|
package/resources/line-items.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.LineItemsPage = exports.LineItems = 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 LineItems extends resource_1.APIResource {
|
|
9
9
|
/**
|
|
10
10
|
* Get a single line item
|
package/resources/line-items.mjs
CHANGED
|
@@ -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 LineItems extends APIResource {
|
|
6
6
|
/**
|
|
7
7
|
* Get a single line item
|
package/resources/paper-items.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.PaperItemsPage = exports.PaperItems = 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 PaperItems extends resource_1.APIResource {
|
|
9
9
|
/**
|
|
10
10
|
* Get details on a single paper item.
|
|
@@ -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 PaperItems extends APIResource {
|
|
6
6
|
/**
|
|
7
7
|
* Get details on a single paper item.
|
|
@@ -10,11 +10,6 @@ export declare class PaymentFlows extends APIResource {
|
|
|
10
10
|
/**
|
|
11
11
|
* get payment_flow
|
|
12
12
|
*/
|
|
13
|
-
retrieve(
|
|
14
|
-
id: string,
|
|
15
|
-
query?: PaymentFlowRetrieveParams,
|
|
16
|
-
options?: Core.RequestOptions,
|
|
17
|
-
): Core.APIPromise<PaymentFlow>;
|
|
18
13
|
retrieve(id: string, options?: Core.RequestOptions): Core.APIPromise<PaymentFlow>;
|
|
19
14
|
/**
|
|
20
15
|
* update payment_flow
|
|
@@ -89,53 +84,35 @@ export interface PaymentFlow {
|
|
|
89
84
|
}
|
|
90
85
|
export interface PaymentFlowCreateParams {
|
|
91
86
|
/**
|
|
92
|
-
*
|
|
93
|
-
*
|
|
87
|
+
* Required. Value in specified currency's smallest unit. e.g. $10 would be
|
|
88
|
+
* represented as 1000. Can be any integer up to 36 digits.
|
|
94
89
|
*/
|
|
95
90
|
amount: number;
|
|
96
91
|
/**
|
|
97
|
-
*
|
|
98
|
-
*
|
|
99
|
-
* model.
|
|
92
|
+
* Required. The ID of a counterparty associated with the payment. As part of the
|
|
93
|
+
* payment workflow an external account will be associated with this model.
|
|
100
94
|
*/
|
|
101
95
|
counterparty_id: string;
|
|
102
96
|
/**
|
|
103
|
-
*
|
|
97
|
+
* Required. The currency of the payment.
|
|
104
98
|
*/
|
|
105
99
|
currency: string;
|
|
106
100
|
/**
|
|
107
|
-
*
|
|
108
|
-
*
|
|
109
|
-
* account to your own.
|
|
101
|
+
* Required. Describes the direction money is flowing in the transaction. Can only
|
|
102
|
+
* be `debit`. A `debit` pulls money from someone else's account to your own.
|
|
110
103
|
*/
|
|
111
104
|
direction: 'credit' | 'debit';
|
|
112
105
|
/**
|
|
113
|
-
*
|
|
106
|
+
* Required. The ID of one of your organization's internal accounts.
|
|
114
107
|
*/
|
|
115
108
|
originating_account_id: string;
|
|
116
|
-
/**
|
|
117
|
-
* Header param: This key should be something unique, preferably something like an
|
|
118
|
-
* UUID.
|
|
119
|
-
*/
|
|
120
|
-
'Idempotency-Key'?: string;
|
|
121
|
-
}
|
|
122
|
-
export interface PaymentFlowRetrieveParams {
|
|
123
|
-
/**
|
|
124
|
-
* This key should be something unique, preferably something like an UUID.
|
|
125
|
-
*/
|
|
126
|
-
'Idempotency-Key'?: string;
|
|
127
109
|
}
|
|
128
110
|
export interface PaymentFlowUpdateParams {
|
|
129
111
|
/**
|
|
130
|
-
*
|
|
131
|
-
*
|
|
112
|
+
* Required. The updated status of the payment flow. Can only be used to mark a
|
|
113
|
+
* flow as `cancelled`.
|
|
132
114
|
*/
|
|
133
115
|
status: 'cancelled';
|
|
134
|
-
/**
|
|
135
|
-
* Header param: This key should be something unique, preferably something like an
|
|
136
|
-
* UUID.
|
|
137
|
-
*/
|
|
138
|
-
'Idempotency-Key'?: string;
|
|
139
116
|
}
|
|
140
117
|
export interface PaymentFlowListParams extends PageParams {
|
|
141
118
|
client_token?: string;
|
|
@@ -149,7 +126,6 @@ export declare namespace PaymentFlows {
|
|
|
149
126
|
export import PaymentFlow = API.PaymentFlow;
|
|
150
127
|
type PaymentFlowsPage = _PaymentFlowsPage;
|
|
151
128
|
export import PaymentFlowCreateParams = API.PaymentFlowCreateParams;
|
|
152
|
-
export import PaymentFlowRetrieveParams = API.PaymentFlowRetrieveParams;
|
|
153
129
|
export import PaymentFlowUpdateParams = API.PaymentFlowUpdateParams;
|
|
154
130
|
export import PaymentFlowListParams = API.PaymentFlowListParams;
|
|
155
131
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payment-flows.d.ts","sourceRoot":"","sources":["../src/resources/payment-flows.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,YAAa,SAAQ,WAAW;IAC3C;;OAEG;IACH,MAAM,CAAC,MAAM,EAAE,uBAAuB,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"payment-flows.d.ts","sourceRoot":"","sources":["../src/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CACjB;AAED,yBAAiB,YAAY,CAAC;IAC5B,MAAM,QAAQ,WAAW,GAAG,GAAG,CAAC,WAAW,CAAC;IAC5C,KAAY,gBAAgB,GAAG,iBAAiB,CAAC;IACjD,MAAM,QAAQ,uBAAuB,GAAG,GAAG,CAAC,uBAAuB,CAAC;IACpE,MAAM,QAAQ,uBAAuB,GAAG,GAAG,CAAC,uBAAuB,CAAC;IACpE,MAAM,QAAQ,qBAAqB,GAAG,GAAG,CAAC,qBAAqB,CAAC;CACjE"}
|
|
@@ -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.PaymentFlowsPage = exports.PaymentFlows = 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 PaymentFlows extends resource_1.APIResource {
|
|
9
9
|
/**
|
|
10
10
|
* create payment_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/payment_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/payment_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 payment_flow
|
|
31
|
+
*/
|
|
32
|
+
retrieve(id, options) {
|
|
33
|
+
return this.get(`/api/payment_flows/${id}`, options);
|
|
35
34
|
}
|
|
36
35
|
/**
|
|
37
36
|
* update payment_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/payment_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":"payment-flows.js","sourceRoot":"","sources":["../src/resources/payment-flows.ts"],"names":[],"mappings":";AAAA,qDAAqD;;;AAGrD,uDAAuD;AACvD,+CAAwD;AAExD,2DAA8D;AAE9D,MAAa,YAAa,SAAQ,sBAAW;IAC3C;;OAEG;IACH,MAAM,CAAC,MAA+B,EAAE,OAA6B;QACnE,MAAM,EAAE,iBAAiB,EAA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;YAC5C,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,QAAqD,EAAE,EACvD,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,oBAAoB,EAAE,gBAAgB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACxF,CAAC;CACF;AAjED,oCAiEC;AAED,MAAa,gBAAiB,SAAQ,iBAAiB;CAAG;AAA1D,4CAA0D;AA0H1D,WAAiB,YAAY;AAM7B,CAAC,EANgB,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAM5B"}
|
|
@@ -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 PaymentFlows extends APIResource {
|
|
6
6
|
/**
|
|
7
7
|
* create payment_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/payment_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/payment_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 payment_flow
|
|
28
|
+
*/
|
|
29
|
+
retrieve(id, options) {
|
|
30
|
+
return this.get(`/api/payment_flows/${id}`, options);
|
|
32
31
|
}
|
|
33
32
|
/**
|
|
34
33
|
* update payment_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/payment_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":"payment-flows.mjs","sourceRoot":"","sources":["../src/resources/payment-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,YAAa,SAAQ,WAAW;IAC3C;;OAEG;IACH,MAAM,CAAC,MAA+B,EAAE,OAA6B;QACnE,MAAM,EAAE,iBAAiB,EAAE,cAAc,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAC9D,OAAO,IAAI,CAAC,IAAI,CAAC,oBAAoB,EAAE;YACrC,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,iBAAiB,EAAE,cAAc,
|
|
1
|
+
{"version":3,"file":"payment-flows.mjs","sourceRoot":"","sources":["../src/resources/payment-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,YAAa,SAAQ,WAAW;IAC3C;;OAEG;IACH,MAAM,CAAC,MAA+B,EAAE,OAA6B;QACnE,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,oBAAoB,EAAE;YACrC,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;Q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