modern-treasury 2.0.0 → 2.2.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 +135 -0
- package/LICENSE +7 -0
- package/README.md +273 -0
- package/_shims/fetch.js +1 -1
- package/_shims/formdata.node.d.ts +1 -0
- package/core.d.ts +19 -11
- package/core.d.ts.map +1 -1
- package/core.js +122 -72
- package/core.js.map +1 -1
- package/core.mjs +112 -32
- package/core.mjs.map +1 -1
- package/error.d.ts +5 -0
- package/error.d.ts.map +1 -1
- package/error.js +20 -3
- package/error.js.map +1 -1
- package/error.mjs +18 -3
- package/error.mjs.map +1 -1
- package/index.d.mts +17 -8
- package/index.d.ts +17 -8
- package/index.d.ts.map +1 -1
- package/index.js +36 -20
- package/index.js.map +1 -1
- package/index.mjs +35 -20
- package/index.mjs.map +1 -1
- package/package.json +5 -5
- package/resources/account-collection-flows.d.ts +11 -11
- package/resources/account-collection-flows.d.ts.map +1 -1
- package/resources/account-collection-flows.js +4 -4
- package/resources/account-collection-flows.mjs +2 -2
- package/resources/account-details.d.ts.map +1 -1
- package/resources/connections.d.ts.map +1 -1
- package/resources/counterparties.d.ts.map +1 -1
- package/resources/documents.d.ts +2 -5
- package/resources/documents.d.ts.map +1 -1
- package/resources/documents.js +1 -7
- package/resources/documents.js.map +1 -1
- package/resources/documents.mjs +1 -7
- package/resources/documents.mjs.map +1 -1
- package/resources/events.d.ts.map +1 -1
- package/resources/expected-payments.d.ts.map +1 -1
- package/resources/external-accounts.d.ts.map +1 -1
- package/resources/incoming-payment-details.d.ts.map +1 -1
- package/resources/index.d.ts +2 -2
- package/resources/index.js +3 -3
- package/resources/index.mjs +1 -1
- package/resources/internal-accounts/balance-reports.d.ts.map +1 -1
- package/resources/internal-accounts/internal-accounts.d.ts +5 -4
- package/resources/internal-accounts/internal-accounts.d.ts.map +1 -1
- package/resources/internal-accounts/internal-accounts.js.map +1 -1
- package/resources/internal-accounts/internal-accounts.mjs.map +1 -1
- package/resources/invoices/invoices.d.ts +102 -5
- package/resources/invoices/invoices.d.ts.map +1 -1
- package/resources/invoices/invoices.js.map +1 -1
- package/resources/invoices/invoices.mjs.map +1 -1
- package/resources/invoices/line-items.d.ts +41 -0
- package/resources/invoices/line-items.d.ts.map +1 -1
- package/resources/invoices/line-items.js.map +1 -1
- package/resources/invoices/line-items.mjs.map +1 -1
- package/resources/ledger-account-categories.d.ts.map +1 -1
- package/resources/ledger-account-payouts.d.ts.map +1 -1
- package/resources/ledger-account-statements.d.ts.map +1 -1
- package/resources/ledger-accounts.d.ts +23 -16
- package/resources/ledger-accounts.d.ts.map +1 -1
- package/resources/ledger-accounts.js.map +1 -1
- package/resources/ledger-accounts.mjs.map +1 -1
- package/resources/ledger-entries.d.ts.map +1 -1
- package/resources/ledger-event-handlers.d.ts +4 -0
- package/resources/ledger-event-handlers.d.ts.map +1 -1
- package/resources/ledger-event-handlers.js.map +1 -1
- package/resources/ledger-event-handlers.mjs.map +1 -1
- package/resources/ledger-transactions/ledger-transactions.d.ts +8 -3
- package/resources/ledger-transactions/ledger-transactions.d.ts.map +1 -1
- package/resources/ledger-transactions/ledger-transactions.js.map +1 -1
- package/resources/ledger-transactions/ledger-transactions.mjs.map +1 -1
- package/resources/ledger-transactions/versions.d.ts.map +1 -1
- package/resources/ledgerable-events.d.ts +0 -16
- package/resources/ledgerable-events.d.ts.map +1 -1
- package/resources/ledgerable-events.js.map +1 -1
- package/resources/ledgerable-events.mjs.map +1 -1
- package/resources/ledgers.d.ts.map +1 -1
- package/resources/line-items.d.ts.map +1 -1
- package/resources/paper-items.d.ts.map +1 -1
- package/resources/payment-flows.d.ts.map +1 -1
- package/resources/payment-orders/payment-orders.d.ts +32 -6
- package/resources/payment-orders/payment-orders.d.ts.map +1 -1
- package/resources/payment-orders/payment-orders.js.map +1 -1
- package/resources/payment-orders/payment-orders.mjs.map +1 -1
- package/resources/payment-orders/reversals.d.ts +8 -3
- package/resources/payment-orders/reversals.d.ts.map +1 -1
- package/resources/payment-orders/reversals.js.map +1 -1
- package/resources/payment-orders/reversals.mjs.map +1 -1
- package/resources/payment-references.d.ts.map +1 -1
- package/resources/returns.d.ts.map +1 -1
- package/resources/routing-details.d.ts.map +1 -1
- package/resources/top-level.d.ts.map +1 -1
- package/resources/transactions/line-items.d.ts.map +1 -1
- package/resources/transactions/transactions.d.ts.map +1 -1
- package/resources/transactions/transactions.js.map +1 -1
- package/resources/validations.d.ts.map +1 -1
- package/resources/virtual-accounts.d.ts +59 -3
- package/resources/virtual-accounts.d.ts.map +1 -1
- package/resources/virtual-accounts.js +1 -4
- package/resources/virtual-accounts.js.map +1 -1
- package/resources/virtual-accounts.mjs +1 -4
- package/resources/virtual-accounts.mjs.map +1 -1
- package/src/_shims/fetch.deno.ts +23 -0
- package/src/_shims/fetch.js +1 -1
- package/src/_shims/fileFromPath.node.ts +1 -1
- package/src/_shims/fileFromPath.ts +1 -1
- package/src/_shims/formdata.deno.ts +16 -0
- package/src/_shims/formdata.node.d.ts +1 -0
- package/src/_shims/getMultipartRequestOptions.node.ts +1 -1
- package/src/_shims/getMultipartRequestOptions.ts +1 -1
- package/src/core.ts +123 -34
- package/src/error.ts +19 -1
- package/src/index.ts +47 -28
- package/src/resources/account-collection-flows.ts +19 -19
- package/src/resources/account-details.ts +6 -6
- package/src/resources/connections.ts +5 -5
- package/src/resources/counterparties.ts +8 -8
- package/src/resources/documents.ts +9 -18
- package/src/resources/events.ts +5 -5
- package/src/resources/expected-payments.ts +6 -6
- package/src/resources/external-accounts.ts +8 -8
- package/src/resources/incoming-payment-details.ts +7 -7
- package/src/resources/index.ts +2 -2
- package/src/resources/internal-accounts/balance-reports.ts +6 -6
- package/src/resources/internal-accounts/internal-accounts.ts +15 -14
- package/src/resources/invoices/invoices.ts +121 -13
- package/src/resources/invoices/line-items.ts +51 -6
- package/src/resources/ledger-account-categories.ts +5 -5
- package/src/resources/ledger-account-payouts.ts +5 -5
- package/src/resources/ledger-account-statements.ts +3 -3
- package/src/resources/ledger-accounts.ts +29 -21
- package/src/resources/ledger-entries.ts +5 -5
- package/src/resources/ledger-event-handlers.ts +10 -5
- package/src/resources/ledger-transactions/ledger-transactions.ts +15 -9
- package/src/resources/ledger-transactions/versions.ts +5 -5
- package/src/resources/ledgerable-events.ts +3 -23
- package/src/resources/ledgers.ts +5 -5
- package/src/resources/line-items.ts +5 -5
- package/src/resources/paper-items.ts +6 -6
- package/src/resources/payment-flows.ts +5 -5
- package/src/resources/payment-orders/payment-orders.ts +45 -15
- package/src/resources/payment-orders/reversals.ts +14 -8
- package/src/resources/payment-references.ts +5 -5
- package/src/resources/returns.ts +6 -6
- package/src/resources/routing-details.ts +6 -6
- package/src/resources/top-level.ts +1 -1
- package/src/resources/transactions/line-items.ts +5 -5
- package/src/resources/transactions/transactions.ts +6 -6
- package/src/resources/validations.ts +3 -3
- package/src/resources/virtual-accounts.ts +72 -14
- package/src/resources/webhooks.ts +3 -3
- package/src/uploads.ts +16 -14
- package/src/version.ts +1 -1
- package/uploads.d.ts +6 -5
- package/uploads.d.ts.map +1 -1
- package/uploads.js +4 -3
- package/uploads.js.map +1 -1
- package/uploads.mjs +4 -3
- package/uploads.mjs.map +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/src/streaming.ts +0 -204
- package/streaming.d.ts +0 -14
- package/streaming.d.ts.map +0 -1
- package/streaming.js +0 -155
- package/streaming.js.map +0 -1
- package/streaming.mjs +0 -151
- package/streaming.mjs.map +0 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless.
|
|
2
2
|
|
|
3
|
-
import * as Core from '
|
|
4
|
-
import { APIResource } from '
|
|
5
|
-
import { isRequestOptions } from '
|
|
6
|
-
import * as PaymentOrders from '
|
|
7
|
-
import * as Shared from '
|
|
3
|
+
import * as Core from '../../core';
|
|
4
|
+
import { APIResource } from '../../resource';
|
|
5
|
+
import { isRequestOptions } from '../../core';
|
|
6
|
+
import * as PaymentOrders from '../payment-orders/index';
|
|
7
|
+
import * as Shared from '../shared';
|
|
8
8
|
import { LineItems } from './line-items';
|
|
9
|
-
import * as API from './';
|
|
10
|
-
import { Page, PageParams } from '
|
|
9
|
+
import * as API from './index';
|
|
10
|
+
import { Page, PageParams } from '../../pagination';
|
|
11
11
|
|
|
12
12
|
export class Invoices extends APIResource {
|
|
13
13
|
lineItems: LineItems = new LineItems(this.client);
|
|
@@ -139,17 +139,40 @@ export interface Invoice {
|
|
|
139
139
|
*/
|
|
140
140
|
originating_account_id: string;
|
|
141
141
|
|
|
142
|
+
/**
|
|
143
|
+
* Date transactions are to be posted to the participants' account. Defaults to the
|
|
144
|
+
* current business day or the next business day if the current day is a bank
|
|
145
|
+
* holiday or weekend. Format: yyyy-mm-dd.
|
|
146
|
+
*/
|
|
147
|
+
payment_effective_date: string | null;
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* When opening an invoice, whether to show the embedded payment UI , automatically
|
|
151
|
+
* debit the recipient, or rely on manual payment from the recipient.
|
|
152
|
+
*/
|
|
153
|
+
payment_method: 'ui' | 'manual' | 'automatic' | null;
|
|
154
|
+
|
|
142
155
|
/**
|
|
143
156
|
* The payment orders created for paying the invoice through the invoice payment
|
|
144
157
|
* UI.
|
|
145
158
|
*/
|
|
146
159
|
payment_orders: Array<PaymentOrders.PaymentOrder>;
|
|
147
160
|
|
|
161
|
+
/**
|
|
162
|
+
* One of `ach` or `eft`
|
|
163
|
+
*/
|
|
164
|
+
payment_type: 'eft' | 'ach' | null;
|
|
165
|
+
|
|
148
166
|
/**
|
|
149
167
|
* The URL where the invoice PDF can be downloaded.
|
|
150
168
|
*/
|
|
151
169
|
pdf_url: string | null;
|
|
152
170
|
|
|
171
|
+
/**
|
|
172
|
+
* The receiving account ID. Can be an `internal_account`.
|
|
173
|
+
*/
|
|
174
|
+
receiving_account_id: string | null;
|
|
175
|
+
|
|
153
176
|
/**
|
|
154
177
|
* The status of the invoice.
|
|
155
178
|
*/
|
|
@@ -323,6 +346,52 @@ export interface InvoiceCreateParams {
|
|
|
323
346
|
*/
|
|
324
347
|
invoicer_address?: InvoiceCreateParams.InvoicerAddress | null;
|
|
325
348
|
|
|
349
|
+
/**
|
|
350
|
+
* Body param: Date transactions are to be posted to the participants' account.
|
|
351
|
+
* Defaults to the current business day or the next business day if the current day
|
|
352
|
+
* is a bank holiday or weekend. Format: yyyy-mm-dd.
|
|
353
|
+
*/
|
|
354
|
+
payment_effective_date?: string;
|
|
355
|
+
|
|
356
|
+
/**
|
|
357
|
+
* Body param: The method by which the invoice can be paid. `ui` will show the
|
|
358
|
+
* embedded payment collection flow. `automatic` will automatically initiate
|
|
359
|
+
* payment based upon the account details of the receiving_account id.\nIf the
|
|
360
|
+
* invoice amount is positive, the automatically initiated payment order's
|
|
361
|
+
* direction will be debit. If the invoice amount is negative, the automatically
|
|
362
|
+
* initiated payment order's direction will be credit. One of `manual`, `ui`, or
|
|
363
|
+
* `automatic`.
|
|
364
|
+
*/
|
|
365
|
+
payment_method?: 'ui' | 'manual' | 'automatic';
|
|
366
|
+
|
|
367
|
+
/**
|
|
368
|
+
* Body param: One of `ach`, `eft`, `wire`, `check`, `sen`, `book`, `rtp`, `sepa`,
|
|
369
|
+
* `bacs`, `au_becs`, `interac`, `signet`, `provexchange`.
|
|
370
|
+
*/
|
|
371
|
+
payment_type?:
|
|
372
|
+
| 'ach'
|
|
373
|
+
| 'au_becs'
|
|
374
|
+
| 'bacs'
|
|
375
|
+
| 'book'
|
|
376
|
+
| 'card'
|
|
377
|
+
| 'check'
|
|
378
|
+
| 'eft'
|
|
379
|
+
| 'cross_border'
|
|
380
|
+
| 'interac'
|
|
381
|
+
| 'masav'
|
|
382
|
+
| 'neft'
|
|
383
|
+
| 'provxchange'
|
|
384
|
+
| 'rtp'
|
|
385
|
+
| 'sen'
|
|
386
|
+
| 'sepa'
|
|
387
|
+
| 'signet'
|
|
388
|
+
| 'wire';
|
|
389
|
+
|
|
390
|
+
/**
|
|
391
|
+
* Body param: The receiving account ID. Can be an `external_account`.
|
|
392
|
+
*/
|
|
393
|
+
receiving_account_id?: string;
|
|
394
|
+
|
|
326
395
|
/**
|
|
327
396
|
* Header param: This key should be something unique, preferably something like an
|
|
328
397
|
* UUID.
|
|
@@ -477,12 +546,6 @@ export interface InvoiceUpdateParams {
|
|
|
477
546
|
*/
|
|
478
547
|
due_date?: string;
|
|
479
548
|
|
|
480
|
-
/**
|
|
481
|
-
* When opening an invoice, whether to show the embedded payment UI with the
|
|
482
|
-
* invoice. Default true.
|
|
483
|
-
*/
|
|
484
|
-
include_payment_ui?: boolean;
|
|
485
|
-
|
|
486
549
|
/**
|
|
487
550
|
* The invoice issuer's business address.
|
|
488
551
|
*/
|
|
@@ -493,6 +556,51 @@ export interface InvoiceUpdateParams {
|
|
|
493
556
|
*/
|
|
494
557
|
originating_account_id?: string;
|
|
495
558
|
|
|
559
|
+
/**
|
|
560
|
+
* Date transactions are to be posted to the participants' account. Defaults to the
|
|
561
|
+
* current business day or the next business day if the current day is a bank
|
|
562
|
+
* holiday or weekend. Format: yyyy-mm-dd.
|
|
563
|
+
*/
|
|
564
|
+
payment_effective_date?: string;
|
|
565
|
+
|
|
566
|
+
/**
|
|
567
|
+
* The method by which the invoice can be paid. `ui` will show the embedded payment
|
|
568
|
+
* collection flow. `automatic` will automatically initiate payment based upon the
|
|
569
|
+
* account details of the receiving_account id.\nIf the invoice amount is positive,
|
|
570
|
+
* the automatically initiated payment order's direction will be debit. If the
|
|
571
|
+
* invoice amount is negative, the automatically initiated payment order's
|
|
572
|
+
* direction will be credit. One of `manual`, `ui`, or `automatic`.
|
|
573
|
+
*/
|
|
574
|
+
payment_method?: 'ui' | 'manual' | 'automatic';
|
|
575
|
+
|
|
576
|
+
/**
|
|
577
|
+
* One of `ach`, `eft`, `wire`, `check`, `sen`, `book`, `rtp`, `sepa`, `bacs`,
|
|
578
|
+
* `au_becs`, `interac`, `signet`, `provexchange`.
|
|
579
|
+
*/
|
|
580
|
+
payment_type?:
|
|
581
|
+
| 'ach'
|
|
582
|
+
| 'au_becs'
|
|
583
|
+
| 'bacs'
|
|
584
|
+
| 'book'
|
|
585
|
+
| 'card'
|
|
586
|
+
| 'check'
|
|
587
|
+
| 'eft'
|
|
588
|
+
| 'cross_border'
|
|
589
|
+
| 'interac'
|
|
590
|
+
| 'masav'
|
|
591
|
+
| 'neft'
|
|
592
|
+
| 'provxchange'
|
|
593
|
+
| 'rtp'
|
|
594
|
+
| 'sen'
|
|
595
|
+
| 'sepa'
|
|
596
|
+
| 'signet'
|
|
597
|
+
| 'wire';
|
|
598
|
+
|
|
599
|
+
/**
|
|
600
|
+
* The receiving account ID. Can be an `external_account`.
|
|
601
|
+
*/
|
|
602
|
+
receiving_account_id?: string;
|
|
603
|
+
|
|
496
604
|
/**
|
|
497
605
|
* Invoice status must be updated in a `PATCH` request that does not modify any
|
|
498
606
|
* other invoice attributes. Valid state transitions are `draft` to `unpaid` and
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless.
|
|
2
2
|
|
|
3
|
-
import * as Core from '
|
|
4
|
-
import { APIResource } from '
|
|
5
|
-
import { isRequestOptions } from '
|
|
6
|
-
import * as Shared from '
|
|
7
|
-
import * as API from './';
|
|
8
|
-
import { Page, PageParams } from '
|
|
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';
|
|
9
9
|
|
|
10
10
|
export class LineItems extends APIResource {
|
|
11
11
|
/**
|
|
@@ -233,6 +233,51 @@ export interface LineItemUpdateParams {
|
|
|
233
233
|
* The ID of the internal account the invoice should be paid to.
|
|
234
234
|
*/
|
|
235
235
|
originating_account_id?: string;
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* Date transactions are to be posted to the participants' account. Defaults to the
|
|
239
|
+
* current business day or the next business day if the current day is a bank
|
|
240
|
+
* holiday or weekend. Format: yyyy-mm-dd.
|
|
241
|
+
*/
|
|
242
|
+
payment_effective_date?: string;
|
|
243
|
+
|
|
244
|
+
/**
|
|
245
|
+
* The method by which the invoice can be paid. `ui` will show the embedded payment
|
|
246
|
+
* collection flow. `automatic` will automatically initiate payment based upon the
|
|
247
|
+
* account details of the receiving_account id.\nIf the invoice amount is positive,
|
|
248
|
+
* the automatically initiated payment order's direction will be debit. If the
|
|
249
|
+
* invoice amount is negative, the automatically initiated payment order's
|
|
250
|
+
* direction will be credit. One of `manual`, `ui`, or `automatic`.
|
|
251
|
+
*/
|
|
252
|
+
payment_method?: 'ui' | 'manual' | 'automatic';
|
|
253
|
+
|
|
254
|
+
/**
|
|
255
|
+
* One of `ach`, `eft`, `wire`, `check`, `sen`, `book`, `rtp`, `sepa`, `bacs`,
|
|
256
|
+
* `au_becs`, `interac`, `signet`, `provexchange`.
|
|
257
|
+
*/
|
|
258
|
+
payment_type?:
|
|
259
|
+
| 'ach'
|
|
260
|
+
| 'au_becs'
|
|
261
|
+
| 'bacs'
|
|
262
|
+
| 'book'
|
|
263
|
+
| 'card'
|
|
264
|
+
| 'check'
|
|
265
|
+
| 'eft'
|
|
266
|
+
| 'cross_border'
|
|
267
|
+
| 'interac'
|
|
268
|
+
| 'masav'
|
|
269
|
+
| 'neft'
|
|
270
|
+
| 'provxchange'
|
|
271
|
+
| 'rtp'
|
|
272
|
+
| 'sen'
|
|
273
|
+
| 'sepa'
|
|
274
|
+
| 'signet'
|
|
275
|
+
| 'wire';
|
|
276
|
+
|
|
277
|
+
/**
|
|
278
|
+
* The receiving account ID. Can be an `external_account`.
|
|
279
|
+
*/
|
|
280
|
+
receiving_account_id?: string;
|
|
236
281
|
}
|
|
237
282
|
|
|
238
283
|
export namespace LineItemUpdateParams {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless.
|
|
2
2
|
|
|
3
|
-
import * as Core from '
|
|
4
|
-
import { APIResource } from '
|
|
5
|
-
import { isRequestOptions } from '
|
|
6
|
-
import * as API from './';
|
|
7
|
-
import { Page, PageParams } from '
|
|
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';
|
|
8
8
|
|
|
9
9
|
export class LedgerAccountCategories extends APIResource {
|
|
10
10
|
/**
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless.
|
|
2
2
|
|
|
3
|
-
import * as Core from '
|
|
4
|
-
import { APIResource } from '
|
|
5
|
-
import { isRequestOptions } from '
|
|
6
|
-
import * as API from './';
|
|
7
|
-
import { Page, PageParams } from '
|
|
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';
|
|
8
8
|
|
|
9
9
|
export class LedgerAccountPayouts extends APIResource {
|
|
10
10
|
/**
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless.
|
|
2
2
|
|
|
3
|
-
import * as Core from '
|
|
4
|
-
import { APIResource } from '
|
|
5
|
-
import * as API from './';
|
|
3
|
+
import * as Core from '../core';
|
|
4
|
+
import { APIResource } from '../resource';
|
|
5
|
+
import * as API from './index';
|
|
6
6
|
|
|
7
7
|
export class LedgerAccountStatements extends APIResource {
|
|
8
8
|
/**
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless.
|
|
2
2
|
|
|
3
|
-
import * as Core from '
|
|
4
|
-
import { APIResource } from '
|
|
5
|
-
import { isRequestOptions } from '
|
|
6
|
-
import * as API from './';
|
|
7
|
-
import { Page, PageParams } from '
|
|
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';
|
|
8
8
|
|
|
9
9
|
export class LedgerAccounts extends APIResource {
|
|
10
10
|
/**
|
|
@@ -328,24 +328,30 @@ export interface LedgerAccountCreateParams {
|
|
|
328
328
|
|
|
329
329
|
export interface LedgerAccountRetrieveParams {
|
|
330
330
|
/**
|
|
331
|
-
* Use balances[effective_at_lower_bound] and
|
|
332
|
-
* get the balances change between the two
|
|
333
|
-
*
|
|
334
|
-
* supplied the balances will be retrieved
|
|
331
|
+
* Use `balances[effective_at_lower_bound]` and
|
|
332
|
+
* `balances[effective_at_upper_bound]` to get the balances change between the two
|
|
333
|
+
* timestamps. The lower bound is inclusive while the upper bound is exclusive of
|
|
334
|
+
* the provided timestamps. If no value is supplied the balances will be retrieved
|
|
335
|
+
* not including that bound. Use `balances[as_of_lock_version]` to retrieve a
|
|
336
|
+
* balance as of a specific Ledger Account `lock_version`.
|
|
335
337
|
*/
|
|
336
338
|
balances?: LedgerAccountRetrieveParams.Balances;
|
|
337
339
|
}
|
|
338
340
|
|
|
339
341
|
export namespace LedgerAccountRetrieveParams {
|
|
340
342
|
/**
|
|
341
|
-
* Use balances[effective_at_lower_bound] and
|
|
342
|
-
* get the balances change between the two
|
|
343
|
-
*
|
|
344
|
-
* supplied the balances will be retrieved
|
|
343
|
+
* Use `balances[effective_at_lower_bound]` and
|
|
344
|
+
* `balances[effective_at_upper_bound]` to get the balances change between the two
|
|
345
|
+
* timestamps. The lower bound is inclusive while the upper bound is exclusive of
|
|
346
|
+
* the provided timestamps. If no value is supplied the balances will be retrieved
|
|
347
|
+
* not including that bound. Use `balances[as_of_lock_version]` to retrieve a
|
|
348
|
+
* balance as of a specific Ledger Account `lock_version`.
|
|
345
349
|
*/
|
|
346
350
|
export interface Balances {
|
|
347
351
|
as_of_date?: string;
|
|
348
352
|
|
|
353
|
+
as_of_lock_version?: number;
|
|
354
|
+
|
|
349
355
|
effective_at?: string;
|
|
350
356
|
|
|
351
357
|
effective_at_lower_bound?: string;
|
|
@@ -376,10 +382,11 @@ export interface LedgerAccountListParams extends PageParams {
|
|
|
376
382
|
id?: string;
|
|
377
383
|
|
|
378
384
|
/**
|
|
379
|
-
* Use balances[effective_at_lower_bound] and
|
|
380
|
-
* get the balances change between the two
|
|
381
|
-
*
|
|
382
|
-
* supplied the balances will be retrieved
|
|
385
|
+
* Use `balances[effective_at_lower_bound]` and
|
|
386
|
+
* `balances[effective_at_upper_bound]` to get the balances change between the two
|
|
387
|
+
* timestamps. The lower bound is inclusive while the upper bound is exclusive of
|
|
388
|
+
* the provided timestamps. If no value is supplied the balances will be retrieved
|
|
389
|
+
* not including that bound.
|
|
383
390
|
*/
|
|
384
391
|
balances?: LedgerAccountListParams.Balances;
|
|
385
392
|
|
|
@@ -413,10 +420,11 @@ export interface LedgerAccountListParams extends PageParams {
|
|
|
413
420
|
|
|
414
421
|
export namespace LedgerAccountListParams {
|
|
415
422
|
/**
|
|
416
|
-
* Use balances[effective_at_lower_bound] and
|
|
417
|
-
* get the balances change between the two
|
|
418
|
-
*
|
|
419
|
-
* supplied the balances will be retrieved
|
|
423
|
+
* Use `balances[effective_at_lower_bound]` and
|
|
424
|
+
* `balances[effective_at_upper_bound]` to get the balances change between the two
|
|
425
|
+
* timestamps. The lower bound is inclusive while the upper bound is exclusive of
|
|
426
|
+
* the provided timestamps. If no value is supplied the balances will be retrieved
|
|
427
|
+
* not including that bound.
|
|
420
428
|
*/
|
|
421
429
|
export interface Balances {
|
|
422
430
|
as_of_date?: string;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless.
|
|
2
2
|
|
|
3
|
-
import * as Core from '
|
|
4
|
-
import { APIResource } from '
|
|
5
|
-
import { isRequestOptions } from '
|
|
6
|
-
import * as API from './';
|
|
7
|
-
import { Page, PageParams } from '
|
|
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';
|
|
8
8
|
|
|
9
9
|
export class LedgerEntries extends APIResource {
|
|
10
10
|
/**
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless.
|
|
2
2
|
|
|
3
|
-
import * as Core from '
|
|
4
|
-
import { APIResource } from '
|
|
5
|
-
import { isRequestOptions } from '
|
|
6
|
-
import * as API from './';
|
|
7
|
-
import { Page, PageParams } from '
|
|
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';
|
|
8
8
|
|
|
9
9
|
export class LedgerEventHandlers extends APIResource {
|
|
10
10
|
/**
|
|
@@ -497,6 +497,11 @@ export interface LedgerEventHandlerCreateParams {
|
|
|
497
497
|
*/
|
|
498
498
|
description?: string | null;
|
|
499
499
|
|
|
500
|
+
/**
|
|
501
|
+
* Body param: The id of the ledger that this account belongs to.
|
|
502
|
+
*/
|
|
503
|
+
ledger_id?: string;
|
|
504
|
+
|
|
500
505
|
/**
|
|
501
506
|
* Body param: Additional data represented as key-value pairs. Both the key and
|
|
502
507
|
* value must be strings.
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless.
|
|
2
2
|
|
|
3
|
-
import * as Core from '
|
|
4
|
-
import { APIResource } from '
|
|
5
|
-
import { isRequestOptions } from '
|
|
6
|
-
import * as LedgerEntries from '
|
|
3
|
+
import * as Core from '../../core';
|
|
4
|
+
import { APIResource } from '../../resource';
|
|
5
|
+
import { isRequestOptions } from '../../core';
|
|
6
|
+
import * as LedgerEntries from '../ledger-entries';
|
|
7
7
|
import { Versions } from './versions';
|
|
8
|
-
import * as API from './';
|
|
9
|
-
import { Page, PageParams } from '
|
|
8
|
+
import * as API from './index';
|
|
9
|
+
import { Page, PageParams } from '../../pagination';
|
|
10
10
|
|
|
11
11
|
export class LedgerTransactions extends APIResource {
|
|
12
12
|
versions: Versions = new Versions(this.client);
|
|
@@ -196,10 +196,10 @@ export interface LedgerTransaction {
|
|
|
196
196
|
|
|
197
197
|
export interface LedgerTransactionCreateParams {
|
|
198
198
|
/**
|
|
199
|
-
* Body param: The
|
|
200
|
-
* reporting purposes.
|
|
199
|
+
* Body param: The timestamp (ISO8601 format) at which the ledger transaction
|
|
200
|
+
* happened for reporting purposes.
|
|
201
201
|
*/
|
|
202
|
-
|
|
202
|
+
effective_at: string;
|
|
203
203
|
|
|
204
204
|
/**
|
|
205
205
|
* Body param: An array of ledger entry objects.
|
|
@@ -211,6 +211,12 @@ export interface LedgerTransactionCreateParams {
|
|
|
211
211
|
*/
|
|
212
212
|
description?: string | null;
|
|
213
213
|
|
|
214
|
+
/**
|
|
215
|
+
* Body param: The date (YYYY-MM-DD) on which the ledger transaction happened for
|
|
216
|
+
* reporting purposes.
|
|
217
|
+
*/
|
|
218
|
+
effective_date?: string;
|
|
219
|
+
|
|
214
220
|
/**
|
|
215
221
|
* Body param: A unique string to represent the ledger transaction. Only one
|
|
216
222
|
* pending or posted ledger transaction may have this ID in the ledger.
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless.
|
|
2
2
|
|
|
3
|
-
import * as Core from '
|
|
4
|
-
import { APIResource } from '
|
|
5
|
-
import { isRequestOptions } from '
|
|
6
|
-
import * as API from './';
|
|
7
|
-
import { Page, PageParams } from '
|
|
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';
|
|
8
8
|
|
|
9
9
|
export class Versions extends APIResource {
|
|
10
10
|
/**
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless.
|
|
2
2
|
|
|
3
|
-
import * as Core from '
|
|
4
|
-
import { APIResource } from '
|
|
5
|
-
import * as API from './';
|
|
3
|
+
import * as Core from '../core';
|
|
4
|
+
import { APIResource } from '../resource';
|
|
5
|
+
import * as API from './index';
|
|
6
6
|
|
|
7
7
|
export class LedgerableEvents extends APIResource {
|
|
8
8
|
/**
|
|
@@ -90,16 +90,6 @@ export interface LedgerableEvent {
|
|
|
90
90
|
|
|
91
91
|
object: string;
|
|
92
92
|
|
|
93
|
-
/**
|
|
94
|
-
* The ledger account that initiates the money movement.
|
|
95
|
-
*/
|
|
96
|
-
originating_ledger_account_id: string | null;
|
|
97
|
-
|
|
98
|
-
/**
|
|
99
|
-
* The ledger account that receives the money movement.
|
|
100
|
-
*/
|
|
101
|
-
receiving_ledger_account_id: string | null;
|
|
102
|
-
|
|
103
93
|
updated_at: string;
|
|
104
94
|
}
|
|
105
95
|
|
|
@@ -147,16 +137,6 @@ export interface LedgerableEventCreateParams {
|
|
|
147
137
|
*/
|
|
148
138
|
metadata?: Record<string, string>;
|
|
149
139
|
|
|
150
|
-
/**
|
|
151
|
-
* Body param: The ledger account that initiates the money movement.
|
|
152
|
-
*/
|
|
153
|
-
originating_ledger_account_id?: string | null;
|
|
154
|
-
|
|
155
|
-
/**
|
|
156
|
-
* Body param: The ledger account that receives the money movement.
|
|
157
|
-
*/
|
|
158
|
-
receiving_ledger_account_id?: string | null;
|
|
159
|
-
|
|
160
140
|
/**
|
|
161
141
|
* Header param: This key should be something unique, preferably something like an
|
|
162
142
|
* UUID.
|
package/src/resources/ledgers.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless.
|
|
2
2
|
|
|
3
|
-
import * as Core from '
|
|
4
|
-
import { APIResource } from '
|
|
5
|
-
import { isRequestOptions } from '
|
|
6
|
-
import * as API from './';
|
|
7
|
-
import { Page, PageParams } from '
|
|
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';
|
|
8
8
|
|
|
9
9
|
export class Ledgers extends APIResource {
|
|
10
10
|
/**
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless.
|
|
2
2
|
|
|
3
|
-
import * as Core from '
|
|
4
|
-
import { APIResource } from '
|
|
5
|
-
import { isRequestOptions } from '
|
|
6
|
-
import * as API from './';
|
|
7
|
-
import { Page, PageParams } from '
|
|
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';
|
|
8
8
|
|
|
9
9
|
export class LineItems extends APIResource {
|
|
10
10
|
/**
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless.
|
|
2
2
|
|
|
3
|
-
import * as Core from '
|
|
4
|
-
import { APIResource } from '
|
|
5
|
-
import { isRequestOptions } from '
|
|
6
|
-
import * as Shared from '
|
|
7
|
-
import * as API from './';
|
|
8
|
-
import { Page, PageParams } from '
|
|
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';
|
|
9
9
|
|
|
10
10
|
export class PaperItems extends APIResource {
|
|
11
11
|
/**
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless.
|
|
2
2
|
|
|
3
|
-
import * as Core from '
|
|
4
|
-
import { APIResource } from '
|
|
5
|
-
import { isRequestOptions } from '
|
|
6
|
-
import * as API from './';
|
|
7
|
-
import { Page, PageParams } from '
|
|
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';
|
|
8
8
|
|
|
9
9
|
export class PaymentFlows extends APIResource {
|
|
10
10
|
/**
|