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
@@ -33,6 +33,18 @@ export class Prices extends APIResource {
33
33
  *
34
34
  * See the [Price resource](/product-catalog/price-configuration) for the
35
35
  * specification of different price model configurations possible in this endpoint.
36
+ *
37
+ * @example
38
+ * ```ts
39
+ * const price = await client.prices.create({
40
+ * cadence: 'annual',
41
+ * currency: 'currency',
42
+ * item_id: 'item_id',
43
+ * model_type: 'unit',
44
+ * name: 'Annual fee',
45
+ * unit_config: { unit_amount: 'unit_amount' },
46
+ * });
47
+ * ```
36
48
  */
37
49
  create(body: PriceCreateParams, options?: Core.RequestOptions): Core.APIPromise<Shared.Price> {
38
50
  return this._client.post('/prices', { body, ...options });
@@ -42,6 +54,11 @@ export class Prices extends APIResource {
42
54
  * This endpoint allows you to update the `metadata` property on a price. If you
43
55
  * pass null for the metadata value, it will clear any existing metadata for that
44
56
  * price.
57
+ *
58
+ * @example
59
+ * ```ts
60
+ * const price = await client.prices.update('price_id');
61
+ * ```
45
62
  */
46
63
  update(
47
64
  priceId: string,
@@ -54,6 +71,14 @@ export class Prices extends APIResource {
54
71
  /**
55
72
  * This endpoint is used to list all add-on prices created using the
56
73
  * [price creation endpoint](/api-reference/price/create-price).
74
+ *
75
+ * @example
76
+ * ```ts
77
+ * // Automatically fetches more pages as needed.
78
+ * for await (const price of client.prices.list()) {
79
+ * // ...
80
+ * }
81
+ * ```
57
82
  */
58
83
  list(query?: PriceListParams, options?: Core.RequestOptions): Core.PagePromise<PricesPage, Shared.Price>;
59
84
  list(options?: Core.RequestOptions): Core.PagePromise<PricesPage, Shared.Price>;
@@ -93,6 +118,14 @@ export class Prices extends APIResource {
93
118
  * the length of the results must be no greater than 1000. Note that this is a POST
94
119
  * endpoint rather than a GET endpoint because it employs a JSON body rather than
95
120
  * query parameters.
121
+ *
122
+ * @example
123
+ * ```ts
124
+ * const response = await client.prices.evaluate('price_id', {
125
+ * timeframe_end: '2019-12-27T18:11:19.117Z',
126
+ * timeframe_start: '2019-12-27T18:11:19.117Z',
127
+ * });
128
+ * ```
96
129
  */
97
130
  evaluate(
98
131
  priceId: string,
@@ -132,6 +165,14 @@ export class Prices extends APIResource {
132
165
  *
133
166
  * Note that this is a POST endpoint rather than a GET endpoint because it employs
134
167
  * a JSON body rather than query parameters.
168
+ *
169
+ * @example
170
+ * ```ts
171
+ * const response = await client.prices.evaluateMultiple({
172
+ * timeframe_end: '2019-12-27T18:11:19.117Z',
173
+ * timeframe_start: '2019-12-27T18:11:19.117Z',
174
+ * });
175
+ * ```
135
176
  */
136
177
  evaluateMultiple(
137
178
  body: PriceEvaluateMultipleParams,
@@ -159,6 +200,14 @@ export class Prices extends APIResource {
159
200
  *
160
201
  * Note that this is a POST endpoint rather than a GET endpoint because it employs
161
202
  * a JSON body rather than query parameters.
203
+ *
204
+ * @example
205
+ * ```ts
206
+ * const response = await client.prices.evaluatePreviewEvents({
207
+ * timeframe_end: '2019-12-27T18:11:19.117Z',
208
+ * timeframe_start: '2019-12-27T18:11:19.117Z',
209
+ * });
210
+ * ```
162
211
  */
163
212
  evaluatePreviewEvents(
164
213
  body: PriceEvaluatePreviewEventsParams,
@@ -169,6 +218,11 @@ export class Prices extends APIResource {
169
218
 
170
219
  /**
171
220
  * This endpoint returns a price given an identifier.
221
+ *
222
+ * @example
223
+ * ```ts
224
+ * const price = await client.prices.fetch('price_id');
225
+ * ```
172
226
  */
173
227
  fetch(priceId: string, options?: Core.RequestOptions): Core.APIPromise<Shared.Price> {
174
228
  return this._client.get(`/prices/${priceId}`, options);
@@ -277,6 +331,7 @@ export type PriceCreateParams =
277
331
  | PriceCreateParams.NewFloatingPackageWithAllocationPrice
278
332
  | PriceCreateParams.NewFloatingUnitWithPercentPrice
279
333
  | PriceCreateParams.NewFloatingMatrixWithAllocationPrice
334
+ | PriceCreateParams.NewFloatingMatrixWithThresholdDiscountsPrice
280
335
  | PriceCreateParams.NewFloatingTieredWithProrationPrice
281
336
  | PriceCreateParams.NewFloatingUnitWithProrationPrice
282
337
  | PriceCreateParams.NewFloatingGroupedAllocationPrice
@@ -291,6 +346,8 @@ export type PriceCreateParams =
291
346
  | PriceCreateParams.NewFloatingScalableMatrixWithTieredPricingPrice
292
347
  | PriceCreateParams.NewFloatingCumulativeGroupedBulkPrice
293
348
  | PriceCreateParams.NewFloatingCumulativeGroupedAllocationPrice
349
+ | PriceCreateParams.NewFloatingDailyCreditAllowancePrice
350
+ | PriceCreateParams.NewFloatingMeteredAllowancePrice
294
351
  | PriceCreateParams.NewFloatingMinimumCompositePrice
295
352
  | PriceCreateParams.NewFloatingPercentCompositePrice
296
353
  | PriceCreateParams.NewFloatingEventOutputPrice;
@@ -1923,6 +1980,168 @@ export declare namespace PriceCreateParams {
1923
1980
  metadata?: { [key: string]: string | null } | null;
1924
1981
  }
1925
1982
 
1983
+ export interface NewFloatingMatrixWithThresholdDiscountsPrice {
1984
+ /**
1985
+ * The cadence to bill for this price on.
1986
+ */
1987
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
1988
+
1989
+ /**
1990
+ * An ISO 4217 currency string for which this price is billed in.
1991
+ */
1992
+ currency: string;
1993
+
1994
+ /**
1995
+ * The id of the item the price will be associated with.
1996
+ */
1997
+ item_id: string;
1998
+
1999
+ /**
2000
+ * Configuration for matrix_with_threshold_discounts pricing
2001
+ */
2002
+ matrix_with_threshold_discounts_config: NewFloatingMatrixWithThresholdDiscountsPrice.MatrixWithThresholdDiscountsConfig;
2003
+
2004
+ /**
2005
+ * The pricing model type
2006
+ */
2007
+ model_type: 'matrix_with_threshold_discounts';
2008
+
2009
+ /**
2010
+ * The name of the price.
2011
+ */
2012
+ name: string;
2013
+
2014
+ /**
2015
+ * The id of the billable metric for the price. Only needed if the price is
2016
+ * usage-based.
2017
+ */
2018
+ billable_metric_id?: string | null;
2019
+
2020
+ /**
2021
+ * If the Price represents a fixed cost, the price will be billed in-advance if
2022
+ * this is true, and in-arrears if this is false.
2023
+ */
2024
+ billed_in_advance?: boolean | null;
2025
+
2026
+ /**
2027
+ * For custom cadence: specifies the duration of the billing period in days or
2028
+ * months.
2029
+ */
2030
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
2031
+
2032
+ /**
2033
+ * The per unit conversion rate of the price currency to the invoicing currency.
2034
+ */
2035
+ conversion_rate?: number | null;
2036
+
2037
+ /**
2038
+ * The configuration for the rate of the price currency to the invoicing currency.
2039
+ */
2040
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
2041
+
2042
+ /**
2043
+ * For dimensional price: specifies a price group and dimension values
2044
+ */
2045
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
2046
+
2047
+ /**
2048
+ * An alias for the price.
2049
+ */
2050
+ external_price_id?: string | null;
2051
+
2052
+ /**
2053
+ * If the Price represents a fixed cost, this represents the quantity of units
2054
+ * applied.
2055
+ */
2056
+ fixed_price_quantity?: number | null;
2057
+
2058
+ /**
2059
+ * The property used to group this price on an invoice
2060
+ */
2061
+ invoice_grouping_key?: string | null;
2062
+
2063
+ /**
2064
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
2065
+ * If unspecified, a single invoice is produced per billing cycle.
2066
+ */
2067
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
2068
+
2069
+ /**
2070
+ * The ID of the license type to associate with this price.
2071
+ */
2072
+ license_type_id?: string | null;
2073
+
2074
+ /**
2075
+ * User-specified key/value pairs for the resource. Individual keys can be removed
2076
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
2077
+ * by setting `metadata` to `null`.
2078
+ */
2079
+ metadata?: { [key: string]: string | null } | null;
2080
+ }
2081
+
2082
+ export namespace NewFloatingMatrixWithThresholdDiscountsPrice {
2083
+ /**
2084
+ * Configuration for matrix_with_threshold_discounts pricing
2085
+ */
2086
+ export interface MatrixWithThresholdDiscountsConfig {
2087
+ /**
2088
+ * Unit price used for usage that does not match any defined matrix cell.
2089
+ */
2090
+ default_unit_amount: string;
2091
+
2092
+ /**
2093
+ * First matrix dimension key.
2094
+ */
2095
+ first_dimension: string;
2096
+
2097
+ /**
2098
+ * Per-cell unit prices.
2099
+ */
2100
+ matrix_values: Array<MatrixWithThresholdDiscountsConfig.MatrixValue>;
2101
+
2102
+ /**
2103
+ * Optional second matrix dimension key.
2104
+ */
2105
+ second_dimension?: string | null;
2106
+
2107
+ threshold_discount_groups?: Array<MatrixWithThresholdDiscountsConfig.ThresholdDiscountGroup>;
2108
+ }
2109
+
2110
+ export namespace MatrixWithThresholdDiscountsConfig {
2111
+ export interface MatrixValue {
2112
+ first_dimension_value: string;
2113
+
2114
+ unit_amount: string;
2115
+
2116
+ second_dimension_value?: string | null;
2117
+ }
2118
+
2119
+ export interface ThresholdDiscountGroup {
2120
+ /**
2121
+ * Discount rate applied to spend above the threshold.
2122
+ */
2123
+ above_threshold_discount_percentage: string;
2124
+
2125
+ /**
2126
+ * Discount rate applied to spend at or below the threshold. Set to 0 for no
2127
+ * baseline discount.
2128
+ */
2129
+ below_threshold_discount_percentage: string;
2130
+
2131
+ /**
2132
+ * Semicolon-separated list of matrix cell coordinates targeted by this group. Each
2133
+ * coordinate is `first,second` when the matrix has two dimensions, or just `first`
2134
+ * for a single-dimension matrix. Example: `blue,circle;green,triangle`.
2135
+ */
2136
+ cell_coordinates: string;
2137
+
2138
+ threshold_amount: string;
2139
+
2140
+ description?: string | null;
2141
+ }
2142
+ }
2143
+ }
2144
+
1926
2145
  export interface NewFloatingTieredWithProrationPrice {
1927
2146
  /**
1928
2147
  * The cadence to bill for this price on.
@@ -3778,7 +3997,7 @@ export declare namespace PriceCreateParams {
3778
3997
  }
3779
3998
  }
3780
3999
 
3781
- export interface NewFloatingMinimumCompositePrice {
4000
+ export interface NewFloatingDailyCreditAllowancePrice {
3782
4001
  /**
3783
4002
  * The cadence to bill for this price on.
3784
4003
  */
@@ -3790,19 +4009,19 @@ export declare namespace PriceCreateParams {
3790
4009
  currency: string;
3791
4010
 
3792
4011
  /**
3793
- * The id of the item the price will be associated with.
4012
+ * Configuration for daily_credit_allowance pricing
3794
4013
  */
3795
- item_id: string;
4014
+ daily_credit_allowance_config: NewFloatingDailyCreditAllowancePrice.DailyCreditAllowanceConfig;
3796
4015
 
3797
4016
  /**
3798
- * Configuration for minimum_composite pricing
4017
+ * The id of the item the price will be associated with.
3799
4018
  */
3800
- minimum_composite_config: NewFloatingMinimumCompositePrice.MinimumCompositeConfig;
4019
+ item_id: string;
3801
4020
 
3802
4021
  /**
3803
4022
  * The pricing model type
3804
4023
  */
3805
- model_type: 'minimum_composite';
4024
+ model_type: 'daily_credit_allowance';
3806
4025
 
3807
4026
  /**
3808
4027
  * The name of the price.
@@ -3877,24 +4096,60 @@ export declare namespace PriceCreateParams {
3877
4096
  metadata?: { [key: string]: string | null } | null;
3878
4097
  }
3879
4098
 
3880
- export namespace NewFloatingMinimumCompositePrice {
4099
+ export namespace NewFloatingDailyCreditAllowancePrice {
3881
4100
  /**
3882
- * Configuration for minimum_composite pricing
4101
+ * Configuration for daily_credit_allowance pricing
3883
4102
  */
3884
- export interface MinimumCompositeConfig {
4103
+ export interface DailyCreditAllowanceConfig {
3885
4104
  /**
3886
- * The minimum amount to apply
4105
+ * Credits granted per day. Lose-it-or-use-it; does not roll over.
3887
4106
  */
3888
- minimum_amount: string;
4107
+ daily_allowance: string;
3889
4108
 
3890
4109
  /**
3891
- * If true, subtotals from this price are prorated based on the service period
4110
+ * Default per-unit credit rate for any usage not bucketed into a specified
4111
+ * matrix_value
3892
4112
  */
3893
- prorated?: boolean;
4113
+ default_unit_amount: string;
4114
+
4115
+ /**
4116
+ * One or two event property values to evaluate matrix groups by
4117
+ */
4118
+ dimensions: Array<string | null>;
4119
+
4120
+ /**
4121
+ * Event property whose value identifies the day bucket the event belongs to (e.g.
4122
+ * 'event_day' set to an ISO date string in the customer's timezone). The allowance
4123
+ * resets per distinct value of this property.
4124
+ */
4125
+ event_day_property: string;
4126
+
4127
+ /**
4128
+ * Per-dimension credit rates
4129
+ */
4130
+ matrix_values: Array<DailyCreditAllowanceConfig.MatrixValue>;
4131
+ }
4132
+
4133
+ export namespace DailyCreditAllowanceConfig {
4134
+ /**
4135
+ * Per-dimension credit price for the daily credit allowance model.
4136
+ */
4137
+ export interface MatrixValue {
4138
+ /**
4139
+ * One or two matrix keys to filter usage to this value by. For example, ["model"]
4140
+ * could be used to apply a different credit rate to each AI model.
4141
+ */
4142
+ dimension_values: Array<string | null>;
4143
+
4144
+ /**
4145
+ * Credits charged per unit of usage matching the specified dimension_values
4146
+ */
4147
+ unit_amount: string;
4148
+ }
3894
4149
  }
3895
4150
  }
3896
4151
 
3897
- export interface NewFloatingPercentCompositePrice {
4152
+ export interface NewFloatingMeteredAllowancePrice {
3898
4153
  /**
3899
4154
  * The cadence to bill for this price on.
3900
4155
  */
@@ -3911,19 +4166,19 @@ export declare namespace PriceCreateParams {
3911
4166
  item_id: string;
3912
4167
 
3913
4168
  /**
3914
- * The pricing model type
4169
+ * Configuration for metered_allowance pricing
3915
4170
  */
3916
- model_type: 'percent';
4171
+ metered_allowance_config: NewFloatingMeteredAllowancePrice.MeteredAllowanceConfig;
3917
4172
 
3918
4173
  /**
3919
- * The name of the price.
4174
+ * The pricing model type
3920
4175
  */
3921
- name: string;
4176
+ model_type: 'metered_allowance';
3922
4177
 
3923
4178
  /**
3924
- * Configuration for percent pricing
4179
+ * The name of the price.
3925
4180
  */
3926
- percent_config: NewFloatingPercentCompositePrice.PercentConfig;
4181
+ name: string;
3927
4182
 
3928
4183
  /**
3929
4184
  * The id of the billable metric for the price. Only needed if the price is
@@ -3993,19 +4248,49 @@ export declare namespace PriceCreateParams {
3993
4248
  metadata?: { [key: string]: string | null } | null;
3994
4249
  }
3995
4250
 
3996
- export namespace NewFloatingPercentCompositePrice {
4251
+ export namespace NewFloatingMeteredAllowancePrice {
3997
4252
  /**
3998
- * Configuration for percent pricing
4253
+ * Configuration for metered_allowance pricing
3999
4254
  */
4000
- export interface PercentConfig {
4255
+ export interface MeteredAllowanceConfig {
4001
4256
  /**
4002
- * What percent of the component subtotals to charge
4257
+ * The grouping_key value whose summed quantity represents the allowance for this
4258
+ * period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption
4259
+ * — credit can never exceed actual usage.
4003
4260
  */
4004
- percent: number;
4261
+ allowance_grouping_value: string;
4262
+
4263
+ /**
4264
+ * The grouping_key value whose summed quantity represents consumption (e.g.
4265
+ * 'download'). Charged at unit_amount.
4266
+ */
4267
+ consumption_grouping_value: string;
4268
+
4269
+ /**
4270
+ * Event property used to partition the metric into consumption and allowance
4271
+ * quantities (e.g. 'event_name'). The metric is queried with this key and the two
4272
+ * values below select which partition is which.
4273
+ */
4274
+ grouping_key: string;
4275
+
4276
+ /**
4277
+ * Per-unit price applied to gross consumption and to the allowance credit.
4278
+ */
4279
+ unit_amount: string;
4280
+
4281
+ /**
4282
+ * Sub-line label for the credit row (e.g. 'Up to 3x free egress').
4283
+ */
4284
+ allowance_display_name?: string;
4285
+
4286
+ /**
4287
+ * Sub-line label for the gross consumption row (e.g. 'bytes gotten').
4288
+ */
4289
+ consumption_display_name?: string;
4005
4290
  }
4006
4291
  }
4007
4292
 
4008
- export interface NewFloatingEventOutputPrice {
4293
+ export interface NewFloatingMinimumCompositePrice {
4009
4294
  /**
4010
4295
  * The cadence to bill for this price on.
4011
4296
  */
@@ -4017,19 +4302,19 @@ export declare namespace PriceCreateParams {
4017
4302
  currency: string;
4018
4303
 
4019
4304
  /**
4020
- * Configuration for event_output pricing
4305
+ * The id of the item the price will be associated with.
4021
4306
  */
4022
- event_output_config: NewFloatingEventOutputPrice.EventOutputConfig;
4307
+ item_id: string;
4023
4308
 
4024
4309
  /**
4025
- * The id of the item the price will be associated with.
4310
+ * Configuration for minimum_composite pricing
4026
4311
  */
4027
- item_id: string;
4312
+ minimum_composite_config: NewFloatingMinimumCompositePrice.MinimumCompositeConfig;
4028
4313
 
4029
4314
  /**
4030
4315
  * The pricing model type
4031
4316
  */
4032
- model_type: 'event_output';
4317
+ model_type: 'minimum_composite';
4033
4318
 
4034
4319
  /**
4035
4320
  * The name of the price.
@@ -4104,42 +4389,286 @@ export declare namespace PriceCreateParams {
4104
4389
  metadata?: { [key: string]: string | null } | null;
4105
4390
  }
4106
4391
 
4107
- export namespace NewFloatingEventOutputPrice {
4392
+ export namespace NewFloatingMinimumCompositePrice {
4108
4393
  /**
4109
- * Configuration for event_output pricing
4394
+ * Configuration for minimum_composite pricing
4110
4395
  */
4111
- export interface EventOutputConfig {
4112
- /**
4113
- * The key in the event data to extract the unit rate from.
4114
- */
4115
- unit_rating_key: string;
4116
-
4396
+ export interface MinimumCompositeConfig {
4117
4397
  /**
4118
- * If provided, this amount will be used as the unit rate when an event does not
4119
- * have a value for the `unit_rating_key`. If not provided, events missing a unit
4120
- * rate will be ignored.
4398
+ * The minimum amount to apply
4121
4399
  */
4122
- default_unit_rate?: string | null;
4400
+ minimum_amount: string;
4123
4401
 
4124
4402
  /**
4125
- * An optional key in the event data to group by (e.g., event ID). All events will
4126
- * also be grouped by their unit rate.
4403
+ * If true, subtotals from this price are prorated based on the service period
4127
4404
  */
4128
- grouping_key?: string | null;
4405
+ prorated?: boolean;
4129
4406
  }
4130
4407
  }
4131
- }
4132
4408
 
4133
- export interface PriceUpdateParams {
4134
- /**
4135
- * User-specified key/value pairs for the resource. Individual keys can be removed
4136
- * by setting the value to `null`, and the entire metadata mapping can be cleared
4137
- * by setting `metadata` to `null`.
4138
- */
4139
- metadata?: { [key: string]: string | null } | null;
4140
- }
4409
+ export interface NewFloatingPercentCompositePrice {
4410
+ /**
4411
+ * The cadence to bill for this price on.
4412
+ */
4413
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
4141
4414
 
4142
- export interface PriceListParams extends PageParams {}
4415
+ /**
4416
+ * An ISO 4217 currency string for which this price is billed in.
4417
+ */
4418
+ currency: string;
4419
+
4420
+ /**
4421
+ * The id of the item the price will be associated with.
4422
+ */
4423
+ item_id: string;
4424
+
4425
+ /**
4426
+ * The pricing model type
4427
+ */
4428
+ model_type: 'percent';
4429
+
4430
+ /**
4431
+ * The name of the price.
4432
+ */
4433
+ name: string;
4434
+
4435
+ /**
4436
+ * Configuration for percent pricing
4437
+ */
4438
+ percent_config: NewFloatingPercentCompositePrice.PercentConfig;
4439
+
4440
+ /**
4441
+ * The id of the billable metric for the price. Only needed if the price is
4442
+ * usage-based.
4443
+ */
4444
+ billable_metric_id?: string | null;
4445
+
4446
+ /**
4447
+ * If the Price represents a fixed cost, the price will be billed in-advance if
4448
+ * this is true, and in-arrears if this is false.
4449
+ */
4450
+ billed_in_advance?: boolean | null;
4451
+
4452
+ /**
4453
+ * For custom cadence: specifies the duration of the billing period in days or
4454
+ * months.
4455
+ */
4456
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
4457
+
4458
+ /**
4459
+ * The per unit conversion rate of the price currency to the invoicing currency.
4460
+ */
4461
+ conversion_rate?: number | null;
4462
+
4463
+ /**
4464
+ * The configuration for the rate of the price currency to the invoicing currency.
4465
+ */
4466
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
4467
+
4468
+ /**
4469
+ * For dimensional price: specifies a price group and dimension values
4470
+ */
4471
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
4472
+
4473
+ /**
4474
+ * An alias for the price.
4475
+ */
4476
+ external_price_id?: string | null;
4477
+
4478
+ /**
4479
+ * If the Price represents a fixed cost, this represents the quantity of units
4480
+ * applied.
4481
+ */
4482
+ fixed_price_quantity?: number | null;
4483
+
4484
+ /**
4485
+ * The property used to group this price on an invoice
4486
+ */
4487
+ invoice_grouping_key?: string | null;
4488
+
4489
+ /**
4490
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
4491
+ * If unspecified, a single invoice is produced per billing cycle.
4492
+ */
4493
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
4494
+
4495
+ /**
4496
+ * The ID of the license type to associate with this price.
4497
+ */
4498
+ license_type_id?: string | null;
4499
+
4500
+ /**
4501
+ * User-specified key/value pairs for the resource. Individual keys can be removed
4502
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
4503
+ * by setting `metadata` to `null`.
4504
+ */
4505
+ metadata?: { [key: string]: string | null } | null;
4506
+ }
4507
+
4508
+ export namespace NewFloatingPercentCompositePrice {
4509
+ /**
4510
+ * Configuration for percent pricing
4511
+ */
4512
+ export interface PercentConfig {
4513
+ /**
4514
+ * Fraction of the component subtotals to charge (0 < percent <= 1).
4515
+ */
4516
+ percent: number;
4517
+
4518
+ /**
4519
+ * Maximum amount to charge. If unset, the fee has no upper bound.
4520
+ */
4521
+ maximum_amount?: string | null;
4522
+
4523
+ /**
4524
+ * Minimum amount to charge. If unset, the fee is bounded below by 0.
4525
+ */
4526
+ minimum_amount?: string | null;
4527
+
4528
+ /**
4529
+ * If true, the minimum_amount is prorated based on the service period. The
4530
+ * maximum_amount is an absolute cap (never prorated), and the percent applied to
4531
+ * upstream subtotals is never prorated either.
4532
+ */
4533
+ prorated?: boolean;
4534
+ }
4535
+ }
4536
+
4537
+ export interface NewFloatingEventOutputPrice {
4538
+ /**
4539
+ * The cadence to bill for this price on.
4540
+ */
4541
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
4542
+
4543
+ /**
4544
+ * An ISO 4217 currency string for which this price is billed in.
4545
+ */
4546
+ currency: string;
4547
+
4548
+ /**
4549
+ * Configuration for event_output pricing
4550
+ */
4551
+ event_output_config: NewFloatingEventOutputPrice.EventOutputConfig;
4552
+
4553
+ /**
4554
+ * The id of the item the price will be associated with.
4555
+ */
4556
+ item_id: string;
4557
+
4558
+ /**
4559
+ * The pricing model type
4560
+ */
4561
+ model_type: 'event_output';
4562
+
4563
+ /**
4564
+ * The name of the price.
4565
+ */
4566
+ name: string;
4567
+
4568
+ /**
4569
+ * The id of the billable metric for the price. Only needed if the price is
4570
+ * usage-based.
4571
+ */
4572
+ billable_metric_id?: string | null;
4573
+
4574
+ /**
4575
+ * If the Price represents a fixed cost, the price will be billed in-advance if
4576
+ * this is true, and in-arrears if this is false.
4577
+ */
4578
+ billed_in_advance?: boolean | null;
4579
+
4580
+ /**
4581
+ * For custom cadence: specifies the duration of the billing period in days or
4582
+ * months.
4583
+ */
4584
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
4585
+
4586
+ /**
4587
+ * The per unit conversion rate of the price currency to the invoicing currency.
4588
+ */
4589
+ conversion_rate?: number | null;
4590
+
4591
+ /**
4592
+ * The configuration for the rate of the price currency to the invoicing currency.
4593
+ */
4594
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
4595
+
4596
+ /**
4597
+ * For dimensional price: specifies a price group and dimension values
4598
+ */
4599
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
4600
+
4601
+ /**
4602
+ * An alias for the price.
4603
+ */
4604
+ external_price_id?: string | null;
4605
+
4606
+ /**
4607
+ * If the Price represents a fixed cost, this represents the quantity of units
4608
+ * applied.
4609
+ */
4610
+ fixed_price_quantity?: number | null;
4611
+
4612
+ /**
4613
+ * The property used to group this price on an invoice
4614
+ */
4615
+ invoice_grouping_key?: string | null;
4616
+
4617
+ /**
4618
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
4619
+ * If unspecified, a single invoice is produced per billing cycle.
4620
+ */
4621
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
4622
+
4623
+ /**
4624
+ * The ID of the license type to associate with this price.
4625
+ */
4626
+ license_type_id?: string | null;
4627
+
4628
+ /**
4629
+ * User-specified key/value pairs for the resource. Individual keys can be removed
4630
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
4631
+ * by setting `metadata` to `null`.
4632
+ */
4633
+ metadata?: { [key: string]: string | null } | null;
4634
+ }
4635
+
4636
+ export namespace NewFloatingEventOutputPrice {
4637
+ /**
4638
+ * Configuration for event_output pricing
4639
+ */
4640
+ export interface EventOutputConfig {
4641
+ /**
4642
+ * The key in the event data to extract the unit rate from.
4643
+ */
4644
+ unit_rating_key: string;
4645
+
4646
+ /**
4647
+ * If provided, this amount will be used as the unit rate when an event does not
4648
+ * have a value for the `unit_rating_key`. If not provided, events missing a unit
4649
+ * rate will be ignored.
4650
+ */
4651
+ default_unit_rate?: string | null;
4652
+
4653
+ /**
4654
+ * An optional key in the event data to group by (e.g., event ID). All events will
4655
+ * also be grouped by their unit rate.
4656
+ */
4657
+ grouping_key?: string | null;
4658
+ }
4659
+ }
4660
+ }
4661
+
4662
+ export interface PriceUpdateParams {
4663
+ /**
4664
+ * User-specified key/value pairs for the resource. Individual keys can be removed
4665
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
4666
+ * by setting `metadata` to `null`.
4667
+ */
4668
+ metadata?: { [key: string]: string | null } | null;
4669
+ }
4670
+
4671
+ export interface PriceListParams extends PageParams {}
4143
4672
 
4144
4673
  export interface PriceEvaluateParams {
4145
4674
  /**
@@ -4255,6 +4784,7 @@ export namespace PriceEvaluateMultipleParams {
4255
4784
  | Shared.NewFloatingPackageWithAllocationPrice
4256
4785
  | Shared.NewFloatingUnitWithPercentPrice
4257
4786
  | Shared.NewFloatingMatrixWithAllocationPrice
4787
+ | PriceEvaluation.NewFloatingMatrixWithThresholdDiscountsPrice
4258
4788
  | Shared.NewFloatingTieredWithProrationPrice
4259
4789
  | Shared.NewFloatingUnitWithProrationPrice
4260
4790
  | Shared.NewFloatingGroupedAllocationPrice
@@ -4269,6 +4799,8 @@ export namespace PriceEvaluateMultipleParams {
4269
4799
  | Shared.NewFloatingScalableMatrixWithTieredPricingPrice
4270
4800
  | Shared.NewFloatingCumulativeGroupedBulkPrice
4271
4801
  | PriceEvaluation.NewFloatingCumulativeGroupedAllocationPrice
4802
+ | PriceEvaluation.NewFloatingDailyCreditAllowancePrice
4803
+ | PriceEvaluation.NewFloatingMeteredAllowancePrice
4272
4804
  | Shared.NewFloatingMinimumCompositePrice
4273
4805
  | PriceEvaluation.NewFloatingPercentCompositePrice
4274
4806
  | PriceEvaluation.NewFloatingEventOutputPrice
@@ -4429,7 +4961,7 @@ export namespace PriceEvaluateMultipleParams {
4429
4961
  }
4430
4962
  }
4431
4963
 
4432
- export interface NewFloatingGroupedWithMinMaxThresholdsPrice {
4964
+ export interface NewFloatingMatrixWithThresholdDiscountsPrice {
4433
4965
  /**
4434
4966
  * The cadence to bill for this price on.
4435
4967
  */
@@ -4441,14 +4973,176 @@ export namespace PriceEvaluateMultipleParams {
4441
4973
  currency: string;
4442
4974
 
4443
4975
  /**
4444
- * Configuration for grouped_with_min_max_thresholds pricing
4976
+ * The id of the item the price will be associated with.
4445
4977
  */
4446
- grouped_with_min_max_thresholds_config: NewFloatingGroupedWithMinMaxThresholdsPrice.GroupedWithMinMaxThresholdsConfig;
4978
+ item_id: string;
4447
4979
 
4448
4980
  /**
4449
- * The id of the item the price will be associated with.
4981
+ * Configuration for matrix_with_threshold_discounts pricing
4450
4982
  */
4451
- item_id: string;
4983
+ matrix_with_threshold_discounts_config: NewFloatingMatrixWithThresholdDiscountsPrice.MatrixWithThresholdDiscountsConfig;
4984
+
4985
+ /**
4986
+ * The pricing model type
4987
+ */
4988
+ model_type: 'matrix_with_threshold_discounts';
4989
+
4990
+ /**
4991
+ * The name of the price.
4992
+ */
4993
+ name: string;
4994
+
4995
+ /**
4996
+ * The id of the billable metric for the price. Only needed if the price is
4997
+ * usage-based.
4998
+ */
4999
+ billable_metric_id?: string | null;
5000
+
5001
+ /**
5002
+ * If the Price represents a fixed cost, the price will be billed in-advance if
5003
+ * this is true, and in-arrears if this is false.
5004
+ */
5005
+ billed_in_advance?: boolean | null;
5006
+
5007
+ /**
5008
+ * For custom cadence: specifies the duration of the billing period in days or
5009
+ * months.
5010
+ */
5011
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
5012
+
5013
+ /**
5014
+ * The per unit conversion rate of the price currency to the invoicing currency.
5015
+ */
5016
+ conversion_rate?: number | null;
5017
+
5018
+ /**
5019
+ * The configuration for the rate of the price currency to the invoicing currency.
5020
+ */
5021
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
5022
+
5023
+ /**
5024
+ * For dimensional price: specifies a price group and dimension values
5025
+ */
5026
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
5027
+
5028
+ /**
5029
+ * An alias for the price.
5030
+ */
5031
+ external_price_id?: string | null;
5032
+
5033
+ /**
5034
+ * If the Price represents a fixed cost, this represents the quantity of units
5035
+ * applied.
5036
+ */
5037
+ fixed_price_quantity?: number | null;
5038
+
5039
+ /**
5040
+ * The property used to group this price on an invoice
5041
+ */
5042
+ invoice_grouping_key?: string | null;
5043
+
5044
+ /**
5045
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
5046
+ * If unspecified, a single invoice is produced per billing cycle.
5047
+ */
5048
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
5049
+
5050
+ /**
5051
+ * The ID of the license type to associate with this price.
5052
+ */
5053
+ license_type_id?: string | null;
5054
+
5055
+ /**
5056
+ * User-specified key/value pairs for the resource. Individual keys can be removed
5057
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
5058
+ * by setting `metadata` to `null`.
5059
+ */
5060
+ metadata?: { [key: string]: string | null } | null;
5061
+ }
5062
+
5063
+ export namespace NewFloatingMatrixWithThresholdDiscountsPrice {
5064
+ /**
5065
+ * Configuration for matrix_with_threshold_discounts pricing
5066
+ */
5067
+ export interface MatrixWithThresholdDiscountsConfig {
5068
+ /**
5069
+ * Unit price used for usage that does not match any defined matrix cell.
5070
+ */
5071
+ default_unit_amount: string;
5072
+
5073
+ /**
5074
+ * First matrix dimension key.
5075
+ */
5076
+ first_dimension: string;
5077
+
5078
+ /**
5079
+ * Per-cell unit prices.
5080
+ */
5081
+ matrix_values: Array<MatrixWithThresholdDiscountsConfig.MatrixValue>;
5082
+
5083
+ /**
5084
+ * Optional second matrix dimension key.
5085
+ */
5086
+ second_dimension?: string | null;
5087
+
5088
+ threshold_discount_groups?: Array<MatrixWithThresholdDiscountsConfig.ThresholdDiscountGroup>;
5089
+ }
5090
+
5091
+ export namespace MatrixWithThresholdDiscountsConfig {
5092
+ export interface MatrixValue {
5093
+ first_dimension_value: string;
5094
+
5095
+ unit_amount: string;
5096
+
5097
+ second_dimension_value?: string | null;
5098
+ }
5099
+
5100
+ export interface ThresholdDiscountGroup {
5101
+ /**
5102
+ * Discount rate applied to spend above the threshold.
5103
+ */
5104
+ above_threshold_discount_percentage: string;
5105
+
5106
+ /**
5107
+ * Discount rate applied to spend at or below the threshold. Set to 0 for no
5108
+ * baseline discount.
5109
+ */
5110
+ below_threshold_discount_percentage: string;
5111
+
5112
+ /**
5113
+ * Semicolon-separated list of matrix cell coordinates targeted by this group. Each
5114
+ * coordinate is `first,second` when the matrix has two dimensions, or just `first`
5115
+ * for a single-dimension matrix. Example: `blue,circle;green,triangle`.
5116
+ */
5117
+ cell_coordinates: string;
5118
+
5119
+ threshold_amount: string;
5120
+
5121
+ description?: string | null;
5122
+ }
5123
+ }
5124
+ }
5125
+
5126
+ export interface NewFloatingGroupedWithMinMaxThresholdsPrice {
5127
+ /**
5128
+ * The cadence to bill for this price on.
5129
+ */
5130
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
5131
+
5132
+ /**
5133
+ * An ISO 4217 currency string for which this price is billed in.
5134
+ */
5135
+ currency: string;
5136
+
5137
+ /**
5138
+ * Configuration for grouped_with_min_max_thresholds pricing
5139
+ */
5140
+ grouped_with_min_max_thresholds_config: NewFloatingGroupedWithMinMaxThresholdsPrice.GroupedWithMinMaxThresholdsConfig;
5141
+
5142
+ /**
5143
+ * The id of the item the price will be associated with.
5144
+ */
5145
+ item_id: string;
4452
5146
 
4453
5147
  /**
4454
5148
  * The pricing model type
@@ -4681,7 +5375,7 @@ export namespace PriceEvaluateMultipleParams {
4681
5375
  }
4682
5376
  }
4683
5377
 
4684
- export interface NewFloatingPercentCompositePrice {
5378
+ export interface NewFloatingDailyCreditAllowancePrice {
4685
5379
  /**
4686
5380
  * The cadence to bill for this price on.
4687
5381
  */
@@ -4692,6 +5386,11 @@ export namespace PriceEvaluateMultipleParams {
4692
5386
  */
4693
5387
  currency: string;
4694
5388
 
5389
+ /**
5390
+ * Configuration for daily_credit_allowance pricing
5391
+ */
5392
+ daily_credit_allowance_config: NewFloatingDailyCreditAllowancePrice.DailyCreditAllowanceConfig;
5393
+
4695
5394
  /**
4696
5395
  * The id of the item the price will be associated with.
4697
5396
  */
@@ -4700,18 +5399,13 @@ export namespace PriceEvaluateMultipleParams {
4700
5399
  /**
4701
5400
  * The pricing model type
4702
5401
  */
4703
- model_type: 'percent';
5402
+ model_type: 'daily_credit_allowance';
4704
5403
 
4705
5404
  /**
4706
5405
  * The name of the price.
4707
5406
  */
4708
5407
  name: string;
4709
5408
 
4710
- /**
4711
- * Configuration for percent pricing
4712
- */
4713
- percent_config: NewFloatingPercentCompositePrice.PercentConfig;
4714
-
4715
5409
  /**
4716
5410
  * The id of the billable metric for the price. Only needed if the price is
4717
5411
  * usage-based.
@@ -4780,19 +5474,60 @@ export namespace PriceEvaluateMultipleParams {
4780
5474
  metadata?: { [key: string]: string | null } | null;
4781
5475
  }
4782
5476
 
4783
- export namespace NewFloatingPercentCompositePrice {
5477
+ export namespace NewFloatingDailyCreditAllowancePrice {
4784
5478
  /**
4785
- * Configuration for percent pricing
5479
+ * Configuration for daily_credit_allowance pricing
4786
5480
  */
4787
- export interface PercentConfig {
5481
+ export interface DailyCreditAllowanceConfig {
4788
5482
  /**
4789
- * What percent of the component subtotals to charge
5483
+ * Credits granted per day. Lose-it-or-use-it; does not roll over.
4790
5484
  */
4791
- percent: number;
5485
+ daily_allowance: string;
5486
+
5487
+ /**
5488
+ * Default per-unit credit rate for any usage not bucketed into a specified
5489
+ * matrix_value
5490
+ */
5491
+ default_unit_amount: string;
5492
+
5493
+ /**
5494
+ * One or two event property values to evaluate matrix groups by
5495
+ */
5496
+ dimensions: Array<string | null>;
5497
+
5498
+ /**
5499
+ * Event property whose value identifies the day bucket the event belongs to (e.g.
5500
+ * 'event_day' set to an ISO date string in the customer's timezone). The allowance
5501
+ * resets per distinct value of this property.
5502
+ */
5503
+ event_day_property: string;
5504
+
5505
+ /**
5506
+ * Per-dimension credit rates
5507
+ */
5508
+ matrix_values: Array<DailyCreditAllowanceConfig.MatrixValue>;
5509
+ }
5510
+
5511
+ export namespace DailyCreditAllowanceConfig {
5512
+ /**
5513
+ * Per-dimension credit price for the daily credit allowance model.
5514
+ */
5515
+ export interface MatrixValue {
5516
+ /**
5517
+ * One or two matrix keys to filter usage to this value by. For example, ["model"]
5518
+ * could be used to apply a different credit rate to each AI model.
5519
+ */
5520
+ dimension_values: Array<string | null>;
5521
+
5522
+ /**
5523
+ * Credits charged per unit of usage matching the specified dimension_values
5524
+ */
5525
+ unit_amount: string;
5526
+ }
4792
5527
  }
4793
5528
  }
4794
5529
 
4795
- export interface NewFloatingEventOutputPrice {
5530
+ export interface NewFloatingMeteredAllowancePrice {
4796
5531
  /**
4797
5532
  * The cadence to bill for this price on.
4798
5533
  */
@@ -4804,19 +5539,19 @@ export namespace PriceEvaluateMultipleParams {
4804
5539
  currency: string;
4805
5540
 
4806
5541
  /**
4807
- * Configuration for event_output pricing
5542
+ * The id of the item the price will be associated with.
4808
5543
  */
4809
- event_output_config: NewFloatingEventOutputPrice.EventOutputConfig;
5544
+ item_id: string;
4810
5545
 
4811
5546
  /**
4812
- * The id of the item the price will be associated with.
5547
+ * Configuration for metered_allowance pricing
4813
5548
  */
4814
- item_id: string;
5549
+ metered_allowance_config: NewFloatingMeteredAllowancePrice.MeteredAllowanceConfig;
4815
5550
 
4816
5551
  /**
4817
5552
  * The pricing model type
4818
5553
  */
4819
- model_type: 'event_output';
5554
+ model_type: 'metered_allowance';
4820
5555
 
4821
5556
  /**
4822
5557
  * The name of the price.
@@ -4891,67 +5626,336 @@ export namespace PriceEvaluateMultipleParams {
4891
5626
  metadata?: { [key: string]: string | null } | null;
4892
5627
  }
4893
5628
 
4894
- export namespace NewFloatingEventOutputPrice {
5629
+ export namespace NewFloatingMeteredAllowancePrice {
4895
5630
  /**
4896
- * Configuration for event_output pricing
5631
+ * Configuration for metered_allowance pricing
4897
5632
  */
4898
- export interface EventOutputConfig {
5633
+ export interface MeteredAllowanceConfig {
4899
5634
  /**
4900
- * The key in the event data to extract the unit rate from.
5635
+ * The grouping_key value whose summed quantity represents the allowance for this
5636
+ * period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption
5637
+ * — credit can never exceed actual usage.
4901
5638
  */
4902
- unit_rating_key: string;
5639
+ allowance_grouping_value: string;
4903
5640
 
4904
5641
  /**
4905
- * If provided, this amount will be used as the unit rate when an event does not
4906
- * have a value for the `unit_rating_key`. If not provided, events missing a unit
4907
- * rate will be ignored.
5642
+ * The grouping_key value whose summed quantity represents consumption (e.g.
5643
+ * 'download'). Charged at unit_amount.
4908
5644
  */
4909
- default_unit_rate?: string | null;
5645
+ consumption_grouping_value: string;
4910
5646
 
4911
5647
  /**
4912
- * An optional key in the event data to group by (e.g., event ID). All events will
4913
- * also be grouped by their unit rate.
5648
+ * Event property used to partition the metric into consumption and allowance
5649
+ * quantities (e.g. 'event_name'). The metric is queried with this key and the two
5650
+ * values below select which partition is which.
4914
5651
  */
4915
- grouping_key?: string | null;
5652
+ grouping_key: string;
5653
+
5654
+ /**
5655
+ * Per-unit price applied to gross consumption and to the allowance credit.
5656
+ */
5657
+ unit_amount: string;
5658
+
5659
+ /**
5660
+ * Sub-line label for the credit row (e.g. 'Up to 3x free egress').
5661
+ */
5662
+ allowance_display_name?: string;
5663
+
5664
+ /**
5665
+ * Sub-line label for the gross consumption row (e.g. 'bytes gotten').
5666
+ */
5667
+ consumption_display_name?: string;
4916
5668
  }
4917
5669
  }
4918
- }
4919
- }
4920
5670
 
4921
- export interface PriceEvaluatePreviewEventsParams {
4922
- /**
4923
- * The exclusive upper bound for event timestamps
4924
- */
4925
- timeframe_end: string;
5671
+ export interface NewFloatingPercentCompositePrice {
5672
+ /**
5673
+ * The cadence to bill for this price on.
5674
+ */
5675
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
4926
5676
 
4927
- /**
4928
- * The inclusive lower bound for event timestamps
4929
- */
4930
- timeframe_start: string;
5677
+ /**
5678
+ * An ISO 4217 currency string for which this price is billed in.
5679
+ */
5680
+ currency: string;
4931
5681
 
4932
- /**
4933
- * The ID of the customer to which this evaluation is scoped.
4934
- */
4935
- customer_id?: string | null;
5682
+ /**
5683
+ * The id of the item the price will be associated with.
5684
+ */
5685
+ item_id: string;
4936
5686
 
4937
- /**
4938
- * List of preview events to use instead of actual usage data
4939
- */
4940
- events?: Array<PriceEvaluatePreviewEventsParams.Event>;
5687
+ /**
5688
+ * The pricing model type
5689
+ */
5690
+ model_type: 'percent';
4941
5691
 
4942
- /**
4943
- * The external customer ID of the customer to which this evaluation is scoped.
4944
- */
4945
- external_customer_id?: string | null;
5692
+ /**
5693
+ * The name of the price.
5694
+ */
5695
+ name: string;
4946
5696
 
4947
- /**
4948
- * List of prices to evaluate (max 100)
4949
- */
4950
- price_evaluations?: Array<PriceEvaluatePreviewEventsParams.PriceEvaluation>;
4951
- }
5697
+ /**
5698
+ * Configuration for percent pricing
5699
+ */
5700
+ percent_config: NewFloatingPercentCompositePrice.PercentConfig;
4952
5701
 
4953
- export namespace PriceEvaluatePreviewEventsParams {
4954
- export interface Event {
5702
+ /**
5703
+ * The id of the billable metric for the price. Only needed if the price is
5704
+ * usage-based.
5705
+ */
5706
+ billable_metric_id?: string | null;
5707
+
5708
+ /**
5709
+ * If the Price represents a fixed cost, the price will be billed in-advance if
5710
+ * this is true, and in-arrears if this is false.
5711
+ */
5712
+ billed_in_advance?: boolean | null;
5713
+
5714
+ /**
5715
+ * For custom cadence: specifies the duration of the billing period in days or
5716
+ * months.
5717
+ */
5718
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
5719
+
5720
+ /**
5721
+ * The per unit conversion rate of the price currency to the invoicing currency.
5722
+ */
5723
+ conversion_rate?: number | null;
5724
+
5725
+ /**
5726
+ * The configuration for the rate of the price currency to the invoicing currency.
5727
+ */
5728
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
5729
+
5730
+ /**
5731
+ * For dimensional price: specifies a price group and dimension values
5732
+ */
5733
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
5734
+
5735
+ /**
5736
+ * An alias for the price.
5737
+ */
5738
+ external_price_id?: string | null;
5739
+
5740
+ /**
5741
+ * If the Price represents a fixed cost, this represents the quantity of units
5742
+ * applied.
5743
+ */
5744
+ fixed_price_quantity?: number | null;
5745
+
5746
+ /**
5747
+ * The property used to group this price on an invoice
5748
+ */
5749
+ invoice_grouping_key?: string | null;
5750
+
5751
+ /**
5752
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
5753
+ * If unspecified, a single invoice is produced per billing cycle.
5754
+ */
5755
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
5756
+
5757
+ /**
5758
+ * The ID of the license type to associate with this price.
5759
+ */
5760
+ license_type_id?: string | null;
5761
+
5762
+ /**
5763
+ * User-specified key/value pairs for the resource. Individual keys can be removed
5764
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
5765
+ * by setting `metadata` to `null`.
5766
+ */
5767
+ metadata?: { [key: string]: string | null } | null;
5768
+ }
5769
+
5770
+ export namespace NewFloatingPercentCompositePrice {
5771
+ /**
5772
+ * Configuration for percent pricing
5773
+ */
5774
+ export interface PercentConfig {
5775
+ /**
5776
+ * Fraction of the component subtotals to charge (0 < percent <= 1).
5777
+ */
5778
+ percent: number;
5779
+
5780
+ /**
5781
+ * Maximum amount to charge. If unset, the fee has no upper bound.
5782
+ */
5783
+ maximum_amount?: string | null;
5784
+
5785
+ /**
5786
+ * Minimum amount to charge. If unset, the fee is bounded below by 0.
5787
+ */
5788
+ minimum_amount?: string | null;
5789
+
5790
+ /**
5791
+ * If true, the minimum_amount is prorated based on the service period. The
5792
+ * maximum_amount is an absolute cap (never prorated), and the percent applied to
5793
+ * upstream subtotals is never prorated either.
5794
+ */
5795
+ prorated?: boolean;
5796
+ }
5797
+ }
5798
+
5799
+ export interface NewFloatingEventOutputPrice {
5800
+ /**
5801
+ * The cadence to bill for this price on.
5802
+ */
5803
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
5804
+
5805
+ /**
5806
+ * An ISO 4217 currency string for which this price is billed in.
5807
+ */
5808
+ currency: string;
5809
+
5810
+ /**
5811
+ * Configuration for event_output pricing
5812
+ */
5813
+ event_output_config: NewFloatingEventOutputPrice.EventOutputConfig;
5814
+
5815
+ /**
5816
+ * The id of the item the price will be associated with.
5817
+ */
5818
+ item_id: string;
5819
+
5820
+ /**
5821
+ * The pricing model type
5822
+ */
5823
+ model_type: 'event_output';
5824
+
5825
+ /**
5826
+ * The name of the price.
5827
+ */
5828
+ name: string;
5829
+
5830
+ /**
5831
+ * The id of the billable metric for the price. Only needed if the price is
5832
+ * usage-based.
5833
+ */
5834
+ billable_metric_id?: string | null;
5835
+
5836
+ /**
5837
+ * If the Price represents a fixed cost, the price will be billed in-advance if
5838
+ * this is true, and in-arrears if this is false.
5839
+ */
5840
+ billed_in_advance?: boolean | null;
5841
+
5842
+ /**
5843
+ * For custom cadence: specifies the duration of the billing period in days or
5844
+ * months.
5845
+ */
5846
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
5847
+
5848
+ /**
5849
+ * The per unit conversion rate of the price currency to the invoicing currency.
5850
+ */
5851
+ conversion_rate?: number | null;
5852
+
5853
+ /**
5854
+ * The configuration for the rate of the price currency to the invoicing currency.
5855
+ */
5856
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
5857
+
5858
+ /**
5859
+ * For dimensional price: specifies a price group and dimension values
5860
+ */
5861
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
5862
+
5863
+ /**
5864
+ * An alias for the price.
5865
+ */
5866
+ external_price_id?: string | null;
5867
+
5868
+ /**
5869
+ * If the Price represents a fixed cost, this represents the quantity of units
5870
+ * applied.
5871
+ */
5872
+ fixed_price_quantity?: number | null;
5873
+
5874
+ /**
5875
+ * The property used to group this price on an invoice
5876
+ */
5877
+ invoice_grouping_key?: string | null;
5878
+
5879
+ /**
5880
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
5881
+ * If unspecified, a single invoice is produced per billing cycle.
5882
+ */
5883
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
5884
+
5885
+ /**
5886
+ * The ID of the license type to associate with this price.
5887
+ */
5888
+ license_type_id?: string | null;
5889
+
5890
+ /**
5891
+ * User-specified key/value pairs for the resource. Individual keys can be removed
5892
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
5893
+ * by setting `metadata` to `null`.
5894
+ */
5895
+ metadata?: { [key: string]: string | null } | null;
5896
+ }
5897
+
5898
+ export namespace NewFloatingEventOutputPrice {
5899
+ /**
5900
+ * Configuration for event_output pricing
5901
+ */
5902
+ export interface EventOutputConfig {
5903
+ /**
5904
+ * The key in the event data to extract the unit rate from.
5905
+ */
5906
+ unit_rating_key: string;
5907
+
5908
+ /**
5909
+ * If provided, this amount will be used as the unit rate when an event does not
5910
+ * have a value for the `unit_rating_key`. If not provided, events missing a unit
5911
+ * rate will be ignored.
5912
+ */
5913
+ default_unit_rate?: string | null;
5914
+
5915
+ /**
5916
+ * An optional key in the event data to group by (e.g., event ID). All events will
5917
+ * also be grouped by their unit rate.
5918
+ */
5919
+ grouping_key?: string | null;
5920
+ }
5921
+ }
5922
+ }
5923
+ }
5924
+
5925
+ export interface PriceEvaluatePreviewEventsParams {
5926
+ /**
5927
+ * The exclusive upper bound for event timestamps
5928
+ */
5929
+ timeframe_end: string;
5930
+
5931
+ /**
5932
+ * The inclusive lower bound for event timestamps
5933
+ */
5934
+ timeframe_start: string;
5935
+
5936
+ /**
5937
+ * The ID of the customer to which this evaluation is scoped.
5938
+ */
5939
+ customer_id?: string | null;
5940
+
5941
+ /**
5942
+ * List of preview events to use instead of actual usage data
5943
+ */
5944
+ events?: Array<PriceEvaluatePreviewEventsParams.Event>;
5945
+
5946
+ /**
5947
+ * The external customer ID of the customer to which this evaluation is scoped.
5948
+ */
5949
+ external_customer_id?: string | null;
5950
+
5951
+ /**
5952
+ * List of prices to evaluate (max 100)
5953
+ */
5954
+ price_evaluations?: Array<PriceEvaluatePreviewEventsParams.PriceEvaluation>;
5955
+ }
5956
+
5957
+ export namespace PriceEvaluatePreviewEventsParams {
5958
+ export interface Event {
4955
5959
  /**
4956
5960
  * A name to meaningfully identify the action or event type.
4957
5961
  */
@@ -4970,99 +5974,538 @@ export namespace PriceEvaluatePreviewEventsParams {
4970
5974
  */
4971
5975
  timestamp: string;
4972
5976
 
4973
- /**
4974
- * The Orb Customer identifier
4975
- */
4976
- customer_id?: string | null;
5977
+ /**
5978
+ * The Orb Customer identifier
5979
+ */
5980
+ customer_id?: string | null;
5981
+
5982
+ /**
5983
+ * An alias for the Orb customer, whose mapping is specified when creating the
5984
+ * customer
5985
+ */
5986
+ external_customer_id?: string | null;
5987
+ }
5988
+
5989
+ export interface PriceEvaluation {
5990
+ /**
5991
+ * The external ID of a price to evaluate that exists in your Orb account.
5992
+ */
5993
+ external_price_id?: string | null;
5994
+
5995
+ /**
5996
+ * A boolean
5997
+ * [computed property](/extensibility/advanced-metrics#computed-properties) used to
5998
+ * filter the underlying billable metric
5999
+ */
6000
+ filter?: string | null;
6001
+
6002
+ /**
6003
+ * Properties (or
6004
+ * [computed properties](/extensibility/advanced-metrics#computed-properties)) used
6005
+ * to group the underlying billable metric
6006
+ */
6007
+ grouping_keys?: Array<string>;
6008
+
6009
+ /**
6010
+ * Optional overrides for parameterized billable metric parameters. If the metric
6011
+ * has parameter definitions and no overrides are provided, defaults will be used.
6012
+ */
6013
+ metric_parameter_overrides?: { [key: string]: unknown } | null;
6014
+
6015
+ /**
6016
+ * New floating price request body params.
6017
+ */
6018
+ price?:
6019
+ | Shared.NewFloatingUnitPrice
6020
+ | Shared.NewFloatingTieredPrice
6021
+ | Shared.NewFloatingBulkPrice
6022
+ | PriceEvaluation.NewFloatingBulkWithFiltersPrice
6023
+ | Shared.NewFloatingPackagePrice
6024
+ | Shared.NewFloatingMatrixPrice
6025
+ | Shared.NewFloatingThresholdTotalAmountPrice
6026
+ | Shared.NewFloatingTieredPackagePrice
6027
+ | Shared.NewFloatingTieredWithMinimumPrice
6028
+ | Shared.NewFloatingGroupedTieredPrice
6029
+ | Shared.NewFloatingTieredPackageWithMinimumPrice
6030
+ | Shared.NewFloatingPackageWithAllocationPrice
6031
+ | Shared.NewFloatingUnitWithPercentPrice
6032
+ | Shared.NewFloatingMatrixWithAllocationPrice
6033
+ | PriceEvaluation.NewFloatingMatrixWithThresholdDiscountsPrice
6034
+ | Shared.NewFloatingTieredWithProrationPrice
6035
+ | Shared.NewFloatingUnitWithProrationPrice
6036
+ | Shared.NewFloatingGroupedAllocationPrice
6037
+ | Shared.NewFloatingBulkWithProrationPrice
6038
+ | Shared.NewFloatingGroupedWithProratedMinimumPrice
6039
+ | Shared.NewFloatingGroupedWithMeteredMinimumPrice
6040
+ | PriceEvaluation.NewFloatingGroupedWithMinMaxThresholdsPrice
6041
+ | Shared.NewFloatingMatrixWithDisplayNamePrice
6042
+ | Shared.NewFloatingGroupedTieredPackagePrice
6043
+ | Shared.NewFloatingMaxGroupTieredPackagePrice
6044
+ | Shared.NewFloatingScalableMatrixWithUnitPricingPrice
6045
+ | Shared.NewFloatingScalableMatrixWithTieredPricingPrice
6046
+ | Shared.NewFloatingCumulativeGroupedBulkPrice
6047
+ | PriceEvaluation.NewFloatingCumulativeGroupedAllocationPrice
6048
+ | PriceEvaluation.NewFloatingDailyCreditAllowancePrice
6049
+ | PriceEvaluation.NewFloatingMeteredAllowancePrice
6050
+ | Shared.NewFloatingMinimumCompositePrice
6051
+ | PriceEvaluation.NewFloatingPercentCompositePrice
6052
+ | PriceEvaluation.NewFloatingEventOutputPrice
6053
+ | null;
6054
+
6055
+ /**
6056
+ * The ID of a price to evaluate that exists in your Orb account.
6057
+ */
6058
+ price_id?: string | null;
6059
+ }
6060
+
6061
+ export namespace PriceEvaluation {
6062
+ export interface NewFloatingBulkWithFiltersPrice {
6063
+ /**
6064
+ * Configuration for bulk_with_filters pricing
6065
+ */
6066
+ bulk_with_filters_config: NewFloatingBulkWithFiltersPrice.BulkWithFiltersConfig;
6067
+
6068
+ /**
6069
+ * The cadence to bill for this price on.
6070
+ */
6071
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
6072
+
6073
+ /**
6074
+ * An ISO 4217 currency string for which this price is billed in.
6075
+ */
6076
+ currency: string;
6077
+
6078
+ /**
6079
+ * The id of the item the price will be associated with.
6080
+ */
6081
+ item_id: string;
6082
+
6083
+ /**
6084
+ * The pricing model type
6085
+ */
6086
+ model_type: 'bulk_with_filters';
6087
+
6088
+ /**
6089
+ * The name of the price.
6090
+ */
6091
+ name: string;
6092
+
6093
+ /**
6094
+ * The id of the billable metric for the price. Only needed if the price is
6095
+ * usage-based.
6096
+ */
6097
+ billable_metric_id?: string | null;
6098
+
6099
+ /**
6100
+ * If the Price represents a fixed cost, the price will be billed in-advance if
6101
+ * this is true, and in-arrears if this is false.
6102
+ */
6103
+ billed_in_advance?: boolean | null;
6104
+
6105
+ /**
6106
+ * For custom cadence: specifies the duration of the billing period in days or
6107
+ * months.
6108
+ */
6109
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
6110
+
6111
+ /**
6112
+ * The per unit conversion rate of the price currency to the invoicing currency.
6113
+ */
6114
+ conversion_rate?: number | null;
6115
+
6116
+ /**
6117
+ * The configuration for the rate of the price currency to the invoicing currency.
6118
+ */
6119
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
6120
+
6121
+ /**
6122
+ * For dimensional price: specifies a price group and dimension values
6123
+ */
6124
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
6125
+
6126
+ /**
6127
+ * An alias for the price.
6128
+ */
6129
+ external_price_id?: string | null;
6130
+
6131
+ /**
6132
+ * If the Price represents a fixed cost, this represents the quantity of units
6133
+ * applied.
6134
+ */
6135
+ fixed_price_quantity?: number | null;
6136
+
6137
+ /**
6138
+ * The property used to group this price on an invoice
6139
+ */
6140
+ invoice_grouping_key?: string | null;
6141
+
6142
+ /**
6143
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
6144
+ * If unspecified, a single invoice is produced per billing cycle.
6145
+ */
6146
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
6147
+
6148
+ /**
6149
+ * The ID of the license type to associate with this price.
6150
+ */
6151
+ license_type_id?: string | null;
6152
+
6153
+ /**
6154
+ * User-specified key/value pairs for the resource. Individual keys can be removed
6155
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
6156
+ * by setting `metadata` to `null`.
6157
+ */
6158
+ metadata?: { [key: string]: string | null } | null;
6159
+ }
6160
+
6161
+ export namespace NewFloatingBulkWithFiltersPrice {
6162
+ /**
6163
+ * Configuration for bulk_with_filters pricing
6164
+ */
6165
+ export interface BulkWithFiltersConfig {
6166
+ /**
6167
+ * Property filters to apply (all must match)
6168
+ */
6169
+ filters: Array<BulkWithFiltersConfig.Filter>;
6170
+
6171
+ /**
6172
+ * Bulk tiers for rating based on total usage volume
6173
+ */
6174
+ tiers: Array<BulkWithFiltersConfig.Tier>;
6175
+ }
6176
+
6177
+ export namespace BulkWithFiltersConfig {
6178
+ /**
6179
+ * Configuration for a single property filter
6180
+ */
6181
+ export interface Filter {
6182
+ /**
6183
+ * Event property key to filter on
6184
+ */
6185
+ property_key: string;
6186
+
6187
+ /**
6188
+ * Event property value to match
6189
+ */
6190
+ property_value: string;
6191
+ }
6192
+
6193
+ /**
6194
+ * Configuration for a single bulk pricing tier
6195
+ */
6196
+ export interface Tier {
6197
+ /**
6198
+ * Amount per unit
6199
+ */
6200
+ unit_amount: string;
6201
+
6202
+ /**
6203
+ * The lower bound for this tier
6204
+ */
6205
+ tier_lower_bound?: string | null;
6206
+ }
6207
+ }
6208
+ }
6209
+
6210
+ export interface NewFloatingMatrixWithThresholdDiscountsPrice {
6211
+ /**
6212
+ * The cadence to bill for this price on.
6213
+ */
6214
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
6215
+
6216
+ /**
6217
+ * An ISO 4217 currency string for which this price is billed in.
6218
+ */
6219
+ currency: string;
6220
+
6221
+ /**
6222
+ * The id of the item the price will be associated with.
6223
+ */
6224
+ item_id: string;
6225
+
6226
+ /**
6227
+ * Configuration for matrix_with_threshold_discounts pricing
6228
+ */
6229
+ matrix_with_threshold_discounts_config: NewFloatingMatrixWithThresholdDiscountsPrice.MatrixWithThresholdDiscountsConfig;
6230
+
6231
+ /**
6232
+ * The pricing model type
6233
+ */
6234
+ model_type: 'matrix_with_threshold_discounts';
6235
+
6236
+ /**
6237
+ * The name of the price.
6238
+ */
6239
+ name: string;
6240
+
6241
+ /**
6242
+ * The id of the billable metric for the price. Only needed if the price is
6243
+ * usage-based.
6244
+ */
6245
+ billable_metric_id?: string | null;
6246
+
6247
+ /**
6248
+ * If the Price represents a fixed cost, the price will be billed in-advance if
6249
+ * this is true, and in-arrears if this is false.
6250
+ */
6251
+ billed_in_advance?: boolean | null;
6252
+
6253
+ /**
6254
+ * For custom cadence: specifies the duration of the billing period in days or
6255
+ * months.
6256
+ */
6257
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
6258
+
6259
+ /**
6260
+ * The per unit conversion rate of the price currency to the invoicing currency.
6261
+ */
6262
+ conversion_rate?: number | null;
6263
+
6264
+ /**
6265
+ * The configuration for the rate of the price currency to the invoicing currency.
6266
+ */
6267
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
6268
+
6269
+ /**
6270
+ * For dimensional price: specifies a price group and dimension values
6271
+ */
6272
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
6273
+
6274
+ /**
6275
+ * An alias for the price.
6276
+ */
6277
+ external_price_id?: string | null;
6278
+
6279
+ /**
6280
+ * If the Price represents a fixed cost, this represents the quantity of units
6281
+ * applied.
6282
+ */
6283
+ fixed_price_quantity?: number | null;
6284
+
6285
+ /**
6286
+ * The property used to group this price on an invoice
6287
+ */
6288
+ invoice_grouping_key?: string | null;
6289
+
6290
+ /**
6291
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
6292
+ * If unspecified, a single invoice is produced per billing cycle.
6293
+ */
6294
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
6295
+
6296
+ /**
6297
+ * The ID of the license type to associate with this price.
6298
+ */
6299
+ license_type_id?: string | null;
6300
+
6301
+ /**
6302
+ * User-specified key/value pairs for the resource. Individual keys can be removed
6303
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
6304
+ * by setting `metadata` to `null`.
6305
+ */
6306
+ metadata?: { [key: string]: string | null } | null;
6307
+ }
6308
+
6309
+ export namespace NewFloatingMatrixWithThresholdDiscountsPrice {
6310
+ /**
6311
+ * Configuration for matrix_with_threshold_discounts pricing
6312
+ */
6313
+ export interface MatrixWithThresholdDiscountsConfig {
6314
+ /**
6315
+ * Unit price used for usage that does not match any defined matrix cell.
6316
+ */
6317
+ default_unit_amount: string;
6318
+
6319
+ /**
6320
+ * First matrix dimension key.
6321
+ */
6322
+ first_dimension: string;
6323
+
6324
+ /**
6325
+ * Per-cell unit prices.
6326
+ */
6327
+ matrix_values: Array<MatrixWithThresholdDiscountsConfig.MatrixValue>;
6328
+
6329
+ /**
6330
+ * Optional second matrix dimension key.
6331
+ */
6332
+ second_dimension?: string | null;
6333
+
6334
+ threshold_discount_groups?: Array<MatrixWithThresholdDiscountsConfig.ThresholdDiscountGroup>;
6335
+ }
6336
+
6337
+ export namespace MatrixWithThresholdDiscountsConfig {
6338
+ export interface MatrixValue {
6339
+ first_dimension_value: string;
6340
+
6341
+ unit_amount: string;
6342
+
6343
+ second_dimension_value?: string | null;
6344
+ }
6345
+
6346
+ export interface ThresholdDiscountGroup {
6347
+ /**
6348
+ * Discount rate applied to spend above the threshold.
6349
+ */
6350
+ above_threshold_discount_percentage: string;
6351
+
6352
+ /**
6353
+ * Discount rate applied to spend at or below the threshold. Set to 0 for no
6354
+ * baseline discount.
6355
+ */
6356
+ below_threshold_discount_percentage: string;
6357
+
6358
+ /**
6359
+ * Semicolon-separated list of matrix cell coordinates targeted by this group. Each
6360
+ * coordinate is `first,second` when the matrix has two dimensions, or just `first`
6361
+ * for a single-dimension matrix. Example: `blue,circle;green,triangle`.
6362
+ */
6363
+ cell_coordinates: string;
6364
+
6365
+ threshold_amount: string;
6366
+
6367
+ description?: string | null;
6368
+ }
6369
+ }
6370
+ }
6371
+
6372
+ export interface NewFloatingGroupedWithMinMaxThresholdsPrice {
6373
+ /**
6374
+ * The cadence to bill for this price on.
6375
+ */
6376
+ cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
6377
+
6378
+ /**
6379
+ * An ISO 4217 currency string for which this price is billed in.
6380
+ */
6381
+ currency: string;
6382
+
6383
+ /**
6384
+ * Configuration for grouped_with_min_max_thresholds pricing
6385
+ */
6386
+ grouped_with_min_max_thresholds_config: NewFloatingGroupedWithMinMaxThresholdsPrice.GroupedWithMinMaxThresholdsConfig;
6387
+
6388
+ /**
6389
+ * The id of the item the price will be associated with.
6390
+ */
6391
+ item_id: string;
6392
+
6393
+ /**
6394
+ * The pricing model type
6395
+ */
6396
+ model_type: 'grouped_with_min_max_thresholds';
6397
+
6398
+ /**
6399
+ * The name of the price.
6400
+ */
6401
+ name: string;
6402
+
6403
+ /**
6404
+ * The id of the billable metric for the price. Only needed if the price is
6405
+ * usage-based.
6406
+ */
6407
+ billable_metric_id?: string | null;
6408
+
6409
+ /**
6410
+ * If the Price represents a fixed cost, the price will be billed in-advance if
6411
+ * this is true, and in-arrears if this is false.
6412
+ */
6413
+ billed_in_advance?: boolean | null;
6414
+
6415
+ /**
6416
+ * For custom cadence: specifies the duration of the billing period in days or
6417
+ * months.
6418
+ */
6419
+ billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
6420
+
6421
+ /**
6422
+ * The per unit conversion rate of the price currency to the invoicing currency.
6423
+ */
6424
+ conversion_rate?: number | null;
6425
+
6426
+ /**
6427
+ * The configuration for the rate of the price currency to the invoicing currency.
6428
+ */
6429
+ conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
4977
6430
 
4978
- /**
4979
- * An alias for the Orb customer, whose mapping is specified when creating the
4980
- * customer
4981
- */
4982
- external_customer_id?: string | null;
4983
- }
6431
+ /**
6432
+ * For dimensional price: specifies a price group and dimension values
6433
+ */
6434
+ dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
4984
6435
 
4985
- export interface PriceEvaluation {
4986
- /**
4987
- * The external ID of a price to evaluate that exists in your Orb account.
4988
- */
4989
- external_price_id?: string | null;
6436
+ /**
6437
+ * An alias for the price.
6438
+ */
6439
+ external_price_id?: string | null;
4990
6440
 
4991
- /**
4992
- * A boolean
4993
- * [computed property](/extensibility/advanced-metrics#computed-properties) used to
4994
- * filter the underlying billable metric
4995
- */
4996
- filter?: string | null;
6441
+ /**
6442
+ * If the Price represents a fixed cost, this represents the quantity of units
6443
+ * applied.
6444
+ */
6445
+ fixed_price_quantity?: number | null;
4997
6446
 
4998
- /**
4999
- * Properties (or
5000
- * [computed properties](/extensibility/advanced-metrics#computed-properties)) used
5001
- * to group the underlying billable metric
5002
- */
5003
- grouping_keys?: Array<string>;
6447
+ /**
6448
+ * The property used to group this price on an invoice
6449
+ */
6450
+ invoice_grouping_key?: string | null;
5004
6451
 
5005
- /**
5006
- * Optional overrides for parameterized billable metric parameters. If the metric
5007
- * has parameter definitions and no overrides are provided, defaults will be used.
5008
- */
5009
- metric_parameter_overrides?: { [key: string]: unknown } | null;
6452
+ /**
6453
+ * Within each billing cycle, specifies the cadence at which invoices are produced.
6454
+ * If unspecified, a single invoice is produced per billing cycle.
6455
+ */
6456
+ invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
5010
6457
 
5011
- /**
5012
- * New floating price request body params.
5013
- */
5014
- price?:
5015
- | Shared.NewFloatingUnitPrice
5016
- | Shared.NewFloatingTieredPrice
5017
- | Shared.NewFloatingBulkPrice
5018
- | PriceEvaluation.NewFloatingBulkWithFiltersPrice
5019
- | Shared.NewFloatingPackagePrice
5020
- | Shared.NewFloatingMatrixPrice
5021
- | Shared.NewFloatingThresholdTotalAmountPrice
5022
- | Shared.NewFloatingTieredPackagePrice
5023
- | Shared.NewFloatingTieredWithMinimumPrice
5024
- | Shared.NewFloatingGroupedTieredPrice
5025
- | Shared.NewFloatingTieredPackageWithMinimumPrice
5026
- | Shared.NewFloatingPackageWithAllocationPrice
5027
- | Shared.NewFloatingUnitWithPercentPrice
5028
- | Shared.NewFloatingMatrixWithAllocationPrice
5029
- | Shared.NewFloatingTieredWithProrationPrice
5030
- | Shared.NewFloatingUnitWithProrationPrice
5031
- | Shared.NewFloatingGroupedAllocationPrice
5032
- | Shared.NewFloatingBulkWithProrationPrice
5033
- | Shared.NewFloatingGroupedWithProratedMinimumPrice
5034
- | Shared.NewFloatingGroupedWithMeteredMinimumPrice
5035
- | PriceEvaluation.NewFloatingGroupedWithMinMaxThresholdsPrice
5036
- | Shared.NewFloatingMatrixWithDisplayNamePrice
5037
- | Shared.NewFloatingGroupedTieredPackagePrice
5038
- | Shared.NewFloatingMaxGroupTieredPackagePrice
5039
- | Shared.NewFloatingScalableMatrixWithUnitPricingPrice
5040
- | Shared.NewFloatingScalableMatrixWithTieredPricingPrice
5041
- | Shared.NewFloatingCumulativeGroupedBulkPrice
5042
- | PriceEvaluation.NewFloatingCumulativeGroupedAllocationPrice
5043
- | Shared.NewFloatingMinimumCompositePrice
5044
- | PriceEvaluation.NewFloatingPercentCompositePrice
5045
- | PriceEvaluation.NewFloatingEventOutputPrice
5046
- | null;
6458
+ /**
6459
+ * The ID of the license type to associate with this price.
6460
+ */
6461
+ license_type_id?: string | null;
5047
6462
 
5048
- /**
5049
- * The ID of a price to evaluate that exists in your Orb account.
5050
- */
5051
- price_id?: string | null;
5052
- }
6463
+ /**
6464
+ * User-specified key/value pairs for the resource. Individual keys can be removed
6465
+ * by setting the value to `null`, and the entire metadata mapping can be cleared
6466
+ * by setting `metadata` to `null`.
6467
+ */
6468
+ metadata?: { [key: string]: string | null } | null;
6469
+ }
5053
6470
 
5054
- export namespace PriceEvaluation {
5055
- export interface NewFloatingBulkWithFiltersPrice {
6471
+ export namespace NewFloatingGroupedWithMinMaxThresholdsPrice {
5056
6472
  /**
5057
- * Configuration for bulk_with_filters pricing
6473
+ * Configuration for grouped_with_min_max_thresholds pricing
5058
6474
  */
5059
- bulk_with_filters_config: NewFloatingBulkWithFiltersPrice.BulkWithFiltersConfig;
6475
+ export interface GroupedWithMinMaxThresholdsConfig {
6476
+ /**
6477
+ * The event property used to group before applying thresholds
6478
+ */
6479
+ grouping_key: string;
6480
+
6481
+ /**
6482
+ * The maximum amount to charge each group
6483
+ */
6484
+ maximum_charge: string;
6485
+
6486
+ /**
6487
+ * The minimum amount to charge each group, regardless of usage
6488
+ */
6489
+ minimum_charge: string;
6490
+
6491
+ /**
6492
+ * The base price charged per group
6493
+ */
6494
+ per_unit_rate: string;
6495
+ }
6496
+ }
5060
6497
 
6498
+ export interface NewFloatingCumulativeGroupedAllocationPrice {
5061
6499
  /**
5062
6500
  * The cadence to bill for this price on.
5063
6501
  */
5064
6502
  cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
5065
6503
 
6504
+ /**
6505
+ * Configuration for cumulative_grouped_allocation pricing
6506
+ */
6507
+ cumulative_grouped_allocation_config: NewFloatingCumulativeGroupedAllocationPrice.CumulativeGroupedAllocationConfig;
6508
+
5066
6509
  /**
5067
6510
  * An ISO 4217 currency string for which this price is billed in.
5068
6511
  */
@@ -5076,7 +6519,7 @@ export namespace PriceEvaluatePreviewEventsParams {
5076
6519
  /**
5077
6520
  * The pricing model type
5078
6521
  */
5079
- model_type: 'bulk_with_filters';
6522
+ model_type: 'cumulative_grouped_allocation';
5080
6523
 
5081
6524
  /**
5082
6525
  * The name of the price.
@@ -5151,56 +6594,34 @@ export namespace PriceEvaluatePreviewEventsParams {
5151
6594
  metadata?: { [key: string]: string | null } | null;
5152
6595
  }
5153
6596
 
5154
- export namespace NewFloatingBulkWithFiltersPrice {
6597
+ export namespace NewFloatingCumulativeGroupedAllocationPrice {
5155
6598
  /**
5156
- * Configuration for bulk_with_filters pricing
6599
+ * Configuration for cumulative_grouped_allocation pricing
5157
6600
  */
5158
- export interface BulkWithFiltersConfig {
6601
+ export interface CumulativeGroupedAllocationConfig {
5159
6602
  /**
5160
- * Property filters to apply (all must match)
6603
+ * The overall allocation across all groups
5161
6604
  */
5162
- filters: Array<BulkWithFiltersConfig.Filter>;
6605
+ cumulative_allocation: string;
5163
6606
 
5164
6607
  /**
5165
- * Bulk tiers for rating based on total usage volume
6608
+ * The allocation per individual group
5166
6609
  */
5167
- tiers: Array<BulkWithFiltersConfig.Tier>;
5168
- }
6610
+ group_allocation: string;
5169
6611
 
5170
- export namespace BulkWithFiltersConfig {
5171
6612
  /**
5172
- * Configuration for a single property filter
6613
+ * The event property used to group usage before applying allocations
5173
6614
  */
5174
- export interface Filter {
5175
- /**
5176
- * Event property key to filter on
5177
- */
5178
- property_key: string;
5179
-
5180
- /**
5181
- * Event property value to match
5182
- */
5183
- property_value: string;
5184
- }
6615
+ grouping_key: string;
5185
6616
 
5186
6617
  /**
5187
- * Configuration for a single bulk pricing tier
6618
+ * The amount to charge for each unit outside of the allocation
5188
6619
  */
5189
- export interface Tier {
5190
- /**
5191
- * Amount per unit
5192
- */
5193
- unit_amount: string;
5194
-
5195
- /**
5196
- * The lower bound for this tier
5197
- */
5198
- tier_lower_bound?: string | null;
5199
- }
6620
+ unit_amount: string;
5200
6621
  }
5201
6622
  }
5202
6623
 
5203
- export interface NewFloatingGroupedWithMinMaxThresholdsPrice {
6624
+ export interface NewFloatingDailyCreditAllowancePrice {
5204
6625
  /**
5205
6626
  * The cadence to bill for this price on.
5206
6627
  */
@@ -5212,9 +6633,9 @@ export namespace PriceEvaluatePreviewEventsParams {
5212
6633
  currency: string;
5213
6634
 
5214
6635
  /**
5215
- * Configuration for grouped_with_min_max_thresholds pricing
6636
+ * Configuration for daily_credit_allowance pricing
5216
6637
  */
5217
- grouped_with_min_max_thresholds_config: NewFloatingGroupedWithMinMaxThresholdsPrice.GroupedWithMinMaxThresholdsConfig;
6638
+ daily_credit_allowance_config: NewFloatingDailyCreditAllowancePrice.DailyCreditAllowanceConfig;
5218
6639
 
5219
6640
  /**
5220
6641
  * The id of the item the price will be associated with.
@@ -5224,7 +6645,7 @@ export namespace PriceEvaluatePreviewEventsParams {
5224
6645
  /**
5225
6646
  * The pricing model type
5226
6647
  */
5227
- model_type: 'grouped_with_min_max_thresholds';
6648
+ model_type: 'daily_credit_allowance';
5228
6649
 
5229
6650
  /**
5230
6651
  * The name of the price.
@@ -5299,44 +6720,65 @@ export namespace PriceEvaluatePreviewEventsParams {
5299
6720
  metadata?: { [key: string]: string | null } | null;
5300
6721
  }
5301
6722
 
5302
- export namespace NewFloatingGroupedWithMinMaxThresholdsPrice {
6723
+ export namespace NewFloatingDailyCreditAllowancePrice {
5303
6724
  /**
5304
- * Configuration for grouped_with_min_max_thresholds pricing
6725
+ * Configuration for daily_credit_allowance pricing
5305
6726
  */
5306
- export interface GroupedWithMinMaxThresholdsConfig {
6727
+ export interface DailyCreditAllowanceConfig {
5307
6728
  /**
5308
- * The event property used to group before applying thresholds
6729
+ * Credits granted per day. Lose-it-or-use-it; does not roll over.
5309
6730
  */
5310
- grouping_key: string;
6731
+ daily_allowance: string;
5311
6732
 
5312
6733
  /**
5313
- * The maximum amount to charge each group
6734
+ * Default per-unit credit rate for any usage not bucketed into a specified
6735
+ * matrix_value
5314
6736
  */
5315
- maximum_charge: string;
6737
+ default_unit_amount: string;
5316
6738
 
5317
6739
  /**
5318
- * The minimum amount to charge each group, regardless of usage
6740
+ * One or two event property values to evaluate matrix groups by
5319
6741
  */
5320
- minimum_charge: string;
6742
+ dimensions: Array<string | null>;
5321
6743
 
5322
6744
  /**
5323
- * The base price charged per group
6745
+ * Event property whose value identifies the day bucket the event belongs to (e.g.
6746
+ * 'event_day' set to an ISO date string in the customer's timezone). The allowance
6747
+ * resets per distinct value of this property.
5324
6748
  */
5325
- per_unit_rate: string;
6749
+ event_day_property: string;
6750
+
6751
+ /**
6752
+ * Per-dimension credit rates
6753
+ */
6754
+ matrix_values: Array<DailyCreditAllowanceConfig.MatrixValue>;
6755
+ }
6756
+
6757
+ export namespace DailyCreditAllowanceConfig {
6758
+ /**
6759
+ * Per-dimension credit price for the daily credit allowance model.
6760
+ */
6761
+ export interface MatrixValue {
6762
+ /**
6763
+ * One or two matrix keys to filter usage to this value by. For example, ["model"]
6764
+ * could be used to apply a different credit rate to each AI model.
6765
+ */
6766
+ dimension_values: Array<string | null>;
6767
+
6768
+ /**
6769
+ * Credits charged per unit of usage matching the specified dimension_values
6770
+ */
6771
+ unit_amount: string;
6772
+ }
5326
6773
  }
5327
6774
  }
5328
6775
 
5329
- export interface NewFloatingCumulativeGroupedAllocationPrice {
6776
+ export interface NewFloatingMeteredAllowancePrice {
5330
6777
  /**
5331
6778
  * The cadence to bill for this price on.
5332
6779
  */
5333
6780
  cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
5334
6781
 
5335
- /**
5336
- * Configuration for cumulative_grouped_allocation pricing
5337
- */
5338
- cumulative_grouped_allocation_config: NewFloatingCumulativeGroupedAllocationPrice.CumulativeGroupedAllocationConfig;
5339
-
5340
6782
  /**
5341
6783
  * An ISO 4217 currency string for which this price is billed in.
5342
6784
  */
@@ -5347,10 +6789,15 @@ export namespace PriceEvaluatePreviewEventsParams {
5347
6789
  */
5348
6790
  item_id: string;
5349
6791
 
6792
+ /**
6793
+ * Configuration for metered_allowance pricing
6794
+ */
6795
+ metered_allowance_config: NewFloatingMeteredAllowancePrice.MeteredAllowanceConfig;
6796
+
5350
6797
  /**
5351
6798
  * The pricing model type
5352
6799
  */
5353
- model_type: 'cumulative_grouped_allocation';
6800
+ model_type: 'metered_allowance';
5354
6801
 
5355
6802
  /**
5356
6803
  * The name of the price.
@@ -5425,30 +6872,45 @@ export namespace PriceEvaluatePreviewEventsParams {
5425
6872
  metadata?: { [key: string]: string | null } | null;
5426
6873
  }
5427
6874
 
5428
- export namespace NewFloatingCumulativeGroupedAllocationPrice {
6875
+ export namespace NewFloatingMeteredAllowancePrice {
5429
6876
  /**
5430
- * Configuration for cumulative_grouped_allocation pricing
6877
+ * Configuration for metered_allowance pricing
5431
6878
  */
5432
- export interface CumulativeGroupedAllocationConfig {
6879
+ export interface MeteredAllowanceConfig {
5433
6880
  /**
5434
- * The overall allocation across all groups
6881
+ * The grouping_key value whose summed quantity represents the allowance for this
6882
+ * period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption
6883
+ * — credit can never exceed actual usage.
5435
6884
  */
5436
- cumulative_allocation: string;
6885
+ allowance_grouping_value: string;
5437
6886
 
5438
6887
  /**
5439
- * The allocation per individual group
6888
+ * The grouping_key value whose summed quantity represents consumption (e.g.
6889
+ * 'download'). Charged at unit_amount.
5440
6890
  */
5441
- group_allocation: string;
6891
+ consumption_grouping_value: string;
5442
6892
 
5443
6893
  /**
5444
- * The event property used to group usage before applying allocations
6894
+ * Event property used to partition the metric into consumption and allowance
6895
+ * quantities (e.g. 'event_name'). The metric is queried with this key and the two
6896
+ * values below select which partition is which.
5445
6897
  */
5446
6898
  grouping_key: string;
5447
6899
 
5448
6900
  /**
5449
- * The amount to charge for each unit outside of the allocation
6901
+ * Per-unit price applied to gross consumption and to the allowance credit.
5450
6902
  */
5451
6903
  unit_amount: string;
6904
+
6905
+ /**
6906
+ * Sub-line label for the credit row (e.g. 'Up to 3x free egress').
6907
+ */
6908
+ allowance_display_name?: string;
6909
+
6910
+ /**
6911
+ * Sub-line label for the gross consumption row (e.g. 'bytes gotten').
6912
+ */
6913
+ consumption_display_name?: string;
5452
6914
  }
5453
6915
  }
5454
6916
 
@@ -5557,9 +7019,26 @@ export namespace PriceEvaluatePreviewEventsParams {
5557
7019
  */
5558
7020
  export interface PercentConfig {
5559
7021
  /**
5560
- * What percent of the component subtotals to charge
7022
+ * Fraction of the component subtotals to charge (0 < percent <= 1).
5561
7023
  */
5562
7024
  percent: number;
7025
+
7026
+ /**
7027
+ * Maximum amount to charge. If unset, the fee has no upper bound.
7028
+ */
7029
+ maximum_amount?: string | null;
7030
+
7031
+ /**
7032
+ * Minimum amount to charge. If unset, the fee is bounded below by 0.
7033
+ */
7034
+ minimum_amount?: string | null;
7035
+
7036
+ /**
7037
+ * If true, the minimum_amount is prorated based on the service period. The
7038
+ * maximum_amount is an absolute cap (never prorated), and the percent applied to
7039
+ * upstream subtotals is never prorated either.
7040
+ */
7041
+ prorated?: boolean;
5563
7042
  }
5564
7043
  }
5565
7044