orb-billing 2.2.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 (123) hide show
  1. package/CHANGELOG.md +75 -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 -217
  9. package/index.d.ts +5 -217
  10. package/index.d.ts.map +1 -1
  11. package/index.js +10 -133
  12. package/index.js.map +1 -1
  13. package/index.mjs +5 -130
  14. package/index.mjs.map +1 -1
  15. package/package.json +4 -4
  16. package/resources/coupons/coupons.d.ts +3 -22
  17. package/resources/coupons/coupons.d.ts.map +1 -1
  18. package/resources/coupons/coupons.js.map +1 -1
  19. package/resources/coupons/coupons.mjs.map +1 -1
  20. package/resources/customers/costs.d.ts +4 -4
  21. package/resources/customers/costs.d.ts.map +1 -1
  22. package/resources/customers/costs.js.map +1 -1
  23. package/resources/customers/costs.mjs.map +1 -1
  24. package/resources/customers/credits/credits.d.ts +12 -4
  25. package/resources/customers/credits/credits.d.ts.map +1 -1
  26. package/resources/customers/credits/credits.js.map +1 -1
  27. package/resources/customers/credits/credits.mjs.map +1 -1
  28. package/resources/customers/credits/ledger.d.ts +16 -6
  29. package/resources/customers/credits/ledger.d.ts.map +1 -1
  30. package/resources/customers/credits/ledger.js.map +1 -1
  31. package/resources/customers/credits/ledger.mjs.map +1 -1
  32. package/resources/customers/credits/top-ups.d.ts +38 -8
  33. package/resources/customers/credits/top-ups.d.ts.map +1 -1
  34. package/resources/customers/credits/top-ups.js.map +1 -1
  35. package/resources/customers/credits/top-ups.mjs.map +1 -1
  36. package/resources/customers/usage.d.ts +2 -2
  37. package/resources/customers/usage.d.ts.map +1 -1
  38. package/resources/customers/usage.js.map +1 -1
  39. package/resources/customers/usage.mjs.map +1 -1
  40. package/resources/events/backfills.d.ts +20 -0
  41. package/resources/events/backfills.d.ts.map +1 -1
  42. package/resources/events/backfills.js.map +1 -1
  43. package/resources/events/backfills.mjs.map +1 -1
  44. package/resources/index.d.ts +2 -3
  45. package/resources/index.d.ts.map +1 -1
  46. package/resources/index.js +4 -6
  47. package/resources/index.js.map +1 -1
  48. package/resources/index.mjs +1 -2
  49. package/resources/index.mjs.map +1 -1
  50. package/resources/invoices.d.ts +1 -1
  51. package/resources/invoices.js +1 -1
  52. package/resources/invoices.mjs +1 -1
  53. package/resources/plans/plans.d.ts +118 -1
  54. package/resources/plans/plans.d.ts.map +1 -1
  55. package/resources/plans/plans.js.map +1 -1
  56. package/resources/plans/plans.mjs.map +1 -1
  57. package/resources/prices/index.d.ts +1 -1
  58. package/resources/prices/index.d.ts.map +1 -1
  59. package/resources/prices/index.js +3 -3
  60. package/resources/prices/index.js.map +1 -1
  61. package/resources/prices/index.mjs +1 -1
  62. package/resources/prices/index.mjs.map +1 -1
  63. package/resources/prices/prices.d.ts +236 -2
  64. package/resources/prices/prices.d.ts.map +1 -1
  65. package/resources/prices/prices.js +26 -0
  66. package/resources/prices/prices.js.map +1 -1
  67. package/resources/prices/prices.mjs +26 -0
  68. package/resources/prices/prices.mjs.map +1 -1
  69. package/resources/shared.d.ts +5 -0
  70. package/resources/shared.d.ts.map +1 -1
  71. package/resources/subscriptions.d.ts +353 -19
  72. package/resources/subscriptions.d.ts.map +1 -1
  73. package/resources/subscriptions.js +11 -0
  74. package/resources/subscriptions.js.map +1 -1
  75. package/resources/subscriptions.mjs +11 -0
  76. package/resources/subscriptions.mjs.map +1 -1
  77. package/resources/webhooks.d.ts.map +1 -1
  78. package/resources/webhooks.js +4 -2
  79. package/resources/webhooks.js.map +1 -1
  80. package/resources/webhooks.mjs +5 -3
  81. package/resources/webhooks.mjs.map +1 -1
  82. package/src/client.ts +301 -0
  83. package/src/index.ts +6 -297
  84. package/src/resources/coupons/coupons.ts +3 -26
  85. package/src/resources/customers/costs.ts +6 -6
  86. package/src/resources/customers/credits/credits.ts +16 -6
  87. package/src/resources/customers/credits/ledger.ts +20 -8
  88. package/src/resources/customers/credits/top-ups.ts +46 -10
  89. package/src/resources/customers/usage.ts +2 -2
  90. package/src/resources/events/backfills.ts +25 -0
  91. package/src/resources/index.ts +11 -2
  92. package/src/resources/invoices.ts +1 -1
  93. package/src/resources/plans/plans.ts +144 -1
  94. package/src/resources/prices/index.ts +10 -1
  95. package/src/resources/prices/prices.ts +333 -2
  96. package/src/resources/shared.ts +8 -0
  97. package/src/resources/subscriptions.ts +441 -23
  98. package/src/resources/webhooks.ts +5 -3
  99. package/src/version.ts +1 -1
  100. package/version.d.ts +1 -1
  101. package/version.js +1 -1
  102. package/version.mjs +1 -1
  103. package/resources/beta/beta.d.ts +0 -12
  104. package/resources/beta/beta.d.ts.map +0 -1
  105. package/resources/beta/beta.js +0 -40
  106. package/resources/beta/beta.js.map +0 -1
  107. package/resources/beta/beta.mjs +0 -13
  108. package/resources/beta/beta.mjs.map +0 -1
  109. package/resources/beta/index.d.ts +0 -3
  110. package/resources/beta/index.d.ts.map +0 -1
  111. package/resources/beta/index.js +0 -9
  112. package/resources/beta/index.js.map +0 -1
  113. package/resources/beta/index.mjs +0 -4
  114. package/resources/beta/index.mjs.map +0 -1
  115. package/resources/beta/price.d.ts +0 -82
  116. package/resources/beta/price.d.ts.map +0 -1
  117. package/resources/beta/price.js +0 -37
  118. package/resources/beta/price.js.map +0 -1
  119. package/resources/beta/price.mjs +0 -33
  120. package/resources/beta/price.mjs.map +0 -1
  121. package/src/resources/beta/beta.ts +0 -15
  122. package/src/resources/beta/index.ts +0 -4
  123. package/src/resources/beta/price.ts +0 -101
