orb-billing 1.26.0 → 1.28.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.
Files changed (147) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/README.md +1 -1
  3. package/core.d.ts +0 -10
  4. package/core.d.ts.map +1 -1
  5. package/core.js +1 -13
  6. package/core.js.map +1 -1
  7. package/core.mjs +0 -11
  8. package/core.mjs.map +1 -1
  9. package/package.json +1 -1
  10. package/resource.d.ts +1 -7
  11. package/resource.d.ts.map +1 -1
  12. package/resource.js +1 -7
  13. package/resource.js.map +1 -1
  14. package/resource.mjs +1 -7
  15. package/resource.mjs.map +1 -1
  16. package/resources/coupons/coupons.d.ts.map +1 -1
  17. package/resources/coupons/coupons.js +5 -5
  18. package/resources/coupons/coupons.js.map +1 -1
  19. package/resources/coupons/coupons.mjs +5 -5
  20. package/resources/coupons/coupons.mjs.map +1 -1
  21. package/resources/coupons/subscriptions.d.ts.map +1 -1
  22. package/resources/coupons/subscriptions.js +4 -1
  23. package/resources/coupons/subscriptions.js.map +1 -1
  24. package/resources/coupons/subscriptions.mjs +4 -1
  25. package/resources/coupons/subscriptions.mjs.map +1 -1
  26. package/resources/credit-notes.js +2 -2
  27. package/resources/credit-notes.js.map +1 -1
  28. package/resources/credit-notes.mjs +2 -2
  29. package/resources/credit-notes.mjs.map +1 -1
  30. package/resources/customers/balance-transactions.js +2 -2
  31. package/resources/customers/balance-transactions.js.map +1 -1
  32. package/resources/customers/balance-transactions.mjs +2 -2
  33. package/resources/customers/balance-transactions.mjs.map +1 -1
  34. package/resources/customers/costs.d.ts.map +1 -1
  35. package/resources/customers/costs.js +5 -2
  36. package/resources/customers/costs.js.map +1 -1
  37. package/resources/customers/costs.mjs +5 -2
  38. package/resources/customers/costs.mjs.map +1 -1
  39. package/resources/customers/credits/credits.d.ts.map +1 -1
  40. package/resources/customers/credits/credits.js +3 -3
  41. package/resources/customers/credits/credits.js.map +1 -1
  42. package/resources/customers/credits/credits.mjs +3 -3
  43. package/resources/customers/credits/credits.mjs.map +1 -1
  44. package/resources/customers/credits/ledger.d.ts +132 -20
  45. package/resources/customers/credits/ledger.d.ts.map +1 -1
  46. package/resources/customers/credits/ledger.js +4 -4
  47. package/resources/customers/credits/ledger.js.map +1 -1
  48. package/resources/customers/credits/ledger.mjs +4 -4
  49. package/resources/customers/credits/ledger.mjs.map +1 -1
  50. package/resources/customers/customers.d.ts +12 -23
  51. package/resources/customers/customers.d.ts.map +1 -1
  52. package/resources/customers/customers.js +12 -12
  53. package/resources/customers/customers.js.map +1 -1
  54. package/resources/customers/customers.mjs +12 -12
  55. package/resources/customers/customers.mjs.map +1 -1
  56. package/resources/customers/usage.js +2 -2
  57. package/resources/customers/usage.js.map +1 -1
  58. package/resources/customers/usage.mjs +2 -2
  59. package/resources/customers/usage.mjs.map +1 -1
  60. package/resources/events/backfills.js +5 -5
  61. package/resources/events/backfills.js.map +1 -1
  62. package/resources/events/backfills.mjs +5 -5
  63. package/resources/events/backfills.mjs.map +1 -1
  64. package/resources/events/events.d.ts.map +1 -1
  65. package/resources/events/events.js +5 -5
  66. package/resources/events/events.js.map +1 -1
  67. package/resources/events/events.mjs +5 -5
  68. package/resources/events/events.mjs.map +1 -1
  69. package/resources/invoice-line-items.js +1 -1
  70. package/resources/invoice-line-items.js.map +1 -1
  71. package/resources/invoice-line-items.mjs +1 -1
  72. package/resources/invoice-line-items.mjs.map +1 -1
  73. package/resources/invoices.d.ts +10 -2
  74. package/resources/invoices.d.ts.map +1 -1
  75. package/resources/invoices.js +7 -7
  76. package/resources/invoices.js.map +1 -1
  77. package/resources/invoices.mjs +7 -7
  78. package/resources/invoices.mjs.map +1 -1
  79. package/resources/items.js +3 -3
  80. package/resources/items.js.map +1 -1
  81. package/resources/items.mjs +3 -3
  82. package/resources/items.mjs.map +1 -1
  83. package/resources/metrics.d.ts +14 -3
  84. package/resources/metrics.d.ts.map +1 -1
  85. package/resources/metrics.js +3 -3
  86. package/resources/metrics.js.map +1 -1
  87. package/resources/metrics.mjs +3 -3
  88. package/resources/metrics.mjs.map +1 -1
  89. package/resources/plans/external-plan-id.d.ts +4 -1
  90. package/resources/plans/external-plan-id.d.ts.map +1 -1
  91. package/resources/plans/external-plan-id.js +2 -2
  92. package/resources/plans/external-plan-id.js.map +1 -1
  93. package/resources/plans/external-plan-id.mjs +2 -2
  94. package/resources/plans/external-plan-id.mjs.map +1 -1
  95. package/resources/plans/plans.d.ts +13 -3
  96. package/resources/plans/plans.d.ts.map +1 -1
  97. package/resources/plans/plans.js +5 -5
  98. package/resources/plans/plans.js.map +1 -1
  99. package/resources/plans/plans.mjs +5 -5
  100. package/resources/plans/plans.mjs.map +1 -1
  101. package/resources/prices/external-price-id.js +1 -1
  102. package/resources/prices/external-price-id.js.map +1 -1
  103. package/resources/prices/external-price-id.mjs +1 -1
  104. package/resources/prices/external-price-id.mjs.map +1 -1
  105. package/resources/prices/prices.d.ts +135 -135
  106. package/resources/prices/prices.d.ts.map +1 -1
  107. package/resources/prices/prices.js +4 -4
  108. package/resources/prices/prices.js.map +1 -1
  109. package/resources/prices/prices.mjs +4 -4
  110. package/resources/prices/prices.mjs.map +1 -1
  111. package/resources/subscriptions.d.ts +7 -4
  112. package/resources/subscriptions.d.ts.map +1 -1
  113. package/resources/subscriptions.js +17 -14
  114. package/resources/subscriptions.js.map +1 -1
  115. package/resources/subscriptions.mjs +17 -14
  116. package/resources/subscriptions.mjs.map +1 -1
  117. package/resources/top-level.js +1 -1
  118. package/resources/top-level.js.map +1 -1
  119. package/resources/top-level.mjs +1 -1
  120. package/resources/top-level.mjs.map +1 -1
  121. package/src/core.ts +0 -21
  122. package/src/resource.ts +3 -16
  123. package/src/resources/coupons/coupons.ts +5 -5
  124. package/src/resources/coupons/subscriptions.ts +4 -1
  125. package/src/resources/credit-notes.ts +2 -2
  126. package/src/resources/customers/balance-transactions.ts +2 -2
  127. package/src/resources/customers/costs.ts +5 -2
  128. package/src/resources/customers/credits/credits.ts +3 -3
  129. package/src/resources/customers/credits/ledger.ts +136 -24
  130. package/src/resources/customers/customers.ts +23 -36
  131. package/src/resources/customers/usage.ts +2 -2
  132. package/src/resources/events/backfills.ts +5 -5
  133. package/src/resources/events/events.ts +5 -5
  134. package/src/resources/invoice-line-items.ts +1 -1
  135. package/src/resources/invoices.ts +17 -9
  136. package/src/resources/items.ts +3 -3
  137. package/src/resources/metrics.ts +17 -6
  138. package/src/resources/plans/external-plan-id.ts +6 -3
  139. package/src/resources/plans/plans.ts +18 -8
  140. package/src/resources/prices/external-price-id.ts +1 -1
  141. package/src/resources/prices/prices.ts +221 -221
  142. package/src/resources/subscriptions.ts +24 -18
  143. package/src/resources/top-level.ts +1 -1
  144. package/src/version.ts +1 -1
  145. package/version.d.ts +1 -1
  146. package/version.js +1 -1
  147. package/version.mjs +1 -1
