orb-billing 4.74.0 → 5.1.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 +62 -0
- package/core.d.ts +7 -4
- package/core.d.ts.map +1 -1
- package/core.js +16 -9
- package/core.js.map +1 -1
- package/core.mjs +16 -9
- package/core.mjs.map +1 -1
- package/index.d.mts +151 -14
- package/index.d.ts +151 -14
- package/index.d.ts.map +1 -1
- package/index.js +6 -5
- package/index.js.map +1 -1
- package/index.mjs +9 -8
- package/index.mjs.map +1 -1
- package/package.json +1 -1
- package/resource.d.ts +1 -1
- package/resource.d.ts.map +1 -1
- package/resource.js.map +1 -1
- package/resource.mjs.map +1 -1
- package/resources/alerts.d.ts +20 -88
- package/resources/alerts.d.ts.map +1 -1
- package/resources/alerts.js.map +1 -1
- package/resources/alerts.mjs.map +1 -1
- package/resources/beta/beta.d.ts +9 -7313
- package/resources/beta/beta.d.ts.map +1 -1
- package/resources/beta/beta.js.map +1 -1
- package/resources/beta/beta.mjs.map +1 -1
- package/resources/beta/external-plan-id.d.ts +7 -7074
- package/resources/beta/external-plan-id.d.ts.map +1 -1
- package/resources/beta/external-plan-id.js.map +1 -1
- package/resources/beta/external-plan-id.mjs.map +1 -1
- package/resources/credit-notes.d.ts +64 -164
- package/resources/credit-notes.d.ts.map +1 -1
- package/resources/credit-notes.js +28 -6
- package/resources/credit-notes.js.map +1 -1
- package/resources/credit-notes.mjs +27 -4
- package/resources/credit-notes.mjs.map +1 -1
- package/resources/customers/balance-transactions.d.ts +5 -32
- package/resources/customers/balance-transactions.d.ts.map +1 -1
- package/resources/customers/balance-transactions.js.map +1 -1
- package/resources/customers/balance-transactions.mjs.map +1 -1
- package/resources/customers/costs.d.ts +19 -97
- package/resources/customers/costs.d.ts.map +1 -1
- package/resources/customers/credits/credits.d.ts +4 -4
- package/resources/customers/credits/credits.d.ts.map +1 -1
- package/resources/customers/credits/credits.js.map +1 -1
- package/resources/customers/credits/credits.mjs.map +1 -1
- package/resources/customers/credits/index.d.ts +2 -2
- package/resources/customers/credits/index.d.ts.map +1 -1
- package/resources/customers/credits/index.js.map +1 -1
- package/resources/customers/credits/index.mjs.map +1 -1
- package/resources/customers/credits/ledger.d.ts +239 -984
- package/resources/customers/credits/ledger.d.ts.map +1 -1
- package/resources/customers/credits/ledger.js.map +1 -1
- package/resources/customers/credits/ledger.mjs.map +1 -1
- package/resources/customers/credits/top-ups.d.ts +29 -121
- package/resources/customers/credits/top-ups.d.ts.map +1 -1
- package/resources/customers/credits/top-ups.js.map +1 -1
- package/resources/customers/credits/top-ups.mjs.map +1 -1
- package/resources/customers/customers.d.ts +84 -682
- package/resources/customers/customers.d.ts.map +1 -1
- package/resources/customers/customers.js.map +1 -1
- package/resources/customers/customers.mjs.map +1 -1
- package/resources/customers/index.d.ts +1 -1
- package/resources/customers/index.d.ts.map +1 -1
- package/resources/customers/index.js.map +1 -1
- package/resources/customers/index.mjs.map +1 -1
- package/resources/dimensional-price-groups/dimensional-price-groups.d.ts +6 -2
- package/resources/dimensional-price-groups/dimensional-price-groups.d.ts.map +1 -1
- package/resources/events/backfills.d.ts +2 -2
- package/resources/events/events.d.ts +9 -3
- package/resources/events/events.d.ts.map +1 -1
- package/resources/index.d.ts +7 -7
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +1 -4
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +3 -3
- package/resources/index.mjs.map +1 -1
- package/resources/invoice-line-items.d.ts +9 -395
- package/resources/invoice-line-items.d.ts.map +1 -1
- package/resources/invoice-line-items.js.map +1 -1
- package/resources/invoice-line-items.mjs.map +1 -1
- package/resources/invoices.d.ts +43 -1704
- package/resources/invoices.d.ts.map +1 -1
- package/resources/invoices.js +4 -7
- package/resources/invoices.js.map +1 -1
- package/resources/invoices.mjs +3 -5
- package/resources/invoices.mjs.map +1 -1
- package/resources/items.d.ts +9 -3
- package/resources/items.d.ts.map +1 -1
- package/resources/metrics.d.ts +9 -3
- package/resources/metrics.d.ts.map +1 -1
- package/resources/plans/external-plan-id.d.ts +3 -1
- package/resources/plans/external-plan-id.d.ts.map +1 -1
- package/resources/plans/plans.d.ts +47 -3783
- package/resources/plans/plans.d.ts.map +1 -1
- package/resources/plans/plans.js.map +1 -1
- package/resources/plans/plans.mjs.map +1 -1
- package/resources/prices/external-price-id.d.ts +6 -4
- package/resources/prices/external-price-id.d.ts.map +1 -1
- package/resources/prices/index.d.ts +1 -1
- package/resources/prices/index.d.ts.map +1 -1
- package/resources/prices/index.js +1 -2
- package/resources/prices/index.js.map +1 -1
- package/resources/prices/index.mjs +1 -1
- package/resources/prices/index.mjs.map +1 -1
- package/resources/prices/prices.d.ts +505 -9417
- package/resources/prices/prices.d.ts.map +1 -1
- package/resources/prices/prices.js +39 -20
- package/resources/prices/prices.js.map +1 -1
- package/resources/prices/prices.mjs +38 -18
- package/resources/prices/prices.mjs.map +1 -1
- package/resources/shared.d.ts +7894 -9
- package/resources/shared.d.ts.map +1 -1
- package/resources/shared.js +11 -0
- package/resources/shared.js.map +1 -1
- package/resources/shared.mjs +7 -1
- package/resources/shared.mjs.map +1 -1
- package/resources/subscription-changes.d.ts +140 -2158
- package/resources/subscription-changes.d.ts.map +1 -1
- package/resources/subscription-changes.js.map +1 -1
- package/resources/subscription-changes.mjs.map +1 -1
- package/resources/subscriptions.d.ts +2646 -27141
- package/resources/subscriptions.d.ts.map +1 -1
- package/resources/subscriptions.js +2 -2
- package/resources/subscriptions.js.map +1 -1
- package/resources/subscriptions.mjs +2 -2
- package/resources/subscriptions.mjs.map +1 -1
- package/src/core.ts +17 -8
- package/src/index.ts +229 -42
- package/src/resource.ts +1 -1
- package/src/resources/alerts.ts +20 -94
- package/src/resources/beta/beta.ts +124 -8892
- package/src/resources/beta/external-plan-id.ts +118 -8593
- package/src/resources/credit-notes.ts +67 -216
- package/src/resources/customers/balance-transactions.ts +5 -36
- package/src/resources/customers/costs.ts +19 -117
- package/src/resources/customers/credits/credits.ts +18 -0
- package/src/resources/customers/credits/index.ts +9 -0
- package/src/resources/customers/credits/ledger.ts +259 -1468
- package/src/resources/customers/credits/top-ups.ts +33 -136
- package/src/resources/customers/customers.ts +165 -1457
- package/src/resources/customers/index.ts +8 -0
- package/src/resources/dimensional-price-groups/dimensional-price-groups.ts +2 -2
- package/src/resources/events/backfills.ts +2 -2
- package/src/resources/events/events.ts +3 -3
- package/src/resources/index.ts +42 -22
- package/src/resources/invoice-line-items.ts +13 -501
- package/src/resources/invoices.ts +65 -2396
- package/src/resources/items.ts +3 -3
- package/src/resources/metrics.ts +3 -3
- package/src/resources/plans/external-plan-id.ts +1 -1
- package/src/resources/plans/plans.ts +81 -4563
- package/src/resources/prices/external-price-id.ts +4 -4
- package/src/resources/prices/index.ts +2 -2
- package/src/resources/prices/prices.ts +561 -11851
- package/src/resources/shared.ts +9991 -22
- package/src/resources/subscription-changes.ts +171 -2670
- package/src/resources/subscriptions.ts +3246 -32984
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.d.ts.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { APIResource } from "../../../resource.js";
|
|
2
2
|
import * as Core from "../../../core.js";
|
|
3
|
-
import * as
|
|
3
|
+
import * as Shared from "../../shared.js";
|
|
4
4
|
import { Page, type PageParams } from "../../../pagination.js";
|
|
5
5
|
export declare class Ledger extends APIResource {
|
|
6
6
|
/**
|
|
@@ -42,8 +42,8 @@ export declare class Ledger extends APIResource {
|
|
|
42
42
|
* deductions take place from a non-expiring credit block.
|
|
43
43
|
*
|
|
44
44
|
* If there are multiple blocks with the same expiration date, Orb will deduct from
|
|
45
|
-
* the block with the _lower cost basis_ first (e.g. trial credits with a
|
|
46
|
-
* basis before paid credits with a
|
|
45
|
+
* the block with the _lower cost basis_ first (e.g. trial credits with a \$0 cost
|
|
46
|
+
* basis before paid credits with a \$5.00 cost basis).
|
|
47
47
|
*
|
|
48
48
|
* It's also possible for a single usage event's deduction to _span_ credit blocks.
|
|
49
49
|
* In this case, Orb will deduct from the next block, ending at the credit block
|
|
@@ -353,8 +353,8 @@ export declare class Ledger extends APIResource {
|
|
|
353
353
|
* deductions take place from a non-expiring credit block.
|
|
354
354
|
*
|
|
355
355
|
* If there are multiple blocks with the same expiration date, Orb will deduct from
|
|
356
|
-
* the block with the _lower cost basis_ first (e.g. trial credits with a
|
|
357
|
-
* basis before paid credits with a
|
|
356
|
+
* the block with the _lower cost basis_ first (e.g. trial credits with a \$0 cost
|
|
357
|
+
* basis before paid credits with a \$5.00 cost basis).
|
|
358
358
|
*
|
|
359
359
|
* It's also possible for a single usage event's deduction to _span_ credit blocks.
|
|
360
360
|
* In this case, Orb will deduct from the next block, ending at the credit block
|
|
@@ -404,982 +404,205 @@ export declare class LedgerListResponsesPage extends Page<LedgerListResponse> {
|
|
|
404
404
|
}
|
|
405
405
|
export declare class LedgerListByExternalIDResponsesPage extends Page<LedgerListByExternalIDResponse> {
|
|
406
406
|
}
|
|
407
|
+
export interface AffectedBlock {
|
|
408
|
+
id: string;
|
|
409
|
+
expiry_date: string | null;
|
|
410
|
+
per_unit_cost_basis: string | null;
|
|
411
|
+
}
|
|
412
|
+
export interface AmendmentLedgerEntry {
|
|
413
|
+
id: string;
|
|
414
|
+
amount: number;
|
|
415
|
+
created_at: string;
|
|
416
|
+
credit_block: AffectedBlock;
|
|
417
|
+
currency: string;
|
|
418
|
+
customer: Shared.CustomerMinified;
|
|
419
|
+
description: string | null;
|
|
420
|
+
ending_balance: number;
|
|
421
|
+
entry_status: 'committed' | 'pending';
|
|
422
|
+
entry_type: 'amendment';
|
|
423
|
+
ledger_sequence_number: number;
|
|
424
|
+
/**
|
|
425
|
+
* User specified key-value pairs for the resource. If not present, this defaults
|
|
426
|
+
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
427
|
+
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
428
|
+
* `null`.
|
|
429
|
+
*/
|
|
430
|
+
metadata: {
|
|
431
|
+
[key: string]: string;
|
|
432
|
+
};
|
|
433
|
+
starting_balance: number;
|
|
434
|
+
}
|
|
435
|
+
export interface CreditBlockExpiryLedgerEntry {
|
|
436
|
+
id: string;
|
|
437
|
+
amount: number;
|
|
438
|
+
created_at: string;
|
|
439
|
+
credit_block: AffectedBlock;
|
|
440
|
+
currency: string;
|
|
441
|
+
customer: Shared.CustomerMinified;
|
|
442
|
+
description: string | null;
|
|
443
|
+
ending_balance: number;
|
|
444
|
+
entry_status: 'committed' | 'pending';
|
|
445
|
+
entry_type: 'credit_block_expiry';
|
|
446
|
+
ledger_sequence_number: number;
|
|
447
|
+
/**
|
|
448
|
+
* User specified key-value pairs for the resource. If not present, this defaults
|
|
449
|
+
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
450
|
+
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
451
|
+
* `null`.
|
|
452
|
+
*/
|
|
453
|
+
metadata: {
|
|
454
|
+
[key: string]: string;
|
|
455
|
+
};
|
|
456
|
+
starting_balance: number;
|
|
457
|
+
}
|
|
458
|
+
export interface DecrementLedgerEntry {
|
|
459
|
+
id: string;
|
|
460
|
+
amount: number;
|
|
461
|
+
created_at: string;
|
|
462
|
+
credit_block: AffectedBlock;
|
|
463
|
+
currency: string;
|
|
464
|
+
customer: Shared.CustomerMinified;
|
|
465
|
+
description: string | null;
|
|
466
|
+
ending_balance: number;
|
|
467
|
+
entry_status: 'committed' | 'pending';
|
|
468
|
+
entry_type: 'decrement';
|
|
469
|
+
ledger_sequence_number: number;
|
|
470
|
+
/**
|
|
471
|
+
* User specified key-value pairs for the resource. If not present, this defaults
|
|
472
|
+
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
473
|
+
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
474
|
+
* `null`.
|
|
475
|
+
*/
|
|
476
|
+
metadata: {
|
|
477
|
+
[key: string]: string;
|
|
478
|
+
};
|
|
479
|
+
starting_balance: number;
|
|
480
|
+
event_id?: string | null;
|
|
481
|
+
invoice_id?: string | null;
|
|
482
|
+
price_id?: string | null;
|
|
483
|
+
}
|
|
484
|
+
export interface ExpirationChangeLedgerEntry {
|
|
485
|
+
id: string;
|
|
486
|
+
amount: number;
|
|
487
|
+
created_at: string;
|
|
488
|
+
credit_block: AffectedBlock;
|
|
489
|
+
currency: string;
|
|
490
|
+
customer: Shared.CustomerMinified;
|
|
491
|
+
description: string | null;
|
|
492
|
+
ending_balance: number;
|
|
493
|
+
entry_status: 'committed' | 'pending';
|
|
494
|
+
entry_type: 'expiration_change';
|
|
495
|
+
ledger_sequence_number: number;
|
|
496
|
+
/**
|
|
497
|
+
* User specified key-value pairs for the resource. If not present, this defaults
|
|
498
|
+
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
499
|
+
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
500
|
+
* `null`.
|
|
501
|
+
*/
|
|
502
|
+
metadata: {
|
|
503
|
+
[key: string]: string;
|
|
504
|
+
};
|
|
505
|
+
new_block_expiry_date: string | null;
|
|
506
|
+
starting_balance: number;
|
|
507
|
+
}
|
|
508
|
+
export interface IncrementLedgerEntry {
|
|
509
|
+
id: string;
|
|
510
|
+
amount: number;
|
|
511
|
+
created_at: string;
|
|
512
|
+
credit_block: AffectedBlock;
|
|
513
|
+
currency: string;
|
|
514
|
+
customer: Shared.CustomerMinified;
|
|
515
|
+
description: string | null;
|
|
516
|
+
ending_balance: number;
|
|
517
|
+
entry_status: 'committed' | 'pending';
|
|
518
|
+
entry_type: 'increment';
|
|
519
|
+
ledger_sequence_number: number;
|
|
520
|
+
/**
|
|
521
|
+
* User specified key-value pairs for the resource. If not present, this defaults
|
|
522
|
+
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
523
|
+
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
524
|
+
* `null`.
|
|
525
|
+
*/
|
|
526
|
+
metadata: {
|
|
527
|
+
[key: string]: string;
|
|
528
|
+
};
|
|
529
|
+
starting_balance: number;
|
|
530
|
+
/**
|
|
531
|
+
* If the increment resulted in invoice creation, the list of created invoices
|
|
532
|
+
*/
|
|
533
|
+
created_invoices?: Array<Shared.Invoice> | null;
|
|
534
|
+
}
|
|
535
|
+
export interface VoidInitiatedLedgerEntry {
|
|
536
|
+
id: string;
|
|
537
|
+
amount: number;
|
|
538
|
+
created_at: string;
|
|
539
|
+
credit_block: AffectedBlock;
|
|
540
|
+
currency: string;
|
|
541
|
+
customer: Shared.CustomerMinified;
|
|
542
|
+
description: string | null;
|
|
543
|
+
ending_balance: number;
|
|
544
|
+
entry_status: 'committed' | 'pending';
|
|
545
|
+
entry_type: 'void_initiated';
|
|
546
|
+
ledger_sequence_number: number;
|
|
547
|
+
/**
|
|
548
|
+
* User specified key-value pairs for the resource. If not present, this defaults
|
|
549
|
+
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
550
|
+
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
551
|
+
* `null`.
|
|
552
|
+
*/
|
|
553
|
+
metadata: {
|
|
554
|
+
[key: string]: string;
|
|
555
|
+
};
|
|
556
|
+
new_block_expiry_date: string;
|
|
557
|
+
starting_balance: number;
|
|
558
|
+
void_amount: number;
|
|
559
|
+
void_reason: string | null;
|
|
560
|
+
}
|
|
561
|
+
export interface VoidLedgerEntry {
|
|
562
|
+
id: string;
|
|
563
|
+
amount: number;
|
|
564
|
+
created_at: string;
|
|
565
|
+
credit_block: AffectedBlock;
|
|
566
|
+
currency: string;
|
|
567
|
+
customer: Shared.CustomerMinified;
|
|
568
|
+
description: string | null;
|
|
569
|
+
ending_balance: number;
|
|
570
|
+
entry_status: 'committed' | 'pending';
|
|
571
|
+
entry_type: 'void';
|
|
572
|
+
ledger_sequence_number: number;
|
|
573
|
+
/**
|
|
574
|
+
* User specified key-value pairs for the resource. If not present, this defaults
|
|
575
|
+
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
576
|
+
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
577
|
+
* `null`.
|
|
578
|
+
*/
|
|
579
|
+
metadata: {
|
|
580
|
+
[key: string]: string;
|
|
581
|
+
};
|
|
582
|
+
starting_balance: number;
|
|
583
|
+
void_amount: number;
|
|
584
|
+
void_reason: string | null;
|
|
585
|
+
}
|
|
407
586
|
/**
|
|
408
587
|
* The [Credit Ledger Entry resource](/product-catalog/prepurchase) models prepaid
|
|
409
588
|
* credits within Orb.
|
|
410
589
|
*/
|
|
411
|
-
export type LedgerListResponse =
|
|
412
|
-
export declare namespace LedgerListResponse {
|
|
413
|
-
interface IncrementLedgerEntry {
|
|
414
|
-
id: string;
|
|
415
|
-
amount: number;
|
|
416
|
-
created_at: string;
|
|
417
|
-
credit_block: IncrementLedgerEntry.CreditBlock;
|
|
418
|
-
currency: string;
|
|
419
|
-
customer: IncrementLedgerEntry.Customer;
|
|
420
|
-
description: string | null;
|
|
421
|
-
ending_balance: number;
|
|
422
|
-
entry_status: 'committed' | 'pending';
|
|
423
|
-
entry_type: 'increment';
|
|
424
|
-
ledger_sequence_number: number;
|
|
425
|
-
/**
|
|
426
|
-
* User specified key-value pairs for the resource. If not present, this defaults
|
|
427
|
-
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
428
|
-
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
429
|
-
* `null`.
|
|
430
|
-
*/
|
|
431
|
-
metadata: Record<string, string>;
|
|
432
|
-
starting_balance: number;
|
|
433
|
-
/**
|
|
434
|
-
* If the increment resulted in invoice creation, the list of created invoices
|
|
435
|
-
*/
|
|
436
|
-
created_invoices?: Array<InvoicesAPI.Invoice> | null;
|
|
437
|
-
}
|
|
438
|
-
namespace IncrementLedgerEntry {
|
|
439
|
-
interface CreditBlock {
|
|
440
|
-
id: string;
|
|
441
|
-
expiry_date: string | null;
|
|
442
|
-
per_unit_cost_basis: string | null;
|
|
443
|
-
}
|
|
444
|
-
interface Customer {
|
|
445
|
-
id: string;
|
|
446
|
-
external_customer_id: string | null;
|
|
447
|
-
}
|
|
448
|
-
}
|
|
449
|
-
interface DecrementLedgerEntry {
|
|
450
|
-
id: string;
|
|
451
|
-
amount: number;
|
|
452
|
-
created_at: string;
|
|
453
|
-
credit_block: DecrementLedgerEntry.CreditBlock;
|
|
454
|
-
currency: string;
|
|
455
|
-
customer: DecrementLedgerEntry.Customer;
|
|
456
|
-
description: string | null;
|
|
457
|
-
ending_balance: number;
|
|
458
|
-
entry_status: 'committed' | 'pending';
|
|
459
|
-
entry_type: 'decrement';
|
|
460
|
-
ledger_sequence_number: number;
|
|
461
|
-
/**
|
|
462
|
-
* User specified key-value pairs for the resource. If not present, this defaults
|
|
463
|
-
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
464
|
-
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
465
|
-
* `null`.
|
|
466
|
-
*/
|
|
467
|
-
metadata: Record<string, string>;
|
|
468
|
-
starting_balance: number;
|
|
469
|
-
event_id?: string | null;
|
|
470
|
-
invoice_id?: string | null;
|
|
471
|
-
price_id?: string | null;
|
|
472
|
-
}
|
|
473
|
-
namespace DecrementLedgerEntry {
|
|
474
|
-
interface CreditBlock {
|
|
475
|
-
id: string;
|
|
476
|
-
expiry_date: string | null;
|
|
477
|
-
per_unit_cost_basis: string | null;
|
|
478
|
-
}
|
|
479
|
-
interface Customer {
|
|
480
|
-
id: string;
|
|
481
|
-
external_customer_id: string | null;
|
|
482
|
-
}
|
|
483
|
-
}
|
|
484
|
-
interface ExpirationChangeLedgerEntry {
|
|
485
|
-
id: string;
|
|
486
|
-
amount: number;
|
|
487
|
-
created_at: string;
|
|
488
|
-
credit_block: ExpirationChangeLedgerEntry.CreditBlock;
|
|
489
|
-
currency: string;
|
|
490
|
-
customer: ExpirationChangeLedgerEntry.Customer;
|
|
491
|
-
description: string | null;
|
|
492
|
-
ending_balance: number;
|
|
493
|
-
entry_status: 'committed' | 'pending';
|
|
494
|
-
entry_type: 'expiration_change';
|
|
495
|
-
ledger_sequence_number: number;
|
|
496
|
-
/**
|
|
497
|
-
* User specified key-value pairs for the resource. If not present, this defaults
|
|
498
|
-
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
499
|
-
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
500
|
-
* `null`.
|
|
501
|
-
*/
|
|
502
|
-
metadata: Record<string, string>;
|
|
503
|
-
new_block_expiry_date: string | null;
|
|
504
|
-
starting_balance: number;
|
|
505
|
-
}
|
|
506
|
-
namespace ExpirationChangeLedgerEntry {
|
|
507
|
-
interface CreditBlock {
|
|
508
|
-
id: string;
|
|
509
|
-
expiry_date: string | null;
|
|
510
|
-
per_unit_cost_basis: string | null;
|
|
511
|
-
}
|
|
512
|
-
interface Customer {
|
|
513
|
-
id: string;
|
|
514
|
-
external_customer_id: string | null;
|
|
515
|
-
}
|
|
516
|
-
}
|
|
517
|
-
interface CreditBlockExpiryLedgerEntry {
|
|
518
|
-
id: string;
|
|
519
|
-
amount: number;
|
|
520
|
-
created_at: string;
|
|
521
|
-
credit_block: CreditBlockExpiryLedgerEntry.CreditBlock;
|
|
522
|
-
currency: string;
|
|
523
|
-
customer: CreditBlockExpiryLedgerEntry.Customer;
|
|
524
|
-
description: string | null;
|
|
525
|
-
ending_balance: number;
|
|
526
|
-
entry_status: 'committed' | 'pending';
|
|
527
|
-
entry_type: 'credit_block_expiry';
|
|
528
|
-
ledger_sequence_number: number;
|
|
529
|
-
/**
|
|
530
|
-
* User specified key-value pairs for the resource. If not present, this defaults
|
|
531
|
-
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
532
|
-
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
533
|
-
* `null`.
|
|
534
|
-
*/
|
|
535
|
-
metadata: Record<string, string>;
|
|
536
|
-
starting_balance: number;
|
|
537
|
-
}
|
|
538
|
-
namespace CreditBlockExpiryLedgerEntry {
|
|
539
|
-
interface CreditBlock {
|
|
540
|
-
id: string;
|
|
541
|
-
expiry_date: string | null;
|
|
542
|
-
per_unit_cost_basis: string | null;
|
|
543
|
-
}
|
|
544
|
-
interface Customer {
|
|
545
|
-
id: string;
|
|
546
|
-
external_customer_id: string | null;
|
|
547
|
-
}
|
|
548
|
-
}
|
|
549
|
-
interface VoidLedgerEntry {
|
|
550
|
-
id: string;
|
|
551
|
-
amount: number;
|
|
552
|
-
created_at: string;
|
|
553
|
-
credit_block: VoidLedgerEntry.CreditBlock;
|
|
554
|
-
currency: string;
|
|
555
|
-
customer: VoidLedgerEntry.Customer;
|
|
556
|
-
description: string | null;
|
|
557
|
-
ending_balance: number;
|
|
558
|
-
entry_status: 'committed' | 'pending';
|
|
559
|
-
entry_type: 'void';
|
|
560
|
-
ledger_sequence_number: number;
|
|
561
|
-
/**
|
|
562
|
-
* User specified key-value pairs for the resource. If not present, this defaults
|
|
563
|
-
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
564
|
-
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
565
|
-
* `null`.
|
|
566
|
-
*/
|
|
567
|
-
metadata: Record<string, string>;
|
|
568
|
-
starting_balance: number;
|
|
569
|
-
void_amount: number;
|
|
570
|
-
void_reason: string | null;
|
|
571
|
-
}
|
|
572
|
-
namespace VoidLedgerEntry {
|
|
573
|
-
interface CreditBlock {
|
|
574
|
-
id: string;
|
|
575
|
-
expiry_date: string | null;
|
|
576
|
-
per_unit_cost_basis: string | null;
|
|
577
|
-
}
|
|
578
|
-
interface Customer {
|
|
579
|
-
id: string;
|
|
580
|
-
external_customer_id: string | null;
|
|
581
|
-
}
|
|
582
|
-
}
|
|
583
|
-
interface VoidInitiatedLedgerEntry {
|
|
584
|
-
id: string;
|
|
585
|
-
amount: number;
|
|
586
|
-
created_at: string;
|
|
587
|
-
credit_block: VoidInitiatedLedgerEntry.CreditBlock;
|
|
588
|
-
currency: string;
|
|
589
|
-
customer: VoidInitiatedLedgerEntry.Customer;
|
|
590
|
-
description: string | null;
|
|
591
|
-
ending_balance: number;
|
|
592
|
-
entry_status: 'committed' | 'pending';
|
|
593
|
-
entry_type: 'void_initiated';
|
|
594
|
-
ledger_sequence_number: number;
|
|
595
|
-
/**
|
|
596
|
-
* User specified key-value pairs for the resource. If not present, this defaults
|
|
597
|
-
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
598
|
-
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
599
|
-
* `null`.
|
|
600
|
-
*/
|
|
601
|
-
metadata: Record<string, string>;
|
|
602
|
-
new_block_expiry_date: string;
|
|
603
|
-
starting_balance: number;
|
|
604
|
-
void_amount: number;
|
|
605
|
-
void_reason: string | null;
|
|
606
|
-
}
|
|
607
|
-
namespace VoidInitiatedLedgerEntry {
|
|
608
|
-
interface CreditBlock {
|
|
609
|
-
id: string;
|
|
610
|
-
expiry_date: string | null;
|
|
611
|
-
per_unit_cost_basis: string | null;
|
|
612
|
-
}
|
|
613
|
-
interface Customer {
|
|
614
|
-
id: string;
|
|
615
|
-
external_customer_id: string | null;
|
|
616
|
-
}
|
|
617
|
-
}
|
|
618
|
-
interface AmendmentLedgerEntry {
|
|
619
|
-
id: string;
|
|
620
|
-
amount: number;
|
|
621
|
-
created_at: string;
|
|
622
|
-
credit_block: AmendmentLedgerEntry.CreditBlock;
|
|
623
|
-
currency: string;
|
|
624
|
-
customer: AmendmentLedgerEntry.Customer;
|
|
625
|
-
description: string | null;
|
|
626
|
-
ending_balance: number;
|
|
627
|
-
entry_status: 'committed' | 'pending';
|
|
628
|
-
entry_type: 'amendment';
|
|
629
|
-
ledger_sequence_number: number;
|
|
630
|
-
/**
|
|
631
|
-
* User specified key-value pairs for the resource. If not present, this defaults
|
|
632
|
-
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
633
|
-
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
634
|
-
* `null`.
|
|
635
|
-
*/
|
|
636
|
-
metadata: Record<string, string>;
|
|
637
|
-
starting_balance: number;
|
|
638
|
-
}
|
|
639
|
-
namespace AmendmentLedgerEntry {
|
|
640
|
-
interface CreditBlock {
|
|
641
|
-
id: string;
|
|
642
|
-
expiry_date: string | null;
|
|
643
|
-
per_unit_cost_basis: string | null;
|
|
644
|
-
}
|
|
645
|
-
interface Customer {
|
|
646
|
-
id: string;
|
|
647
|
-
external_customer_id: string | null;
|
|
648
|
-
}
|
|
649
|
-
}
|
|
650
|
-
}
|
|
590
|
+
export type LedgerListResponse = IncrementLedgerEntry | DecrementLedgerEntry | ExpirationChangeLedgerEntry | CreditBlockExpiryLedgerEntry | VoidLedgerEntry | VoidInitiatedLedgerEntry | AmendmentLedgerEntry;
|
|
651
591
|
/**
|
|
652
592
|
* The [Credit Ledger Entry resource](/product-catalog/prepurchase) models prepaid
|
|
653
593
|
* credits within Orb.
|
|
654
594
|
*/
|
|
655
|
-
export type LedgerCreateEntryResponse =
|
|
656
|
-
export declare namespace LedgerCreateEntryResponse {
|
|
657
|
-
interface IncrementLedgerEntry {
|
|
658
|
-
id: string;
|
|
659
|
-
amount: number;
|
|
660
|
-
created_at: string;
|
|
661
|
-
credit_block: IncrementLedgerEntry.CreditBlock;
|
|
662
|
-
currency: string;
|
|
663
|
-
customer: IncrementLedgerEntry.Customer;
|
|
664
|
-
description: string | null;
|
|
665
|
-
ending_balance: number;
|
|
666
|
-
entry_status: 'committed' | 'pending';
|
|
667
|
-
entry_type: 'increment';
|
|
668
|
-
ledger_sequence_number: number;
|
|
669
|
-
/**
|
|
670
|
-
* User specified key-value pairs for the resource. If not present, this defaults
|
|
671
|
-
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
672
|
-
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
673
|
-
* `null`.
|
|
674
|
-
*/
|
|
675
|
-
metadata: Record<string, string>;
|
|
676
|
-
starting_balance: number;
|
|
677
|
-
/**
|
|
678
|
-
* If the increment resulted in invoice creation, the list of created invoices
|
|
679
|
-
*/
|
|
680
|
-
created_invoices?: Array<InvoicesAPI.Invoice> | null;
|
|
681
|
-
}
|
|
682
|
-
namespace IncrementLedgerEntry {
|
|
683
|
-
interface CreditBlock {
|
|
684
|
-
id: string;
|
|
685
|
-
expiry_date: string | null;
|
|
686
|
-
per_unit_cost_basis: string | null;
|
|
687
|
-
}
|
|
688
|
-
interface Customer {
|
|
689
|
-
id: string;
|
|
690
|
-
external_customer_id: string | null;
|
|
691
|
-
}
|
|
692
|
-
}
|
|
693
|
-
interface DecrementLedgerEntry {
|
|
694
|
-
id: string;
|
|
695
|
-
amount: number;
|
|
696
|
-
created_at: string;
|
|
697
|
-
credit_block: DecrementLedgerEntry.CreditBlock;
|
|
698
|
-
currency: string;
|
|
699
|
-
customer: DecrementLedgerEntry.Customer;
|
|
700
|
-
description: string | null;
|
|
701
|
-
ending_balance: number;
|
|
702
|
-
entry_status: 'committed' | 'pending';
|
|
703
|
-
entry_type: 'decrement';
|
|
704
|
-
ledger_sequence_number: number;
|
|
705
|
-
/**
|
|
706
|
-
* User specified key-value pairs for the resource. If not present, this defaults
|
|
707
|
-
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
708
|
-
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
709
|
-
* `null`.
|
|
710
|
-
*/
|
|
711
|
-
metadata: Record<string, string>;
|
|
712
|
-
starting_balance: number;
|
|
713
|
-
event_id?: string | null;
|
|
714
|
-
invoice_id?: string | null;
|
|
715
|
-
price_id?: string | null;
|
|
716
|
-
}
|
|
717
|
-
namespace DecrementLedgerEntry {
|
|
718
|
-
interface CreditBlock {
|
|
719
|
-
id: string;
|
|
720
|
-
expiry_date: string | null;
|
|
721
|
-
per_unit_cost_basis: string | null;
|
|
722
|
-
}
|
|
723
|
-
interface Customer {
|
|
724
|
-
id: string;
|
|
725
|
-
external_customer_id: string | null;
|
|
726
|
-
}
|
|
727
|
-
}
|
|
728
|
-
interface ExpirationChangeLedgerEntry {
|
|
729
|
-
id: string;
|
|
730
|
-
amount: number;
|
|
731
|
-
created_at: string;
|
|
732
|
-
credit_block: ExpirationChangeLedgerEntry.CreditBlock;
|
|
733
|
-
currency: string;
|
|
734
|
-
customer: ExpirationChangeLedgerEntry.Customer;
|
|
735
|
-
description: string | null;
|
|
736
|
-
ending_balance: number;
|
|
737
|
-
entry_status: 'committed' | 'pending';
|
|
738
|
-
entry_type: 'expiration_change';
|
|
739
|
-
ledger_sequence_number: number;
|
|
740
|
-
/**
|
|
741
|
-
* User specified key-value pairs for the resource. If not present, this defaults
|
|
742
|
-
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
743
|
-
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
744
|
-
* `null`.
|
|
745
|
-
*/
|
|
746
|
-
metadata: Record<string, string>;
|
|
747
|
-
new_block_expiry_date: string | null;
|
|
748
|
-
starting_balance: number;
|
|
749
|
-
}
|
|
750
|
-
namespace ExpirationChangeLedgerEntry {
|
|
751
|
-
interface CreditBlock {
|
|
752
|
-
id: string;
|
|
753
|
-
expiry_date: string | null;
|
|
754
|
-
per_unit_cost_basis: string | null;
|
|
755
|
-
}
|
|
756
|
-
interface Customer {
|
|
757
|
-
id: string;
|
|
758
|
-
external_customer_id: string | null;
|
|
759
|
-
}
|
|
760
|
-
}
|
|
761
|
-
interface CreditBlockExpiryLedgerEntry {
|
|
762
|
-
id: string;
|
|
763
|
-
amount: number;
|
|
764
|
-
created_at: string;
|
|
765
|
-
credit_block: CreditBlockExpiryLedgerEntry.CreditBlock;
|
|
766
|
-
currency: string;
|
|
767
|
-
customer: CreditBlockExpiryLedgerEntry.Customer;
|
|
768
|
-
description: string | null;
|
|
769
|
-
ending_balance: number;
|
|
770
|
-
entry_status: 'committed' | 'pending';
|
|
771
|
-
entry_type: 'credit_block_expiry';
|
|
772
|
-
ledger_sequence_number: number;
|
|
773
|
-
/**
|
|
774
|
-
* User specified key-value pairs for the resource. If not present, this defaults
|
|
775
|
-
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
776
|
-
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
777
|
-
* `null`.
|
|
778
|
-
*/
|
|
779
|
-
metadata: Record<string, string>;
|
|
780
|
-
starting_balance: number;
|
|
781
|
-
}
|
|
782
|
-
namespace CreditBlockExpiryLedgerEntry {
|
|
783
|
-
interface CreditBlock {
|
|
784
|
-
id: string;
|
|
785
|
-
expiry_date: string | null;
|
|
786
|
-
per_unit_cost_basis: string | null;
|
|
787
|
-
}
|
|
788
|
-
interface Customer {
|
|
789
|
-
id: string;
|
|
790
|
-
external_customer_id: string | null;
|
|
791
|
-
}
|
|
792
|
-
}
|
|
793
|
-
interface VoidLedgerEntry {
|
|
794
|
-
id: string;
|
|
795
|
-
amount: number;
|
|
796
|
-
created_at: string;
|
|
797
|
-
credit_block: VoidLedgerEntry.CreditBlock;
|
|
798
|
-
currency: string;
|
|
799
|
-
customer: VoidLedgerEntry.Customer;
|
|
800
|
-
description: string | null;
|
|
801
|
-
ending_balance: number;
|
|
802
|
-
entry_status: 'committed' | 'pending';
|
|
803
|
-
entry_type: 'void';
|
|
804
|
-
ledger_sequence_number: number;
|
|
805
|
-
/**
|
|
806
|
-
* User specified key-value pairs for the resource. If not present, this defaults
|
|
807
|
-
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
808
|
-
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
809
|
-
* `null`.
|
|
810
|
-
*/
|
|
811
|
-
metadata: Record<string, string>;
|
|
812
|
-
starting_balance: number;
|
|
813
|
-
void_amount: number;
|
|
814
|
-
void_reason: string | null;
|
|
815
|
-
}
|
|
816
|
-
namespace VoidLedgerEntry {
|
|
817
|
-
interface CreditBlock {
|
|
818
|
-
id: string;
|
|
819
|
-
expiry_date: string | null;
|
|
820
|
-
per_unit_cost_basis: string | null;
|
|
821
|
-
}
|
|
822
|
-
interface Customer {
|
|
823
|
-
id: string;
|
|
824
|
-
external_customer_id: string | null;
|
|
825
|
-
}
|
|
826
|
-
}
|
|
827
|
-
interface VoidInitiatedLedgerEntry {
|
|
828
|
-
id: string;
|
|
829
|
-
amount: number;
|
|
830
|
-
created_at: string;
|
|
831
|
-
credit_block: VoidInitiatedLedgerEntry.CreditBlock;
|
|
832
|
-
currency: string;
|
|
833
|
-
customer: VoidInitiatedLedgerEntry.Customer;
|
|
834
|
-
description: string | null;
|
|
835
|
-
ending_balance: number;
|
|
836
|
-
entry_status: 'committed' | 'pending';
|
|
837
|
-
entry_type: 'void_initiated';
|
|
838
|
-
ledger_sequence_number: number;
|
|
839
|
-
/**
|
|
840
|
-
* User specified key-value pairs for the resource. If not present, this defaults
|
|
841
|
-
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
842
|
-
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
843
|
-
* `null`.
|
|
844
|
-
*/
|
|
845
|
-
metadata: Record<string, string>;
|
|
846
|
-
new_block_expiry_date: string;
|
|
847
|
-
starting_balance: number;
|
|
848
|
-
void_amount: number;
|
|
849
|
-
void_reason: string | null;
|
|
850
|
-
}
|
|
851
|
-
namespace VoidInitiatedLedgerEntry {
|
|
852
|
-
interface CreditBlock {
|
|
853
|
-
id: string;
|
|
854
|
-
expiry_date: string | null;
|
|
855
|
-
per_unit_cost_basis: string | null;
|
|
856
|
-
}
|
|
857
|
-
interface Customer {
|
|
858
|
-
id: string;
|
|
859
|
-
external_customer_id: string | null;
|
|
860
|
-
}
|
|
861
|
-
}
|
|
862
|
-
interface AmendmentLedgerEntry {
|
|
863
|
-
id: string;
|
|
864
|
-
amount: number;
|
|
865
|
-
created_at: string;
|
|
866
|
-
credit_block: AmendmentLedgerEntry.CreditBlock;
|
|
867
|
-
currency: string;
|
|
868
|
-
customer: AmendmentLedgerEntry.Customer;
|
|
869
|
-
description: string | null;
|
|
870
|
-
ending_balance: number;
|
|
871
|
-
entry_status: 'committed' | 'pending';
|
|
872
|
-
entry_type: 'amendment';
|
|
873
|
-
ledger_sequence_number: number;
|
|
874
|
-
/**
|
|
875
|
-
* User specified key-value pairs for the resource. If not present, this defaults
|
|
876
|
-
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
877
|
-
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
878
|
-
* `null`.
|
|
879
|
-
*/
|
|
880
|
-
metadata: Record<string, string>;
|
|
881
|
-
starting_balance: number;
|
|
882
|
-
}
|
|
883
|
-
namespace AmendmentLedgerEntry {
|
|
884
|
-
interface CreditBlock {
|
|
885
|
-
id: string;
|
|
886
|
-
expiry_date: string | null;
|
|
887
|
-
per_unit_cost_basis: string | null;
|
|
888
|
-
}
|
|
889
|
-
interface Customer {
|
|
890
|
-
id: string;
|
|
891
|
-
external_customer_id: string | null;
|
|
892
|
-
}
|
|
893
|
-
}
|
|
894
|
-
}
|
|
595
|
+
export type LedgerCreateEntryResponse = IncrementLedgerEntry | DecrementLedgerEntry | ExpirationChangeLedgerEntry | CreditBlockExpiryLedgerEntry | VoidLedgerEntry | VoidInitiatedLedgerEntry | AmendmentLedgerEntry;
|
|
895
596
|
/**
|
|
896
597
|
* The [Credit Ledger Entry resource](/product-catalog/prepurchase) models prepaid
|
|
897
598
|
* credits within Orb.
|
|
898
599
|
*/
|
|
899
|
-
export type LedgerCreateEntryByExternalIDResponse =
|
|
900
|
-
export declare namespace LedgerCreateEntryByExternalIDResponse {
|
|
901
|
-
interface IncrementLedgerEntry {
|
|
902
|
-
id: string;
|
|
903
|
-
amount: number;
|
|
904
|
-
created_at: string;
|
|
905
|
-
credit_block: IncrementLedgerEntry.CreditBlock;
|
|
906
|
-
currency: string;
|
|
907
|
-
customer: IncrementLedgerEntry.Customer;
|
|
908
|
-
description: string | null;
|
|
909
|
-
ending_balance: number;
|
|
910
|
-
entry_status: 'committed' | 'pending';
|
|
911
|
-
entry_type: 'increment';
|
|
912
|
-
ledger_sequence_number: number;
|
|
913
|
-
/**
|
|
914
|
-
* User specified key-value pairs for the resource. If not present, this defaults
|
|
915
|
-
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
916
|
-
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
917
|
-
* `null`.
|
|
918
|
-
*/
|
|
919
|
-
metadata: Record<string, string>;
|
|
920
|
-
starting_balance: number;
|
|
921
|
-
/**
|
|
922
|
-
* If the increment resulted in invoice creation, the list of created invoices
|
|
923
|
-
*/
|
|
924
|
-
created_invoices?: Array<InvoicesAPI.Invoice> | null;
|
|
925
|
-
}
|
|
926
|
-
namespace IncrementLedgerEntry {
|
|
927
|
-
interface CreditBlock {
|
|
928
|
-
id: string;
|
|
929
|
-
expiry_date: string | null;
|
|
930
|
-
per_unit_cost_basis: string | null;
|
|
931
|
-
}
|
|
932
|
-
interface Customer {
|
|
933
|
-
id: string;
|
|
934
|
-
external_customer_id: string | null;
|
|
935
|
-
}
|
|
936
|
-
}
|
|
937
|
-
interface DecrementLedgerEntry {
|
|
938
|
-
id: string;
|
|
939
|
-
amount: number;
|
|
940
|
-
created_at: string;
|
|
941
|
-
credit_block: DecrementLedgerEntry.CreditBlock;
|
|
942
|
-
currency: string;
|
|
943
|
-
customer: DecrementLedgerEntry.Customer;
|
|
944
|
-
description: string | null;
|
|
945
|
-
ending_balance: number;
|
|
946
|
-
entry_status: 'committed' | 'pending';
|
|
947
|
-
entry_type: 'decrement';
|
|
948
|
-
ledger_sequence_number: number;
|
|
949
|
-
/**
|
|
950
|
-
* User specified key-value pairs for the resource. If not present, this defaults
|
|
951
|
-
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
952
|
-
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
953
|
-
* `null`.
|
|
954
|
-
*/
|
|
955
|
-
metadata: Record<string, string>;
|
|
956
|
-
starting_balance: number;
|
|
957
|
-
event_id?: string | null;
|
|
958
|
-
invoice_id?: string | null;
|
|
959
|
-
price_id?: string | null;
|
|
960
|
-
}
|
|
961
|
-
namespace DecrementLedgerEntry {
|
|
962
|
-
interface CreditBlock {
|
|
963
|
-
id: string;
|
|
964
|
-
expiry_date: string | null;
|
|
965
|
-
per_unit_cost_basis: string | null;
|
|
966
|
-
}
|
|
967
|
-
interface Customer {
|
|
968
|
-
id: string;
|
|
969
|
-
external_customer_id: string | null;
|
|
970
|
-
}
|
|
971
|
-
}
|
|
972
|
-
interface ExpirationChangeLedgerEntry {
|
|
973
|
-
id: string;
|
|
974
|
-
amount: number;
|
|
975
|
-
created_at: string;
|
|
976
|
-
credit_block: ExpirationChangeLedgerEntry.CreditBlock;
|
|
977
|
-
currency: string;
|
|
978
|
-
customer: ExpirationChangeLedgerEntry.Customer;
|
|
979
|
-
description: string | null;
|
|
980
|
-
ending_balance: number;
|
|
981
|
-
entry_status: 'committed' | 'pending';
|
|
982
|
-
entry_type: 'expiration_change';
|
|
983
|
-
ledger_sequence_number: number;
|
|
984
|
-
/**
|
|
985
|
-
* User specified key-value pairs for the resource. If not present, this defaults
|
|
986
|
-
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
987
|
-
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
988
|
-
* `null`.
|
|
989
|
-
*/
|
|
990
|
-
metadata: Record<string, string>;
|
|
991
|
-
new_block_expiry_date: string | null;
|
|
992
|
-
starting_balance: number;
|
|
993
|
-
}
|
|
994
|
-
namespace ExpirationChangeLedgerEntry {
|
|
995
|
-
interface CreditBlock {
|
|
996
|
-
id: string;
|
|
997
|
-
expiry_date: string | null;
|
|
998
|
-
per_unit_cost_basis: string | null;
|
|
999
|
-
}
|
|
1000
|
-
interface Customer {
|
|
1001
|
-
id: string;
|
|
1002
|
-
external_customer_id: string | null;
|
|
1003
|
-
}
|
|
1004
|
-
}
|
|
1005
|
-
interface CreditBlockExpiryLedgerEntry {
|
|
1006
|
-
id: string;
|
|
1007
|
-
amount: number;
|
|
1008
|
-
created_at: string;
|
|
1009
|
-
credit_block: CreditBlockExpiryLedgerEntry.CreditBlock;
|
|
1010
|
-
currency: string;
|
|
1011
|
-
customer: CreditBlockExpiryLedgerEntry.Customer;
|
|
1012
|
-
description: string | null;
|
|
1013
|
-
ending_balance: number;
|
|
1014
|
-
entry_status: 'committed' | 'pending';
|
|
1015
|
-
entry_type: 'credit_block_expiry';
|
|
1016
|
-
ledger_sequence_number: number;
|
|
1017
|
-
/**
|
|
1018
|
-
* User specified key-value pairs for the resource. If not present, this defaults
|
|
1019
|
-
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
1020
|
-
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
1021
|
-
* `null`.
|
|
1022
|
-
*/
|
|
1023
|
-
metadata: Record<string, string>;
|
|
1024
|
-
starting_balance: number;
|
|
1025
|
-
}
|
|
1026
|
-
namespace CreditBlockExpiryLedgerEntry {
|
|
1027
|
-
interface CreditBlock {
|
|
1028
|
-
id: string;
|
|
1029
|
-
expiry_date: string | null;
|
|
1030
|
-
per_unit_cost_basis: string | null;
|
|
1031
|
-
}
|
|
1032
|
-
interface Customer {
|
|
1033
|
-
id: string;
|
|
1034
|
-
external_customer_id: string | null;
|
|
1035
|
-
}
|
|
1036
|
-
}
|
|
1037
|
-
interface VoidLedgerEntry {
|
|
1038
|
-
id: string;
|
|
1039
|
-
amount: number;
|
|
1040
|
-
created_at: string;
|
|
1041
|
-
credit_block: VoidLedgerEntry.CreditBlock;
|
|
1042
|
-
currency: string;
|
|
1043
|
-
customer: VoidLedgerEntry.Customer;
|
|
1044
|
-
description: string | null;
|
|
1045
|
-
ending_balance: number;
|
|
1046
|
-
entry_status: 'committed' | 'pending';
|
|
1047
|
-
entry_type: 'void';
|
|
1048
|
-
ledger_sequence_number: number;
|
|
1049
|
-
/**
|
|
1050
|
-
* User specified key-value pairs for the resource. If not present, this defaults
|
|
1051
|
-
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
1052
|
-
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
1053
|
-
* `null`.
|
|
1054
|
-
*/
|
|
1055
|
-
metadata: Record<string, string>;
|
|
1056
|
-
starting_balance: number;
|
|
1057
|
-
void_amount: number;
|
|
1058
|
-
void_reason: string | null;
|
|
1059
|
-
}
|
|
1060
|
-
namespace VoidLedgerEntry {
|
|
1061
|
-
interface CreditBlock {
|
|
1062
|
-
id: string;
|
|
1063
|
-
expiry_date: string | null;
|
|
1064
|
-
per_unit_cost_basis: string | null;
|
|
1065
|
-
}
|
|
1066
|
-
interface Customer {
|
|
1067
|
-
id: string;
|
|
1068
|
-
external_customer_id: string | null;
|
|
1069
|
-
}
|
|
1070
|
-
}
|
|
1071
|
-
interface VoidInitiatedLedgerEntry {
|
|
1072
|
-
id: string;
|
|
1073
|
-
amount: number;
|
|
1074
|
-
created_at: string;
|
|
1075
|
-
credit_block: VoidInitiatedLedgerEntry.CreditBlock;
|
|
1076
|
-
currency: string;
|
|
1077
|
-
customer: VoidInitiatedLedgerEntry.Customer;
|
|
1078
|
-
description: string | null;
|
|
1079
|
-
ending_balance: number;
|
|
1080
|
-
entry_status: 'committed' | 'pending';
|
|
1081
|
-
entry_type: 'void_initiated';
|
|
1082
|
-
ledger_sequence_number: number;
|
|
1083
|
-
/**
|
|
1084
|
-
* User specified key-value pairs for the resource. If not present, this defaults
|
|
1085
|
-
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
1086
|
-
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
1087
|
-
* `null`.
|
|
1088
|
-
*/
|
|
1089
|
-
metadata: Record<string, string>;
|
|
1090
|
-
new_block_expiry_date: string;
|
|
1091
|
-
starting_balance: number;
|
|
1092
|
-
void_amount: number;
|
|
1093
|
-
void_reason: string | null;
|
|
1094
|
-
}
|
|
1095
|
-
namespace VoidInitiatedLedgerEntry {
|
|
1096
|
-
interface CreditBlock {
|
|
1097
|
-
id: string;
|
|
1098
|
-
expiry_date: string | null;
|
|
1099
|
-
per_unit_cost_basis: string | null;
|
|
1100
|
-
}
|
|
1101
|
-
interface Customer {
|
|
1102
|
-
id: string;
|
|
1103
|
-
external_customer_id: string | null;
|
|
1104
|
-
}
|
|
1105
|
-
}
|
|
1106
|
-
interface AmendmentLedgerEntry {
|
|
1107
|
-
id: string;
|
|
1108
|
-
amount: number;
|
|
1109
|
-
created_at: string;
|
|
1110
|
-
credit_block: AmendmentLedgerEntry.CreditBlock;
|
|
1111
|
-
currency: string;
|
|
1112
|
-
customer: AmendmentLedgerEntry.Customer;
|
|
1113
|
-
description: string | null;
|
|
1114
|
-
ending_balance: number;
|
|
1115
|
-
entry_status: 'committed' | 'pending';
|
|
1116
|
-
entry_type: 'amendment';
|
|
1117
|
-
ledger_sequence_number: number;
|
|
1118
|
-
/**
|
|
1119
|
-
* User specified key-value pairs for the resource. If not present, this defaults
|
|
1120
|
-
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
1121
|
-
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
1122
|
-
* `null`.
|
|
1123
|
-
*/
|
|
1124
|
-
metadata: Record<string, string>;
|
|
1125
|
-
starting_balance: number;
|
|
1126
|
-
}
|
|
1127
|
-
namespace AmendmentLedgerEntry {
|
|
1128
|
-
interface CreditBlock {
|
|
1129
|
-
id: string;
|
|
1130
|
-
expiry_date: string | null;
|
|
1131
|
-
per_unit_cost_basis: string | null;
|
|
1132
|
-
}
|
|
1133
|
-
interface Customer {
|
|
1134
|
-
id: string;
|
|
1135
|
-
external_customer_id: string | null;
|
|
1136
|
-
}
|
|
1137
|
-
}
|
|
1138
|
-
}
|
|
600
|
+
export type LedgerCreateEntryByExternalIDResponse = IncrementLedgerEntry | DecrementLedgerEntry | ExpirationChangeLedgerEntry | CreditBlockExpiryLedgerEntry | VoidLedgerEntry | VoidInitiatedLedgerEntry | AmendmentLedgerEntry;
|
|
1139
601
|
/**
|
|
1140
602
|
* The [Credit Ledger Entry resource](/product-catalog/prepurchase) models prepaid
|
|
1141
603
|
* credits within Orb.
|
|
1142
604
|
*/
|
|
1143
|
-
export type LedgerListByExternalIDResponse =
|
|
1144
|
-
export declare namespace LedgerListByExternalIDResponse {
|
|
1145
|
-
interface IncrementLedgerEntry {
|
|
1146
|
-
id: string;
|
|
1147
|
-
amount: number;
|
|
1148
|
-
created_at: string;
|
|
1149
|
-
credit_block: IncrementLedgerEntry.CreditBlock;
|
|
1150
|
-
currency: string;
|
|
1151
|
-
customer: IncrementLedgerEntry.Customer;
|
|
1152
|
-
description: string | null;
|
|
1153
|
-
ending_balance: number;
|
|
1154
|
-
entry_status: 'committed' | 'pending';
|
|
1155
|
-
entry_type: 'increment';
|
|
1156
|
-
ledger_sequence_number: number;
|
|
1157
|
-
/**
|
|
1158
|
-
* User specified key-value pairs for the resource. If not present, this defaults
|
|
1159
|
-
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
1160
|
-
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
1161
|
-
* `null`.
|
|
1162
|
-
*/
|
|
1163
|
-
metadata: Record<string, string>;
|
|
1164
|
-
starting_balance: number;
|
|
1165
|
-
/**
|
|
1166
|
-
* If the increment resulted in invoice creation, the list of created invoices
|
|
1167
|
-
*/
|
|
1168
|
-
created_invoices?: Array<InvoicesAPI.Invoice> | null;
|
|
1169
|
-
}
|
|
1170
|
-
namespace IncrementLedgerEntry {
|
|
1171
|
-
interface CreditBlock {
|
|
1172
|
-
id: string;
|
|
1173
|
-
expiry_date: string | null;
|
|
1174
|
-
per_unit_cost_basis: string | null;
|
|
1175
|
-
}
|
|
1176
|
-
interface Customer {
|
|
1177
|
-
id: string;
|
|
1178
|
-
external_customer_id: string | null;
|
|
1179
|
-
}
|
|
1180
|
-
}
|
|
1181
|
-
interface DecrementLedgerEntry {
|
|
1182
|
-
id: string;
|
|
1183
|
-
amount: number;
|
|
1184
|
-
created_at: string;
|
|
1185
|
-
credit_block: DecrementLedgerEntry.CreditBlock;
|
|
1186
|
-
currency: string;
|
|
1187
|
-
customer: DecrementLedgerEntry.Customer;
|
|
1188
|
-
description: string | null;
|
|
1189
|
-
ending_balance: number;
|
|
1190
|
-
entry_status: 'committed' | 'pending';
|
|
1191
|
-
entry_type: 'decrement';
|
|
1192
|
-
ledger_sequence_number: number;
|
|
1193
|
-
/**
|
|
1194
|
-
* User specified key-value pairs for the resource. If not present, this defaults
|
|
1195
|
-
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
1196
|
-
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
1197
|
-
* `null`.
|
|
1198
|
-
*/
|
|
1199
|
-
metadata: Record<string, string>;
|
|
1200
|
-
starting_balance: number;
|
|
1201
|
-
event_id?: string | null;
|
|
1202
|
-
invoice_id?: string | null;
|
|
1203
|
-
price_id?: string | null;
|
|
1204
|
-
}
|
|
1205
|
-
namespace DecrementLedgerEntry {
|
|
1206
|
-
interface CreditBlock {
|
|
1207
|
-
id: string;
|
|
1208
|
-
expiry_date: string | null;
|
|
1209
|
-
per_unit_cost_basis: string | null;
|
|
1210
|
-
}
|
|
1211
|
-
interface Customer {
|
|
1212
|
-
id: string;
|
|
1213
|
-
external_customer_id: string | null;
|
|
1214
|
-
}
|
|
1215
|
-
}
|
|
1216
|
-
interface ExpirationChangeLedgerEntry {
|
|
1217
|
-
id: string;
|
|
1218
|
-
amount: number;
|
|
1219
|
-
created_at: string;
|
|
1220
|
-
credit_block: ExpirationChangeLedgerEntry.CreditBlock;
|
|
1221
|
-
currency: string;
|
|
1222
|
-
customer: ExpirationChangeLedgerEntry.Customer;
|
|
1223
|
-
description: string | null;
|
|
1224
|
-
ending_balance: number;
|
|
1225
|
-
entry_status: 'committed' | 'pending';
|
|
1226
|
-
entry_type: 'expiration_change';
|
|
1227
|
-
ledger_sequence_number: number;
|
|
1228
|
-
/**
|
|
1229
|
-
* User specified key-value pairs for the resource. If not present, this defaults
|
|
1230
|
-
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
1231
|
-
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
1232
|
-
* `null`.
|
|
1233
|
-
*/
|
|
1234
|
-
metadata: Record<string, string>;
|
|
1235
|
-
new_block_expiry_date: string | null;
|
|
1236
|
-
starting_balance: number;
|
|
1237
|
-
}
|
|
1238
|
-
namespace ExpirationChangeLedgerEntry {
|
|
1239
|
-
interface CreditBlock {
|
|
1240
|
-
id: string;
|
|
1241
|
-
expiry_date: string | null;
|
|
1242
|
-
per_unit_cost_basis: string | null;
|
|
1243
|
-
}
|
|
1244
|
-
interface Customer {
|
|
1245
|
-
id: string;
|
|
1246
|
-
external_customer_id: string | null;
|
|
1247
|
-
}
|
|
1248
|
-
}
|
|
1249
|
-
interface CreditBlockExpiryLedgerEntry {
|
|
1250
|
-
id: string;
|
|
1251
|
-
amount: number;
|
|
1252
|
-
created_at: string;
|
|
1253
|
-
credit_block: CreditBlockExpiryLedgerEntry.CreditBlock;
|
|
1254
|
-
currency: string;
|
|
1255
|
-
customer: CreditBlockExpiryLedgerEntry.Customer;
|
|
1256
|
-
description: string | null;
|
|
1257
|
-
ending_balance: number;
|
|
1258
|
-
entry_status: 'committed' | 'pending';
|
|
1259
|
-
entry_type: 'credit_block_expiry';
|
|
1260
|
-
ledger_sequence_number: number;
|
|
1261
|
-
/**
|
|
1262
|
-
* User specified key-value pairs for the resource. If not present, this defaults
|
|
1263
|
-
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
1264
|
-
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
1265
|
-
* `null`.
|
|
1266
|
-
*/
|
|
1267
|
-
metadata: Record<string, string>;
|
|
1268
|
-
starting_balance: number;
|
|
1269
|
-
}
|
|
1270
|
-
namespace CreditBlockExpiryLedgerEntry {
|
|
1271
|
-
interface CreditBlock {
|
|
1272
|
-
id: string;
|
|
1273
|
-
expiry_date: string | null;
|
|
1274
|
-
per_unit_cost_basis: string | null;
|
|
1275
|
-
}
|
|
1276
|
-
interface Customer {
|
|
1277
|
-
id: string;
|
|
1278
|
-
external_customer_id: string | null;
|
|
1279
|
-
}
|
|
1280
|
-
}
|
|
1281
|
-
interface VoidLedgerEntry {
|
|
1282
|
-
id: string;
|
|
1283
|
-
amount: number;
|
|
1284
|
-
created_at: string;
|
|
1285
|
-
credit_block: VoidLedgerEntry.CreditBlock;
|
|
1286
|
-
currency: string;
|
|
1287
|
-
customer: VoidLedgerEntry.Customer;
|
|
1288
|
-
description: string | null;
|
|
1289
|
-
ending_balance: number;
|
|
1290
|
-
entry_status: 'committed' | 'pending';
|
|
1291
|
-
entry_type: 'void';
|
|
1292
|
-
ledger_sequence_number: number;
|
|
1293
|
-
/**
|
|
1294
|
-
* User specified key-value pairs for the resource. If not present, this defaults
|
|
1295
|
-
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
1296
|
-
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
1297
|
-
* `null`.
|
|
1298
|
-
*/
|
|
1299
|
-
metadata: Record<string, string>;
|
|
1300
|
-
starting_balance: number;
|
|
1301
|
-
void_amount: number;
|
|
1302
|
-
void_reason: string | null;
|
|
1303
|
-
}
|
|
1304
|
-
namespace VoidLedgerEntry {
|
|
1305
|
-
interface CreditBlock {
|
|
1306
|
-
id: string;
|
|
1307
|
-
expiry_date: string | null;
|
|
1308
|
-
per_unit_cost_basis: string | null;
|
|
1309
|
-
}
|
|
1310
|
-
interface Customer {
|
|
1311
|
-
id: string;
|
|
1312
|
-
external_customer_id: string | null;
|
|
1313
|
-
}
|
|
1314
|
-
}
|
|
1315
|
-
interface VoidInitiatedLedgerEntry {
|
|
1316
|
-
id: string;
|
|
1317
|
-
amount: number;
|
|
1318
|
-
created_at: string;
|
|
1319
|
-
credit_block: VoidInitiatedLedgerEntry.CreditBlock;
|
|
1320
|
-
currency: string;
|
|
1321
|
-
customer: VoidInitiatedLedgerEntry.Customer;
|
|
1322
|
-
description: string | null;
|
|
1323
|
-
ending_balance: number;
|
|
1324
|
-
entry_status: 'committed' | 'pending';
|
|
1325
|
-
entry_type: 'void_initiated';
|
|
1326
|
-
ledger_sequence_number: number;
|
|
1327
|
-
/**
|
|
1328
|
-
* User specified key-value pairs for the resource. If not present, this defaults
|
|
1329
|
-
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
1330
|
-
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
1331
|
-
* `null`.
|
|
1332
|
-
*/
|
|
1333
|
-
metadata: Record<string, string>;
|
|
1334
|
-
new_block_expiry_date: string;
|
|
1335
|
-
starting_balance: number;
|
|
1336
|
-
void_amount: number;
|
|
1337
|
-
void_reason: string | null;
|
|
1338
|
-
}
|
|
1339
|
-
namespace VoidInitiatedLedgerEntry {
|
|
1340
|
-
interface CreditBlock {
|
|
1341
|
-
id: string;
|
|
1342
|
-
expiry_date: string | null;
|
|
1343
|
-
per_unit_cost_basis: string | null;
|
|
1344
|
-
}
|
|
1345
|
-
interface Customer {
|
|
1346
|
-
id: string;
|
|
1347
|
-
external_customer_id: string | null;
|
|
1348
|
-
}
|
|
1349
|
-
}
|
|
1350
|
-
interface AmendmentLedgerEntry {
|
|
1351
|
-
id: string;
|
|
1352
|
-
amount: number;
|
|
1353
|
-
created_at: string;
|
|
1354
|
-
credit_block: AmendmentLedgerEntry.CreditBlock;
|
|
1355
|
-
currency: string;
|
|
1356
|
-
customer: AmendmentLedgerEntry.Customer;
|
|
1357
|
-
description: string | null;
|
|
1358
|
-
ending_balance: number;
|
|
1359
|
-
entry_status: 'committed' | 'pending';
|
|
1360
|
-
entry_type: 'amendment';
|
|
1361
|
-
ledger_sequence_number: number;
|
|
1362
|
-
/**
|
|
1363
|
-
* User specified key-value pairs for the resource. If not present, this defaults
|
|
1364
|
-
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
1365
|
-
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
1366
|
-
* `null`.
|
|
1367
|
-
*/
|
|
1368
|
-
metadata: Record<string, string>;
|
|
1369
|
-
starting_balance: number;
|
|
1370
|
-
}
|
|
1371
|
-
namespace AmendmentLedgerEntry {
|
|
1372
|
-
interface CreditBlock {
|
|
1373
|
-
id: string;
|
|
1374
|
-
expiry_date: string | null;
|
|
1375
|
-
per_unit_cost_basis: string | null;
|
|
1376
|
-
}
|
|
1377
|
-
interface Customer {
|
|
1378
|
-
id: string;
|
|
1379
|
-
external_customer_id: string | null;
|
|
1380
|
-
}
|
|
1381
|
-
}
|
|
1382
|
-
}
|
|
605
|
+
export type LedgerListByExternalIDResponse = IncrementLedgerEntry | DecrementLedgerEntry | ExpirationChangeLedgerEntry | CreditBlockExpiryLedgerEntry | VoidLedgerEntry | VoidInitiatedLedgerEntry | AmendmentLedgerEntry;
|
|
1383
606
|
export interface LedgerListParams extends PageParams {
|
|
1384
607
|
'created_at[gt]'?: string | null;
|
|
1385
608
|
'created_at[gte]'?: string | null;
|
|
@@ -1434,7 +657,9 @@ export declare namespace LedgerCreateEntryParams {
|
|
|
1434
657
|
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
1435
658
|
* by setting `metadata` to `null`.
|
|
1436
659
|
*/
|
|
1437
|
-
metadata?:
|
|
660
|
+
metadata?: {
|
|
661
|
+
[key: string]: string | null;
|
|
662
|
+
} | null;
|
|
1438
663
|
/**
|
|
1439
664
|
* Can only be specified when entry_type=increment. How much, in the customer's
|
|
1440
665
|
* currency, a customer paid for a single credit in this block
|
|
@@ -1460,6 +685,12 @@ export declare namespace LedgerCreateEntryParams {
|
|
|
1460
685
|
* to 0.
|
|
1461
686
|
*/
|
|
1462
687
|
net_terms: number;
|
|
688
|
+
/**
|
|
689
|
+
* An ISO 8601 format date that denotes when this invoice should be dated in the
|
|
690
|
+
* customer's timezone. If not provided, the invoice date will default to the
|
|
691
|
+
* credit block's effective date.
|
|
692
|
+
*/
|
|
693
|
+
invoice_date?: (string & {}) | (string & {}) | null;
|
|
1463
694
|
/**
|
|
1464
695
|
* An optional memo to display on the invoice.
|
|
1465
696
|
*/
|
|
@@ -1494,14 +725,12 @@ export declare namespace LedgerCreateEntryParams {
|
|
|
1494
725
|
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
1495
726
|
* by setting `metadata` to `null`.
|
|
1496
727
|
*/
|
|
1497
|
-
metadata?:
|
|
728
|
+
metadata?: {
|
|
729
|
+
[key: string]: string | null;
|
|
730
|
+
} | null;
|
|
1498
731
|
}
|
|
1499
732
|
interface AddExpirationChangeCreditLedgerEntryRequestParams {
|
|
1500
733
|
entry_type: 'expiration_change';
|
|
1501
|
-
/**
|
|
1502
|
-
* An ISO 8601 format date that identifies the origination credit block to expire
|
|
1503
|
-
*/
|
|
1504
|
-
expiry_date: string | null;
|
|
1505
734
|
/**
|
|
1506
735
|
* A future date (specified in YYYY-MM-DD format) used for expiration change,
|
|
1507
736
|
* denoting when credits transferred (as part of a partial block expiration) should
|
|
@@ -1529,12 +758,18 @@ export declare namespace LedgerCreateEntryParams {
|
|
|
1529
758
|
* for noting corrections as a result of an incident, etc.
|
|
1530
759
|
*/
|
|
1531
760
|
description?: string | null;
|
|
761
|
+
/**
|
|
762
|
+
* An ISO 8601 format date that identifies the origination credit block to expire
|
|
763
|
+
*/
|
|
764
|
+
expiry_date?: string | null;
|
|
1532
765
|
/**
|
|
1533
766
|
* User-specified key/value pairs for the resource. Individual keys can be removed
|
|
1534
767
|
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
1535
768
|
* by setting `metadata` to `null`.
|
|
1536
769
|
*/
|
|
1537
|
-
metadata?:
|
|
770
|
+
metadata?: {
|
|
771
|
+
[key: string]: string | null;
|
|
772
|
+
} | null;
|
|
1538
773
|
}
|
|
1539
774
|
interface AddVoidCreditLedgerEntryRequestParams {
|
|
1540
775
|
/**
|
|
@@ -1563,7 +798,9 @@ export declare namespace LedgerCreateEntryParams {
|
|
|
1563
798
|
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
1564
799
|
* by setting `metadata` to `null`.
|
|
1565
800
|
*/
|
|
1566
|
-
metadata?:
|
|
801
|
+
metadata?: {
|
|
802
|
+
[key: string]: string | null;
|
|
803
|
+
} | null;
|
|
1567
804
|
/**
|
|
1568
805
|
* Can only be specified when `entry_type=void`. The reason for the void.
|
|
1569
806
|
*/
|
|
@@ -1596,7 +833,9 @@ export declare namespace LedgerCreateEntryParams {
|
|
|
1596
833
|
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
1597
834
|
* by setting `metadata` to `null`.
|
|
1598
835
|
*/
|
|
1599
|
-
metadata?:
|
|
836
|
+
metadata?: {
|
|
837
|
+
[key: string]: string | null;
|
|
838
|
+
} | null;
|
|
1600
839
|
}
|
|
1601
840
|
}
|
|
1602
841
|
export type LedgerCreateEntryByExternalIDParams = LedgerCreateEntryByExternalIDParams.AddIncrementCreditLedgerEntryRequestParams | LedgerCreateEntryByExternalIDParams.AddDecrementCreditLedgerEntryRequestParams | LedgerCreateEntryByExternalIDParams.AddExpirationChangeCreditLedgerEntryRequestParams | LedgerCreateEntryByExternalIDParams.AddVoidCreditLedgerEntryRequestParams | LedgerCreateEntryByExternalIDParams.AddAmendmentCreditLedgerEntryRequestParams;
|
|
@@ -1640,7 +879,9 @@ export declare namespace LedgerCreateEntryByExternalIDParams {
|
|
|
1640
879
|
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
1641
880
|
* by setting `metadata` to `null`.
|
|
1642
881
|
*/
|
|
1643
|
-
metadata?:
|
|
882
|
+
metadata?: {
|
|
883
|
+
[key: string]: string | null;
|
|
884
|
+
} | null;
|
|
1644
885
|
/**
|
|
1645
886
|
* Can only be specified when entry_type=increment. How much, in the customer's
|
|
1646
887
|
* currency, a customer paid for a single credit in this block
|
|
@@ -1666,6 +907,12 @@ export declare namespace LedgerCreateEntryByExternalIDParams {
|
|
|
1666
907
|
* to 0.
|
|
1667
908
|
*/
|
|
1668
909
|
net_terms: number;
|
|
910
|
+
/**
|
|
911
|
+
* An ISO 8601 format date that denotes when this invoice should be dated in the
|
|
912
|
+
* customer's timezone. If not provided, the invoice date will default to the
|
|
913
|
+
* credit block's effective date.
|
|
914
|
+
*/
|
|
915
|
+
invoice_date?: (string & {}) | (string & {}) | null;
|
|
1669
916
|
/**
|
|
1670
917
|
* An optional memo to display on the invoice.
|
|
1671
918
|
*/
|
|
@@ -1700,14 +947,12 @@ export declare namespace LedgerCreateEntryByExternalIDParams {
|
|
|
1700
947
|
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
1701
948
|
* by setting `metadata` to `null`.
|
|
1702
949
|
*/
|
|
1703
|
-
metadata?:
|
|
950
|
+
metadata?: {
|
|
951
|
+
[key: string]: string | null;
|
|
952
|
+
} | null;
|
|
1704
953
|
}
|
|
1705
954
|
interface AddExpirationChangeCreditLedgerEntryRequestParams {
|
|
1706
955
|
entry_type: 'expiration_change';
|
|
1707
|
-
/**
|
|
1708
|
-
* An ISO 8601 format date that identifies the origination credit block to expire
|
|
1709
|
-
*/
|
|
1710
|
-
expiry_date: string | null;
|
|
1711
956
|
/**
|
|
1712
957
|
* A future date (specified in YYYY-MM-DD format) used for expiration change,
|
|
1713
958
|
* denoting when credits transferred (as part of a partial block expiration) should
|
|
@@ -1735,12 +980,18 @@ export declare namespace LedgerCreateEntryByExternalIDParams {
|
|
|
1735
980
|
* for noting corrections as a result of an incident, etc.
|
|
1736
981
|
*/
|
|
1737
982
|
description?: string | null;
|
|
983
|
+
/**
|
|
984
|
+
* An ISO 8601 format date that identifies the origination credit block to expire
|
|
985
|
+
*/
|
|
986
|
+
expiry_date?: string | null;
|
|
1738
987
|
/**
|
|
1739
988
|
* User-specified key/value pairs for the resource. Individual keys can be removed
|
|
1740
989
|
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
1741
990
|
* by setting `metadata` to `null`.
|
|
1742
991
|
*/
|
|
1743
|
-
metadata?:
|
|
992
|
+
metadata?: {
|
|
993
|
+
[key: string]: string | null;
|
|
994
|
+
} | null;
|
|
1744
995
|
}
|
|
1745
996
|
interface AddVoidCreditLedgerEntryRequestParams {
|
|
1746
997
|
/**
|
|
@@ -1769,7 +1020,9 @@ export declare namespace LedgerCreateEntryByExternalIDParams {
|
|
|
1769
1020
|
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
1770
1021
|
* by setting `metadata` to `null`.
|
|
1771
1022
|
*/
|
|
1772
|
-
metadata?:
|
|
1023
|
+
metadata?: {
|
|
1024
|
+
[key: string]: string | null;
|
|
1025
|
+
} | null;
|
|
1773
1026
|
/**
|
|
1774
1027
|
* Can only be specified when `entry_type=void`. The reason for the void.
|
|
1775
1028
|
*/
|
|
@@ -1802,7 +1055,9 @@ export declare namespace LedgerCreateEntryByExternalIDParams {
|
|
|
1802
1055
|
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
1803
1056
|
* by setting `metadata` to `null`.
|
|
1804
1057
|
*/
|
|
1805
|
-
metadata?:
|
|
1058
|
+
metadata?: {
|
|
1059
|
+
[key: string]: string | null;
|
|
1060
|
+
} | null;
|
|
1806
1061
|
}
|
|
1807
1062
|
}
|
|
1808
1063
|
export interface LedgerListByExternalIDParams extends PageParams {
|
|
@@ -1819,6 +1074,6 @@ export interface LedgerListByExternalIDParams extends PageParams {
|
|
|
1819
1074
|
minimum_amount?: string | null;
|
|
1820
1075
|
}
|
|
1821
1076
|
export declare namespace Ledger {
|
|
1822
|
-
export { type LedgerListResponse as LedgerListResponse, type LedgerCreateEntryResponse as LedgerCreateEntryResponse, type LedgerCreateEntryByExternalIDResponse as LedgerCreateEntryByExternalIDResponse, type LedgerListByExternalIDResponse as LedgerListByExternalIDResponse, LedgerListResponsesPage as LedgerListResponsesPage, LedgerListByExternalIDResponsesPage as LedgerListByExternalIDResponsesPage, type LedgerListParams as LedgerListParams, type LedgerCreateEntryParams as LedgerCreateEntryParams, type LedgerCreateEntryByExternalIDParams as LedgerCreateEntryByExternalIDParams, type LedgerListByExternalIDParams as LedgerListByExternalIDParams, };
|
|
1077
|
+
export { type AffectedBlock as AffectedBlock, type AmendmentLedgerEntry as AmendmentLedgerEntry, type CreditBlockExpiryLedgerEntry as CreditBlockExpiryLedgerEntry, type DecrementLedgerEntry as DecrementLedgerEntry, type ExpirationChangeLedgerEntry as ExpirationChangeLedgerEntry, type IncrementLedgerEntry as IncrementLedgerEntry, type VoidInitiatedLedgerEntry as VoidInitiatedLedgerEntry, type VoidLedgerEntry as VoidLedgerEntry, type LedgerListResponse as LedgerListResponse, type LedgerCreateEntryResponse as LedgerCreateEntryResponse, type LedgerCreateEntryByExternalIDResponse as LedgerCreateEntryByExternalIDResponse, type LedgerListByExternalIDResponse as LedgerListByExternalIDResponse, LedgerListResponsesPage as LedgerListResponsesPage, LedgerListByExternalIDResponsesPage as LedgerListByExternalIDResponsesPage, type LedgerListParams as LedgerListParams, type LedgerCreateEntryParams as LedgerCreateEntryParams, type LedgerCreateEntryByExternalIDParams as LedgerCreateEntryByExternalIDParams, type LedgerListByExternalIDParams as LedgerListByExternalIDParams, };
|
|
1823
1078
|
}
|
|
1824
1079
|
//# sourceMappingURL=ledger.d.ts.map
|