@@ -25,6 +25,30 @@ export declare class Prices extends APIResource {
25
25
  */
26
26
  list(query?: PriceListParams, options?: Core.RequestOptions): Core.PagePromise<PricesPage, Price>;
27
27
  list(options?: Core.RequestOptions): Core.PagePromise<PricesPage, Price>;
28
+ /**
29
+ * This endpoint is used to evaluate the output of a price for a given customer and
30
+ * time range. It enables filtering and grouping the output using
31
+ * [computed properties](../guides/extensibility/advanced-metrics#computed-properties),
32
+ * supporting the following workflows:
33
+ *
34
+ * 1. Showing detailed usage and costs to the end customer.
35
+ * 2. Auditing subtotals on invoice line items.
36
+ *
37
+ * For these workflows, the expressiveness of computed properties in both the
38
+ * filters and grouping is critical. For example, if you'd like to show your
39
+ * customer their usage grouped by hour and another property, you can do so with
40
+ * the following `grouping_keys`:
41
+ * `["hour_floor_timestamp_millis(timestamp_millis)", "my_property"]`. If you'd
42
+ * like to examine a customer's usage for a specific property value, you can do so
43
+ * with the following `filter`:
44
+ * `my_property = 'foo' AND my_other_property = 'bar'`.
45
+ *
46
+ * By default, the start of the time range must be no more than 100 days ago and
47
+ * the length of the results must be no greater than 1000. Note that this is a POST
48
+ * endpoint rather than a GET endpoint because it employs a JSON body rather than
49
+ * query parameters.
50
+ */
51
+ evaluate(priceId: string, body: PriceEvaluateParams, options?: Core.RequestOptions): Core.APIPromise<PriceEvaluateResponse>;
28
52
  /**
29
53
  * This endpoint returns a price given an identifier.
30
54
  */
@@ -32,6 +56,20 @@ export declare class Prices extends APIResource {
32
56
  }
33
57
  export declare class PricesPage extends Page<Price> {
34
58
  }
59
+ export interface EvaluatePriceGroup {
60
+ /**
61
+ * The price's output for the group
62
+ */
63
+ amount: string;
64
+ /**
65
+ * The values for the group in the order specified by `grouping_keys`
66
+ */
67
+ grouping_values: Array<string | number | boolean>;
68
+ /**
69
+ * The price's usage quantity for the group
70
+ */
71
+ quantity: number;
72
+ }
35
73
  /**
36
74
  * The Price resource represents a price that can be billed on a subscription,
37
75
  * resulting in a charge on an invoice in the form of an invoice line item. Prices
@@ -271,7 +309,9 @@ export declare namespace Price {
271
309
  id: string;
272
310
  billable_metric: UnitPrice.BillableMetric | null;
273
311
  cadence: 'one_time' | 'monthly' | 'quarterly' | 'annual';
312
+ conversion_rate: number | null;
274
313
  created_at: string;
314
+ credit_allocation: UnitPrice.CreditAllocation | null;
275
315
  currency: string;
276
316
  discount: Shared.Discount | null;
277
317
  external_price_id: string | null;
@@ -291,6 +331,10 @@ export declare namespace Price {
291
331
  interface BillableMetric {
292
332
  id: string;
293
333
  }
334
+ interface CreditAllocation {
335
+ allows_rollover: boolean;
336
+ currency: string;
337
+ }
294
338
  interface Item {
295
339
  id: string;
296
340
  name: string;
@@ -328,7 +372,9 @@ export declare namespace Price {
328
372
  id: string;
329
373
  billable_metric: PackagePrice.BillableMetric | null;
330
374
  cadence: 'one_time' | 'monthly' | 'quarterly' | 'annual';
375
+ conversion_rate: number | null;
331
376
  created_at: string;
377
+ credit_allocation: PackagePrice.CreditAllocation | null;
332
378
  currency: string;
333
379
  discount: Shared.Discount | null;
334
380
  external_price_id: string | null;
@@ -348,6 +394,10 @@ export declare namespace Price {
348
394
  interface BillableMetric {
349
395
  id: string;
350
396
  }
397
+ interface CreditAllocation {
398
+ allows_rollover: boolean;
399
+ currency: string;
400
+ }
351
401
  interface Item {
352
402
  id: string;
353
403
  name: string;
@@ -383,14 +433,16 @@ export declare namespace Price {
383
433
  * An integer amount to represent package size. For example, 1000 here would divide
384
434
  * usage by 1000 before multiplying by package_amount in rating
385
435
  */
386
- package_size?: number | null;
436
+ package_size: number;
387
437
  }
