orb-billing 5.48.0 → 5.76.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 (205) hide show
  1. package/CHANGELOG.md +249 -0
  2. package/core.js +2 -2
  3. package/core.js.map +1 -1
  4. package/core.mjs +2 -2
  5. package/core.mjs.map +1 -1
  6. package/index.d.ts.map +1 -1
  7. package/index.js +11 -0
  8. package/index.js.map +1 -1
  9. package/index.mjs +11 -0
  10. package/index.mjs.map +1 -1
  11. package/package.json +1 -1
  12. package/resources/alerts.d.ts +140 -3
  13. package/resources/alerts.d.ts.map +1 -1
  14. package/resources/alerts.js.map +1 -1
  15. package/resources/alerts.mjs.map +1 -1
  16. package/resources/beta/beta.d.ts +738 -7570
  17. package/resources/beta/beta.d.ts.map +1 -1
  18. package/resources/beta/beta.js.map +1 -1
  19. package/resources/beta/beta.mjs.map +1 -1
  20. package/resources/beta/external-plan-id.d.ts +664 -7572
  21. package/resources/beta/external-plan-id.d.ts.map +1 -1
  22. package/resources/coupons/coupons.d.ts +29 -0
  23. package/resources/coupons/coupons.d.ts.map +1 -1
  24. package/resources/coupons/coupons.js +21 -0
  25. package/resources/coupons/coupons.js.map +1 -1
  26. package/resources/coupons/coupons.mjs +21 -0
  27. package/resources/coupons/coupons.mjs.map +1 -1
  28. package/resources/coupons/subscriptions.d.ts +10 -0
  29. package/resources/coupons/subscriptions.d.ts.map +1 -1
  30. package/resources/coupons/subscriptions.js.map +1 -1
  31. package/resources/coupons/subscriptions.mjs.map +1 -1
  32. package/resources/credit-blocks.d.ts +138 -7
  33. package/resources/credit-blocks.d.ts.map +1 -1
  34. package/resources/credit-blocks.js +10 -7
  35. package/resources/credit-blocks.js.map +1 -1
  36. package/resources/credit-blocks.mjs +10 -7
  37. package/resources/credit-blocks.mjs.map +1 -1
  38. package/resources/credit-notes.d.ts +28 -0
  39. package/resources/credit-notes.d.ts.map +1 -1
  40. package/resources/credit-notes.js +20 -0
  41. package/resources/credit-notes.js.map +1 -1
  42. package/resources/credit-notes.mjs +20 -0
  43. package/resources/credit-notes.mjs.map +1 -1
  44. package/resources/customers/credits/credits.d.ts +129 -0
  45. package/resources/customers/credits/credits.d.ts.map +1 -1
  46. package/resources/customers/credits/credits.js.map +1 -1
  47. package/resources/customers/credits/credits.mjs.map +1 -1
  48. package/resources/customers/credits/ledger.d.ts +34 -20
  49. package/resources/customers/credits/ledger.d.ts.map +1 -1
  50. package/resources/customers/credits/ledger.js +28 -14
  51. package/resources/customers/credits/ledger.js.map +1 -1
  52. package/resources/customers/credits/ledger.mjs +28 -14
  53. package/resources/customers/credits/ledger.mjs.map +1 -1
  54. package/resources/customers/customers.d.ts +89 -6
  55. package/resources/customers/customers.d.ts.map +1 -1
  56. package/resources/customers/customers.js.map +1 -1
  57. package/resources/customers/customers.mjs.map +1 -1
  58. package/resources/dimensional-price-groups/dimensional-price-groups.d.ts +35 -1
  59. package/resources/dimensional-price-groups/dimensional-price-groups.d.ts.map +1 -1
  60. package/resources/dimensional-price-groups/dimensional-price-groups.js +26 -0
  61. package/resources/dimensional-price-groups/dimensional-price-groups.js.map +1 -1
  62. package/resources/dimensional-price-groups/dimensional-price-groups.mjs +26 -0
  63. package/resources/dimensional-price-groups/dimensional-price-groups.mjs.map +1 -1
  64. package/resources/dimensional-price-groups/external-dimensional-price-group-id.d.ts +16 -0
  65. package/resources/dimensional-price-groups/external-dimensional-price-group-id.d.ts.map +1 -1
  66. package/resources/dimensional-price-groups/external-dimensional-price-group-id.js +16 -0
  67. package/resources/dimensional-price-groups/external-dimensional-price-group-id.js.map +1 -1
  68. package/resources/dimensional-price-groups/external-dimensional-price-group-id.mjs +16 -0
  69. package/resources/dimensional-price-groups/external-dimensional-price-group-id.mjs.map +1 -1
  70. package/resources/events/backfills.d.ts +37 -0
  71. package/resources/events/backfills.d.ts.map +1 -1
  72. package/resources/events/backfills.js +29 -0
  73. package/resources/events/backfills.js.map +1 -1
  74. package/resources/events/backfills.mjs +29 -0
  75. package/resources/events/backfills.mjs.map +1 -1
  76. package/resources/events/events.d.ts +41 -33
  77. package/resources/events/events.d.ts.map +1 -1
  78. package/resources/events/events.js +39 -31
  79. package/resources/events/events.js.map +1 -1
  80. package/resources/events/events.mjs +39 -31
  81. package/resources/events/events.mjs.map +1 -1
  82. package/resources/events/volume.d.ts +7 -0
  83. package/resources/events/volume.d.ts.map +1 -1
  84. package/resources/events/volume.js +7 -0
  85. package/resources/events/volume.js.map +1 -1
  86. package/resources/events/volume.mjs +7 -0
  87. package/resources/events/volume.mjs.map +1 -1
  88. package/resources/invoice-line-items.d.ts +89 -1
  89. package/resources/invoice-line-items.d.ts.map +1 -1
  90. package/resources/invoice-line-items.js +12 -0
  91. package/resources/invoice-line-items.js.map +1 -1
  92. package/resources/invoice-line-items.mjs +12 -0
  93. package/resources/invoice-line-items.mjs.map +1 -1
  94. package/resources/invoices.d.ts +200 -12
  95. package/resources/invoices.d.ts.map +1 -1
  96. package/resources/invoices.js +64 -0
  97. package/resources/invoices.js.map +1 -1
  98. package/resources/invoices.mjs +64 -0
  99. package/resources/invoices.mjs.map +1 -1
  100. package/resources/items.d.ts +30 -0
  101. package/resources/items.d.ts.map +1 -1
  102. package/resources/items.js +22 -0
  103. package/resources/items.js.map +1 -1
  104. package/resources/items.mjs +22 -0
  105. package/resources/items.mjs.map +1 -1
  106. package/resources/licenses/external-licenses.d.ts +13 -1
  107. package/resources/licenses/external-licenses.d.ts.map +1 -1
  108. package/resources/licenses/external-licenses.js +12 -0
  109. package/resources/licenses/external-licenses.js.map +1 -1
  110. package/resources/licenses/external-licenses.mjs +12 -0
  111. package/resources/licenses/external-licenses.mjs.map +1 -1
  112. package/resources/licenses/licenses.d.ts +44 -0
  113. package/resources/licenses/licenses.d.ts.map +1 -1
  114. package/resources/licenses/licenses.js +44 -0
  115. package/resources/licenses/licenses.js.map +1 -1
  116. package/resources/licenses/licenses.mjs +44 -0
  117. package/resources/licenses/licenses.mjs.map +1 -1
  118. package/resources/licenses/usage.d.ts +17 -2
  119. package/resources/licenses/usage.d.ts.map +1 -1
  120. package/resources/licenses/usage.js +8 -0
  121. package/resources/licenses/usage.js.map +1 -1
  122. package/resources/licenses/usage.mjs +8 -0
  123. package/resources/licenses/usage.mjs.map +1 -1
  124. package/resources/metrics.d.ts +42 -5
  125. package/resources/metrics.d.ts.map +1 -1
  126. package/resources/metrics.js +27 -2
  127. package/resources/metrics.js.map +1 -1
  128. package/resources/metrics.mjs +27 -2
  129. package/resources/metrics.mjs.map +1 -1
  130. package/resources/plans/external-plan-id.d.ts +6 -2
  131. package/resources/plans/external-plan-id.d.ts.map +1 -1
  132. package/resources/plans/external-plan-id.js +2 -2
  133. package/resources/plans/external-plan-id.mjs +2 -2
  134. package/resources/plans/migrations.d.ts +42 -0
  135. package/resources/plans/migrations.d.ts.map +1 -1
  136. package/resources/plans/migrations.js.map +1 -1
  137. package/resources/plans/migrations.mjs.map +1 -1
  138. package/resources/plans/plans.d.ts +382 -3754
  139. package/resources/plans/plans.d.ts.map +1 -1
  140. package/resources/plans/plans.js +2 -2
  141. package/resources/plans/plans.js.map +1 -1
  142. package/resources/plans/plans.mjs +2 -2
  143. package/resources/plans/plans.mjs.map +1 -1
  144. package/resources/prices/external-price-id.d.ts +14 -0
  145. package/resources/prices/external-price-id.d.ts.map +1 -1
  146. package/resources/prices/external-price-id.js +14 -0
  147. package/resources/prices/external-price-id.js.map +1 -1
  148. package/resources/prices/external-price-id.mjs +14 -0
  149. package/resources/prices/external-price-id.mjs.map +1 -1
  150. package/resources/prices/prices.d.ts +1632 -393
  151. package/resources/prices/prices.d.ts.map +1 -1
  152. package/resources/prices/prices.js +46 -0
  153. package/resources/prices/prices.js.map +1 -1
  154. package/resources/prices/prices.mjs +46 -0
  155. package/resources/prices/prices.mjs.map +1 -1
  156. package/resources/shared.d.ts +922 -52
  157. package/resources/shared.d.ts.map +1 -1
  158. package/resources/shared.js.map +1 -1
  159. package/resources/shared.mjs.map +1 -1
  160. package/resources/subscription-changes.d.ts +72 -1
  161. package/resources/subscription-changes.d.ts.map +1 -1
  162. package/resources/subscription-changes.js.map +1 -1
  163. package/resources/subscription-changes.mjs.map +1 -1
  164. package/resources/subscriptions.d.ts +3075 -464
  165. package/resources/subscriptions.d.ts.map +1 -1
  166. package/resources/subscriptions.js +111 -0
  167. package/resources/subscriptions.js.map +1 -1
  168. package/resources/subscriptions.mjs +111 -0
  169. package/resources/subscriptions.mjs.map +1 -1
  170. package/src/core.ts +2 -2
  171. package/src/index.ts +12 -0
  172. package/src/resources/alerts.ts +161 -3
  173. package/src/resources/beta/beta.ts +828 -8988
  174. package/src/resources/beta/external-plan-id.ts +745 -8997
  175. package/src/resources/coupons/coupons.ts +29 -0
  176. package/src/resources/coupons/subscriptions.ts +10 -0
  177. package/src/resources/credit-blocks.ts +166 -7
  178. package/src/resources/credit-notes.ts +28 -0
  179. package/src/resources/customers/credits/credits.ts +157 -0
  180. package/src/resources/customers/credits/ledger.ts +34 -20
  181. package/src/resources/customers/customers.ts +99 -6
  182. package/src/resources/dimensional-price-groups/dimensional-price-groups.ts +35 -1
  183. package/src/resources/dimensional-price-groups/external-dimensional-price-group-id.ts +16 -0
  184. package/src/resources/events/backfills.ts +37 -0
  185. package/src/resources/events/events.ts +41 -33
  186. package/src/resources/events/volume.ts +7 -0
  187. package/src/resources/invoice-line-items.ts +104 -0
  188. package/src/resources/invoices.ts +215 -11
  189. package/src/resources/items.ts +30 -0
  190. package/src/resources/licenses/external-licenses.ts +13 -1
  191. package/src/resources/licenses/licenses.ts +44 -0
  192. package/src/resources/licenses/usage.ts +17 -2
  193. package/src/resources/metrics.ts +43 -5
  194. package/src/resources/plans/external-plan-id.ts +7 -2
  195. package/src/resources/plans/migrations.ts +42 -0
  196. package/src/resources/plans/plans.ts +456 -4482
  197. package/src/resources/prices/external-price-id.ts +14 -0
  198. package/src/resources/prices/prices.ts +1743 -264
  199. package/src/resources/shared.ts +1172 -50
  200. package/src/resources/subscription-changes.ts +88 -1
  201. package/src/resources/subscriptions.ts +4707 -1585
  202. package/src/version.ts +1 -1
  203. package/version.d.ts +1 -1
  204. package/version.js +1 -1
  205. package/version.mjs +1 -1