@@ -9,7 +9,7 @@ import * as ExternalPriceIDAPI from "./external-price-id";
9
9
  import { Page, type PageParams } from "../../pagination";
10
10
 
11
11
  export class Prices extends APIResource {
12
- externalPriceId: ExternalPriceIDAPI.ExternalPriceID = new ExternalPriceIDAPI.ExternalPriceID(this.client);
12
+ externalPriceId: ExternalPriceIDAPI.ExternalPriceID = new ExternalPriceIDAPI.ExternalPriceID(this._client);
13
13
 
14
14
  /**
15
15
  * This endpoint is used to create a [price](../reference/price). A price created
@@ -24,7 +24,7 @@ export class Prices extends APIResource {
24
24
  * price model configurations possible in this endpoint.
25
25
  */
26
26
  create(body: PriceCreateParams, options?: Core.RequestOptions): Core.APIPromise<Price> {
27
- return this.post('/prices', { body, ...options });
27
+ return this._client.post('/prices', { body, ...options });
28
28
  }
29
29
 
30
30
  /**
@@ -40,14 +40,14 @@ export class Prices extends APIResource {
40
40
  if (isRequestOptions(query)) {
41
41
  return this.list({}, query);
42
42
  }
43
- return this.getAPIList('/prices', PricesPage, { query, ...options });
43
+ return this._client.getAPIList('/prices', PricesPage, { query, ...options });
44
44
  }
45
45
 
46
46
  /**
47
47
  * This endpoint returns a price given an identifier.
48
48
  */
49
49
  fetch(priceId: string, options?: Core.RequestOptions): Core.APIPromise<Price> {
50
- return this.get(`/prices/${priceId}`, options);
50
+ return this._client.get(`/prices/${priceId}`, options);
51
51
  }
52
52
  }