388
438
  }
389
439
  interface MatrixPrice {
390
440
  id: string;
391
441
  billable_metric: MatrixPrice.BillableMetric | null;
392
442
  cadence: 'one_time' | 'monthly' | 'quarterly' | 'annual';
443
+ conversion_rate: number | null;
393
444
  created_at: string;
445
+ credit_allocation: MatrixPrice.CreditAllocation | null;
394
446
  currency: string;
395
447
  discount: Shared.Discount | null;
396
448
  external_price_id: string | null;
@@ -410,6 +462,10 @@ export declare namespace Price {
410
462
  interface BillableMetric {
411
463
  id: string;
412
464
  }
465
+ interface CreditAllocation {
466
+ allows_rollover: boolean;
467
+ currency: string;
468
+ }
413
469
  interface Item {
414
470
  id: string;
415
471
  name: string;
@@ -469,7 +525,9 @@ export declare namespace Price {
469
525
  id: string;
470
526
  billable_metric: TieredPrice.BillableMetric | null;
471
527
  cadence: 'one_time' | 'monthly' | 'quarterly' | 'annual';
528
+ conversion_rate: number | null;
472
529
  created_at: string;
530
+ credit_allocation: TieredPrice.CreditAllocation | null;
473
531
  currency: string;
474
532
  discount: Shared.Discount | null;
475
533
  external_price_id: string | null;
@@ -489,6 +547,10 @@ export declare namespace Price {
489
547
  interface BillableMetric {
490
548
  id: string;
491
549
  }
550
+ interface CreditAllocation {
551
+ allows_rollover: boolean;
552
+ currency: string;
553
+ }
492
554
  interface Item {
493
555
  id: string;
494
556
  name: string;
@@ -542,7 +604,9 @@ export declare namespace Price {
542
604
  id: string;
543
605
  billable_metric: TieredBpsPrice.BillableMetric | null;
544
606
  cadence: 'one_time' | 'monthly' | 'quarterly' | 'annual';
607
+ conversion_rate: number | null;
545
608
  created_at: string;
609
+ credit_allocation: TieredBpsPrice.CreditAllocation | null;
546
610
  currency: string;
547
611
  discount: Shared.Discount | null;
548
612
  external_price_id: string | null;
@@ -562,6 +626,10 @@ export declare namespace Price {
562
626
  interface BillableMetric {
563
627
  id: string;
564
628
  }
629
+ interface CreditAllocation {
630
+ allows_rollover: boolean;
631
+ currency: string;
632
+ }
565
633
  interface Item {
566
634
  id: string;
567
635
  name: string;
@@ -621,7 +689,9 @@ export declare namespace Price {
621
689
  billable_metric: BpsPrice.BillableMetric | null;
622
690
  bps_config: BpsPrice.BpsConfig;
623
691
  cadence: 'one_time' | 'monthly' | 'quarterly' | 'annual';
692
+ conversion_rate: number | null;
624
693
  created_at: string;
694
+ credit_allocation: BpsPrice.CreditAllocation | null;
625
695
  currency: string;
626
696
  discount: Shared.Discount | null;
627
697
  external_price_id: string | null;
@@ -650,6 +720,10 @@ export declare namespace Price {
650
720
  */
651
721
  per_unit_maximum?: string | null;
652
722
  }
723
+ interface CreditAllocation {
724
+ allows_rollover: boolean;
725
+ currency: string;
726
+ }
653
727
  interface Item {
654
728
  id: string;
655
729
  name: string;
@@ -682,7 +756,9 @@ export declare namespace Price {
682
756
  billable_metric: BulkBpsPrice.BillableMetric | null;
683
757
  bulk_bps_config: BulkBpsPrice.BulkBpsConfig;
684
758
  cadence: 'one_time' | 'monthly' | 'quarterly' | 'annual';
759
+ conversion_rate: number | null;
685
760
  created_at: string;
761
+ credit_allocation: BulkBpsPrice.CreditAllocation | null;
686
762
  currency: string;
687
763
  discount: Shared.Discount | null;
688
764
  external_price_id: string | null;
@@ -724,6 +800,10 @@ export declare namespace Price {
724
800
  per_unit_maximum?: string | null;
725
801
  }
726
802
  }
803
+ interface CreditAllocation {
804
+ allows_rollover: boolean;
805
+ currency: string;
806
+ }
727
807
  interface Item {
728
808
  id: string;
729
809
  name: string;
@@ -756,7 +836,9 @@ export declare namespace Price {
756
836
  billable_metric: BulkPrice.BillableMetric | null;
757
837
  bulk_config: BulkPrice.BulkConfig;
758
838
  cadence: 'one_time' | 'monthly' | 'quarterly' | 'annual';
839
+ conversion_rate: number | null;
759
840
  created_at: string;
841
+ credit_allocation: BulkPrice.CreditAllocation | null;
760
842
  currency: string;
761
843
  discount: Shared.Discount | null;
762
844
  external_price_id: string | null;
@@ -793,6 +875,10 @@ export declare namespace Price {
793
875
  maximum_units?: number | null;
794
876
  }
795
877
  }
878
+ interface CreditAllocation {
879
+ allows_rollover: boolean;
880
+ currency: string;
881
+ }
796
882
  interface Item {
797
883
  id: string;
798
884
  name: string;
@@ -824,7 +910,9 @@ export declare namespace Price {
824
910
  id: string;
825
911
  billable_metric: ThresholdTotalAmountPrice.BillableMetric | null;
826
912
  cadence: 'one_time' | 'monthly' | 'quarterly' | 'annual';
913
+ conversion_rate: number | null;
827
914
  created_at: string;
915
+ credit_allocation: ThresholdTotalAmountPrice.CreditAllocation | null;
828
916
  currency: string;
829
917
  discount: Shared.Discount | null;
830
918
  external_price_id: string | null;
@@ -844,6 +932,10 @@ export declare namespace Price {
844
932
  interface BillableMetric {
845
933
  id: string;
846
934
  }
935
+ interface CreditAllocation {
936
+ allows_rollover: boolean;
937
+ currency: string;
938
+ }
847
939
  interface Item {
848
940
  id: string;
849
941
  name: string;
@@ -875,7 +967,9 @@ export declare namespace Price {
875
967
  id: string;
876
968
  billable_metric: TieredPackagePrice.BillableMetric | null;
877
969
  cadence: 'one_time' | 'monthly' | 'quarterly' | 'annual';
970
+ conversion_rate: number | null;
878
971
  created_at: string;
972
+ credit_allocation: TieredPackagePrice.CreditAllocation | null;
879
973
  currency: string;
880
974
  discount: Shared.Discount | null;
881
975
  external_price_id: string | null;
@@ -895,6 +989,10 @@ export declare namespace Price {
895
989
  interface BillableMetric {
896
990
  id: string;
897
991
  }
992
+ interface CreditAllocation {
993
+ allows_rollover: boolean;
994
+ currency: string;
995
+ }
898
996
  interface Item {
899
997
  id: string;
900
998
  name: string;
@@ -926,7 +1024,9 @@ export declare namespace Price {
926
1024
  id: string;
927
1025
  billable_metric: GroupedTieredPrice.BillableMetric | null;
928
1026
  cadence: 'one_time' | 'monthly' | 'quarterly' | 'annual';
1027
+ conversion_rate: number | null;
929
1028
  created_at: string;
1029
+ credit_allocation: GroupedTieredPrice.CreditAllocation | null;
930
1030
  currency: string;
931
1031
  discount: Shared.Discount | null;
932
1032
  external_price_id: string | null;
@@ -946,6 +1046,10 @@ export declare namespace Price {
946
1046
  interface BillableMetric {
947
1047
  id: string;
948
1048
  }
1049
+ interface CreditAllocation {
1050
+ allows_rollover: boolean;
1051
+ currency: string;
1052
+ }
949
1053
  interface Item {
950
1054
  id: string;
951
1055
  name: string;
@@ -977,7 +1081,9 @@ export declare namespace Price {
977
1081
  id: string;
978
1082
  billable_metric: TieredWithMinimumPrice.BillableMetric | null;
979
1083
  cadence: 'one_time' | 'monthly' | 'quarterly' | 'annual';
1084
+ conversion_rate: number | null;
980
1085
  created_at: string;
1086
+ credit_allocation: TieredWithMinimumPrice.CreditAllocation | null;
981
1087
  currency: string;
982
1088
  discount: Shared.Discount | null;
983
1089
  external_price_id: string | null;
@@ -997,6 +1103,10 @@ export declare namespace Price {
997
1103
  interface BillableMetric {
998
1104
  id: string;
999
1105
  }
1106
+ interface CreditAllocation {
1107
+ allows_rollover: boolean;
1108
+ currency: string;
1109
+ }
1000
1110
  interface Item {
1001
1111
  id: string;
1002
1112
  name: string;
@@ -1028,7 +1138,9 @@ export declare namespace Price {
1028
1138
  id: string;
1029
1139
  billable_metric: TieredPackageWithMinimumPrice.BillableMetric | null;
1030
1140
  cadence: 'one_time' | 'monthly' | 'quarterly' | 'annual';
1141
+ conversion_rate: number | null;
1031
1142
  created_at: string;
1143
+ credit_allocation: TieredPackageWithMinimumPrice.CreditAllocation | null;
1032
1144
  currency: string;
1033
1145
  discount: Shared.Discount | null;
1034
1146
  external_price_id: string | null;
@@ -1048,6 +1160,10 @@ export declare namespace Price {
1048
1160
  interface BillableMetric {
1049
1161
  id: string;
1050
1162
  }
1163
+ interface CreditAllocation {
1164
+ allows_rollover: boolean;
1165
+ currency: string;
1166
+ }
1051
1167
  interface Item {
1052
1168
  id: string;
1053
1169
  name: string;
@@ -1079,7 +1195,9 @@ export declare namespace Price {
1079
1195
  id: string;
1080
1196
  billable_metric: PackageWithAllocationPrice.BillableMetric | null;
1081
1197
  cadence: 'one_time' | 'monthly' | 'quarterly' | 'annual';
1198
+ conversion_rate: number | null;
1082
1199
  created_at: string;
1200
+ credit_allocation: PackageWithAllocationPrice.CreditAllocation | null;
1083
1201
  currency: string;
1084
1202
  discount: Shared.Discount | null;
1085
1203
  external_price_id: string | null;
@@ -1099,6 +1217,10 @@ export declare namespace Price {
1099
1217
  interface BillableMetric {
1100
1218
  id: string;
1101
1219
  }
1220
+ interface CreditAllocation {
1221
+ allows_rollover: boolean;
1222
+ currency: string;
1223
+ }
1102
1224
  interface Item {
1103
1225
  id: string;
1104
1226
  name: string;
@@ -1130,7 +1252,9 @@ export declare namespace Price {
1130
1252
  id: string;
1131
1253
  billable_metric: UnitWithPercentPrice.BillableMetric | null;
1132
1254
  cadence: 'one_time' | 'monthly' | 'quarterly' | 'annual';
1255
+ conversion_rate: number | null;
1133
1256
  created_at: string;
1257
+ credit_allocation: UnitWithPercentPrice.CreditAllocation | null;
1134
1258
  currency: string;
1135
1259
  discount: Shared.Discount | null;
1136
1260
  external_price_id: string | null;
@@ -1150,6 +1274,10 @@ export declare namespace Price {
1150
1274
  interface BillableMetric {
1151
1275
  id: string;
1152
1276
  }
1277
+ interface CreditAllocation {
1278
+ allows_rollover: boolean;
1279
+ currency: string;
1280
+ }
1153
1281
  interface Item {
1154
1282
  id: string;
1155
1283
  name: string;
@@ -1181,7 +1309,9 @@ export declare namespace Price {
1181
1309
  id: string;
1182
1310
  billable_metric: MatrixWithAllocationPrice.BillableMetric | null;
1183
1311
  cadence: 'one_time' | 'monthly' | 'quarterly' | 'annual';
1312
+ conversion_rate: number | null;
1184
1313
  created_at: string;
1314
+ credit_allocation: MatrixWithAllocationPrice.CreditAllocation | null;
1185
1315
  currency: string;
1186
1316
  discount: Shared.Discount | null;
1187
1317
  external_price_id: string | null;
@@ -1201,6 +1331,10 @@ export declare namespace Price {
1201
1331
  interface BillableMetric {
1202
1332
  id: string;
1203
1333
  }
1334
+ interface CreditAllocation {
1335
+ allows_rollover: boolean;
1336
+ currency: string;
1337
+ }
1204
1338
  interface Item {
1205
1339
  id: string;
1206
1340
  name: string;
@@ -1261,6 +1395,9 @@ export declare namespace Price {
1261
1395
  }
1262
1396
  }
1263
1397
  }
1398
+ export interface PriceEvaluateResponse {
1399
+ data: Array<EvaluatePriceGroup>;
1400
+ }
1264
1401
  export type PriceCreateParams = PriceCreateParams.NewFloatingUnitPrice | PriceCreateParams.NewFloatingPackagePrice | PriceCreateParams.NewFloatingMatrixPrice | PriceCreateParams.NewFloatingMatrixWithAllocationPrice | PriceCreateParams.NewFloatingTieredPrice | PriceCreateParams.NewFloatingTieredBpsPrice | PriceCreateParams.NewFloatingBpsPrice | PriceCreateParams.NewFloatingBulkBpsPrice | PriceCreateParams.NewFloatingBulkPrice | PriceCreateParams.NewFloatingThresholdTotalAmountPrice | PriceCreateParams.NewFloatingTieredPackagePrice | PriceCreateParams.NewFloatingGroupedTieredPrice | PriceCreateParams.NewFloatingTieredWithMinimumPrice | PriceCreateParams.NewFloatingPackageWithAllocationPrice | PriceCreateParams.NewFloatingTieredPackageWithMinimumPrice | PriceCreateParams.NewFloatingUnitWithPercentPrice;
1265
1402
  export declare namespace PriceCreateParams {
1266
1403
  interface NewFloatingUnitPrice {
@@ -1292,6 +1429,10 @@ export declare namespace PriceCreateParams {
1292
1429
  * this is true, and in-arrears if this is false.
1293
1430
  */
1294
1431
  billed_in_advance?: boolean | null;
1432
+ /**
1433
+ * The per unit conversion rate of the price currency to the invoicing currency.
1434
+ */
1435
+ conversion_rate?: number | null;
1295
1436
  /**
1296
1437
  * An alias for the price.
1297
1438
  */
@@ -1343,6 +1484,10 @@ export declare namespace PriceCreateParams {
1343
1484
  * this is true, and in-arrears if this is false.
1344
1485
  */
1345
1486
  billed_in_advance?: boolean | null;
1487
+ /**
1488
+ * The per unit conversion rate of the price currency to the invoicing currency.
1489
+ */
1490
+ conversion_rate?: number | null;
1346
1491
  /**
1347
1492
  * An alias for the price.
1348
1493
  */
@@ -1367,7 +1512,7 @@ export declare namespace PriceCreateParams {
1367
1512
  * An integer amount to represent package size. For example, 1000 here would divide
1368
1513
  * usage by 1000 before multiplying by package_amount in rating
1369
1514
  */
1370
- package_size?: number | null;
1515
+ package_size: number;
1371
1516
  }
1372
1517
  }
1373
1518
  interface NewFloatingMatrixPrice {
@@ -1399,6 +1544,10 @@ export declare namespace PriceCreateParams {
1399
1544
  * this is true, and in-arrears if this is false.
1400
1545
  */
1401
1546
  billed_in_advance?: boolean | null;
1547
+ /**
1548
+ * The per unit conversion rate of the price currency to the invoicing currency.
1549
+ */
1550
+ conversion_rate?: number | null;
1402
1551
  /**
1403
1552
  * An alias for the price.
1404
1553
  */
@@ -1472,6 +1621,10 @@ export declare namespace PriceCreateParams {
1472
1621
  * this is true, and in-arrears if this is false.
1473
1622
  */
1474
1623
  billed_in_advance?: boolean | null;
1624
+ /**
1625
+ * The per unit conversion rate of the price currency to the invoicing currency.
1626
+ */
1627
+ conversion_rate?: number | null;
1475
1628
  /**
1476
1629
  * An alias for the price.
1477
1630
  */
@@ -1549,6 +1702,10 @@ export declare namespace PriceCreateParams {
1549
1702
  * this is true, and in-arrears if this is false.
1550
1703
  */
1551
1704
  billed_in_advance?: boolean | null;
1705
+ /**
1706
+ * The per unit conversion rate of the price currency to the invoicing currency.
1707
+ */
1708
+ conversion_rate?: number | null;
1552
1709
  /**
1553
1710
  * An alias for the price.
1554
1711
  */
@@ -1616,6 +1773,10 @@ export declare namespace PriceCreateParams {
1616
1773
  * this is true, and in-arrears if this is false.
1617
1774
  */
1618
1775
  billed_in_advance?: boolean | null;
1776
+ /**
1777
+ * The per unit conversion rate of the price currency to the invoicing currency.
1778
+ */
1779
+ conversion_rate?: number | null;
1619
1780
  /**
1620
1781
  * An alias for the price.
1621
1782
  */
@@ -1688,6 +1849,10 @@ export declare namespace PriceCreateParams {
1688
1849
  * this is true, and in-arrears if this is false.
1689
1850
  */
1690
1851
  billed_in_advance?: boolean | null;
1852
+ /**
1853
+ * The per unit conversion rate of the price currency to the invoicing currency.
1854
+ */
1855
+ conversion_rate?: number | null;
1691
1856
  /**
1692
1857
  * An alias for the price.
1693
1858
  */
@@ -1743,6 +1908,10 @@ export declare namespace PriceCreateParams {
1743
1908
  * this is true, and in-arrears if this is false.
1744
1909
  */
1745
1910
  billed_in_advance?: boolean | null;
1911
+ /**
1912
+ * The per unit conversion rate of the price currency to the invoicing currency.
1913
+ */
1914
+ conversion_rate?: number | null;
1746
1915
  /**
1747
1916
  * An alias for the price.
1748
1917
  */
@@ -1811,6 +1980,10 @@ export declare namespace PriceCreateParams {
1811
1980
  * this is true, and in-arrears if this is false.
1812
1981
  */
1813
1982
  billed_in_advance?: boolean | null;
1983
+ /**
1984
+ * The per unit conversion rate of the price currency to the invoicing currency.
1985
+ */
1986
+ conversion_rate?: number | null;
1814
1987
  /**
1815
1988
  * An alias for the price.
1816
1989
  */
@@ -1874,6 +2047,10 @@ export declare namespace PriceCreateParams {
1874
2047
  * this is true, and in-arrears if this is false.
1875
2048
  */
1876
2049
  billed_in_advance?: boolean | null;
2050
+ /**
2051
+ * The per unit conversion rate of the price currency to the invoicing currency.
2052
+ */
2053
+ conversion_rate?: number | null;
1877
2054
  /**
1878
2055
  * An alias for the price.
1879
2056
  */
@@ -1917,6 +2094,10 @@ export declare namespace PriceCreateParams {
1917
2094
  * this is true, and in-arrears if this is false.
1918
2095
  */
1919
2096
  billed_in_advance?: boolean | null;
2097
+ /**
2098
+ * The per unit conversion rate of the price currency to the invoicing currency.
2099
+ */
2100
+ conversion_rate?: number | null;
1920
2101
  /**
1921
2102
  * An alias for the price.
1922
2103
  */
@@ -1960,6 +2141,10 @@ export declare namespace PriceCreateParams {
1960
2141
  * this is true, and in-arrears if this is false.
1961
2142
  */
1962
2143
  billed_in_advance?: boolean | null;
2144
+ /**
2145
+ * The per unit conversion rate of the price currency to the invoicing currency.
2146
+ */
2147
+ conversion_rate?: number | null;
1963
2148
  /**
1964
2149
  * An alias for the price.
1965
2150
  */
@@ -2003,6 +2188,10 @@ export declare namespace PriceCreateParams {
2003
2188
  * this is true, and in-arrears if this is false.
2004
2189
  */
2005
2190
  billed_in_advance?: boolean | null;
2191
+ /**
2192
+ * The per unit conversion rate of the price currency to the invoicing currency.
2193
+ */
2194
+ conversion_rate?: number | null;
2006
2195
  /**
2007
2196
  * An alias for the price.
2008
2197
  */
@@ -2046,6 +2235,10 @@ export declare namespace PriceCreateParams {
2046
2235
  * this is true, and in-arrears if this is false.
2047
2236
  */
2048
2237
  billed_in_advance?: boolean | null;
2238
+ /**
2239
+ * The per unit conversion rate of the price currency to the invoicing currency.
2240
+ */
2241
+ conversion_rate?: number | null;
2049
2242
  /**
2050
2243
  * An alias for the price.
2051
2244
  */
@@ -2089,6 +2282,10 @@ export declare namespace PriceCreateParams {
2089
2282
  * this is true, and in-arrears if this is false.
2090
2283
  */
2091
2284
  billed_in_advance?: boolean | null;
2285
+ /**
2286
+ * The per unit conversion rate of the price currency to the invoicing currency.
2287
+ */
2288
+ conversion_rate?: number | null;
2092
2289
  /**
2093
2290
  * An alias for the price.
2094
2291
  */
@@ -2132,6 +2329,10 @@ export declare namespace PriceCreateParams {
2132
2329
  * this is true, and in-arrears if this is false.
2133
2330
  */
2134
2331
  billed_in_advance?: boolean | null;
2332
+ /**
2333
+ * The per unit conversion rate of the price currency to the invoicing currency.
2334
+ */
2335
+ conversion_rate?: number | null;
2135
2336
  /**
2136
2337
  * An alias for the price.
2137
2338
  */
@@ -2149,11 +2350,44 @@ export declare namespace PriceCreateParams {
2149
2350
  }
2150
2351
  export interface PriceListParams extends PageParams {
2151
2352
  }
2353
+ export interface PriceEvaluateParams {
2354
+ /**
2355
+ * The exclusive upper bound for event timestamps
2356
+ */
2357
+ timeframe_end: string;
2358
+ /**
2359
+ * The inclusive lower bound for event timestamps
2360
+ */
2361
+ timeframe_start: string;
2362
+ /**
2363
+ * The ID of the customer to which this evaluation is scoped.
2364
+ */
2365
+ customer_id?: string | null;
2366
+ /**
2367
+ * The external customer ID of the customer to which this evaluation is scoped.
2368
+ */
2369
+ external_customer_id?: string | null;
2370
+ /**
2371
+ * A boolean
2372
+ * [computed property](../guides/extensibility/advanced-metrics#computed-properties)
2373
+ * used to filter the underlying billable metric
2374
+ */
2375
+ filter?: string | null;
2376
+ /**
2377
+ * Properties (or
2378
+ * [computed properties](../guides/extensibility/advanced-metrics#computed-properties))
2379
+ * used to group the underlying billable metric
2380
+ */
2381
+ grouping_keys?: Array<string>;
2382
+ }
2152
2383
  export declare namespace Prices {
2384
+ export import EvaluatePriceGroup = PricesAPI.EvaluatePriceGroup;
2153
2385
  export import Price = PricesAPI.Price;
2386
+ export import PriceEvaluateResponse = PricesAPI.PriceEvaluateResponse;
2154
2387
  export import PricesPage = PricesAPI.PricesPage;
2155
2388
  export import PriceCreateParams = PricesAPI.PriceCreateParams;
2156
2389
  export import PriceListParams = PricesAPI.PriceListParams;
2390
+ export import PriceEvaluateParams = PricesAPI.PriceEvaluateParams;
2157
2391
  export import ExternalPriceID = ExternalPriceIDAPI.ExternalPriceID;
2158
2392
  }
2159
2393
  //# sourceMappingURL=prices.d.ts.map