@@ -28,17 +28,42 @@ export declare class Prices extends APIResource {
28
28
  *
29
29
  * See the [Price resource](/product-catalog/price-configuration) for the
30
30
  * specification of different price model configurations possible in this endpoint.
31
+ *
32
+ * @example
33
+ * ```ts
34
+ * const price = await client.prices.create({
35
+ * cadence: 'annual',
36
+ * currency: 'currency',
37
+ * item_id: 'item_id',
38
+ * model_type: 'unit',
39
+ * name: 'Annual fee',
40
+ * unit_config: { unit_amount: 'unit_amount' },
41
+ * });
42
+ * ```
31
43
  */
32
44
  create(body: PriceCreateParams, options?: Core.RequestOptions): Core.APIPromise<Shared.Price>;
33
45
  /**
34
46
  * This endpoint allows you to update the `metadata` property on a price. If you
35
47
  * pass null for the metadata value, it will clear any existing metadata for that
36
48
  * price.
49
+ *
50
+ * @example
51
+ * ```ts
52
+ * const price = await client.prices.update('price_id');
53
+ * ```
37
54
  */
38
55
  update(priceId: string, body: PriceUpdateParams, options?: Core.RequestOptions): Core.APIPromise<Shared.Price>;
39
56
  /**
40
57
  * This endpoint is used to list all add-on prices created using the
41
58
  * [price creation endpoint](/api-reference/price/create-price).
59
+ *
60
+ * @example
61
+ * ```ts
62
+ * // Automatically fetches more pages as needed.
63
+ * for await (const price of client.prices.list()) {
64
+ * // ...
65
+ * }
66
+ * ```
42
67
  */
43
68
  list(query?: PriceListParams, options?: Core.RequestOptions): Core.PagePromise<PricesPage, Shared.Price>;
44
69
  list(options?: Core.RequestOptions): Core.PagePromise<PricesPage, Shared.Price>;
@@ -68,6 +93,14 @@ export declare class Prices extends APIResource {
68
93
  * the length of the results must be no greater than 1000. Note that this is a POST
69
94
  * endpoint rather than a GET endpoint because it employs a JSON body rather than
70
95
  * query parameters.
96
+ *
97
+ * @example
98
+ * ```ts
99
+ * const response = await client.prices.evaluate('price_id', {
100
+ * timeframe_end: '2019-12-27T18:11:19.117Z',
101
+ * timeframe_start: '2019-12-27T18:11:19.117Z',
102
+ * });
103
+ * ```
71
104
  */
72
105
  evaluate(priceId: string, body: PriceEvaluateParams, options?: Core.RequestOptions): Core.APIPromise<PriceEvaluateResponse>;
73
106
  /**
@@ -100,6 +133,14 @@ export declare class Prices extends APIResource {
100
133
  *
101
134
  * Note that this is a POST endpoint rather than a GET endpoint because it employs
102
135
  * a JSON body rather than query parameters.
136
+ *
137
+ * @example
138
+ * ```ts
139
+ * const response = await client.prices.evaluateMultiple({
140
+ * timeframe_end: '2019-12-27T18:11:19.117Z',
141
+ * timeframe_start: '2019-12-27T18:11:19.117Z',
142
+ * });
143
+ * ```
103
144
  */
104
145
  evaluateMultiple(body: PriceEvaluateMultipleParams, options?: Core.RequestOptions): Core.APIPromise<PriceEvaluateMultipleResponse>;
105
146
  /**
@@ -121,10 +162,23 @@ export declare class Prices extends APIResource {
121
162
  *
122
163
  * Note that this is a POST endpoint rather than a GET endpoint because it employs
123
164
  * a JSON body rather than query parameters.
165
+ *
166
+ * @example
167
+ * ```ts
168
+ * const response = await client.prices.evaluatePreviewEvents({
169
+ * timeframe_end: '2019-12-27T18:11:19.117Z',
170
+ * timeframe_start: '2019-12-27T18:11:19.117Z',
171
+ * });
172
+ * ```
124
173
  */
125
174
  evaluatePreviewEvents(body: PriceEvaluatePreviewEventsParams, options?: Core.RequestOptions): Core.APIPromise<PriceEvaluatePreviewEventsResponse>;
126
175
  /**
127
176
  * This endpoint returns a price given an identifier.
177
+ *
178
+ * @example
179
+ * ```ts
180
+ * const price = await client.prices.fetch('price_id');
181
+ * ```
128
182
  */
129
183
  fetch(priceId: string, options?: Core.RequestOptions): Core.APIPromise<Shared.Price>;
130
184
  }
@@ -199,7 +253,7 @@ export declare namespace PriceEvaluatePreviewEventsResponse {
199
253
  price_id?: string | null;
200
254
  }
201
255
  }