53
53
 
@@ -314,12 +314,22 @@ export namespace Price {
314
314
 
315
315
  currency: string;
316
316
 
317
+ discount: Shared.Discount | null;
318
+
317
319
  external_price_id: string | null;
318
320
 
319
321
  fixed_price_quantity: number | null;
320
322
 
321
323
  item: UnitPrice.Item;
322
324
 
325
+ maximum: UnitPrice.Maximum | null;
326
+
327
+ maximum_amount: string | null;
328
+
329
+ minimum: UnitPrice.Minimum | null;
330
+
331
+ minimum_amount: string | null;
332
+
323
333
  model_type: 'unit';
324
334
 
325
335
  name: string;
@@ -329,16 +339,6 @@ export namespace Price {
329
339
  price_type: 'usage_price' | 'fixed_price';
330
340
 
331
341
  unit_config: UnitPrice.UnitConfig;
332
-
333
- discount?: Shared.Discount | null;
334
-
335
- maximum?: UnitPrice.Maximum | null;
336
-
337
- maximum_amount?: string | null;
338
-
339
- minimum?: UnitPrice.Minimum | null;
340
-
341
- minimum_amount?: string | null;
342
342
  }
343
343
 
344
344
  export namespace UnitPrice {
@@ -352,18 +352,6 @@ export namespace Price {
352
352
  name: string;
353
353
  }
354
354
 
355
- export interface UnitConfig {
356
- /**
357
- * Rate per unit of usage
358
- */
359
- unit_amount: string;
360
-
361
- /**
362
- * Multiplier to scale rated quantity by
363
- */
364
- scaling_factor?: number | null;
365
- }
366
-
367
355
  export interface Maximum {
368
356
  /**
369
357
  * List of price_ids that this maximum amount applies to. For plan/plan phase
@@ -389,6 +377,18 @@ export namespace Price {
389
377
  */
390
378
  minimum_amount: string;
391
379
  }
380
+
381
+ export interface UnitConfig {
382
+ /**
383
+ * Rate per unit of usage
384
+ */
385
+ unit_amount: string;
386
+
387
+ /**
388
+ * Multiplier to scale rated quantity by
389
+ */
390
+ scaling_factor?: number | null;
391
+ }
392
392
  }
393
393
 
394
394
  export interface PackagePrice {
@@ -402,12 +402,22 @@ export namespace Price {
402
402
 
403
403
  currency: string;
404
404
 
405
+ discount: Shared.Discount | null;
406
+
405
407
  external_price_id: string | null;
406
408
 
407
409
  fixed_price_quantity: number | null;
408
410
 
409
411
  item: PackagePrice.Item;
410
412
 
413
+ maximum: PackagePrice.Maximum | null;
414
+
415
+ maximum_amount: string | null;
416
+
417
+ minimum: PackagePrice.Minimum | null;
418
+
419
+ minimum_amount: string | null;
420
+
411
421
  model_type: 'package';
412
422
 
413
423
  name: string;
@@ -417,16 +427,6 @@ export namespace Price {
417
427
  plan_phase_order: number | null;
418
428
 
419
429
  price_type: 'usage_price' | 'fixed_price';
420
-
421
- discount?: Shared.Discount | null;
422
-
423
- maximum?: PackagePrice.Maximum | null;
424
-
425
- maximum_amount?: string | null;
426
-
427
- minimum?: PackagePrice.Minimum | null;
428
-
429
- minimum_amount?: string | null;
430
430
  }
431
431
 
432
432
  export namespace PackagePrice {
@@ -440,19 +440,6 @@ export namespace Price {
440
440
  name: string;
441
441
  }
442
442
 
443
- export interface PackageConfig {
444
- /**
445
- * A currency amount to rate usage by
446
- */
447
- package_amount: string;
448
-
449
- /**
450
- * An integer amount to represent package size. For example, 1000 here would divide
451
- * usage by 1000 before multiplying by package_amount in rating
452
- */
453
- package_size?: number | null;
454
- }
455
-
456
443
  export interface Maximum {
457
444
  /**
458
445
  * List of price_ids that this maximum amount applies to. For plan/plan phase
@@ -478,6 +465,19 @@ export namespace Price {
478
465
  */
479
466
  minimum_amount: string;
480
467
  }
468
+
469
+ export interface PackageConfig {
470
+ /**
471
+ * A currency amount to rate usage by
472
+ */
473
+ package_amount: string;
474
+
475
+ /**
476
+ * An integer amount to represent package size. For example, 1000 here would divide
477
+ * usage by 1000 before multiplying by package_amount in rating
478
+ */
479
+ package_size?: number | null;
480
+ }
481
481
  }
482
482
 
483
483
  export interface MatrixPrice {
@@ -491,6 +491,8 @@ export namespace Price {
491
491
 
492
492
  currency: string;
493
493
 
494
+ discount: Shared.Discount | null;
495
+
494
496
  external_price_id: string | null;
495
497
 
496
498
  fixed_price_quantity: number | null;
@@ -499,23 +501,21 @@ export namespace Price {
499
501
 
500
502
  matrix_config: MatrixPrice.MatrixConfig;
501
503
 
502
- model_type: 'matrix';
504
+ maximum: MatrixPrice.Maximum | null;
503
505
 
504
- name: string;
506
+ maximum_amount: string | null;
505
507
 
506
- plan_phase_order: number | null;
508
+ minimum: MatrixPrice.Minimum | null;
507
509
 
508
- price_type: 'usage_price' | 'fixed_price';
509
-
510
- discount?: Shared.Discount | null;
510
+ minimum_amount: string | null;
511
511
 
512
- maximum?: MatrixPrice.Maximum | null;
512
+ model_type: 'matrix';
513
513
 
514
- maximum_amount?: string | null;
514
+ name: string;
515
515
 
516
- minimum?: MatrixPrice.Minimum | null;
516
+ plan_phase_order: number | null;
517
517
 
518
- minimum_amount?: string | null;
518
+ price_type: 'usage_price' | 'fixed_price';
519
519
  }
520
520
 
521
521
  export namespace MatrixPrice {
@@ -611,12 +611,22 @@ export namespace Price {
611
611
 
612
612
  currency: string;
613
613
 
614
+ discount: Shared.Discount | null;
615
+
614
616
  external_price_id: string | null;
615
617
 
616
618
  fixed_price_quantity: number | null;
617
619
 
618
620
  item: TieredPrice.Item;
619
621
 
622
+ maximum: TieredPrice.Maximum | null;
623
+
624
+ maximum_amount: string | null;
625
+
626
+ minimum: TieredPrice.Minimum | null;
627
+
628
+ minimum_amount: string | null;
629
+
620
630
  model_type: 'tiered';
621
631
 
622
632
  name: string;
@@ -626,16 +636,6 @@ export namespace Price {
626
636
  price_type: 'usage_price' | 'fixed_price';
627
637
 
628
638
  tiered_config: TieredPrice.TieredConfig;
629
-
630
- discount?: Shared.Discount | null;
631
-
632
- maximum?: TieredPrice.Maximum | null;
633
-
634
- maximum_amount?: string | null;
635
-
636
- minimum?: TieredPrice.Minimum | null;
637
-
638
- minimum_amount?: string | null;
639
639
  }
640
640
 
641
641
  export namespace TieredPrice {
@@ -649,32 +649,6 @@ export namespace Price {
649
649
  name: string;
650
650
  }
651
651
 
652
- export interface TieredConfig {
653
- /**
654
- * Tiers for rating based on total usage quantities into the specified tier
655
- */
656
- tiers: Array<TieredConfig.Tier>;
657
- }
658
-
659
- export namespace TieredConfig {
660
- export interface Tier {
661
- /**
662
- * Inclusive tier starting value
663
- */
664
- first_unit: number;
665
-
666
- /**
667
- * Amount per unit
668
- */
669
- unit_amount: string;
670
-
671
- /**
672
- * Exclusive tier ending value. If null, this is treated as the last tier
673
- */
674
- last_unit?: number | null;
675
- }
676
- }
677
-
678
652
  export interface Maximum {
679
653
  /**
680
654
  * List of price_ids that this maximum amount applies to. For plan/plan phase
@@ -700,6 +674,32 @@ export namespace Price {
700
674
  */
701
675
  minimum_amount: string;
702
676
  }
677
+
678
+ export interface TieredConfig {
679
+ /**
680
+ * Tiers for rating based on total usage quantities into the specified tier
681
+ */
682
+ tiers: Array<TieredConfig.Tier>;
683
+ }
684
+
685
+ export namespace TieredConfig {
686
+ export interface Tier {
687
+ /**
688
+ * Inclusive tier starting value
689
+ */
690
+ first_unit: number;
691
+
692
+ /**
693
+ * Amount per unit
694
+ */
695
+ unit_amount: string;
696
+
697
+ /**
698
+ * Exclusive tier ending value. If null, this is treated as the last tier
699
+ */
700
+ last_unit?: number | null;
701
+ }
702
+ }
703
703
  }
704
704
 
705
705
  export interface TieredBpsPrice {
@@ -713,12 +713,22 @@ export namespace Price {
713
713
 
714
714
  currency: string;
715
715
 
716
+ discount: Shared.Discount | null;
717
+
716
718
  external_price_id: string | null;
717
719
 
718
720
  fixed_price_quantity: number | null;
719
721
 
720
722
  item: TieredBpsPrice.Item;
721
723
 
724
+ maximum: TieredBpsPrice.Maximum | null;
725
+
726
+ maximum_amount: string | null;
727
+
728
+ minimum: TieredBpsPrice.Minimum | null;
729
+
730
+ minimum_amount: string | null;
731
+
722
732
  model_type: 'tiered_bps';
723
733
 
724
734
  name: string;
@@ -728,16 +738,6 @@ export namespace Price {
728
738
  price_type: 'usage_price' | 'fixed_price';
729
739
 
730
740
  tiered_bps_config: TieredBpsPrice.TieredBpsConfig;
731
-
732
- discount?: Shared.Discount | null;
733
-
734
- maximum?: TieredBpsPrice.Maximum | null;
735
-
736
- maximum_amount?: string | null;
737
-
738
- minimum?: TieredBpsPrice.Minimum | null;
739
-
740
- minimum_amount?: string | null;
741
741
  }
742
742
 
743
743
  export namespace TieredBpsPrice {
@@ -751,6 +751,32 @@ export namespace Price {
751
751
  name: string;
752
752
  }
753
753
 
754
+ export interface Maximum {
755
+ /**
756
+ * List of price_ids that this maximum amount applies to. For plan/plan phase
757
+ * maximums, this can be a subset of prices.
758
+ */
759
+ applies_to_price_ids: Array<string>;
760
+
761
+ /**
762
+ * Maximum amount applied
763
+ */
764
+ maximum_amount: string;
765
+ }
766
+
767
+ export interface Minimum {
768
+ /**
769
+ * List of price_ids that this minimum amount applies to. For plan/plan phase
770
+ * minimums, this can be a subset of prices.
771
+ */
772
+ applies_to_price_ids: Array<string>;
773
+
774
+ /**
775
+ * Minimum amount applied
776
+ */
777
+ minimum_amount: string;
778
+ }
779
+
754
780
  export interface TieredBpsConfig {
755
781
  /**
756
782
  * Tiers for a Graduated BPS pricing model, where usage is bucketed into specified
@@ -782,32 +808,6 @@ export namespace Price {
782
808
  per_unit_maximum?: string | null;
783
809
  }
784
810
  }
785
-
786
- export interface Maximum {
787
- /**
788
- * List of price_ids that this maximum amount applies to. For plan/plan phase
789
- * maximums, this can be a subset of prices.
790
- */
791
- applies_to_price_ids: Array<string>;
792
-
793
- /**
794
- * Maximum amount applied
795
- */
796
- maximum_amount: string;
797
- }
798
-
799
- export interface Minimum {
800
- /**
801
- * List of price_ids that this minimum amount applies to. For plan/plan phase
802
- * minimums, this can be a subset of prices.
803
- */
804
- applies_to_price_ids: Array<string>;
805
-
806
- /**
807
- * Minimum amount applied
808
- */
809
- minimum_amount: string;
810
- }
811
811
  }
812
812
 
813
813
  export interface BpsPrice {
@@ -823,29 +823,29 @@ export namespace Price {
823
823
 
824
824
  currency: string;
825
825
 
826
+ discount: Shared.Discount | null;
827
+
826
828
  external_price_id: string | null;
827
829
 
828
830
  fixed_price_quantity: number | null;
829
831
 
830
832
  item: BpsPrice.Item;
831
833
 
832
- model_type: 'bps';
834
+ maximum: BpsPrice.Maximum | null;
833
835
 
834
- name: string;
836
+ maximum_amount: string | null;
835
837
 
836
- plan_phase_order: number | null;
838
+ minimum: BpsPrice.Minimum | null;
837
839
 
838
- price_type: 'usage_price' | 'fixed_price';
839
-
840
- discount?: Shared.Discount | null;
840
+ minimum_amount: string | null;
841
841
 
842
- maximum?: BpsPrice.Maximum | null;
842
+ model_type: 'bps';
843
843
 
844
- maximum_amount?: string | null;
844
+ name: string;
845
845
 
846
- minimum?: BpsPrice.Minimum | null;
846
+ plan_phase_order: number | null;
847
847
 
848
- minimum_amount?: string | null;
848
+ price_type: 'usage_price' | 'fixed_price';
849
849
  }
850
850
 
851
851
  export namespace BpsPrice {
@@ -911,29 +911,29 @@ export namespace Price {
911
911
 
912
912
  currency: string;
913
913
 
914
+ discount: Shared.Discount | null;
915
+
914
916
  external_price_id: string | null;
915
917
 
916
918
  fixed_price_quantity: number | null;
917
919
 
918
920
  item: BulkBpsPrice.Item;
919
921
 
920
- model_type: 'bulk_bps';
922
+ maximum: BulkBpsPrice.Maximum | null;
921
923
 
922
- name: string;
924
+ maximum_amount: string | null;
923
925
 
924
- plan_phase_order: number | null;
925
-
926
- price_type: 'usage_price' | 'fixed_price';
926
+ minimum: BulkBpsPrice.Minimum | null;
927
927
 
928
- discount?: Shared.Discount | null;
928
+ minimum_amount: string | null;
929
929
 
930
- maximum?: BulkBpsPrice.Maximum | null;
930
+ model_type: 'bulk_bps';
931
931
 
932
- maximum_amount?: string | null;
932
+ name: string;
933
933
 
934
- minimum?: BulkBpsPrice.Minimum | null;
934
+ plan_phase_order: number | null;
935
935
 
936
- minimum_amount?: string | null;
936
+ price_type: 'usage_price' | 'fixed_price';
937
937
  }
938
938
 
939
939
  export namespace BulkBpsPrice {
@@ -1014,29 +1014,29 @@ export namespace Price {
1014
1014
 
1015
1015
  currency: string;
1016
1016
 
1017
+ discount: Shared.Discount | null;
1018
+
1017
1019
  external_price_id: string | null;
1018
1020
 
1019
1021
  fixed_price_quantity: number | null;
1020
1022
 
1021
1023
  item: BulkPrice.Item;
1022
1024
 
1023
- model_type: 'bulk';
1024
-
1025
- name: string;
1025
+ maximum: BulkPrice.Maximum | null;
1026
1026
 
1027
- plan_phase_order: number | null;
1027
+ maximum_amount: string | null;
1028
1028
 
1029
- price_type: 'usage_price' | 'fixed_price';
1029
+ minimum: BulkPrice.Minimum | null;
1030
1030
 
1031
- discount?: Shared.Discount | null;
1031
+ minimum_amount: string | null;
1032
1032
 
1033
- maximum?: BulkPrice.Maximum | null;
1033
+ model_type: 'bulk';
1034
1034
 
1035
- maximum_amount?: string | null;
1035
+ name: string;
1036
1036
 
1037
- minimum?: BulkPrice.Minimum | null;
1037
+ plan_phase_order: number | null;
1038
1038
 
1039
- minimum_amount?: string | null;
1039
+ price_type: 'usage_price' | 'fixed_price';
1040
1040
  }
1041
1041
 
1042
1042
  export namespace BulkPrice {
@@ -1109,12 +1109,22 @@ export namespace Price {
1109
1109
 
1110
1110
  currency: string;
1111
1111
 
1112
+ discount: Shared.Discount | null;
1113
+
1112
1114
  external_price_id: string | null;
1113
1115
 
1114
1116
  fixed_price_quantity: number | null;
1115
1117
 
1116
1118
  item: TestRatingFunctionPrice.Item;
1117
1119
 
1120
+ maximum: TestRatingFunctionPrice.Maximum | null;
1121
+
1122
+ maximum_amount: string | null;
1123
+
1124
+ minimum: TestRatingFunctionPrice.Minimum | null;
1125
+
1126
+ minimum_amount: string | null;
1127
+
1118
1128
  model_type: 'test_rating_function';
1119
1129
 
1120
1130
  name: string;
@@ -1124,16 +1134,6 @@ export namespace Price {
1124
1134
  price_type: 'usage_price' | 'fixed_price';
1125
1135
 
1126
1136
  test_rating_function_config: Record<string, unknown>;
1127
-
1128
- discount?: Shared.Discount | null;
1129
-
1130
- maximum?: TestRatingFunctionPrice.Maximum | null;
1131
-
1132
- maximum_amount?: string | null;
1133
-
1134
- minimum?: TestRatingFunctionPrice.Minimum | null;
1135
-
1136
- minimum_amount?: string | null;
1137
1137
  }
1138
1138
 
1139
1139
  export namespace TestRatingFunctionPrice {
@@ -1185,6 +1185,8 @@ export namespace Price {
1185
1185
 
1186
1186
  currency: string;
1187
1187
 
1188
+ discount: Shared.Discount | null;
1189
+
1188
1190
  external_price_id: string | null;
1189
1191
 
1190
1192
  fivetran_example_config: Record<string, unknown>;
@@ -1193,23 +1195,21 @@ export namespace Price {
1193
1195
 
1194
1196
  item: FivetranExamplePrice.Item;
1195
1197
 
1196
- model_type: 'fivetran_example';
1197
-
1198
- name: string;
1198
+ maximum: FivetranExamplePrice.Maximum | null;
1199
1199
 
1200
- plan_phase_order: number | null;
1200
+ maximum_amount: string | null;
1201
1201
 
1202
- price_type: 'usage_price' | 'fixed_price';
1202
+ minimum: FivetranExamplePrice.Minimum | null;
1203
1203
 
1204
- discount?: Shared.Discount | null;
1204
+ minimum_amount: string | null;
1205
1205
 
1206
- maximum?: FivetranExamplePrice.Maximum | null;
1206
+ model_type: 'fivetran_example';
1207
1207
 
1208
- maximum_amount?: string | null;
1208
+ name: string;
1209
1209
 
1210
- minimum?: FivetranExamplePrice.Minimum | null;
1210
+ plan_phase_order: number | null;
1211
1211
 
1212
- minimum_amount?: string | null;
1212
+ price_type: 'usage_price' | 'fixed_price';
1213
1213
  }
1214
1214
 
1215
1215
  export namespace FivetranExamplePrice {
@@ -1261,12 +1261,22 @@ export namespace Price {
1261
1261
 
1262
1262
  currency: string;
1263
1263
 
1264
+ discount: Shared.Discount | null;
1265
+
1264
1266
  external_price_id: string | null;
1265
1267
 
1266
1268
  fixed_price_quantity: number | null;
1267
1269
 
1268
1270
  item: ThresholdTotalAmountPrice.Item;
1269
1271
 
1272
+ maximum: ThresholdTotalAmountPrice.Maximum | null;
1273
+
1274
+ maximum_amount: string | null;
1275
+
1276
+ minimum: ThresholdTotalAmountPrice.Minimum | null;
1277
+
1278
+ minimum_amount: string | null;
1279
+
1270
1280
  model_type: 'threshold_total_amount';
1271
1281
 
1272
1282
  name: string;
@@ -1276,16 +1286,6 @@ export namespace Price {
1276
1286
  price_type: 'usage_price' | 'fixed_price';
1277
1287
 
1278
1288
  threshold_total_amount_config: Record<string, unknown>;
1279
-
1280
- discount?: Shared.Discount | null;
1281
-
1282
- maximum?: ThresholdTotalAmountPrice.Maximum | null;
1283
-
1284
- maximum_amount?: string | null;
1285
-
1286
- minimum?: ThresholdTotalAmountPrice.Minimum | null;
1287
-
1288
- minimum_amount?: string | null;
1289
1289
  }
1290
1290
 
1291
1291
  export namespace ThresholdTotalAmountPrice {
@@ -1337,12 +1337,22 @@ export namespace Price {
1337
1337
 
1338
1338
  currency: string;
1339
1339
 
1340
+ discount: Shared.Discount | null;
1341
+
1340
1342
  external_price_id: string | null;
1341
1343
 
1342
1344
  fixed_price_quantity: number | null;
1343
1345
 
1344
1346
  item: TieredPackagePrice.Item;
1345
1347
 
1348
+ maximum: TieredPackagePrice.Maximum | null;
1349
+
1350
+ maximum_amount: string | null;
1351
+
1352
+ minimum: TieredPackagePrice.Minimum | null;
1353
+
1354
+ minimum_amount: string | null;
1355
+
1346
1356
  model_type: 'tiered_package';
1347
1357
 
1348
1358
  name: string;
@@ -1352,16 +1362,6 @@ export namespace Price {
1352
1362
  price_type: 'usage_price' | 'fixed_price';
1353
1363
 
1354
1364
  tiered_package_config: Record<string, unknown>;
1355
-
1356
- discount?: Shared.Discount | null;
1357
-
1358
- maximum?: TieredPackagePrice.Maximum | null;
1359
-
1360
- maximum_amount?: string | null;
1361
-
1362
- minimum?: TieredPackagePrice.Minimum | null;
1363
-
1364
- minimum_amount?: string | null;
1365
1365
  }
1366
1366
 
1367
1367
  export namespace TieredPackagePrice {
@@ -1413,12 +1413,22 @@ export namespace Price {
1413
1413
 
1414
1414
  currency: string;
1415
1415
 
1416
+ discount: Shared.Discount | null;
1417
+
1416
1418
  external_price_id: string | null;
1417
1419
 
1418
1420
  fixed_price_quantity: number | null;
1419
1421
 
1420
1422
  item: TieredWithMinimumPrice.Item;
1421
1423
 
1424
+ maximum: TieredWithMinimumPrice.Maximum | null;
1425
+
1426
+ maximum_amount: string | null;
1427
+
1428
+ minimum: TieredWithMinimumPrice.Minimum | null;
1429
+
1430
+ minimum_amount: string | null;
1431
+
1422
1432
  model_type: 'tiered_with_minimum';
1423
1433
 
1424
1434
  name: string;
@@ -1428,16 +1438,6 @@ export namespace Price {
1428
1438
  price_type: 'usage_price' | 'fixed_price';
1429
1439
 
1430
1440
  tiered_with_minimum_config: Record<string, unknown>;
1431
-
1432
- discount?: Shared.Discount | null;
1433
-
1434
- maximum?: TieredWithMinimumPrice.Maximum | null;
1435
-
1436
- maximum_amount?: string | null;
1437
-
1438
- minimum?: TieredWithMinimumPrice.Minimum | null;
1439
-
1440
- minimum_amount?: string | null;
1441
1441
  }
1442
1442
 
1443
1443
  export namespace TieredWithMinimumPrice {
@@ -1489,12 +1489,22 @@ export namespace Price {
1489
1489
 
1490
1490
  currency: string;
1491
1491
 
1492
+ discount: Shared.Discount | null;
1493
+
1492
1494
  external_price_id: string | null;
1493
1495
 
1494
1496
  fixed_price_quantity: number | null;
1495
1497
 
1496
1498
  item: PackageWithAllocationPrice.Item;
1497
1499
 
1500
+ maximum: PackageWithAllocationPrice.Maximum | null;
1501
+
1502
+ maximum_amount: string | null;
1503
+
1504
+ minimum: PackageWithAllocationPrice.Minimum | null;
1505
+
1506
+ minimum_amount: string | null;
1507
+
1498
1508
  model_type: 'package_with_allocation';
1499
1509
 
1500
1510
  name: string;
@@ -1504,16 +1514,6 @@ export namespace Price {
1504
1514
  plan_phase_order: number | null;
1505
1515
 
1506
1516
  price_type: 'usage_price' | 'fixed_price';
1507
-
1508
- discount?: Shared.Discount | null;
1509
-
1510
- maximum?: PackageWithAllocationPrice.Maximum | null;
1511
-
1512
- maximum_amount?: string | null;
1513
-
1514
- minimum?: PackageWithAllocationPrice.Minimum | null;
1515
-
1516
- minimum_amount?: string | null;
1517
1517
  }
1518
1518
 
1519
1519
  export namespace PackageWithAllocationPrice {