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
|
@@ -9,7 +9,7 @@ export declare class LedgerAccountCategories extends APIResource {
|
|
|
9
9
|
create(
|
|
10
10
|
params: LedgerAccountCategoryCreateParams,
|
|
11
11
|
options?: Core.RequestOptions,
|
|
12
|
-
):
|
|
12
|
+
): Core.APIPromise<LedgerAccountCategory>;
|
|
13
13
|
/**
|
|
14
14
|
* Get the details on a single ledger account category.
|
|
15
15
|
*/
|
|
@@ -17,58 +17,45 @@ export declare class LedgerAccountCategories extends APIResource {
|
|
|
17
17
|
id: string,
|
|
18
18
|
query?: LedgerAccountCategoryRetrieveParams,
|
|
19
19
|
options?: Core.RequestOptions,
|
|
20
|
-
):
|
|
21
|
-
retrieve(id: string, options?: Core.RequestOptions):
|
|
20
|
+
): Core.APIPromise<LedgerAccountCategory>;
|
|
21
|
+
retrieve(id: string, options?: Core.RequestOptions): Core.APIPromise<LedgerAccountCategory>;
|
|
22
22
|
/**
|
|
23
23
|
* Update the details of a ledger account category.
|
|
24
24
|
*/
|
|
25
25
|
update(
|
|
26
26
|
id: string,
|
|
27
|
-
|
|
27
|
+
body?: LedgerAccountCategoryUpdateParams,
|
|
28
28
|
options?: Core.RequestOptions,
|
|
29
|
-
):
|
|
30
|
-
update(id: string, options?: Core.RequestOptions):
|
|
29
|
+
): Core.APIPromise<LedgerAccountCategory>;
|
|
30
|
+
update(id: string, options?: Core.RequestOptions): Core.APIPromise<LedgerAccountCategory>;
|
|
31
31
|
/**
|
|
32
32
|
* Get a list of ledger account categories.
|
|
33
33
|
*/
|
|
34
34
|
list(
|
|
35
35
|
query?: LedgerAccountCategoryListParams,
|
|
36
36
|
options?: Core.RequestOptions,
|
|
37
|
-
): Core.PagePromise<LedgerAccountCategoriesPage>;
|
|
38
|
-
list(options?: Core.RequestOptions): Core.PagePromise<LedgerAccountCategoriesPage>;
|
|
37
|
+
): Core.PagePromise<LedgerAccountCategoriesPage, LedgerAccountCategory>;
|
|
38
|
+
list(options?: Core.RequestOptions): Core.PagePromise<LedgerAccountCategoriesPage, LedgerAccountCategory>;
|
|
39
39
|
/**
|
|
40
40
|
* Delete a ledger account category.
|
|
41
41
|
*/
|
|
42
|
-
del(
|
|
43
|
-
id: string,
|
|
44
|
-
body?: LedgerAccountCategoryDeleteParams,
|
|
45
|
-
options?: Core.RequestOptions,
|
|
46
|
-
): Promise<Core.APIResponse<LedgerAccountCategory>>;
|
|
47
|
-
del(id: string, options?: Core.RequestOptions): Promise<Core.APIResponse<LedgerAccountCategory>>;
|
|
42
|
+
del(id: string, options?: Core.RequestOptions): Core.APIPromise<LedgerAccountCategory>;
|
|
48
43
|
/**
|
|
49
|
-
* Add a ledger account
|
|
44
|
+
* Add a ledger account to a ledger account category.
|
|
50
45
|
*/
|
|
51
|
-
addLedgerAccount(
|
|
52
|
-
id: string,
|
|
53
|
-
ledgerAccountId: string,
|
|
54
|
-
options?: Core.RequestOptions,
|
|
55
|
-
): Promise<Core.APIResponse<void>>;
|
|
46
|
+
addLedgerAccount(id: string, ledgerAccountId: string, options?: Core.RequestOptions): Core.APIPromise<void>;
|
|
56
47
|
/**
|
|
57
48
|
* Add a ledger account category to a ledger account category.
|
|
58
49
|
*/
|
|
59
|
-
addNestedCategory(
|
|
60
|
-
id: string,
|
|
61
|
-
subCategoryId: string,
|
|
62
|
-
options?: Core.RequestOptions,
|
|
63
|
-
): Promise<Core.APIResponse<void>>;
|
|
50
|
+
addNestedCategory(id: string, subCategoryId: string, options?: Core.RequestOptions): Core.APIPromise<void>;
|
|
64
51
|
/**
|
|
65
|
-
*
|
|
52
|
+
* Remove a ledger account from a ledger account category.
|
|
66
53
|
*/
|
|
67
54
|
removeLedgerAccount(
|
|
68
55
|
id: string,
|
|
69
56
|
ledgerAccountId: string,
|
|
70
57
|
options?: Core.RequestOptions,
|
|
71
|
-
):
|
|
58
|
+
): Core.APIPromise<void>;
|
|
72
59
|
/**
|
|
73
60
|
* Delete a ledger account category from a ledger account category.
|
|
74
61
|
*/
|
|
@@ -76,7 +63,7 @@ export declare class LedgerAccountCategories extends APIResource {
|
|
|
76
63
|
id: string,
|
|
77
64
|
subCategoryId: string,
|
|
78
65
|
options?: Core.RequestOptions,
|
|
79
|
-
):
|
|
66
|
+
): Core.APIPromise<void>;
|
|
80
67
|
}
|
|
81
68
|
export declare class LedgerAccountCategoriesPage extends Page<LedgerAccountCategory> {}
|
|
82
69
|
type _LedgerAccountCategoriesPage = LedgerAccountCategoriesPage;
|
|
@@ -202,55 +189,48 @@ export declare namespace LedgerAccountCategory {
|
|
|
202
189
|
}
|
|
203
190
|
export interface LedgerAccountCategoryCreateParams {
|
|
204
191
|
/**
|
|
205
|
-
*
|
|
192
|
+
* The currency of the ledger account category.
|
|
206
193
|
*/
|
|
207
194
|
currency: string;
|
|
208
195
|
/**
|
|
209
|
-
*
|
|
196
|
+
* The id of the ledger that this account category belongs to.
|
|
210
197
|
*/
|
|
211
198
|
ledger_id: string;
|
|
212
199
|
/**
|
|
213
|
-
*
|
|
200
|
+
* The name of the ledger account category.
|
|
214
201
|
*/
|
|
215
202
|
name: string;
|
|
216
203
|
/**
|
|
217
|
-
*
|
|
204
|
+
* The normal balance of the ledger account category.
|
|
218
205
|
*/
|
|
219
206
|
normal_balance: 'credit' | 'debit';
|
|
220
207
|
/**
|
|
221
|
-
*
|
|
208
|
+
* The currency exponent of the ledger account category.
|
|
222
209
|
*/
|
|
223
210
|
currency_exponent?: number | null;
|
|
224
211
|
/**
|
|
225
|
-
*
|
|
212
|
+
* The description of the ledger account category.
|
|
226
213
|
*/
|
|
227
214
|
description?: string | null;
|
|
228
215
|
/**
|
|
229
|
-
*
|
|
230
|
-
*
|
|
216
|
+
* Additional data represented as key-value pairs. Both the key and value must be
|
|
217
|
+
* strings.
|
|
231
218
|
*/
|
|
232
219
|
metadata?: Record<string, string>;
|
|
233
|
-
/**
|
|
234
|
-
* Header param: This key should be something unique, preferably something like an
|
|
235
|
-
* UUID.
|
|
236
|
-
*/
|
|
237
|
-
'Idempotency-Key'?: string;
|
|
238
220
|
}
|
|
239
221
|
export interface LedgerAccountCategoryRetrieveParams {
|
|
240
222
|
/**
|
|
241
|
-
* For example, if you want the balances as of a particular
|
|
242
|
-
*
|
|
243
|
-
*
|
|
244
|
-
* entries with that exact date.
|
|
223
|
+
* For example, if you want the balances as of a particular time (ISO8601), the
|
|
224
|
+
* encoded query string would be `balances%5Beffective_at%5D=2000-12-31T12:00:00Z`.
|
|
225
|
+
* The balances as of a time are inclusive of entries with that exact time.
|
|
245
226
|
*/
|
|
246
227
|
balances?: LedgerAccountCategoryRetrieveParams.Balances;
|
|
247
228
|
}
|
|
248
229
|
export declare namespace LedgerAccountCategoryRetrieveParams {
|
|
249
230
|
/**
|
|
250
|
-
* For example, if you want the balances as of a particular
|
|
251
|
-
*
|
|
252
|
-
*
|
|
253
|
-
* entries with that exact date.
|
|
231
|
+
* For example, if you want the balances as of a particular time (ISO8601), the
|
|
232
|
+
* encoded query string would be `balances%5Beffective_at%5D=2000-12-31T12:00:00Z`.
|
|
233
|
+
* The balances as of a time are inclusive of entries with that exact time.
|
|
254
234
|
*/
|
|
255
235
|
interface Balances {
|
|
256
236
|
as_of_date?: string;
|
|
@@ -259,39 +239,31 @@ export declare namespace LedgerAccountCategoryRetrieveParams {
|
|
|
259
239
|
}
|
|
260
240
|
export interface LedgerAccountCategoryUpdateParams {
|
|
261
241
|
/**
|
|
262
|
-
*
|
|
263
|
-
* date (YYYY-MM-DD), the encoded query string would be
|
|
264
|
-
* balances%5Bas_of_date%5D=2000-12-31. The balances as of a date are exclusive of
|
|
265
|
-
* entries with that exact date.
|
|
266
|
-
*/
|
|
267
|
-
balances?: LedgerAccountCategoryUpdateParams.Balances;
|
|
268
|
-
/**
|
|
269
|
-
* Body param: The description of the ledger account category.
|
|
242
|
+
* The description of the ledger account category.
|
|
270
243
|
*/
|
|
271
244
|
description?: string | null;
|
|
272
245
|
/**
|
|
273
|
-
*
|
|
274
|
-
*
|
|
246
|
+
* Additional data represented as key-value pairs. Both the key and value must be
|
|
247
|
+
* strings.
|
|
275
248
|
*/
|
|
276
249
|
metadata?: Record<string, string>;
|
|
277
250
|
/**
|
|
278
|
-
*
|
|
251
|
+
* The name of the ledger account category.
|
|
279
252
|
*/
|
|
280
253
|
name?: string;
|
|
281
254
|
}
|
|
282
|
-
export
|
|
255
|
+
export interface LedgerAccountCategoryListParams extends PageParams {
|
|
283
256
|
/**
|
|
284
|
-
*
|
|
285
|
-
*
|
|
286
|
-
* balances%5Bas_of_date%5D=2000-12-31. The balances as of a date are exclusive of
|
|
287
|
-
* entries with that exact date.
|
|
257
|
+
* If you have specific IDs to retrieve in bulk, you can pass them as query
|
|
258
|
+
* parameters delimited with `id[]=`, for example `?id[]=123&id[]=abc`.
|
|
288
259
|
*/
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
260
|
+
id?: Array<string>;
|
|
261
|
+
/**
|
|
262
|
+
* For example, if you want the balances as of a particular time (ISO8601), the
|
|
263
|
+
* encoded query string would be `balances%5Beffective_at%5D=2000-12-31T12:00:00Z`.
|
|
264
|
+
* The balances as of a time are inclusive of entries with that exact time.
|
|
265
|
+
*/
|
|
266
|
+
balances?: LedgerAccountCategoryListParams.Balances;
|
|
295
267
|
/**
|
|
296
268
|
* Query categories which contain a ledger account directly or through child
|
|
297
269
|
* categories.
|
|
@@ -310,24 +282,13 @@ export interface LedgerAccountCategoryListParams extends PageParams {
|
|
|
310
282
|
*/
|
|
311
283
|
parent_ledger_account_category_id?: string;
|
|
312
284
|
}
|
|
313
|
-
export
|
|
285
|
+
export declare namespace LedgerAccountCategoryListParams {
|
|
314
286
|
/**
|
|
315
|
-
* For example, if you want the balances as of a particular
|
|
316
|
-
*
|
|
317
|
-
*
|
|
318
|
-
* entries with that exact date.
|
|
319
|
-
*/
|
|
320
|
-
balances?: LedgerAccountCategoryDeleteParams.Balances;
|
|
321
|
-
}
|
|
322
|
-
export declare namespace LedgerAccountCategoryDeleteParams {
|
|
323
|
-
/**
|
|
324
|
-
* For example, if you want the balances as of a particular effective date
|
|
325
|
-
* (YYYY-MM-DD), the encoded query string would be
|
|
326
|
-
* balances%5Bas_of_date%5D=2000-12-31. The balances as of a date are exclusive of
|
|
327
|
-
* entries with that exact date.
|
|
287
|
+
* For example, if you want the balances as of a particular time (ISO8601), the
|
|
288
|
+
* encoded query string would be `balances%5Beffective_at%5D=2000-12-31T12:00:00Z`.
|
|
289
|
+
* The balances as of a time are inclusive of entries with that exact time.
|
|
328
290
|
*/
|
|
329
291
|
interface Balances {
|
|
330
|
-
as_of_date?: string;
|
|
331
292
|
effective_at?: string;
|
|
332
293
|
}
|
|
333
294
|
}
|
|
@@ -338,7 +299,6 @@ export declare namespace LedgerAccountCategories {
|
|
|
338
299
|
export import LedgerAccountCategoryRetrieveParams = API.LedgerAccountCategoryRetrieveParams;
|
|
339
300
|
export import LedgerAccountCategoryUpdateParams = API.LedgerAccountCategoryUpdateParams;
|
|
340
301
|
export import LedgerAccountCategoryListParams = API.LedgerAccountCategoryListParams;
|
|
341
|
-
export import LedgerAccountCategoryDeleteParams = API.LedgerAccountCategoryDeleteParams;
|
|
342
302
|
}
|
|
343
303
|
export {};
|
|
344
304
|
//# sourceMappingURL=ledger-account-categories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ledger-account-categories.d.ts","sourceRoot":"","sources":["../src/resources/ledger-account-categories.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,uBAAwB,SAAQ,WAAW;IACtD;;OAEG;IACH,MAAM,CACJ,MAAM,EAAE,iCAAiC,EACzC,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAC5B,
|
|
1
|
+
{"version":3,"file":"ledger-account-categories.d.ts","sourceRoot":"","sources":["../src/resources/ledger-account-categories.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,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,uBAAuB,CAAC;IACvC,MAAM,QAAQ,qBAAqB,GAAG,GAAG,CAAC,qBAAqB,CAAC;IAChE,KAAY,2BAA2B,GAAG,4BAA4B,CAAC;IACvE,MAAM,QAAQ,iCAAiC,GAAG,GAAG,CAAC,iCAAiC,CAAC;IACxF,MAAM,QAAQ,mCAAmC,GAAG,GAAG,CAAC,mCAAmC,CAAC;IAC5F,MAAM,QAAQ,iCAAiC,GAAG,GAAG,CAAC,iCAAiC,CAAC;IACxF,MAAM,QAAQ,+BAA+B,GAAG,GAAG,CAAC,+BAA+B,CAAC;CACrF"}
|
|
@@ -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.LedgerAccountCategoriesPage = exports.LedgerAccountCategories = 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 LedgerAccountCategories extends resource_1.APIResource {
|
|
9
9
|
/**
|
|
10
10
|
* Create a ledger account category.
|
|
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/ledger_account_categories', {
|
|
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
|
});
|
|
@@ -26,12 +32,11 @@ class LedgerAccountCategories extends resource_1.APIResource {
|
|
|
26
32
|
}
|
|
27
33
|
return this.get(`/api/ledger_account_categories/${id}`, { query, ...options });
|
|
28
34
|
}
|
|
29
|
-
update(id,
|
|
30
|
-
if ((0, core_1.isRequestOptions)(
|
|
31
|
-
return this.update(id, {},
|
|
35
|
+
update(id, body = {}, options) {
|
|
36
|
+
if ((0, core_1.isRequestOptions)(body)) {
|
|
37
|
+
return this.update(id, {}, body);
|
|
32
38
|
}
|
|
33
|
-
|
|
34
|
-
return this.patch(`/api/ledger_account_categories/${id}`, { query: { balances }, body, ...options });
|
|
39
|
+
return this.patch(`/api/ledger_account_categories/${id}`, { body, ...options });
|
|
35
40
|
}
|
|
36
41
|
list(query = {}, options) {
|
|
37
42
|
if ((0, core_1.isRequestOptions)(query)) {
|
|
@@ -42,15 +47,14 @@ class LedgerAccountCategories extends resource_1.APIResource {
|
|
|
42
47
|
...options,
|
|
43
48
|
});
|
|
44
49
|
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
return this.delete(`/api/ledger_account_categories/${id}`, { query: { balances }, ...options });
|
|
50
|
+
/**
|
|
51
|
+
* Delete a ledger account category.
|
|
52
|
+
*/
|
|
53
|
+
del(id, options) {
|
|
54
|
+
return this.delete(`/api/ledger_account_categories/${id}`, options);
|
|
51
55
|
}
|
|
52
56
|
/**
|
|
53
|
-
* Add a ledger account
|
|
57
|
+
* Add a ledger account to a ledger account category.
|
|
54
58
|
*/
|
|
55
59
|
addLedgerAccount(id, ledgerAccountId, options) {
|
|
56
60
|
return this.put(`/api/ledger_account_categories/${id}/ledger_accounts/${ledgerAccountId}`, {
|
|
@@ -68,7 +72,7 @@ class LedgerAccountCategories extends resource_1.APIResource {
|
|
|
68
72
|
});
|
|
69
73
|
}
|
|
70
74
|
/**
|
|
71
|
-
*
|
|
75
|
+
* Remove a ledger account from a ledger account category.
|
|
72
76
|
*/
|
|
73
77
|
removeLedgerAccount(id, ledgerAccountId, options) {
|
|
74
78
|
return this.delete(`/api/ledger_account_categories/${id}/ledger_accounts/${ledgerAccountId}`, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ledger-account-categories.js","sourceRoot":"","sources":["../src/resources/ledger-account-categories.ts"],"names":[],"mappings":";AAAA,qDAAqD;;;AAGrD,uDAAuD;AACvD,+CAAwD;AAExD,2DAA8D;AAE9D,MAAa,uBAAwB,SAAQ,sBAAW;IACtD;;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,gCAAgC,EAAE;YACjD,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,iBAAiB,EAAE,cAAc,
|
|
1
|
+
{"version":3,"file":"ledger-account-categories.js","sourceRoot":"","sources":["../src/resources/ledger-account-categories.ts"],"names":[],"mappings":";AAAA,qDAAqD;;;AAGrD,uDAAuD;AACvD,+CAAwD;AAExD,2DAA8D;AAE9D,MAAa,uBAAwB,SAAQ,sBAAW;IACtD;;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,gCAAgC,EAAE;YACjD,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,iBAAiB,EAAE,cAAc,EAAE,GAAG,OAAO,aAAP,OA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
@@ -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 LedgerAccountCategories extends APIResource {
|
|
6
6
|
/**
|
|
7
7
|
* Create a ledger account category.
|
|
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/ledger_account_categories', {
|
|
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
|
});
|
|
@@ -23,12 +29,11 @@ export class LedgerAccountCategories extends APIResource {
|
|
|
23
29
|
}
|
|
24
30
|
return this.get(`/api/ledger_account_categories/${id}`, { query, ...options });
|
|
25
31
|
}
|
|
26
|
-
update(id,
|
|
27
|
-
if (isRequestOptions(
|
|
28
|
-
return this.update(id, {},
|
|
32
|
+
update(id, body = {}, options) {
|
|
33
|
+
if (isRequestOptions(body)) {
|
|
34
|
+
return this.update(id, {}, body);
|
|
29
35
|
}
|
|
30
|
-
|
|
31
|
-
return this.patch(`/api/ledger_account_categories/${id}`, { query: { balances }, body, ...options });
|
|
36
|
+
return this.patch(`/api/ledger_account_categories/${id}`, { body, ...options });
|
|
32
37
|
}
|
|
33
38
|
list(query = {}, options) {
|
|
34
39
|
if (isRequestOptions(query)) {
|
|
@@ -39,15 +44,14 @@ export class LedgerAccountCategories extends APIResource {
|
|
|
39
44
|
...options,
|
|
40
45
|
});
|
|
41
46
|
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
return this.delete(`/api/ledger_account_categories/${id}`, { query: { balances }, ...options });
|
|
47
|
+
/**
|
|
48
|
+
* Delete a ledger account category.
|
|
49
|
+
*/
|
|
50
|
+
del(id, options) {
|
|
51
|
+
return this.delete(`/api/ledger_account_categories/${id}`, options);
|
|
48
52
|
}
|
|
49
53
|
/**
|
|
50
|
-
* Add a ledger account
|
|
54
|
+
* Add a ledger account to a ledger account category.
|
|
51
55
|
*/
|
|
52
56
|
addLedgerAccount(id, ledgerAccountId, options) {
|
|
53
57
|
return this.put(`/api/ledger_account_categories/${id}/ledger_accounts/${ledgerAccountId}`, {
|
|
@@ -65,7 +69,7 @@ export class LedgerAccountCategories extends APIResource {
|
|
|
65
69
|
});
|
|
66
70
|
}
|
|
67
71
|
/**
|
|
68
|
-
*
|
|
72
|
+
* Remove a ledger account from a ledger account category.
|
|
69
73
|
*/
|
|
70
74
|
removeLedgerAccount(id, ledgerAccountId, options) {
|
|
71
75
|
return this.delete(`/api/ledger_account_categories/${id}/ledger_accounts/${ledgerAccountId}`, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ledger-account-categories.mjs","sourceRoot":"","sources":["../src/resources/ledger-account-categories.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,uBAAwB,SAAQ,WAAW;IACtD;;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,gCAAgC,EAAE;YACjD,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,iBAAiB,EAAE,cAAc,
|
|
1
|
+
{"version":3,"file":"ledger-account-categories.mjs","sourceRoot":"","sources":["../src/resources/ledger-account-categories.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,uBAAwB,SAAQ,WAAW;IACtD;;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,gCAAgC,EAAE;YACjD,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;IAWD,QAAQ,CACN,EAAU,EACV,QAAmE,EAAE,EACrE,OAA6B;QAE7B,IAAI,gBAAgB,CAAC,KAAK,CAAC,EAAE;YAC3B,OAAO,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;SACrC;QACD,OAAO,IAAI,CAAC,GAAG,CAAC,kCAAkC,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,GAAG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AAE,EAAE,MAAM,EAAE,EAAE,EAAE,GAAG,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,EAAE;SAC7C,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,mBAAmB,CACjB,EAAU,EACV,eAAuB,EACvB,OAA6B;QAE7B,OAAO,IAAI,CAAC,MAAM,CAAC,kCAAkC,EAAE,oBAAoB,eAAe,EAAE,EAAE;YAC5F,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,GAAG,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,EAAE;SAC7C,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,oBAAoB,CAClB,EAAU,EACV,aAAqB,EACrB,OAA6B;QAE7B,OAAO,IAAI,CAAC,MAAM,CAAC,kCAAkC,EAAE,8BAA8B,aAAa,EAAE,EAAE;YACpG,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,2BAA4B,SAAQ,IAA2B;CAAG;AAwR/E,WAAiB,uBAAuB;AAOxC,CAAC,EAPgB,uBAAuB,KAAvB,uBAAuB,QAOvC"}
|
|
@@ -9,7 +9,7 @@ export declare class LedgerAccountPayouts extends APIResource {
|
|
|
9
9
|
create(
|
|
10
10
|
params: LedgerAccountPayoutCreateParams,
|
|
11
11
|
options?: Core.RequestOptions,
|
|
12
|
-
):
|
|
12
|
+
): Core.APIPromise<LedgerAccountPayout>;
|
|
13
13
|
/**
|
|
14
14
|
* Update the details of a ledger account payout.
|
|
15
15
|
*/
|
|
@@ -17,20 +17,20 @@ export declare class LedgerAccountPayouts extends APIResource {
|
|
|
17
17
|
id: string,
|
|
18
18
|
body?: LedgerAccountPayoutUpdateParams,
|
|
19
19
|
options?: Core.RequestOptions,
|
|
20
|
-
):
|
|
21
|
-
update(id: string, options?: Core.RequestOptions):
|
|
20
|
+
): Core.APIPromise<LedgerAccountPayout>;
|
|
21
|
+
update(id: string, options?: Core.RequestOptions): Core.APIPromise<LedgerAccountPayout>;
|
|
22
22
|
/**
|
|
23
23
|
* Get a list of ledger account payouts.
|
|
24
24
|
*/
|
|
25
25
|
list(
|
|
26
26
|
query?: LedgerAccountPayoutListParams,
|
|
27
27
|
options?: Core.RequestOptions,
|
|
28
|
-
): Core.PagePromise<LedgerAccountPayoutsPage>;
|
|
29
|
-
list(options?: Core.RequestOptions): Core.PagePromise<LedgerAccountPayoutsPage>;
|
|
28
|
+
): Core.PagePromise<LedgerAccountPayoutsPage, LedgerAccountPayout>;
|
|
29
|
+
list(options?: Core.RequestOptions): Core.PagePromise<LedgerAccountPayoutsPage, LedgerAccountPayout>;
|
|
30
30
|
/**
|
|
31
31
|
* Get details on a single ledger account payout.
|
|
32
32
|
*/
|
|
33
|
-
retireve(id: string, options?: Core.RequestOptions):
|
|
33
|
+
retireve(id: string, options?: Core.RequestOptions): Core.APIPromise<LedgerAccountPayout>;
|
|
34
34
|
}
|
|
35
35
|
export declare class LedgerAccountPayoutsPage extends Page<LedgerAccountPayout> {}
|
|
36
36
|
type _LedgerAccountPayoutsPage = LedgerAccountPayoutsPage;
|
|
@@ -97,40 +97,40 @@ export interface LedgerAccountPayout {
|
|
|
97
97
|
}
|
|
98
98
|
export interface LedgerAccountPayoutCreateParams {
|
|
99
99
|
/**
|
|
100
|
-
*
|
|
101
|
-
*
|
|
100
|
+
* The id of the funding ledger account that sends to or receives funds from the
|
|
101
|
+
* payout ledger account.
|
|
102
102
|
*/
|
|
103
103
|
funding_ledger_account_id: string;
|
|
104
104
|
/**
|
|
105
|
-
*
|
|
106
|
-
*
|
|
105
|
+
* The id of the payout ledger account whose ledger entries are queried against,
|
|
106
|
+
* and its balance is reduced as a result.
|
|
107
107
|
*/
|
|
108
108
|
payout_ledger_account_id: string;
|
|
109
109
|
/**
|
|
110
|
-
*
|
|
110
|
+
* The description of the ledger account payout.
|
|
111
111
|
*/
|
|
112
112
|
description?: string | null;
|
|
113
113
|
/**
|
|
114
|
-
*
|
|
115
|
-
*
|
|
116
|
-
*
|
|
114
|
+
* The exclusive upper bound of the effective_at timestamp of the ledger entries to
|
|
115
|
+
* be included in the ledger account payout. The default value is the created_at
|
|
116
|
+
* timestamp of the ledger account payout.
|
|
117
117
|
*/
|
|
118
118
|
effective_at_upper_bound?: string | null;
|
|
119
119
|
/**
|
|
120
|
-
*
|
|
121
|
-
*
|
|
120
|
+
* Additional data represented as key-value pairs. Both the key and value must be
|
|
121
|
+
* strings.
|
|
122
122
|
*/
|
|
123
123
|
metadata?: Record<string, string>;
|
|
124
124
|
/**
|
|
125
|
-
*
|
|
126
|
-
*
|
|
125
|
+
* It is set to `false` by default. It should be set to `true` when migrating
|
|
126
|
+
* existing payouts.
|
|
127
127
|
*/
|
|
128
|
-
|
|
128
|
+
skip_payout_ledger_transaction?: boolean | null;
|
|
129
129
|
/**
|
|
130
|
-
*
|
|
131
|
-
*
|
|
130
|
+
* The status of the ledger account payout. It is set to `pending` by default. To
|
|
131
|
+
* post a ledger account payout at creation, use `posted`.
|
|
132
132
|
*/
|
|
133
|
-
'
|
|
133
|
+
status?: 'pending' | 'posted' | null;
|
|
134
134
|
}
|
|
135
135
|
export interface LedgerAccountPayoutUpdateParams {
|
|
136
136
|
/**
|
|
@@ -149,6 +149,17 @@ export interface LedgerAccountPayoutUpdateParams {
|
|
|
149
149
|
status?: 'posted' | 'archived';
|
|
150
150
|
}
|
|
151
151
|
export interface LedgerAccountPayoutListParams extends PageParams {
|
|
152
|
+
/**
|
|
153
|
+
* If you have specific IDs to retrieve in bulk, you can pass them as query
|
|
154
|
+
* parameters delimited with `id[]=`, for example `?id[]=123&id[]=abc`.
|
|
155
|
+
*/
|
|
156
|
+
id?: Array<string>;
|
|
157
|
+
/**
|
|
158
|
+
* For example, if you want to query for records with metadata key `Type` and value
|
|
159
|
+
* `Loan`, the query would be `metadata%5BType%5D=Loan`. This encodes the query
|
|
160
|
+
* parameters.
|
|
161
|
+
*/
|
|
162
|
+
metadata?: Record<string, string>;
|
|
152
163
|
payout_ledger_account_id?: string;
|
|
153
164
|
}
|
|
154
165
|
export declare namespace LedgerAccountPayouts {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ledger-account-payouts.d.ts","sourceRoot":"","sources":["../src/resources/ledger-account-payouts.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,oBAAqB,SAAQ,WAAW;IACnD;;OAEG;IACH,MAAM,CACJ,MAAM,EAAE,+BAA+B,EACvC,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAC5B,
|
|
1
|
+
{"version":3,"file":"ledger-account-payouts.d.ts","sourceRoot":"","sources":["../src/resources/ledger-account-payouts.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,oBAAqB,SAAQ,WAAW;IACnD;;OAEG;IACH,MAAM,CACJ,MAAM,EAAE,+BAA+B,EACvC,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAC5B,IAAI,CAAC,UAAU,CAAC,mBAAmB,CAAC;IAevC;;OAEG;IACH,MAAM,CACJ,EAAE,EAAE,MAAM,EACV,IAAI,CAAC,EAAE,+BAA+B,EACtC,OAAO,CAAC,EAAE,IAAI,CAAC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,yBAAiB,oBAAoB,CAAC;IACpC,MAAM,QAAQ,mBAAmB,GAAG,GAAG,CAAC,mBAAmB,CAAC;IAC5D,KAAY,wBAAwB,GAAG,yBAAyB,CAAC;IACjE,MAAM,QAAQ,+BAA+B,GAAG,GAAG,CAAC,+BAA+B,CAAC;IACpF,MAAM,QAAQ,+BAA+B,GAAG,GAAG,CAAC,+BAA+B,CAAC;IACpF,MAAM,QAAQ,6BAA6B,GAAG,GAAG,CAAC,6BAA6B,CAAC;CACjF"}
|
|
@@ -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.LedgerAccountPayoutsPage = exports.LedgerAccountPayouts = 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 LedgerAccountPayouts extends resource_1.APIResource {
|
|
9
9
|
/**
|
|
10
10
|
* Create a ledger account payout.
|
|
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/ledger_account_payouts', {
|
|
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":"ledger-account-payouts.js","sourceRoot":"","sources":["../src/resources/ledger-account-payouts.ts"],"names":[],"mappings":";AAAA,qDAAqD;;;AAGrD,uDAAuD;AACvD,+CAAwD;AAExD,2DAA8D;AAE9D,MAAa,oBAAqB,SAAQ,sBAAW;IACnD;;OAEG;IACH,MAAM,CACJ,MAAuC,EACvC,OAA6B;QAE7B,MAAM,EAAE,iBAAiB,EAAE,cAAc,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAC9D,OAAO,IAAI,CAAC,IAAI,CAAC,6BAA6B,EAAE;YAC9C,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,iBAAiB,EAAE,cAAc,
|
|
1
|
+
{"version":3,"file":"ledger-account-payouts.js","sourceRoot":"","sources":["../src/resources/ledger-account-payouts.ts"],"names":[],"mappings":";AAAA,qDAAqD;;;AAGrD,uDAAuD;AACvD,+CAAwD;AAExD,2DAA8D;AAE9D,MAAa,oBAAqB,SAAQ,sBAAW;IACnD;;OAEG;IACH,MAAM,CACJ,MAAuC,EACvC,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,6BAA6B,EAAE;YAC9C,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;IAWD,MAAM,CACJ,EAAU,EACV,OAA8D,EAAE,EAChE,OAA6B;QAE7B,IAAI,IAAA,uBAAgB,EA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