202
- export type PriceCreateParams = PriceCreateParams.NewFloatingUnitPrice | PriceCreateParams.NewFloatingTieredPrice | PriceCreateParams.NewFloatingBulkPrice | PriceCreateParams.NewFloatingBulkWithFiltersPrice | PriceCreateParams.NewFloatingPackagePrice | PriceCreateParams.NewFloatingMatrixPrice | PriceCreateParams.NewFloatingThresholdTotalAmountPrice | PriceCreateParams.NewFloatingTieredPackagePrice | PriceCreateParams.NewFloatingTieredWithMinimumPrice | PriceCreateParams.NewFloatingGroupedTieredPrice | PriceCreateParams.NewFloatingTieredPackageWithMinimumPrice | PriceCreateParams.NewFloatingPackageWithAllocationPrice | PriceCreateParams.NewFloatingUnitWithPercentPrice | PriceCreateParams.NewFloatingMatrixWithAllocationPrice | PriceCreateParams.NewFloatingTieredWithProrationPrice | PriceCreateParams.NewFloatingUnitWithProrationPrice | PriceCreateParams.NewFloatingGroupedAllocationPrice | PriceCreateParams.NewFloatingBulkWithProrationPrice | PriceCreateParams.NewFloatingGroupedWithProratedMinimumPrice | PriceCreateParams.NewFloatingGroupedWithMeteredMinimumPrice | PriceCreateParams.NewFloatingGroupedWithMinMaxThresholdsPrice | PriceCreateParams.NewFloatingMatrixWithDisplayNamePrice | PriceCreateParams.NewFloatingGroupedTieredPackagePrice | PriceCreateParams.NewFloatingMaxGroupTieredPackagePrice | PriceCreateParams.NewFloatingScalableMatrixWithUnitPricingPrice | PriceCreateParams.NewFloatingScalableMatrixWithTieredPricingPrice | PriceCreateParams.NewFloatingCumulativeGroupedBulkPrice | PriceCreateParams.NewFloatingCumulativeGroupedAllocationPrice | PriceCreateParams.NewFloatingMinimumCompositePrice | PriceCreateParams.NewFloatingPercentCompositePrice | PriceCreateParams.NewFloatingEventOutputPrice;
256
+ export type PriceCreateParams = PriceCreateParams.NewFloatingUnitPrice | PriceCreateParams.NewFloatingTieredPrice | PriceCreateParams.NewFloatingBulkPrice | PriceCreateParams.NewFloatingBulkWithFiltersPrice | PriceCreateParams.NewFloatingPackagePrice | PriceCreateParams.NewFloatingMatrixPrice | PriceCreateParams.NewFloatingThresholdTotalAmountPrice | PriceCreateParams.NewFloatingTieredPackagePrice | PriceCreateParams.NewFloatingTieredWithMinimumPrice | PriceCreateParams.NewFloatingGroupedTieredPrice | PriceCreateParams.NewFloatingTieredPackageWithMinimumPrice | PriceCreateParams.NewFloatingPackageWithAllocationPrice | PriceCreateParams.NewFloatingUnitWithPercentPrice | PriceCreateParams.NewFloatingMatrixWithAllocationPrice | PriceCreateParams.NewFloatingMatrixWithThresholdDiscountsPrice | PriceCreateParams.NewFloatingTieredWithProrationPrice | PriceCreateParams.NewFloatingUnitWithProrationPrice | PriceCreateParams.NewFloatingGroupedAllocationPrice | PriceCreateParams.NewFloatingBulkWithProrationPrice | PriceCreateParams.NewFloatingGroupedWithProratedMinimumPrice | PriceCreateParams.NewFloatingGroupedWithMeteredMinimumPrice | PriceCreateParams.NewFloatingGroupedWithMinMaxThresholdsPrice | PriceCreateParams.NewFloatingMatrixWithDisplayNamePrice | PriceCreateParams.NewFloatingGroupedTieredPackagePrice | PriceCreateParams.NewFloatingMaxGroupTieredPackagePrice | PriceCreateParams.NewFloatingScalableMatrixWithUnitPricingPrice | PriceCreateParams.NewFloatingScalableMatrixWithTieredPricingPrice | PriceCreateParams.NewFloatingCumulativeGroupedBulkPrice | PriceCreateParams.NewFloatingCumulativeGroupedAllocationPrice | PriceCreateParams.NewFloatingDailyCreditAllowancePrice | PriceCreateParams.NewFloatingMeteredAllowancePrice | PriceCreateParams.NewFloatingMinimumCompositePrice | PriceCreateParams.NewFloatingPercentCompositePrice | PriceCreateParams.NewFloatingEventOutputPrice;
203
257
  export declare namespace PriceCreateParams {
204
258
  interface NewFloatingUnitPrice {
205
259
  /**
@@ -1570,6 +1624,139 @@ export declare namespace PriceCreateParams {
1570
1624
  [key: string]: string | null;
1571
1625
  } | null;
1572
1626
  }
1627
+ interface NewFloatingMatrixWithThresholdDiscountsPrice {
1628
+ /**
1629
+ * The cadence to bill for this price on.
1630
+ */
1631
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
1632
+ /**
1633
+ * An ISO 4217 currency string for which this price is billed in.
1634
+ */
1635
+ currency: string;
1636
+ /**
1637
+ * The id of the item the price will be associated with.
1638
+ */
1639
+ item_id: string;
1640
+ /**
1641
+ * Configuration for matrix_with_threshold_discounts pricing
1642
+ */
1643
+ matrix_with_threshold_discounts_config: NewFloatingMatrixWithThresholdDiscountsPrice.MatrixWithThresholdDiscountsConfig;
1644
+ /**
1645
+ * The pricing model type
1646
+ */
1647
+ model_type: 'matrix_with_threshold_discounts';
1648
+ /**
1649
+ * The name of the price.
1650
+ */
1651
+ name: string;
1652
+ /**
1653
+ * The id of the billable metric for the price. Only needed if the price is
1654
+ * usage-based.
1655
+ */
1656
+ billable_metric_id?: string | null;
1657
+ /**
1658
+ * If the Price represents a fixed cost, the price will be billed in-advance if
1659
+ * this is true, and in-arrears if this is false.
1660
+ */
1661
+ billed_in_advance?: boolean | null;
1662
+ /**
1663
+ * For custom cadence: specifies the duration of the billing period in days or
1664
+ * months.
1665
+ */
1666
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
1667
+ /**
1668
+ * The per unit conversion rate of the price currency to the invoicing currency.
1669
+ */
1670
+ conversion_rate?: number | null;
1671
+ /**
1672
+ * The configuration for the rate of the price currency to the invoicing currency.
1673
+ */
1674
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
1675
+ /**
1676
+ * For dimensional price: specifies a price group and dimension values
1677
+ */
1678
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
1679
+ /**
1680
+ * An alias for the price.
1681
+ */
1682
+ external_price_id?: string | null;
1683
+ /**
1684
+ * If the Price represents a fixed cost, this represents the quantity of units
1685
+ * applied.
1686
+ */
1687
+ fixed_price_quantity?: number | null;
1688
+ /**
1689
+ * The property used to group this price on an invoice
1690
+ */
1691
+ invoice_grouping_key?: string | null;
1692
+ /**
1693
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
1694
+ * If unspecified, a single invoice is produced per billing cycle.
1695
+ */
1696
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
1697
+ /**
1698
+ * The ID of the license type to associate with this price.
1699
+ */
1700
+ license_type_id?: string | null;
1701
+ /**
1702
+ * User-specified key/value pairs for the resource. Individual keys can be removed
1703
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
1704
+ * by setting `metadata` to `null`.
1705
+ */
1706
+ metadata?: {
1707
+ [key: string]: string | null;
1708
+ } | null;
1709
+ }
1710
+ namespace NewFloatingMatrixWithThresholdDiscountsPrice {
1711
+ /**
1712
+ * Configuration for matrix_with_threshold_discounts pricing
1713
+ */
1714
+ interface MatrixWithThresholdDiscountsConfig {
1715
+ /**
1716
+ * Unit price used for usage that does not match any defined matrix cell.
1717
+ */
1718
+ default_unit_amount: string;
1719
+ /**
1720
+ * First matrix dimension key.
1721
+ */
1722
+ first_dimension: string;
1723
+ /**
1724
+ * Per-cell unit prices.
1725
+ */
1726
+ matrix_values: Array<MatrixWithThresholdDiscountsConfig.MatrixValue>;
1727
+ /**
1728
+ * Optional second matrix dimension key.
1729
+ */
1730
+ second_dimension?: string | null;
1731
+ threshold_discount_groups?: Array<MatrixWithThresholdDiscountsConfig.ThresholdDiscountGroup>;
1732
+ }
1733
+ namespace MatrixWithThresholdDiscountsConfig {
1734
+ interface MatrixValue {
1735
+ first_dimension_value: string;
1736
+ unit_amount: string;
1737
+ second_dimension_value?: string | null;
1738
+ }
1739
+ interface ThresholdDiscountGroup {
1740
+ /**
1741
+ * Discount rate applied to spend above the threshold.
1742
+ */
1743
+ above_threshold_discount_percentage: string;
1744
+ /**
1745
+ * Discount rate applied to spend at or below the threshold. Set to 0 for no
1746
+ * baseline discount.
1747
+ */
1748
+ below_threshold_discount_percentage: string;
1749
+ /**
1750
+ * Semicolon-separated list of matrix cell coordinates targeted by this group. Each
1751
+ * coordinate is `first,second` when the matrix has two dimensions, or just `first`
1752
+ * for a single-dimension matrix. Example: `blue,circle;green,triangle`.
1753
+ */
1754
+ cell_coordinates: string;
1755
+ threshold_amount: string;
1756
+ description?: string | null;
1757
+ }
1758
+ }
1759
+ }
1573
1760
  interface NewFloatingTieredWithProrationPrice {
1574
1761
  /**
1575
1762
  * The cadence to bill for this price on.
@@ -3132,7 +3319,7 @@ export declare namespace PriceCreateParams {
3132
3319
  unit_amount: string;
3133
3320
  }
3134
3321
  }
3135
- interface NewFloatingMinimumCompositePrice {
3322
+ interface NewFloatingDailyCreditAllowancePrice {
3136
3323
  /**
3137
3324
  * The cadence to bill for this price on.
3138
3325
  */
@@ -3142,17 +3329,17 @@ export declare namespace PriceCreateParams {
3142
3329
  */
3143
3330
  currency: string;
3144
3331
  /**
3145
- * The id of the item the price will be associated with.
3332
+ * Configuration for daily_credit_allowance pricing
3146
3333
  */
3147
- item_id: string;
3334
+ daily_credit_allowance_config: NewFloatingDailyCreditAllowancePrice.DailyCreditAllowanceConfig;
3148
3335
  /**
3149
- * Configuration for minimum_composite pricing
3336
+ * The id of the item the price will be associated with.
3150
3337
  */
3151
- minimum_composite_config: NewFloatingMinimumCompositePrice.MinimumCompositeConfig;
3338
+ item_id: string;
3152
3339
  /**
3153
3340
  * The pricing model type
3154
3341
  */
3155
- model_type: 'minimum_composite';
3342
+ model_type: 'daily_credit_allowance';
3156
3343
  /**
3157
3344
  * The name of the price.
3158
3345
  */
@@ -3215,22 +3402,53 @@ export declare namespace PriceCreateParams {
3215
3402
  [key: string]: string | null;
3216
3403
  } | null;
3217
3404
  }
3218
- namespace NewFloatingMinimumCompositePrice {
3405
+ namespace NewFloatingDailyCreditAllowancePrice {
3219
3406
  /**
3220
- * Configuration for minimum_composite pricing
3407
+ * Configuration for daily_credit_allowance pricing
3221
3408
  */
3222
- interface MinimumCompositeConfig {
3409
+ interface DailyCreditAllowanceConfig {
3223
3410
  /**
3224
- * The minimum amount to apply
3411
+ * Credits granted per day. Lose-it-or-use-it; does not roll over.
3225
3412
  */
3226
- minimum_amount: string;
3413
+ daily_allowance: string;
3227
3414
  /**
3228
- * If true, subtotals from this price are prorated based on the service period
3415
+ * Default per-unit credit rate for any usage not bucketed into a specified
3416
+ * matrix_value
3229
3417
  */
3230
- prorated?: boolean;
3418
+ default_unit_amount: string;
3419
+ /**
3420
+ * One or two event property values to evaluate matrix groups by
3421
+ */
3422
+ dimensions: Array<string | null>;
3423
+ /**
3424
+ * Event property whose value identifies the day bucket the event belongs to (e.g.
3425
+ * 'event_day' set to an ISO date string in the customer's timezone). The allowance
3426
+ * resets per distinct value of this property.
3427
+ */
3428
+ event_day_property: string;
3429
+ /**
3430
+ * Per-dimension credit rates
3431
+ */
3432
+ matrix_values: Array<DailyCreditAllowanceConfig.MatrixValue>;
3433
+ }
3434
+ namespace DailyCreditAllowanceConfig {
3435
+ /**
3436
+ * Per-dimension credit price for the daily credit allowance model.
3437
+ */
3438
+ interface MatrixValue {
3439
+ /**
3440
+ * One or two matrix keys to filter usage to this value by. For example, ["model"]
3441
+ * could be used to apply a different credit rate to each AI model.
3442
+ */
3443
+ dimension_values: Array<string | null>;
3444
+ /**
3445
+ * Credits charged per unit of usage matching the specified dimension_values
3446
+ */
3447
+ unit_amount: string;
3448
+ }
3231
3449
  }
3232
3450
  }
3233
- interface NewFloatingPercentCompositePrice {
3451
+ interface NewFloatingMeteredAllowancePrice {
3234
3452
  /**
3235
3453
  * The cadence to bill for this price on.
3236
3454
  */
@@ -3243,18 +3461,18 @@ export declare namespace PriceCreateParams {
3243
3461
  * The id of the item the price will be associated with.
3244
3462
  */
3245
3463
  item_id: string;
3464
+ /**
3465
+ * Configuration for metered_allowance pricing
3466
+ */
3467
+ metered_allowance_config: NewFloatingMeteredAllowancePrice.MeteredAllowanceConfig;
3246
3468
  /**
3247
3469
  * The pricing model type
3248
3470
  */
3249
- model_type: 'percent';
3471
+ model_type: 'metered_allowance';
3250
3472
  /**
3251
3473
  * The name of the price.
3252
3474
  */
3253
3475
  name: string;
3254
- /**
3255
- * Configuration for percent pricing
3256
- */
3257
- percent_config: NewFloatingPercentCompositePrice.PercentConfig;
3258
3476
  /**
3259
3477
  * The id of the billable metric for the price. Only needed if the price is
3260
3478
  * usage-based.
@@ -3313,18 +3531,43 @@ export declare namespace PriceCreateParams {
3313
3531
  [key: string]: string | null;
3314
3532
  } | null;
3315
3533
  }
3316
- namespace NewFloatingPercentCompositePrice {
3534
+ namespace NewFloatingMeteredAllowancePrice {
3317
3535
  /**
3318
- * Configuration for percent pricing
3536
+ * Configuration for metered_allowance pricing
3319
3537
  */
3320
- interface PercentConfig {
3538
+ interface MeteredAllowanceConfig {
3321
3539
  /**
3322
- * What percent of the component subtotals to charge
3540
+ * The grouping_key value whose summed quantity represents the allowance for this
3541
+ * period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption
3542
+ * — credit can never exceed actual usage.
3323
3543
  */
3324
- percent: number;
3544
+ allowance_grouping_value: string;
3545
+ /**
3546
+ * The grouping_key value whose summed quantity represents consumption (e.g.
3547
+ * 'download'). Charged at unit_amount.
3548
+ */
3549
+ consumption_grouping_value: string;
3550
+ /**
3551
+ * Event property used to partition the metric into consumption and allowance
3552
+ * quantities (e.g. 'event_name'). The metric is queried with this key and the two
3553
+ * values below select which partition is which.
3554
+ */
3555
+ grouping_key: string;
3556
+ /**
3557
+ * Per-unit price applied to gross consumption and to the allowance credit.
3558
+ */
3559
+ unit_amount: string;
3560
+ /**
3561
+ * Sub-line label for the credit row (e.g. 'Up to 3x free egress').
3562
+ */
3563
+ allowance_display_name?: string;
3564
+ /**
3565
+ * Sub-line label for the gross consumption row (e.g. 'bytes gotten').
3566
+ */
3567
+ consumption_display_name?: string;
3325
3568
  }
3326
3569
  }
3327
- interface NewFloatingEventOutputPrice {
3570
+ interface NewFloatingMinimumCompositePrice {
3328
3571
  /**
3329
3572
  * The cadence to bill for this price on.
3330
3573
  */
@@ -3333,18 +3576,18 @@ export declare namespace PriceCreateParams {
3333
3576
  * An ISO 4217 currency string for which this price is billed in.
3334
3577
  */
3335
3578
  currency: string;
3336
- /**
3337
- * Configuration for event_output pricing
3338
- */
3339
- event_output_config: NewFloatingEventOutputPrice.EventOutputConfig;
3340
3579
  /**
3341
3580
  * The id of the item the price will be associated with.
3342
3581
  */
3343
3582
  item_id: string;
3583
+ /**
3584
+ * Configuration for minimum_composite pricing
3585
+ */
3586
+ minimum_composite_config: NewFloatingMinimumCompositePrice.MinimumCompositeConfig;
3344
3587
  /**
3345
3588
  * The pricing model type
3346
3589
  */
3347
- model_type: 'event_output';
3590
+ model_type: 'minimum_composite';
3348
3591
  /**
3349
3592
  * The name of the price.
3350
3593
  */
@@ -3407,140 +3650,1061 @@ export declare namespace PriceCreateParams {
3407
3650
  [key: string]: string | null;
3408
3651
  } | null;
3409
3652
  }
3410
- namespace NewFloatingEventOutputPrice {
3653
+ namespace NewFloatingMinimumCompositePrice {
3411
3654
  /**
3412
- * Configuration for event_output pricing
3655
+ * Configuration for minimum_composite pricing
3413
3656
  */
3414
- interface EventOutputConfig {
3415
- /**
3416
- * The key in the event data to extract the unit rate from.
3417
- */
3418
- unit_rating_key: string;
3657
+ interface MinimumCompositeConfig {
3419
3658
  /**
3420
- * If provided, this amount will be used as the unit rate when an event does not
3421
- * have a value for the `unit_rating_key`. If not provided, events missing a unit
3422
- * rate will be ignored.
3659
+ * The minimum amount to apply
3423
3660
  */
3424
- default_unit_rate?: string | null;
3661
+ minimum_amount: string;
3425
3662
  /**
3426
- * An optional key in the event data to group by (e.g., event ID). All events will
3427
- * also be grouped by their unit rate.
3663
+ * If true, subtotals from this price are prorated based on the service period
3428
3664
  */
3429
- grouping_key?: string | null;
3665
+ prorated?: boolean;
3430
3666
  }
3431
3667
  }
3432
- }
3433
- export interface PriceUpdateParams {
3434
- /**
3435
- * User-specified key/value pairs for the resource. Individual keys can be removed
3436
- * by setting the value to `null`, and the entire metadata mapping can be cleared
3437
- * by setting `metadata` to `null`.
3438
- */
3439
- metadata?: {
3440
- [key: string]: string | null;
3441
- } | null;
3442
- }
3443
- export interface PriceListParams extends PageParams {
3444
- }
3445
- export interface PriceEvaluateParams {
3446
- /**
3447
- * The exclusive upper bound for event timestamps
3448
- */
3449
- timeframe_end: string;
3450
- /**
3451
- * The inclusive lower bound for event timestamps
3452
- */
3453
- timeframe_start: string;
3454
- /**
3455
- * The ID of the customer to which this evaluation is scoped.
3456
- */
3457
- customer_id?: string | null;
3458
- /**
3459
- * The external customer ID of the customer to which this evaluation is scoped.
3460
- */
3461
- external_customer_id?: string | null;
3462
- /**
3463
- * A boolean
3464
- * [computed property](/extensibility/advanced-metrics#computed-properties) used to
3465
- * filter the underlying billable metric
3466
- */
3467
- filter?: string | null;
3468
- /**
3469
- * Properties (or
3470
- * [computed properties](/extensibility/advanced-metrics#computed-properties)) used
3471
- * to group the underlying billable metric
3472
- */
3473
- grouping_keys?: Array<string>;
3474
- /**
3475
- * Optional overrides for parameterized billable metric parameters. If the metric
3476
- * has parameter definitions and no overrides are provided, defaults will be used.
3477
- */
3478
- metric_parameter_overrides?: {
3479
- [key: string]: unknown;
3480
- } | null;
3481
- }
3482
- export interface PriceEvaluateMultipleParams {
3483
- /**
3484
- * The exclusive upper bound for event timestamps
3485
- */
3486
- timeframe_end: string;
3487
- /**
3488
- * The inclusive lower bound for event timestamps
3489
- */
3490
- timeframe_start: string;
3491
- /**
3492
- * The ID of the customer to which this evaluation is scoped.
3493
- */
3494
- customer_id?: string | null;
3495
- /**
3496
- * The external customer ID of the customer to which this evaluation is scoped.
3497
- */
3498
- external_customer_id?: string | null;
3499
- /**
3500
- * List of prices to evaluate (max 100)
3501
- */
3502
- price_evaluations?: Array<PriceEvaluateMultipleParams.PriceEvaluation>;
3503
- }
3504
- export declare namespace PriceEvaluateMultipleParams {
3505
- interface PriceEvaluation {
3668
+ interface NewFloatingPercentCompositePrice {
3506
3669
  /**
3507
- * The external ID of a price to evaluate that exists in your Orb account.
3670
+ * The cadence to bill for this price on.
3671
+ */
3672
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
3673
+ /**
3674
+ * An ISO 4217 currency string for which this price is billed in.
3675
+ */
3676
+ currency: string;
3677
+ /**
3678
+ * The id of the item the price will be associated with.
3679
+ */
3680
+ item_id: string;
3681
+ /**
3682
+ * The pricing model type
3683
+ */
3684
+ model_type: 'percent';
3685
+ /**
3686
+ * The name of the price.
3687
+ */
3688
+ name: string;
3689
+ /**
3690
+ * Configuration for percent pricing
3691
+ */
3692
+ percent_config: NewFloatingPercentCompositePrice.PercentConfig;
3693
+ /**
3694
+ * The id of the billable metric for the price. Only needed if the price is
3695
+ * usage-based.
3696
+ */
3697
+ billable_metric_id?: string | null;
3698
+ /**
3699
+ * If the Price represents a fixed cost, the price will be billed in-advance if
3700
+ * this is true, and in-arrears if this is false.
3701
+ */
3702
+ billed_in_advance?: boolean | null;
3703
+ /**
3704
+ * For custom cadence: specifies the duration of the billing period in days or
3705
+ * months.
3706
+ */
3707
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
3708
+ /**
3709
+ * The per unit conversion rate of the price currency to the invoicing currency.
3710
+ */
3711
+ conversion_rate?: number | null;
3712
+ /**
3713
+ * The configuration for the rate of the price currency to the invoicing currency.
3714
+ */
3715
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
3716
+ /**
3717
+ * For dimensional price: specifies a price group and dimension values
3718
+ */
3719
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
3720
+ /**
3721
+ * An alias for the price.
3508
3722
  */
3509
3723
  external_price_id?: string | null;
3510
3724
  /**
3511
- * A boolean
3512
- * [computed property](/extensibility/advanced-metrics#computed-properties) used to
3513
- * filter the underlying billable metric
3725
+ * If the Price represents a fixed cost, this represents the quantity of units
3726
+ * applied.
3514
3727
  */
3515
- filter?: string | null;
3728
+ fixed_price_quantity?: number | null;
3516
3729
  /**
3517
- * Properties (or
3518
- * [computed properties](/extensibility/advanced-metrics#computed-properties)) used
3519
- * to group the underlying billable metric
3730
+ * The property used to group this price on an invoice
3520
3731
  */
3521
- grouping_keys?: Array<string>;
3732
+ invoice_grouping_key?: string | null;
3522
3733
  /**
3523
- * Optional overrides for parameterized billable metric parameters. If the metric
3524
- * has parameter definitions and no overrides are provided, defaults will be used.
3734
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
3735
+ * If unspecified, a single invoice is produced per billing cycle.
3525
3736
  */
3526
- metric_parameter_overrides?: {
3527
- [key: string]: unknown;
3737
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
3738
+ /**
3739
+ * The ID of the license type to associate with this price.
3740
+ */
3741
+ license_type_id?: string | null;
3742
+ /**
3743
+ * User-specified key/value pairs for the resource. Individual keys can be removed
3744
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
3745
+ * by setting `metadata` to `null`.
3746
+ */
3747
+ metadata?: {
3748
+ [key: string]: string | null;
3528
3749
  } | null;
3750
+ }
3751
+ namespace NewFloatingPercentCompositePrice {
3529
3752
  /**
3530
- * New floating price request body params.
3753
+ * Configuration for percent pricing
3754
+ */
3755
+ interface PercentConfig {
3756
+ /**
3757
+ * Fraction of the component subtotals to charge (0 < percent <= 1).
3758
+ */
3759
+ percent: number;
3760
+ /**
3761
+ * Maximum amount to charge. If unset, the fee has no upper bound.
3762
+ */
3763
+ maximum_amount?: string | null;
3764
+ /**
3765
+ * Minimum amount to charge. If unset, the fee is bounded below by 0.
3766
+ */
3767
+ minimum_amount?: string | null;
3768
+ /**
3769
+ * If true, the minimum_amount is prorated based on the service period. The
3770
+ * maximum_amount is an absolute cap (never prorated), and the percent applied to
3771
+ * upstream subtotals is never prorated either.
3772
+ */
3773
+ prorated?: boolean;
3774
+ }
3775
+ }
3776
+ interface NewFloatingEventOutputPrice {
3777
+ /**
3778
+ * The cadence to bill for this price on.
3531
3779
  */
3532
- price?: Shared.NewFloatingUnitPrice | Shared.NewFloatingTieredPrice | Shared.NewFloatingBulkPrice | PriceEvaluation.NewFloatingBulkWithFiltersPrice | Shared.NewFloatingPackagePrice | Shared.NewFloatingMatrixPrice | Shared.NewFloatingThresholdTotalAmountPrice | Shared.NewFloatingTieredPackagePrice | Shared.NewFloatingTieredWithMinimumPrice | Shared.NewFloatingGroupedTieredPrice | Shared.NewFloatingTieredPackageWithMinimumPrice | Shared.NewFloatingPackageWithAllocationPrice | Shared.NewFloatingUnitWithPercentPrice | Shared.NewFloatingMatrixWithAllocationPrice | Shared.NewFloatingTieredWithProrationPrice | Shared.NewFloatingUnitWithProrationPrice | Shared.NewFloatingGroupedAllocationPrice | Shared.NewFloatingBulkWithProrationPrice | Shared.NewFloatingGroupedWithProratedMinimumPrice | Shared.NewFloatingGroupedWithMeteredMinimumPrice | PriceEvaluation.NewFloatingGroupedWithMinMaxThresholdsPrice | Shared.NewFloatingMatrixWithDisplayNamePrice | Shared.NewFloatingGroupedTieredPackagePrice | Shared.NewFloatingMaxGroupTieredPackagePrice | Shared.NewFloatingScalableMatrixWithUnitPricingPrice | Shared.NewFloatingScalableMatrixWithTieredPricingPrice | Shared.NewFloatingCumulativeGroupedBulkPrice | PriceEvaluation.NewFloatingCumulativeGroupedAllocationPrice | Shared.NewFloatingMinimumCompositePrice | PriceEvaluation.NewFloatingPercentCompositePrice | PriceEvaluation.NewFloatingEventOutputPrice | null;
3780
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
3533
3781
  /**
3534
- * The ID of a price to evaluate that exists in your Orb account.
3782
+ * An ISO 4217 currency string for which this price is billed in.
3535
3783
  */
3536
- price_id?: string | null;
3784
+ currency: string;
3785
+ /**
3786
+ * Configuration for event_output pricing
3787
+ */
3788
+ event_output_config: NewFloatingEventOutputPrice.EventOutputConfig;
3789
+ /**
3790
+ * The id of the item the price will be associated with.
3791
+ */
3792
+ item_id: string;
3793
+ /**
3794
+ * The pricing model type
3795
+ */
3796
+ model_type: 'event_output';
3797
+ /**
3798
+ * The name of the price.
3799
+ */
3800
+ name: string;
3801
+ /**
3802
+ * The id of the billable metric for the price. Only needed if the price is
3803
+ * usage-based.
3804
+ */
3805
+ billable_metric_id?: string | null;
3806
+ /**
3807
+ * If the Price represents a fixed cost, the price will be billed in-advance if
3808
+ * this is true, and in-arrears if this is false.
3809
+ */
3810
+ billed_in_advance?: boolean | null;
3811
+ /**
3812
+ * For custom cadence: specifies the duration of the billing period in days or
3813
+ * months.
3814
+ */
3815
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
3816
+ /**
3817
+ * The per unit conversion rate of the price currency to the invoicing currency.
3818
+ */
3819
+ conversion_rate?: number | null;
3820
+ /**
3821
+ * The configuration for the rate of the price currency to the invoicing currency.
3822
+ */
3823
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
3824
+ /**
3825
+ * For dimensional price: specifies a price group and dimension values
3826
+ */
3827
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
3828
+ /**
3829
+ * An alias for the price.
3830
+ */
3831
+ external_price_id?: string | null;
3832
+ /**
3833
+ * If the Price represents a fixed cost, this represents the quantity of units
3834
+ * applied.
3835
+ */
3836
+ fixed_price_quantity?: number | null;
3837
+ /**
3838
+ * The property used to group this price on an invoice
3839
+ */
3840
+ invoice_grouping_key?: string | null;
3841
+ /**
3842
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
3843
+ * If unspecified, a single invoice is produced per billing cycle.
3844
+ */
3845
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
3846
+ /**
3847
+ * The ID of the license type to associate with this price.
3848
+ */
3849
+ license_type_id?: string | null;
3850
+ /**
3851
+ * User-specified key/value pairs for the resource. Individual keys can be removed
3852
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
3853
+ * by setting `metadata` to `null`.
3854
+ */
3855
+ metadata?: {
3856
+ [key: string]: string | null;
3857
+ } | null;
3537
3858
  }
3538
- namespace PriceEvaluation {
3539
- interface NewFloatingBulkWithFiltersPrice {
3859
+ namespace NewFloatingEventOutputPrice {
3860
+ /**
3861
+ * Configuration for event_output pricing
3862
+ */
3863
+ interface EventOutputConfig {
3864
+ /**
3865
+ * The key in the event data to extract the unit rate from.
3866
+ */
3867
+ unit_rating_key: string;
3868
+ /**
3869
+ * If provided, this amount will be used as the unit rate when an event does not
3870
+ * have a value for the `unit_rating_key`. If not provided, events missing a unit
3871
+ * rate will be ignored.
3872
+ */
3873
+ default_unit_rate?: string | null;
3874
+ /**
3875
+ * An optional key in the event data to group by (e.g., event ID). All events will
3876
+ * also be grouped by their unit rate.
3877
+ */
3878
+ grouping_key?: string | null;
3879
+ }
3880
+ }
3881
+ }
3882
+ export interface PriceUpdateParams {
3883
+ /**
3884
+ * User-specified key/value pairs for the resource. Individual keys can be removed
3885
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
3886
+ * by setting `metadata` to `null`.
3887
+ */
3888
+ metadata?: {
3889
+ [key: string]: string | null;
3890
+ } | null;
3891
+ }
3892
+ export interface PriceListParams extends PageParams {
3893
+ }
3894
+ export interface PriceEvaluateParams {
3895
+ /**
3896
+ * The exclusive upper bound for event timestamps
3897
+ */
3898
+ timeframe_end: string;
3899
+ /**
3900
+ * The inclusive lower bound for event timestamps
3901
+ */
3902
+ timeframe_start: string;
3903
+ /**
3904
+ * The ID of the customer to which this evaluation is scoped.
3905
+ */
3906
+ customer_id?: string | null;
3907
+ /**
3908
+ * The external customer ID of the customer to which this evaluation is scoped.
3909
+ */
3910
+ external_customer_id?: string | null;
3911
+ /**
3912
+ * A boolean
3913
+ * [computed property](/extensibility/advanced-metrics#computed-properties) used to
3914
+ * filter the underlying billable metric
3915
+ */
3916
+ filter?: string | null;
3917
+ /**
3918
+ * Properties (or
3919
+ * [computed properties](/extensibility/advanced-metrics#computed-properties)) used
3920
+ * to group the underlying billable metric
3921
+ */
3922
+ grouping_keys?: Array<string>;
3923
+ /**
3924
+ * Optional overrides for parameterized billable metric parameters. If the metric
3925
+ * has parameter definitions and no overrides are provided, defaults will be used.
3926
+ */
3927
+ metric_parameter_overrides?: {
3928
+ [key: string]: unknown;
3929
+ } | null;
3930
+ }
3931
+ export interface PriceEvaluateMultipleParams {
3932
+ /**
3933
+ * The exclusive upper bound for event timestamps
3934
+ */
3935
+ timeframe_end: string;
3936
+ /**
3937
+ * The inclusive lower bound for event timestamps
3938
+ */
3939
+ timeframe_start: string;
3940
+ /**
3941
+ * The ID of the customer to which this evaluation is scoped.
3942
+ */
3943
+ customer_id?: string | null;
3944
+ /**
3945
+ * The external customer ID of the customer to which this evaluation is scoped.
3946
+ */
3947
+ external_customer_id?: string | null;
3948
+ /**
3949
+ * List of prices to evaluate (max 100)
3950
+ */
3951
+ price_evaluations?: Array<PriceEvaluateMultipleParams.PriceEvaluation>;
3952
+ }
3953
+ export declare namespace PriceEvaluateMultipleParams {
3954
+ interface PriceEvaluation {
3955
+ /**
3956
+ * The external ID of a price to evaluate that exists in your Orb account.
3957
+ */
3958
+ external_price_id?: string | null;
3959
+ /**
3960
+ * A boolean
3961
+ * [computed property](/extensibility/advanced-metrics#computed-properties) used to
3962
+ * filter the underlying billable metric
3963
+ */
3964
+ filter?: string | null;
3965
+ /**
3966
+ * Properties (or
3967
+ * [computed properties](/extensibility/advanced-metrics#computed-properties)) used
3968
+ * to group the underlying billable metric
3969
+ */
3970
+ grouping_keys?: Array<string>;
3971
+ /**
3972
+ * Optional overrides for parameterized billable metric parameters. If the metric
3973
+ * has parameter definitions and no overrides are provided, defaults will be used.
3974
+ */
3975
+ metric_parameter_overrides?: {
3976
+ [key: string]: unknown;
3977
+ } | null;
3978
+ /**
3979
+ * New floating price request body params.
3980
+ */
3981
+ price?: Shared.NewFloatingUnitPrice | Shared.NewFloatingTieredPrice | Shared.NewFloatingBulkPrice | PriceEvaluation.NewFloatingBulkWithFiltersPrice | Shared.NewFloatingPackagePrice | Shared.NewFloatingMatrixPrice | Shared.NewFloatingThresholdTotalAmountPrice | Shared.NewFloatingTieredPackagePrice | Shared.NewFloatingTieredWithMinimumPrice | Shared.NewFloatingGroupedTieredPrice | Shared.NewFloatingTieredPackageWithMinimumPrice | Shared.NewFloatingPackageWithAllocationPrice | Shared.NewFloatingUnitWithPercentPrice | Shared.NewFloatingMatrixWithAllocationPrice | PriceEvaluation.NewFloatingMatrixWithThresholdDiscountsPrice | Shared.NewFloatingTieredWithProrationPrice | Shared.NewFloatingUnitWithProrationPrice | Shared.NewFloatingGroupedAllocationPrice | Shared.NewFloatingBulkWithProrationPrice | Shared.NewFloatingGroupedWithProratedMinimumPrice | Shared.NewFloatingGroupedWithMeteredMinimumPrice | PriceEvaluation.NewFloatingGroupedWithMinMaxThresholdsPrice | Shared.NewFloatingMatrixWithDisplayNamePrice | Shared.NewFloatingGroupedTieredPackagePrice | Shared.NewFloatingMaxGroupTieredPackagePrice | Shared.NewFloatingScalableMatrixWithUnitPricingPrice | Shared.NewFloatingScalableMatrixWithTieredPricingPrice | Shared.NewFloatingCumulativeGroupedBulkPrice | PriceEvaluation.NewFloatingCumulativeGroupedAllocationPrice | PriceEvaluation.NewFloatingDailyCreditAllowancePrice | PriceEvaluation.NewFloatingMeteredAllowancePrice | Shared.NewFloatingMinimumCompositePrice | PriceEvaluation.NewFloatingPercentCompositePrice | PriceEvaluation.NewFloatingEventOutputPrice | null;
3982
+ /**
3983
+ * The ID of a price to evaluate that exists in your Orb account.
3984
+ */
3985
+ price_id?: string | null;
3986
+ }
3987
+ namespace PriceEvaluation {
3988
+ interface NewFloatingBulkWithFiltersPrice {
3989
+ /**
3990
+ * Configuration for bulk_with_filters pricing
3991
+ */
3992
+ bulk_with_filters_config: NewFloatingBulkWithFiltersPrice.BulkWithFiltersConfig;
3993
+ /**
3994
+ * The cadence to bill for this price on.
3995
+ */
3996
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
3997
+ /**
3998
+ * An ISO 4217 currency string for which this price is billed in.
3999
+ */
4000
+ currency: string;
4001
+ /**
4002
+ * The id of the item the price will be associated with.
4003
+ */
4004
+ item_id: string;
4005
+ /**
4006
+ * The pricing model type
4007
+ */
4008
+ model_type: 'bulk_with_filters';
4009
+ /**
4010
+ * The name of the price.
4011
+ */
4012
+ name: string;
4013
+ /**
4014
+ * The id of the billable metric for the price. Only needed if the price is
4015
+ * usage-based.
4016
+ */
4017
+ billable_metric_id?: string | null;
4018
+ /**
4019
+ * If the Price represents a fixed cost, the price will be billed in-advance if
4020
+ * this is true, and in-arrears if this is false.
4021
+ */
4022
+ billed_in_advance?: boolean | null;
4023
+ /**
4024
+ * For custom cadence: specifies the duration of the billing period in days or
4025
+ * months.
4026
+ */
4027
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
4028
+ /**
4029
+ * The per unit conversion rate of the price currency to the invoicing currency.
4030
+ */
4031
+ conversion_rate?: number | null;
4032
+ /**
4033
+ * The configuration for the rate of the price currency to the invoicing currency.
4034
+ */
4035
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
4036
+ /**
4037
+ * For dimensional price: specifies a price group and dimension values
4038
+ */
4039
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
4040
+ /**
4041
+ * An alias for the price.
4042
+ */
4043
+ external_price_id?: string | null;
4044
+ /**
4045
+ * If the Price represents a fixed cost, this represents the quantity of units
4046
+ * applied.
4047
+ */
4048
+ fixed_price_quantity?: number | null;
4049
+ /**
4050
+ * The property used to group this price on an invoice
4051
+ */
4052
+ invoice_grouping_key?: string | null;
4053
+ /**
4054
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
4055
+ * If unspecified, a single invoice is produced per billing cycle.
4056
+ */
4057
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
4058
+ /**
4059
+ * The ID of the license type to associate with this price.
4060
+ */
4061
+ license_type_id?: string | null;
4062
+ /**
4063
+ * User-specified key/value pairs for the resource. Individual keys can be removed
4064
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
4065
+ * by setting `metadata` to `null`.
4066
+ */
4067
+ metadata?: {
4068
+ [key: string]: string | null;
4069
+ } | null;
4070
+ }
4071
+ namespace NewFloatingBulkWithFiltersPrice {
4072
+ /**
4073
+ * Configuration for bulk_with_filters pricing
4074
+ */
4075
+ interface BulkWithFiltersConfig {
4076
+ /**
4077
+ * Property filters to apply (all must match)
4078
+ */
4079
+ filters: Array<BulkWithFiltersConfig.Filter>;
4080
+ /**
4081
+ * Bulk tiers for rating based on total usage volume
4082
+ */
4083
+ tiers: Array<BulkWithFiltersConfig.Tier>;
4084
+ }
4085
+ namespace BulkWithFiltersConfig {
4086
+ /**
4087
+ * Configuration for a single property filter
4088
+ */
4089
+ interface Filter {
4090
+ /**
4091
+ * Event property key to filter on
4092
+ */
4093
+ property_key: string;
4094
+ /**
4095
+ * Event property value to match
4096
+ */
4097
+ property_value: string;
4098
+ }
4099
+ /**
4100
+ * Configuration for a single bulk pricing tier
4101
+ */
4102
+ interface Tier {
4103
+ /**
4104
+ * Amount per unit
4105
+ */
4106
+ unit_amount: string;
4107
+ /**
4108
+ * The lower bound for this tier
4109
+ */
4110
+ tier_lower_bound?: string | null;
4111
+ }
4112
+ }
4113
+ }
4114
+ interface NewFloatingMatrixWithThresholdDiscountsPrice {
4115
+ /**
4116
+ * The cadence to bill for this price on.
4117
+ */
4118
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
4119
+ /**
4120
+ * An ISO 4217 currency string for which this price is billed in.
4121
+ */
4122
+ currency: string;
4123
+ /**
4124
+ * The id of the item the price will be associated with.
4125
+ */
4126
+ item_id: string;
4127
+ /**
4128
+ * Configuration for matrix_with_threshold_discounts pricing
4129
+ */
4130
+ matrix_with_threshold_discounts_config: NewFloatingMatrixWithThresholdDiscountsPrice.MatrixWithThresholdDiscountsConfig;
4131
+ /**
4132
+ * The pricing model type
4133
+ */
4134
+ model_type: 'matrix_with_threshold_discounts';
4135
+ /**
4136
+ * The name of the price.
4137
+ */
4138
+ name: string;
4139
+ /**
4140
+ * The id of the billable metric for the price. Only needed if the price is
4141
+ * usage-based.
4142
+ */
4143
+ billable_metric_id?: string | null;
4144
+ /**
4145
+ * If the Price represents a fixed cost, the price will be billed in-advance if
4146
+ * this is true, and in-arrears if this is false.
4147
+ */
4148
+ billed_in_advance?: boolean | null;
4149
+ /**
4150
+ * For custom cadence: specifies the duration of the billing period in days or
4151
+ * months.
4152
+ */
4153
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
4154
+ /**
4155
+ * The per unit conversion rate of the price currency to the invoicing currency.
4156
+ */
4157
+ conversion_rate?: number | null;
4158
+ /**
4159
+ * The configuration for the rate of the price currency to the invoicing currency.
4160
+ */
4161
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
4162
+ /**
4163
+ * For dimensional price: specifies a price group and dimension values
4164
+ */
4165
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
4166
+ /**
4167
+ * An alias for the price.
4168
+ */
4169
+ external_price_id?: string | null;
4170
+ /**
4171
+ * If the Price represents a fixed cost, this represents the quantity of units
4172
+ * applied.
4173
+ */
4174
+ fixed_price_quantity?: number | null;
4175
+ /**
4176
+ * The property used to group this price on an invoice
4177
+ */
4178
+ invoice_grouping_key?: string | null;
4179
+ /**
4180
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
4181
+ * If unspecified, a single invoice is produced per billing cycle.
4182
+ */
4183
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
4184
+ /**
4185
+ * The ID of the license type to associate with this price.
4186
+ */
4187
+ license_type_id?: string | null;
4188
+ /**
4189
+ * User-specified key/value pairs for the resource. Individual keys can be removed
4190
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
4191
+ * by setting `metadata` to `null`.
4192
+ */
4193
+ metadata?: {
4194
+ [key: string]: string | null;
4195
+ } | null;
4196
+ }
4197
+ namespace NewFloatingMatrixWithThresholdDiscountsPrice {
4198
+ /**
4199
+ * Configuration for matrix_with_threshold_discounts pricing
4200
+ */
4201
+ interface MatrixWithThresholdDiscountsConfig {
4202
+ /**
4203
+ * Unit price used for usage that does not match any defined matrix cell.
4204
+ */
4205
+ default_unit_amount: string;
4206
+ /**
4207
+ * First matrix dimension key.
4208
+ */
4209
+ first_dimension: string;
4210
+ /**
4211
+ * Per-cell unit prices.
4212
+ */
4213
+ matrix_values: Array<MatrixWithThresholdDiscountsConfig.MatrixValue>;
4214
+ /**
4215
+ * Optional second matrix dimension key.
4216
+ */
4217
+ second_dimension?: string | null;
4218
+ threshold_discount_groups?: Array<MatrixWithThresholdDiscountsConfig.ThresholdDiscountGroup>;
4219
+ }
4220
+ namespace MatrixWithThresholdDiscountsConfig {
4221
+ interface MatrixValue {
4222
+ first_dimension_value: string;
4223
+ unit_amount: string;
4224
+ second_dimension_value?: string | null;
4225
+ }
4226
+ interface ThresholdDiscountGroup {
4227
+ /**
4228
+ * Discount rate applied to spend above the threshold.
4229
+ */
4230
+ above_threshold_discount_percentage: string;
4231
+ /**
4232
+ * Discount rate applied to spend at or below the threshold. Set to 0 for no
4233
+ * baseline discount.
4234
+ */
4235
+ below_threshold_discount_percentage: string;
4236
+ /**
4237
+ * Semicolon-separated list of matrix cell coordinates targeted by this group. Each
4238
+ * coordinate is `first,second` when the matrix has two dimensions, or just `first`
4239
+ * for a single-dimension matrix. Example: `blue,circle;green,triangle`.
4240
+ */
4241
+ cell_coordinates: string;
4242
+ threshold_amount: string;
4243
+ description?: string | null;
4244
+ }
4245
+ }
4246
+ }
4247
+ interface NewFloatingGroupedWithMinMaxThresholdsPrice {
4248
+ /**
4249
+ * The cadence to bill for this price on.
4250
+ */
4251
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
4252
+ /**
4253
+ * An ISO 4217 currency string for which this price is billed in.
4254
+ */
4255
+ currency: string;
4256
+ /**
4257
+ * Configuration for grouped_with_min_max_thresholds pricing
4258
+ */
4259
+ grouped_with_min_max_thresholds_config: NewFloatingGroupedWithMinMaxThresholdsPrice.GroupedWithMinMaxThresholdsConfig;
4260
+ /**
4261
+ * The id of the item the price will be associated with.
4262
+ */
4263
+ item_id: string;
4264
+ /**
4265
+ * The pricing model type
4266
+ */
4267
+ model_type: 'grouped_with_min_max_thresholds';
4268
+ /**
4269
+ * The name of the price.
4270
+ */
4271
+ name: string;
4272
+ /**
4273
+ * The id of the billable metric for the price. Only needed if the price is
4274
+ * usage-based.
4275
+ */
4276
+ billable_metric_id?: string | null;
4277
+ /**
4278
+ * If the Price represents a fixed cost, the price will be billed in-advance if
4279
+ * this is true, and in-arrears if this is false.
4280
+ */
4281
+ billed_in_advance?: boolean | null;
4282
+ /**
4283
+ * For custom cadence: specifies the duration of the billing period in days or
4284
+ * months.
4285
+ */
4286
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
4287
+ /**
4288
+ * The per unit conversion rate of the price currency to the invoicing currency.
4289
+ */
4290
+ conversion_rate?: number | null;
4291
+ /**
4292
+ * The configuration for the rate of the price currency to the invoicing currency.
4293
+ */
4294
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
4295
+ /**
4296
+ * For dimensional price: specifies a price group and dimension values
4297
+ */
4298
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
4299
+ /**
4300
+ * An alias for the price.
4301
+ */
4302
+ external_price_id?: string | null;
4303
+ /**
4304
+ * If the Price represents a fixed cost, this represents the quantity of units
4305
+ * applied.
4306
+ */
4307
+ fixed_price_quantity?: number | null;
4308
+ /**
4309
+ * The property used to group this price on an invoice
4310
+ */
4311
+ invoice_grouping_key?: string | null;
4312
+ /**
4313
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
4314
+ * If unspecified, a single invoice is produced per billing cycle.
4315
+ */
4316
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
4317
+ /**
4318
+ * The ID of the license type to associate with this price.
4319
+ */
4320
+ license_type_id?: string | null;
4321
+ /**
4322
+ * User-specified key/value pairs for the resource. Individual keys can be removed
4323
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
4324
+ * by setting `metadata` to `null`.
4325
+ */
4326
+ metadata?: {
4327
+ [key: string]: string | null;
4328
+ } | null;
4329
+ }
4330
+ namespace NewFloatingGroupedWithMinMaxThresholdsPrice {
4331
+ /**
4332
+ * Configuration for grouped_with_min_max_thresholds pricing
4333
+ */
4334
+ interface GroupedWithMinMaxThresholdsConfig {
4335
+ /**
4336
+ * The event property used to group before applying thresholds
4337
+ */
4338
+ grouping_key: string;
4339
+ /**
4340
+ * The maximum amount to charge each group
4341
+ */
4342
+ maximum_charge: string;
4343
+ /**
4344
+ * The minimum amount to charge each group, regardless of usage
4345
+ */
4346
+ minimum_charge: string;
4347
+ /**
4348
+ * The base price charged per group
4349
+ */
4350
+ per_unit_rate: string;
4351
+ }
4352
+ }
4353
+ interface NewFloatingCumulativeGroupedAllocationPrice {
4354
+ /**
4355
+ * The cadence to bill for this price on.
4356
+ */
4357
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
4358
+ /**
4359
+ * Configuration for cumulative_grouped_allocation pricing
4360
+ */
4361
+ cumulative_grouped_allocation_config: NewFloatingCumulativeGroupedAllocationPrice.CumulativeGroupedAllocationConfig;
4362
+ /**
4363
+ * An ISO 4217 currency string for which this price is billed in.
4364
+ */
4365
+ currency: string;
4366
+ /**
4367
+ * The id of the item the price will be associated with.
4368
+ */
4369
+ item_id: string;
4370
+ /**
4371
+ * The pricing model type
4372
+ */
4373
+ model_type: 'cumulative_grouped_allocation';
4374
+ /**
4375
+ * The name of the price.
4376
+ */
4377
+ name: string;
4378
+ /**
4379
+ * The id of the billable metric for the price. Only needed if the price is
4380
+ * usage-based.
4381
+ */
4382
+ billable_metric_id?: string | null;
4383
+ /**
4384
+ * If the Price represents a fixed cost, the price will be billed in-advance if
4385
+ * this is true, and in-arrears if this is false.
4386
+ */
4387
+ billed_in_advance?: boolean | null;
4388
+ /**
4389
+ * For custom cadence: specifies the duration of the billing period in days or
4390
+ * months.
4391
+ */
4392
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
4393
+ /**
4394
+ * The per unit conversion rate of the price currency to the invoicing currency.
4395
+ */
4396
+ conversion_rate?: number | null;
4397
+ /**
4398
+ * The configuration for the rate of the price currency to the invoicing currency.
4399
+ */
4400
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
4401
+ /**
4402
+ * For dimensional price: specifies a price group and dimension values
4403
+ */
4404
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
4405
+ /**
4406
+ * An alias for the price.
4407
+ */
4408
+ external_price_id?: string | null;
4409
+ /**
4410
+ * If the Price represents a fixed cost, this represents the quantity of units
4411
+ * applied.
4412
+ */
4413
+ fixed_price_quantity?: number | null;
4414
+ /**
4415
+ * The property used to group this price on an invoice
4416
+ */
4417
+ invoice_grouping_key?: string | null;
4418
+ /**
4419
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
4420
+ * If unspecified, a single invoice is produced per billing cycle.
4421
+ */
4422
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
4423
+ /**
4424
+ * The ID of the license type to associate with this price.
4425
+ */
4426
+ license_type_id?: string | null;
4427
+ /**
4428
+ * User-specified key/value pairs for the resource. Individual keys can be removed
4429
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
4430
+ * by setting `metadata` to `null`.
4431
+ */
4432
+ metadata?: {
4433
+ [key: string]: string | null;
4434
+ } | null;
4435
+ }
4436
+ namespace NewFloatingCumulativeGroupedAllocationPrice {
4437
+ /**
4438
+ * Configuration for cumulative_grouped_allocation pricing
4439
+ */
4440
+ interface CumulativeGroupedAllocationConfig {
4441
+ /**
4442
+ * The overall allocation across all groups
4443
+ */
4444
+ cumulative_allocation: string;
4445
+ /**
4446
+ * The allocation per individual group
4447
+ */
4448
+ group_allocation: string;
4449
+ /**
4450
+ * The event property used to group usage before applying allocations
4451
+ */
4452
+ grouping_key: string;
4453
+ /**
4454
+ * The amount to charge for each unit outside of the allocation
4455
+ */
4456
+ unit_amount: string;
4457
+ }
4458
+ }
4459
+ interface NewFloatingDailyCreditAllowancePrice {
4460
+ /**
4461
+ * The cadence to bill for this price on.
4462
+ */
4463
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
4464
+ /**
4465
+ * An ISO 4217 currency string for which this price is billed in.
4466
+ */
4467
+ currency: string;
4468
+ /**
4469
+ * Configuration for daily_credit_allowance pricing
4470
+ */
4471
+ daily_credit_allowance_config: NewFloatingDailyCreditAllowancePrice.DailyCreditAllowanceConfig;
4472
+ /**
4473
+ * The id of the item the price will be associated with.
4474
+ */
4475
+ item_id: string;
4476
+ /**
4477
+ * The pricing model type
4478
+ */
4479
+ model_type: 'daily_credit_allowance';
4480
+ /**
4481
+ * The name of the price.
4482
+ */
4483
+ name: string;
4484
+ /**
4485
+ * The id of the billable metric for the price. Only needed if the price is
4486
+ * usage-based.
4487
+ */
4488
+ billable_metric_id?: string | null;
4489
+ /**
4490
+ * If the Price represents a fixed cost, the price will be billed in-advance if
4491
+ * this is true, and in-arrears if this is false.
4492
+ */
4493
+ billed_in_advance?: boolean | null;
4494
+ /**
4495
+ * For custom cadence: specifies the duration of the billing period in days or
4496
+ * months.
4497
+ */
4498
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
4499
+ /**
4500
+ * The per unit conversion rate of the price currency to the invoicing currency.
4501
+ */
4502
+ conversion_rate?: number | null;
4503
+ /**
4504
+ * The configuration for the rate of the price currency to the invoicing currency.
4505
+ */
4506
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
4507
+ /**
4508
+ * For dimensional price: specifies a price group and dimension values
4509
+ */
4510
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
4511
+ /**
4512
+ * An alias for the price.
4513
+ */
4514
+ external_price_id?: string | null;
4515
+ /**
4516
+ * If the Price represents a fixed cost, this represents the quantity of units
4517
+ * applied.
4518
+ */
4519
+ fixed_price_quantity?: number | null;
4520
+ /**
4521
+ * The property used to group this price on an invoice
4522
+ */
4523
+ invoice_grouping_key?: string | null;
4524
+ /**
4525
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
4526
+ * If unspecified, a single invoice is produced per billing cycle.
4527
+ */
4528
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
4529
+ /**
4530
+ * The ID of the license type to associate with this price.
4531
+ */
4532
+ license_type_id?: string | null;
4533
+ /**
4534
+ * User-specified key/value pairs for the resource. Individual keys can be removed
4535
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
4536
+ * by setting `metadata` to `null`.
4537
+ */
4538
+ metadata?: {
4539
+ [key: string]: string | null;
4540
+ } | null;
4541
+ }
4542
+ namespace NewFloatingDailyCreditAllowancePrice {
4543
+ /**
4544
+ * Configuration for daily_credit_allowance pricing
4545
+ */
4546
+ interface DailyCreditAllowanceConfig {
4547
+ /**
4548
+ * Credits granted per day. Lose-it-or-use-it; does not roll over.
4549
+ */
4550
+ daily_allowance: string;
4551
+ /**
4552
+ * Default per-unit credit rate for any usage not bucketed into a specified
4553
+ * matrix_value
4554
+ */
4555
+ default_unit_amount: string;
4556
+ /**
4557
+ * One or two event property values to evaluate matrix groups by
4558
+ */
4559
+ dimensions: Array<string | null>;
4560
+ /**
4561
+ * Event property whose value identifies the day bucket the event belongs to (e.g.
4562
+ * 'event_day' set to an ISO date string in the customer's timezone). The allowance
4563
+ * resets per distinct value of this property.
4564
+ */
4565
+ event_day_property: string;
4566
+ /**
4567
+ * Per-dimension credit rates
4568
+ */
4569
+ matrix_values: Array<DailyCreditAllowanceConfig.MatrixValue>;
4570
+ }
4571
+ namespace DailyCreditAllowanceConfig {
4572
+ /**
4573
+ * Per-dimension credit price for the daily credit allowance model.
4574
+ */
4575
+ interface MatrixValue {
4576
+ /**
4577
+ * One or two matrix keys to filter usage to this value by. For example, ["model"]
4578
+ * could be used to apply a different credit rate to each AI model.
4579
+ */
4580
+ dimension_values: Array<string | null>;
4581
+ /**
4582
+ * Credits charged per unit of usage matching the specified dimension_values
4583
+ */
4584
+ unit_amount: string;
4585
+ }
4586
+ }
4587
+ }
4588
+ interface NewFloatingMeteredAllowancePrice {
4589
+ /**
4590
+ * The cadence to bill for this price on.
4591
+ */
4592
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
4593
+ /**
4594
+ * An ISO 4217 currency string for which this price is billed in.
4595
+ */
4596
+ currency: string;
4597
+ /**
4598
+ * The id of the item the price will be associated with.
4599
+ */
4600
+ item_id: string;
4601
+ /**
4602
+ * Configuration for metered_allowance pricing
4603
+ */
4604
+ metered_allowance_config: NewFloatingMeteredAllowancePrice.MeteredAllowanceConfig;
4605
+ /**
4606
+ * The pricing model type
4607
+ */
4608
+ model_type: 'metered_allowance';
4609
+ /**
4610
+ * The name of the price.
4611
+ */
4612
+ name: string;
4613
+ /**
4614
+ * The id of the billable metric for the price. Only needed if the price is
4615
+ * usage-based.
4616
+ */
4617
+ billable_metric_id?: string | null;
4618
+ /**
4619
+ * If the Price represents a fixed cost, the price will be billed in-advance if
4620
+ * this is true, and in-arrears if this is false.
4621
+ */
4622
+ billed_in_advance?: boolean | null;
4623
+ /**
4624
+ * For custom cadence: specifies the duration of the billing period in days or
4625
+ * months.
4626
+ */
4627
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
4628
+ /**
4629
+ * The per unit conversion rate of the price currency to the invoicing currency.
4630
+ */
4631
+ conversion_rate?: number | null;
4632
+ /**
4633
+ * The configuration for the rate of the price currency to the invoicing currency.
4634
+ */
4635
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
4636
+ /**
4637
+ * For dimensional price: specifies a price group and dimension values
4638
+ */
4639
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
4640
+ /**
4641
+ * An alias for the price.
4642
+ */
4643
+ external_price_id?: string | null;
4644
+ /**
4645
+ * If the Price represents a fixed cost, this represents the quantity of units
4646
+ * applied.
4647
+ */
4648
+ fixed_price_quantity?: number | null;
4649
+ /**
4650
+ * The property used to group this price on an invoice
4651
+ */
4652
+ invoice_grouping_key?: string | null;
4653
+ /**
4654
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
4655
+ * If unspecified, a single invoice is produced per billing cycle.
4656
+ */
4657
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
3540
4658
  /**
3541
- * Configuration for bulk_with_filters pricing
4659
+ * The ID of the license type to associate with this price.
3542
4660
  */
3543
- bulk_with_filters_config: NewFloatingBulkWithFiltersPrice.BulkWithFiltersConfig;
4661
+ license_type_id?: string | null;
4662
+ /**
4663
+ * User-specified key/value pairs for the resource. Individual keys can be removed
4664
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
4665
+ * by setting `metadata` to `null`.
4666
+ */
4667
+ metadata?: {
4668
+ [key: string]: string | null;
4669
+ } | null;
4670
+ }
4671
+ namespace NewFloatingMeteredAllowancePrice {
4672
+ /**
4673
+ * Configuration for metered_allowance pricing
4674
+ */
4675
+ interface MeteredAllowanceConfig {
4676
+ /**
4677
+ * The grouping_key value whose summed quantity represents the allowance for this
4678
+ * period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption
4679
+ * — credit can never exceed actual usage.
4680
+ */
4681
+ allowance_grouping_value: string;
4682
+ /**
4683
+ * The grouping_key value whose summed quantity represents consumption (e.g.
4684
+ * 'download'). Charged at unit_amount.
4685
+ */
4686
+ consumption_grouping_value: string;
4687
+ /**
4688
+ * Event property used to partition the metric into consumption and allowance
4689
+ * quantities (e.g. 'event_name'). The metric is queried with this key and the two
4690
+ * values below select which partition is which.
4691
+ */
4692
+ grouping_key: string;
4693
+ /**
4694
+ * Per-unit price applied to gross consumption and to the allowance credit.
4695
+ */
4696
+ unit_amount: string;
4697
+ /**
4698
+ * Sub-line label for the credit row (e.g. 'Up to 3x free egress').
4699
+ */
4700
+ allowance_display_name?: string;
4701
+ /**
4702
+ * Sub-line label for the gross consumption row (e.g. 'bytes gotten').
4703
+ */
4704
+ consumption_display_name?: string;
4705
+ }
4706
+ }
4707
+ interface NewFloatingPercentCompositePrice {
3544
4708
  /**
3545
4709
  * The cadence to bill for this price on.
3546
4710
  */
@@ -3556,11 +4720,15 @@ export declare namespace PriceEvaluateMultipleParams {
3556
4720
  /**
3557
4721
  * The pricing model type
3558
4722
  */
3559
- model_type: 'bulk_with_filters';
4723
+ model_type: 'percent';
3560
4724
  /**
3561
4725
  * The name of the price.
3562
4726
  */
3563
4727
  name: string;
4728
+ /**
4729
+ * Configuration for percent pricing
4730
+ */
4731
+ percent_config: NewFloatingPercentCompositePrice.PercentConfig;
3564
4732
  /**
3565
4733
  * The id of the billable metric for the price. Only needed if the price is
3566
4734
  * usage-based.
@@ -3619,50 +4787,32 @@ export declare namespace PriceEvaluateMultipleParams {
3619
4787
  [key: string]: string | null;
3620
4788
  } | null;
3621
4789
  }
3622
- namespace NewFloatingBulkWithFiltersPrice {
4790
+ namespace NewFloatingPercentCompositePrice {
3623
4791
  /**
3624
- * Configuration for bulk_with_filters pricing
4792
+ * Configuration for percent pricing
3625
4793
  */
3626
- interface BulkWithFiltersConfig {
4794
+ interface PercentConfig {
3627
4795
  /**
3628
- * Property filters to apply (all must match)
4796
+ * Fraction of the component subtotals to charge (0 < percent <= 1).
3629
4797
  */
3630
- filters: Array<BulkWithFiltersConfig.Filter>;
4798
+ percent: number;
3631
4799
  /**
3632
- * Bulk tiers for rating based on total usage volume
4800
+ * Maximum amount to charge. If unset, the fee has no upper bound.
3633
4801
  */
3634
- tiers: Array<BulkWithFiltersConfig.Tier>;
3635
- }
3636
- namespace BulkWithFiltersConfig {
4802
+ maximum_amount?: string | null;
3637
4803
  /**
3638
- * Configuration for a single property filter
4804
+ * Minimum amount to charge. If unset, the fee is bounded below by 0.
3639
4805
  */
3640
- interface Filter {
3641
- /**
3642
- * Event property key to filter on
3643
- */
3644
- property_key: string;
3645
- /**
3646
- * Event property value to match
3647
- */
3648
- property_value: string;
3649
- }
4806
+ minimum_amount?: string | null;
3650
4807
  /**
3651
- * Configuration for a single bulk pricing tier
4808
+ * If true, the minimum_amount is prorated based on the service period. The
4809
+ * maximum_amount is an absolute cap (never prorated), and the percent applied to
4810
+ * upstream subtotals is never prorated either.
3652
4811
  */
3653
- interface Tier {
3654
- /**
3655
- * Amount per unit
3656
- */
3657
- unit_amount: string;
3658
- /**
3659
- * The lower bound for this tier
3660
- */
3661
- tier_lower_bound?: string | null;
3662
- }
4812
+ prorated?: boolean;
3663
4813
  }
3664
4814
  }
3665
- interface NewFloatingGroupedWithMinMaxThresholdsPrice {
4815
+ interface NewFloatingEventOutputPrice {
3666
4816
  /**
3667
4817
  * The cadence to bill for this price on.
3668
4818
  */
@@ -3672,9 +4822,9 @@ export declare namespace PriceEvaluateMultipleParams {
3672
4822
  */
3673
4823
  currency: string;
3674
4824
  /**
3675
- * Configuration for grouped_with_min_max_thresholds pricing
4825
+ * Configuration for event_output pricing
3676
4826
  */
3677
- grouped_with_min_max_thresholds_config: NewFloatingGroupedWithMinMaxThresholdsPrice.GroupedWithMinMaxThresholdsConfig;
4827
+ event_output_config: NewFloatingEventOutputPrice.EventOutputConfig;
3678
4828
  /**
3679
4829
  * The id of the item the price will be associated with.
3680
4830
  */
@@ -3682,7 +4832,7 @@ export declare namespace PriceEvaluateMultipleParams {
3682
4832
  /**
3683
4833
  * The pricing model type
3684
4834
  */
3685
- model_type: 'grouped_with_min_max_thresholds';
4835
+ model_type: 'event_output';
3686
4836
  /**
3687
4837
  * The name of the price.
3688
4838
  */
@@ -3745,38 +4895,128 @@ export declare namespace PriceEvaluateMultipleParams {
3745
4895
  [key: string]: string | null;
3746
4896
  } | null;
3747
4897
  }
3748
- namespace NewFloatingGroupedWithMinMaxThresholdsPrice {
4898
+ namespace NewFloatingEventOutputPrice {
3749
4899
  /**
3750
- * Configuration for grouped_with_min_max_thresholds pricing
4900
+ * Configuration for event_output pricing
3751
4901
  */
3752
- interface GroupedWithMinMaxThresholdsConfig {
3753
- /**
3754
- * The event property used to group before applying thresholds
3755
- */
3756
- grouping_key: string;
4902
+ interface EventOutputConfig {
3757
4903
  /**
3758
- * The maximum amount to charge each group
4904
+ * The key in the event data to extract the unit rate from.
3759
4905
  */
3760
- maximum_charge: string;
4906
+ unit_rating_key: string;
3761
4907
  /**
3762
- * The minimum amount to charge each group, regardless of usage
4908
+ * If provided, this amount will be used as the unit rate when an event does not
4909
+ * have a value for the `unit_rating_key`. If not provided, events missing a unit
4910
+ * rate will be ignored.
3763
4911
  */
3764
- minimum_charge: string;
4912
+ default_unit_rate?: string | null;
3765
4913
  /**
3766
- * The base price charged per group
4914
+ * An optional key in the event data to group by (e.g., event ID). All events will
4915
+ * also be grouped by their unit rate.
3767
4916
  */
3768
- per_unit_rate: string;
4917
+ grouping_key?: string | null;
3769
4918
  }
3770
4919
  }
3771
- interface NewFloatingCumulativeGroupedAllocationPrice {
4920
+ }
4921
+ }
4922
+ export interface PriceEvaluatePreviewEventsParams {
4923
+ /**
4924
+ * The exclusive upper bound for event timestamps
4925
+ */
4926
+ timeframe_end: string;
4927
+ /**
4928
+ * The inclusive lower bound for event timestamps
4929
+ */
4930
+ timeframe_start: string;
4931
+ /**
4932
+ * The ID of the customer to which this evaluation is scoped.
4933
+ */
4934
+ customer_id?: string | null;
4935
+ /**
4936
+ * List of preview events to use instead of actual usage data
4937
+ */
4938
+ events?: Array<PriceEvaluatePreviewEventsParams.Event>;
4939
+ /**
4940
+ * The external customer ID of the customer to which this evaluation is scoped.
4941
+ */
4942
+ external_customer_id?: string | null;
4943
+ /**
4944
+ * List of prices to evaluate (max 100)
4945
+ */
4946
+ price_evaluations?: Array<PriceEvaluatePreviewEventsParams.PriceEvaluation>;
4947
+ }
4948
+ export declare namespace PriceEvaluatePreviewEventsParams {
4949
+ interface Event {
4950
+ /**
4951
+ * A name to meaningfully identify the action or event type.
4952
+ */
4953
+ event_name: string;
4954
+ /**
4955
+ * A dictionary of custom properties. Values in this dictionary must be numeric,
4956
+ * boolean, or strings. Nested dictionaries are disallowed.
4957
+ */
4958
+ properties: {
4959
+ [key: string]: unknown;
4960
+ };
4961
+ /**
4962
+ * An ISO 8601 format date with no timezone offset (i.e. UTC). This should
4963
+ * represent the time that usage was recorded, and is particularly important to
4964
+ * attribute usage to a given billing period.
4965
+ */
4966
+ timestamp: string;
4967
+ /**
4968
+ * The Orb Customer identifier
4969
+ */
4970
+ customer_id?: string | null;
4971
+ /**
4972
+ * An alias for the Orb customer, whose mapping is specified when creating the
4973
+ * customer
4974
+ */
4975
+ external_customer_id?: string | null;
4976
+ }
4977
+ interface PriceEvaluation {
4978
+ /**
4979
+ * The external ID of a price to evaluate that exists in your Orb account.
4980
+ */
4981
+ external_price_id?: string | null;
4982
+ /**
4983
+ * A boolean
4984
+ * [computed property](/extensibility/advanced-metrics#computed-properties) used to
4985
+ * filter the underlying billable metric
4986
+ */
4987
+ filter?: string | null;
4988
+ /**
4989
+ * Properties (or
4990
+ * [computed properties](/extensibility/advanced-metrics#computed-properties)) used
4991
+ * to group the underlying billable metric
4992
+ */
4993
+ grouping_keys?: Array<string>;
4994
+ /**
4995
+ * Optional overrides for parameterized billable metric parameters. If the metric
4996
+ * has parameter definitions and no overrides are provided, defaults will be used.
4997
+ */
4998
+ metric_parameter_overrides?: {
4999
+ [key: string]: unknown;
5000
+ } | null;
5001
+ /**
5002
+ * New floating price request body params.
5003
+ */
5004
+ price?: Shared.NewFloatingUnitPrice | Shared.NewFloatingTieredPrice | Shared.NewFloatingBulkPrice | PriceEvaluation.NewFloatingBulkWithFiltersPrice | Shared.NewFloatingPackagePrice | Shared.NewFloatingMatrixPrice | Shared.NewFloatingThresholdTotalAmountPrice | Shared.NewFloatingTieredPackagePrice | Shared.NewFloatingTieredWithMinimumPrice | Shared.NewFloatingGroupedTieredPrice | Shared.NewFloatingTieredPackageWithMinimumPrice | Shared.NewFloatingPackageWithAllocationPrice | Shared.NewFloatingUnitWithPercentPrice | Shared.NewFloatingMatrixWithAllocationPrice | PriceEvaluation.NewFloatingMatrixWithThresholdDiscountsPrice | Shared.NewFloatingTieredWithProrationPrice | Shared.NewFloatingUnitWithProrationPrice | Shared.NewFloatingGroupedAllocationPrice | Shared.NewFloatingBulkWithProrationPrice | Shared.NewFloatingGroupedWithProratedMinimumPrice | Shared.NewFloatingGroupedWithMeteredMinimumPrice | PriceEvaluation.NewFloatingGroupedWithMinMaxThresholdsPrice | Shared.NewFloatingMatrixWithDisplayNamePrice | Shared.NewFloatingGroupedTieredPackagePrice | Shared.NewFloatingMaxGroupTieredPackagePrice | Shared.NewFloatingScalableMatrixWithUnitPricingPrice | Shared.NewFloatingScalableMatrixWithTieredPricingPrice | Shared.NewFloatingCumulativeGroupedBulkPrice | PriceEvaluation.NewFloatingCumulativeGroupedAllocationPrice | PriceEvaluation.NewFloatingDailyCreditAllowancePrice | PriceEvaluation.NewFloatingMeteredAllowancePrice | Shared.NewFloatingMinimumCompositePrice | PriceEvaluation.NewFloatingPercentCompositePrice | PriceEvaluation.NewFloatingEventOutputPrice | null;
5005
+ /**
5006
+ * The ID of a price to evaluate that exists in your Orb account.
5007
+ */
5008
+ price_id?: string | null;
5009
+ }
5010
+ namespace PriceEvaluation {
5011
+ interface NewFloatingBulkWithFiltersPrice {
3772
5012
  /**
3773
- * The cadence to bill for this price on.
5013
+ * Configuration for bulk_with_filters pricing
3774
5014
  */
3775
- cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
5015
+ bulk_with_filters_config: NewFloatingBulkWithFiltersPrice.BulkWithFiltersConfig;
3776
5016
  /**
3777
- * Configuration for cumulative_grouped_allocation pricing
5017
+ * The cadence to bill for this price on.
3778
5018
  */
3779
- cumulative_grouped_allocation_config: NewFloatingCumulativeGroupedAllocationPrice.CumulativeGroupedAllocationConfig;
5019
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
3780
5020
  /**
3781
5021
  * An ISO 4217 currency string for which this price is billed in.
3782
5022
  */
@@ -3788,7 +5028,7 @@ export declare namespace PriceEvaluateMultipleParams {
3788
5028
  /**
3789
5029
  * The pricing model type
3790
5030
  */
3791
- model_type: 'cumulative_grouped_allocation';
5031
+ model_type: 'bulk_with_filters';
3792
5032
  /**
3793
5033
  * The name of the price.
3794
5034
  */
@@ -3851,30 +5091,50 @@ export declare namespace PriceEvaluateMultipleParams {
3851
5091
  [key: string]: string | null;
3852
5092
  } | null;
3853
5093
  }
3854
- namespace NewFloatingCumulativeGroupedAllocationPrice {
5094
+ namespace NewFloatingBulkWithFiltersPrice {
3855
5095
  /**
3856
- * Configuration for cumulative_grouped_allocation pricing
5096
+ * Configuration for bulk_with_filters pricing
3857
5097
  */
3858
- interface CumulativeGroupedAllocationConfig {
5098
+ interface BulkWithFiltersConfig {
3859
5099
  /**
3860
- * The overall allocation across all groups
5100
+ * Property filters to apply (all must match)
3861
5101
  */
3862
- cumulative_allocation: string;
5102
+ filters: Array<BulkWithFiltersConfig.Filter>;
3863
5103
  /**
3864
- * The allocation per individual group
5104
+ * Bulk tiers for rating based on total usage volume
3865
5105
  */
3866
- group_allocation: string;
5106
+ tiers: Array<BulkWithFiltersConfig.Tier>;
5107
+ }
5108
+ namespace BulkWithFiltersConfig {
3867
5109
  /**
3868
- * The event property used to group usage before applying allocations
5110
+ * Configuration for a single property filter
3869
5111
  */
3870
- grouping_key: string;
5112
+ interface Filter {
5113
+ /**
5114
+ * Event property key to filter on
5115
+ */
5116
+ property_key: string;
5117
+ /**
5118
+ * Event property value to match
5119
+ */
5120
+ property_value: string;
5121
+ }
3871
5122
  /**
3872
- * The amount to charge for each unit outside of the allocation
5123
+ * Configuration for a single bulk pricing tier
3873
5124
  */
3874
- unit_amount: string;
5125
+ interface Tier {
5126
+ /**
5127
+ * Amount per unit
5128
+ */
5129
+ unit_amount: string;
5130
+ /**
5131
+ * The lower bound for this tier
5132
+ */
5133
+ tier_lower_bound?: string | null;
5134
+ }
3875
5135
  }
3876
5136
  }
3877
- interface NewFloatingPercentCompositePrice {
5137
+ interface NewFloatingMatrixWithThresholdDiscountsPrice {
3878
5138
  /**
3879
5139
  * The cadence to bill for this price on.
3880
5140
  */
@@ -3886,19 +5146,19 @@ export declare namespace PriceEvaluateMultipleParams {
3886
5146
  /**
3887
5147
  * The id of the item the price will be associated with.
3888
5148
  */
3889
- item_id: string;
5149
+ item_id: string;
5150
+ /**
5151
+ * Configuration for matrix_with_threshold_discounts pricing
5152
+ */
5153
+ matrix_with_threshold_discounts_config: NewFloatingMatrixWithThresholdDiscountsPrice.MatrixWithThresholdDiscountsConfig;
3890
5154
  /**
3891
5155
  * The pricing model type
3892
5156
  */
3893
- model_type: 'percent';
5157
+ model_type: 'matrix_with_threshold_discounts';
3894
5158
  /**
3895
5159
  * The name of the price.
3896
5160
  */
3897
5161
  name: string;
3898
- /**
3899
- * Configuration for percent pricing
3900
- */
3901
- percent_config: NewFloatingPercentCompositePrice.PercentConfig;
3902
5162
  /**
3903
5163
  * The id of the billable metric for the price. Only needed if the price is
3904
5164
  * usage-based.
@@ -3957,18 +5217,57 @@ export declare namespace PriceEvaluateMultipleParams {
3957
5217
  [key: string]: string | null;
3958
5218
  } | null;
3959
5219
  }
3960
- namespace NewFloatingPercentCompositePrice {
5220
+ namespace NewFloatingMatrixWithThresholdDiscountsPrice {
3961
5221
  /**
3962
- * Configuration for percent pricing
5222
+ * Configuration for matrix_with_threshold_discounts pricing
3963
5223
  */
3964
- interface PercentConfig {
5224
+ interface MatrixWithThresholdDiscountsConfig {
3965
5225
  /**
3966
- * What percent of the component subtotals to charge
5226
+ * Unit price used for usage that does not match any defined matrix cell.
3967
5227
  */
3968
- percent: number;
5228
+ default_unit_amount: string;
5229
+ /**
5230
+ * First matrix dimension key.
5231
+ */
5232
+ first_dimension: string;
5233
+ /**
5234
+ * Per-cell unit prices.
5235
+ */
5236
+ matrix_values: Array<MatrixWithThresholdDiscountsConfig.MatrixValue>;
5237
+ /**
5238
+ * Optional second matrix dimension key.
5239
+ */
5240
+ second_dimension?: string | null;
5241
+ threshold_discount_groups?: Array<MatrixWithThresholdDiscountsConfig.ThresholdDiscountGroup>;
5242
+ }
5243
+ namespace MatrixWithThresholdDiscountsConfig {
5244
+ interface MatrixValue {
5245
+ first_dimension_value: string;
5246
+ unit_amount: string;
5247
+ second_dimension_value?: string | null;
5248
+ }
5249
+ interface ThresholdDiscountGroup {
5250
+ /**
5251
+ * Discount rate applied to spend above the threshold.
5252
+ */
5253
+ above_threshold_discount_percentage: string;
5254
+ /**
5255
+ * Discount rate applied to spend at or below the threshold. Set to 0 for no
5256
+ * baseline discount.
5257
+ */
5258
+ below_threshold_discount_percentage: string;
5259
+ /**
5260
+ * Semicolon-separated list of matrix cell coordinates targeted by this group. Each
5261
+ * coordinate is `first,second` when the matrix has two dimensions, or just `first`
5262
+ * for a single-dimension matrix. Example: `blue,circle;green,triangle`.
5263
+ */
5264
+ cell_coordinates: string;
5265
+ threshold_amount: string;
5266
+ description?: string | null;
5267
+ }
3969
5268
  }
3970
5269
  }
3971
- interface NewFloatingEventOutputPrice {
5270
+ interface NewFloatingGroupedWithMinMaxThresholdsPrice {
3972
5271
  /**
3973
5272
  * The cadence to bill for this price on.
3974
5273
  */
@@ -3978,9 +5277,9 @@ export declare namespace PriceEvaluateMultipleParams {
3978
5277
  */
3979
5278
  currency: string;
3980
5279
  /**
3981
- * Configuration for event_output pricing
5280
+ * Configuration for grouped_with_min_max_thresholds pricing
3982
5281
  */
3983
- event_output_config: NewFloatingEventOutputPrice.EventOutputConfig;
5282
+ grouped_with_min_max_thresholds_config: NewFloatingGroupedWithMinMaxThresholdsPrice.GroupedWithMinMaxThresholdsConfig;
3984
5283
  /**
3985
5284
  * The id of the item the price will be associated with.
3986
5285
  */
@@ -3988,7 +5287,7 @@ export declare namespace PriceEvaluateMultipleParams {
3988
5287
  /**
3989
5288
  * The pricing model type
3990
5289
  */
3991
- model_type: 'event_output';
5290
+ model_type: 'grouped_with_min_max_thresholds';
3992
5291
  /**
3993
5292
  * The name of the price.
3994
5293
  */
@@ -4051,128 +5350,38 @@ export declare namespace PriceEvaluateMultipleParams {
4051
5350
  [key: string]: string | null;
4052
5351
  } | null;
4053
5352
  }
4054
- namespace NewFloatingEventOutputPrice {
5353
+ namespace NewFloatingGroupedWithMinMaxThresholdsPrice {
4055
5354
  /**
4056
- * Configuration for event_output pricing
5355
+ * Configuration for grouped_with_min_max_thresholds pricing
4057
5356
  */
4058
- interface EventOutputConfig {
5357
+ interface GroupedWithMinMaxThresholdsConfig {
4059
5358
  /**
4060
- * The key in the event data to extract the unit rate from.
5359
+ * The event property used to group before applying thresholds
4061
5360
  */
4062
- unit_rating_key: string;
5361
+ grouping_key: string;
4063
5362
  /**
4064
- * If provided, this amount will be used as the unit rate when an event does not
4065
- * have a value for the `unit_rating_key`. If not provided, events missing a unit
4066
- * rate will be ignored.
5363
+ * The maximum amount to charge each group
4067
5364
  */
4068
- default_unit_rate?: string | null;
5365
+ maximum_charge: string;
4069
5366
  /**
4070
- * An optional key in the event data to group by (e.g., event ID). All events will
4071
- * also be grouped by their unit rate.
5367
+ * The minimum amount to charge each group, regardless of usage
4072
5368
  */
4073
- grouping_key?: string | null;
5369
+ minimum_charge: string;
5370
+ /**
5371
+ * The base price charged per group
5372
+ */
5373
+ per_unit_rate: string;
4074
5374
  }
4075
5375
  }
4076
- }
4077
- }
4078
- export interface PriceEvaluatePreviewEventsParams {
4079
- /**
4080
- * The exclusive upper bound for event timestamps
4081
- */
4082
- timeframe_end: string;
4083
- /**
4084
- * The inclusive lower bound for event timestamps
4085
- */
4086
- timeframe_start: string;
4087
- /**
4088
- * The ID of the customer to which this evaluation is scoped.
4089
- */
4090
- customer_id?: string | null;
4091
- /**
4092
- * List of preview events to use instead of actual usage data
4093
- */
4094
- events?: Array<PriceEvaluatePreviewEventsParams.Event>;
4095
- /**
4096
- * The external customer ID of the customer to which this evaluation is scoped.
4097
- */
4098
- external_customer_id?: string | null;
4099
- /**
4100
- * List of prices to evaluate (max 100)
4101
- */
4102
- price_evaluations?: Array<PriceEvaluatePreviewEventsParams.PriceEvaluation>;
4103
- }
4104
- export declare namespace PriceEvaluatePreviewEventsParams {
4105
- interface Event {
4106
- /**
4107
- * A name to meaningfully identify the action or event type.
4108
- */
4109
- event_name: string;
4110
- /**
4111
- * A dictionary of custom properties. Values in this dictionary must be numeric,
4112
- * boolean, or strings. Nested dictionaries are disallowed.
4113
- */
4114
- properties: {
4115
- [key: string]: unknown;
4116
- };
4117
- /**
4118
- * An ISO 8601 format date with no timezone offset (i.e. UTC). This should
4119
- * represent the time that usage was recorded, and is particularly important to
4120
- * attribute usage to a given billing period.
4121
- */
4122
- timestamp: string;
4123
- /**
4124
- * The Orb Customer identifier
4125
- */
4126
- customer_id?: string | null;
4127
- /**
4128
- * An alias for the Orb customer, whose mapping is specified when creating the
4129
- * customer
4130
- */
4131
- external_customer_id?: string | null;
4132
- }
4133
- interface PriceEvaluation {
4134
- /**
4135
- * The external ID of a price to evaluate that exists in your Orb account.
4136
- */
4137
- external_price_id?: string | null;
4138
- /**
4139
- * A boolean
4140
- * [computed property](/extensibility/advanced-metrics#computed-properties) used to
4141
- * filter the underlying billable metric
4142
- */
4143
- filter?: string | null;
4144
- /**
4145
- * Properties (or
4146
- * [computed properties](/extensibility/advanced-metrics#computed-properties)) used
4147
- * to group the underlying billable metric
4148
- */
4149
- grouping_keys?: Array<string>;
4150
- /**
4151
- * Optional overrides for parameterized billable metric parameters. If the metric
4152
- * has parameter definitions and no overrides are provided, defaults will be used.
4153
- */
4154
- metric_parameter_overrides?: {
4155
- [key: string]: unknown;
4156
- } | null;
4157
- /**
4158
- * New floating price request body params.
4159
- */
4160
- price?: Shared.NewFloatingUnitPrice | Shared.NewFloatingTieredPrice | Shared.NewFloatingBulkPrice | PriceEvaluation.NewFloatingBulkWithFiltersPrice | Shared.NewFloatingPackagePrice | Shared.NewFloatingMatrixPrice | Shared.NewFloatingThresholdTotalAmountPrice | Shared.NewFloatingTieredPackagePrice | Shared.NewFloatingTieredWithMinimumPrice | Shared.NewFloatingGroupedTieredPrice | Shared.NewFloatingTieredPackageWithMinimumPrice | Shared.NewFloatingPackageWithAllocationPrice | Shared.NewFloatingUnitWithPercentPrice | Shared.NewFloatingMatrixWithAllocationPrice | Shared.NewFloatingTieredWithProrationPrice | Shared.NewFloatingUnitWithProrationPrice | Shared.NewFloatingGroupedAllocationPrice | Shared.NewFloatingBulkWithProrationPrice | Shared.NewFloatingGroupedWithProratedMinimumPrice | Shared.NewFloatingGroupedWithMeteredMinimumPrice | PriceEvaluation.NewFloatingGroupedWithMinMaxThresholdsPrice | Shared.NewFloatingMatrixWithDisplayNamePrice | Shared.NewFloatingGroupedTieredPackagePrice | Shared.NewFloatingMaxGroupTieredPackagePrice | Shared.NewFloatingScalableMatrixWithUnitPricingPrice | Shared.NewFloatingScalableMatrixWithTieredPricingPrice | Shared.NewFloatingCumulativeGroupedBulkPrice | PriceEvaluation.NewFloatingCumulativeGroupedAllocationPrice | Shared.NewFloatingMinimumCompositePrice | PriceEvaluation.NewFloatingPercentCompositePrice | PriceEvaluation.NewFloatingEventOutputPrice | null;
4161
- /**
4162
- * The ID of a price to evaluate that exists in your Orb account.
4163
- */
4164
- price_id?: string | null;
4165
- }
4166
- namespace PriceEvaluation {
4167
- interface NewFloatingBulkWithFiltersPrice {
4168
- /**
4169
- * Configuration for bulk_with_filters pricing
4170
- */
4171
- bulk_with_filters_config: NewFloatingBulkWithFiltersPrice.BulkWithFiltersConfig;
5376
+ interface NewFloatingCumulativeGroupedAllocationPrice {
4172
5377
  /**
4173
5378
  * The cadence to bill for this price on.
4174
5379
  */
4175
5380
  cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
5381
+ /**
5382
+ * Configuration for cumulative_grouped_allocation pricing
5383
+ */
5384
+ cumulative_grouped_allocation_config: NewFloatingCumulativeGroupedAllocationPrice.CumulativeGroupedAllocationConfig;
4176
5385
  /**
4177
5386
  * An ISO 4217 currency string for which this price is billed in.
4178
5387
  */
@@ -4184,7 +5393,7 @@ export declare namespace PriceEvaluatePreviewEventsParams {
4184
5393
  /**
4185
5394
  * The pricing model type
4186
5395
  */
4187
- model_type: 'bulk_with_filters';
5396
+ model_type: 'cumulative_grouped_allocation';
4188
5397
  /**
4189
5398
  * The name of the price.
4190
5399
  */
@@ -4247,50 +5456,30 @@ export declare namespace PriceEvaluatePreviewEventsParams {
4247
5456
  [key: string]: string | null;
4248
5457
  } | null;
4249
5458
  }
4250
- namespace NewFloatingBulkWithFiltersPrice {
5459
+ namespace NewFloatingCumulativeGroupedAllocationPrice {
4251
5460
  /**
4252
- * Configuration for bulk_with_filters pricing
5461
+ * Configuration for cumulative_grouped_allocation pricing
4253
5462
  */
4254
- interface BulkWithFiltersConfig {
5463
+ interface CumulativeGroupedAllocationConfig {
4255
5464
  /**
4256
- * Property filters to apply (all must match)
5465
+ * The overall allocation across all groups
4257
5466
  */
4258
- filters: Array<BulkWithFiltersConfig.Filter>;
5467
+ cumulative_allocation: string;
4259
5468
  /**
4260
- * Bulk tiers for rating based on total usage volume
5469
+ * The allocation per individual group
4261
5470
  */
4262
- tiers: Array<BulkWithFiltersConfig.Tier>;
4263
- }
4264
- namespace BulkWithFiltersConfig {
5471
+ group_allocation: string;
4265
5472
  /**
4266
- * Configuration for a single property filter
5473
+ * The event property used to group usage before applying allocations
4267
5474
  */
4268
- interface Filter {
4269
- /**
4270
- * Event property key to filter on
4271
- */
4272
- property_key: string;
4273
- /**
4274
- * Event property value to match
4275
- */
4276
- property_value: string;
4277
- }
5475
+ grouping_key: string;
4278
5476
  /**
4279
- * Configuration for a single bulk pricing tier
5477
+ * The amount to charge for each unit outside of the allocation
4280
5478
  */
4281
- interface Tier {
4282
- /**
4283
- * Amount per unit
4284
- */
4285
- unit_amount: string;
4286
- /**
4287
- * The lower bound for this tier
4288
- */
4289
- tier_lower_bound?: string | null;
4290
- }
5479
+ unit_amount: string;
4291
5480
  }
4292
5481
  }
4293
- interface NewFloatingGroupedWithMinMaxThresholdsPrice {
5482
+ interface NewFloatingDailyCreditAllowancePrice {
4294
5483
  /**
4295
5484
  * The cadence to bill for this price on.
4296
5485
  */
@@ -4300,9 +5489,9 @@ export declare namespace PriceEvaluatePreviewEventsParams {
4300
5489
  */
4301
5490
  currency: string;
4302
5491
  /**
4303
- * Configuration for grouped_with_min_max_thresholds pricing
5492
+ * Configuration for daily_credit_allowance pricing
4304
5493
  */
4305
- grouped_with_min_max_thresholds_config: NewFloatingGroupedWithMinMaxThresholdsPrice.GroupedWithMinMaxThresholdsConfig;
5494
+ daily_credit_allowance_config: NewFloatingDailyCreditAllowancePrice.DailyCreditAllowanceConfig;
4306
5495
  /**
4307
5496
  * The id of the item the price will be associated with.
4308
5497
  */
@@ -4310,7 +5499,7 @@ export declare namespace PriceEvaluatePreviewEventsParams {
4310
5499
  /**
4311
5500
  * The pricing model type
4312
5501
  */
4313
- model_type: 'grouped_with_min_max_thresholds';
5502
+ model_type: 'daily_credit_allowance';
4314
5503
  /**
4315
5504
  * The name of the price.
4316
5505
  */
@@ -4373,38 +5562,57 @@ export declare namespace PriceEvaluatePreviewEventsParams {
4373
5562
  [key: string]: string | null;
4374
5563
  } | null;
4375
5564
  }
4376
- namespace NewFloatingGroupedWithMinMaxThresholdsPrice {
5565
+ namespace NewFloatingDailyCreditAllowancePrice {
4377
5566
  /**
4378
- * Configuration for grouped_with_min_max_thresholds pricing
5567
+ * Configuration for daily_credit_allowance pricing
4379
5568
  */
4380
- interface GroupedWithMinMaxThresholdsConfig {
5569
+ interface DailyCreditAllowanceConfig {
4381
5570
  /**
4382
- * The event property used to group before applying thresholds
5571
+ * Credits granted per day. Lose-it-or-use-it; does not roll over.
4383
5572
  */
4384
- grouping_key: string;
5573
+ daily_allowance: string;
4385
5574
  /**
4386
- * The maximum amount to charge each group
5575
+ * Default per-unit credit rate for any usage not bucketed into a specified
5576
+ * matrix_value
4387
5577
  */
4388
- maximum_charge: string;
5578
+ default_unit_amount: string;
4389
5579
  /**
4390
- * The minimum amount to charge each group, regardless of usage
5580
+ * One or two event property values to evaluate matrix groups by
4391
5581
  */
4392
- minimum_charge: string;
5582
+ dimensions: Array<string | null>;
4393
5583
  /**
4394
- * The base price charged per group
5584
+ * Event property whose value identifies the day bucket the event belongs to (e.g.
5585
+ * 'event_day' set to an ISO date string in the customer's timezone). The allowance
5586
+ * resets per distinct value of this property.
4395
5587
  */
4396
- per_unit_rate: string;
5588
+ event_day_property: string;
5589
+ /**
5590
+ * Per-dimension credit rates
5591
+ */
5592
+ matrix_values: Array<DailyCreditAllowanceConfig.MatrixValue>;
5593
+ }
5594
+ namespace DailyCreditAllowanceConfig {
5595
+ /**
5596
+ * Per-dimension credit price for the daily credit allowance model.
5597
+ */
5598
+ interface MatrixValue {
5599
+ /**
5600
+ * One or two matrix keys to filter usage to this value by. For example, ["model"]
5601
+ * could be used to apply a different credit rate to each AI model.
5602
+ */
5603
+ dimension_values: Array<string | null>;
5604
+ /**
5605
+ * Credits charged per unit of usage matching the specified dimension_values
5606
+ */
5607
+ unit_amount: string;
5608
+ }
4397
5609
  }
4398
5610
  }
4399
- interface NewFloatingCumulativeGroupedAllocationPrice {
5611
+ interface NewFloatingMeteredAllowancePrice {
4400
5612
  /**
4401
5613
  * The cadence to bill for this price on.
4402
5614
  */
4403
5615
  cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
4404
- /**
4405
- * Configuration for cumulative_grouped_allocation pricing
4406
- */
4407
- cumulative_grouped_allocation_config: NewFloatingCumulativeGroupedAllocationPrice.CumulativeGroupedAllocationConfig;
4408
5616
  /**
4409
5617
  * An ISO 4217 currency string for which this price is billed in.
4410
5618
  */
@@ -4413,10 +5621,14 @@ export declare namespace PriceEvaluatePreviewEventsParams {
4413
5621
  * The id of the item the price will be associated with.
4414
5622
  */
4415
5623
  item_id: string;
5624
+ /**
5625
+ * Configuration for metered_allowance pricing
5626
+ */
5627
+ metered_allowance_config: NewFloatingMeteredAllowancePrice.MeteredAllowanceConfig;
4416
5628
  /**
4417
5629
  * The pricing model type
4418
5630
  */
4419
- model_type: 'cumulative_grouped_allocation';
5631
+ model_type: 'metered_allowance';
4420
5632
  /**
4421
5633
  * The name of the price.
4422
5634
  */
@@ -4479,27 +5691,40 @@ export declare namespace PriceEvaluatePreviewEventsParams {
4479
5691
  [key: string]: string | null;
4480
5692
  } | null;
4481
5693
  }
4482
- namespace NewFloatingCumulativeGroupedAllocationPrice {
5694
+ namespace NewFloatingMeteredAllowancePrice {
4483
5695
  /**
4484
- * Configuration for cumulative_grouped_allocation pricing
5696
+ * Configuration for metered_allowance pricing
4485
5697
  */
4486
- interface CumulativeGroupedAllocationConfig {
5698
+ interface MeteredAllowanceConfig {
4487
5699
  /**
4488
- * The overall allocation across all groups
5700
+ * The grouping_key value whose summed quantity represents the allowance for this
5701
+ * period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption
5702
+ * — credit can never exceed actual usage.
4489
5703
  */
4490
- cumulative_allocation: string;
5704
+ allowance_grouping_value: string;
4491
5705
  /**
4492
- * The allocation per individual group
5706
+ * The grouping_key value whose summed quantity represents consumption (e.g.
5707
+ * 'download'). Charged at unit_amount.
4493
5708
  */
4494
- group_allocation: string;
5709
+ consumption_grouping_value: string;
4495
5710
  /**
4496
- * The event property used to group usage before applying allocations
5711
+ * Event property used to partition the metric into consumption and allowance
5712
+ * quantities (e.g. 'event_name'). The metric is queried with this key and the two
5713
+ * values below select which partition is which.
4497
5714
  */
4498
5715
  grouping_key: string;
4499
5716
  /**
4500
- * The amount to charge for each unit outside of the allocation
5717
+ * Per-unit price applied to gross consumption and to the allowance credit.
4501
5718
  */
4502
5719
  unit_amount: string;
5720
+ /**
5721
+ * Sub-line label for the credit row (e.g. 'Up to 3x free egress').
5722
+ */
5723
+ allowance_display_name?: string;
5724
+ /**
5725
+ * Sub-line label for the gross consumption row (e.g. 'bytes gotten').
5726
+ */
5727
+ consumption_display_name?: string;
4503
5728
  }
4504
5729
  }
4505
5730
  interface NewFloatingPercentCompositePrice {
@@ -4591,9 +5816,23 @@ export declare namespace PriceEvaluatePreviewEventsParams {
4591
5816
  */
4592
5817
  interface PercentConfig {
4593
5818
  /**
4594
- * What percent of the component subtotals to charge
5819
+ * Fraction of the component subtotals to charge (0 < percent <= 1).
4595
5820
  */
4596
5821
  percent: number;
5822
+ /**
5823
+ * Maximum amount to charge. If unset, the fee has no upper bound.
5824
+ */
5825
+ maximum_amount?: string | null;
5826
+ /**
5827
+ * Minimum amount to charge. If unset, the fee is bounded below by 0.
5828
+ */
5829
+ minimum_amount?: string | null;
5830
+ /**
5831
+ * If true, the minimum_amount is prorated based on the service period. The
5832
+ * maximum_amount is an absolute cap (never prorated), and the percent applied to
5833
+ * upstream subtotals is never prorated either.
5834
+ */
5835
+ prorated?: boolean;
4597
5836
  }
4598
5837
  }
4599
5838
  interface NewFloatingEventOutputPrice {