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,10 +1,10 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless.
|
|
2
2
|
|
|
3
|
-
import * as Core from '../../core';
|
|
4
|
-
import { APIResource } from '../../resource';
|
|
5
|
-
import { isRequestOptions } from '../../core';
|
|
6
|
-
import * as API from './index';
|
|
7
|
-
import { Page, PageParams } from '../../pagination';
|
|
3
|
+
import * as Core from '../../core.js';
|
|
4
|
+
import { APIResource } from '../../resource.js';
|
|
5
|
+
import { isRequestOptions } from '../../core.js';
|
|
6
|
+
import * as API from './index.js';
|
|
7
|
+
import { Page, PageParams } from '../../pagination.js';
|
|
8
8
|
|
|
9
9
|
export class Reversals extends APIResource {
|
|
10
10
|
/**
|
|
@@ -14,12 +14,18 @@ export class Reversals extends APIResource {
|
|
|
14
14
|
paymentOrderId: string,
|
|
15
15
|
params: ReversalCreateParams,
|
|
16
16
|
options?: Core.RequestOptions,
|
|
17
|
-
):
|
|
17
|
+
): Core.APIPromise<Reversal> {
|
|
18
|
+
// @ts-expect-error idempotency key header isn't defined anymore but is included here for back-compat
|
|
18
19
|
const { 'Idempotency-Key': idempotencyKey, ...body } = params;
|
|
20
|
+
if (idempotencyKey) {
|
|
21
|
+
console.warn(
|
|
22
|
+
"The Idempotency-Key request param is deprecated, the 'idempotencyToken' option should be set instead",
|
|
23
|
+
);
|
|
24
|
+
}
|
|
19
25
|
return this.post(`/api/payment_orders/${paymentOrderId}/reversals`, {
|
|
20
26
|
body,
|
|
21
27
|
...options,
|
|
22
|
-
headers: { 'Idempotency-Key': idempotencyKey
|
|
28
|
+
headers: { 'Idempotency-Key': idempotencyKey, ...options?.headers },
|
|
23
29
|
});
|
|
24
30
|
}
|
|
25
31
|
|
|
@@ -30,7 +36,7 @@ export class Reversals extends APIResource {
|
|
|
30
36
|
paymentOrderId: string,
|
|
31
37
|
reversalId: string,
|
|
32
38
|
options?: Core.RequestOptions,
|
|
33
|
-
):
|
|
39
|
+
): Core.APIPromise<Reversal> {
|
|
34
40
|
return this.get(`/api/payment_orders/${paymentOrderId}/reversals/${reversalId}`, options);
|
|
35
41
|
}
|
|
36
42
|
|
|
@@ -41,13 +47,13 @@ export class Reversals extends APIResource {
|
|
|
41
47
|
paymentOrderId: string,
|
|
42
48
|
query?: ReversalListParams,
|
|
43
49
|
options?: Core.RequestOptions,
|
|
44
|
-
): Core.PagePromise<ReversalsPage>;
|
|
45
|
-
list(paymentOrderId: string, options?: Core.RequestOptions): Core.PagePromise<ReversalsPage>;
|
|
50
|
+
): Core.PagePromise<ReversalsPage, Reversal>;
|
|
51
|
+
list(paymentOrderId: string, options?: Core.RequestOptions): Core.PagePromise<ReversalsPage, Reversal>;
|
|
46
52
|
list(
|
|
47
53
|
paymentOrderId: string,
|
|
48
54
|
query: ReversalListParams | Core.RequestOptions = {},
|
|
49
55
|
options?: Core.RequestOptions,
|
|
50
|
-
): Core.PagePromise<ReversalsPage> {
|
|
56
|
+
): Core.PagePromise<ReversalsPage, Reversal> {
|
|
51
57
|
if (isRequestOptions(query)) {
|
|
52
58
|
return this.list(paymentOrderId, {}, query);
|
|
53
59
|
}
|
|
@@ -106,8 +112,8 @@ export interface Reversal {
|
|
|
106
112
|
|
|
107
113
|
export interface ReversalCreateParams {
|
|
108
114
|
/**
|
|
109
|
-
*
|
|
110
|
-
* `
|
|
115
|
+
* The reason for the reversal. Must be one of `duplicate`, `incorrect_amount`,
|
|
116
|
+
* `incorrect_receiving_account`, `date_earlier_than_intended`,
|
|
111
117
|
* `date_later_than_intended`.
|
|
112
118
|
*/
|
|
113
119
|
reason:
|
|
@@ -118,24 +124,17 @@ export interface ReversalCreateParams {
|
|
|
118
124
|
| 'date_later_than_intended';
|
|
119
125
|
|
|
120
126
|
/**
|
|
121
|
-
*
|
|
122
|
-
*
|
|
123
|
-
*
|
|
124
|
-
* the reversal.
|
|
127
|
+
* Specifies a ledger transaction object that will be created with the reversal. If
|
|
128
|
+
* the ledger transaction cannot be created, then the reversal creation will fail.
|
|
129
|
+
* The resulting ledger transaction will mirror the status of the reversal.
|
|
125
130
|
*/
|
|
126
131
|
ledger_transaction?: ReversalCreateParams.LedgerTransaction;
|
|
127
132
|
|
|
128
133
|
/**
|
|
129
|
-
*
|
|
130
|
-
*
|
|
134
|
+
* Additional data represented as key-value pairs. Both the key and value must be
|
|
135
|
+
* strings.
|
|
131
136
|
*/
|
|
132
137
|
metadata?: Record<string, string>;
|
|
133
|
-
|
|
134
|
-
/**
|
|
135
|
-
* Header param: This key should be something unique, preferably something like an
|
|
136
|
-
* UUID.
|
|
137
|
-
*/
|
|
138
|
-
'Idempotency-Key'?: string;
|
|
139
138
|
}
|
|
140
139
|
|
|
141
140
|
export namespace ReversalCreateParams {
|
|
@@ -145,12 +144,6 @@ export namespace ReversalCreateParams {
|
|
|
145
144
|
* The resulting ledger transaction will mirror the status of the reversal.
|
|
146
145
|
*/
|
|
147
146
|
export interface LedgerTransaction {
|
|
148
|
-
/**
|
|
149
|
-
* The timestamp (ISO8601 format) at which the ledger transaction happened for
|
|
150
|
-
* reporting purposes.
|
|
151
|
-
*/
|
|
152
|
-
effective_at: string;
|
|
153
|
-
|
|
154
147
|
/**
|
|
155
148
|
* An array of ledger entry objects.
|
|
156
149
|
*/
|
|
@@ -161,6 +154,12 @@ export namespace ReversalCreateParams {
|
|
|
161
154
|
*/
|
|
162
155
|
description?: string | null;
|
|
163
156
|
|
|
157
|
+
/**
|
|
158
|
+
* The timestamp (ISO8601 format) at which the ledger transaction happened for
|
|
159
|
+
* reporting purposes.
|
|
160
|
+
*/
|
|
161
|
+
effective_at?: string;
|
|
162
|
+
|
|
164
163
|
/**
|
|
165
164
|
* The date (YYYY-MM-DD) on which the ledger transaction happened for reporting
|
|
166
165
|
* purposes.
|
|
@@ -244,6 +243,12 @@ export namespace ReversalCreateParams {
|
|
|
244
243
|
*/
|
|
245
244
|
lock_version?: number | null;
|
|
246
245
|
|
|
246
|
+
/**
|
|
247
|
+
* Additional data represented as key-value pairs. Both the key and value must be
|
|
248
|
+
* strings.
|
|
249
|
+
*/
|
|
250
|
+
metadata?: Record<string, string>;
|
|
251
|
+
|
|
247
252
|
/**
|
|
248
253
|
* Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to lock on the
|
|
249
254
|
* account’s pending balance. If any of these conditions would be false after the
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless.
|
|
2
2
|
|
|
3
|
-
import * as Core from '../core';
|
|
4
|
-
import { APIResource } from '../resource';
|
|
5
|
-
import { isRequestOptions } from '../core';
|
|
6
|
-
import * as API from './index';
|
|
7
|
-
import { Page, PageParams } from '../pagination';
|
|
3
|
+
import * as Core from '../core.js';
|
|
4
|
+
import { APIResource } from '../resource.js';
|
|
5
|
+
import { isRequestOptions } from '../core.js';
|
|
6
|
+
import * as API from './index.js';
|
|
7
|
+
import { Page, PageParams } from '../pagination.js';
|
|
8
8
|
|
|
9
9
|
export class PaymentReferences extends APIResource {
|
|
10
10
|
/**
|
|
@@ -13,12 +13,12 @@ export class PaymentReferences extends APIResource {
|
|
|
13
13
|
list(
|
|
14
14
|
query?: PaymentReferenceListParams,
|
|
15
15
|
options?: Core.RequestOptions,
|
|
16
|
-
): Core.PagePromise<PaymentReferencesPage>;
|
|
17
|
-
list(options?: Core.RequestOptions): Core.PagePromise<PaymentReferencesPage>;
|
|
16
|
+
): Core.PagePromise<PaymentReferencesPage, PaymentReference>;
|
|
17
|
+
list(options?: Core.RequestOptions): Core.PagePromise<PaymentReferencesPage, PaymentReference>;
|
|
18
18
|
list(
|
|
19
19
|
query: PaymentReferenceListParams | Core.RequestOptions = {},
|
|
20
20
|
options?: Core.RequestOptions,
|
|
21
|
-
): Core.PagePromise<PaymentReferencesPage> {
|
|
21
|
+
): Core.PagePromise<PaymentReferencesPage, PaymentReference> {
|
|
22
22
|
if (isRequestOptions(query)) {
|
|
23
23
|
return this.list({}, query);
|
|
24
24
|
}
|
|
@@ -28,7 +28,7 @@ export class PaymentReferences extends APIResource {
|
|
|
28
28
|
/**
|
|
29
29
|
* get payment_reference
|
|
30
30
|
*/
|
|
31
|
-
retireve(id: string, options?: Core.RequestOptions):
|
|
31
|
+
retireve(id: string, options?: Core.RequestOptions): Core.APIPromise<PaymentReference> {
|
|
32
32
|
return this.get(`/api/payment_references/${id}`, options);
|
|
33
33
|
}
|
|
34
34
|
}
|
package/src/resources/returns.ts
CHANGED
|
@@ -1,41 +1,50 @@
|
|
|
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 Returns extends APIResource {
|
|
11
11
|
/**
|
|
12
12
|
* Create a return.
|
|
13
13
|
*/
|
|
14
|
-
create(params: ReturnCreateParams, options?: Core.RequestOptions):
|
|
14
|
+
create(params: ReturnCreateParams, options?: Core.RequestOptions): Core.APIPromise<ReturnObject> {
|
|
15
|
+
// @ts-expect-error idempotency key header isn't defined anymore but is included here for back-compat
|
|
15
16
|
const { 'Idempotency-Key': idempotencyKey, ...body } = params;
|
|
17
|
+
if (idempotencyKey) {
|
|
18
|
+
console.warn(
|
|
19
|
+
"The Idempotency-Key request param is deprecated, the 'idempotencyToken' option should be set instead",
|
|
20
|
+
);
|
|
21
|
+
}
|
|
16
22
|
return this.post('/api/returns', {
|
|
17
23
|
body,
|
|
18
24
|
...options,
|
|
19
|
-
headers: { 'Idempotency-Key': idempotencyKey
|
|
25
|
+
headers: { 'Idempotency-Key': idempotencyKey, ...options?.headers },
|
|
20
26
|
});
|
|
21
27
|
}
|
|
22
28
|
|
|
23
29
|
/**
|
|
24
30
|
* Get a single return.
|
|
25
31
|
*/
|
|
26
|
-
retrieve(id: string, options?: Core.RequestOptions):
|
|
32
|
+
retrieve(id: string, options?: Core.RequestOptions): Core.APIPromise<ReturnObject> {
|
|
27
33
|
return this.get(`/api/returns/${id}`, options);
|
|
28
34
|
}
|
|
29
35
|
|
|
30
36
|
/**
|
|
31
37
|
* Get a list of returns.
|
|
32
38
|
*/
|
|
33
|
-
list(
|
|
34
|
-
|
|
39
|
+
list(
|
|
40
|
+
query?: ReturnListParams,
|
|
41
|
+
options?: Core.RequestOptions,
|
|
42
|
+
): Core.PagePromise<ReturnObjectsPage, ReturnObject>;
|
|
43
|
+
list(options?: Core.RequestOptions): Core.PagePromise<ReturnObjectsPage, ReturnObject>;
|
|
35
44
|
list(
|
|
36
45
|
query: ReturnListParams | Core.RequestOptions = {},
|
|
37
46
|
options?: Core.RequestOptions,
|
|
38
|
-
): Core.PagePromise<ReturnObjectsPage> {
|
|
47
|
+
): Core.PagePromise<ReturnObjectsPage, ReturnObject> {
|
|
39
48
|
if (isRequestOptions(query)) {
|
|
40
49
|
return this.list({}, query);
|
|
41
50
|
}
|
|
@@ -301,25 +310,24 @@ export namespace ReturnObject {
|
|
|
301
310
|
|
|
302
311
|
export interface ReturnCreateParams {
|
|
303
312
|
/**
|
|
304
|
-
*
|
|
313
|
+
* The ID of the object being returned or `null`.
|
|
305
314
|
*/
|
|
306
315
|
returnable_id: string | null;
|
|
307
316
|
|
|
308
317
|
/**
|
|
309
|
-
*
|
|
318
|
+
* The type of object being returned. Currently, this may only be
|
|
310
319
|
* incoming_payment_detail.
|
|
311
320
|
*/
|
|
312
321
|
returnable_type: 'incoming_payment_detail';
|
|
313
322
|
|
|
314
323
|
/**
|
|
315
|
-
*
|
|
316
|
-
*
|
|
324
|
+
* Some returns may include additional information from the bank. In these cases,
|
|
325
|
+
* this string will be present.
|
|
317
326
|
*/
|
|
318
327
|
additional_information?: string | null;
|
|
319
328
|
|
|
320
329
|
/**
|
|
321
|
-
*
|
|
322
|
-
* code.
|
|
330
|
+
* The return code. For ACH returns, this is the required ACH return code.
|
|
323
331
|
*/
|
|
324
332
|
code?:
|
|
325
333
|
| '901'
|
|
@@ -368,22 +376,16 @@ export interface ReturnCreateParams {
|
|
|
368
376
|
| null;
|
|
369
377
|
|
|
370
378
|
/**
|
|
371
|
-
*
|
|
372
|
-
*
|
|
379
|
+
* If the return code is `R14` or `R15` this is the date the deceased counterparty
|
|
380
|
+
* passed away.
|
|
373
381
|
*/
|
|
374
382
|
date_of_death?: string | null;
|
|
375
383
|
|
|
376
384
|
/**
|
|
377
|
-
*
|
|
378
|
-
*
|
|
385
|
+
* An optional description of the reason for the return. This is for internal usage
|
|
386
|
+
* and will not be transmitted to the bank.”
|
|
379
387
|
*/
|
|
380
388
|
reason?: string | null;
|
|
381
|
-
|
|
382
|
-
/**
|
|
383
|
-
* Header param: This key should be something unique, preferably something like an
|
|
384
|
-
* UUID.
|
|
385
|
-
*/
|
|
386
|
-
'Idempotency-Key'?: string;
|
|
387
389
|
}
|
|
388
390
|
|
|
389
391
|
export interface ReturnListParams extends PageParams {
|
|
@@ -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 RoutingDetails extends APIResource {
|
|
11
11
|
/**
|
|
@@ -16,12 +16,18 @@ export class RoutingDetails extends APIResource {
|
|
|
16
16
|
accountId: string,
|
|
17
17
|
params: RoutingDetailCreateParams,
|
|
18
18
|
options?: Core.RequestOptions,
|
|
19
|
-
):
|
|
19
|
+
): Core.APIPromise<RoutingDetail> {
|
|
20
|
+
// @ts-expect-error idempotency key header isn't defined anymore but is included here for back-compat
|
|
20
21
|
const { 'Idempotency-Key': idempotencyKey, ...body } = params;
|
|
22
|
+
if (idempotencyKey) {
|
|
23
|
+
console.warn(
|
|
24
|
+
"The Idempotency-Key request param is deprecated, the 'idempotencyToken' option should be set instead",
|
|
25
|
+
);
|
|
26
|
+
}
|
|
21
27
|
return this.post(`/api/${accountsType}/${accountId}/routing_details`, {
|
|
22
28
|
body,
|
|
23
29
|
...options,
|
|
24
|
-
headers: { 'Idempotency-Key': idempotencyKey
|
|
30
|
+
headers: { 'Idempotency-Key': idempotencyKey, ...options?.headers },
|
|
25
31
|
});
|
|
26
32
|
}
|
|
27
33
|
|
|
@@ -33,7 +39,7 @@ export class RoutingDetails extends APIResource {
|
|
|
33
39
|
accountId: string,
|
|
34
40
|
id: string,
|
|
35
41
|
options?: Core.RequestOptions,
|
|
36
|
-
):
|
|
42
|
+
): Core.APIPromise<RoutingDetail> {
|
|
37
43
|
return this.get(`/api/${accountsType}/${accountId}/routing_details/${id}`, options);
|
|
38
44
|
}
|
|
39
45
|
|
|
@@ -45,18 +51,18 @@ export class RoutingDetails extends APIResource {
|
|
|
45
51
|
accountId: string,
|
|
46
52
|
query?: RoutingDetailListParams,
|
|
47
53
|
options?: Core.RequestOptions,
|
|
48
|
-
): Core.PagePromise<RoutingDetailsPage>;
|
|
54
|
+
): Core.PagePromise<RoutingDetailsPage, RoutingDetail>;
|
|
49
55
|
list(
|
|
50
56
|
accountsType: Shared.AccountsType,
|
|
51
57
|
accountId: string,
|
|
52
58
|
options?: Core.RequestOptions,
|
|
53
|
-
): Core.PagePromise<RoutingDetailsPage>;
|
|
59
|
+
): Core.PagePromise<RoutingDetailsPage, RoutingDetail>;
|
|
54
60
|
list(
|
|
55
61
|
accountsType: Shared.AccountsType,
|
|
56
62
|
accountId: string,
|
|
57
63
|
query: RoutingDetailListParams | Core.RequestOptions = {},
|
|
58
64
|
options?: Core.RequestOptions,
|
|
59
|
-
): Core.PagePromise<RoutingDetailsPage> {
|
|
65
|
+
): Core.PagePromise<RoutingDetailsPage, RoutingDetail> {
|
|
60
66
|
if (isRequestOptions(query)) {
|
|
61
67
|
return this.list(accountsType, accountId, {}, query);
|
|
62
68
|
}
|
|
@@ -74,7 +80,7 @@ export class RoutingDetails extends APIResource {
|
|
|
74
80
|
accountId: string,
|
|
75
81
|
id: string,
|
|
76
82
|
options?: Core.RequestOptions,
|
|
77
|
-
):
|
|
83
|
+
): Core.APIPromise<void> {
|
|
78
84
|
return this.delete(`/api/${accountsType}/${accountId}/routing_details/${id}`, {
|
|
79
85
|
...options,
|
|
80
86
|
headers: { Accept: '', ...options?.headers },
|
|
@@ -199,13 +205,12 @@ export namespace RoutingDetail {
|
|
|
199
205
|
|
|
200
206
|
export interface RoutingDetailCreateParams {
|
|
201
207
|
/**
|
|
202
|
-
*
|
|
208
|
+
* The routing number of the bank.
|
|
203
209
|
*/
|
|
204
210
|
routing_number: string;
|
|
205
211
|
|
|
206
212
|
/**
|
|
207
|
-
*
|
|
208
|
-
* `in_ifsc`, `cnaps`.
|
|
213
|
+
* One of `aba`, `swift`, `ca_cpa`, `au_bsb`, `gb_sort_code`, `in_ifsc`, `cnaps`.
|
|
209
214
|
*/
|
|
210
215
|
routing_number_type:
|
|
211
216
|
| 'aba'
|
|
@@ -220,8 +225,8 @@ export interface RoutingDetailCreateParams {
|
|
|
220
225
|
| 'swift';
|
|
221
226
|
|
|
222
227
|
/**
|
|
223
|
-
*
|
|
224
|
-
*
|
|
228
|
+
* If the routing detail is to be used for a specific payment type this field will
|
|
229
|
+
* be populated, otherwise null.
|
|
225
230
|
*/
|
|
226
231
|
payment_type?:
|
|
227
232
|
| 'ach'
|
|
@@ -242,12 +247,6 @@ export interface RoutingDetailCreateParams {
|
|
|
242
247
|
| 'signet'
|
|
243
248
|
| 'wire'
|
|
244
249
|
| null;
|
|
245
|
-
|
|
246
|
-
/**
|
|
247
|
-
* Header param: This key should be something unique, preferably something like an
|
|
248
|
-
* UUID.
|
|
249
|
-
*/
|
|
250
|
-
'Idempotency-Key'?: string;
|
|
251
250
|
}
|
|
252
251
|
|
|
253
252
|
export interface RoutingDetailListParams extends PageParams {}
|
|
@@ -6,5 +6,10 @@ export {
|
|
|
6
6
|
TransactionListParams,
|
|
7
7
|
TransactionsPage,
|
|
8
8
|
Transactions,
|
|
9
|
-
} from './transactions';
|
|
10
|
-
export {
|
|
9
|
+
} from './transactions.js';
|
|
10
|
+
export {
|
|
11
|
+
TransactionLineItem,
|
|
12
|
+
LineItemListParams,
|
|
13
|
+
TransactionLineItemsPage,
|
|
14
|
+
LineItems,
|
|
15
|
+
} from './line-items.js';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless.
|
|
2
2
|
|
|
3
|
-
import * as Core from '../../core';
|
|
4
|
-
import { APIResource } from '../../resource';
|
|
5
|
-
import { isRequestOptions } from '../../core';
|
|
6
|
-
import * as API from './index';
|
|
7
|
-
import { Page, PageParams } from '../../pagination';
|
|
3
|
+
import * as Core from '../../core.js';
|
|
4
|
+
import { APIResource } from '../../resource.js';
|
|
5
|
+
import { isRequestOptions } from '../../core.js';
|
|
6
|
+
import * as API from './index.js';
|
|
7
|
+
import { Page, PageParams } from '../../pagination.js';
|
|
8
8
|
|
|
9
9
|
export class LineItems extends APIResource {
|
|
10
10
|
/**
|
|
@@ -14,13 +14,16 @@ export class LineItems extends APIResource {
|
|
|
14
14
|
transactionId: string,
|
|
15
15
|
query?: LineItemListParams,
|
|
16
16
|
options?: Core.RequestOptions,
|
|
17
|
-
): Core.PagePromise<TransactionLineItemsPage>;
|
|
18
|
-
list(
|
|
17
|
+
): Core.PagePromise<TransactionLineItemsPage, TransactionLineItem>;
|
|
18
|
+
list(
|
|
19
|
+
transactionId: string,
|
|
20
|
+
options?: Core.RequestOptions,
|
|
21
|
+
): Core.PagePromise<TransactionLineItemsPage, TransactionLineItem>;
|
|
19
22
|
list(
|
|
20
23
|
transactionId: string,
|
|
21
24
|
query: LineItemListParams | Core.RequestOptions = {},
|
|
22
25
|
options?: Core.RequestOptions,
|
|
23
|
-
): Core.PagePromise<TransactionLineItemsPage> {
|
|
26
|
+
): Core.PagePromise<TransactionLineItemsPage, TransactionLineItem> {
|
|
24
27
|
if (isRequestOptions(query)) {
|
|
25
28
|
return this.list(transactionId, {}, query);
|
|
26
29
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
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 { LineItems } from './line-items';
|
|
8
|
-
import * as API from './index';
|
|
9
|
-
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 { LineItems } from './line-items.js';
|
|
8
|
+
import * as API from './index.js';
|
|
9
|
+
import { Page, PageParams } from '../../pagination.js';
|
|
10
10
|
|
|
11
11
|
export class Transactions extends APIResource {
|
|
12
12
|
lineItems: LineItems = new LineItems(this.client);
|
|
@@ -14,7 +14,7 @@ export class Transactions extends APIResource {
|
|
|
14
14
|
/**
|
|
15
15
|
* Get details on a single transaction.
|
|
16
16
|
*/
|
|
17
|
-
retrieve(id: string, options?: Core.RequestOptions):
|
|
17
|
+
retrieve(id: string, options?: Core.RequestOptions): Core.APIPromise<Transaction> {
|
|
18
18
|
return this.get(`/api/transactions/${id}`, options);
|
|
19
19
|
}
|
|
20
20
|
|
|
@@ -25,13 +25,13 @@ export class Transactions extends APIResource {
|
|
|
25
25
|
id: string,
|
|
26
26
|
body?: TransactionUpdateParams,
|
|
27
27
|
options?: Core.RequestOptions,
|
|
28
|
-
):
|
|
29
|
-
update(id: string, options?: Core.RequestOptions):
|
|
28
|
+
): Core.APIPromise<Transaction>;
|
|
29
|
+
update(id: string, options?: Core.RequestOptions): Core.APIPromise<Transaction>;
|
|
30
30
|
update(
|
|
31
31
|
id: string,
|
|
32
32
|
body: TransactionUpdateParams | Core.RequestOptions = {},
|
|
33
33
|
options?: Core.RequestOptions,
|
|
34
|
-
):
|
|
34
|
+
): Core.APIPromise<Transaction> {
|
|
35
35
|
if (isRequestOptions(body)) {
|
|
36
36
|
return this.update(id, {}, body);
|
|
37
37
|
}
|
|
@@ -41,12 +41,15 @@ export class Transactions extends APIResource {
|
|
|
41
41
|
/**
|
|
42
42
|
* Get a list of all transactions.
|
|
43
43
|
*/
|
|
44
|
-
list(
|
|
45
|
-
|
|
44
|
+
list(
|
|
45
|
+
query?: TransactionListParams,
|
|
46
|
+
options?: Core.RequestOptions,
|
|
47
|
+
): Core.PagePromise<TransactionsPage, Transaction>;
|
|
48
|
+
list(options?: Core.RequestOptions): Core.PagePromise<TransactionsPage, Transaction>;
|
|
46
49
|
list(
|
|
47
50
|
query: TransactionListParams | Core.RequestOptions = {},
|
|
48
51
|
options?: Core.RequestOptions,
|
|
49
|
-
): Core.PagePromise<TransactionsPage> {
|
|
52
|
+
): Core.PagePromise<TransactionsPage, Transaction> {
|
|
50
53
|
if (isRequestOptions(query)) {
|
|
51
54
|
return this.list({}, query);
|
|
52
55
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
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 * as API from './index';
|
|
3
|
+
import * as Core from '../core.js';
|
|
4
|
+
import { APIResource } from '../resource.js';
|
|
5
|
+
import * as API from './index.js';
|
|
6
6
|
|
|
7
7
|
export class Validations extends APIResource {
|
|
8
8
|
/**
|
|
@@ -12,7 +12,7 @@ export class Validations extends APIResource {
|
|
|
12
12
|
validateRoutingNumber(
|
|
13
13
|
query: ValidationValidateRoutingNumberParams,
|
|
14
14
|
options?: Core.RequestOptions,
|
|
15
|
-
):
|
|
15
|
+
): Core.APIPromise<RoutingNumberLookupRequest> {
|
|
16
16
|
return this.get('/api/validations/routing_numbers', { query, ...options });
|
|
17
17
|
}
|
|
18
18
|
}
|