orb-billing 2.3.0 → 2.4.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 (73) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/client.d.ts +222 -0
  3. package/client.d.ts.map +1 -0
  4. package/client.js +156 -0
  5. package/client.js.map +1 -0
  6. package/client.mjs +129 -0
  7. package/client.mjs.map +1 -0
  8. package/index.d.mts +5 -221
  9. package/index.d.ts +5 -221
  10. package/index.d.ts.map +1 -1
  11. package/index.js +10 -130
  12. package/index.js.map +1 -1
  13. package/index.mjs +5 -127
  14. package/index.mjs.map +1 -1
  15. package/package.json +4 -4
  16. package/resources/customers/credits/credits.d.ts +6 -0
  17. package/resources/customers/credits/credits.d.ts.map +1 -1
  18. package/resources/customers/credits/credits.js.map +1 -1
  19. package/resources/customers/credits/credits.mjs.map +1 -1
  20. package/resources/events/backfills.d.ts +20 -0
  21. package/resources/events/backfills.d.ts.map +1 -1
  22. package/resources/events/backfills.js.map +1 -1
  23. package/resources/events/backfills.mjs.map +1 -1
  24. package/resources/invoices.d.ts +1 -1
  25. package/resources/invoices.js +1 -1
  26. package/resources/invoices.mjs +1 -1
  27. package/resources/plans/plans.d.ts +53 -1
  28. package/resources/plans/plans.d.ts.map +1 -1
  29. package/resources/plans/plans.js.map +1 -1
  30. package/resources/plans/plans.mjs.map +1 -1
  31. package/resources/prices/prices.d.ts +82 -2
  32. package/resources/prices/prices.d.ts.map +1 -1
  33. package/resources/prices/prices.js.map +1 -1
  34. package/resources/prices/prices.mjs.map +1 -1
  35. package/resources/subscriptions.d.ts +306 -3
  36. package/resources/subscriptions.d.ts.map +1 -1
  37. package/resources/subscriptions.js +5 -0
  38. package/resources/subscriptions.js.map +1 -1
  39. package/resources/subscriptions.mjs +5 -0
  40. package/resources/subscriptions.mjs.map +1 -1
  41. package/src/client.ts +301 -0
  42. package/src/index.ts +6 -299
  43. package/src/resources/customers/credits/credits.ts +6 -0
  44. package/src/resources/events/backfills.ts +25 -0
  45. package/src/resources/invoices.ts +1 -1
  46. package/src/resources/plans/plans.ts +66 -1
  47. package/src/resources/prices/prices.ts +114 -2
  48. package/src/resources/subscriptions.ts +374 -3
  49. package/src/version.ts +1 -1
  50. package/version.d.ts +1 -1
  51. package/version.js +1 -1
  52. package/version.mjs +1 -1
  53. package/resources/beta/beta.d.ts +0 -12
  54. package/resources/beta/beta.d.ts.map +0 -1
  55. package/resources/beta/beta.js +0 -40
  56. package/resources/beta/beta.js.map +0 -1
  57. package/resources/beta/beta.mjs +0 -13
  58. package/resources/beta/beta.mjs.map +0 -1
  59. package/resources/beta/index.d.ts +0 -3
  60. package/resources/beta/index.d.ts.map +0 -1
  61. package/resources/beta/index.js +0 -9
  62. package/resources/beta/index.js.map +0 -1
  63. package/resources/beta/index.mjs +0 -4
  64. package/resources/beta/index.mjs.map +0 -1
  65. package/resources/beta/price.d.ts +0 -82
  66. package/resources/beta/price.d.ts.map +0 -1
  67. package/resources/beta/price.js +0 -37
  68. package/resources/beta/price.js.map +0 -1
  69. package/resources/beta/price.mjs +0 -33
  70. package/resources/beta/price.mjs.map +0 -1
  71. package/src/resources/beta/beta.ts +0 -15
  72. package/src/resources/beta/index.ts +0 -4
  73. package/src/resources/beta/price.ts +0 -101
