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
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { APIResource } from '../../../resource';
|
|
4
4
|
import { isRequestOptions } from '../../../core';
|
|
5
5
|
import * as Core from '../../../core';
|
|
6
|
-
import * as
|
|
6
|
+
import * as Shared from '../../shared';
|
|
7
7
|
import { Page, type PageParams } from '../../../pagination';
|
|
8
8
|
|
|
9
9
|
export class Ledger extends APIResource {
|
|
@@ -46,8 +46,8 @@ export class Ledger extends APIResource {
|
|
|
46
46
|
* deductions take place from a non-expiring credit block.
|
|
47
47
|
*
|
|
48
48
|
* If there are multiple blocks with the same expiration date, Orb will deduct from
|
|
49
|
-
* the block with the _lower cost basis_ first (e.g. trial credits with a
|
|
50
|
-
* basis before paid credits with a
|
|
49
|
+
* the block with the _lower cost basis_ first (e.g. trial credits with a \$0 cost
|
|
50
|
+
* basis before paid credits with a \$5.00 cost basis).
|
|
51
51
|
*
|
|
52
52
|
* It's also possible for a single usage event's deduction to _span_ credit blocks.
|
|
53
53
|
* In this case, Orb will deduct from the next block, ending at the credit block
|
|
@@ -395,8 +395,8 @@ export class Ledger extends APIResource {
|
|
|
395
395
|
* deductions take place from a non-expiring credit block.
|
|
396
396
|
*
|
|
397
397
|
* If there are multiple blocks with the same expiration date, Orb will deduct from
|
|
398
|
-
* the block with the _lower cost basis_ first (e.g. trial credits with a
|
|
399
|
-
* basis before paid credits with a
|
|
398
|
+
* the block with the _lower cost basis_ first (e.g. trial credits with a \$0 cost
|
|
399
|
+
* basis before paid credits with a \$5.00 cost basis).
|
|
400
400
|
*
|
|
401
401
|
* It's also possible for a single usage event's deduction to _span_ credit blocks.
|
|
402
402
|
* In this case, Orb will deduct from the next block, ending at the credit block
|
|
@@ -468,1557 +468,326 @@ export class LedgerListResponsesPage extends Page<LedgerListResponse> {}
|
|
|
468
468
|
|
|
469
469
|
export class LedgerListByExternalIDResponsesPage extends Page<LedgerListByExternalIDResponse> {}
|
|
470
470
|
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
* credits within Orb.
|
|
474
|
-
*/
|
|
475
|
-
export type LedgerListResponse =
|
|
476
|
-
| LedgerListResponse.IncrementLedgerEntry
|
|
477
|
-
| LedgerListResponse.DecrementLedgerEntry
|
|
478
|
-
| LedgerListResponse.ExpirationChangeLedgerEntry
|
|
479
|
-
| LedgerListResponse.CreditBlockExpiryLedgerEntry
|
|
480
|
-
| LedgerListResponse.VoidLedgerEntry
|
|
481
|
-
| LedgerListResponse.VoidInitiatedLedgerEntry
|
|
482
|
-
| LedgerListResponse.AmendmentLedgerEntry;
|
|
483
|
-
|
|
484
|
-
export namespace LedgerListResponse {
|
|
485
|
-
export interface IncrementLedgerEntry {
|
|
486
|
-
id: string;
|
|
487
|
-
|
|
488
|
-
amount: number;
|
|
489
|
-
|
|
490
|
-
created_at: string;
|
|
491
|
-
|
|
492
|
-
credit_block: IncrementLedgerEntry.CreditBlock;
|
|
493
|
-
|
|
494
|
-
currency: string;
|
|
495
|
-
|
|
496
|
-
customer: IncrementLedgerEntry.Customer;
|
|
497
|
-
|
|
498
|
-
description: string | null;
|
|
499
|
-
|
|
500
|
-
ending_balance: number;
|
|
501
|
-
|
|
502
|
-
entry_status: 'committed' | 'pending';
|
|
503
|
-
|
|
504
|
-
entry_type: 'increment';
|
|
505
|
-
|
|
506
|
-
ledger_sequence_number: number;
|
|
507
|
-
|
|
508
|
-
/**
|
|
509
|
-
* User specified key-value pairs for the resource. If not present, this defaults
|
|
510
|
-
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
511
|
-
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
512
|
-
* `null`.
|
|
513
|
-
*/
|
|
514
|
-
metadata: Record<string, string>;
|
|
515
|
-
|
|
516
|
-
starting_balance: number;
|
|
517
|
-
|
|
518
|
-
/**
|
|
519
|
-
* If the increment resulted in invoice creation, the list of created invoices
|
|
520
|
-
*/
|
|
521
|
-
created_invoices?: Array<InvoicesAPI.Invoice> | null;
|
|
522
|
-
}
|
|
523
|
-
|
|
524
|
-
export namespace IncrementLedgerEntry {
|
|
525
|
-
export interface CreditBlock {
|
|
526
|
-
id: string;
|
|
527
|
-
|
|
528
|
-
expiry_date: string | null;
|
|
529
|
-
|
|
530
|
-
per_unit_cost_basis: string | null;
|
|
531
|
-
}
|
|
532
|
-
|
|
533
|
-
export interface Customer {
|
|
534
|
-
id: string;
|
|
535
|
-
|
|
536
|
-
external_customer_id: string | null;
|
|
537
|
-
}
|
|
538
|
-
}
|
|
539
|
-
|
|
540
|
-
export interface DecrementLedgerEntry {
|
|
541
|
-
id: string;
|
|
542
|
-
|
|
543
|
-
amount: number;
|
|
544
|
-
|
|
545
|
-
created_at: string;
|
|
546
|
-
|
|
547
|
-
credit_block: DecrementLedgerEntry.CreditBlock;
|
|
548
|
-
|
|
549
|
-
currency: string;
|
|
550
|
-
|
|
551
|
-
customer: DecrementLedgerEntry.Customer;
|
|
552
|
-
|
|
553
|
-
description: string | null;
|
|
554
|
-
|
|
555
|
-
ending_balance: number;
|
|
556
|
-
|
|
557
|
-
entry_status: 'committed' | 'pending';
|
|
558
|
-
|
|
559
|
-
entry_type: 'decrement';
|
|
560
|
-
|
|
561
|
-
ledger_sequence_number: number;
|
|
562
|
-
|
|
563
|
-
/**
|
|
564
|
-
* User specified key-value pairs for the resource. If not present, this defaults
|
|
565
|
-
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
566
|
-
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
567
|
-
* `null`.
|
|
568
|
-
*/
|
|
569
|
-
metadata: Record<string, string>;
|
|
570
|
-
|
|
571
|
-
starting_balance: number;
|
|
572
|
-
|
|
573
|
-
event_id?: string | null;
|
|
574
|
-
|
|
575
|
-
invoice_id?: string | null;
|
|
576
|
-
|
|
577
|
-
price_id?: string | null;
|
|
578
|
-
}
|
|
579
|
-
|
|
580
|
-
export namespace DecrementLedgerEntry {
|
|
581
|
-
export interface CreditBlock {
|
|
582
|
-
id: string;
|
|
583
|
-
|
|
584
|
-
expiry_date: string | null;
|
|
585
|
-
|
|
586
|
-
per_unit_cost_basis: string | null;
|
|
587
|
-
}
|
|
588
|
-
|
|
589
|
-
export interface Customer {
|
|
590
|
-
id: string;
|
|
591
|
-
|
|
592
|
-
external_customer_id: string | null;
|
|
593
|
-
}
|
|
594
|
-
}
|
|
595
|
-
|
|
596
|
-
export interface ExpirationChangeLedgerEntry {
|
|
597
|
-
id: string;
|
|
598
|
-
|
|
599
|
-
amount: number;
|
|
600
|
-
|
|
601
|
-
created_at: string;
|
|
602
|
-
|
|
603
|
-
credit_block: ExpirationChangeLedgerEntry.CreditBlock;
|
|
604
|
-
|
|
605
|
-
currency: string;
|
|
606
|
-
|
|
607
|
-
customer: ExpirationChangeLedgerEntry.Customer;
|
|
608
|
-
|
|
609
|
-
description: string | null;
|
|
610
|
-
|
|
611
|
-
ending_balance: number;
|
|
612
|
-
|
|
613
|
-
entry_status: 'committed' | 'pending';
|
|
614
|
-
|
|
615
|
-
entry_type: 'expiration_change';
|
|
616
|
-
|
|
617
|
-
ledger_sequence_number: number;
|
|
618
|
-
|
|
619
|
-
/**
|
|
620
|
-
* User specified key-value pairs for the resource. If not present, this defaults
|
|
621
|
-
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
622
|
-
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
623
|
-
* `null`.
|
|
624
|
-
*/
|
|
625
|
-
metadata: Record<string, string>;
|
|
626
|
-
|
|
627
|
-
new_block_expiry_date: string | null;
|
|
628
|
-
|
|
629
|
-
starting_balance: number;
|
|
630
|
-
}
|
|
631
|
-
|
|
632
|
-
export namespace ExpirationChangeLedgerEntry {
|
|
633
|
-
export interface CreditBlock {
|
|
634
|
-
id: string;
|
|
635
|
-
|
|
636
|
-
expiry_date: string | null;
|
|
637
|
-
|
|
638
|
-
per_unit_cost_basis: string | null;
|
|
639
|
-
}
|
|
640
|
-
|
|
641
|
-
export interface Customer {
|
|
642
|
-
id: string;
|
|
643
|
-
|
|
644
|
-
external_customer_id: string | null;
|
|
645
|
-
}
|
|
646
|
-
}
|
|
647
|
-
|
|
648
|
-
export interface CreditBlockExpiryLedgerEntry {
|
|
649
|
-
id: string;
|
|
650
|
-
|
|
651
|
-
amount: number;
|
|
652
|
-
|
|
653
|
-
created_at: string;
|
|
654
|
-
|
|
655
|
-
credit_block: CreditBlockExpiryLedgerEntry.CreditBlock;
|
|
656
|
-
|
|
657
|
-
currency: string;
|
|
658
|
-
|
|
659
|
-
customer: CreditBlockExpiryLedgerEntry.Customer;
|
|
660
|
-
|
|
661
|
-
description: string | null;
|
|
662
|
-
|
|
663
|
-
ending_balance: number;
|
|
664
|
-
|
|
665
|
-
entry_status: 'committed' | 'pending';
|
|
666
|
-
|
|
667
|
-
entry_type: 'credit_block_expiry';
|
|
668
|
-
|
|
669
|
-
ledger_sequence_number: number;
|
|
670
|
-
|
|
671
|
-
/**
|
|
672
|
-
* User specified key-value pairs for the resource. If not present, this defaults
|
|
673
|
-
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
674
|
-
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
675
|
-
* `null`.
|
|
676
|
-
*/
|
|
677
|
-
metadata: Record<string, string>;
|
|
678
|
-
|
|
679
|
-
starting_balance: number;
|
|
680
|
-
}
|
|
681
|
-
|
|
682
|
-
export namespace CreditBlockExpiryLedgerEntry {
|
|
683
|
-
export interface CreditBlock {
|
|
684
|
-
id: string;
|
|
685
|
-
|
|
686
|
-
expiry_date: string | null;
|
|
687
|
-
|
|
688
|
-
per_unit_cost_basis: string | null;
|
|
689
|
-
}
|
|
690
|
-
|
|
691
|
-
export interface Customer {
|
|
692
|
-
id: string;
|
|
693
|
-
|
|
694
|
-
external_customer_id: string | null;
|
|
695
|
-
}
|
|
696
|
-
}
|
|
697
|
-
|
|
698
|
-
export interface VoidLedgerEntry {
|
|
699
|
-
id: string;
|
|
700
|
-
|
|
701
|
-
amount: number;
|
|
702
|
-
|
|
703
|
-
created_at: string;
|
|
704
|
-
|
|
705
|
-
credit_block: VoidLedgerEntry.CreditBlock;
|
|
706
|
-
|
|
707
|
-
currency: string;
|
|
708
|
-
|
|
709
|
-
customer: VoidLedgerEntry.Customer;
|
|
710
|
-
|
|
711
|
-
description: string | null;
|
|
712
|
-
|
|
713
|
-
ending_balance: number;
|
|
714
|
-
|
|
715
|
-
entry_status: 'committed' | 'pending';
|
|
716
|
-
|
|
717
|
-
entry_type: 'void';
|
|
718
|
-
|
|
719
|
-
ledger_sequence_number: number;
|
|
720
|
-
|
|
721
|
-
/**
|
|
722
|
-
* User specified key-value pairs for the resource. If not present, this defaults
|
|
723
|
-
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
724
|
-
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
725
|
-
* `null`.
|
|
726
|
-
*/
|
|
727
|
-
metadata: Record<string, string>;
|
|
728
|
-
|
|
729
|
-
starting_balance: number;
|
|
730
|
-
|
|
731
|
-
void_amount: number;
|
|
732
|
-
|
|
733
|
-
void_reason: string | null;
|
|
734
|
-
}
|
|
735
|
-
|
|
736
|
-
export namespace VoidLedgerEntry {
|
|
737
|
-
export interface CreditBlock {
|
|
738
|
-
id: string;
|
|
739
|
-
|
|
740
|
-
expiry_date: string | null;
|
|
741
|
-
|
|
742
|
-
per_unit_cost_basis: string | null;
|
|
743
|
-
}
|
|
744
|
-
|
|
745
|
-
export interface Customer {
|
|
746
|
-
id: string;
|
|
747
|
-
|
|
748
|
-
external_customer_id: string | null;
|
|
749
|
-
}
|
|
750
|
-
}
|
|
751
|
-
|
|
752
|
-
export interface VoidInitiatedLedgerEntry {
|
|
753
|
-
id: string;
|
|
754
|
-
|
|
755
|
-
amount: number;
|
|
756
|
-
|
|
757
|
-
created_at: string;
|
|
758
|
-
|
|
759
|
-
credit_block: VoidInitiatedLedgerEntry.CreditBlock;
|
|
760
|
-
|
|
761
|
-
currency: string;
|
|
762
|
-
|
|
763
|
-
customer: VoidInitiatedLedgerEntry.Customer;
|
|
764
|
-
|
|
765
|
-
description: string | null;
|
|
766
|
-
|
|
767
|
-
ending_balance: number;
|
|
768
|
-
|
|
769
|
-
entry_status: 'committed' | 'pending';
|
|
770
|
-
|
|
771
|
-
entry_type: 'void_initiated';
|
|
772
|
-
|
|
773
|
-
ledger_sequence_number: number;
|
|
774
|
-
|
|
775
|
-
/**
|
|
776
|
-
* User specified key-value pairs for the resource. If not present, this defaults
|
|
777
|
-
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
778
|
-
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
779
|
-
* `null`.
|
|
780
|
-
*/
|
|
781
|
-
metadata: Record<string, string>;
|
|
782
|
-
|
|
783
|
-
new_block_expiry_date: string;
|
|
784
|
-
|
|
785
|
-
starting_balance: number;
|
|
786
|
-
|
|
787
|
-
void_amount: number;
|
|
788
|
-
|
|
789
|
-
void_reason: string | null;
|
|
790
|
-
}
|
|
791
|
-
|
|
792
|
-
export namespace VoidInitiatedLedgerEntry {
|
|
793
|
-
export interface CreditBlock {
|
|
794
|
-
id: string;
|
|
795
|
-
|
|
796
|
-
expiry_date: string | null;
|
|
797
|
-
|
|
798
|
-
per_unit_cost_basis: string | null;
|
|
799
|
-
}
|
|
800
|
-
|
|
801
|
-
export interface Customer {
|
|
802
|
-
id: string;
|
|
803
|
-
|
|
804
|
-
external_customer_id: string | null;
|
|
805
|
-
}
|
|
806
|
-
}
|
|
807
|
-
|
|
808
|
-
export interface AmendmentLedgerEntry {
|
|
809
|
-
id: string;
|
|
810
|
-
|
|
811
|
-
amount: number;
|
|
812
|
-
|
|
813
|
-
created_at: string;
|
|
814
|
-
|
|
815
|
-
credit_block: AmendmentLedgerEntry.CreditBlock;
|
|
816
|
-
|
|
817
|
-
currency: string;
|
|
818
|
-
|
|
819
|
-
customer: AmendmentLedgerEntry.Customer;
|
|
820
|
-
|
|
821
|
-
description: string | null;
|
|
822
|
-
|
|
823
|
-
ending_balance: number;
|
|
824
|
-
|
|
825
|
-
entry_status: 'committed' | 'pending';
|
|
826
|
-
|
|
827
|
-
entry_type: 'amendment';
|
|
828
|
-
|
|
829
|
-
ledger_sequence_number: number;
|
|
830
|
-
|
|
831
|
-
/**
|
|
832
|
-
* User specified key-value pairs for the resource. If not present, this defaults
|
|
833
|
-
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
834
|
-
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
835
|
-
* `null`.
|
|
836
|
-
*/
|
|
837
|
-
metadata: Record<string, string>;
|
|
838
|
-
|
|
839
|
-
starting_balance: number;
|
|
840
|
-
}
|
|
841
|
-
|
|
842
|
-
export namespace AmendmentLedgerEntry {
|
|
843
|
-
export interface CreditBlock {
|
|
844
|
-
id: string;
|
|
845
|
-
|
|
846
|
-
expiry_date: string | null;
|
|
847
|
-
|
|
848
|
-
per_unit_cost_basis: string | null;
|
|
849
|
-
}
|
|
850
|
-
|
|
851
|
-
export interface Customer {
|
|
852
|
-
id: string;
|
|
853
|
-
|
|
854
|
-
external_customer_id: string | null;
|
|
855
|
-
}
|
|
856
|
-
}
|
|
857
|
-
}
|
|
858
|
-
|
|
859
|
-
/**
|
|
860
|
-
* The [Credit Ledger Entry resource](/product-catalog/prepurchase) models prepaid
|
|
861
|
-
* credits within Orb.
|
|
862
|
-
*/
|
|
863
|
-
export type LedgerCreateEntryResponse =
|
|
864
|
-
| LedgerCreateEntryResponse.IncrementLedgerEntry
|
|
865
|
-
| LedgerCreateEntryResponse.DecrementLedgerEntry
|
|
866
|
-
| LedgerCreateEntryResponse.ExpirationChangeLedgerEntry
|
|
867
|
-
| LedgerCreateEntryResponse.CreditBlockExpiryLedgerEntry
|
|
868
|
-
| LedgerCreateEntryResponse.VoidLedgerEntry
|
|
869
|
-
| LedgerCreateEntryResponse.VoidInitiatedLedgerEntry
|
|
870
|
-
| LedgerCreateEntryResponse.AmendmentLedgerEntry;
|
|
871
|
-
|
|
872
|
-
export namespace LedgerCreateEntryResponse {
|
|
873
|
-
export interface IncrementLedgerEntry {
|
|
874
|
-
id: string;
|
|
875
|
-
|
|
876
|
-
amount: number;
|
|
877
|
-
|
|
878
|
-
created_at: string;
|
|
879
|
-
|
|
880
|
-
credit_block: IncrementLedgerEntry.CreditBlock;
|
|
881
|
-
|
|
882
|
-
currency: string;
|
|
883
|
-
|
|
884
|
-
customer: IncrementLedgerEntry.Customer;
|
|
885
|
-
|
|
886
|
-
description: string | null;
|
|
887
|
-
|
|
888
|
-
ending_balance: number;
|
|
889
|
-
|
|
890
|
-
entry_status: 'committed' | 'pending';
|
|
891
|
-
|
|
892
|
-
entry_type: 'increment';
|
|
893
|
-
|
|
894
|
-
ledger_sequence_number: number;
|
|
895
|
-
|
|
896
|
-
/**
|
|
897
|
-
* User specified key-value pairs for the resource. If not present, this defaults
|
|
898
|
-
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
899
|
-
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
900
|
-
* `null`.
|
|
901
|
-
*/
|
|
902
|
-
metadata: Record<string, string>;
|
|
903
|
-
|
|
904
|
-
starting_balance: number;
|
|
905
|
-
|
|
906
|
-
/**
|
|
907
|
-
* If the increment resulted in invoice creation, the list of created invoices
|
|
908
|
-
*/
|
|
909
|
-
created_invoices?: Array<InvoicesAPI.Invoice> | null;
|
|
910
|
-
}
|
|
911
|
-
|
|
912
|
-
export namespace IncrementLedgerEntry {
|
|
913
|
-
export interface CreditBlock {
|
|
914
|
-
id: string;
|
|
915
|
-
|
|
916
|
-
expiry_date: string | null;
|
|
917
|
-
|
|
918
|
-
per_unit_cost_basis: string | null;
|
|
919
|
-
}
|
|
920
|
-
|
|
921
|
-
export interface Customer {
|
|
922
|
-
id: string;
|
|
923
|
-
|
|
924
|
-
external_customer_id: string | null;
|
|
925
|
-
}
|
|
926
|
-
}
|
|
927
|
-
|
|
928
|
-
export interface DecrementLedgerEntry {
|
|
929
|
-
id: string;
|
|
930
|
-
|
|
931
|
-
amount: number;
|
|
932
|
-
|
|
933
|
-
created_at: string;
|
|
934
|
-
|
|
935
|
-
credit_block: DecrementLedgerEntry.CreditBlock;
|
|
936
|
-
|
|
937
|
-
currency: string;
|
|
938
|
-
|
|
939
|
-
customer: DecrementLedgerEntry.Customer;
|
|
940
|
-
|
|
941
|
-
description: string | null;
|
|
942
|
-
|
|
943
|
-
ending_balance: number;
|
|
944
|
-
|
|
945
|
-
entry_status: 'committed' | 'pending';
|
|
946
|
-
|
|
947
|
-
entry_type: 'decrement';
|
|
948
|
-
|
|
949
|
-
ledger_sequence_number: number;
|
|
950
|
-
|
|
951
|
-
/**
|
|
952
|
-
* User specified key-value pairs for the resource. If not present, this defaults
|
|
953
|
-
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
954
|
-
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
955
|
-
* `null`.
|
|
956
|
-
*/
|
|
957
|
-
metadata: Record<string, string>;
|
|
958
|
-
|
|
959
|
-
starting_balance: number;
|
|
960
|
-
|
|
961
|
-
event_id?: string | null;
|
|
962
|
-
|
|
963
|
-
invoice_id?: string | null;
|
|
964
|
-
|
|
965
|
-
price_id?: string | null;
|
|
966
|
-
}
|
|
967
|
-
|
|
968
|
-
export namespace DecrementLedgerEntry {
|
|
969
|
-
export interface CreditBlock {
|
|
970
|
-
id: string;
|
|
971
|
-
|
|
972
|
-
expiry_date: string | null;
|
|
973
|
-
|
|
974
|
-
per_unit_cost_basis: string | null;
|
|
975
|
-
}
|
|
976
|
-
|
|
977
|
-
export interface Customer {
|
|
978
|
-
id: string;
|
|
979
|
-
|
|
980
|
-
external_customer_id: string | null;
|
|
981
|
-
}
|
|
982
|
-
}
|
|
983
|
-
|
|
984
|
-
export interface ExpirationChangeLedgerEntry {
|
|
985
|
-
id: string;
|
|
986
|
-
|
|
987
|
-
amount: number;
|
|
988
|
-
|
|
989
|
-
created_at: string;
|
|
990
|
-
|
|
991
|
-
credit_block: ExpirationChangeLedgerEntry.CreditBlock;
|
|
992
|
-
|
|
993
|
-
currency: string;
|
|
994
|
-
|
|
995
|
-
customer: ExpirationChangeLedgerEntry.Customer;
|
|
996
|
-
|
|
997
|
-
description: string | null;
|
|
998
|
-
|
|
999
|
-
ending_balance: number;
|
|
1000
|
-
|
|
1001
|
-
entry_status: 'committed' | 'pending';
|
|
1002
|
-
|
|
1003
|
-
entry_type: 'expiration_change';
|
|
1004
|
-
|
|
1005
|
-
ledger_sequence_number: number;
|
|
1006
|
-
|
|
1007
|
-
/**
|
|
1008
|
-
* User specified key-value pairs for the resource. If not present, this defaults
|
|
1009
|
-
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
1010
|
-
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
1011
|
-
* `null`.
|
|
1012
|
-
*/
|
|
1013
|
-
metadata: Record<string, string>;
|
|
1014
|
-
|
|
1015
|
-
new_block_expiry_date: string | null;
|
|
1016
|
-
|
|
1017
|
-
starting_balance: number;
|
|
1018
|
-
}
|
|
1019
|
-
|
|
1020
|
-
export namespace ExpirationChangeLedgerEntry {
|
|
1021
|
-
export interface CreditBlock {
|
|
1022
|
-
id: string;
|
|
1023
|
-
|
|
1024
|
-
expiry_date: string | null;
|
|
1025
|
-
|
|
1026
|
-
per_unit_cost_basis: string | null;
|
|
1027
|
-
}
|
|
1028
|
-
|
|
1029
|
-
export interface Customer {
|
|
1030
|
-
id: string;
|
|
1031
|
-
|
|
1032
|
-
external_customer_id: string | null;
|
|
1033
|
-
}
|
|
1034
|
-
}
|
|
1035
|
-
|
|
1036
|
-
export interface CreditBlockExpiryLedgerEntry {
|
|
1037
|
-
id: string;
|
|
1038
|
-
|
|
1039
|
-
amount: number;
|
|
1040
|
-
|
|
1041
|
-
created_at: string;
|
|
1042
|
-
|
|
1043
|
-
credit_block: CreditBlockExpiryLedgerEntry.CreditBlock;
|
|
1044
|
-
|
|
1045
|
-
currency: string;
|
|
1046
|
-
|
|
1047
|
-
customer: CreditBlockExpiryLedgerEntry.Customer;
|
|
1048
|
-
|
|
1049
|
-
description: string | null;
|
|
1050
|
-
|
|
1051
|
-
ending_balance: number;
|
|
1052
|
-
|
|
1053
|
-
entry_status: 'committed' | 'pending';
|
|
1054
|
-
|
|
1055
|
-
entry_type: 'credit_block_expiry';
|
|
1056
|
-
|
|
1057
|
-
ledger_sequence_number: number;
|
|
1058
|
-
|
|
1059
|
-
/**
|
|
1060
|
-
* User specified key-value pairs for the resource. If not present, this defaults
|
|
1061
|
-
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
1062
|
-
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
1063
|
-
* `null`.
|
|
1064
|
-
*/
|
|
1065
|
-
metadata: Record<string, string>;
|
|
1066
|
-
|
|
1067
|
-
starting_balance: number;
|
|
1068
|
-
}
|
|
1069
|
-
|
|
1070
|
-
export namespace CreditBlockExpiryLedgerEntry {
|
|
1071
|
-
export interface CreditBlock {
|
|
1072
|
-
id: string;
|
|
1073
|
-
|
|
1074
|
-
expiry_date: string | null;
|
|
1075
|
-
|
|
1076
|
-
per_unit_cost_basis: string | null;
|
|
1077
|
-
}
|
|
1078
|
-
|
|
1079
|
-
export interface Customer {
|
|
1080
|
-
id: string;
|
|
1081
|
-
|
|
1082
|
-
external_customer_id: string | null;
|
|
1083
|
-
}
|
|
1084
|
-
}
|
|
1085
|
-
|
|
1086
|
-
export interface VoidLedgerEntry {
|
|
1087
|
-
id: string;
|
|
1088
|
-
|
|
1089
|
-
amount: number;
|
|
1090
|
-
|
|
1091
|
-
created_at: string;
|
|
1092
|
-
|
|
1093
|
-
credit_block: VoidLedgerEntry.CreditBlock;
|
|
1094
|
-
|
|
1095
|
-
currency: string;
|
|
1096
|
-
|
|
1097
|
-
customer: VoidLedgerEntry.Customer;
|
|
1098
|
-
|
|
1099
|
-
description: string | null;
|
|
1100
|
-
|
|
1101
|
-
ending_balance: number;
|
|
1102
|
-
|
|
1103
|
-
entry_status: 'committed' | 'pending';
|
|
1104
|
-
|
|
1105
|
-
entry_type: 'void';
|
|
1106
|
-
|
|
1107
|
-
ledger_sequence_number: number;
|
|
1108
|
-
|
|
1109
|
-
/**
|
|
1110
|
-
* User specified key-value pairs for the resource. If not present, this defaults
|
|
1111
|
-
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
1112
|
-
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
1113
|
-
* `null`.
|
|
1114
|
-
*/
|
|
1115
|
-
metadata: Record<string, string>;
|
|
1116
|
-
|
|
1117
|
-
starting_balance: number;
|
|
1118
|
-
|
|
1119
|
-
void_amount: number;
|
|
1120
|
-
|
|
1121
|
-
void_reason: string | null;
|
|
1122
|
-
}
|
|
1123
|
-
|
|
1124
|
-
export namespace VoidLedgerEntry {
|
|
1125
|
-
export interface CreditBlock {
|
|
1126
|
-
id: string;
|
|
1127
|
-
|
|
1128
|
-
expiry_date: string | null;
|
|
1129
|
-
|
|
1130
|
-
per_unit_cost_basis: string | null;
|
|
1131
|
-
}
|
|
1132
|
-
|
|
1133
|
-
export interface Customer {
|
|
1134
|
-
id: string;
|
|
1135
|
-
|
|
1136
|
-
external_customer_id: string | null;
|
|
1137
|
-
}
|
|
1138
|
-
}
|
|
1139
|
-
|
|
1140
|
-
export interface VoidInitiatedLedgerEntry {
|
|
1141
|
-
id: string;
|
|
1142
|
-
|
|
1143
|
-
amount: number;
|
|
1144
|
-
|
|
1145
|
-
created_at: string;
|
|
1146
|
-
|
|
1147
|
-
credit_block: VoidInitiatedLedgerEntry.CreditBlock;
|
|
1148
|
-
|
|
1149
|
-
currency: string;
|
|
1150
|
-
|
|
1151
|
-
customer: VoidInitiatedLedgerEntry.Customer;
|
|
1152
|
-
|
|
1153
|
-
description: string | null;
|
|
1154
|
-
|
|
1155
|
-
ending_balance: number;
|
|
1156
|
-
|
|
1157
|
-
entry_status: 'committed' | 'pending';
|
|
1158
|
-
|
|
1159
|
-
entry_type: 'void_initiated';
|
|
1160
|
-
|
|
1161
|
-
ledger_sequence_number: number;
|
|
1162
|
-
|
|
1163
|
-
/**
|
|
1164
|
-
* User specified key-value pairs for the resource. If not present, this defaults
|
|
1165
|
-
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
1166
|
-
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
1167
|
-
* `null`.
|
|
1168
|
-
*/
|
|
1169
|
-
metadata: Record<string, string>;
|
|
1170
|
-
|
|
1171
|
-
new_block_expiry_date: string;
|
|
1172
|
-
|
|
1173
|
-
starting_balance: number;
|
|
1174
|
-
|
|
1175
|
-
void_amount: number;
|
|
1176
|
-
|
|
1177
|
-
void_reason: string | null;
|
|
1178
|
-
}
|
|
1179
|
-
|
|
1180
|
-
export namespace VoidInitiatedLedgerEntry {
|
|
1181
|
-
export interface CreditBlock {
|
|
1182
|
-
id: string;
|
|
1183
|
-
|
|
1184
|
-
expiry_date: string | null;
|
|
1185
|
-
|
|
1186
|
-
per_unit_cost_basis: string | null;
|
|
1187
|
-
}
|
|
1188
|
-
|
|
1189
|
-
export interface Customer {
|
|
1190
|
-
id: string;
|
|
1191
|
-
|
|
1192
|
-
external_customer_id: string | null;
|
|
1193
|
-
}
|
|
1194
|
-
}
|
|
1195
|
-
|
|
1196
|
-
export interface AmendmentLedgerEntry {
|
|
1197
|
-
id: string;
|
|
1198
|
-
|
|
1199
|
-
amount: number;
|
|
1200
|
-
|
|
1201
|
-
created_at: string;
|
|
1202
|
-
|
|
1203
|
-
credit_block: AmendmentLedgerEntry.CreditBlock;
|
|
1204
|
-
|
|
1205
|
-
currency: string;
|
|
1206
|
-
|
|
1207
|
-
customer: AmendmentLedgerEntry.Customer;
|
|
1208
|
-
|
|
1209
|
-
description: string | null;
|
|
1210
|
-
|
|
1211
|
-
ending_balance: number;
|
|
1212
|
-
|
|
1213
|
-
entry_status: 'committed' | 'pending';
|
|
1214
|
-
|
|
1215
|
-
entry_type: 'amendment';
|
|
1216
|
-
|
|
1217
|
-
ledger_sequence_number: number;
|
|
1218
|
-
|
|
1219
|
-
/**
|
|
1220
|
-
* User specified key-value pairs for the resource. If not present, this defaults
|
|
1221
|
-
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
1222
|
-
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
1223
|
-
* `null`.
|
|
1224
|
-
*/
|
|
1225
|
-
metadata: Record<string, string>;
|
|
1226
|
-
|
|
1227
|
-
starting_balance: number;
|
|
1228
|
-
}
|
|
1229
|
-
|
|
1230
|
-
export namespace AmendmentLedgerEntry {
|
|
1231
|
-
export interface CreditBlock {
|
|
1232
|
-
id: string;
|
|
1233
|
-
|
|
1234
|
-
expiry_date: string | null;
|
|
1235
|
-
|
|
1236
|
-
per_unit_cost_basis: string | null;
|
|
1237
|
-
}
|
|
1238
|
-
|
|
1239
|
-
export interface Customer {
|
|
1240
|
-
id: string;
|
|
1241
|
-
|
|
1242
|
-
external_customer_id: string | null;
|
|
1243
|
-
}
|
|
1244
|
-
}
|
|
1245
|
-
}
|
|
1246
|
-
|
|
1247
|
-
/**
|
|
1248
|
-
* The [Credit Ledger Entry resource](/product-catalog/prepurchase) models prepaid
|
|
1249
|
-
* credits within Orb.
|
|
1250
|
-
*/
|
|
1251
|
-
export type LedgerCreateEntryByExternalIDResponse =
|
|
1252
|
-
| LedgerCreateEntryByExternalIDResponse.IncrementLedgerEntry
|
|
1253
|
-
| LedgerCreateEntryByExternalIDResponse.DecrementLedgerEntry
|
|
1254
|
-
| LedgerCreateEntryByExternalIDResponse.ExpirationChangeLedgerEntry
|
|
1255
|
-
| LedgerCreateEntryByExternalIDResponse.CreditBlockExpiryLedgerEntry
|
|
1256
|
-
| LedgerCreateEntryByExternalIDResponse.VoidLedgerEntry
|
|
1257
|
-
| LedgerCreateEntryByExternalIDResponse.VoidInitiatedLedgerEntry
|
|
1258
|
-
| LedgerCreateEntryByExternalIDResponse.AmendmentLedgerEntry;
|
|
1259
|
-
|
|
1260
|
-
export namespace LedgerCreateEntryByExternalIDResponse {
|
|
1261
|
-
export interface IncrementLedgerEntry {
|
|
1262
|
-
id: string;
|
|
1263
|
-
|
|
1264
|
-
amount: number;
|
|
1265
|
-
|
|
1266
|
-
created_at: string;
|
|
1267
|
-
|
|
1268
|
-
credit_block: IncrementLedgerEntry.CreditBlock;
|
|
1269
|
-
|
|
1270
|
-
currency: string;
|
|
1271
|
-
|
|
1272
|
-
customer: IncrementLedgerEntry.Customer;
|
|
1273
|
-
|
|
1274
|
-
description: string | null;
|
|
1275
|
-
|
|
1276
|
-
ending_balance: number;
|
|
1277
|
-
|
|
1278
|
-
entry_status: 'committed' | 'pending';
|
|
1279
|
-
|
|
1280
|
-
entry_type: 'increment';
|
|
1281
|
-
|
|
1282
|
-
ledger_sequence_number: number;
|
|
1283
|
-
|
|
1284
|
-
/**
|
|
1285
|
-
* User specified key-value pairs for the resource. If not present, this defaults
|
|
1286
|
-
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
1287
|
-
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
1288
|
-
* `null`.
|
|
1289
|
-
*/
|
|
1290
|
-
metadata: Record<string, string>;
|
|
1291
|
-
|
|
1292
|
-
starting_balance: number;
|
|
1293
|
-
|
|
1294
|
-
/**
|
|
1295
|
-
* If the increment resulted in invoice creation, the list of created invoices
|
|
1296
|
-
*/
|
|
1297
|
-
created_invoices?: Array<InvoicesAPI.Invoice> | null;
|
|
1298
|
-
}
|
|
1299
|
-
|
|
1300
|
-
export namespace IncrementLedgerEntry {
|
|
1301
|
-
export interface CreditBlock {
|
|
1302
|
-
id: string;
|
|
1303
|
-
|
|
1304
|
-
expiry_date: string | null;
|
|
1305
|
-
|
|
1306
|
-
per_unit_cost_basis: string | null;
|
|
1307
|
-
}
|
|
1308
|
-
|
|
1309
|
-
export interface Customer {
|
|
1310
|
-
id: string;
|
|
1311
|
-
|
|
1312
|
-
external_customer_id: string | null;
|
|
1313
|
-
}
|
|
1314
|
-
}
|
|
1315
|
-
|
|
1316
|
-
export interface DecrementLedgerEntry {
|
|
1317
|
-
id: string;
|
|
1318
|
-
|
|
1319
|
-
amount: number;
|
|
1320
|
-
|
|
1321
|
-
created_at: string;
|
|
1322
|
-
|
|
1323
|
-
credit_block: DecrementLedgerEntry.CreditBlock;
|
|
1324
|
-
|
|
1325
|
-
currency: string;
|
|
1326
|
-
|
|
1327
|
-
customer: DecrementLedgerEntry.Customer;
|
|
1328
|
-
|
|
1329
|
-
description: string | null;
|
|
1330
|
-
|
|
1331
|
-
ending_balance: number;
|
|
1332
|
-
|
|
1333
|
-
entry_status: 'committed' | 'pending';
|
|
1334
|
-
|
|
1335
|
-
entry_type: 'decrement';
|
|
1336
|
-
|
|
1337
|
-
ledger_sequence_number: number;
|
|
1338
|
-
|
|
1339
|
-
/**
|
|
1340
|
-
* User specified key-value pairs for the resource. If not present, this defaults
|
|
1341
|
-
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
1342
|
-
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
1343
|
-
* `null`.
|
|
1344
|
-
*/
|
|
1345
|
-
metadata: Record<string, string>;
|
|
1346
|
-
|
|
1347
|
-
starting_balance: number;
|
|
1348
|
-
|
|
1349
|
-
event_id?: string | null;
|
|
1350
|
-
|
|
1351
|
-
invoice_id?: string | null;
|
|
1352
|
-
|
|
1353
|
-
price_id?: string | null;
|
|
1354
|
-
}
|
|
1355
|
-
|
|
1356
|
-
export namespace DecrementLedgerEntry {
|
|
1357
|
-
export interface CreditBlock {
|
|
1358
|
-
id: string;
|
|
1359
|
-
|
|
1360
|
-
expiry_date: string | null;
|
|
1361
|
-
|
|
1362
|
-
per_unit_cost_basis: string | null;
|
|
1363
|
-
}
|
|
1364
|
-
|
|
1365
|
-
export interface Customer {
|
|
1366
|
-
id: string;
|
|
1367
|
-
|
|
1368
|
-
external_customer_id: string | null;
|
|
1369
|
-
}
|
|
1370
|
-
}
|
|
1371
|
-
|
|
1372
|
-
export interface ExpirationChangeLedgerEntry {
|
|
1373
|
-
id: string;
|
|
1374
|
-
|
|
1375
|
-
amount: number;
|
|
1376
|
-
|
|
1377
|
-
created_at: string;
|
|
1378
|
-
|
|
1379
|
-
credit_block: ExpirationChangeLedgerEntry.CreditBlock;
|
|
1380
|
-
|
|
1381
|
-
currency: string;
|
|
1382
|
-
|
|
1383
|
-
customer: ExpirationChangeLedgerEntry.Customer;
|
|
1384
|
-
|
|
1385
|
-
description: string | null;
|
|
1386
|
-
|
|
1387
|
-
ending_balance: number;
|
|
1388
|
-
|
|
1389
|
-
entry_status: 'committed' | 'pending';
|
|
1390
|
-
|
|
1391
|
-
entry_type: 'expiration_change';
|
|
1392
|
-
|
|
1393
|
-
ledger_sequence_number: number;
|
|
1394
|
-
|
|
1395
|
-
/**
|
|
1396
|
-
* User specified key-value pairs for the resource. If not present, this defaults
|
|
1397
|
-
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
1398
|
-
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
1399
|
-
* `null`.
|
|
1400
|
-
*/
|
|
1401
|
-
metadata: Record<string, string>;
|
|
1402
|
-
|
|
1403
|
-
new_block_expiry_date: string | null;
|
|
1404
|
-
|
|
1405
|
-
starting_balance: number;
|
|
1406
|
-
}
|
|
1407
|
-
|
|
1408
|
-
export namespace ExpirationChangeLedgerEntry {
|
|
1409
|
-
export interface CreditBlock {
|
|
1410
|
-
id: string;
|
|
1411
|
-
|
|
1412
|
-
expiry_date: string | null;
|
|
1413
|
-
|
|
1414
|
-
per_unit_cost_basis: string | null;
|
|
1415
|
-
}
|
|
1416
|
-
|
|
1417
|
-
export interface Customer {
|
|
1418
|
-
id: string;
|
|
1419
|
-
|
|
1420
|
-
external_customer_id: string | null;
|
|
1421
|
-
}
|
|
1422
|
-
}
|
|
1423
|
-
|
|
1424
|
-
export interface CreditBlockExpiryLedgerEntry {
|
|
1425
|
-
id: string;
|
|
1426
|
-
|
|
1427
|
-
amount: number;
|
|
1428
|
-
|
|
1429
|
-
created_at: string;
|
|
1430
|
-
|
|
1431
|
-
credit_block: CreditBlockExpiryLedgerEntry.CreditBlock;
|
|
1432
|
-
|
|
1433
|
-
currency: string;
|
|
1434
|
-
|
|
1435
|
-
customer: CreditBlockExpiryLedgerEntry.Customer;
|
|
1436
|
-
|
|
1437
|
-
description: string | null;
|
|
1438
|
-
|
|
1439
|
-
ending_balance: number;
|
|
471
|
+
export interface AffectedBlock {
|
|
472
|
+
id: string;
|
|
1440
473
|
|
|
1441
|
-
|
|
474
|
+
expiry_date: string | null;
|
|
1442
475
|
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
ledger_sequence_number: number;
|
|
1446
|
-
|
|
1447
|
-
/**
|
|
1448
|
-
* User specified key-value pairs for the resource. If not present, this defaults
|
|
1449
|
-
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
1450
|
-
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
1451
|
-
* `null`.
|
|
1452
|
-
*/
|
|
1453
|
-
metadata: Record<string, string>;
|
|
1454
|
-
|
|
1455
|
-
starting_balance: number;
|
|
1456
|
-
}
|
|
1457
|
-
|
|
1458
|
-
export namespace CreditBlockExpiryLedgerEntry {
|
|
1459
|
-
export interface CreditBlock {
|
|
1460
|
-
id: string;
|
|
1461
|
-
|
|
1462
|
-
expiry_date: string | null;
|
|
1463
|
-
|
|
1464
|
-
per_unit_cost_basis: string | null;
|
|
1465
|
-
}
|
|
1466
|
-
|
|
1467
|
-
export interface Customer {
|
|
1468
|
-
id: string;
|
|
1469
|
-
|
|
1470
|
-
external_customer_id: string | null;
|
|
1471
|
-
}
|
|
1472
|
-
}
|
|
1473
|
-
|
|
1474
|
-
export interface VoidLedgerEntry {
|
|
1475
|
-
id: string;
|
|
1476
|
-
|
|
1477
|
-
amount: number;
|
|
1478
|
-
|
|
1479
|
-
created_at: string;
|
|
1480
|
-
|
|
1481
|
-
credit_block: VoidLedgerEntry.CreditBlock;
|
|
1482
|
-
|
|
1483
|
-
currency: string;
|
|
1484
|
-
|
|
1485
|
-
customer: VoidLedgerEntry.Customer;
|
|
1486
|
-
|
|
1487
|
-
description: string | null;
|
|
1488
|
-
|
|
1489
|
-
ending_balance: number;
|
|
1490
|
-
|
|
1491
|
-
entry_status: 'committed' | 'pending';
|
|
1492
|
-
|
|
1493
|
-
entry_type: 'void';
|
|
1494
|
-
|
|
1495
|
-
ledger_sequence_number: number;
|
|
1496
|
-
|
|
1497
|
-
/**
|
|
1498
|
-
* User specified key-value pairs for the resource. If not present, this defaults
|
|
1499
|
-
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
1500
|
-
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
1501
|
-
* `null`.
|
|
1502
|
-
*/
|
|
1503
|
-
metadata: Record<string, string>;
|
|
1504
|
-
|
|
1505
|
-
starting_balance: number;
|
|
1506
|
-
|
|
1507
|
-
void_amount: number;
|
|
1508
|
-
|
|
1509
|
-
void_reason: string | null;
|
|
1510
|
-
}
|
|
1511
|
-
|
|
1512
|
-
export namespace VoidLedgerEntry {
|
|
1513
|
-
export interface CreditBlock {
|
|
1514
|
-
id: string;
|
|
1515
|
-
|
|
1516
|
-
expiry_date: string | null;
|
|
1517
|
-
|
|
1518
|
-
per_unit_cost_basis: string | null;
|
|
1519
|
-
}
|
|
1520
|
-
|
|
1521
|
-
export interface Customer {
|
|
1522
|
-
id: string;
|
|
1523
|
-
|
|
1524
|
-
external_customer_id: string | null;
|
|
1525
|
-
}
|
|
1526
|
-
}
|
|
1527
|
-
|
|
1528
|
-
export interface VoidInitiatedLedgerEntry {
|
|
1529
|
-
id: string;
|
|
1530
|
-
|
|
1531
|
-
amount: number;
|
|
1532
|
-
|
|
1533
|
-
created_at: string;
|
|
1534
|
-
|
|
1535
|
-
credit_block: VoidInitiatedLedgerEntry.CreditBlock;
|
|
1536
|
-
|
|
1537
|
-
currency: string;
|
|
1538
|
-
|
|
1539
|
-
customer: VoidInitiatedLedgerEntry.Customer;
|
|
1540
|
-
|
|
1541
|
-
description: string | null;
|
|
1542
|
-
|
|
1543
|
-
ending_balance: number;
|
|
1544
|
-
|
|
1545
|
-
entry_status: 'committed' | 'pending';
|
|
1546
|
-
|
|
1547
|
-
entry_type: 'void_initiated';
|
|
1548
|
-
|
|
1549
|
-
ledger_sequence_number: number;
|
|
1550
|
-
|
|
1551
|
-
/**
|
|
1552
|
-
* User specified key-value pairs for the resource. If not present, this defaults
|
|
1553
|
-
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
1554
|
-
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
1555
|
-
* `null`.
|
|
1556
|
-
*/
|
|
1557
|
-
metadata: Record<string, string>;
|
|
1558
|
-
|
|
1559
|
-
new_block_expiry_date: string;
|
|
1560
|
-
|
|
1561
|
-
starting_balance: number;
|
|
1562
|
-
|
|
1563
|
-
void_amount: number;
|
|
1564
|
-
|
|
1565
|
-
void_reason: string | null;
|
|
1566
|
-
}
|
|
1567
|
-
|
|
1568
|
-
export namespace VoidInitiatedLedgerEntry {
|
|
1569
|
-
export interface CreditBlock {
|
|
1570
|
-
id: string;
|
|
1571
|
-
|
|
1572
|
-
expiry_date: string | null;
|
|
1573
|
-
|
|
1574
|
-
per_unit_cost_basis: string | null;
|
|
1575
|
-
}
|
|
1576
|
-
|
|
1577
|
-
export interface Customer {
|
|
1578
|
-
id: string;
|
|
1579
|
-
|
|
1580
|
-
external_customer_id: string | null;
|
|
1581
|
-
}
|
|
1582
|
-
}
|
|
1583
|
-
|
|
1584
|
-
export interface AmendmentLedgerEntry {
|
|
1585
|
-
id: string;
|
|
1586
|
-
|
|
1587
|
-
amount: number;
|
|
1588
|
-
|
|
1589
|
-
created_at: string;
|
|
1590
|
-
|
|
1591
|
-
credit_block: AmendmentLedgerEntry.CreditBlock;
|
|
1592
|
-
|
|
1593
|
-
currency: string;
|
|
1594
|
-
|
|
1595
|
-
customer: AmendmentLedgerEntry.Customer;
|
|
1596
|
-
|
|
1597
|
-
description: string | null;
|
|
1598
|
-
|
|
1599
|
-
ending_balance: number;
|
|
1600
|
-
|
|
1601
|
-
entry_status: 'committed' | 'pending';
|
|
1602
|
-
|
|
1603
|
-
entry_type: 'amendment';
|
|
1604
|
-
|
|
1605
|
-
ledger_sequence_number: number;
|
|
1606
|
-
|
|
1607
|
-
/**
|
|
1608
|
-
* User specified key-value pairs for the resource. If not present, this defaults
|
|
1609
|
-
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
1610
|
-
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
1611
|
-
* `null`.
|
|
1612
|
-
*/
|
|
1613
|
-
metadata: Record<string, string>;
|
|
1614
|
-
|
|
1615
|
-
starting_balance: number;
|
|
1616
|
-
}
|
|
1617
|
-
|
|
1618
|
-
export namespace AmendmentLedgerEntry {
|
|
1619
|
-
export interface CreditBlock {
|
|
1620
|
-
id: string;
|
|
1621
|
-
|
|
1622
|
-
expiry_date: string | null;
|
|
1623
|
-
|
|
1624
|
-
per_unit_cost_basis: string | null;
|
|
1625
|
-
}
|
|
1626
|
-
|
|
1627
|
-
export interface Customer {
|
|
1628
|
-
id: string;
|
|
1629
|
-
|
|
1630
|
-
external_customer_id: string | null;
|
|
1631
|
-
}
|
|
1632
|
-
}
|
|
476
|
+
per_unit_cost_basis: string | null;
|
|
1633
477
|
}
|
|
1634
478
|
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
* credits within Orb.
|
|
1638
|
-
*/
|
|
1639
|
-
export type LedgerListByExternalIDResponse =
|
|
1640
|
-
| LedgerListByExternalIDResponse.IncrementLedgerEntry
|
|
1641
|
-
| LedgerListByExternalIDResponse.DecrementLedgerEntry
|
|
1642
|
-
| LedgerListByExternalIDResponse.ExpirationChangeLedgerEntry
|
|
1643
|
-
| LedgerListByExternalIDResponse.CreditBlockExpiryLedgerEntry
|
|
1644
|
-
| LedgerListByExternalIDResponse.VoidLedgerEntry
|
|
1645
|
-
| LedgerListByExternalIDResponse.VoidInitiatedLedgerEntry
|
|
1646
|
-
| LedgerListByExternalIDResponse.AmendmentLedgerEntry;
|
|
1647
|
-
|
|
1648
|
-
export namespace LedgerListByExternalIDResponse {
|
|
1649
|
-
export interface IncrementLedgerEntry {
|
|
1650
|
-
id: string;
|
|
1651
|
-
|
|
1652
|
-
amount: number;
|
|
1653
|
-
|
|
1654
|
-
created_at: string;
|
|
1655
|
-
|
|
1656
|
-
credit_block: IncrementLedgerEntry.CreditBlock;
|
|
1657
|
-
|
|
1658
|
-
currency: string;
|
|
1659
|
-
|
|
1660
|
-
customer: IncrementLedgerEntry.Customer;
|
|
1661
|
-
|
|
1662
|
-
description: string | null;
|
|
1663
|
-
|
|
1664
|
-
ending_balance: number;
|
|
1665
|
-
|
|
1666
|
-
entry_status: 'committed' | 'pending';
|
|
1667
|
-
|
|
1668
|
-
entry_type: 'increment';
|
|
1669
|
-
|
|
1670
|
-
ledger_sequence_number: number;
|
|
1671
|
-
|
|
1672
|
-
/**
|
|
1673
|
-
* User specified key-value pairs for the resource. If not present, this defaults
|
|
1674
|
-
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
1675
|
-
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
1676
|
-
* `null`.
|
|
1677
|
-
*/
|
|
1678
|
-
metadata: Record<string, string>;
|
|
1679
|
-
|
|
1680
|
-
starting_balance: number;
|
|
1681
|
-
|
|
1682
|
-
/**
|
|
1683
|
-
* If the increment resulted in invoice creation, the list of created invoices
|
|
1684
|
-
*/
|
|
1685
|
-
created_invoices?: Array<InvoicesAPI.Invoice> | null;
|
|
1686
|
-
}
|
|
1687
|
-
|
|
1688
|
-
export namespace IncrementLedgerEntry {
|
|
1689
|
-
export interface CreditBlock {
|
|
1690
|
-
id: string;
|
|
1691
|
-
|
|
1692
|
-
expiry_date: string | null;
|
|
1693
|
-
|
|
1694
|
-
per_unit_cost_basis: string | null;
|
|
1695
|
-
}
|
|
1696
|
-
|
|
1697
|
-
export interface Customer {
|
|
1698
|
-
id: string;
|
|
1699
|
-
|
|
1700
|
-
external_customer_id: string | null;
|
|
1701
|
-
}
|
|
1702
|
-
}
|
|
1703
|
-
|
|
1704
|
-
export interface DecrementLedgerEntry {
|
|
1705
|
-
id: string;
|
|
1706
|
-
|
|
1707
|
-
amount: number;
|
|
1708
|
-
|
|
1709
|
-
created_at: string;
|
|
1710
|
-
|
|
1711
|
-
credit_block: DecrementLedgerEntry.CreditBlock;
|
|
1712
|
-
|
|
1713
|
-
currency: string;
|
|
1714
|
-
|
|
1715
|
-
customer: DecrementLedgerEntry.Customer;
|
|
1716
|
-
|
|
1717
|
-
description: string | null;
|
|
1718
|
-
|
|
1719
|
-
ending_balance: number;
|
|
1720
|
-
|
|
1721
|
-
entry_status: 'committed' | 'pending';
|
|
1722
|
-
|
|
1723
|
-
entry_type: 'decrement';
|
|
1724
|
-
|
|
1725
|
-
ledger_sequence_number: number;
|
|
1726
|
-
|
|
1727
|
-
/**
|
|
1728
|
-
* User specified key-value pairs for the resource. If not present, this defaults
|
|
1729
|
-
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
1730
|
-
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
1731
|
-
* `null`.
|
|
1732
|
-
*/
|
|
1733
|
-
metadata: Record<string, string>;
|
|
1734
|
-
|
|
1735
|
-
starting_balance: number;
|
|
479
|
+
export interface AmendmentLedgerEntry {
|
|
480
|
+
id: string;
|
|
1736
481
|
|
|
1737
|
-
|
|
482
|
+
amount: number;
|
|
1738
483
|
|
|
1739
|
-
|
|
484
|
+
created_at: string;
|
|
1740
485
|
|
|
1741
|
-
|
|
1742
|
-
}
|
|
486
|
+
credit_block: AffectedBlock;
|
|
1743
487
|
|
|
1744
|
-
|
|
1745
|
-
export interface CreditBlock {
|
|
1746
|
-
id: string;
|
|
488
|
+
currency: string;
|
|
1747
489
|
|
|
1748
|
-
|
|
490
|
+
customer: Shared.CustomerMinified;
|
|
1749
491
|
|
|
1750
|
-
|
|
1751
|
-
}
|
|
492
|
+
description: string | null;
|
|
1752
493
|
|
|
1753
|
-
|
|
1754
|
-
id: string;
|
|
494
|
+
ending_balance: number;
|
|
1755
495
|
|
|
1756
|
-
|
|
1757
|
-
}
|
|
1758
|
-
}
|
|
496
|
+
entry_status: 'committed' | 'pending';
|
|
1759
497
|
|
|
1760
|
-
|
|
1761
|
-
id: string;
|
|
498
|
+
entry_type: 'amendment';
|
|
1762
499
|
|
|
1763
|
-
|
|
500
|
+
ledger_sequence_number: number;
|
|
1764
501
|
|
|
1765
|
-
|
|
502
|
+
/**
|
|
503
|
+
* User specified key-value pairs for the resource. If not present, this defaults
|
|
504
|
+
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
505
|
+
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
506
|
+
* `null`.
|
|
507
|
+
*/
|
|
508
|
+
metadata: { [key: string]: string };
|
|
1766
509
|
|
|
1767
|
-
|
|
510
|
+
starting_balance: number;
|
|
511
|
+
}
|
|
1768
512
|
|
|
1769
|
-
|
|
513
|
+
export interface CreditBlockExpiryLedgerEntry {
|
|
514
|
+
id: string;
|
|
1770
515
|
|
|
1771
|
-
|
|
516
|
+
amount: number;
|
|
1772
517
|
|
|
1773
|
-
|
|
518
|
+
created_at: string;
|
|
1774
519
|
|
|
1775
|
-
|
|
520
|
+
credit_block: AffectedBlock;
|
|
1776
521
|
|
|
1777
|
-
|
|
522
|
+
currency: string;
|
|
1778
523
|
|
|
1779
|
-
|
|
524
|
+
customer: Shared.CustomerMinified;
|
|
1780
525
|
|
|
1781
|
-
|
|
526
|
+
description: string | null;
|
|
1782
527
|
|
|
1783
|
-
|
|
1784
|
-
* User specified key-value pairs for the resource. If not present, this defaults
|
|
1785
|
-
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
1786
|
-
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
1787
|
-
* `null`.
|
|
1788
|
-
*/
|
|
1789
|
-
metadata: Record<string, string>;
|
|
528
|
+
ending_balance: number;
|
|
1790
529
|
|
|
1791
|
-
|
|
530
|
+
entry_status: 'committed' | 'pending';
|
|
1792
531
|
|
|
1793
|
-
|
|
1794
|
-
}
|
|
532
|
+
entry_type: 'credit_block_expiry';
|
|
1795
533
|
|
|
1796
|
-
|
|
1797
|
-
export interface CreditBlock {
|
|
1798
|
-
id: string;
|
|
534
|
+
ledger_sequence_number: number;
|
|
1799
535
|
|
|
1800
|
-
|
|
536
|
+
/**
|
|
537
|
+
* User specified key-value pairs for the resource. If not present, this defaults
|
|
538
|
+
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
539
|
+
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
540
|
+
* `null`.
|
|
541
|
+
*/
|
|
542
|
+
metadata: { [key: string]: string };
|
|
1801
543
|
|
|
1802
|
-
|
|
1803
|
-
|
|
544
|
+
starting_balance: number;
|
|
545
|
+
}
|
|
1804
546
|
|
|
1805
|
-
|
|
1806
|
-
|
|
547
|
+
export interface DecrementLedgerEntry {
|
|
548
|
+
id: string;
|
|
1807
549
|
|
|
1808
|
-
|
|
1809
|
-
}
|
|
1810
|
-
}
|
|
550
|
+
amount: number;
|
|
1811
551
|
|
|
1812
|
-
|
|
1813
|
-
id: string;
|
|
552
|
+
created_at: string;
|
|
1814
553
|
|
|
1815
|
-
|
|
554
|
+
credit_block: AffectedBlock;
|
|
1816
555
|
|
|
1817
|
-
|
|
556
|
+
currency: string;
|
|
1818
557
|
|
|
1819
|
-
|
|
558
|
+
customer: Shared.CustomerMinified;
|
|
1820
559
|
|
|
1821
|
-
|
|
560
|
+
description: string | null;
|
|
1822
561
|
|
|
1823
|
-
|
|
562
|
+
ending_balance: number;
|
|
1824
563
|
|
|
1825
|
-
|
|
564
|
+
entry_status: 'committed' | 'pending';
|
|
1826
565
|
|
|
1827
|
-
|
|
566
|
+
entry_type: 'decrement';
|
|
1828
567
|
|
|
1829
|
-
|
|
568
|
+
ledger_sequence_number: number;
|
|
1830
569
|
|
|
1831
|
-
|
|
570
|
+
/**
|
|
571
|
+
* User specified key-value pairs for the resource. If not present, this defaults
|
|
572
|
+
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
573
|
+
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
574
|
+
* `null`.
|
|
575
|
+
*/
|
|
576
|
+
metadata: { [key: string]: string };
|
|
1832
577
|
|
|
1833
|
-
|
|
578
|
+
starting_balance: number;
|
|
1834
579
|
|
|
1835
|
-
|
|
1836
|
-
* User specified key-value pairs for the resource. If not present, this defaults
|
|
1837
|
-
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
1838
|
-
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
1839
|
-
* `null`.
|
|
1840
|
-
*/
|
|
1841
|
-
metadata: Record<string, string>;
|
|
580
|
+
event_id?: string | null;
|
|
1842
581
|
|
|
1843
|
-
|
|
1844
|
-
}
|
|
582
|
+
invoice_id?: string | null;
|
|
1845
583
|
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
id: string;
|
|
584
|
+
price_id?: string | null;
|
|
585
|
+
}
|
|
1849
586
|
|
|
1850
|
-
|
|
587
|
+
export interface ExpirationChangeLedgerEntry {
|
|
588
|
+
id: string;
|
|
1851
589
|
|
|
1852
|
-
|
|
1853
|
-
}
|
|
590
|
+
amount: number;
|
|
1854
591
|
|
|
1855
|
-
|
|
1856
|
-
id: string;
|
|
592
|
+
created_at: string;
|
|
1857
593
|
|
|
1858
|
-
|
|
1859
|
-
}
|
|
1860
|
-
}
|
|
594
|
+
credit_block: AffectedBlock;
|
|
1861
595
|
|
|
1862
|
-
|
|
1863
|
-
id: string;
|
|
596
|
+
currency: string;
|
|
1864
597
|
|
|
1865
|
-
|
|
598
|
+
customer: Shared.CustomerMinified;
|
|
1866
599
|
|
|
1867
|
-
|
|
600
|
+
description: string | null;
|
|
1868
601
|
|
|
1869
|
-
|
|
602
|
+
ending_balance: number;
|
|
1870
603
|
|
|
1871
|
-
|
|
604
|
+
entry_status: 'committed' | 'pending';
|
|
1872
605
|
|
|
1873
|
-
|
|
606
|
+
entry_type: 'expiration_change';
|
|
1874
607
|
|
|
1875
|
-
|
|
608
|
+
ledger_sequence_number: number;
|
|
1876
609
|
|
|
1877
|
-
|
|
610
|
+
/**
|
|
611
|
+
* User specified key-value pairs for the resource. If not present, this defaults
|
|
612
|
+
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
613
|
+
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
614
|
+
* `null`.
|
|
615
|
+
*/
|
|
616
|
+
metadata: { [key: string]: string };
|
|
1878
617
|
|
|
1879
|
-
|
|
618
|
+
new_block_expiry_date: string | null;
|
|
1880
619
|
|
|
1881
|
-
|
|
620
|
+
starting_balance: number;
|
|
621
|
+
}
|
|
1882
622
|
|
|
1883
|
-
|
|
623
|
+
export interface IncrementLedgerEntry {
|
|
624
|
+
id: string;
|
|
1884
625
|
|
|
1885
|
-
|
|
1886
|
-
* User specified key-value pairs for the resource. If not present, this defaults
|
|
1887
|
-
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
1888
|
-
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
1889
|
-
* `null`.
|
|
1890
|
-
*/
|
|
1891
|
-
metadata: Record<string, string>;
|
|
626
|
+
amount: number;
|
|
1892
627
|
|
|
1893
|
-
|
|
628
|
+
created_at: string;
|
|
1894
629
|
|
|
1895
|
-
|
|
630
|
+
credit_block: AffectedBlock;
|
|
1896
631
|
|
|
1897
|
-
|
|
1898
|
-
}
|
|
632
|
+
currency: string;
|
|
1899
633
|
|
|
1900
|
-
|
|
1901
|
-
export interface CreditBlock {
|
|
1902
|
-
id: string;
|
|
634
|
+
customer: Shared.CustomerMinified;
|
|
1903
635
|
|
|
1904
|
-
|
|
636
|
+
description: string | null;
|
|
1905
637
|
|
|
1906
|
-
|
|
1907
|
-
}
|
|
638
|
+
ending_balance: number;
|
|
1908
639
|
|
|
1909
|
-
|
|
1910
|
-
id: string;
|
|
640
|
+
entry_status: 'committed' | 'pending';
|
|
1911
641
|
|
|
1912
|
-
|
|
1913
|
-
}
|
|
1914
|
-
}
|
|
642
|
+
entry_type: 'increment';
|
|
1915
643
|
|
|
1916
|
-
|
|
1917
|
-
id: string;
|
|
644
|
+
ledger_sequence_number: number;
|
|
1918
645
|
|
|
1919
|
-
|
|
646
|
+
/**
|
|
647
|
+
* User specified key-value pairs for the resource. If not present, this defaults
|
|
648
|
+
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
649
|
+
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
650
|
+
* `null`.
|
|
651
|
+
*/
|
|
652
|
+
metadata: { [key: string]: string };
|
|
1920
653
|
|
|
1921
|
-
|
|
654
|
+
starting_balance: number;
|
|
1922
655
|
|
|
1923
|
-
|
|
656
|
+
/**
|
|
657
|
+
* If the increment resulted in invoice creation, the list of created invoices
|
|
658
|
+
*/
|
|
659
|
+
created_invoices?: Array<Shared.Invoice> | null;
|
|
660
|
+
}
|
|
1924
661
|
|
|
1925
|
-
|
|
662
|
+
export interface VoidInitiatedLedgerEntry {
|
|
663
|
+
id: string;
|
|
1926
664
|
|
|
1927
|
-
|
|
665
|
+
amount: number;
|
|
1928
666
|
|
|
1929
|
-
|
|
667
|
+
created_at: string;
|
|
1930
668
|
|
|
1931
|
-
|
|
669
|
+
credit_block: AffectedBlock;
|
|
1932
670
|
|
|
1933
|
-
|
|
671
|
+
currency: string;
|
|
1934
672
|
|
|
1935
|
-
|
|
673
|
+
customer: Shared.CustomerMinified;
|
|
1936
674
|
|
|
1937
|
-
|
|
675
|
+
description: string | null;
|
|
1938
676
|
|
|
1939
|
-
|
|
1940
|
-
* User specified key-value pairs for the resource. If not present, this defaults
|
|
1941
|
-
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
1942
|
-
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
1943
|
-
* `null`.
|
|
1944
|
-
*/
|
|
1945
|
-
metadata: Record<string, string>;
|
|
677
|
+
ending_balance: number;
|
|
1946
678
|
|
|
1947
|
-
|
|
679
|
+
entry_status: 'committed' | 'pending';
|
|
1948
680
|
|
|
1949
|
-
|
|
681
|
+
entry_type: 'void_initiated';
|
|
1950
682
|
|
|
1951
|
-
|
|
683
|
+
ledger_sequence_number: number;
|
|
1952
684
|
|
|
1953
|
-
|
|
1954
|
-
|
|
685
|
+
/**
|
|
686
|
+
* User specified key-value pairs for the resource. If not present, this defaults
|
|
687
|
+
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
688
|
+
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
689
|
+
* `null`.
|
|
690
|
+
*/
|
|
691
|
+
metadata: { [key: string]: string };
|
|
1955
692
|
|
|
1956
|
-
|
|
1957
|
-
export interface CreditBlock {
|
|
1958
|
-
id: string;
|
|
693
|
+
new_block_expiry_date: string;
|
|
1959
694
|
|
|
1960
|
-
|
|
695
|
+
starting_balance: number;
|
|
1961
696
|
|
|
1962
|
-
|
|
1963
|
-
}
|
|
697
|
+
void_amount: number;
|
|
1964
698
|
|
|
1965
|
-
|
|
1966
|
-
|
|
699
|
+
void_reason: string | null;
|
|
700
|
+
}
|
|
1967
701
|
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
}
|
|
702
|
+
export interface VoidLedgerEntry {
|
|
703
|
+
id: string;
|
|
1971
704
|
|
|
1972
|
-
|
|
1973
|
-
id: string;
|
|
705
|
+
amount: number;
|
|
1974
706
|
|
|
1975
|
-
|
|
707
|
+
created_at: string;
|
|
1976
708
|
|
|
1977
|
-
|
|
709
|
+
credit_block: AffectedBlock;
|
|
1978
710
|
|
|
1979
|
-
|
|
711
|
+
currency: string;
|
|
1980
712
|
|
|
1981
|
-
|
|
713
|
+
customer: Shared.CustomerMinified;
|
|
1982
714
|
|
|
1983
|
-
|
|
715
|
+
description: string | null;
|
|
1984
716
|
|
|
1985
|
-
|
|
717
|
+
ending_balance: number;
|
|
1986
718
|
|
|
1987
|
-
|
|
719
|
+
entry_status: 'committed' | 'pending';
|
|
1988
720
|
|
|
1989
|
-
|
|
721
|
+
entry_type: 'void';
|
|
1990
722
|
|
|
1991
|
-
|
|
723
|
+
ledger_sequence_number: number;
|
|
1992
724
|
|
|
1993
|
-
|
|
725
|
+
/**
|
|
726
|
+
* User specified key-value pairs for the resource. If not present, this defaults
|
|
727
|
+
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
728
|
+
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
729
|
+
* `null`.
|
|
730
|
+
*/
|
|
731
|
+
metadata: { [key: string]: string };
|
|
1994
732
|
|
|
1995
|
-
|
|
1996
|
-
* User specified key-value pairs for the resource. If not present, this defaults
|
|
1997
|
-
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
1998
|
-
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
1999
|
-
* `null`.
|
|
2000
|
-
*/
|
|
2001
|
-
metadata: Record<string, string>;
|
|
733
|
+
starting_balance: number;
|
|
2002
734
|
|
|
2003
|
-
|
|
2004
|
-
}
|
|
735
|
+
void_amount: number;
|
|
2005
736
|
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
id: string;
|
|
737
|
+
void_reason: string | null;
|
|
738
|
+
}
|
|
2009
739
|
|
|
2010
|
-
|
|
740
|
+
/**
|
|
741
|
+
* The [Credit Ledger Entry resource](/product-catalog/prepurchase) models prepaid
|
|
742
|
+
* credits within Orb.
|
|
743
|
+
*/
|
|
744
|
+
export type LedgerListResponse =
|
|
745
|
+
| IncrementLedgerEntry
|
|
746
|
+
| DecrementLedgerEntry
|
|
747
|
+
| ExpirationChangeLedgerEntry
|
|
748
|
+
| CreditBlockExpiryLedgerEntry
|
|
749
|
+
| VoidLedgerEntry
|
|
750
|
+
| VoidInitiatedLedgerEntry
|
|
751
|
+
| AmendmentLedgerEntry;
|
|
2011
752
|
|
|
2012
|
-
|
|
2013
|
-
|
|
753
|
+
/**
|
|
754
|
+
* The [Credit Ledger Entry resource](/product-catalog/prepurchase) models prepaid
|
|
755
|
+
* credits within Orb.
|
|
756
|
+
*/
|
|
757
|
+
export type LedgerCreateEntryResponse =
|
|
758
|
+
| IncrementLedgerEntry
|
|
759
|
+
| DecrementLedgerEntry
|
|
760
|
+
| ExpirationChangeLedgerEntry
|
|
761
|
+
| CreditBlockExpiryLedgerEntry
|
|
762
|
+
| VoidLedgerEntry
|
|
763
|
+
| VoidInitiatedLedgerEntry
|
|
764
|
+
| AmendmentLedgerEntry;
|
|
2014
765
|
|
|
2015
|
-
|
|
2016
|
-
|
|
766
|
+
/**
|
|
767
|
+
* The [Credit Ledger Entry resource](/product-catalog/prepurchase) models prepaid
|
|
768
|
+
* credits within Orb.
|
|
769
|
+
*/
|
|
770
|
+
export type LedgerCreateEntryByExternalIDResponse =
|
|
771
|
+
| IncrementLedgerEntry
|
|
772
|
+
| DecrementLedgerEntry
|
|
773
|
+
| ExpirationChangeLedgerEntry
|
|
774
|
+
| CreditBlockExpiryLedgerEntry
|
|
775
|
+
| VoidLedgerEntry
|
|
776
|
+
| VoidInitiatedLedgerEntry
|
|
777
|
+
| AmendmentLedgerEntry;
|
|
2017
778
|
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
779
|
+
/**
|
|
780
|
+
* The [Credit Ledger Entry resource](/product-catalog/prepurchase) models prepaid
|
|
781
|
+
* credits within Orb.
|
|
782
|
+
*/
|
|
783
|
+
export type LedgerListByExternalIDResponse =
|
|
784
|
+
| IncrementLedgerEntry
|
|
785
|
+
| DecrementLedgerEntry
|
|
786
|
+
| ExpirationChangeLedgerEntry
|
|
787
|
+
| CreditBlockExpiryLedgerEntry
|
|
788
|
+
| VoidLedgerEntry
|
|
789
|
+
| VoidInitiatedLedgerEntry
|
|
790
|
+
| AmendmentLedgerEntry;
|
|
2022
791
|
|
|
2023
792
|
export interface LedgerListParams extends PageParams {
|
|
2024
793
|
'created_at[gt]'?: string | null;
|
|
@@ -2103,7 +872,7 @@ export declare namespace LedgerCreateEntryParams {
|
|
|
2103
872
|
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
2104
873
|
* by setting `metadata` to `null`.
|
|
2105
874
|
*/
|
|
2106
|
-
metadata?:
|
|
875
|
+
metadata?: { [key: string]: string | null } | null;
|
|
2107
876
|
|
|
2108
877
|
/**
|
|
2109
878
|
* Can only be specified when entry_type=increment. How much, in the customer's
|
|
@@ -2133,6 +902,13 @@ export declare namespace LedgerCreateEntryParams {
|
|
|
2133
902
|
*/
|
|
2134
903
|
net_terms: number;
|
|
2135
904
|
|
|
905
|
+
/**
|
|
906
|
+
* An ISO 8601 format date that denotes when this invoice should be dated in the
|
|
907
|
+
* customer's timezone. If not provided, the invoice date will default to the
|
|
908
|
+
* credit block's effective date.
|
|
909
|
+
*/
|
|
910
|
+
invoice_date?: (string & {}) | (string & {}) | null;
|
|
911
|
+
|
|
2136
912
|
/**
|
|
2137
913
|
* An optional memo to display on the invoice.
|
|
2138
914
|
*/
|
|
@@ -2173,17 +949,12 @@ export declare namespace LedgerCreateEntryParams {
|
|
|
2173
949
|
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
2174
950
|
* by setting `metadata` to `null`.
|
|
2175
951
|
*/
|
|
2176
|
-
metadata?:
|
|
952
|
+
metadata?: { [key: string]: string | null } | null;
|
|
2177
953
|
}
|
|
2178
954
|
|
|
2179
955
|
export interface AddExpirationChangeCreditLedgerEntryRequestParams {
|
|
2180
956
|
entry_type: 'expiration_change';
|
|
2181
957
|
|
|
2182
|
-
/**
|
|
2183
|
-
* An ISO 8601 format date that identifies the origination credit block to expire
|
|
2184
|
-
*/
|
|
2185
|
-
expiry_date: string | null;
|
|
2186
|
-
|
|
2187
958
|
/**
|
|
2188
959
|
* A future date (specified in YYYY-MM-DD format) used for expiration change,
|
|
2189
960
|
* denoting when credits transferred (as part of a partial block expiration) should
|
|
@@ -2216,12 +987,17 @@ export declare namespace LedgerCreateEntryParams {
|
|
|
2216
987
|
*/
|
|
2217
988
|
description?: string | null;
|
|
2218
989
|
|
|
990
|
+
/**
|
|
991
|
+
* An ISO 8601 format date that identifies the origination credit block to expire
|
|
992
|
+
*/
|
|
993
|
+
expiry_date?: string | null;
|
|
994
|
+
|
|
2219
995
|
/**
|
|
2220
996
|
* User-specified key/value pairs for the resource. Individual keys can be removed
|
|
2221
997
|
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
2222
998
|
* by setting `metadata` to `null`.
|
|
2223
999
|
*/
|
|
2224
|
-
metadata?:
|
|
1000
|
+
metadata?: { [key: string]: string | null } | null;
|
|
2225
1001
|
}
|
|
2226
1002
|
|
|
2227
1003
|
export interface AddVoidCreditLedgerEntryRequestParams {
|
|
@@ -2256,7 +1032,7 @@ export declare namespace LedgerCreateEntryParams {
|
|
|
2256
1032
|
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
2257
1033
|
* by setting `metadata` to `null`.
|
|
2258
1034
|
*/
|
|
2259
|
-
metadata?:
|
|
1035
|
+
metadata?: { [key: string]: string | null } | null;
|
|
2260
1036
|
|
|
2261
1037
|
/**
|
|
2262
1038
|
* Can only be specified when `entry_type=void`. The reason for the void.
|
|
@@ -2296,7 +1072,7 @@ export declare namespace LedgerCreateEntryParams {
|
|
|
2296
1072
|
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
2297
1073
|
* by setting `metadata` to `null`.
|
|
2298
1074
|
*/
|
|
2299
|
-
metadata?:
|
|
1075
|
+
metadata?: { [key: string]: string | null } | null;
|
|
2300
1076
|
}
|
|
2301
1077
|
}
|
|
2302
1078
|
|
|
@@ -2354,7 +1130,7 @@ export declare namespace LedgerCreateEntryByExternalIDParams {
|
|
|
2354
1130
|
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
2355
1131
|
* by setting `metadata` to `null`.
|
|
2356
1132
|
*/
|
|
2357
|
-
metadata?:
|
|
1133
|
+
metadata?: { [key: string]: string | null } | null;
|
|
2358
1134
|
|
|
2359
1135
|
/**
|
|
2360
1136
|
* Can only be specified when entry_type=increment. How much, in the customer's
|
|
@@ -2384,6 +1160,13 @@ export declare namespace LedgerCreateEntryByExternalIDParams {
|
|
|
2384
1160
|
*/
|
|
2385
1161
|
net_terms: number;
|
|
2386
1162
|
|
|
1163
|
+
/**
|
|
1164
|
+
* An ISO 8601 format date that denotes when this invoice should be dated in the
|
|
1165
|
+
* customer's timezone. If not provided, the invoice date will default to the
|
|
1166
|
+
* credit block's effective date.
|
|
1167
|
+
*/
|
|
1168
|
+
invoice_date?: (string & {}) | (string & {}) | null;
|
|
1169
|
+
|
|
2387
1170
|
/**
|
|
2388
1171
|
* An optional memo to display on the invoice.
|
|
2389
1172
|
*/
|
|
@@ -2424,17 +1207,12 @@ export declare namespace LedgerCreateEntryByExternalIDParams {
|
|
|
2424
1207
|
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
2425
1208
|
* by setting `metadata` to `null`.
|
|
2426
1209
|
*/
|
|
2427
|
-
metadata?:
|
|
1210
|
+
metadata?: { [key: string]: string | null } | null;
|
|
2428
1211
|
}
|
|
2429
1212
|
|
|
2430
1213
|
export interface AddExpirationChangeCreditLedgerEntryRequestParams {
|
|
2431
1214
|
entry_type: 'expiration_change';
|
|
2432
1215
|
|
|
2433
|
-
/**
|
|
2434
|
-
* An ISO 8601 format date that identifies the origination credit block to expire
|
|
2435
|
-
*/
|
|
2436
|
-
expiry_date: string | null;
|
|
2437
|
-
|
|
2438
1216
|
/**
|
|
2439
1217
|
* A future date (specified in YYYY-MM-DD format) used for expiration change,
|
|
2440
1218
|
* denoting when credits transferred (as part of a partial block expiration) should
|
|
@@ -2467,12 +1245,17 @@ export declare namespace LedgerCreateEntryByExternalIDParams {
|
|
|
2467
1245
|
*/
|
|
2468
1246
|
description?: string | null;
|
|
2469
1247
|
|
|
1248
|
+
/**
|
|
1249
|
+
* An ISO 8601 format date that identifies the origination credit block to expire
|
|
1250
|
+
*/
|
|
1251
|
+
expiry_date?: string | null;
|
|
1252
|
+
|
|
2470
1253
|
/**
|
|
2471
1254
|
* User-specified key/value pairs for the resource. Individual keys can be removed
|
|
2472
1255
|
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
2473
1256
|
* by setting `metadata` to `null`.
|
|
2474
1257
|
*/
|
|
2475
|
-
metadata?:
|
|
1258
|
+
metadata?: { [key: string]: string | null } | null;
|
|
2476
1259
|
}
|
|
2477
1260
|
|
|
2478
1261
|
export interface AddVoidCreditLedgerEntryRequestParams {
|
|
@@ -2507,7 +1290,7 @@ export declare namespace LedgerCreateEntryByExternalIDParams {
|
|
|
2507
1290
|
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
2508
1291
|
* by setting `metadata` to `null`.
|
|
2509
1292
|
*/
|
|
2510
|
-
metadata?:
|
|
1293
|
+
metadata?: { [key: string]: string | null } | null;
|
|
2511
1294
|
|
|
2512
1295
|
/**
|
|
2513
1296
|
* Can only be specified when `entry_type=void`. The reason for the void.
|
|
@@ -2547,7 +1330,7 @@ export declare namespace LedgerCreateEntryByExternalIDParams {
|
|
|
2547
1330
|
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
2548
1331
|
* by setting `metadata` to `null`.
|
|
2549
1332
|
*/
|
|
2550
|
-
metadata?:
|
|
1333
|
+
metadata?: { [key: string]: string | null } | null;
|
|
2551
1334
|
}
|
|
2552
1335
|
}
|
|
2553
1336
|
|
|
@@ -2585,6 +1368,14 @@ Ledger.LedgerListByExternalIDResponsesPage = LedgerListByExternalIDResponsesPage
|
|
|
2585
1368
|
|
|
2586
1369
|
export declare namespace Ledger {
|
|
2587
1370
|
export {
|
|
1371
|
+
type AffectedBlock as AffectedBlock,
|
|
1372
|
+
type AmendmentLedgerEntry as AmendmentLedgerEntry,
|
|
1373
|
+
type CreditBlockExpiryLedgerEntry as CreditBlockExpiryLedgerEntry,
|
|
1374
|
+
type DecrementLedgerEntry as DecrementLedgerEntry,
|
|
1375
|
+
type ExpirationChangeLedgerEntry as ExpirationChangeLedgerEntry,
|
|
1376
|
+
type IncrementLedgerEntry as IncrementLedgerEntry,
|
|
1377
|
+
type VoidInitiatedLedgerEntry as VoidInitiatedLedgerEntry,
|
|
1378
|
+
type VoidLedgerEntry as VoidLedgerEntry,
|
|
2588
1379
|
type LedgerListResponse as LedgerListResponse,
|
|
2589
1380
|
type LedgerCreateEntryResponse as LedgerCreateEntryResponse,
|
|
2590
1381
|
type LedgerCreateEntryByExternalIDResponse as LedgerCreateEntryByExternalIDResponse,
|