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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { APIResource } from "../../../resource.js";
|
|
2
2
|
import * as Core from "../../../core.js";
|
|
3
|
-
import * as
|
|
3
|
+
import * as Shared from "../../shared.js";
|
|
4
4
|
import { Page, type PageParams } from "../../../pagination.js";
|
|
5
5
|
export declare class Ledger extends APIResource {
|
|
6
6
|
/**
|
|
@@ -404,982 +404,191 @@ export declare class LedgerListResponsesPage extends Page<LedgerListResponse> {
|
|
|
404
404
|
}
|
|
405
405
|
export declare class LedgerListByExternalIDResponsesPage extends Page<LedgerListByExternalIDResponse> {
|
|
406
406
|
}
|
|
407
|
+
export interface AffectedBlock {
|
|
408
|
+
id: string;
|
|
409
|
+
expiry_date: string | null;
|
|
410
|
+
per_unit_cost_basis: string | null;
|
|
411
|
+
}
|
|
412
|
+
export interface AmendmentLedgerEntry {
|
|
413
|
+
id: string;
|
|
414
|
+
amount: number;
|
|
415
|
+
created_at: string;
|
|
416
|
+
credit_block: AffectedBlock;
|
|
417
|
+
currency: string;
|
|
418
|
+
customer: Shared.CustomerMinified;
|
|
419
|
+
description: string | null;
|
|
420
|
+
ending_balance: number;
|
|
421
|
+
entry_status: 'committed' | 'pending';
|
|
422
|
+
entry_type: 'amendment';
|
|
423
|
+
ledger_sequence_number: number;
|
|
424
|
+
/**
|
|
425
|
+
* User specified key-value pairs for the resource. If not present, this defaults
|
|
426
|
+
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
427
|
+
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
428
|
+
* `null`.
|
|
429
|
+
*/
|
|
430
|
+
metadata: Record<string, string>;
|
|
431
|
+
starting_balance: number;
|
|
432
|
+
}
|
|
433
|
+
export interface CreditBlockExpiryLedgerEntry {
|
|
434
|
+
id: string;
|
|
435
|
+
amount: number;
|
|
436
|
+
created_at: string;
|
|
437
|
+
credit_block: AffectedBlock;
|
|
438
|
+
currency: string;
|
|
439
|
+
customer: Shared.CustomerMinified;
|
|
440
|
+
description: string | null;
|
|
441
|
+
ending_balance: number;
|
|
442
|
+
entry_status: 'committed' | 'pending';
|
|
443
|
+
entry_type: 'credit_block_expiry';
|
|
444
|
+
ledger_sequence_number: number;
|
|
445
|
+
/**
|
|
446
|
+
* User specified key-value pairs for the resource. If not present, this defaults
|
|
447
|
+
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
448
|
+
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
449
|
+
* `null`.
|
|
450
|
+
*/
|
|
451
|
+
metadata: Record<string, string>;
|
|
452
|
+
starting_balance: number;
|
|
453
|
+
}
|
|
454
|
+
export interface DecrementLedgerEntry {
|
|
455
|
+
id: string;
|
|
456
|
+
amount: number;
|
|
457
|
+
created_at: string;
|
|
458
|
+
credit_block: AffectedBlock;
|
|
459
|
+
currency: string;
|
|
460
|
+
customer: Shared.CustomerMinified;
|
|
461
|
+
description: string | null;
|
|
462
|
+
ending_balance: number;
|
|
463
|
+
entry_status: 'committed' | 'pending';
|
|
464
|
+
entry_type: 'decrement';
|
|
465
|
+
ledger_sequence_number: number;
|
|
466
|
+
/**
|
|
467
|
+
* User specified key-value pairs for the resource. If not present, this defaults
|
|
468
|
+
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
469
|
+
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
470
|
+
* `null`.
|
|
471
|
+
*/
|
|
472
|
+
metadata: Record<string, string>;
|
|
473
|
+
starting_balance: number;
|
|
474
|
+
event_id?: string | null;
|
|
475
|
+
invoice_id?: string | null;
|
|
476
|
+
price_id?: string | null;
|
|
477
|
+
}
|
|
478
|
+
export interface ExpirationChangeLedgerEntry {
|
|
479
|
+
id: string;
|
|
480
|
+
amount: number;
|
|
481
|
+
created_at: string;
|
|
482
|
+
credit_block: AffectedBlock;
|
|
483
|
+
currency: string;
|
|
484
|
+
customer: Shared.CustomerMinified;
|
|
485
|
+
description: string | null;
|
|
486
|
+
ending_balance: number;
|
|
487
|
+
entry_status: 'committed' | 'pending';
|
|
488
|
+
entry_type: 'expiration_change';
|
|
489
|
+
ledger_sequence_number: number;
|
|
490
|
+
/**
|
|
491
|
+
* User specified key-value pairs for the resource. If not present, this defaults
|
|
492
|
+
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
493
|
+
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
494
|
+
* `null`.
|
|
495
|
+
*/
|
|
496
|
+
metadata: Record<string, string>;
|
|
497
|
+
new_block_expiry_date: string | null;
|
|
498
|
+
starting_balance: number;
|
|
499
|
+
}
|
|
500
|
+
export interface IncrementLedgerEntry {
|
|
501
|
+
id: string;
|
|
502
|
+
amount: number;
|
|
503
|
+
created_at: string;
|
|
504
|
+
credit_block: AffectedBlock;
|
|
505
|
+
currency: string;
|
|
506
|
+
customer: Shared.CustomerMinified;
|
|
507
|
+
description: string | null;
|
|
508
|
+
ending_balance: number;
|
|
509
|
+
entry_status: 'committed' | 'pending';
|
|
510
|
+
entry_type: 'increment';
|
|
511
|
+
ledger_sequence_number: number;
|
|
512
|
+
/**
|
|
513
|
+
* User specified key-value pairs for the resource. If not present, this defaults
|
|
514
|
+
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
515
|
+
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
516
|
+
* `null`.
|
|
517
|
+
*/
|
|
518
|
+
metadata: Record<string, string>;
|
|
519
|
+
starting_balance: number;
|
|
520
|
+
/**
|
|
521
|
+
* If the increment resulted in invoice creation, the list of created invoices
|
|
522
|
+
*/
|
|
523
|
+
created_invoices?: Array<Shared.Invoice> | null;
|
|
524
|
+
}
|
|
525
|
+
export interface VoidInitiatedLedgerEntry {
|
|
526
|
+
id: string;
|
|
527
|
+
amount: number;
|
|
528
|
+
created_at: string;
|
|
529
|
+
credit_block: AffectedBlock;
|
|
530
|
+
currency: string;
|
|
531
|
+
customer: Shared.CustomerMinified;
|
|
532
|
+
description: string | null;
|
|
533
|
+
ending_balance: number;
|
|
534
|
+
entry_status: 'committed' | 'pending';
|
|
535
|
+
entry_type: 'void_initiated';
|
|
536
|
+
ledger_sequence_number: number;
|
|
537
|
+
/**
|
|
538
|
+
* User specified key-value pairs for the resource. If not present, this defaults
|
|
539
|
+
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
540
|
+
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
541
|
+
* `null`.
|
|
542
|
+
*/
|
|
543
|
+
metadata: Record<string, string>;
|
|
544
|
+
new_block_expiry_date: string;
|
|
545
|
+
starting_balance: number;
|
|
546
|
+
void_amount: number;
|
|
547
|
+
void_reason: string | null;
|
|
548
|
+
}
|
|
549
|
+
export interface VoidLedgerEntry {
|
|
550
|
+
id: string;
|
|
551
|
+
amount: number;
|
|
552
|
+
created_at: string;
|
|
553
|
+
credit_block: AffectedBlock;
|
|
554
|
+
currency: string;
|
|
555
|
+
customer: Shared.CustomerMinified;
|
|
556
|
+
description: string | null;
|
|
557
|
+
ending_balance: number;
|
|
558
|
+
entry_status: 'committed' | 'pending';
|
|
559
|
+
entry_type: 'void';
|
|
560
|
+
ledger_sequence_number: number;
|
|
561
|
+
/**
|
|
562
|
+
* User specified key-value pairs for the resource. If not present, this defaults
|
|
563
|
+
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
564
|
+
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
565
|
+
* `null`.
|
|
566
|
+
*/
|
|
567
|
+
metadata: Record<string, string>;
|
|
568
|
+
starting_balance: number;
|
|
569
|
+
void_amount: number;
|
|
570
|
+
void_reason: string | null;
|
|
571
|
+
}
|
|
407
572
|
/**
|
|
408
573
|
* The [Credit Ledger Entry resource](/product-catalog/prepurchase) models prepaid
|
|
409
574
|
* credits within Orb.
|
|
410
575
|
*/
|
|
411
|
-
export type LedgerListResponse =
|
|
412
|
-
export declare namespace LedgerListResponse {
|
|
413
|
-
interface IncrementLedgerEntry {
|
|
414
|
-
id: string;
|
|
415
|
-
amount: number;
|
|
416
|
-
created_at: string;
|
|
417
|
-
credit_block: IncrementLedgerEntry.CreditBlock;
|
|
418
|
-
currency: string;
|
|
419
|
-
customer: IncrementLedgerEntry.Customer;
|
|
420
|
-
description: string | null;
|
|
421
|
-
ending_balance: number;
|
|
422
|
-
entry_status: 'committed' | 'pending';
|
|
423
|
-
entry_type: 'increment';
|
|
424
|
-
ledger_sequence_number: number;
|
|
425
|
-
/**
|
|
426
|
-
* User specified key-value pairs for the resource. If not present, this defaults
|
|
427
|
-
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
428
|
-
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
429
|
-
* `null`.
|
|
430
|
-
*/
|
|
431
|
-
metadata: Record<string, string>;
|
|
432
|
-
starting_balance: number;
|
|
433
|
-
/**
|
|
434
|
-
* If the increment resulted in invoice creation, the list of created invoices
|
|
435
|
-
*/
|
|
436
|
-
created_invoices?: Array<InvoicesAPI.Invoice> | null;
|
|
437
|
-
}
|
|
438
|
-
namespace IncrementLedgerEntry {
|
|
439
|
-
interface CreditBlock {
|
|
440
|
-
id: string;
|
|
441
|
-
expiry_date: string | null;
|
|
442
|
-
per_unit_cost_basis: string | null;
|
|
443
|
-
}
|
|
444
|
-
interface Customer {
|
|
445
|
-
id: string;
|
|
446
|
-
external_customer_id: string | null;
|
|
447
|
-
}
|
|
448
|
-
}
|
|
449
|
-
interface DecrementLedgerEntry {
|
|
450
|
-
id: string;
|
|
451
|
-
amount: number;
|
|
452
|
-
created_at: string;
|
|
453
|
-
credit_block: DecrementLedgerEntry.CreditBlock;
|
|
454
|
-
currency: string;
|
|
455
|
-
customer: DecrementLedgerEntry.Customer;
|
|
456
|
-
description: string | null;
|
|
457
|
-
ending_balance: number;
|
|
458
|
-
entry_status: 'committed' | 'pending';
|
|
459
|
-
entry_type: 'decrement';
|
|
460
|
-
ledger_sequence_number: number;
|
|
461
|
-
/**
|
|
462
|
-
* User specified key-value pairs for the resource. If not present, this defaults
|
|
463
|
-
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
464
|
-
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
465
|
-
* `null`.
|
|
466
|
-
*/
|
|
467
|
-
metadata: Record<string, string>;
|
|
468
|
-
starting_balance: number;
|
|
469
|
-
event_id?: string | null;
|
|
470
|
-
invoice_id?: string | null;
|
|
471
|
-
price_id?: string | null;
|
|
472
|
-
}
|
|
473
|
-
namespace DecrementLedgerEntry {
|
|
474
|
-
interface CreditBlock {
|
|
475
|
-
id: string;
|
|
476
|
-
expiry_date: string | null;
|
|
477
|
-
per_unit_cost_basis: string | null;
|
|
478
|
-
}
|
|
479
|
-
interface Customer {
|
|
480
|
-
id: string;
|
|
481
|
-
external_customer_id: string | null;
|
|
482
|
-
}
|
|
483
|
-
}
|
|
484
|
-
interface ExpirationChangeLedgerEntry {
|
|
485
|
-
id: string;
|
|
486
|
-
amount: number;
|
|
487
|
-
created_at: string;
|
|
488
|
-
credit_block: ExpirationChangeLedgerEntry.CreditBlock;
|
|
489
|
-
currency: string;
|
|
490
|
-
customer: ExpirationChangeLedgerEntry.Customer;
|
|
491
|
-
description: string | null;
|
|
492
|
-
ending_balance: number;
|
|
493
|
-
entry_status: 'committed' | 'pending';
|
|
494
|
-
entry_type: 'expiration_change';
|
|
495
|
-
ledger_sequence_number: number;
|
|
496
|
-
/**
|
|
497
|
-
* User specified key-value pairs for the resource. If not present, this defaults
|
|
498
|
-
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
499
|
-
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
500
|
-
* `null`.
|
|
501
|
-
*/
|
|
502
|
-
metadata: Record<string, string>;
|
|
503
|
-
new_block_expiry_date: string | null;
|
|
504
|
-
starting_balance: number;
|
|
505
|
-
}
|
|
506
|
-
namespace ExpirationChangeLedgerEntry {
|
|
507
|
-
interface CreditBlock {
|
|
508
|
-
id: string;
|
|
509
|
-
expiry_date: string | null;
|
|
510
|
-
per_unit_cost_basis: string | null;
|
|
511
|
-
}
|
|
512
|
-
interface Customer {
|
|
513
|
-
id: string;
|
|
514
|
-
external_customer_id: string | null;
|
|
515
|
-
}
|
|
516
|
-
}
|
|
517
|
-
interface CreditBlockExpiryLedgerEntry {
|
|
518
|
-
id: string;
|
|
519
|
-
amount: number;
|
|
520
|
-
created_at: string;
|
|
521
|
-
credit_block: CreditBlockExpiryLedgerEntry.CreditBlock;
|
|
522
|
-
currency: string;
|
|
523
|
-
customer: CreditBlockExpiryLedgerEntry.Customer;
|
|
524
|
-
description: string | null;
|
|
525
|
-
ending_balance: number;
|
|
526
|
-
entry_status: 'committed' | 'pending';
|
|
527
|
-
entry_type: 'credit_block_expiry';
|
|
528
|
-
ledger_sequence_number: number;
|
|
529
|
-
/**
|
|
530
|
-
* User specified key-value pairs for the resource. If not present, this defaults
|
|
531
|
-
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
532
|
-
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
533
|
-
* `null`.
|
|
534
|
-
*/
|
|
535
|
-
metadata: Record<string, string>;
|
|
536
|
-
starting_balance: number;
|
|
537
|
-
}
|
|
538
|
-
namespace CreditBlockExpiryLedgerEntry {
|
|
539
|
-
interface CreditBlock {
|
|
540
|
-
id: string;
|
|
541
|
-
expiry_date: string | null;
|
|
542
|
-
per_unit_cost_basis: string | null;
|
|
543
|
-
}
|
|
544
|
-
interface Customer {
|
|
545
|
-
id: string;
|
|
546
|
-
external_customer_id: string | null;
|
|
547
|
-
}
|
|
548
|
-
}
|
|
549
|
-
interface VoidLedgerEntry {
|
|
550
|
-
id: string;
|
|
551
|
-
amount: number;
|
|
552
|
-
created_at: string;
|
|
553
|
-
credit_block: VoidLedgerEntry.CreditBlock;
|
|
554
|
-
currency: string;
|
|
555
|
-
customer: VoidLedgerEntry.Customer;
|
|
556
|
-
description: string | null;
|
|
557
|
-
ending_balance: number;
|
|
558
|
-
entry_status: 'committed' | 'pending';
|
|
559
|
-
entry_type: 'void';
|
|
560
|
-
ledger_sequence_number: number;
|
|
561
|
-
/**
|
|
562
|
-
* User specified key-value pairs for the resource. If not present, this defaults
|
|
563
|
-
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
564
|
-
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
565
|
-
* `null`.
|
|
566
|
-
*/
|
|
567
|
-
metadata: Record<string, string>;
|
|
568
|
-
starting_balance: number;
|
|
569
|
-
void_amount: number;
|
|
570
|
-
void_reason: string | null;
|
|
571
|
-
}
|
|
572
|
-
namespace VoidLedgerEntry {
|
|
573
|
-
interface CreditBlock {
|
|
574
|
-
id: string;
|
|
575
|
-
expiry_date: string | null;
|
|
576
|
-
per_unit_cost_basis: string | null;
|
|
577
|
-
}
|
|
578
|
-
interface Customer {
|
|
579
|
-
id: string;
|
|
580
|
-
external_customer_id: string | null;
|
|
581
|
-
}
|
|
582
|
-
}
|
|
583
|
-
interface VoidInitiatedLedgerEntry {
|
|
584
|
-
id: string;
|
|
585
|
-
amount: number;
|
|
586
|
-
created_at: string;
|
|
587
|
-
credit_block: VoidInitiatedLedgerEntry.CreditBlock;
|
|
588
|
-
currency: string;
|
|
589
|
-
customer: VoidInitiatedLedgerEntry.Customer;
|
|
590
|
-
description: string | null;
|
|
591
|
-
ending_balance: number;
|
|
592
|
-
entry_status: 'committed' | 'pending';
|
|
593
|
-
entry_type: 'void_initiated';
|
|
594
|
-
ledger_sequence_number: number;
|
|
595
|
-
/**
|
|
596
|
-
* User specified key-value pairs for the resource. If not present, this defaults
|
|
597
|
-
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
598
|
-
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
599
|
-
* `null`.
|
|
600
|
-
*/
|
|
601
|
-
metadata: Record<string, string>;
|
|
602
|
-
new_block_expiry_date: string;
|
|
603
|
-
starting_balance: number;
|
|
604
|
-
void_amount: number;
|
|
605
|
-
void_reason: string | null;
|
|
606
|
-
}
|
|
607
|
-
namespace VoidInitiatedLedgerEntry {
|
|
608
|
-
interface CreditBlock {
|
|
609
|
-
id: string;
|
|
610
|
-
expiry_date: string | null;
|
|
611
|
-
per_unit_cost_basis: string | null;
|
|
612
|
-
}
|
|
613
|
-
interface Customer {
|
|
614
|
-
id: string;
|
|
615
|
-
external_customer_id: string | null;
|
|
616
|
-
}
|
|
617
|
-
}
|
|
618
|
-
interface AmendmentLedgerEntry {
|
|
619
|
-
id: string;
|
|
620
|
-
amount: number;
|
|
621
|
-
created_at: string;
|
|
622
|
-
credit_block: AmendmentLedgerEntry.CreditBlock;
|
|
623
|
-
currency: string;
|
|
624
|
-
customer: AmendmentLedgerEntry.Customer;
|
|
625
|
-
description: string | null;
|
|
626
|
-
ending_balance: number;
|
|
627
|
-
entry_status: 'committed' | 'pending';
|
|
628
|
-
entry_type: 'amendment';
|
|
629
|
-
ledger_sequence_number: number;
|
|
630
|
-
/**
|
|
631
|
-
* User specified key-value pairs for the resource. If not present, this defaults
|
|
632
|
-
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
633
|
-
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
634
|
-
* `null`.
|
|
635
|
-
*/
|
|
636
|
-
metadata: Record<string, string>;
|
|
637
|
-
starting_balance: number;
|
|
638
|
-
}
|
|
639
|
-
namespace AmendmentLedgerEntry {
|
|
640
|
-
interface CreditBlock {
|
|
641
|
-
id: string;
|
|
642
|
-
expiry_date: string | null;
|
|
643
|
-
per_unit_cost_basis: string | null;
|
|
644
|
-
}
|
|
645
|
-
interface Customer {
|
|
646
|
-
id: string;
|
|
647
|
-
external_customer_id: string | null;
|
|
648
|
-
}
|
|
649
|
-
}
|
|
650
|
-
}
|
|
576
|
+
export type LedgerListResponse = IncrementLedgerEntry | DecrementLedgerEntry | ExpirationChangeLedgerEntry | CreditBlockExpiryLedgerEntry | VoidLedgerEntry | VoidInitiatedLedgerEntry | AmendmentLedgerEntry;
|
|
651
577
|
/**
|
|
652
578
|
* The [Credit Ledger Entry resource](/product-catalog/prepurchase) models prepaid
|
|
653
579
|
* credits within Orb.
|
|
654
580
|
*/
|
|
655
|
-
export type LedgerCreateEntryResponse =
|
|
656
|
-
export declare namespace LedgerCreateEntryResponse {
|
|
657
|
-
interface IncrementLedgerEntry {
|
|
658
|
-
id: string;
|
|
659
|
-
amount: number;
|
|
660
|
-
created_at: string;
|
|
661
|
-
credit_block: IncrementLedgerEntry.CreditBlock;
|
|
662
|
-
currency: string;
|
|
663
|
-
customer: IncrementLedgerEntry.Customer;
|
|
664
|
-
description: string | null;
|
|
665
|
-
ending_balance: number;
|
|
666
|
-
entry_status: 'committed' | 'pending';
|
|
667
|
-
entry_type: 'increment';
|
|
668
|
-
ledger_sequence_number: number;
|
|
669
|
-
/**
|
|
670
|
-
* User specified key-value pairs for the resource. If not present, this defaults
|
|
671
|
-
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
672
|
-
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
673
|
-
* `null`.
|
|
674
|
-
*/
|
|
675
|
-
metadata: Record<string, string>;
|
|
676
|
-
starting_balance: number;
|
|
677
|
-
/**
|
|
678
|
-
* If the increment resulted in invoice creation, the list of created invoices
|
|
679
|
-
*/
|
|
680
|
-
created_invoices?: Array<InvoicesAPI.Invoice> | null;
|
|
681
|
-
}
|
|
682
|
-
namespace IncrementLedgerEntry {
|
|
683
|
-
interface CreditBlock {
|
|
684
|
-
id: string;
|
|
685
|
-
expiry_date: string | null;
|
|
686
|
-
per_unit_cost_basis: string | null;
|
|
687
|
-
}
|
|
688
|
-
interface Customer {
|
|
689
|
-
id: string;
|
|
690
|
-
external_customer_id: string | null;
|
|
691
|
-
}
|
|
692
|
-
}
|
|
693
|
-
interface DecrementLedgerEntry {
|
|
694
|
-
id: string;
|
|
695
|
-
amount: number;
|
|
696
|
-
created_at: string;
|
|
697
|
-
credit_block: DecrementLedgerEntry.CreditBlock;
|
|
698
|
-
currency: string;
|
|
699
|
-
customer: DecrementLedgerEntry.Customer;
|
|
700
|
-
description: string | null;
|
|
701
|
-
ending_balance: number;
|
|
702
|
-
entry_status: 'committed' | 'pending';
|
|
703
|
-
entry_type: 'decrement';
|
|
704
|
-
ledger_sequence_number: number;
|
|
705
|
-
/**
|
|
706
|
-
* User specified key-value pairs for the resource. If not present, this defaults
|
|
707
|
-
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
708
|
-
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
709
|
-
* `null`.
|
|
710
|
-
*/
|
|
711
|
-
metadata: Record<string, string>;
|
|
712
|
-
starting_balance: number;
|
|
713
|
-
event_id?: string | null;
|
|
714
|
-
invoice_id?: string | null;
|
|
715
|
-
price_id?: string | null;
|
|
716
|
-
}
|
|
717
|
-
namespace DecrementLedgerEntry {
|
|
718
|
-
interface CreditBlock {
|
|
719
|
-
id: string;
|
|
720
|
-
expiry_date: string | null;
|
|
721
|
-
per_unit_cost_basis: string | null;
|
|
722
|
-
}
|
|
723
|
-
interface Customer {
|
|
724
|
-
id: string;
|
|
725
|
-
external_customer_id: string | null;
|
|
726
|
-
}
|
|
727
|
-
}
|
|
728
|
-
interface ExpirationChangeLedgerEntry {
|
|
729
|
-
id: string;
|
|
730
|
-
amount: number;
|
|
731
|
-
created_at: string;
|
|
732
|
-
credit_block: ExpirationChangeLedgerEntry.CreditBlock;
|
|
733
|
-
currency: string;
|
|
734
|
-
customer: ExpirationChangeLedgerEntry.Customer;
|
|
735
|
-
description: string | null;
|
|
736
|
-
ending_balance: number;
|
|
737
|
-
entry_status: 'committed' | 'pending';
|
|
738
|
-
entry_type: 'expiration_change';
|
|
739
|
-
ledger_sequence_number: number;
|
|
740
|
-
/**
|
|
741
|
-
* User specified key-value pairs for the resource. If not present, this defaults
|
|
742
|
-
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
743
|
-
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
744
|
-
* `null`.
|
|
745
|
-
*/
|
|
746
|
-
metadata: Record<string, string>;
|
|
747
|
-
new_block_expiry_date: string | null;
|
|
748
|
-
starting_balance: number;
|
|
749
|
-
}
|
|
750
|
-
namespace ExpirationChangeLedgerEntry {
|
|
751
|
-
interface CreditBlock {
|
|
752
|
-
id: string;
|
|
753
|
-
expiry_date: string | null;
|
|
754
|
-
per_unit_cost_basis: string | null;
|
|
755
|
-
}
|
|
756
|
-
interface Customer {
|
|
757
|
-
id: string;
|
|
758
|
-
external_customer_id: string | null;
|
|
759
|
-
}
|
|
760
|
-
}
|
|
761
|
-
interface CreditBlockExpiryLedgerEntry {
|
|
762
|
-
id: string;
|
|
763
|
-
amount: number;
|
|
764
|
-
created_at: string;
|
|
765
|
-
credit_block: CreditBlockExpiryLedgerEntry.CreditBlock;
|
|
766
|
-
currency: string;
|
|
767
|
-
customer: CreditBlockExpiryLedgerEntry.Customer;
|
|
768
|
-
description: string | null;
|
|
769
|
-
ending_balance: number;
|
|
770
|
-
entry_status: 'committed' | 'pending';
|
|
771
|
-
entry_type: 'credit_block_expiry';
|
|
772
|
-
ledger_sequence_number: number;
|
|
773
|
-
/**
|
|
774
|
-
* User specified key-value pairs for the resource. If not present, this defaults
|
|
775
|
-
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
776
|
-
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
777
|
-
* `null`.
|
|
778
|
-
*/
|
|
779
|
-
metadata: Record<string, string>;
|
|
780
|
-
starting_balance: number;
|
|
781
|
-
}
|
|
782
|
-
namespace CreditBlockExpiryLedgerEntry {
|
|
783
|
-
interface CreditBlock {
|
|
784
|
-
id: string;
|
|
785
|
-
expiry_date: string | null;
|
|
786
|
-
per_unit_cost_basis: string | null;
|
|
787
|
-
}
|
|
788
|
-
interface Customer {
|
|
789
|
-
id: string;
|
|
790
|
-
external_customer_id: string | null;
|
|
791
|
-
}
|
|
792
|
-
}
|
|
793
|
-
interface VoidLedgerEntry {
|
|
794
|
-
id: string;
|
|
795
|
-
amount: number;
|
|
796
|
-
created_at: string;
|
|
797
|
-
credit_block: VoidLedgerEntry.CreditBlock;
|
|
798
|
-
currency: string;
|
|
799
|
-
customer: VoidLedgerEntry.Customer;
|
|
800
|
-
description: string | null;
|
|
801
|
-
ending_balance: number;
|
|
802
|
-
entry_status: 'committed' | 'pending';
|
|
803
|
-
entry_type: 'void';
|
|
804
|
-
ledger_sequence_number: number;
|
|
805
|
-
/**
|
|
806
|
-
* User specified key-value pairs for the resource. If not present, this defaults
|
|
807
|
-
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
808
|
-
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
809
|
-
* `null`.
|
|
810
|
-
*/
|
|
811
|
-
metadata: Record<string, string>;
|
|
812
|
-
starting_balance: number;
|
|
813
|
-
void_amount: number;
|
|
814
|
-
void_reason: string | null;
|
|
815
|
-
}
|
|
816
|
-
namespace VoidLedgerEntry {
|
|
817
|
-
interface CreditBlock {
|
|
818
|
-
id: string;
|
|
819
|
-
expiry_date: string | null;
|
|
820
|
-
per_unit_cost_basis: string | null;
|
|
821
|
-
}
|
|
822
|
-
interface Customer {
|
|
823
|
-
id: string;
|
|
824
|
-
external_customer_id: string | null;
|
|
825
|
-
}
|
|
826
|
-
}
|
|
827
|
-
interface VoidInitiatedLedgerEntry {
|
|
828
|
-
id: string;
|
|
829
|
-
amount: number;
|
|
830
|
-
created_at: string;
|
|
831
|
-
credit_block: VoidInitiatedLedgerEntry.CreditBlock;
|
|
832
|
-
currency: string;
|
|
833
|
-
customer: VoidInitiatedLedgerEntry.Customer;
|
|
834
|
-
description: string | null;
|
|
835
|
-
ending_balance: number;
|
|
836
|
-
entry_status: 'committed' | 'pending';
|
|
837
|
-
entry_type: 'void_initiated';
|
|
838
|
-
ledger_sequence_number: number;
|
|
839
|
-
/**
|
|
840
|
-
* User specified key-value pairs for the resource. If not present, this defaults
|
|
841
|
-
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
842
|
-
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
843
|
-
* `null`.
|
|
844
|
-
*/
|
|
845
|
-
metadata: Record<string, string>;
|
|
846
|
-
new_block_expiry_date: string;
|
|
847
|
-
starting_balance: number;
|
|
848
|
-
void_amount: number;
|
|
849
|
-
void_reason: string | null;
|
|
850
|
-
}
|
|
851
|
-
namespace VoidInitiatedLedgerEntry {
|
|
852
|
-
interface CreditBlock {
|
|
853
|
-
id: string;
|
|
854
|
-
expiry_date: string | null;
|
|
855
|
-
per_unit_cost_basis: string | null;
|
|
856
|
-
}
|
|
857
|
-
interface Customer {
|
|
858
|
-
id: string;
|
|
859
|
-
external_customer_id: string | null;
|
|
860
|
-
}
|
|
861
|
-
}
|
|
862
|
-
interface AmendmentLedgerEntry {
|
|
863
|
-
id: string;
|
|
864
|
-
amount: number;
|
|
865
|
-
created_at: string;
|
|
866
|
-
credit_block: AmendmentLedgerEntry.CreditBlock;
|
|
867
|
-
currency: string;
|
|
868
|
-
customer: AmendmentLedgerEntry.Customer;
|
|
869
|
-
description: string | null;
|
|
870
|
-
ending_balance: number;
|
|
871
|
-
entry_status: 'committed' | 'pending';
|
|
872
|
-
entry_type: 'amendment';
|
|
873
|
-
ledger_sequence_number: number;
|
|
874
|
-
/**
|
|
875
|
-
* User specified key-value pairs for the resource. If not present, this defaults
|
|
876
|
-
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
877
|
-
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
878
|
-
* `null`.
|
|
879
|
-
*/
|
|
880
|
-
metadata: Record<string, string>;
|
|
881
|
-
starting_balance: number;
|
|
882
|
-
}
|
|
883
|
-
namespace AmendmentLedgerEntry {
|
|
884
|
-
interface CreditBlock {
|
|
885
|
-
id: string;
|
|
886
|
-
expiry_date: string | null;
|
|
887
|
-
per_unit_cost_basis: string | null;
|
|
888
|
-
}
|
|
889
|
-
interface Customer {
|
|
890
|
-
id: string;
|
|
891
|
-
external_customer_id: string | null;
|
|
892
|
-
}
|
|
893
|
-
}
|
|
894
|
-
}
|
|
581
|
+
export type LedgerCreateEntryResponse = IncrementLedgerEntry | DecrementLedgerEntry | ExpirationChangeLedgerEntry | CreditBlockExpiryLedgerEntry | VoidLedgerEntry | VoidInitiatedLedgerEntry | AmendmentLedgerEntry;
|
|
895
582
|
/**
|
|
896
583
|
* The [Credit Ledger Entry resource](/product-catalog/prepurchase) models prepaid
|
|
897
584
|
* credits within Orb.
|
|
898
585
|
*/
|
|
899
|
-
export type LedgerCreateEntryByExternalIDResponse =
|
|
900
|
-
export declare namespace LedgerCreateEntryByExternalIDResponse {
|
|
901
|
-
interface IncrementLedgerEntry {
|
|
902
|
-
id: string;
|
|
903
|
-
amount: number;
|
|
904
|
-
created_at: string;
|
|
905
|
-
credit_block: IncrementLedgerEntry.CreditBlock;
|
|
906
|
-
currency: string;
|
|
907
|
-
customer: IncrementLedgerEntry.Customer;
|
|
908
|
-
description: string | null;
|
|
909
|
-
ending_balance: number;
|
|
910
|
-
entry_status: 'committed' | 'pending';
|
|
911
|
-
entry_type: 'increment';
|
|
912
|
-
ledger_sequence_number: number;
|
|
913
|
-
/**
|
|
914
|
-
* User specified key-value pairs for the resource. If not present, this defaults
|
|
915
|
-
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
916
|
-
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
917
|
-
* `null`.
|
|
918
|
-
*/
|
|
919
|
-
metadata: Record<string, string>;
|
|
920
|
-
starting_balance: number;
|
|
921
|
-
/**
|
|
922
|
-
* If the increment resulted in invoice creation, the list of created invoices
|
|
923
|
-
*/
|
|
924
|
-
created_invoices?: Array<InvoicesAPI.Invoice> | null;
|
|
925
|
-
}
|
|
926
|
-
namespace IncrementLedgerEntry {
|
|
927
|
-
interface CreditBlock {
|
|
928
|
-
id: string;
|
|
929
|
-
expiry_date: string | null;
|
|
930
|
-
per_unit_cost_basis: string | null;
|
|
931
|
-
}
|
|
932
|
-
interface Customer {
|
|
933
|
-
id: string;
|
|
934
|
-
external_customer_id: string | null;
|
|
935
|
-
}
|
|
936
|
-
}
|
|
937
|
-
interface DecrementLedgerEntry {
|
|
938
|
-
id: string;
|
|
939
|
-
amount: number;
|
|
940
|
-
created_at: string;
|
|
941
|
-
credit_block: DecrementLedgerEntry.CreditBlock;
|
|
942
|
-
currency: string;
|
|
943
|
-
customer: DecrementLedgerEntry.Customer;
|
|
944
|
-
description: string | null;
|
|
945
|
-
ending_balance: number;
|
|
946
|
-
entry_status: 'committed' | 'pending';
|
|
947
|
-
entry_type: 'decrement';
|
|
948
|
-
ledger_sequence_number: number;
|
|
949
|
-
/**
|
|
950
|
-
* User specified key-value pairs for the resource. If not present, this defaults
|
|
951
|
-
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
952
|
-
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
953
|
-
* `null`.
|
|
954
|
-
*/
|
|
955
|
-
metadata: Record<string, string>;
|
|
956
|
-
starting_balance: number;
|
|
957
|
-
event_id?: string | null;
|
|
958
|
-
invoice_id?: string | null;
|
|
959
|
-
price_id?: string | null;
|
|
960
|
-
}
|
|
961
|
-
namespace DecrementLedgerEntry {
|
|
962
|
-
interface CreditBlock {
|
|
963
|
-
id: string;
|
|
964
|
-
expiry_date: string | null;
|
|
965
|
-
per_unit_cost_basis: string | null;
|
|
966
|
-
}
|
|
967
|
-
interface Customer {
|
|
968
|
-
id: string;
|
|
969
|
-
external_customer_id: string | null;
|
|
970
|
-
}
|
|
971
|
-
}
|
|
972
|
-
interface ExpirationChangeLedgerEntry {
|
|
973
|
-
id: string;
|
|
974
|
-
amount: number;
|
|
975
|
-
created_at: string;
|
|
976
|
-
credit_block: ExpirationChangeLedgerEntry.CreditBlock;
|
|
977
|
-
currency: string;
|
|
978
|
-
customer: ExpirationChangeLedgerEntry.Customer;
|
|
979
|
-
description: string | null;
|
|
980
|
-
ending_balance: number;
|
|
981
|
-
entry_status: 'committed' | 'pending';
|
|
982
|
-
entry_type: 'expiration_change';
|
|
983
|
-
ledger_sequence_number: number;
|
|
984
|
-
/**
|
|
985
|
-
* User specified key-value pairs for the resource. If not present, this defaults
|
|
986
|
-
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
987
|
-
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
988
|
-
* `null`.
|
|
989
|
-
*/
|
|
990
|
-
metadata: Record<string, string>;
|
|
991
|
-
new_block_expiry_date: string | null;
|
|
992
|
-
starting_balance: number;
|
|
993
|
-
}
|
|
994
|
-
namespace ExpirationChangeLedgerEntry {
|
|
995
|
-
interface CreditBlock {
|
|
996
|
-
id: string;
|
|
997
|
-
expiry_date: string | null;
|
|
998
|
-
per_unit_cost_basis: string | null;
|
|
999
|
-
}
|
|
1000
|
-
interface Customer {
|
|
1001
|
-
id: string;
|
|
1002
|
-
external_customer_id: string | null;
|
|
1003
|
-
}
|
|
1004
|
-
}
|
|
1005
|
-
interface CreditBlockExpiryLedgerEntry {
|
|
1006
|
-
id: string;
|
|
1007
|
-
amount: number;
|
|
1008
|
-
created_at: string;
|
|
1009
|
-
credit_block: CreditBlockExpiryLedgerEntry.CreditBlock;
|
|
1010
|
-
currency: string;
|
|
1011
|
-
customer: CreditBlockExpiryLedgerEntry.Customer;
|
|
1012
|
-
description: string | null;
|
|
1013
|
-
ending_balance: number;
|
|
1014
|
-
entry_status: 'committed' | 'pending';
|
|
1015
|
-
entry_type: 'credit_block_expiry';
|
|
1016
|
-
ledger_sequence_number: number;
|
|
1017
|
-
/**
|
|
1018
|
-
* User specified key-value pairs for the resource. If not present, this defaults
|
|
1019
|
-
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
1020
|
-
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
1021
|
-
* `null`.
|
|
1022
|
-
*/
|
|
1023
|
-
metadata: Record<string, string>;
|
|
1024
|
-
starting_balance: number;
|
|
1025
|
-
}
|
|
1026
|
-
namespace CreditBlockExpiryLedgerEntry {
|
|
1027
|
-
interface CreditBlock {
|
|
1028
|
-
id: string;
|
|
1029
|
-
expiry_date: string | null;
|
|
1030
|
-
per_unit_cost_basis: string | null;
|
|
1031
|
-
}
|
|
1032
|
-
interface Customer {
|
|
1033
|
-
id: string;
|
|
1034
|
-
external_customer_id: string | null;
|
|
1035
|
-
}
|
|
1036
|
-
}
|
|
1037
|
-
interface VoidLedgerEntry {
|
|
1038
|
-
id: string;
|
|
1039
|
-
amount: number;
|
|
1040
|
-
created_at: string;
|
|
1041
|
-
credit_block: VoidLedgerEntry.CreditBlock;
|
|
1042
|
-
currency: string;
|
|
1043
|
-
customer: VoidLedgerEntry.Customer;
|
|
1044
|
-
description: string | null;
|
|
1045
|
-
ending_balance: number;
|
|
1046
|
-
entry_status: 'committed' | 'pending';
|
|
1047
|
-
entry_type: 'void';
|
|
1048
|
-
ledger_sequence_number: number;
|
|
1049
|
-
/**
|
|
1050
|
-
* User specified key-value pairs for the resource. If not present, this defaults
|
|
1051
|
-
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
1052
|
-
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
1053
|
-
* `null`.
|
|
1054
|
-
*/
|
|
1055
|
-
metadata: Record<string, string>;
|
|
1056
|
-
starting_balance: number;
|
|
1057
|
-
void_amount: number;
|
|
1058
|
-
void_reason: string | null;
|
|
1059
|
-
}
|
|
1060
|
-
namespace VoidLedgerEntry {
|
|
1061
|
-
interface CreditBlock {
|
|
1062
|
-
id: string;
|
|
1063
|
-
expiry_date: string | null;
|
|
1064
|
-
per_unit_cost_basis: string | null;
|
|
1065
|
-
}
|
|
1066
|
-
interface Customer {
|
|
1067
|
-
id: string;
|
|
1068
|
-
external_customer_id: string | null;
|
|
1069
|
-
}
|
|
1070
|
-
}
|
|
1071
|
-
interface VoidInitiatedLedgerEntry {
|
|
1072
|
-
id: string;
|
|
1073
|
-
amount: number;
|
|
1074
|
-
created_at: string;
|
|
1075
|
-
credit_block: VoidInitiatedLedgerEntry.CreditBlock;
|
|
1076
|
-
currency: string;
|
|
1077
|
-
customer: VoidInitiatedLedgerEntry.Customer;
|
|
1078
|
-
description: string | null;
|
|
1079
|
-
ending_balance: number;
|
|
1080
|
-
entry_status: 'committed' | 'pending';
|
|
1081
|
-
entry_type: 'void_initiated';
|
|
1082
|
-
ledger_sequence_number: number;
|
|
1083
|
-
/**
|
|
1084
|
-
* User specified key-value pairs for the resource. If not present, this defaults
|
|
1085
|
-
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
1086
|
-
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
1087
|
-
* `null`.
|
|
1088
|
-
*/
|
|
1089
|
-
metadata: Record<string, string>;
|
|
1090
|
-
new_block_expiry_date: string;
|
|
1091
|
-
starting_balance: number;
|
|
1092
|
-
void_amount: number;
|
|
1093
|
-
void_reason: string | null;
|
|
1094
|
-
}
|
|
1095
|
-
namespace VoidInitiatedLedgerEntry {
|
|
1096
|
-
interface CreditBlock {
|
|
1097
|
-
id: string;
|
|
1098
|
-
expiry_date: string | null;
|
|
1099
|
-
per_unit_cost_basis: string | null;
|
|
1100
|
-
}
|
|
1101
|
-
interface Customer {
|
|
1102
|
-
id: string;
|
|
1103
|
-
external_customer_id: string | null;
|
|
1104
|
-
}
|
|
1105
|
-
}
|
|
1106
|
-
interface AmendmentLedgerEntry {
|
|
1107
|
-
id: string;
|
|
1108
|
-
amount: number;
|
|
1109
|
-
created_at: string;
|
|
1110
|
-
credit_block: AmendmentLedgerEntry.CreditBlock;
|
|
1111
|
-
currency: string;
|
|
1112
|
-
customer: AmendmentLedgerEntry.Customer;
|
|
1113
|
-
description: string | null;
|
|
1114
|
-
ending_balance: number;
|
|
1115
|
-
entry_status: 'committed' | 'pending';
|
|
1116
|
-
entry_type: 'amendment';
|
|
1117
|
-
ledger_sequence_number: number;
|
|
1118
|
-
/**
|
|
1119
|
-
* User specified key-value pairs for the resource. If not present, this defaults
|
|
1120
|
-
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
1121
|
-
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
1122
|
-
* `null`.
|
|
1123
|
-
*/
|
|
1124
|
-
metadata: Record<string, string>;
|
|
1125
|
-
starting_balance: number;
|
|
1126
|
-
}
|
|
1127
|
-
namespace AmendmentLedgerEntry {
|
|
1128
|
-
interface CreditBlock {
|
|
1129
|
-
id: string;
|
|
1130
|
-
expiry_date: string | null;
|
|
1131
|
-
per_unit_cost_basis: string | null;
|
|
1132
|
-
}
|
|
1133
|
-
interface Customer {
|
|
1134
|
-
id: string;
|
|
1135
|
-
external_customer_id: string | null;
|
|
1136
|
-
}
|
|
1137
|
-
}
|
|
1138
|
-
}
|
|
586
|
+
export type LedgerCreateEntryByExternalIDResponse = IncrementLedgerEntry | DecrementLedgerEntry | ExpirationChangeLedgerEntry | CreditBlockExpiryLedgerEntry | VoidLedgerEntry | VoidInitiatedLedgerEntry | AmendmentLedgerEntry;
|
|
1139
587
|
/**
|
|
1140
588
|
* The [Credit Ledger Entry resource](/product-catalog/prepurchase) models prepaid
|
|
1141
589
|
* credits within Orb.
|
|
1142
590
|
*/
|
|
1143
|
-
export type LedgerListByExternalIDResponse =
|
|
1144
|
-
export declare namespace LedgerListByExternalIDResponse {
|
|
1145
|
-
interface IncrementLedgerEntry {
|
|
1146
|
-
id: string;
|
|
1147
|
-
amount: number;
|
|
1148
|
-
created_at: string;
|
|
1149
|
-
credit_block: IncrementLedgerEntry.CreditBlock;
|
|
1150
|
-
currency: string;
|
|
1151
|
-
customer: IncrementLedgerEntry.Customer;
|
|
1152
|
-
description: string | null;
|
|
1153
|
-
ending_balance: number;
|
|
1154
|
-
entry_status: 'committed' | 'pending';
|
|
1155
|
-
entry_type: 'increment';
|
|
1156
|
-
ledger_sequence_number: number;
|
|
1157
|
-
/**
|
|
1158
|
-
* User specified key-value pairs for the resource. If not present, this defaults
|
|
1159
|
-
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
1160
|
-
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
1161
|
-
* `null`.
|
|
1162
|
-
*/
|
|
1163
|
-
metadata: Record<string, string>;
|
|
1164
|
-
starting_balance: number;
|
|
1165
|
-
/**
|
|
1166
|
-
* If the increment resulted in invoice creation, the list of created invoices
|
|
1167
|
-
*/
|
|
1168
|
-
created_invoices?: Array<InvoicesAPI.Invoice> | null;
|
|
1169
|
-
}
|
|
1170
|
-
namespace IncrementLedgerEntry {
|
|
1171
|
-
interface CreditBlock {
|
|
1172
|
-
id: string;
|
|
1173
|
-
expiry_date: string | null;
|
|
1174
|
-
per_unit_cost_basis: string | null;
|
|
1175
|
-
}
|
|
1176
|
-
interface Customer {
|
|
1177
|
-
id: string;
|
|
1178
|
-
external_customer_id: string | null;
|
|
1179
|
-
}
|
|
1180
|
-
}
|
|
1181
|
-
interface DecrementLedgerEntry {
|
|
1182
|
-
id: string;
|
|
1183
|
-
amount: number;
|
|
1184
|
-
created_at: string;
|
|
1185
|
-
credit_block: DecrementLedgerEntry.CreditBlock;
|
|
1186
|
-
currency: string;
|
|
1187
|
-
customer: DecrementLedgerEntry.Customer;
|
|
1188
|
-
description: string | null;
|
|
1189
|
-
ending_balance: number;
|
|
1190
|
-
entry_status: 'committed' | 'pending';
|
|
1191
|
-
entry_type: 'decrement';
|
|
1192
|
-
ledger_sequence_number: number;
|
|
1193
|
-
/**
|
|
1194
|
-
* User specified key-value pairs for the resource. If not present, this defaults
|
|
1195
|
-
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
1196
|
-
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
1197
|
-
* `null`.
|
|
1198
|
-
*/
|
|
1199
|
-
metadata: Record<string, string>;
|
|
1200
|
-
starting_balance: number;
|
|
1201
|
-
event_id?: string | null;
|
|
1202
|
-
invoice_id?: string | null;
|
|
1203
|
-
price_id?: string | null;
|
|
1204
|
-
}
|
|
1205
|
-
namespace DecrementLedgerEntry {
|
|
1206
|
-
interface CreditBlock {
|
|
1207
|
-
id: string;
|
|
1208
|
-
expiry_date: string | null;
|
|
1209
|
-
per_unit_cost_basis: string | null;
|
|
1210
|
-
}
|
|
1211
|
-
interface Customer {
|
|
1212
|
-
id: string;
|
|
1213
|
-
external_customer_id: string | null;
|
|
1214
|
-
}
|
|
1215
|
-
}
|
|
1216
|
-
interface ExpirationChangeLedgerEntry {
|
|
1217
|
-
id: string;
|
|
1218
|
-
amount: number;
|
|
1219
|
-
created_at: string;
|
|
1220
|
-
credit_block: ExpirationChangeLedgerEntry.CreditBlock;
|
|
1221
|
-
currency: string;
|
|
1222
|
-
customer: ExpirationChangeLedgerEntry.Customer;
|
|
1223
|
-
description: string | null;
|
|
1224
|
-
ending_balance: number;
|
|
1225
|
-
entry_status: 'committed' | 'pending';
|
|
1226
|
-
entry_type: 'expiration_change';
|
|
1227
|
-
ledger_sequence_number: number;
|
|
1228
|
-
/**
|
|
1229
|
-
* User specified key-value pairs for the resource. If not present, this defaults
|
|
1230
|
-
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
1231
|
-
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
1232
|
-
* `null`.
|
|
1233
|
-
*/
|
|
1234
|
-
metadata: Record<string, string>;
|
|
1235
|
-
new_block_expiry_date: string | null;
|
|
1236
|
-
starting_balance: number;
|
|
1237
|
-
}
|
|
1238
|
-
namespace ExpirationChangeLedgerEntry {
|
|
1239
|
-
interface CreditBlock {
|
|
1240
|
-
id: string;
|
|
1241
|
-
expiry_date: string | null;
|
|
1242
|
-
per_unit_cost_basis: string | null;
|
|
1243
|
-
}
|
|
1244
|
-
interface Customer {
|
|
1245
|
-
id: string;
|
|
1246
|
-
external_customer_id: string | null;
|
|
1247
|
-
}
|
|
1248
|
-
}
|
|
1249
|
-
interface CreditBlockExpiryLedgerEntry {
|
|
1250
|
-
id: string;
|
|
1251
|
-
amount: number;
|
|
1252
|
-
created_at: string;
|
|
1253
|
-
credit_block: CreditBlockExpiryLedgerEntry.CreditBlock;
|
|
1254
|
-
currency: string;
|
|
1255
|
-
customer: CreditBlockExpiryLedgerEntry.Customer;
|
|
1256
|
-
description: string | null;
|
|
1257
|
-
ending_balance: number;
|
|
1258
|
-
entry_status: 'committed' | 'pending';
|
|
1259
|
-
entry_type: 'credit_block_expiry';
|
|
1260
|
-
ledger_sequence_number: number;
|
|
1261
|
-
/**
|
|
1262
|
-
* User specified key-value pairs for the resource. If not present, this defaults
|
|
1263
|
-
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
1264
|
-
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
1265
|
-
* `null`.
|
|
1266
|
-
*/
|
|
1267
|
-
metadata: Record<string, string>;
|
|
1268
|
-
starting_balance: number;
|
|
1269
|
-
}
|
|
1270
|
-
namespace CreditBlockExpiryLedgerEntry {
|
|
1271
|
-
interface CreditBlock {
|
|
1272
|
-
id: string;
|
|
1273
|
-
expiry_date: string | null;
|
|
1274
|
-
per_unit_cost_basis: string | null;
|
|
1275
|
-
}
|
|
1276
|
-
interface Customer {
|
|
1277
|
-
id: string;
|
|
1278
|
-
external_customer_id: string | null;
|
|
1279
|
-
}
|
|
1280
|
-
}
|
|
1281
|
-
interface VoidLedgerEntry {
|
|
1282
|
-
id: string;
|
|
1283
|
-
amount: number;
|
|
1284
|
-
created_at: string;
|
|
1285
|
-
credit_block: VoidLedgerEntry.CreditBlock;
|
|
1286
|
-
currency: string;
|
|
1287
|
-
customer: VoidLedgerEntry.Customer;
|
|
1288
|
-
description: string | null;
|
|
1289
|
-
ending_balance: number;
|
|
1290
|
-
entry_status: 'committed' | 'pending';
|
|
1291
|
-
entry_type: 'void';
|
|
1292
|
-
ledger_sequence_number: number;
|
|
1293
|
-
/**
|
|
1294
|
-
* User specified key-value pairs for the resource. If not present, this defaults
|
|
1295
|
-
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
1296
|
-
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
1297
|
-
* `null`.
|
|
1298
|
-
*/
|
|
1299
|
-
metadata: Record<string, string>;
|
|
1300
|
-
starting_balance: number;
|
|
1301
|
-
void_amount: number;
|
|
1302
|
-
void_reason: string | null;
|
|
1303
|
-
}
|
|
1304
|
-
namespace VoidLedgerEntry {
|
|
1305
|
-
interface CreditBlock {
|
|
1306
|
-
id: string;
|
|
1307
|
-
expiry_date: string | null;
|
|
1308
|
-
per_unit_cost_basis: string | null;
|
|
1309
|
-
}
|
|
1310
|
-
interface Customer {
|
|
1311
|
-
id: string;
|
|
1312
|
-
external_customer_id: string | null;
|
|
1313
|
-
}
|
|
1314
|
-
}
|
|
1315
|
-
interface VoidInitiatedLedgerEntry {
|
|
1316
|
-
id: string;
|
|
1317
|
-
amount: number;
|
|
1318
|
-
created_at: string;
|
|
1319
|
-
credit_block: VoidInitiatedLedgerEntry.CreditBlock;
|
|
1320
|
-
currency: string;
|
|
1321
|
-
customer: VoidInitiatedLedgerEntry.Customer;
|
|
1322
|
-
description: string | null;
|
|
1323
|
-
ending_balance: number;
|
|
1324
|
-
entry_status: 'committed' | 'pending';
|
|
1325
|
-
entry_type: 'void_initiated';
|
|
1326
|
-
ledger_sequence_number: number;
|
|
1327
|
-
/**
|
|
1328
|
-
* User specified key-value pairs for the resource. If not present, this defaults
|
|
1329
|
-
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
1330
|
-
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
1331
|
-
* `null`.
|
|
1332
|
-
*/
|
|
1333
|
-
metadata: Record<string, string>;
|
|
1334
|
-
new_block_expiry_date: string;
|
|
1335
|
-
starting_balance: number;
|
|
1336
|
-
void_amount: number;
|
|
1337
|
-
void_reason: string | null;
|
|
1338
|
-
}
|
|
1339
|
-
namespace VoidInitiatedLedgerEntry {
|
|
1340
|
-
interface CreditBlock {
|
|
1341
|
-
id: string;
|
|
1342
|
-
expiry_date: string | null;
|
|
1343
|
-
per_unit_cost_basis: string | null;
|
|
1344
|
-
}
|
|
1345
|
-
interface Customer {
|
|
1346
|
-
id: string;
|
|
1347
|
-
external_customer_id: string | null;
|
|
1348
|
-
}
|
|
1349
|
-
}
|
|
1350
|
-
interface AmendmentLedgerEntry {
|
|
1351
|
-
id: string;
|
|
1352
|
-
amount: number;
|
|
1353
|
-
created_at: string;
|
|
1354
|
-
credit_block: AmendmentLedgerEntry.CreditBlock;
|
|
1355
|
-
currency: string;
|
|
1356
|
-
customer: AmendmentLedgerEntry.Customer;
|
|
1357
|
-
description: string | null;
|
|
1358
|
-
ending_balance: number;
|
|
1359
|
-
entry_status: 'committed' | 'pending';
|
|
1360
|
-
entry_type: 'amendment';
|
|
1361
|
-
ledger_sequence_number: number;
|
|
1362
|
-
/**
|
|
1363
|
-
* User specified key-value pairs for the resource. If not present, this defaults
|
|
1364
|
-
* to an empty dictionary. Individual keys can be removed by setting the value to
|
|
1365
|
-
* `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
|
1366
|
-
* `null`.
|
|
1367
|
-
*/
|
|
1368
|
-
metadata: Record<string, string>;
|
|
1369
|
-
starting_balance: number;
|
|
1370
|
-
}
|
|
1371
|
-
namespace AmendmentLedgerEntry {
|
|
1372
|
-
interface CreditBlock {
|
|
1373
|
-
id: string;
|
|
1374
|
-
expiry_date: string | null;
|
|
1375
|
-
per_unit_cost_basis: string | null;
|
|
1376
|
-
}
|
|
1377
|
-
interface Customer {
|
|
1378
|
-
id: string;
|
|
1379
|
-
external_customer_id: string | null;
|
|
1380
|
-
}
|
|
1381
|
-
}
|
|
1382
|
-
}
|
|
591
|
+
export type LedgerListByExternalIDResponse = IncrementLedgerEntry | DecrementLedgerEntry | ExpirationChangeLedgerEntry | CreditBlockExpiryLedgerEntry | VoidLedgerEntry | VoidInitiatedLedgerEntry | AmendmentLedgerEntry;
|
|
1383
592
|
export interface LedgerListParams extends PageParams {
|
|
1384
593
|
'created_at[gt]'?: string | null;
|
|
1385
594
|
'created_at[gte]'?: string | null;
|
|
@@ -1819,6 +1028,6 @@ export interface LedgerListByExternalIDParams extends PageParams {
|
|
|
1819
1028
|
minimum_amount?: string | null;
|
|
1820
1029
|
}
|
|
1821
1030
|
export declare namespace Ledger {
|
|
1822
|
-
export { type LedgerListResponse as LedgerListResponse, type LedgerCreateEntryResponse as LedgerCreateEntryResponse, type LedgerCreateEntryByExternalIDResponse as LedgerCreateEntryByExternalIDResponse, type LedgerListByExternalIDResponse as LedgerListByExternalIDResponse, LedgerListResponsesPage as LedgerListResponsesPage, LedgerListByExternalIDResponsesPage as LedgerListByExternalIDResponsesPage, type LedgerListParams as LedgerListParams, type LedgerCreateEntryParams as LedgerCreateEntryParams, type LedgerCreateEntryByExternalIDParams as LedgerCreateEntryByExternalIDParams, type LedgerListByExternalIDParams as LedgerListByExternalIDParams, };
|
|
1031
|
+
export { type AffectedBlock as AffectedBlock, type AmendmentLedgerEntry as AmendmentLedgerEntry, type CreditBlockExpiryLedgerEntry as CreditBlockExpiryLedgerEntry, type DecrementLedgerEntry as DecrementLedgerEntry, type ExpirationChangeLedgerEntry as ExpirationChangeLedgerEntry, type IncrementLedgerEntry as IncrementLedgerEntry, type VoidInitiatedLedgerEntry as VoidInitiatedLedgerEntry, type VoidLedgerEntry as VoidLedgerEntry, type LedgerListResponse as LedgerListResponse, type LedgerCreateEntryResponse as LedgerCreateEntryResponse, type LedgerCreateEntryByExternalIDResponse as LedgerCreateEntryByExternalIDResponse, type LedgerListByExternalIDResponse as LedgerListByExternalIDResponse, LedgerListResponsesPage as LedgerListResponsesPage, LedgerListByExternalIDResponsesPage as LedgerListByExternalIDResponsesPage, type LedgerListParams as LedgerListParams, type LedgerCreateEntryParams as LedgerCreateEntryParams, type LedgerCreateEntryByExternalIDParams as LedgerCreateEntryByExternalIDParams, type LedgerListByExternalIDParams as LedgerListByExternalIDParams, };
|
|
1823
1032
|
}
|
|
1824
1033
|
//# sourceMappingURL=ledger.d.ts.map
|