orb-billing 4.74.0 → 5.0.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 +23 -0
- package/index.d.mts +148 -14
- package/index.d.ts +148 -14
- package/index.d.ts.map +1 -1
- package/index.js +0 -3
- package/index.js.map +1 -1
- package/index.mjs +3 -6
- package/index.mjs.map +1 -1
- package/package.json +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 +9 -163
- package/resources/credit-notes.d.ts.map +1 -1
- package/resources/credit-notes.js +3 -6
- package/resources/credit-notes.js.map +1 -1
- package/resources/credit-notes.mjs +2 -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 +3 -81
- 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 +171 -962
- 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 +72 -678
- 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/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 +6 -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 +30 -1700
- package/resources/invoices.d.ts.map +1 -1
- package/resources/invoices.js +3 -6
- package/resources/invoices.js.map +1 -1
- package/resources/invoices.mjs +2 -4
- package/resources/invoices.mjs.map +1 -1
- package/resources/plans/plans.d.ts +7 -3801
- 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 +3 -3
- 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 +346 -9372
- 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 +7269 -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 +138 -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 +2639 -27234
- package/resources/subscriptions.d.ts.map +1 -1
- package/resources/subscriptions.js +1 -1
- package/resources/subscriptions.js.map +1 -1
- package/resources/subscriptions.mjs +1 -1
- package/resources/subscriptions.mjs.map +1 -1
- package/src/index.ts +219 -42
- 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 +10 -217
- package/src/resources/customers/balance-transactions.ts +5 -36
- package/src/resources/customers/costs.ts +3 -101
- 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 +212 -1435
- package/src/resources/customers/credits/top-ups.ts +33 -136
- package/src/resources/customers/customers.ts +162 -1454
- package/src/resources/customers/index.ts +8 -0
- package/src/resources/index.ts +42 -22
- package/src/resources/invoice-line-items.ts +10 -501
- package/src/resources/invoices.ts +60 -2394
- package/src/resources/plans/plans.ts +38 -4588
- package/src/resources/prices/external-price-id.ts +3 -3
- package/src/resources/prices/index.ts +2 -2
- package/src/resources/prices/prices.ts +500 -11810
- package/src/resources/shared.ts +9582 -22
- package/src/resources/subscription-changes.ts +171 -2670
- package/src/resources/subscriptions.ts +3162 -32900
- 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 {
|
|
@@ -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;
|
|
471
|
+
export interface AffectedBlock {
|
|
472
|
+
id: string;
|
|
572
473
|
|
|
573
|
-
|
|
474
|
+
expiry_date: string | null;
|
|
574
475
|
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
price_id?: string | null;
|
|
578
|
-
}
|
|
476
|
+
per_unit_cost_basis: string | null;
|
|
477
|
+
}
|
|
579
478
|
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
id: string;
|
|
479
|
+
export interface AmendmentLedgerEntry {
|
|
480
|
+
id: string;
|
|
583
481
|
|
|
584
|
-
|
|
482
|
+
amount: number;
|
|
585
483
|
|
|
586
|
-
|
|
587
|
-
}
|
|
484
|
+
created_at: string;
|
|
588
485
|
|
|
589
|
-
|
|
590
|
-
id: string;
|
|
486
|
+
credit_block: AffectedBlock;
|
|
591
487
|
|
|
592
|
-
|
|
593
|
-
}
|
|
594
|
-
}
|
|
488
|
+
currency: string;
|
|
595
489
|
|
|
596
|
-
|
|
597
|
-
id: string;
|
|
490
|
+
customer: Shared.CustomerMinified;
|
|
598
491
|
|
|
599
|
-
|
|
492
|
+
description: string | null;
|
|
600
493
|
|
|
601
|
-
|
|
494
|
+
ending_balance: number;
|
|
602
495
|
|
|
603
|
-
|
|
496
|
+
entry_status: 'committed' | 'pending';
|
|
604
497
|
|
|
605
|
-
|
|
498
|
+
entry_type: 'amendment';
|
|
606
499
|
|
|
607
|
-
|
|
500
|
+
ledger_sequence_number: number;
|
|
608
501
|
|
|
609
|
-
|
|
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: Record<string, string>;
|
|
610
509
|
|
|
611
|
-
|
|
510
|
+
starting_balance: number;
|
|
511
|
+
}
|
|
612
512
|
|
|
613
|
-
|
|
513
|
+
export interface CreditBlockExpiryLedgerEntry {
|
|
514
|
+
id: string;
|
|
614
515
|
|
|
615
|
-
|
|
516
|
+
amount: number;
|
|
616
517
|
|
|
617
|
-
|
|
518
|
+
created_at: string;
|
|
618
519
|
|
|
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>;
|
|
520
|
+
credit_block: AffectedBlock;
|
|
626
521
|
|
|
627
|
-
|
|
522
|
+
currency: string;
|
|
628
523
|
|
|
629
|
-
|
|
630
|
-
}
|
|
524
|
+
customer: Shared.CustomerMinified;
|
|
631
525
|
|
|
632
|
-
|
|
633
|
-
export interface CreditBlock {
|
|
634
|
-
id: string;
|
|
526
|
+
description: string | null;
|
|
635
527
|
|
|
636
|
-
|
|
528
|
+
ending_balance: number;
|
|
637
529
|
|
|
638
|
-
|
|
639
|
-
}
|
|
530
|
+
entry_status: 'committed' | 'pending';
|
|
640
531
|
|
|
641
|
-
|
|
642
|
-
id: string;
|
|
532
|
+
entry_type: 'credit_block_expiry';
|
|
643
533
|
|
|
644
|
-
|
|
645
|
-
}
|
|
646
|
-
}
|
|
534
|
+
ledger_sequence_number: number;
|
|
647
535
|
|
|
648
|
-
|
|
649
|
-
|
|
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: Record<string, string>;
|
|
650
543
|
|
|
651
|
-
|
|
544
|
+
starting_balance: number;
|
|
545
|
+
}
|
|
652
546
|
|
|
653
|
-
|
|
547
|
+
export interface DecrementLedgerEntry {
|
|
548
|
+
id: string;
|
|
654
549
|
|
|
655
|
-
|
|
550
|
+
amount: number;
|
|
656
551
|
|
|
657
|
-
|
|
552
|
+
created_at: string;
|
|
658
553
|
|
|
659
|
-
|
|
554
|
+
credit_block: AffectedBlock;
|
|
660
555
|
|
|
661
|
-
|
|
556
|
+
currency: string;
|
|
662
557
|
|
|
663
|
-
|
|
558
|
+
customer: Shared.CustomerMinified;
|
|
664
559
|
|
|
665
|
-
|
|
560
|
+
description: string | null;
|
|
666
561
|
|
|
667
|
-
|
|
562
|
+
ending_balance: number;
|
|
668
563
|
|
|
669
|
-
|
|
564
|
+
entry_status: 'committed' | 'pending';
|
|
670
565
|
|
|
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>;
|
|
566
|
+
entry_type: 'decrement';
|
|
678
567
|
|
|
679
|
-
|
|
680
|
-
}
|
|
568
|
+
ledger_sequence_number: number;
|
|
681
569
|
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
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: Record<string, string>;
|
|
685
577
|
|
|
686
|
-
|
|
578
|
+
starting_balance: number;
|
|
687
579
|
|
|
688
|
-
|
|
689
|
-
}
|
|
580
|
+
event_id?: string | null;
|
|
690
581
|
|
|
691
|
-
|
|
692
|
-
id: string;
|
|
582
|
+
invoice_id?: string | null;
|
|
693
583
|
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
}
|
|
584
|
+
price_id?: string | null;
|
|
585
|
+
}
|
|
697
586
|
|
|
698
|
-
|
|
699
|
-
|
|
587
|
+
export interface ExpirationChangeLedgerEntry {
|
|
588
|
+
id: string;
|
|
700
589
|
|
|
701
|
-
|
|
590
|
+
amount: number;
|
|
702
591
|
|
|
703
|
-
|
|
592
|
+
created_at: string;
|
|
704
593
|
|
|
705
|
-
|
|
594
|
+
credit_block: AffectedBlock;
|
|
706
595
|
|
|
707
|
-
|
|
596
|
+
currency: string;
|
|
708
597
|
|
|
709
|
-
|
|
598
|
+
customer: Shared.CustomerMinified;
|
|
710
599
|
|
|
711
|
-
|
|
600
|
+
description: string | null;
|
|
712
601
|
|
|
713
|
-
|
|
602
|
+
ending_balance: number;
|
|
714
603
|
|
|
715
|
-
|
|
604
|
+
entry_status: 'committed' | 'pending';
|
|
716
605
|
|
|
717
|
-
|
|
606
|
+
entry_type: 'expiration_change';
|
|
718
607
|
|
|
719
|
-
|
|
608
|
+
ledger_sequence_number: number;
|
|
720
609
|
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
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: Record<string, string>;
|
|
728
617
|
|
|
729
|
-
|
|
618
|
+
new_block_expiry_date: string | null;
|
|
730
619
|
|
|
731
|
-
|
|
620
|
+
starting_balance: number;
|
|
621
|
+
}
|
|
732
622
|
|
|
733
|
-
|
|
734
|
-
|
|
623
|
+
export interface IncrementLedgerEntry {
|
|
624
|
+
id: string;
|
|
735
625
|
|
|
736
|
-
|
|
737
|
-
export interface CreditBlock {
|
|
738
|
-
id: string;
|
|
626
|
+
amount: number;
|
|
739
627
|
|
|
740
|
-
|
|
628
|
+
created_at: string;
|
|
741
629
|
|
|
742
|
-
|
|
743
|
-
}
|
|
630
|
+
credit_block: AffectedBlock;
|
|
744
631
|
|
|
745
|
-
|
|
746
|
-
id: string;
|
|
632
|
+
currency: string;
|
|
747
633
|
|
|
748
|
-
|
|
749
|
-
}
|
|
750
|
-
}
|
|
634
|
+
customer: Shared.CustomerMinified;
|
|
751
635
|
|
|
752
|
-
|
|
753
|
-
id: string;
|
|
636
|
+
description: string | null;
|
|
754
637
|
|
|
755
|
-
|
|
638
|
+
ending_balance: number;
|
|
756
639
|
|
|
757
|
-
|
|
640
|
+
entry_status: 'committed' | 'pending';
|
|
758
641
|
|
|
759
|
-
|
|
642
|
+
entry_type: 'increment';
|
|
760
643
|
|
|
761
|
-
|
|
644
|
+
ledger_sequence_number: number;
|
|
762
645
|
|
|
763
|
-
|
|
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: Record<string, string>;
|
|
764
653
|
|
|
765
|
-
|
|
654
|
+
starting_balance: number;
|
|
766
655
|
|
|
767
|
-
|
|
656
|
+
/**
|
|
657
|
+
* If the increment resulted in invoice creation, the list of created invoices
|
|
658
|
+
*/
|
|
659
|
+
created_invoices?: Array<Shared.Invoice> | null;
|
|
660
|
+
}
|
|
768
661
|
|
|
769
|
-
|
|
662
|
+
export interface VoidInitiatedLedgerEntry {
|
|
663
|
+
id: string;
|
|
770
664
|
|
|
771
|
-
|
|
665
|
+
amount: number;
|
|
772
666
|
|
|
773
|
-
|
|
667
|
+
created_at: string;
|
|
774
668
|
|
|
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>;
|
|
669
|
+
credit_block: AffectedBlock;
|
|
782
670
|
|
|
783
|
-
|
|
671
|
+
currency: string;
|
|
784
672
|
|
|
785
|
-
|
|
673
|
+
customer: Shared.CustomerMinified;
|
|
786
674
|
|
|
787
|
-
|
|
675
|
+
description: string | null;
|
|
788
676
|
|
|
789
|
-
|
|
790
|
-
}
|
|
677
|
+
ending_balance: number;
|
|
791
678
|
|
|
792
|
-
|
|
793
|
-
export interface CreditBlock {
|
|
794
|
-
id: string;
|
|
679
|
+
entry_status: 'committed' | 'pending';
|
|
795
680
|
|
|
796
|
-
|
|
681
|
+
entry_type: 'void_initiated';
|
|
797
682
|
|
|
798
|
-
|
|
799
|
-
}
|
|
683
|
+
ledger_sequence_number: number;
|
|
800
684
|
|
|
801
|
-
|
|
802
|
-
|
|
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: Record<string, string>;
|
|
803
692
|
|
|
804
|
-
|
|
805
|
-
}
|
|
806
|
-
}
|
|
693
|
+
new_block_expiry_date: string;
|
|
807
694
|
|
|
808
|
-
|
|
809
|
-
id: string;
|
|
695
|
+
starting_balance: number;
|
|
810
696
|
|
|
811
|
-
|
|
697
|
+
void_amount: number;
|
|
812
698
|
|
|
813
|
-
|
|
699
|
+
void_reason: string | null;
|
|
700
|
+
}
|
|
814
701
|
|
|
815
|
-
|
|
702
|
+
export interface VoidLedgerEntry {
|
|
703
|
+
id: string;
|
|
816
704
|
|
|
817
|
-
|
|
705
|
+
amount: number;
|
|
818
706
|
|
|
819
|
-
|
|
707
|
+
created_at: string;
|
|
820
708
|
|
|
821
|
-
|
|
709
|
+
credit_block: AffectedBlock;
|
|
822
710
|
|
|
823
|
-
|
|
711
|
+
currency: string;
|
|
824
712
|
|
|
825
|
-
|
|
713
|
+
customer: Shared.CustomerMinified;
|
|
826
714
|
|
|
827
|
-
|
|
715
|
+
description: string | null;
|
|
828
716
|
|
|
829
|
-
|
|
717
|
+
ending_balance: number;
|
|
830
718
|
|
|
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>;
|
|
719
|
+
entry_status: 'committed' | 'pending';
|
|
838
720
|
|
|
839
|
-
|
|
840
|
-
}
|
|
721
|
+
entry_type: 'void';
|
|
841
722
|
|
|
842
|
-
|
|
843
|
-
export interface CreditBlock {
|
|
844
|
-
id: string;
|
|
723
|
+
ledger_sequence_number: number;
|
|
845
724
|
|
|
846
|
-
|
|
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: Record<string, string>;
|
|
847
732
|
|
|
848
|
-
|
|
849
|
-
}
|
|
733
|
+
starting_balance: number;
|
|
850
734
|
|
|
851
|
-
|
|
852
|
-
id: string;
|
|
735
|
+
void_amount: number;
|
|
853
736
|
|
|
854
|
-
|
|
855
|
-
}
|
|
856
|
-
}
|
|
737
|
+
void_reason: string | null;
|
|
857
738
|
}
|
|
858
739
|
|
|
859
740
|
/**
|
|
860
741
|
* The [Credit Ledger Entry resource](/product-catalog/prepurchase) models prepaid
|
|
861
742
|
* credits within Orb.
|
|
862
743
|
*/
|
|
863
|
-
export type
|
|
864
|
-
|
|
|
865
|
-
|
|
|
866
|
-
|
|
|
867
|
-
|
|
|
868
|
-
|
|
|
869
|
-
|
|
|
870
|
-
|
|
|
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;
|
|
744
|
+
export type LedgerListResponse =
|
|
745
|
+
| IncrementLedgerEntry
|
|
746
|
+
| DecrementLedgerEntry
|
|
747
|
+
| ExpirationChangeLedgerEntry
|
|
748
|
+
| CreditBlockExpiryLedgerEntry
|
|
749
|
+
| VoidLedgerEntry
|
|
750
|
+
| VoidInitiatedLedgerEntry
|
|
751
|
+
| AmendmentLedgerEntry;
|
|
1120
752
|
|
|
1121
|
-
|
|
1122
|
-
|
|
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;
|
|
1123
765
|
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
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;
|
|
1440
|
-
|
|
1441
|
-
entry_status: 'committed' | 'pending';
|
|
1442
|
-
|
|
1443
|
-
entry_type: 'credit_block_expiry';
|
|
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
|
-
}
|
|
1633
|
-
}
|
|
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;
|
|
1634
778
|
|
|
1635
779
|
/**
|
|
1636
780
|
* The [Credit Ledger Entry resource](/product-catalog/prepurchase) models prepaid
|
|
1637
781
|
* credits within Orb.
|
|
1638
782
|
*/
|
|
1639
783
|
export type LedgerListByExternalIDResponse =
|
|
1640
|
-
|
|
|
1641
|
-
|
|
|
1642
|
-
|
|
|
1643
|
-
|
|
|
1644
|
-
|
|
|
1645
|
-
|
|
|
1646
|
-
|
|
|
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;
|
|
1736
|
-
|
|
1737
|
-
event_id?: string | null;
|
|
1738
|
-
|
|
1739
|
-
invoice_id?: string | null;
|
|
1740
|
-
|
|
1741
|
-
price_id?: string | null;
|
|
1742
|
-
}
|
|
1743
|
-
|
|
1744
|
-
export namespace DecrementLedgerEntry {
|
|
1745
|
-
export interface CreditBlock {
|
|
1746
|
-
id: string;
|
|
1747
|
-
|
|
1748
|
-
expiry_date: string | null;
|
|
1749
|
-
|
|
1750
|
-
per_unit_cost_basis: string | null;
|
|
1751
|
-
}
|
|
1752
|
-
|
|
1753
|
-
export interface Customer {
|
|
1754
|
-
id: string;
|
|
1755
|
-
|
|
1756
|
-
external_customer_id: string | null;
|
|
1757
|
-
}
|
|
1758
|
-
}
|
|
1759
|
-
|
|
1760
|
-
export interface ExpirationChangeLedgerEntry {
|
|
1761
|
-
id: string;
|
|
1762
|
-
|
|
1763
|
-
amount: number;
|
|
1764
|
-
|
|
1765
|
-
created_at: string;
|
|
1766
|
-
|
|
1767
|
-
credit_block: ExpirationChangeLedgerEntry.CreditBlock;
|
|
1768
|
-
|
|
1769
|
-
currency: string;
|
|
1770
|
-
|
|
1771
|
-
customer: ExpirationChangeLedgerEntry.Customer;
|
|
1772
|
-
|
|
1773
|
-
description: string | null;
|
|
1774
|
-
|
|
1775
|
-
ending_balance: number;
|
|
1776
|
-
|
|
1777
|
-
entry_status: 'committed' | 'pending';
|
|
1778
|
-
|
|
1779
|
-
entry_type: 'expiration_change';
|
|
1780
|
-
|
|
1781
|
-
ledger_sequence_number: number;
|
|
1782
|
-
|
|
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>;
|
|
1790
|
-
|
|
1791
|
-
new_block_expiry_date: string | null;
|
|
1792
|
-
|
|
1793
|
-
starting_balance: number;
|
|
1794
|
-
}
|
|
1795
|
-
|
|
1796
|
-
export namespace ExpirationChangeLedgerEntry {
|
|
1797
|
-
export interface CreditBlock {
|
|
1798
|
-
id: string;
|
|
1799
|
-
|
|
1800
|
-
expiry_date: string | null;
|
|
1801
|
-
|
|
1802
|
-
per_unit_cost_basis: string | null;
|
|
1803
|
-
}
|
|
1804
|
-
|
|
1805
|
-
export interface Customer {
|
|
1806
|
-
id: string;
|
|
1807
|
-
|
|
1808
|
-
external_customer_id: string | null;
|
|
1809
|
-
}
|
|
1810
|
-
}
|
|
1811
|
-
|
|
1812
|
-
export interface CreditBlockExpiryLedgerEntry {
|
|
1813
|
-
id: string;
|
|
1814
|
-
|
|
1815
|
-
amount: number;
|
|
1816
|
-
|
|
1817
|
-
created_at: string;
|
|
1818
|
-
|
|
1819
|
-
credit_block: CreditBlockExpiryLedgerEntry.CreditBlock;
|
|
1820
|
-
|
|
1821
|
-
currency: string;
|
|
1822
|
-
|
|
1823
|
-
customer: CreditBlockExpiryLedgerEntry.Customer;
|
|
1824
|
-
|
|
1825
|
-
description: string | null;
|
|
1826
|
-
|
|
1827
|
-
ending_balance: number;
|
|
1828
|
-
|
|
1829
|
-
entry_status: 'committed' | 'pending';
|
|
1830
|
-
|
|
1831
|
-
entry_type: 'credit_block_expiry';
|
|
1832
|
-
|
|
1833
|
-
ledger_sequence_number: number;
|
|
1834
|
-
|
|
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>;
|
|
1842
|
-
|
|
1843
|
-
starting_balance: number;
|
|
1844
|
-
}
|
|
1845
|
-
|
|
1846
|
-
export namespace CreditBlockExpiryLedgerEntry {
|
|
1847
|
-
export interface CreditBlock {
|
|
1848
|
-
id: string;
|
|
1849
|
-
|
|
1850
|
-
expiry_date: string | null;
|
|
1851
|
-
|
|
1852
|
-
per_unit_cost_basis: string | null;
|
|
1853
|
-
}
|
|
1854
|
-
|
|
1855
|
-
export interface Customer {
|
|
1856
|
-
id: string;
|
|
1857
|
-
|
|
1858
|
-
external_customer_id: string | null;
|
|
1859
|
-
}
|
|
1860
|
-
}
|
|
1861
|
-
|
|
1862
|
-
export interface VoidLedgerEntry {
|
|
1863
|
-
id: string;
|
|
1864
|
-
|
|
1865
|
-
amount: number;
|
|
1866
|
-
|
|
1867
|
-
created_at: string;
|
|
1868
|
-
|
|
1869
|
-
credit_block: VoidLedgerEntry.CreditBlock;
|
|
1870
|
-
|
|
1871
|
-
currency: string;
|
|
1872
|
-
|
|
1873
|
-
customer: VoidLedgerEntry.Customer;
|
|
1874
|
-
|
|
1875
|
-
description: string | null;
|
|
1876
|
-
|
|
1877
|
-
ending_balance: number;
|
|
1878
|
-
|
|
1879
|
-
entry_status: 'committed' | 'pending';
|
|
1880
|
-
|
|
1881
|
-
entry_type: 'void';
|
|
1882
|
-
|
|
1883
|
-
ledger_sequence_number: number;
|
|
1884
|
-
|
|
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>;
|
|
1892
|
-
|
|
1893
|
-
starting_balance: number;
|
|
1894
|
-
|
|
1895
|
-
void_amount: number;
|
|
1896
|
-
|
|
1897
|
-
void_reason: string | null;
|
|
1898
|
-
}
|
|
1899
|
-
|
|
1900
|
-
export namespace VoidLedgerEntry {
|
|
1901
|
-
export interface CreditBlock {
|
|
1902
|
-
id: string;
|
|
1903
|
-
|
|
1904
|
-
expiry_date: string | null;
|
|
1905
|
-
|
|
1906
|
-
per_unit_cost_basis: string | null;
|
|
1907
|
-
}
|
|
1908
|
-
|
|
1909
|
-
export interface Customer {
|
|
1910
|
-
id: string;
|
|
1911
|
-
|
|
1912
|
-
external_customer_id: string | null;
|
|
1913
|
-
}
|
|
1914
|
-
}
|
|
1915
|
-
|
|
1916
|
-
export interface VoidInitiatedLedgerEntry {
|
|
1917
|
-
id: string;
|
|
1918
|
-
|
|
1919
|
-
amount: number;
|
|
1920
|
-
|
|
1921
|
-
created_at: string;
|
|
1922
|
-
|
|
1923
|
-
credit_block: VoidInitiatedLedgerEntry.CreditBlock;
|
|
1924
|
-
|
|
1925
|
-
currency: string;
|
|
1926
|
-
|
|
1927
|
-
customer: VoidInitiatedLedgerEntry.Customer;
|
|
1928
|
-
|
|
1929
|
-
description: string | null;
|
|
1930
|
-
|
|
1931
|
-
ending_balance: number;
|
|
1932
|
-
|
|
1933
|
-
entry_status: 'committed' | 'pending';
|
|
1934
|
-
|
|
1935
|
-
entry_type: 'void_initiated';
|
|
1936
|
-
|
|
1937
|
-
ledger_sequence_number: number;
|
|
1938
|
-
|
|
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>;
|
|
1946
|
-
|
|
1947
|
-
new_block_expiry_date: string;
|
|
1948
|
-
|
|
1949
|
-
starting_balance: number;
|
|
1950
|
-
|
|
1951
|
-
void_amount: number;
|
|
1952
|
-
|
|
1953
|
-
void_reason: string | null;
|
|
1954
|
-
}
|
|
1955
|
-
|
|
1956
|
-
export namespace VoidInitiatedLedgerEntry {
|
|
1957
|
-
export interface CreditBlock {
|
|
1958
|
-
id: string;
|
|
1959
|
-
|
|
1960
|
-
expiry_date: string | null;
|
|
1961
|
-
|
|
1962
|
-
per_unit_cost_basis: string | null;
|
|
1963
|
-
}
|
|
1964
|
-
|
|
1965
|
-
export interface Customer {
|
|
1966
|
-
id: string;
|
|
1967
|
-
|
|
1968
|
-
external_customer_id: string | null;
|
|
1969
|
-
}
|
|
1970
|
-
}
|
|
1971
|
-
|
|
1972
|
-
export interface AmendmentLedgerEntry {
|
|
1973
|
-
id: string;
|
|
1974
|
-
|
|
1975
|
-
amount: number;
|
|
1976
|
-
|
|
1977
|
-
created_at: string;
|
|
1978
|
-
|
|
1979
|
-
credit_block: AmendmentLedgerEntry.CreditBlock;
|
|
1980
|
-
|
|
1981
|
-
currency: string;
|
|
1982
|
-
|
|
1983
|
-
customer: AmendmentLedgerEntry.Customer;
|
|
1984
|
-
|
|
1985
|
-
description: string | null;
|
|
1986
|
-
|
|
1987
|
-
ending_balance: number;
|
|
1988
|
-
|
|
1989
|
-
entry_status: 'committed' | 'pending';
|
|
1990
|
-
|
|
1991
|
-
entry_type: 'amendment';
|
|
1992
|
-
|
|
1993
|
-
ledger_sequence_number: number;
|
|
1994
|
-
|
|
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>;
|
|
2002
|
-
|
|
2003
|
-
starting_balance: number;
|
|
2004
|
-
}
|
|
2005
|
-
|
|
2006
|
-
export namespace AmendmentLedgerEntry {
|
|
2007
|
-
export interface CreditBlock {
|
|
2008
|
-
id: string;
|
|
2009
|
-
|
|
2010
|
-
expiry_date: string | null;
|
|
2011
|
-
|
|
2012
|
-
per_unit_cost_basis: string | null;
|
|
2013
|
-
}
|
|
2014
|
-
|
|
2015
|
-
export interface Customer {
|
|
2016
|
-
id: string;
|
|
2017
|
-
|
|
2018
|
-
external_customer_id: string | null;
|
|
2019
|
-
}
|
|
2020
|
-
}
|
|
2021
|
-
}
|
|
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;
|
|
@@ -2585,6 +1354,14 @@ Ledger.LedgerListByExternalIDResponsesPage = LedgerListByExternalIDResponsesPage
|
|
|
2585
1354
|
|
|
2586
1355
|
export declare namespace Ledger {
|
|
2587
1356
|
export {
|
|
1357
|
+
type AffectedBlock as AffectedBlock,
|
|
1358
|
+
type AmendmentLedgerEntry as AmendmentLedgerEntry,
|
|
1359
|
+
type CreditBlockExpiryLedgerEntry as CreditBlockExpiryLedgerEntry,
|
|
1360
|
+
type DecrementLedgerEntry as DecrementLedgerEntry,
|
|
1361
|
+
type ExpirationChangeLedgerEntry as ExpirationChangeLedgerEntry,
|
|
1362
|
+
type IncrementLedgerEntry as IncrementLedgerEntry,
|
|
1363
|
+
type VoidInitiatedLedgerEntry as VoidInitiatedLedgerEntry,
|
|
1364
|
+
type VoidLedgerEntry as VoidLedgerEntry,
|
|
2588
1365
|
type LedgerListResponse as LedgerListResponse,
|
|
2589
1366
|
type LedgerCreateEntryResponse as LedgerCreateEntryResponse,
|
|
2590
1367
|
type LedgerCreateEntryByExternalIDResponse as LedgerCreateEntryByExternalIDResponse,
|