@@ -360,6 +360,8 @@ export namespace Price {
360
360
 
361
361
  cadence: 'one_time' | 'monthly' | 'quarterly' | 'annual';
362
362
 
363
+ conversion_rate: number | null;
364
+
363
365
  created_at: string;
364
366
 
365
367
  credit_allocation: UnitPrice.CreditAllocation | null;
@@ -451,6 +453,8 @@ export namespace Price {
451
453
 
452
454
  cadence: 'one_time' | 'monthly' | 'quarterly' | 'annual';
453
455
 
456
+ conversion_rate: number | null;
457
+
454
458
  created_at: string;
455
459
 
456
460
  credit_allocation: PackagePrice.CreditAllocation | null;
@@ -537,7 +541,7 @@ export namespace Price {
537
541
  * An integer amount to represent package size. For example, 1000 here would divide
538
542
  * usage by 1000 before multiplying by package_amount in rating
539
543
  */
540
- package_size?: number | null;
544
+ package_size: number;
541
545
  }
542
546
  }
543
547
 
@@ -548,6 +552,8 @@ export namespace Price {
548
552
 
549
553
  cadence: 'one_time' | 'monthly' | 'quarterly' | 'annual';
550
554
 
555
+ conversion_rate: number | null;
556
+
551
557
  created_at: string;
552
558
 
553
559
  credit_allocation: MatrixPrice.CreditAllocation | null;
@@ -665,6 +671,8 @@ export namespace Price {
665
671
 
666
672
  cadence: 'one_time' | 'monthly' | 'quarterly' | 'annual';
667
673
 
674
+ conversion_rate: number | null;
675
+
668
676
  created_at: string;
669
677
 
670
678
  credit_allocation: TieredPrice.CreditAllocation | null;
@@ -775,6 +783,8 @@ export namespace Price {
775
783
 
776
784
  cadence: 'one_time' | 'monthly' | 'quarterly' | 'annual';
777
785
 
786
+ conversion_rate: number | null;
787
+
778
788
  created_at: string;
779
789
 
780
790
  credit_allocation: TieredBpsPrice.CreditAllocation | null;
@@ -893,6 +903,8 @@ export namespace Price {
893
903
 
894
904
  cadence: 'one_time' | 'monthly' | 'quarterly' | 'annual';
895
905
 
906
+ conversion_rate: number | null;
907
+
896
908
  created_at: string;
897
909
 
898
910
  credit_allocation: BpsPrice.CreditAllocation | null;
@@ -989,6 +1001,8 @@ export namespace Price {
989
1001
 
990
1002
  cadence: 'one_time' | 'monthly' | 'quarterly' | 'annual';
991
1003
 
1004
+ conversion_rate: number | null;
1005
+
992
1006
  created_at: string;
993
1007
 
994
1008
  credit_allocation: BulkBpsPrice.CreditAllocation | null;
@@ -1100,6 +1114,8 @@ export namespace Price {
1100
1114
 
1101
1115
  cadence: 'one_time' | 'monthly' | 'quarterly' | 'annual';
1102
1116
 
1117
+ conversion_rate: number | null;
1118
+
1103
1119
  created_at: string;
1104
1120
 
1105
1121
  credit_allocation: BulkPrice.CreditAllocation | null;
@@ -1203,6 +1219,8 @@ export namespace Price {
1203
1219
 
1204
1220
  cadence: 'one_time' | 'monthly' | 'quarterly' | 'annual';
1205
1221
 
1222
+ conversion_rate: number | null;
1223
+
1206
1224
  created_at: string;
1207
1225
 
1208
1226
  credit_allocation: ThresholdTotalAmountPrice.CreditAllocation | null;
@@ -1287,6 +1305,8 @@ export namespace Price {
1287
1305
 
1288
1306
  cadence: 'one_time' | 'monthly' | 'quarterly' | 'annual';
1289
1307
 
1308
+ conversion_rate: number | null;
1309
+
1290
1310
  created_at: string;
1291
1311
 
1292
1312
  credit_allocation: TieredPackagePrice.CreditAllocation | null;
@@ -1371,6 +1391,8 @@ export namespace Price {
1371
1391
 
1372
1392
  cadence: 'one_time' | 'monthly' | 'quarterly' | 'annual';
1373
1393
 
1394
+ conversion_rate: number | null;
1395
+
1374
1396
  created_at: string;
1375
1397
 
1376
1398
  credit_allocation: GroupedTieredPrice.CreditAllocation | null;
@@ -1455,6 +1477,8 @@ export namespace Price {
1455
1477
 
1456
1478
  cadence: 'one_time' | 'monthly' | 'quarterly' | 'annual';
1457
1479
 
1480
+ conversion_rate: number | null;
1481
+
1458
1482
  created_at: string;
1459
1483
 
1460
1484
  credit_allocation: TieredWithMinimumPrice.CreditAllocation | null;
@@ -1539,6 +1563,8 @@ export namespace Price {
1539
1563
 
1540
1564
  cadence: 'one_time' | 'monthly' | 'quarterly' | 'annual';
1541
1565
 
1566
+ conversion_rate: number | null;
1567
+
1542
1568
  created_at: string;
1543
1569
 
1544
1570
  credit_allocation: TieredPackageWithMinimumPrice.CreditAllocation | null;
@@ -1623,6 +1649,8 @@ export namespace Price {
1623
1649
 
1624
1650
  cadence: 'one_time' | 'monthly' | 'quarterly' | 'annual';
1625
1651
 
1652
+ conversion_rate: number | null;
1653
+
1626
1654
  created_at: string;
1627
1655
 
1628
1656
  credit_allocation: PackageWithAllocationPrice.CreditAllocation | null;
@@ -1707,6 +1735,8 @@ export namespace Price {
1707
1735
 
1708
1736
  cadence: 'one_time' | 'monthly' | 'quarterly' | 'annual';
1709
1737
 
1738
+ conversion_rate: number | null;
1739
+
1710
1740
  created_at: string;
1711
1741
 
1712
1742
  credit_allocation: UnitWithPercentPrice.CreditAllocation | null;
@@ -1791,6 +1821,8 @@ export namespace Price {
1791
1821
 
1792
1822
  cadence: 'one_time' | 'monthly' | 'quarterly' | 'annual';
1793
1823
 
1824
+ conversion_rate: number | null;
1825
+
1794
1826
  created_at: string;
1795
1827
 
1796
1828
  credit_allocation: MatrixWithAllocationPrice.CreditAllocation | null;
@@ -1967,6 +1999,11 @@ export namespace PriceCreateParams {
1967
1999
  */
1968
2000
  billed_in_advance?: boolean | null;
1969
2001
 
2002
+ /**
2003
+ * The per unit conversion rate of the price currency to the invoicing currency.
2004
+ */
2005
+ conversion_rate?: number | null;
2006
+
1970
2007
  /**
1971
2008
  * An alias for the price.
1972
2009
  */
@@ -2030,6 +2067,11 @@ export namespace PriceCreateParams {
2030
2067
  */
2031
2068
  billed_in_advance?: boolean | null;
2032
2069
 
2070
+ /**
2071
+ * The per unit conversion rate of the price currency to the invoicing currency.
2072
+ */
2073
+ conversion_rate?: number | null;
2074
+
2033
2075
  /**
2034
2076
  * An alias for the price.
2035
2077
  */
@@ -2058,7 +2100,7 @@ export namespace PriceCreateParams {
2058
2100
  * An integer amount to represent package size. For example, 1000 here would divide
2059
2101
  * usage by 1000 before multiplying by package_amount in rating
2060
2102
  */
2061
- package_size?: number | null;
2103
+ package_size: number;
2062
2104
  }
2063
2105
  }
2064
2106
 
@@ -2099,6 +2141,11 @@ export namespace PriceCreateParams {
2099
2141
  */
2100
2142
  billed_in_advance?: boolean | null;
2101
2143
 
2144
+ /**
2145
+ * The per unit conversion rate of the price currency to the invoicing currency.
2146
+ */
2147
+ conversion_rate?: number | null;
2148
+
2102
2149
  /**
2103
2150
  * An alias for the price.
2104
2151
  */
@@ -2188,6 +2235,11 @@ export namespace PriceCreateParams {
2188
2235
  */
2189
2236
  billed_in_advance?: boolean | null;
2190
2237
 
2238
+ /**
2239
+ * The per unit conversion rate of the price currency to the invoicing currency.
2240
+ */
2241
+ conversion_rate?: number | null;
2242
+
2191
2243
  /**
2192
2244
  * An alias for the price.
2193
2245
  */
@@ -2282,6 +2334,11 @@ export namespace PriceCreateParams {
2282
2334
  */
2283
2335
  billed_in_advance?: boolean | null;
2284
2336
 
2337
+ /**
2338
+ * The per unit conversion rate of the price currency to the invoicing currency.
2339
+ */
2340
+ conversion_rate?: number | null;
2341
+
2285
2342
  /**
2286
2343
  * An alias for the price.
2287
2344
  */
@@ -2364,6 +2421,11 @@ export namespace PriceCreateParams {
2364
2421
  */
2365
2422
  billed_in_advance?: boolean | null;
2366
2423
 
2424
+ /**
2425
+ * The per unit conversion rate of the price currency to the invoicing currency.
2426
+ */
2427
+ conversion_rate?: number | null;
2428
+
2367
2429
  /**
2368
2430
  * An alias for the price.
2369
2431
  */
@@ -2452,6 +2514,11 @@ export namespace PriceCreateParams {
2452
2514
  */
2453
2515
  billed_in_advance?: boolean | null;
2454
2516
 
2517
+ /**
2518
+ * The per unit conversion rate of the price currency to the invoicing currency.
2519
+ */
2520
+ conversion_rate?: number | null;
2521
+
2455
2522
  /**
2456
2523
  * An alias for the price.
2457
2524
  */
@@ -2520,6 +2587,11 @@ export namespace PriceCreateParams {
2520
2587
  */
2521
2588
  billed_in_advance?: boolean | null;
2522
2589
 
2590
+ /**
2591
+ * The per unit conversion rate of the price currency to the invoicing currency.
2592
+ */
2593
+ conversion_rate?: number | null;
2594
+
2523
2595
  /**
2524
2596
  * An alias for the price.
2525
2597
  */
@@ -2603,6 +2675,11 @@ export namespace PriceCreateParams {
2603
2675
  */
2604
2676
  billed_in_advance?: boolean | null;
2605
2677
 
2678
+ /**
2679
+ * The per unit conversion rate of the price currency to the invoicing currency.
2680
+ */
2681
+ conversion_rate?: number | null;
2682
+
2606
2683
  /**
2607
2684
  * An alias for the price.
2608
2685
  */
@@ -2680,6 +2757,11 @@ export namespace PriceCreateParams {
2680
2757
  */
2681
2758
  billed_in_advance?: boolean | null;
2682
2759
 
2760
+ /**
2761
+ * The per unit conversion rate of the price currency to the invoicing currency.
2762
+ */
2763
+ conversion_rate?: number | null;
2764
+
2683
2765
  /**
2684
2766
  * An alias for the price.
2685
2767
  */
@@ -2734,6 +2816,11 @@ export namespace PriceCreateParams {
2734
2816
  */
2735
2817
  billed_in_advance?: boolean | null;
2736
2818
 
2819
+ /**
2820
+ * The per unit conversion rate of the price currency to the invoicing currency.
2821
+ */
2822
+ conversion_rate?: number | null;
2823
+
2737
2824
  /**
2738
2825
  * An alias for the price.
2739
2826
  */
@@ -2788,6 +2875,11 @@ export namespace PriceCreateParams {
2788
2875
  */
2789
2876
  billed_in_advance?: boolean | null;
2790
2877
 
2878
+ /**
2879
+ * The per unit conversion rate of the price currency to the invoicing currency.
2880
+ */
2881
+ conversion_rate?: number | null;
2882
+
2791
2883
  /**
2792
2884
  * An alias for the price.
2793
2885
  */
@@ -2842,6 +2934,11 @@ export namespace PriceCreateParams {
2842
2934
  */
2843
2935
  billed_in_advance?: boolean | null;
2844
2936
 
2937
+ /**
2938
+ * The per unit conversion rate of the price currency to the invoicing currency.
2939
+ */
2940
+ conversion_rate?: number | null;
2941
+
2845
2942
  /**
2846
2943
  * An alias for the price.
2847
2944
  */
@@ -2896,6 +2993,11 @@ export namespace PriceCreateParams {
2896
2993
  */
2897
2994
  billed_in_advance?: boolean | null;
2898
2995
 
2996
+ /**
2997
+ * The per unit conversion rate of the price currency to the invoicing currency.
2998
+ */
2999
+ conversion_rate?: number | null;
3000
+
2899
3001
  /**
2900
3002
  * An alias for the price.
2901
3003
  */
@@ -2950,6 +3052,11 @@ export namespace PriceCreateParams {
2950
3052
  */
2951
3053
  billed_in_advance?: boolean | null;
2952
3054
 
3055
+ /**
3056
+ * The per unit conversion rate of the price currency to the invoicing currency.
3057
+ */
3058
+ conversion_rate?: number | null;
3059
+
2953
3060
  /**
2954
3061
  * An alias for the price.
2955
3062
  */
@@ -3004,6 +3111,11 @@ export namespace PriceCreateParams {
3004
3111
  */
3005
3112
  billed_in_advance?: boolean | null;
3006
3113
 
3114
+ /**
3115
+ * The per unit conversion rate of the price currency to the invoicing currency.
3116
+ */
3117
+ conversion_rate?: number | null;
3118
+
3007
3119
  /**
3008
3120
  * An alias for the price.
3009
3121
  */