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
@@ -19,8 +19,8 @@ export declare class Plans extends APIResource {
19
19
  */
20
20
  create(body: PlanCreateParams, options?: Core.RequestOptions): Core.APIPromise<Plan>;
21
21
  /**
22
- * This endpoint can be used to update the `external_plan_id`, and `metadata` of an
23
- * existing plan.
22
+ * This endpoint can be used to update the `external_plan_id`, `description`, and
23
+ * `metadata` of an existing plan.
24
24
  *
25
25
  * Other fields on a plan are currently immutable.
26
26
  */
@@ -29,7 +29,7 @@ export declare class Plans extends APIResource {
29
29
  * This endpoint returns a list of all [plans](/core-concepts#plan-and-price) for
30
30
  * an account in a list format. The list of plans is ordered starting from the most
31
31
  * recently created plan. The response also includes
32
- * [`pagination_metadata`](/api-reference/pagination), which lets the caller
32
+ * [`pagination_metadata`](/api-reference/pagination) which lets the caller
33
33
  * retrieve the next page of results if they exist.
34
34
  */
35
35
  list(query?: PlanListParams, options?: Core.RequestOptions): Core.PagePromise<PlansPage, Plan>;
@@ -69,7 +69,7 @@ export interface Plan {
69
69
  * Adjustments for this plan. If the plan has phases, this includes adjustments
70
70
  * across all phases of the plan.
71
71
  */
72
- adjustments: Array<Shared.PlanPhaseUsageDiscountAdjustment | Shared.PlanPhaseAmountDiscountAdjustment | Shared.PlanPhasePercentageDiscountAdjustment | Shared.PlanPhaseMinimumAdjustment | Shared.PlanPhaseMaximumAdjustment>;
72
+ adjustments: Array<Shared.PlanPhaseUsageDiscountAdjustment | Shared.PlanPhaseAmountDiscountAdjustment | Shared.PlanPhasePercentageDiscountAdjustment | Plan.PlanPhaseTieredPercentageDiscountAdjustment | Shared.PlanPhaseMinimumAdjustment | Shared.PlanPhaseMaximumAdjustment>;
73
73
  /**
74
74
  * @deprecated Legacy field representing the parent plan if the current plan is a
75
75
  * 'child plan', overriding prices from the parent.
@@ -153,6 +153,80 @@ export interface Plan {
153
153
  version: number;
154
154
  }
155
155
  export declare namespace Plan {
156
+ interface PlanPhaseTieredPercentageDiscountAdjustment {
157
+ id: string;
158
+ adjustment_type: 'tiered_percentage_discount';
159
+ /**
160
+ * @deprecated The price IDs that this adjustment applies to.
161
+ */
162
+ applies_to_price_ids: Array<string>;
163
+ /**
164
+ * The filters that determine which prices to apply this adjustment to.
165
+ */
166
+ filters: Array<PlanPhaseTieredPercentageDiscountAdjustment.Filter>;
167
+ /**
168
+ * True for adjustments that apply to an entire invoice, false for adjustments that
169
+ * apply to only one price.
170
+ */
171
+ is_invoice_level: boolean;
172
+ /**
173
+ * The plan phase in which this adjustment is active.
174
+ */
175
+ plan_phase_order: number | null;
176
+ /**
177
+ * The reason for the adjustment.
178
+ */
179
+ reason: string | null;
180
+ /**
181
+ * The adjustment id this adjustment replaces. This adjustment will take the place
182
+ * of the replaced adjustment in plan version migrations.
183
+ */
184
+ replaces_adjustment_id: string | null;
185
+ /**
186
+ * The ordered, contiguous bands of cumulative eligible spend, each discounted at
187
+ * its own percentage (progressive fill-a-tier), applied to the prices this
188
+ * adjustment covers in a given billing period.
189
+ */
190
+ tiers: Array<PlanPhaseTieredPercentageDiscountAdjustment.Tier>;
191
+ }
192
+ namespace PlanPhaseTieredPercentageDiscountAdjustment {
193
+ interface Filter {
194
+ /**
195
+ * The property of the price to filter on.
196
+ */
197
+ field: 'price_id' | 'item_id' | 'price_type' | 'currency' | 'pricing_unit_id';
198
+ /**
199
+ * Should prices that match the filter be included or excluded.
200
+ */
201
+ operator: 'includes' | 'excludes';
202
+ /**
203
+ * The IDs or values that match this filter.
204
+ */
205
+ values: Array<string>;
206
+ }
207
+ /**
208
+ * One band of a tiered percentage discount. Bounds are denominated in the
209
+ * discount's currency. `lower_bound` is the exclusive start of the band and
210
+ * `upper_bound` is the inclusive end; `upper_bound` is null only for the
211
+ * open-ended final tier.
212
+ */
213
+ interface Tier {
214
+ /**
215
+ * Exclusive lower bound of cumulative spend for this tier.
216
+ */
217
+ lower_bound: number;
218
+ /**
219
+ * The percentage (between 0 and 1) discounted from spend that falls within this
220
+ * tier.
221
+ */
222
+ percentage: number;
223
+ /**
224
+ * Inclusive upper bound of cumulative spend for this tier; null for the final
225
+ * open-ended tier.
226
+ */
227
+ upper_bound?: number | null;
228
+ }
229
+ }
156
230
  /**
157
231
  * @deprecated Legacy field representing the parent plan if the current plan is a
158
232
  * 'child plan', overriding prices from the parent.
@@ -218,6 +292,10 @@ export interface PlanCreateParams {
218
292
  * Free-form text which is available on the invoice PDF and the Orb invoice portal.
219
293
  */
220
294
  default_invoice_memo?: string | null;
295
+ /**
296
+ * An optional user-defined description of the plan.
297
+ */
298
+ description?: string | null;
221
299
  external_plan_id?: string | null;
222
300
  /**
223
301
  * User-specified key/value pairs for the resource. Individual keys can be removed
@@ -253,7 +331,7 @@ export declare namespace PlanCreateParams {
253
331
  /**
254
332
  * The license allocation price to add to the plan.
255
333
  */
256
- license_allocation_price?: Price.NewLicenseAllocationUnitPrice | Price.NewLicenseAllocationTieredPrice | Price.NewLicenseAllocationBulkPrice | Price.NewLicenseAllocationBulkWithFiltersPrice | Price.NewLicenseAllocationPackagePrice | Price.NewLicenseAllocationMatrixPrice | Price.NewLicenseAllocationThresholdTotalAmountPrice | Price.NewLicenseAllocationTieredPackagePrice | Price.NewLicenseAllocationTieredWithMinimumPrice | Price.NewLicenseAllocationGroupedTieredPrice | Price.NewLicenseAllocationTieredPackageWithMinimumPrice | Price.NewLicenseAllocationPackageWithAllocationPrice | Price.NewLicenseAllocationUnitWithPercentPrice | Price.NewLicenseAllocationMatrixWithAllocationPrice | Price.NewLicenseAllocationTieredWithProrationPrice | Price.NewLicenseAllocationUnitWithProrationPrice | Price.NewLicenseAllocationGroupedAllocationPrice | Price.NewLicenseAllocationBulkWithProrationPrice | Price.NewLicenseAllocationGroupedWithProratedMinimumPrice | Price.NewLicenseAllocationGroupedWithMeteredMinimumPrice | Price.NewLicenseAllocationGroupedWithMinMaxThresholdsPrice | Price.NewLicenseAllocationMatrixWithDisplayNamePrice | Price.NewLicenseAllocationGroupedTieredPackagePrice | Price.NewLicenseAllocationMaxGroupTieredPackagePrice | Price.NewLicenseAllocationScalableMatrixWithUnitPricingPrice | Price.NewLicenseAllocationScalableMatrixWithTieredPricingPrice | Price.NewLicenseAllocationCumulativeGroupedBulkPrice | Price.NewLicenseAllocationCumulativeGroupedAllocationPrice | Price.NewLicenseAllocationMinimumCompositePrice | Price.NewLicenseAllocationPercentCompositePrice | Price.NewLicenseAllocationEventOutputPrice | null;
334
+ license_allocation_price?: Price.LicenseAllocationPrice | null;
257
335
  /**
258
336
  * The phase to add this price to.
259
337
  */
@@ -261,10 +339,13 @@ export declare namespace PlanCreateParams {
261
339
  /**
262
340
  * New plan price request body params.
263
341
  */
264
- price?: Shared.NewPlanUnitPrice | Shared.NewPlanTieredPrice | Shared.NewPlanBulkPrice | Price.NewPlanBulkWithFiltersPrice | Shared.NewPlanPackagePrice | Shared.NewPlanMatrixPrice | Shared.NewPlanThresholdTotalAmountPrice | Shared.NewPlanTieredPackagePrice | Shared.NewPlanTieredWithMinimumPrice | Shared.NewPlanGroupedTieredPrice | Shared.NewPlanTieredPackageWithMinimumPrice | Shared.NewPlanPackageWithAllocationPrice | Shared.NewPlanUnitWithPercentPrice | Shared.NewPlanMatrixWithAllocationPrice | Price.NewPlanTieredWithProrationPrice | Shared.NewPlanUnitWithProrationPrice | Shared.NewPlanGroupedAllocationPrice | Shared.NewPlanBulkWithProrationPrice | Shared.NewPlanGroupedWithProratedMinimumPrice | Shared.NewPlanGroupedWithMeteredMinimumPrice | Price.NewPlanGroupedWithMinMaxThresholdsPrice | Shared.NewPlanMatrixWithDisplayNamePrice | Shared.NewPlanGroupedTieredPackagePrice | Shared.NewPlanMaxGroupTieredPackagePrice | Shared.NewPlanScalableMatrixWithUnitPricingPrice | Shared.NewPlanScalableMatrixWithTieredPricingPrice | Shared.NewPlanCumulativeGroupedBulkPrice | Price.NewPlanCumulativeGroupedAllocationPrice | Shared.NewPlanMinimumCompositePrice | Price.NewPlanPercentCompositePrice | Price.NewPlanEventOutputPrice | null;
342
+ price?: Shared.NewPlanUnitPrice | Shared.NewPlanTieredPrice | Shared.NewPlanBulkPrice | Price.NewPlanBulkWithFiltersPrice | Shared.NewPlanPackagePrice | Shared.NewPlanMatrixPrice | Shared.NewPlanThresholdTotalAmountPrice | Shared.NewPlanTieredPackagePrice | Shared.NewPlanTieredWithMinimumPrice | Shared.NewPlanGroupedTieredPrice | Shared.NewPlanTieredPackageWithMinimumPrice | Shared.NewPlanPackageWithAllocationPrice | Shared.NewPlanUnitWithPercentPrice | Shared.NewPlanMatrixWithAllocationPrice | Price.NewPlanMatrixWithThresholdDiscountsPrice | Price.NewPlanTieredWithProrationPrice | Shared.NewPlanUnitWithProrationPrice | Shared.NewPlanGroupedAllocationPrice | Shared.NewPlanBulkWithProrationPrice | Shared.NewPlanGroupedWithProratedMinimumPrice | Shared.NewPlanGroupedWithMeteredMinimumPrice | Price.NewPlanGroupedWithMinMaxThresholdsPrice | Shared.NewPlanMatrixWithDisplayNamePrice | Shared.NewPlanGroupedTieredPackagePrice | Shared.NewPlanMaxGroupTieredPackagePrice | Shared.NewPlanScalableMatrixWithUnitPricingPrice | Shared.NewPlanScalableMatrixWithTieredPricingPrice | Shared.NewPlanCumulativeGroupedBulkPrice | Price.NewPlanCumulativeGroupedAllocationPrice | Price.NewPlanDailyCreditAllowancePrice | Price.NewPlanMeteredAllowancePrice | Shared.NewPlanMinimumCompositePrice | Price.NewPlanPercentCompositePrice | Price.NewPlanEventOutputPrice | null;
265
343
  }
266
344
  namespace Price {
267
- interface NewLicenseAllocationUnitPrice {
345
+ /**
346
+ * The license allocation price to add to the plan.
347
+ */
348
+ interface LicenseAllocationPrice {
268
349
  /**
269
350
  * The cadence to bill for this price on.
270
351
  */
@@ -278,7 +359,7 @@ export declare namespace PlanCreateParams {
278
359
  * per-license credit pool granted each cadence. Requires license_type_id or
279
360
  * license_type_configuration to be set.
280
361
  */
281
- license_allocations: Array<NewLicenseAllocationUnitPrice.LicenseAllocation>;
362
+ license_allocations: Array<LicenseAllocationPrice.LicenseAllocation>;
282
363
  /**
283
364
  * The pricing model type
284
365
  */
@@ -359,7 +440,7 @@ export declare namespace PlanCreateParams {
359
440
  */
360
441
  reference_id?: string | null;
361
442
  }
362
- namespace NewLicenseAllocationUnitPrice {
443
+ namespace LicenseAllocationPrice {
363
444
  interface LicenseAllocation {
364
445
  /**
365
446
  * The amount of credits granted per active license per cadence.
@@ -375,7 +456,11 @@ export declare namespace PlanCreateParams {
375
456
  write_off_overage?: boolean | null;
376
457
  }
377
458
  }
378
- interface NewLicenseAllocationTieredPrice {
459
+ interface NewPlanBulkWithFiltersPrice {
460
+ /**
461
+ * Configuration for bulk_with_filters pricing
462
+ */
463
+ bulk_with_filters_config: NewPlanBulkWithFiltersPrice.BulkWithFiltersConfig;
379
464
  /**
380
465
  * The cadence to bill for this price on.
381
466
  */
@@ -384,24 +469,14 @@ export declare namespace PlanCreateParams {
384
469
  * The id of the item the price will be associated with.
385
470
  */
386
471
  item_id: string;
387
- /**
388
- * License allocations to associate with this price. Each entry defines a
389
- * per-license credit pool granted each cadence. Requires license_type_id or
390
- * license_type_configuration to be set.
391
- */
392
- license_allocations: Array<NewLicenseAllocationTieredPrice.LicenseAllocation>;
393
472
  /**
394
473
  * The pricing model type
395
474
  */
396
- model_type: 'tiered';
475
+ model_type: 'bulk_with_filters';
397
476
  /**
398
477
  * The name of the price.
399
478
  */
400
479
  name: string;
401
- /**
402
- * Configuration for tiered pricing
403
- */
404
- tiered_config: Shared.TieredConfig;
405
480
  /**
406
481
  * The id of the billable metric for the price. Only needed if the price is
407
482
  * usage-based.
@@ -470,138 +545,50 @@ export declare namespace PlanCreateParams {
470
545
  */
471
546
  reference_id?: string | null;
472
547
  }
473
- namespace NewLicenseAllocationTieredPrice {
474
- interface LicenseAllocation {
475
- /**
476
- * The amount of credits granted per active license per cadence.
477
- */
478
- amount: string;
548
+ namespace NewPlanBulkWithFiltersPrice {
549
+ /**
550
+ * Configuration for bulk_with_filters pricing
551
+ */
552
+ interface BulkWithFiltersConfig {
479
553
  /**
480
- * The currency of the license allocation.
554
+ * Property filters to apply (all must match)
481
555
  */
482
- currency: string;
556
+ filters: Array<BulkWithFiltersConfig.Filter>;
483
557
  /**
484
- * When True, overage beyond the allocation is written off.
558
+ * Bulk tiers for rating based on total usage volume
485
559
  */
486
- write_off_overage?: boolean | null;
560
+ tiers: Array<BulkWithFiltersConfig.Tier>;
487
561
  }
488
- }
489
- interface NewLicenseAllocationBulkPrice {
490
- /**
491
- * Configuration for bulk pricing
492
- */
493
- bulk_config: Shared.BulkConfig;
494
- /**
495
- * The cadence to bill for this price on.
496
- */
497
- cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
498
- /**
499
- * The id of the item the price will be associated with.
500
- */
501
- item_id: string;
502
- /**
503
- * License allocations to associate with this price. Each entry defines a
504
- * per-license credit pool granted each cadence. Requires license_type_id or
505
- * license_type_configuration to be set.
506
- */
507
- license_allocations: Array<NewLicenseAllocationBulkPrice.LicenseAllocation>;
508
- /**
509
- * The pricing model type
510
- */
511
- model_type: 'bulk';
512
- /**
513
- * The name of the price.
514
- */
515
- name: string;
516
- /**
517
- * The id of the billable metric for the price. Only needed if the price is
518
- * usage-based.
519
- */
520
- billable_metric_id?: string | null;
521
- /**
522
- * If the Price represents a fixed cost, the price will be billed in-advance if
523
- * this is true, and in-arrears if this is false.
524
- */
525
- billed_in_advance?: boolean | null;
526
- /**
527
- * For custom cadence: specifies the duration of the billing period in days or
528
- * months.
529
- */
530
- billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
531
- /**
532
- * The per unit conversion rate of the price currency to the invoicing currency.
533
- */
534
- conversion_rate?: number | null;
535
- /**
536
- * The configuration for the rate of the price currency to the invoicing currency.
537
- */
538
- conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
539
- /**
540
- * An ISO 4217 currency string, or custom pricing unit identifier, in which this
541
- * price is billed.
542
- */
543
- currency?: string | null;
544
- /**
545
- * For dimensional price: specifies a price group and dimension values
546
- */
547
- dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
548
- /**
549
- * An alias for the price.
550
- */
551
- external_price_id?: string | null;
552
- /**
553
- * If the Price represents a fixed cost, this represents the quantity of units
554
- * applied.
555
- */
556
- fixed_price_quantity?: number | null;
557
- /**
558
- * The property used to group this price on an invoice
559
- */
560
- invoice_grouping_key?: string | null;
561
- /**
562
- * Within each billing cycle, specifies the cadence at which invoices are produced.
563
- * If unspecified, a single invoice is produced per billing cycle.
564
- */
565
- invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
566
- /**
567
- * The ID of the license type to associate with this price.
568
- */
569
- license_type_id?: string | null;
570
- /**
571
- * User-specified key/value pairs for the resource. Individual keys can be removed
572
- * by setting the value to `null`, and the entire metadata mapping can be cleared
573
- * by setting `metadata` to `null`.
574
- */
575
- metadata?: {
576
- [key: string]: string | null;
577
- } | null;
578
- /**
579
- * A transient ID that can be used to reference this price when adding adjustments
580
- * in the same API call.
581
- */
582
- reference_id?: string | null;
583
- }
584
- namespace NewLicenseAllocationBulkPrice {
585
- interface LicenseAllocation {
586
- /**
587
- * The amount of credits granted per active license per cadence.
588
- */
589
- amount: string;
562
+ namespace BulkWithFiltersConfig {
590
563
  /**
591
- * The currency of the license allocation.
564
+ * Configuration for a single property filter
592
565
  */
593
- currency: string;
566
+ interface Filter {
567
+ /**
568
+ * Event property key to filter on
569
+ */
570
+ property_key: string;
571
+ /**
572
+ * Event property value to match
573
+ */
574
+ property_value: string;
575
+ }
594
576
  /**
595
- * When True, overage beyond the allocation is written off.
577
+ * Configuration for a single bulk pricing tier
596
578
  */
597
- write_off_overage?: boolean | null;
579
+ interface Tier {
580
+ /**
581
+ * Amount per unit
582
+ */
583
+ unit_amount: string;
584
+ /**
585
+ * The lower bound for this tier
586
+ */
587
+ tier_lower_bound?: string | null;
588
+ }
598
589
  }
599
590
  }
600
- interface NewLicenseAllocationBulkWithFiltersPrice {
601
- /**
602
- * Configuration for bulk_with_filters pricing
603
- */
604
- bulk_with_filters_config: NewLicenseAllocationBulkWithFiltersPrice.BulkWithFiltersConfig;
591
+ interface NewPlanMatrixWithThresholdDiscountsPrice {
605
592
  /**
606
593
  * The cadence to bill for this price on.
607
594
  */
@@ -611,15 +598,13 @@ export declare namespace PlanCreateParams {
611
598
  */
612
599
  item_id: string;
613
600
  /**
614
- * License allocations to associate with this price. Each entry defines a
615
- * per-license credit pool granted each cadence. Requires license_type_id or
616
- * license_type_configuration to be set.
601
+ * Configuration for matrix_with_threshold_discounts pricing
617
602
  */
618
- license_allocations: Array<NewLicenseAllocationBulkWithFiltersPrice.LicenseAllocation>;
603
+ matrix_with_threshold_discounts_config: NewPlanMatrixWithThresholdDiscountsPrice.MatrixWithThresholdDiscountsConfig;
619
604
  /**
620
605
  * The pricing model type
621
606
  */
622
- model_type: 'bulk_with_filters';
607
+ model_type: 'matrix_with_threshold_discounts';
623
608
  /**
624
609
  * The name of the price.
625
610
  */
@@ -692,3520 +677,77 @@ export declare namespace PlanCreateParams {
692
677
  */
693
678
  reference_id?: string | null;
694
679
  }
695
- namespace NewLicenseAllocationBulkWithFiltersPrice {
680
+ namespace NewPlanMatrixWithThresholdDiscountsPrice {
696
681
  /**
697
- * Configuration for bulk_with_filters pricing
682
+ * Configuration for matrix_with_threshold_discounts pricing
698
683
  */
699
- interface BulkWithFiltersConfig {
700
- /**
701
- * Property filters to apply (all must match)
702
- */
703
- filters: Array<BulkWithFiltersConfig.Filter>;
704
- /**
705
- * Bulk tiers for rating based on total usage volume
706
- */
707
- tiers: Array<BulkWithFiltersConfig.Tier>;
708
- }
709
- namespace BulkWithFiltersConfig {
710
- /**
711
- * Configuration for a single property filter
712
- */
713
- interface Filter {
714
- /**
715
- * Event property key to filter on
716
- */
717
- property_key: string;
718
- /**
719
- * Event property value to match
720
- */
721
- property_value: string;
722
- }
684
+ interface MatrixWithThresholdDiscountsConfig {
723
685
  /**
724
- * Configuration for a single bulk pricing tier
686
+ * Unit price used for usage that does not match any defined matrix cell.
725
687
  */
726
- interface Tier {
727
- /**
728
- * Amount per unit
729
- */
730
- unit_amount: string;
731
- /**
732
- * The lower bound for this tier
733
- */
734
- tier_lower_bound?: string | null;
735
- }
736
- }
737
- interface LicenseAllocation {
688
+ default_unit_amount: string;
738
689
  /**
739
- * The amount of credits granted per active license per cadence.
690
+ * First matrix dimension key.
740
691
  */
741
- amount: string;
692
+ first_dimension: string;
742
693
  /**
743
- * The currency of the license allocation.
694
+ * Per-cell unit prices.
744
695
  */
745
- currency: string;
696
+ matrix_values: Array<MatrixWithThresholdDiscountsConfig.MatrixValue>;
746
697
  /**
747
- * When True, overage beyond the allocation is written off.
698
+ * Optional second matrix dimension key.
748
699
  */
749
- write_off_overage?: boolean | null;
700
+ second_dimension?: string | null;
701
+ threshold_discount_groups?: Array<MatrixWithThresholdDiscountsConfig.ThresholdDiscountGroup>;
750
702
  }
751
- }
752
- interface NewLicenseAllocationPackagePrice {
753
- /**
754
- * The cadence to bill for this price on.
755
- */
756
- cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
757
- /**
758
- * The id of the item the price will be associated with.
759
- */
760
- item_id: string;
761
- /**
762
- * License allocations to associate with this price. Each entry defines a
763
- * per-license credit pool granted each cadence. Requires license_type_id or
764
- * license_type_configuration to be set.
765
- */
766
- license_allocations: Array<NewLicenseAllocationPackagePrice.LicenseAllocation>;
767
- /**
768
- * The pricing model type
769
- */
770
- model_type: 'package';
771
- /**
772
- * The name of the price.
773
- */
774
- name: string;
775
- /**
776
- * Configuration for package pricing
777
- */
778
- package_config: Shared.PackageConfig;
779
- /**
780
- * The id of the billable metric for the price. Only needed if the price is
781
- * usage-based.
782
- */
783
- billable_metric_id?: string | null;
784
- /**
785
- * If the Price represents a fixed cost, the price will be billed in-advance if
786
- * this is true, and in-arrears if this is false.
787
- */
788
- billed_in_advance?: boolean | null;
789
- /**
790
- * For custom cadence: specifies the duration of the billing period in days or
791
- * months.
792
- */
793
- billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
794
- /**
795
- * The per unit conversion rate of the price currency to the invoicing currency.
796
- */
797
- conversion_rate?: number | null;
798
- /**
799
- * The configuration for the rate of the price currency to the invoicing currency.
800
- */
801
- conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
802
- /**
803
- * An ISO 4217 currency string, or custom pricing unit identifier, in which this
804
- * price is billed.
805
- */
806
- currency?: string | null;
807
- /**
808
- * For dimensional price: specifies a price group and dimension values
809
- */
810
- dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
811
- /**
812
- * An alias for the price.
813
- */
814
- external_price_id?: string | null;
815
- /**
816
- * If the Price represents a fixed cost, this represents the quantity of units
817
- * applied.
818
- */
819
- fixed_price_quantity?: number | null;
820
- /**
821
- * The property used to group this price on an invoice
822
- */
823
- invoice_grouping_key?: string | null;
824
- /**
825
- * Within each billing cycle, specifies the cadence at which invoices are produced.
826
- * If unspecified, a single invoice is produced per billing cycle.
827
- */
828
- invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
829
- /**
830
- * The ID of the license type to associate with this price.
831
- */
832
- license_type_id?: string | null;
833
- /**
834
- * User-specified key/value pairs for the resource. Individual keys can be removed
835
- * by setting the value to `null`, and the entire metadata mapping can be cleared
836
- * by setting `metadata` to `null`.
837
- */
838
- metadata?: {
839
- [key: string]: string | null;
840
- } | null;
841
- /**
842
- * A transient ID that can be used to reference this price when adding adjustments
843
- * in the same API call.
844
- */
845
- reference_id?: string | null;
846
- }
847
- namespace NewLicenseAllocationPackagePrice {
848
- interface LicenseAllocation {
849
- /**
850
- * The amount of credits granted per active license per cadence.
851
- */
852
- amount: string;
853
- /**
854
- * The currency of the license allocation.
855
- */
856
- currency: string;
857
- /**
858
- * When True, overage beyond the allocation is written off.
859
- */
860
- write_off_overage?: boolean | null;
861
- }
862
- }
863
- interface NewLicenseAllocationMatrixPrice {
864
- /**
865
- * The cadence to bill for this price on.
866
- */
867
- cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
868
- /**
869
- * The id of the item the price will be associated with.
870
- */
871
- item_id: string;
872
- /**
873
- * License allocations to associate with this price. Each entry defines a
874
- * per-license credit pool granted each cadence. Requires license_type_id or
875
- * license_type_configuration to be set.
876
- */
877
- license_allocations: Array<NewLicenseAllocationMatrixPrice.LicenseAllocation>;
878
- /**
879
- * Configuration for matrix pricing
880
- */
881
- matrix_config: Shared.MatrixConfig;
882
- /**
883
- * The pricing model type
884
- */
885
- model_type: 'matrix';
886
- /**
887
- * The name of the price.
888
- */
889
- name: string;
890
- /**
891
- * The id of the billable metric for the price. Only needed if the price is
892
- * usage-based.
893
- */
894
- billable_metric_id?: string | null;
895
- /**
896
- * If the Price represents a fixed cost, the price will be billed in-advance if
897
- * this is true, and in-arrears if this is false.
898
- */
899
- billed_in_advance?: boolean | null;
900
- /**
901
- * For custom cadence: specifies the duration of the billing period in days or
902
- * months.
903
- */
904
- billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
905
- /**
906
- * The per unit conversion rate of the price currency to the invoicing currency.
907
- */
908
- conversion_rate?: number | null;
909
- /**
910
- * The configuration for the rate of the price currency to the invoicing currency.
911
- */
912
- conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
913
- /**
914
- * An ISO 4217 currency string, or custom pricing unit identifier, in which this
915
- * price is billed.
916
- */
917
- currency?: string | null;
918
- /**
919
- * For dimensional price: specifies a price group and dimension values
920
- */
921
- dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
922
- /**
923
- * An alias for the price.
924
- */
925
- external_price_id?: string | null;
926
- /**
927
- * If the Price represents a fixed cost, this represents the quantity of units
928
- * applied.
929
- */
930
- fixed_price_quantity?: number | null;
931
- /**
932
- * The property used to group this price on an invoice
933
- */
934
- invoice_grouping_key?: string | null;
935
- /**
936
- * Within each billing cycle, specifies the cadence at which invoices are produced.
937
- * If unspecified, a single invoice is produced per billing cycle.
938
- */
939
- invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
940
- /**
941
- * The ID of the license type to associate with this price.
942
- */
943
- license_type_id?: string | null;
944
- /**
945
- * User-specified key/value pairs for the resource. Individual keys can be removed
946
- * by setting the value to `null`, and the entire metadata mapping can be cleared
947
- * by setting `metadata` to `null`.
948
- */
949
- metadata?: {
950
- [key: string]: string | null;
951
- } | null;
952
- /**
953
- * A transient ID that can be used to reference this price when adding adjustments
954
- * in the same API call.
955
- */
956
- reference_id?: string | null;
957
- }
958
- namespace NewLicenseAllocationMatrixPrice {
959
- interface LicenseAllocation {
960
- /**
961
- * The amount of credits granted per active license per cadence.
962
- */
963
- amount: string;
964
- /**
965
- * The currency of the license allocation.
966
- */
967
- currency: string;
968
- /**
969
- * When True, overage beyond the allocation is written off.
970
- */
971
- write_off_overage?: boolean | null;
972
- }
973
- }
974
- interface NewLicenseAllocationThresholdTotalAmountPrice {
975
- /**
976
- * The cadence to bill for this price on.
977
- */
978
- cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
979
- /**
980
- * The id of the item the price will be associated with.
981
- */
982
- item_id: string;
983
- /**
984
- * License allocations to associate with this price. Each entry defines a
985
- * per-license credit pool granted each cadence. Requires license_type_id or
986
- * license_type_configuration to be set.
987
- */
988
- license_allocations: Array<NewLicenseAllocationThresholdTotalAmountPrice.LicenseAllocation>;
989
- /**
990
- * The pricing model type
991
- */
992
- model_type: 'threshold_total_amount';
993
- /**
994
- * The name of the price.
995
- */
996
- name: string;
997
- /**
998
- * Configuration for threshold_total_amount pricing
999
- */
1000
- threshold_total_amount_config: NewLicenseAllocationThresholdTotalAmountPrice.ThresholdTotalAmountConfig;
1001
- /**
1002
- * The id of the billable metric for the price. Only needed if the price is
1003
- * usage-based.
1004
- */
1005
- billable_metric_id?: string | null;
1006
- /**
1007
- * If the Price represents a fixed cost, the price will be billed in-advance if
1008
- * this is true, and in-arrears if this is false.
1009
- */
1010
- billed_in_advance?: boolean | null;
1011
- /**
1012
- * For custom cadence: specifies the duration of the billing period in days or
1013
- * months.
1014
- */
1015
- billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
1016
- /**
1017
- * The per unit conversion rate of the price currency to the invoicing currency.
1018
- */
1019
- conversion_rate?: number | null;
1020
- /**
1021
- * The configuration for the rate of the price currency to the invoicing currency.
1022
- */
1023
- conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
1024
- /**
1025
- * An ISO 4217 currency string, or custom pricing unit identifier, in which this
1026
- * price is billed.
1027
- */
1028
- currency?: string | null;
1029
- /**
1030
- * For dimensional price: specifies a price group and dimension values
1031
- */
1032
- dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
1033
- /**
1034
- * An alias for the price.
1035
- */
1036
- external_price_id?: string | null;
1037
- /**
1038
- * If the Price represents a fixed cost, this represents the quantity of units
1039
- * applied.
1040
- */
1041
- fixed_price_quantity?: number | null;
1042
- /**
1043
- * The property used to group this price on an invoice
1044
- */
1045
- invoice_grouping_key?: string | null;
1046
- /**
1047
- * Within each billing cycle, specifies the cadence at which invoices are produced.
1048
- * If unspecified, a single invoice is produced per billing cycle.
1049
- */
1050
- invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
1051
- /**
1052
- * The ID of the license type to associate with this price.
1053
- */
1054
- license_type_id?: string | null;
1055
- /**
1056
- * User-specified key/value pairs for the resource. Individual keys can be removed
1057
- * by setting the value to `null`, and the entire metadata mapping can be cleared
1058
- * by setting `metadata` to `null`.
1059
- */
1060
- metadata?: {
1061
- [key: string]: string | null;
1062
- } | null;
1063
- /**
1064
- * A transient ID that can be used to reference this price when adding adjustments
1065
- * in the same API call.
1066
- */
1067
- reference_id?: string | null;
1068
- }
1069
- namespace NewLicenseAllocationThresholdTotalAmountPrice {
1070
- interface LicenseAllocation {
1071
- /**
1072
- * The amount of credits granted per active license per cadence.
1073
- */
1074
- amount: string;
1075
- /**
1076
- * The currency of the license allocation.
1077
- */
1078
- currency: string;
1079
- /**
1080
- * When True, overage beyond the allocation is written off.
1081
- */
1082
- write_off_overage?: boolean | null;
1083
- }
1084
- /**
1085
- * Configuration for threshold_total_amount pricing
1086
- */
1087
- interface ThresholdTotalAmountConfig {
1088
- /**
1089
- * When the quantity consumed passes a provided threshold, the configured total
1090
- * will be charged
1091
- */
1092
- consumption_table: Array<ThresholdTotalAmountConfig.ConsumptionTable>;
1093
- /**
1094
- * If true, the unit price will be prorated to the billing period
1095
- */
1096
- prorate?: boolean | null;
1097
- }
1098
- namespace ThresholdTotalAmountConfig {
1099
- /**
1100
- * Configuration for a single threshold
1101
- */
1102
- interface ConsumptionTable {
1103
- threshold: string;
1104
- /**
1105
- * Total amount for this threshold
1106
- */
1107
- total_amount: string;
1108
- }
1109
- }
1110
- }
1111
- interface NewLicenseAllocationTieredPackagePrice {
1112
- /**
1113
- * The cadence to bill for this price on.
1114
- */
1115
- cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
1116
- /**
1117
- * The id of the item the price will be associated with.
1118
- */
1119
- item_id: string;
1120
- /**
1121
- * License allocations to associate with this price. Each entry defines a
1122
- * per-license credit pool granted each cadence. Requires license_type_id or
1123
- * license_type_configuration to be set.
1124
- */
1125
- license_allocations: Array<NewLicenseAllocationTieredPackagePrice.LicenseAllocation>;
1126
- /**
1127
- * The pricing model type
1128
- */
1129
- model_type: 'tiered_package';
1130
- /**
1131
- * The name of the price.
1132
- */
1133
- name: string;
1134
- /**
1135
- * Configuration for tiered_package pricing
1136
- */
1137
- tiered_package_config: NewLicenseAllocationTieredPackagePrice.TieredPackageConfig;
1138
- /**
1139
- * The id of the billable metric for the price. Only needed if the price is
1140
- * usage-based.
1141
- */
1142
- billable_metric_id?: string | null;
1143
- /**
1144
- * If the Price represents a fixed cost, the price will be billed in-advance if
1145
- * this is true, and in-arrears if this is false.
1146
- */
1147
- billed_in_advance?: boolean | null;
1148
- /**
1149
- * For custom cadence: specifies the duration of the billing period in days or
1150
- * months.
1151
- */
1152
- billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
1153
- /**
1154
- * The per unit conversion rate of the price currency to the invoicing currency.
1155
- */
1156
- conversion_rate?: number | null;
1157
- /**
1158
- * The configuration for the rate of the price currency to the invoicing currency.
1159
- */
1160
- conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
1161
- /**
1162
- * An ISO 4217 currency string, or custom pricing unit identifier, in which this
1163
- * price is billed.
1164
- */
1165
- currency?: string | null;
1166
- /**
1167
- * For dimensional price: specifies a price group and dimension values
1168
- */
1169
- dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
1170
- /**
1171
- * An alias for the price.
1172
- */
1173
- external_price_id?: string | null;
1174
- /**
1175
- * If the Price represents a fixed cost, this represents the quantity of units
1176
- * applied.
1177
- */
1178
- fixed_price_quantity?: number | null;
1179
- /**
1180
- * The property used to group this price on an invoice
1181
- */
1182
- invoice_grouping_key?: string | null;
1183
- /**
1184
- * Within each billing cycle, specifies the cadence at which invoices are produced.
1185
- * If unspecified, a single invoice is produced per billing cycle.
1186
- */
1187
- invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
1188
- /**
1189
- * The ID of the license type to associate with this price.
1190
- */
1191
- license_type_id?: string | null;
1192
- /**
1193
- * User-specified key/value pairs for the resource. Individual keys can be removed
1194
- * by setting the value to `null`, and the entire metadata mapping can be cleared
1195
- * by setting `metadata` to `null`.
1196
- */
1197
- metadata?: {
1198
- [key: string]: string | null;
1199
- } | null;
1200
- /**
1201
- * A transient ID that can be used to reference this price when adding adjustments
1202
- * in the same API call.
1203
- */
1204
- reference_id?: string | null;
1205
- }
1206
- namespace NewLicenseAllocationTieredPackagePrice {
1207
- interface LicenseAllocation {
1208
- /**
1209
- * The amount of credits granted per active license per cadence.
1210
- */
1211
- amount: string;
1212
- /**
1213
- * The currency of the license allocation.
1214
- */
1215
- currency: string;
1216
- /**
1217
- * When True, overage beyond the allocation is written off.
1218
- */
1219
- write_off_overage?: boolean | null;
1220
- }
1221
- /**
1222
- * Configuration for tiered_package pricing
1223
- */
1224
- interface TieredPackageConfig {
1225
- package_size: string;
1226
- /**
1227
- * Apply tiered pricing after rounding up the quantity to the package size. Tiers
1228
- * are defined using exclusive lower bounds. The tier bounds are defined based on
1229
- * the total quantity rather than the number of packages, so they must be multiples
1230
- * of the package size.
1231
- */
1232
- tiers: Array<TieredPackageConfig.Tier>;
1233
- }
1234
- namespace TieredPackageConfig {
1235
- /**
1236
- * Configuration for a single tier with business logic
1237
- */
1238
- interface Tier {
1239
- /**
1240
- * Price per package
1241
- */
1242
- per_unit: string;
1243
- tier_lower_bound: string;
1244
- }
1245
- }
1246
- }
1247
- interface NewLicenseAllocationTieredWithMinimumPrice {
1248
- /**
1249
- * The cadence to bill for this price on.
1250
- */
1251
- cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
1252
- /**
1253
- * The id of the item the price will be associated with.
1254
- */
1255
- item_id: string;
1256
- /**
1257
- * License allocations to associate with this price. Each entry defines a
1258
- * per-license credit pool granted each cadence. Requires license_type_id or
1259
- * license_type_configuration to be set.
1260
- */
1261
- license_allocations: Array<NewLicenseAllocationTieredWithMinimumPrice.LicenseAllocation>;
1262
- /**
1263
- * The pricing model type
1264
- */
1265
- model_type: 'tiered_with_minimum';
1266
- /**
1267
- * The name of the price.
1268
- */
1269
- name: string;
1270
- /**
1271
- * Configuration for tiered_with_minimum pricing
1272
- */
1273
- tiered_with_minimum_config: NewLicenseAllocationTieredWithMinimumPrice.TieredWithMinimumConfig;
1274
- /**
1275
- * The id of the billable metric for the price. Only needed if the price is
1276
- * usage-based.
1277
- */
1278
- billable_metric_id?: string | null;
1279
- /**
1280
- * If the Price represents a fixed cost, the price will be billed in-advance if
1281
- * this is true, and in-arrears if this is false.
1282
- */
1283
- billed_in_advance?: boolean | null;
1284
- /**
1285
- * For custom cadence: specifies the duration of the billing period in days or
1286
- * months.
1287
- */
1288
- billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
1289
- /**
1290
- * The per unit conversion rate of the price currency to the invoicing currency.
1291
- */
1292
- conversion_rate?: number | null;
1293
- /**
1294
- * The configuration for the rate of the price currency to the invoicing currency.
1295
- */
1296
- conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
1297
- /**
1298
- * An ISO 4217 currency string, or custom pricing unit identifier, in which this
1299
- * price is billed.
1300
- */
1301
- currency?: string | null;
1302
- /**
1303
- * For dimensional price: specifies a price group and dimension values
1304
- */
1305
- dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
1306
- /**
1307
- * An alias for the price.
1308
- */
1309
- external_price_id?: string | null;
1310
- /**
1311
- * If the Price represents a fixed cost, this represents the quantity of units
1312
- * applied.
1313
- */
1314
- fixed_price_quantity?: number | null;
1315
- /**
1316
- * The property used to group this price on an invoice
1317
- */
1318
- invoice_grouping_key?: string | null;
1319
- /**
1320
- * Within each billing cycle, specifies the cadence at which invoices are produced.
1321
- * If unspecified, a single invoice is produced per billing cycle.
1322
- */
1323
- invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
1324
- /**
1325
- * The ID of the license type to associate with this price.
1326
- */
1327
- license_type_id?: string | null;
1328
- /**
1329
- * User-specified key/value pairs for the resource. Individual keys can be removed
1330
- * by setting the value to `null`, and the entire metadata mapping can be cleared
1331
- * by setting `metadata` to `null`.
1332
- */
1333
- metadata?: {
1334
- [key: string]: string | null;
1335
- } | null;
1336
- /**
1337
- * A transient ID that can be used to reference this price when adding adjustments
1338
- * in the same API call.
1339
- */
1340
- reference_id?: string | null;
1341
- }
1342
- namespace NewLicenseAllocationTieredWithMinimumPrice {
1343
- interface LicenseAllocation {
1344
- /**
1345
- * The amount of credits granted per active license per cadence.
1346
- */
1347
- amount: string;
1348
- /**
1349
- * The currency of the license allocation.
1350
- */
1351
- currency: string;
1352
- /**
1353
- * When True, overage beyond the allocation is written off.
1354
- */
1355
- write_off_overage?: boolean | null;
1356
- }
1357
- /**
1358
- * Configuration for tiered_with_minimum pricing
1359
- */
1360
- interface TieredWithMinimumConfig {
1361
- /**
1362
- * Tiered pricing with a minimum amount dependent on the volume tier. Tiers are
1363
- * defined using exclusive lower bounds.
1364
- */
1365
- tiers: Array<TieredWithMinimumConfig.Tier>;
1366
- /**
1367
- * If true, tiers with an accrued amount of 0 will not be included in the rating.
1368
- */
1369
- hide_zero_amount_tiers?: boolean;
1370
- /**
1371
- * If true, the unit price will be prorated to the billing period
1372
- */
1373
- prorate?: boolean;
1374
- }
1375
- namespace TieredWithMinimumConfig {
1376
- /**
1377
- * Configuration for a single tier
1378
- */
1379
- interface Tier {
1380
- minimum_amount: string;
1381
- tier_lower_bound: string;
1382
- /**
1383
- * Per unit amount
1384
- */
1385
- unit_amount: string;
1386
- }
1387
- }
1388
- }
1389
- interface NewLicenseAllocationGroupedTieredPrice {
1390
- /**
1391
- * The cadence to bill for this price on.
1392
- */
1393
- cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
1394
- /**
1395
- * Configuration for grouped_tiered pricing
1396
- */
1397
- grouped_tiered_config: NewLicenseAllocationGroupedTieredPrice.GroupedTieredConfig;
1398
- /**
1399
- * The id of the item the price will be associated with.
1400
- */
1401
- item_id: string;
1402
- /**
1403
- * License allocations to associate with this price. Each entry defines a
1404
- * per-license credit pool granted each cadence. Requires license_type_id or
1405
- * license_type_configuration to be set.
1406
- */
1407
- license_allocations: Array<NewLicenseAllocationGroupedTieredPrice.LicenseAllocation>;
1408
- /**
1409
- * The pricing model type
1410
- */
1411
- model_type: 'grouped_tiered';
1412
- /**
1413
- * The name of the price.
1414
- */
1415
- name: string;
1416
- /**
1417
- * The id of the billable metric for the price. Only needed if the price is
1418
- * usage-based.
1419
- */
1420
- billable_metric_id?: string | null;
1421
- /**
1422
- * If the Price represents a fixed cost, the price will be billed in-advance if
1423
- * this is true, and in-arrears if this is false.
1424
- */
1425
- billed_in_advance?: boolean | null;
1426
- /**
1427
- * For custom cadence: specifies the duration of the billing period in days or
1428
- * months.
1429
- */
1430
- billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
1431
- /**
1432
- * The per unit conversion rate of the price currency to the invoicing currency.
1433
- */
1434
- conversion_rate?: number | null;
1435
- /**
1436
- * The configuration for the rate of the price currency to the invoicing currency.
1437
- */
1438
- conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
1439
- /**
1440
- * An ISO 4217 currency string, or custom pricing unit identifier, in which this
1441
- * price is billed.
1442
- */
1443
- currency?: string | null;
1444
- /**
1445
- * For dimensional price: specifies a price group and dimension values
1446
- */
1447
- dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
1448
- /**
1449
- * An alias for the price.
1450
- */
1451
- external_price_id?: string | null;
1452
- /**
1453
- * If the Price represents a fixed cost, this represents the quantity of units
1454
- * applied.
1455
- */
1456
- fixed_price_quantity?: number | null;
1457
- /**
1458
- * The property used to group this price on an invoice
1459
- */
1460
- invoice_grouping_key?: string | null;
1461
- /**
1462
- * Within each billing cycle, specifies the cadence at which invoices are produced.
1463
- * If unspecified, a single invoice is produced per billing cycle.
1464
- */
1465
- invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
1466
- /**
1467
- * The ID of the license type to associate with this price.
1468
- */
1469
- license_type_id?: string | null;
1470
- /**
1471
- * User-specified key/value pairs for the resource. Individual keys can be removed
1472
- * by setting the value to `null`, and the entire metadata mapping can be cleared
1473
- * by setting `metadata` to `null`.
1474
- */
1475
- metadata?: {
1476
- [key: string]: string | null;
1477
- } | null;
1478
- /**
1479
- * A transient ID that can be used to reference this price when adding adjustments
1480
- * in the same API call.
1481
- */
1482
- reference_id?: string | null;
1483
- }
1484
- namespace NewLicenseAllocationGroupedTieredPrice {
1485
- /**
1486
- * Configuration for grouped_tiered pricing
1487
- */
1488
- interface GroupedTieredConfig {
1489
- /**
1490
- * The billable metric property used to group before tiering
1491
- */
1492
- grouping_key: string;
1493
- /**
1494
- * Apply tiered pricing to each segment generated after grouping with the provided
1495
- * key
1496
- */
1497
- tiers: Array<GroupedTieredConfig.Tier>;
1498
- }
1499
- namespace GroupedTieredConfig {
1500
- /**
1501
- * Configuration for a single tier
1502
- */
1503
- interface Tier {
1504
- tier_lower_bound: string;
1505
- /**
1506
- * Per unit amount
1507
- */
1508
- unit_amount: string;
1509
- }
1510
- }
1511
- interface LicenseAllocation {
1512
- /**
1513
- * The amount of credits granted per active license per cadence.
1514
- */
1515
- amount: string;
1516
- /**
1517
- * The currency of the license allocation.
1518
- */
1519
- currency: string;
1520
- /**
1521
- * When True, overage beyond the allocation is written off.
1522
- */
1523
- write_off_overage?: boolean | null;
1524
- }
1525
- }
1526
- interface NewLicenseAllocationTieredPackageWithMinimumPrice {
1527
- /**
1528
- * The cadence to bill for this price on.
1529
- */
1530
- cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
1531
- /**
1532
- * The id of the item the price will be associated with.
1533
- */
1534
- item_id: string;
1535
- /**
1536
- * License allocations to associate with this price. Each entry defines a
1537
- * per-license credit pool granted each cadence. Requires license_type_id or
1538
- * license_type_configuration to be set.
1539
- */
1540
- license_allocations: Array<NewLicenseAllocationTieredPackageWithMinimumPrice.LicenseAllocation>;
1541
- /**
1542
- * The pricing model type
1543
- */
1544
- model_type: 'tiered_package_with_minimum';
1545
- /**
1546
- * The name of the price.
1547
- */
1548
- name: string;
1549
- /**
1550
- * Configuration for tiered_package_with_minimum pricing
1551
- */
1552
- tiered_package_with_minimum_config: NewLicenseAllocationTieredPackageWithMinimumPrice.TieredPackageWithMinimumConfig;
1553
- /**
1554
- * The id of the billable metric for the price. Only needed if the price is
1555
- * usage-based.
1556
- */
1557
- billable_metric_id?: string | null;
1558
- /**
1559
- * If the Price represents a fixed cost, the price will be billed in-advance if
1560
- * this is true, and in-arrears if this is false.
1561
- */
1562
- billed_in_advance?: boolean | null;
1563
- /**
1564
- * For custom cadence: specifies the duration of the billing period in days or
1565
- * months.
1566
- */
1567
- billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
1568
- /**
1569
- * The per unit conversion rate of the price currency to the invoicing currency.
1570
- */
1571
- conversion_rate?: number | null;
1572
- /**
1573
- * The configuration for the rate of the price currency to the invoicing currency.
1574
- */
1575
- conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
1576
- /**
1577
- * An ISO 4217 currency string, or custom pricing unit identifier, in which this
1578
- * price is billed.
1579
- */
1580
- currency?: string | null;
1581
- /**
1582
- * For dimensional price: specifies a price group and dimension values
1583
- */
1584
- dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
1585
- /**
1586
- * An alias for the price.
1587
- */
1588
- external_price_id?: string | null;
1589
- /**
1590
- * If the Price represents a fixed cost, this represents the quantity of units
1591
- * applied.
1592
- */
1593
- fixed_price_quantity?: number | null;
1594
- /**
1595
- * The property used to group this price on an invoice
1596
- */
1597
- invoice_grouping_key?: string | null;
1598
- /**
1599
- * Within each billing cycle, specifies the cadence at which invoices are produced.
1600
- * If unspecified, a single invoice is produced per billing cycle.
1601
- */
1602
- invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
1603
- /**
1604
- * The ID of the license type to associate with this price.
1605
- */
1606
- license_type_id?: string | null;
1607
- /**
1608
- * User-specified key/value pairs for the resource. Individual keys can be removed
1609
- * by setting the value to `null`, and the entire metadata mapping can be cleared
1610
- * by setting `metadata` to `null`.
1611
- */
1612
- metadata?: {
1613
- [key: string]: string | null;
1614
- } | null;
1615
- /**
1616
- * A transient ID that can be used to reference this price when adding adjustments
1617
- * in the same API call.
1618
- */
1619
- reference_id?: string | null;
1620
- }
1621
- namespace NewLicenseAllocationTieredPackageWithMinimumPrice {
1622
- interface LicenseAllocation {
1623
- /**
1624
- * The amount of credits granted per active license per cadence.
1625
- */
1626
- amount: string;
1627
- /**
1628
- * The currency of the license allocation.
1629
- */
1630
- currency: string;
1631
- /**
1632
- * When True, overage beyond the allocation is written off.
1633
- */
1634
- write_off_overage?: boolean | null;
1635
- }
1636
- /**
1637
- * Configuration for tiered_package_with_minimum pricing
1638
- */
1639
- interface TieredPackageWithMinimumConfig {
1640
- package_size: number;
1641
- /**
1642
- * Apply tiered pricing after rounding up the quantity to the package size. Tiers
1643
- * are defined using exclusive lower bounds.
1644
- */
1645
- tiers: Array<TieredPackageWithMinimumConfig.Tier>;
1646
- }
1647
- namespace TieredPackageWithMinimumConfig {
1648
- /**
1649
- * Configuration for a single tier
1650
- */
1651
- interface Tier {
1652
- minimum_amount: string;
1653
- per_unit: string;
1654
- tier_lower_bound: string;
1655
- }
1656
- }
1657
- }
1658
- interface NewLicenseAllocationPackageWithAllocationPrice {
1659
- /**
1660
- * The cadence to bill for this price on.
1661
- */
1662
- cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
1663
- /**
1664
- * The id of the item the price will be associated with.
1665
- */
1666
- item_id: string;
1667
- /**
1668
- * License allocations to associate with this price. Each entry defines a
1669
- * per-license credit pool granted each cadence. Requires license_type_id or
1670
- * license_type_configuration to be set.
1671
- */
1672
- license_allocations: Array<NewLicenseAllocationPackageWithAllocationPrice.LicenseAllocation>;
1673
- /**
1674
- * The pricing model type
1675
- */
1676
- model_type: 'package_with_allocation';
1677
- /**
1678
- * The name of the price.
1679
- */
1680
- name: string;
1681
- /**
1682
- * Configuration for package_with_allocation pricing
1683
- */
1684
- package_with_allocation_config: NewLicenseAllocationPackageWithAllocationPrice.PackageWithAllocationConfig;
1685
- /**
1686
- * The id of the billable metric for the price. Only needed if the price is
1687
- * usage-based.
1688
- */
1689
- billable_metric_id?: string | null;
1690
- /**
1691
- * If the Price represents a fixed cost, the price will be billed in-advance if
1692
- * this is true, and in-arrears if this is false.
1693
- */
1694
- billed_in_advance?: boolean | null;
1695
- /**
1696
- * For custom cadence: specifies the duration of the billing period in days or
1697
- * months.
1698
- */
1699
- billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
1700
- /**
1701
- * The per unit conversion rate of the price currency to the invoicing currency.
1702
- */
1703
- conversion_rate?: number | null;
1704
- /**
1705
- * The configuration for the rate of the price currency to the invoicing currency.
1706
- */
1707
- conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
1708
- /**
1709
- * An ISO 4217 currency string, or custom pricing unit identifier, in which this
1710
- * price is billed.
1711
- */
1712
- currency?: string | null;
1713
- /**
1714
- * For dimensional price: specifies a price group and dimension values
1715
- */
1716
- dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
1717
- /**
1718
- * An alias for the price.
1719
- */
1720
- external_price_id?: string | null;
1721
- /**
1722
- * If the Price represents a fixed cost, this represents the quantity of units
1723
- * applied.
1724
- */
1725
- fixed_price_quantity?: number | null;
1726
- /**
1727
- * The property used to group this price on an invoice
1728
- */
1729
- invoice_grouping_key?: string | null;
1730
- /**
1731
- * Within each billing cycle, specifies the cadence at which invoices are produced.
1732
- * If unspecified, a single invoice is produced per billing cycle.
1733
- */
1734
- invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
1735
- /**
1736
- * The ID of the license type to associate with this price.
1737
- */
1738
- license_type_id?: string | null;
1739
- /**
1740
- * User-specified key/value pairs for the resource. Individual keys can be removed
1741
- * by setting the value to `null`, and the entire metadata mapping can be cleared
1742
- * by setting `metadata` to `null`.
1743
- */
1744
- metadata?: {
1745
- [key: string]: string | null;
1746
- } | null;
1747
- /**
1748
- * A transient ID that can be used to reference this price when adding adjustments
1749
- * in the same API call.
1750
- */
1751
- reference_id?: string | null;
1752
- }
1753
- namespace NewLicenseAllocationPackageWithAllocationPrice {
1754
- interface LicenseAllocation {
1755
- /**
1756
- * The amount of credits granted per active license per cadence.
1757
- */
1758
- amount: string;
1759
- /**
1760
- * The currency of the license allocation.
1761
- */
1762
- currency: string;
1763
- /**
1764
- * When True, overage beyond the allocation is written off.
1765
- */
1766
- write_off_overage?: boolean | null;
1767
- }
1768
- /**
1769
- * Configuration for package_with_allocation pricing
1770
- */
1771
- interface PackageWithAllocationConfig {
1772
- allocation: string;
1773
- package_amount: string;
1774
- package_size: string;
1775
- }
1776
- }
1777
- interface NewLicenseAllocationUnitWithPercentPrice {
1778
- /**
1779
- * The cadence to bill for this price on.
1780
- */
1781
- cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
1782
- /**
1783
- * The id of the item the price will be associated with.
1784
- */
1785
- item_id: string;
1786
- /**
1787
- * License allocations to associate with this price. Each entry defines a
1788
- * per-license credit pool granted each cadence. Requires license_type_id or
1789
- * license_type_configuration to be set.
1790
- */
1791
- license_allocations: Array<NewLicenseAllocationUnitWithPercentPrice.LicenseAllocation>;
1792
- /**
1793
- * The pricing model type
1794
- */
1795
- model_type: 'unit_with_percent';
1796
- /**
1797
- * The name of the price.
1798
- */
1799
- name: string;
1800
- /**
1801
- * Configuration for unit_with_percent pricing
1802
- */
1803
- unit_with_percent_config: NewLicenseAllocationUnitWithPercentPrice.UnitWithPercentConfig;
1804
- /**
1805
- * The id of the billable metric for the price. Only needed if the price is
1806
- * usage-based.
1807
- */
1808
- billable_metric_id?: string | null;
1809
- /**
1810
- * If the Price represents a fixed cost, the price will be billed in-advance if
1811
- * this is true, and in-arrears if this is false.
1812
- */
1813
- billed_in_advance?: boolean | null;
1814
- /**
1815
- * For custom cadence: specifies the duration of the billing period in days or
1816
- * months.
1817
- */
1818
- billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
1819
- /**
1820
- * The per unit conversion rate of the price currency to the invoicing currency.
1821
- */
1822
- conversion_rate?: number | null;
1823
- /**
1824
- * The configuration for the rate of the price currency to the invoicing currency.
1825
- */
1826
- conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
1827
- /**
1828
- * An ISO 4217 currency string, or custom pricing unit identifier, in which this
1829
- * price is billed.
1830
- */
1831
- currency?: string | null;
1832
- /**
1833
- * For dimensional price: specifies a price group and dimension values
1834
- */
1835
- dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
1836
- /**
1837
- * An alias for the price.
1838
- */
1839
- external_price_id?: string | null;
1840
- /**
1841
- * If the Price represents a fixed cost, this represents the quantity of units
1842
- * applied.
1843
- */
1844
- fixed_price_quantity?: number | null;
1845
- /**
1846
- * The property used to group this price on an invoice
1847
- */
1848
- invoice_grouping_key?: string | null;
1849
- /**
1850
- * Within each billing cycle, specifies the cadence at which invoices are produced.
1851
- * If unspecified, a single invoice is produced per billing cycle.
1852
- */
1853
- invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
1854
- /**
1855
- * The ID of the license type to associate with this price.
1856
- */
1857
- license_type_id?: string | null;
1858
- /**
1859
- * User-specified key/value pairs for the resource. Individual keys can be removed
1860
- * by setting the value to `null`, and the entire metadata mapping can be cleared
1861
- * by setting `metadata` to `null`.
1862
- */
1863
- metadata?: {
1864
- [key: string]: string | null;
1865
- } | null;
1866
- /**
1867
- * A transient ID that can be used to reference this price when adding adjustments
1868
- * in the same API call.
1869
- */
1870
- reference_id?: string | null;
1871
- }
1872
- namespace NewLicenseAllocationUnitWithPercentPrice {
1873
- interface LicenseAllocation {
1874
- /**
1875
- * The amount of credits granted per active license per cadence.
1876
- */
1877
- amount: string;
1878
- /**
1879
- * The currency of the license allocation.
1880
- */
1881
- currency: string;
1882
- /**
1883
- * When True, overage beyond the allocation is written off.
1884
- */
1885
- write_off_overage?: boolean | null;
1886
- }
1887
- /**
1888
- * Configuration for unit_with_percent pricing
1889
- */
1890
- interface UnitWithPercentConfig {
1891
- /**
1892
- * What percent, out of 100, of the calculated total to charge
1893
- */
1894
- percent: string;
1895
- /**
1896
- * Rate per unit of usage
1897
- */
1898
- unit_amount: string;
1899
- }
1900
- }
1901
- interface NewLicenseAllocationMatrixWithAllocationPrice {
1902
- /**
1903
- * The cadence to bill for this price on.
1904
- */
1905
- cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
1906
- /**
1907
- * The id of the item the price will be associated with.
1908
- */
1909
- item_id: string;
1910
- /**
1911
- * License allocations to associate with this price. Each entry defines a
1912
- * per-license credit pool granted each cadence. Requires license_type_id or
1913
- * license_type_configuration to be set.
1914
- */
1915
- license_allocations: Array<NewLicenseAllocationMatrixWithAllocationPrice.LicenseAllocation>;
1916
- /**
1917
- * Configuration for matrix_with_allocation pricing
1918
- */
1919
- matrix_with_allocation_config: Shared.MatrixWithAllocationConfig;
1920
- /**
1921
- * The pricing model type
1922
- */
1923
- model_type: 'matrix_with_allocation';
1924
- /**
1925
- * The name of the price.
1926
- */
1927
- name: string;
1928
- /**
1929
- * The id of the billable metric for the price. Only needed if the price is
1930
- * usage-based.
1931
- */
1932
- billable_metric_id?: string | null;
1933
- /**
1934
- * If the Price represents a fixed cost, the price will be billed in-advance if
1935
- * this is true, and in-arrears if this is false.
1936
- */
1937
- billed_in_advance?: boolean | null;
1938
- /**
1939
- * For custom cadence: specifies the duration of the billing period in days or
1940
- * months.
1941
- */
1942
- billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
1943
- /**
1944
- * The per unit conversion rate of the price currency to the invoicing currency.
1945
- */
1946
- conversion_rate?: number | null;
1947
- /**
1948
- * The configuration for the rate of the price currency to the invoicing currency.
1949
- */
1950
- conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
1951
- /**
1952
- * An ISO 4217 currency string, or custom pricing unit identifier, in which this
1953
- * price is billed.
1954
- */
1955
- currency?: string | null;
1956
- /**
1957
- * For dimensional price: specifies a price group and dimension values
1958
- */
1959
- dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
1960
- /**
1961
- * An alias for the price.
1962
- */
1963
- external_price_id?: string | null;
1964
- /**
1965
- * If the Price represents a fixed cost, this represents the quantity of units
1966
- * applied.
1967
- */
1968
- fixed_price_quantity?: number | null;
1969
- /**
1970
- * The property used to group this price on an invoice
1971
- */
1972
- invoice_grouping_key?: string | null;
1973
- /**
1974
- * Within each billing cycle, specifies the cadence at which invoices are produced.
1975
- * If unspecified, a single invoice is produced per billing cycle.
1976
- */
1977
- invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
1978
- /**
1979
- * The ID of the license type to associate with this price.
1980
- */
1981
- license_type_id?: string | null;
1982
- /**
1983
- * User-specified key/value pairs for the resource. Individual keys can be removed
1984
- * by setting the value to `null`, and the entire metadata mapping can be cleared
1985
- * by setting `metadata` to `null`.
1986
- */
1987
- metadata?: {
1988
- [key: string]: string | null;
1989
- } | null;
1990
- /**
1991
- * A transient ID that can be used to reference this price when adding adjustments
1992
- * in the same API call.
1993
- */
1994
- reference_id?: string | null;
1995
- }
1996
- namespace NewLicenseAllocationMatrixWithAllocationPrice {
1997
- interface LicenseAllocation {
1998
- /**
1999
- * The amount of credits granted per active license per cadence.
2000
- */
2001
- amount: string;
2002
- /**
2003
- * The currency of the license allocation.
2004
- */
2005
- currency: string;
2006
- /**
2007
- * When True, overage beyond the allocation is written off.
2008
- */
2009
- write_off_overage?: boolean | null;
2010
- }
2011
- }
2012
- interface NewLicenseAllocationTieredWithProrationPrice {
2013
- /**
2014
- * The cadence to bill for this price on.
2015
- */
2016
- cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
2017
- /**
2018
- * The id of the item the price will be associated with.
2019
- */
2020
- item_id: string;
2021
- /**
2022
- * License allocations to associate with this price. Each entry defines a
2023
- * per-license credit pool granted each cadence. Requires license_type_id or
2024
- * license_type_configuration to be set.
2025
- */
2026
- license_allocations: Array<NewLicenseAllocationTieredWithProrationPrice.LicenseAllocation>;
2027
- /**
2028
- * The pricing model type
2029
- */
2030
- model_type: 'tiered_with_proration';
2031
- /**
2032
- * The name of the price.
2033
- */
2034
- name: string;
2035
- /**
2036
- * Configuration for tiered_with_proration pricing
2037
- */
2038
- tiered_with_proration_config: NewLicenseAllocationTieredWithProrationPrice.TieredWithProrationConfig;
2039
- /**
2040
- * The id of the billable metric for the price. Only needed if the price is
2041
- * usage-based.
2042
- */
2043
- billable_metric_id?: string | null;
2044
- /**
2045
- * If the Price represents a fixed cost, the price will be billed in-advance if
2046
- * this is true, and in-arrears if this is false.
2047
- */
2048
- billed_in_advance?: boolean | null;
2049
- /**
2050
- * For custom cadence: specifies the duration of the billing period in days or
2051
- * months.
2052
- */
2053
- billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
2054
- /**
2055
- * The per unit conversion rate of the price currency to the invoicing currency.
2056
- */
2057
- conversion_rate?: number | null;
2058
- /**
2059
- * The configuration for the rate of the price currency to the invoicing currency.
2060
- */
2061
- conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
2062
- /**
2063
- * An ISO 4217 currency string, or custom pricing unit identifier, in which this
2064
- * price is billed.
2065
- */
2066
- currency?: string | null;
2067
- /**
2068
- * For dimensional price: specifies a price group and dimension values
2069
- */
2070
- dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
2071
- /**
2072
- * An alias for the price.
2073
- */
2074
- external_price_id?: string | null;
2075
- /**
2076
- * If the Price represents a fixed cost, this represents the quantity of units
2077
- * applied.
2078
- */
2079
- fixed_price_quantity?: number | null;
2080
- /**
2081
- * The property used to group this price on an invoice
2082
- */
2083
- invoice_grouping_key?: string | null;
2084
- /**
2085
- * Within each billing cycle, specifies the cadence at which invoices are produced.
2086
- * If unspecified, a single invoice is produced per billing cycle.
2087
- */
2088
- invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
2089
- /**
2090
- * The ID of the license type to associate with this price.
2091
- */
2092
- license_type_id?: string | null;
2093
- /**
2094
- * User-specified key/value pairs for the resource. Individual keys can be removed
2095
- * by setting the value to `null`, and the entire metadata mapping can be cleared
2096
- * by setting `metadata` to `null`.
2097
- */
2098
- metadata?: {
2099
- [key: string]: string | null;
2100
- } | null;
2101
- /**
2102
- * A transient ID that can be used to reference this price when adding adjustments
2103
- * in the same API call.
2104
- */
2105
- reference_id?: string | null;
2106
- }
2107
- namespace NewLicenseAllocationTieredWithProrationPrice {
2108
- interface LicenseAllocation {
2109
- /**
2110
- * The amount of credits granted per active license per cadence.
2111
- */
2112
- amount: string;
2113
- /**
2114
- * The currency of the license allocation.
2115
- */
2116
- currency: string;
2117
- /**
2118
- * When True, overage beyond the allocation is written off.
2119
- */
2120
- write_off_overage?: boolean | null;
2121
- }
2122
- /**
2123
- * Configuration for tiered_with_proration pricing
2124
- */
2125
- interface TieredWithProrationConfig {
2126
- /**
2127
- * Tiers for rating based on total usage quantities into the specified tier with
2128
- * proration
2129
- */
2130
- tiers: Array<TieredWithProrationConfig.Tier>;
2131
- }
2132
- namespace TieredWithProrationConfig {
2133
- /**
2134
- * Configuration for a single tiered with proration tier
2135
- */
2136
- interface Tier {
2137
- /**
2138
- * Inclusive tier starting value
2139
- */
2140
- tier_lower_bound: string;
2141
- /**
2142
- * Amount per unit
2143
- */
2144
- unit_amount: string;
2145
- }
2146
- }
2147
- }
2148
- interface NewLicenseAllocationUnitWithProrationPrice {
2149
- /**
2150
- * The cadence to bill for this price on.
2151
- */
2152
- cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
2153
- /**
2154
- * The id of the item the price will be associated with.
2155
- */
2156
- item_id: string;
2157
- /**
2158
- * License allocations to associate with this price. Each entry defines a
2159
- * per-license credit pool granted each cadence. Requires license_type_id or
2160
- * license_type_configuration to be set.
2161
- */
2162
- license_allocations: Array<NewLicenseAllocationUnitWithProrationPrice.LicenseAllocation>;
2163
- /**
2164
- * The pricing model type
2165
- */
2166
- model_type: 'unit_with_proration';
2167
- /**
2168
- * The name of the price.
2169
- */
2170
- name: string;
2171
- /**
2172
- * Configuration for unit_with_proration pricing
2173
- */
2174
- unit_with_proration_config: NewLicenseAllocationUnitWithProrationPrice.UnitWithProrationConfig;
2175
- /**
2176
- * The id of the billable metric for the price. Only needed if the price is
2177
- * usage-based.
2178
- */
2179
- billable_metric_id?: string | null;
2180
- /**
2181
- * If the Price represents a fixed cost, the price will be billed in-advance if
2182
- * this is true, and in-arrears if this is false.
2183
- */
2184
- billed_in_advance?: boolean | null;
2185
- /**
2186
- * For custom cadence: specifies the duration of the billing period in days or
2187
- * months.
2188
- */
2189
- billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
2190
- /**
2191
- * The per unit conversion rate of the price currency to the invoicing currency.
2192
- */
2193
- conversion_rate?: number | null;
2194
- /**
2195
- * The configuration for the rate of the price currency to the invoicing currency.
2196
- */
2197
- conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
2198
- /**
2199
- * An ISO 4217 currency string, or custom pricing unit identifier, in which this
2200
- * price is billed.
2201
- */
2202
- currency?: string | null;
2203
- /**
2204
- * For dimensional price: specifies a price group and dimension values
2205
- */
2206
- dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
2207
- /**
2208
- * An alias for the price.
2209
- */
2210
- external_price_id?: string | null;
2211
- /**
2212
- * If the Price represents a fixed cost, this represents the quantity of units
2213
- * applied.
2214
- */
2215
- fixed_price_quantity?: number | null;
2216
- /**
2217
- * The property used to group this price on an invoice
2218
- */
2219
- invoice_grouping_key?: string | null;
2220
- /**
2221
- * Within each billing cycle, specifies the cadence at which invoices are produced.
2222
- * If unspecified, a single invoice is produced per billing cycle.
2223
- */
2224
- invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
2225
- /**
2226
- * The ID of the license type to associate with this price.
2227
- */
2228
- license_type_id?: string | null;
2229
- /**
2230
- * User-specified key/value pairs for the resource. Individual keys can be removed
2231
- * by setting the value to `null`, and the entire metadata mapping can be cleared
2232
- * by setting `metadata` to `null`.
2233
- */
2234
- metadata?: {
2235
- [key: string]: string | null;
2236
- } | null;
2237
- /**
2238
- * A transient ID that can be used to reference this price when adding adjustments
2239
- * in the same API call.
2240
- */
2241
- reference_id?: string | null;
2242
- }
2243
- namespace NewLicenseAllocationUnitWithProrationPrice {
2244
- interface LicenseAllocation {
2245
- /**
2246
- * The amount of credits granted per active license per cadence.
2247
- */
2248
- amount: string;
2249
- /**
2250
- * The currency of the license allocation.
2251
- */
2252
- currency: string;
2253
- /**
2254
- * When True, overage beyond the allocation is written off.
2255
- */
2256
- write_off_overage?: boolean | null;
2257
- }
2258
- /**
2259
- * Configuration for unit_with_proration pricing
2260
- */
2261
- interface UnitWithProrationConfig {
2262
- /**
2263
- * Rate per unit of usage
2264
- */
2265
- unit_amount: string;
2266
- }
2267
- }
2268
- interface NewLicenseAllocationGroupedAllocationPrice {
2269
- /**
2270
- * The cadence to bill for this price on.
2271
- */
2272
- cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
2273
- /**
2274
- * Configuration for grouped_allocation pricing
2275
- */
2276
- grouped_allocation_config: NewLicenseAllocationGroupedAllocationPrice.GroupedAllocationConfig;
2277
- /**
2278
- * The id of the item the price will be associated with.
2279
- */
2280
- item_id: string;
2281
- /**
2282
- * License allocations to associate with this price. Each entry defines a
2283
- * per-license credit pool granted each cadence. Requires license_type_id or
2284
- * license_type_configuration to be set.
2285
- */
2286
- license_allocations: Array<NewLicenseAllocationGroupedAllocationPrice.LicenseAllocation>;
2287
- /**
2288
- * The pricing model type
2289
- */
2290
- model_type: 'grouped_allocation';
2291
- /**
2292
- * The name of the price.
2293
- */
2294
- name: string;
2295
- /**
2296
- * The id of the billable metric for the price. Only needed if the price is
2297
- * usage-based.
2298
- */
2299
- billable_metric_id?: string | null;
2300
- /**
2301
- * If the Price represents a fixed cost, the price will be billed in-advance if
2302
- * this is true, and in-arrears if this is false.
2303
- */
2304
- billed_in_advance?: boolean | null;
2305
- /**
2306
- * For custom cadence: specifies the duration of the billing period in days or
2307
- * months.
2308
- */
2309
- billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
2310
- /**
2311
- * The per unit conversion rate of the price currency to the invoicing currency.
2312
- */
2313
- conversion_rate?: number | null;
2314
- /**
2315
- * The configuration for the rate of the price currency to the invoicing currency.
2316
- */
2317
- conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
2318
- /**
2319
- * An ISO 4217 currency string, or custom pricing unit identifier, in which this
2320
- * price is billed.
2321
- */
2322
- currency?: string | null;
2323
- /**
2324
- * For dimensional price: specifies a price group and dimension values
2325
- */
2326
- dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
2327
- /**
2328
- * An alias for the price.
2329
- */
2330
- external_price_id?: string | null;
2331
- /**
2332
- * If the Price represents a fixed cost, this represents the quantity of units
2333
- * applied.
2334
- */
2335
- fixed_price_quantity?: number | null;
2336
- /**
2337
- * The property used to group this price on an invoice
2338
- */
2339
- invoice_grouping_key?: string | null;
2340
- /**
2341
- * Within each billing cycle, specifies the cadence at which invoices are produced.
2342
- * If unspecified, a single invoice is produced per billing cycle.
2343
- */
2344
- invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
2345
- /**
2346
- * The ID of the license type to associate with this price.
2347
- */
2348
- license_type_id?: string | null;
2349
- /**
2350
- * User-specified key/value pairs for the resource. Individual keys can be removed
2351
- * by setting the value to `null`, and the entire metadata mapping can be cleared
2352
- * by setting `metadata` to `null`.
2353
- */
2354
- metadata?: {
2355
- [key: string]: string | null;
2356
- } | null;
2357
- /**
2358
- * A transient ID that can be used to reference this price when adding adjustments
2359
- * in the same API call.
2360
- */
2361
- reference_id?: string | null;
2362
- }
2363
- namespace NewLicenseAllocationGroupedAllocationPrice {
2364
- /**
2365
- * Configuration for grouped_allocation pricing
2366
- */
2367
- interface GroupedAllocationConfig {
2368
- /**
2369
- * Usage allocation per group
2370
- */
2371
- allocation: string;
2372
- /**
2373
- * How to determine the groups that should each be allocated some quantity
2374
- */
2375
- grouping_key: string;
2376
- /**
2377
- * Unit rate for post-allocation
2378
- */
2379
- overage_unit_rate: string;
2380
- }
2381
- interface LicenseAllocation {
2382
- /**
2383
- * The amount of credits granted per active license per cadence.
2384
- */
2385
- amount: string;
2386
- /**
2387
- * The currency of the license allocation.
2388
- */
2389
- currency: string;
2390
- /**
2391
- * When True, overage beyond the allocation is written off.
2392
- */
2393
- write_off_overage?: boolean | null;
2394
- }
2395
- }
2396
- interface NewLicenseAllocationBulkWithProrationPrice {
2397
- /**
2398
- * Configuration for bulk_with_proration pricing
2399
- */
2400
- bulk_with_proration_config: NewLicenseAllocationBulkWithProrationPrice.BulkWithProrationConfig;
2401
- /**
2402
- * The cadence to bill for this price on.
2403
- */
2404
- cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
2405
- /**
2406
- * The id of the item the price will be associated with.
2407
- */
2408
- item_id: string;
2409
- /**
2410
- * License allocations to associate with this price. Each entry defines a
2411
- * per-license credit pool granted each cadence. Requires license_type_id or
2412
- * license_type_configuration to be set.
2413
- */
2414
- license_allocations: Array<NewLicenseAllocationBulkWithProrationPrice.LicenseAllocation>;
2415
- /**
2416
- * The pricing model type
2417
- */
2418
- model_type: 'bulk_with_proration';
2419
- /**
2420
- * The name of the price.
2421
- */
2422
- name: string;
2423
- /**
2424
- * The id of the billable metric for the price. Only needed if the price is
2425
- * usage-based.
2426
- */
2427
- billable_metric_id?: string | null;
2428
- /**
2429
- * If the Price represents a fixed cost, the price will be billed in-advance if
2430
- * this is true, and in-arrears if this is false.
2431
- */
2432
- billed_in_advance?: boolean | null;
2433
- /**
2434
- * For custom cadence: specifies the duration of the billing period in days or
2435
- * months.
2436
- */
2437
- billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
2438
- /**
2439
- * The per unit conversion rate of the price currency to the invoicing currency.
2440
- */
2441
- conversion_rate?: number | null;
2442
- /**
2443
- * The configuration for the rate of the price currency to the invoicing currency.
2444
- */
2445
- conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
2446
- /**
2447
- * An ISO 4217 currency string, or custom pricing unit identifier, in which this
2448
- * price is billed.
2449
- */
2450
- currency?: string | null;
2451
- /**
2452
- * For dimensional price: specifies a price group and dimension values
2453
- */
2454
- dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
2455
- /**
2456
- * An alias for the price.
2457
- */
2458
- external_price_id?: string | null;
2459
- /**
2460
- * If the Price represents a fixed cost, this represents the quantity of units
2461
- * applied.
2462
- */
2463
- fixed_price_quantity?: number | null;
2464
- /**
2465
- * The property used to group this price on an invoice
2466
- */
2467
- invoice_grouping_key?: string | null;
2468
- /**
2469
- * Within each billing cycle, specifies the cadence at which invoices are produced.
2470
- * If unspecified, a single invoice is produced per billing cycle.
2471
- */
2472
- invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
2473
- /**
2474
- * The ID of the license type to associate with this price.
2475
- */
2476
- license_type_id?: string | null;
2477
- /**
2478
- * User-specified key/value pairs for the resource. Individual keys can be removed
2479
- * by setting the value to `null`, and the entire metadata mapping can be cleared
2480
- * by setting `metadata` to `null`.
2481
- */
2482
- metadata?: {
2483
- [key: string]: string | null;
2484
- } | null;
2485
- /**
2486
- * A transient ID that can be used to reference this price when adding adjustments
2487
- * in the same API call.
2488
- */
2489
- reference_id?: string | null;
2490
- }
2491
- namespace NewLicenseAllocationBulkWithProrationPrice {
2492
- /**
2493
- * Configuration for bulk_with_proration pricing
2494
- */
2495
- interface BulkWithProrationConfig {
2496
- /**
2497
- * Bulk tiers for rating based on total usage volume
2498
- */
2499
- tiers: Array<BulkWithProrationConfig.Tier>;
2500
- }
2501
- namespace BulkWithProrationConfig {
2502
- /**
2503
- * Configuration for a single bulk pricing tier with proration
2504
- */
2505
- interface Tier {
2506
- /**
2507
- * Cost per unit
2508
- */
2509
- unit_amount: string;
2510
- /**
2511
- * The lower bound for this tier
2512
- */
2513
- tier_lower_bound?: string | null;
2514
- }
2515
- }
2516
- interface LicenseAllocation {
2517
- /**
2518
- * The amount of credits granted per active license per cadence.
2519
- */
2520
- amount: string;
2521
- /**
2522
- * The currency of the license allocation.
2523
- */
2524
- currency: string;
2525
- /**
2526
- * When True, overage beyond the allocation is written off.
2527
- */
2528
- write_off_overage?: boolean | null;
2529
- }
2530
- }
2531
- interface NewLicenseAllocationGroupedWithProratedMinimumPrice {
2532
- /**
2533
- * The cadence to bill for this price on.
2534
- */
2535
- cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
2536
- /**
2537
- * Configuration for grouped_with_prorated_minimum pricing
2538
- */
2539
- grouped_with_prorated_minimum_config: NewLicenseAllocationGroupedWithProratedMinimumPrice.GroupedWithProratedMinimumConfig;
2540
- /**
2541
- * The id of the item the price will be associated with.
2542
- */
2543
- item_id: string;
2544
- /**
2545
- * License allocations to associate with this price. Each entry defines a
2546
- * per-license credit pool granted each cadence. Requires license_type_id or
2547
- * license_type_configuration to be set.
2548
- */
2549
- license_allocations: Array<NewLicenseAllocationGroupedWithProratedMinimumPrice.LicenseAllocation>;
2550
- /**
2551
- * The pricing model type
2552
- */
2553
- model_type: 'grouped_with_prorated_minimum';
2554
- /**
2555
- * The name of the price.
2556
- */
2557
- name: string;
2558
- /**
2559
- * The id of the billable metric for the price. Only needed if the price is
2560
- * usage-based.
2561
- */
2562
- billable_metric_id?: string | null;
2563
- /**
2564
- * If the Price represents a fixed cost, the price will be billed in-advance if
2565
- * this is true, and in-arrears if this is false.
2566
- */
2567
- billed_in_advance?: boolean | null;
2568
- /**
2569
- * For custom cadence: specifies the duration of the billing period in days or
2570
- * months.
2571
- */
2572
- billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
2573
- /**
2574
- * The per unit conversion rate of the price currency to the invoicing currency.
2575
- */
2576
- conversion_rate?: number | null;
2577
- /**
2578
- * The configuration for the rate of the price currency to the invoicing currency.
2579
- */
2580
- conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
2581
- /**
2582
- * An ISO 4217 currency string, or custom pricing unit identifier, in which this
2583
- * price is billed.
2584
- */
2585
- currency?: string | null;
2586
- /**
2587
- * For dimensional price: specifies a price group and dimension values
2588
- */
2589
- dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
2590
- /**
2591
- * An alias for the price.
2592
- */
2593
- external_price_id?: string | null;
2594
- /**
2595
- * If the Price represents a fixed cost, this represents the quantity of units
2596
- * applied.
2597
- */
2598
- fixed_price_quantity?: number | null;
2599
- /**
2600
- * The property used to group this price on an invoice
2601
- */
2602
- invoice_grouping_key?: string | null;
2603
- /**
2604
- * Within each billing cycle, specifies the cadence at which invoices are produced.
2605
- * If unspecified, a single invoice is produced per billing cycle.
2606
- */
2607
- invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
2608
- /**
2609
- * The ID of the license type to associate with this price.
2610
- */
2611
- license_type_id?: string | null;
2612
- /**
2613
- * User-specified key/value pairs for the resource. Individual keys can be removed
2614
- * by setting the value to `null`, and the entire metadata mapping can be cleared
2615
- * by setting `metadata` to `null`.
2616
- */
2617
- metadata?: {
2618
- [key: string]: string | null;
2619
- } | null;
2620
- /**
2621
- * A transient ID that can be used to reference this price when adding adjustments
2622
- * in the same API call.
2623
- */
2624
- reference_id?: string | null;
2625
- }
2626
- namespace NewLicenseAllocationGroupedWithProratedMinimumPrice {
2627
- /**
2628
- * Configuration for grouped_with_prorated_minimum pricing
2629
- */
2630
- interface GroupedWithProratedMinimumConfig {
2631
- /**
2632
- * How to determine the groups that should each have a minimum
2633
- */
2634
- grouping_key: string;
2635
- /**
2636
- * The minimum amount to charge per group
2637
- */
2638
- minimum: string;
2639
- /**
2640
- * The amount to charge per unit
2641
- */
2642
- unit_rate: string;
2643
- }
2644
- interface LicenseAllocation {
2645
- /**
2646
- * The amount of credits granted per active license per cadence.
2647
- */
2648
- amount: string;
2649
- /**
2650
- * The currency of the license allocation.
2651
- */
2652
- currency: string;
2653
- /**
2654
- * When True, overage beyond the allocation is written off.
2655
- */
2656
- write_off_overage?: boolean | null;
2657
- }
2658
- }
2659
- interface NewLicenseAllocationGroupedWithMeteredMinimumPrice {
2660
- /**
2661
- * The cadence to bill for this price on.
2662
- */
2663
- cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
2664
- /**
2665
- * Configuration for grouped_with_metered_minimum pricing
2666
- */
2667
- grouped_with_metered_minimum_config: NewLicenseAllocationGroupedWithMeteredMinimumPrice.GroupedWithMeteredMinimumConfig;
2668
- /**
2669
- * The id of the item the price will be associated with.
2670
- */
2671
- item_id: string;
2672
- /**
2673
- * License allocations to associate with this price. Each entry defines a
2674
- * per-license credit pool granted each cadence. Requires license_type_id or
2675
- * license_type_configuration to be set.
2676
- */
2677
- license_allocations: Array<NewLicenseAllocationGroupedWithMeteredMinimumPrice.LicenseAllocation>;
2678
- /**
2679
- * The pricing model type
2680
- */
2681
- model_type: 'grouped_with_metered_minimum';
2682
- /**
2683
- * The name of the price.
2684
- */
2685
- name: string;
2686
- /**
2687
- * The id of the billable metric for the price. Only needed if the price is
2688
- * usage-based.
2689
- */
2690
- billable_metric_id?: string | null;
2691
- /**
2692
- * If the Price represents a fixed cost, the price will be billed in-advance if
2693
- * this is true, and in-arrears if this is false.
2694
- */
2695
- billed_in_advance?: boolean | null;
2696
- /**
2697
- * For custom cadence: specifies the duration of the billing period in days or
2698
- * months.
2699
- */
2700
- billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
2701
- /**
2702
- * The per unit conversion rate of the price currency to the invoicing currency.
2703
- */
2704
- conversion_rate?: number | null;
2705
- /**
2706
- * The configuration for the rate of the price currency to the invoicing currency.
2707
- */
2708
- conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
2709
- /**
2710
- * An ISO 4217 currency string, or custom pricing unit identifier, in which this
2711
- * price is billed.
2712
- */
2713
- currency?: string | null;
2714
- /**
2715
- * For dimensional price: specifies a price group and dimension values
2716
- */
2717
- dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
2718
- /**
2719
- * An alias for the price.
2720
- */
2721
- external_price_id?: string | null;
2722
- /**
2723
- * If the Price represents a fixed cost, this represents the quantity of units
2724
- * applied.
2725
- */
2726
- fixed_price_quantity?: number | null;
2727
- /**
2728
- * The property used to group this price on an invoice
2729
- */
2730
- invoice_grouping_key?: string | null;
2731
- /**
2732
- * Within each billing cycle, specifies the cadence at which invoices are produced.
2733
- * If unspecified, a single invoice is produced per billing cycle.
2734
- */
2735
- invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
2736
- /**
2737
- * The ID of the license type to associate with this price.
2738
- */
2739
- license_type_id?: string | null;
2740
- /**
2741
- * User-specified key/value pairs for the resource. Individual keys can be removed
2742
- * by setting the value to `null`, and the entire metadata mapping can be cleared
2743
- * by setting `metadata` to `null`.
2744
- */
2745
- metadata?: {
2746
- [key: string]: string | null;
2747
- } | null;
2748
- /**
2749
- * A transient ID that can be used to reference this price when adding adjustments
2750
- * in the same API call.
2751
- */
2752
- reference_id?: string | null;
2753
- }
2754
- namespace NewLicenseAllocationGroupedWithMeteredMinimumPrice {
2755
- /**
2756
- * Configuration for grouped_with_metered_minimum pricing
2757
- */
2758
- interface GroupedWithMeteredMinimumConfig {
2759
- /**
2760
- * Used to partition the usage into groups. The minimum amount is applied to each
2761
- * group.
2762
- */
2763
- grouping_key: string;
2764
- /**
2765
- * The minimum amount to charge per group per unit
2766
- */
2767
- minimum_unit_amount: string;
2768
- /**
2769
- * Used to determine the unit rate
2770
- */
2771
- pricing_key: string;
2772
- /**
2773
- * Scale the unit rates by the scaling factor.
2774
- */
2775
- scaling_factors: Array<GroupedWithMeteredMinimumConfig.ScalingFactor>;
2776
- /**
2777
- * Used to determine the unit rate scaling factor
2778
- */
2779
- scaling_key: string;
2780
- /**
2781
- * Apply per unit pricing to each pricing value. The minimum amount is applied any
2782
- * unmatched usage.
2783
- */
2784
- unit_amounts: Array<GroupedWithMeteredMinimumConfig.UnitAmount>;
2785
- }
2786
- namespace GroupedWithMeteredMinimumConfig {
2787
- /**
2788
- * Configuration for a scaling factor
2789
- */
2790
- interface ScalingFactor {
2791
- scaling_factor: string;
2792
- scaling_value: string;
2793
- }
2794
- /**
2795
- * Configuration for a unit amount
2796
- */
2797
- interface UnitAmount {
2798
- pricing_value: string;
2799
- /**
2800
- * Per unit amount
2801
- */
2802
- unit_amount: string;
2803
- }
2804
- }
2805
- interface LicenseAllocation {
2806
- /**
2807
- * The amount of credits granted per active license per cadence.
2808
- */
2809
- amount: string;
2810
- /**
2811
- * The currency of the license allocation.
2812
- */
2813
- currency: string;
2814
- /**
2815
- * When True, overage beyond the allocation is written off.
2816
- */
2817
- write_off_overage?: boolean | null;
2818
- }
2819
- }
2820
- interface NewLicenseAllocationGroupedWithMinMaxThresholdsPrice {
2821
- /**
2822
- * The cadence to bill for this price on.
2823
- */
2824
- cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
2825
- /**
2826
- * Configuration for grouped_with_min_max_thresholds pricing
2827
- */
2828
- grouped_with_min_max_thresholds_config: NewLicenseAllocationGroupedWithMinMaxThresholdsPrice.GroupedWithMinMaxThresholdsConfig;
2829
- /**
2830
- * The id of the item the price will be associated with.
2831
- */
2832
- item_id: string;
2833
- /**
2834
- * License allocations to associate with this price. Each entry defines a
2835
- * per-license credit pool granted each cadence. Requires license_type_id or
2836
- * license_type_configuration to be set.
2837
- */
2838
- license_allocations: Array<NewLicenseAllocationGroupedWithMinMaxThresholdsPrice.LicenseAllocation>;
2839
- /**
2840
- * The pricing model type
2841
- */
2842
- model_type: 'grouped_with_min_max_thresholds';
2843
- /**
2844
- * The name of the price.
2845
- */
2846
- name: string;
2847
- /**
2848
- * The id of the billable metric for the price. Only needed if the price is
2849
- * usage-based.
2850
- */
2851
- billable_metric_id?: string | null;
2852
- /**
2853
- * If the Price represents a fixed cost, the price will be billed in-advance if
2854
- * this is true, and in-arrears if this is false.
2855
- */
2856
- billed_in_advance?: boolean | null;
2857
- /**
2858
- * For custom cadence: specifies the duration of the billing period in days or
2859
- * months.
2860
- */
2861
- billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
2862
- /**
2863
- * The per unit conversion rate of the price currency to the invoicing currency.
2864
- */
2865
- conversion_rate?: number | null;
2866
- /**
2867
- * The configuration for the rate of the price currency to the invoicing currency.
2868
- */
2869
- conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
2870
- /**
2871
- * An ISO 4217 currency string, or custom pricing unit identifier, in which this
2872
- * price is billed.
2873
- */
2874
- currency?: string | null;
2875
- /**
2876
- * For dimensional price: specifies a price group and dimension values
2877
- */
2878
- dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
2879
- /**
2880
- * An alias for the price.
2881
- */
2882
- external_price_id?: string | null;
2883
- /**
2884
- * If the Price represents a fixed cost, this represents the quantity of units
2885
- * applied.
2886
- */
2887
- fixed_price_quantity?: number | null;
2888
- /**
2889
- * The property used to group this price on an invoice
2890
- */
2891
- invoice_grouping_key?: string | null;
2892
- /**
2893
- * Within each billing cycle, specifies the cadence at which invoices are produced.
2894
- * If unspecified, a single invoice is produced per billing cycle.
2895
- */
2896
- invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
2897
- /**
2898
- * The ID of the license type to associate with this price.
2899
- */
2900
- license_type_id?: string | null;
2901
- /**
2902
- * User-specified key/value pairs for the resource. Individual keys can be removed
2903
- * by setting the value to `null`, and the entire metadata mapping can be cleared
2904
- * by setting `metadata` to `null`.
2905
- */
2906
- metadata?: {
2907
- [key: string]: string | null;
2908
- } | null;
2909
- /**
2910
- * A transient ID that can be used to reference this price when adding adjustments
2911
- * in the same API call.
2912
- */
2913
- reference_id?: string | null;
2914
- }
2915
- namespace NewLicenseAllocationGroupedWithMinMaxThresholdsPrice {
2916
- /**
2917
- * Configuration for grouped_with_min_max_thresholds pricing
2918
- */
2919
- interface GroupedWithMinMaxThresholdsConfig {
2920
- /**
2921
- * The event property used to group before applying thresholds
2922
- */
2923
- grouping_key: string;
2924
- /**
2925
- * The maximum amount to charge each group
2926
- */
2927
- maximum_charge: string;
2928
- /**
2929
- * The minimum amount to charge each group, regardless of usage
2930
- */
2931
- minimum_charge: string;
2932
- /**
2933
- * The base price charged per group
2934
- */
2935
- per_unit_rate: string;
2936
- }
2937
- interface LicenseAllocation {
2938
- /**
2939
- * The amount of credits granted per active license per cadence.
2940
- */
2941
- amount: string;
2942
- /**
2943
- * The currency of the license allocation.
2944
- */
2945
- currency: string;
2946
- /**
2947
- * When True, overage beyond the allocation is written off.
2948
- */
2949
- write_off_overage?: boolean | null;
2950
- }
2951
- }
2952
- interface NewLicenseAllocationMatrixWithDisplayNamePrice {
2953
- /**
2954
- * The cadence to bill for this price on.
2955
- */
2956
- cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
2957
- /**
2958
- * The id of the item the price will be associated with.
2959
- */
2960
- item_id: string;
2961
- /**
2962
- * License allocations to associate with this price. Each entry defines a
2963
- * per-license credit pool granted each cadence. Requires license_type_id or
2964
- * license_type_configuration to be set.
2965
- */
2966
- license_allocations: Array<NewLicenseAllocationMatrixWithDisplayNamePrice.LicenseAllocation>;
2967
- /**
2968
- * Configuration for matrix_with_display_name pricing
2969
- */
2970
- matrix_with_display_name_config: NewLicenseAllocationMatrixWithDisplayNamePrice.MatrixWithDisplayNameConfig;
2971
- /**
2972
- * The pricing model type
2973
- */
2974
- model_type: 'matrix_with_display_name';
2975
- /**
2976
- * The name of the price.
2977
- */
2978
- name: string;
2979
- /**
2980
- * The id of the billable metric for the price. Only needed if the price is
2981
- * usage-based.
2982
- */
2983
- billable_metric_id?: string | null;
2984
- /**
2985
- * If the Price represents a fixed cost, the price will be billed in-advance if
2986
- * this is true, and in-arrears if this is false.
2987
- */
2988
- billed_in_advance?: boolean | null;
2989
- /**
2990
- * For custom cadence: specifies the duration of the billing period in days or
2991
- * months.
2992
- */
2993
- billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
2994
- /**
2995
- * The per unit conversion rate of the price currency to the invoicing currency.
2996
- */
2997
- conversion_rate?: number | null;
2998
- /**
2999
- * The configuration for the rate of the price currency to the invoicing currency.
3000
- */
3001
- conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
3002
- /**
3003
- * An ISO 4217 currency string, or custom pricing unit identifier, in which this
3004
- * price is billed.
3005
- */
3006
- currency?: string | null;
3007
- /**
3008
- * For dimensional price: specifies a price group and dimension values
3009
- */
3010
- dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
3011
- /**
3012
- * An alias for the price.
3013
- */
3014
- external_price_id?: string | null;
3015
- /**
3016
- * If the Price represents a fixed cost, this represents the quantity of units
3017
- * applied.
3018
- */
3019
- fixed_price_quantity?: number | null;
3020
- /**
3021
- * The property used to group this price on an invoice
3022
- */
3023
- invoice_grouping_key?: string | null;
3024
- /**
3025
- * Within each billing cycle, specifies the cadence at which invoices are produced.
3026
- * If unspecified, a single invoice is produced per billing cycle.
3027
- */
3028
- invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
3029
- /**
3030
- * The ID of the license type to associate with this price.
3031
- */
3032
- license_type_id?: string | null;
3033
- /**
3034
- * User-specified key/value pairs for the resource. Individual keys can be removed
3035
- * by setting the value to `null`, and the entire metadata mapping can be cleared
3036
- * by setting `metadata` to `null`.
3037
- */
3038
- metadata?: {
3039
- [key: string]: string | null;
3040
- } | null;
3041
- /**
3042
- * A transient ID that can be used to reference this price when adding adjustments
3043
- * in the same API call.
3044
- */
3045
- reference_id?: string | null;
3046
- }
3047
- namespace NewLicenseAllocationMatrixWithDisplayNamePrice {
3048
- interface LicenseAllocation {
3049
- /**
3050
- * The amount of credits granted per active license per cadence.
3051
- */
3052
- amount: string;
3053
- /**
3054
- * The currency of the license allocation.
3055
- */
3056
- currency: string;
3057
- /**
3058
- * When True, overage beyond the allocation is written off.
3059
- */
3060
- write_off_overage?: boolean | null;
3061
- }
3062
- /**
3063
- * Configuration for matrix_with_display_name pricing
3064
- */
3065
- interface MatrixWithDisplayNameConfig {
3066
- /**
3067
- * Used to determine the unit rate
3068
- */
3069
- dimension: string;
3070
- /**
3071
- * Apply per unit pricing to each dimension value
3072
- */
3073
- unit_amounts: Array<MatrixWithDisplayNameConfig.UnitAmount>;
3074
- }
3075
- namespace MatrixWithDisplayNameConfig {
3076
- /**
3077
- * Configuration for a unit amount item
3078
- */
3079
- interface UnitAmount {
3080
- /**
3081
- * The dimension value
3082
- */
3083
- dimension_value: string;
3084
- /**
3085
- * Display name for this dimension value
3086
- */
3087
- display_name: string;
3088
- /**
3089
- * Per unit amount
3090
- */
3091
- unit_amount: string;
3092
- }
3093
- }
3094
- }
3095
- interface NewLicenseAllocationGroupedTieredPackagePrice {
3096
- /**
3097
- * The cadence to bill for this price on.
3098
- */
3099
- cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
3100
- /**
3101
- * Configuration for grouped_tiered_package pricing
3102
- */
3103
- grouped_tiered_package_config: NewLicenseAllocationGroupedTieredPackagePrice.GroupedTieredPackageConfig;
3104
- /**
3105
- * The id of the item the price will be associated with.
3106
- */
3107
- item_id: string;
3108
- /**
3109
- * License allocations to associate with this price. Each entry defines a
3110
- * per-license credit pool granted each cadence. Requires license_type_id or
3111
- * license_type_configuration to be set.
3112
- */
3113
- license_allocations: Array<NewLicenseAllocationGroupedTieredPackagePrice.LicenseAllocation>;
3114
- /**
3115
- * The pricing model type
3116
- */
3117
- model_type: 'grouped_tiered_package';
3118
- /**
3119
- * The name of the price.
3120
- */
3121
- name: string;
3122
- /**
3123
- * The id of the billable metric for the price. Only needed if the price is
3124
- * usage-based.
3125
- */
3126
- billable_metric_id?: string | null;
3127
- /**
3128
- * If the Price represents a fixed cost, the price will be billed in-advance if
3129
- * this is true, and in-arrears if this is false.
3130
- */
3131
- billed_in_advance?: boolean | null;
3132
- /**
3133
- * For custom cadence: specifies the duration of the billing period in days or
3134
- * months.
3135
- */
3136
- billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
3137
- /**
3138
- * The per unit conversion rate of the price currency to the invoicing currency.
3139
- */
3140
- conversion_rate?: number | null;
3141
- /**
3142
- * The configuration for the rate of the price currency to the invoicing currency.
3143
- */
3144
- conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
3145
- /**
3146
- * An ISO 4217 currency string, or custom pricing unit identifier, in which this
3147
- * price is billed.
3148
- */
3149
- currency?: string | null;
3150
- /**
3151
- * For dimensional price: specifies a price group and dimension values
3152
- */
3153
- dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
3154
- /**
3155
- * An alias for the price.
3156
- */
3157
- external_price_id?: string | null;
3158
- /**
3159
- * If the Price represents a fixed cost, this represents the quantity of units
3160
- * applied.
3161
- */
3162
- fixed_price_quantity?: number | null;
3163
- /**
3164
- * The property used to group this price on an invoice
3165
- */
3166
- invoice_grouping_key?: string | null;
3167
- /**
3168
- * Within each billing cycle, specifies the cadence at which invoices are produced.
3169
- * If unspecified, a single invoice is produced per billing cycle.
3170
- */
3171
- invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
3172
- /**
3173
- * The ID of the license type to associate with this price.
3174
- */
3175
- license_type_id?: string | null;
3176
- /**
3177
- * User-specified key/value pairs for the resource. Individual keys can be removed
3178
- * by setting the value to `null`, and the entire metadata mapping can be cleared
3179
- * by setting `metadata` to `null`.
3180
- */
3181
- metadata?: {
3182
- [key: string]: string | null;
3183
- } | null;
3184
- /**
3185
- * A transient ID that can be used to reference this price when adding adjustments
3186
- * in the same API call.
3187
- */
3188
- reference_id?: string | null;
3189
- }
3190
- namespace NewLicenseAllocationGroupedTieredPackagePrice {
3191
- /**
3192
- * Configuration for grouped_tiered_package pricing
3193
- */
3194
- interface GroupedTieredPackageConfig {
3195
- /**
3196
- * The event property used to group before tiering
3197
- */
3198
- grouping_key: string;
3199
- package_size: string;
3200
- /**
3201
- * Apply tiered pricing after rounding up the quantity to the package size. Tiers
3202
- * are defined using exclusive lower bounds.
3203
- */
3204
- tiers: Array<GroupedTieredPackageConfig.Tier>;
3205
- }
3206
- namespace GroupedTieredPackageConfig {
3207
- /**
3208
- * Configuration for a single tier
3209
- */
3210
- interface Tier {
3211
- /**
3212
- * Per package
3213
- */
3214
- per_unit: string;
3215
- tier_lower_bound: string;
3216
- }
3217
- }
3218
- interface LicenseAllocation {
3219
- /**
3220
- * The amount of credits granted per active license per cadence.
3221
- */
3222
- amount: string;
3223
- /**
3224
- * The currency of the license allocation.
3225
- */
3226
- currency: string;
3227
- /**
3228
- * When True, overage beyond the allocation is written off.
3229
- */
3230
- write_off_overage?: boolean | null;
3231
- }
3232
- }
3233
- interface NewLicenseAllocationMaxGroupTieredPackagePrice {
3234
- /**
3235
- * The cadence to bill for this price on.
3236
- */
3237
- cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
3238
- /**
3239
- * The id of the item the price will be associated with.
3240
- */
3241
- item_id: string;
3242
- /**
3243
- * License allocations to associate with this price. Each entry defines a
3244
- * per-license credit pool granted each cadence. Requires license_type_id or
3245
- * license_type_configuration to be set.
3246
- */
3247
- license_allocations: Array<NewLicenseAllocationMaxGroupTieredPackagePrice.LicenseAllocation>;
3248
- /**
3249
- * Configuration for max_group_tiered_package pricing
3250
- */
3251
- max_group_tiered_package_config: NewLicenseAllocationMaxGroupTieredPackagePrice.MaxGroupTieredPackageConfig;
3252
- /**
3253
- * The pricing model type
3254
- */
3255
- model_type: 'max_group_tiered_package';
3256
- /**
3257
- * The name of the price.
3258
- */
3259
- name: string;
3260
- /**
3261
- * The id of the billable metric for the price. Only needed if the price is
3262
- * usage-based.
3263
- */
3264
- billable_metric_id?: string | null;
3265
- /**
3266
- * If the Price represents a fixed cost, the price will be billed in-advance if
3267
- * this is true, and in-arrears if this is false.
3268
- */
3269
- billed_in_advance?: boolean | null;
3270
- /**
3271
- * For custom cadence: specifies the duration of the billing period in days or
3272
- * months.
3273
- */
3274
- billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
3275
- /**
3276
- * The per unit conversion rate of the price currency to the invoicing currency.
3277
- */
3278
- conversion_rate?: number | null;
3279
- /**
3280
- * The configuration for the rate of the price currency to the invoicing currency.
3281
- */
3282
- conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
3283
- /**
3284
- * An ISO 4217 currency string, or custom pricing unit identifier, in which this
3285
- * price is billed.
3286
- */
3287
- currency?: string | null;
3288
- /**
3289
- * For dimensional price: specifies a price group and dimension values
3290
- */
3291
- dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
3292
- /**
3293
- * An alias for the price.
3294
- */
3295
- external_price_id?: string | null;
3296
- /**
3297
- * If the Price represents a fixed cost, this represents the quantity of units
3298
- * applied.
3299
- */
3300
- fixed_price_quantity?: number | null;
3301
- /**
3302
- * The property used to group this price on an invoice
3303
- */
3304
- invoice_grouping_key?: string | null;
3305
- /**
3306
- * Within each billing cycle, specifies the cadence at which invoices are produced.
3307
- * If unspecified, a single invoice is produced per billing cycle.
3308
- */
3309
- invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
3310
- /**
3311
- * The ID of the license type to associate with this price.
3312
- */
3313
- license_type_id?: string | null;
3314
- /**
3315
- * User-specified key/value pairs for the resource. Individual keys can be removed
3316
- * by setting the value to `null`, and the entire metadata mapping can be cleared
3317
- * by setting `metadata` to `null`.
3318
- */
3319
- metadata?: {
3320
- [key: string]: string | null;
3321
- } | null;
3322
- /**
3323
- * A transient ID that can be used to reference this price when adding adjustments
3324
- * in the same API call.
3325
- */
3326
- reference_id?: string | null;
3327
- }
3328
- namespace NewLicenseAllocationMaxGroupTieredPackagePrice {
3329
- interface LicenseAllocation {
3330
- /**
3331
- * The amount of credits granted per active license per cadence.
3332
- */
3333
- amount: string;
3334
- /**
3335
- * The currency of the license allocation.
3336
- */
3337
- currency: string;
3338
- /**
3339
- * When True, overage beyond the allocation is written off.
3340
- */
3341
- write_off_overage?: boolean | null;
3342
- }
3343
- /**
3344
- * Configuration for max_group_tiered_package pricing
3345
- */
3346
- interface MaxGroupTieredPackageConfig {
3347
- /**
3348
- * The event property used to group before tiering the group with the highest value
3349
- */
3350
- grouping_key: string;
3351
- package_size: string;
3352
- /**
3353
- * Apply tiered pricing to the largest group after grouping with the provided key.
3354
- */
3355
- tiers: Array<MaxGroupTieredPackageConfig.Tier>;
3356
- }
3357
- namespace MaxGroupTieredPackageConfig {
3358
- /**
3359
- * Configuration for a single tier
3360
- */
3361
- interface Tier {
3362
- tier_lower_bound: string;
3363
- /**
3364
- * Per unit amount
3365
- */
3366
- unit_amount: string;
3367
- }
3368
- }
3369
- }
3370
- interface NewLicenseAllocationScalableMatrixWithUnitPricingPrice {
3371
- /**
3372
- * The cadence to bill for this price on.
3373
- */
3374
- cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
3375
- /**
3376
- * The id of the item the price will be associated with.
3377
- */
3378
- item_id: string;
3379
- /**
3380
- * License allocations to associate with this price. Each entry defines a
3381
- * per-license credit pool granted each cadence. Requires license_type_id or
3382
- * license_type_configuration to be set.
3383
- */
3384
- license_allocations: Array<NewLicenseAllocationScalableMatrixWithUnitPricingPrice.LicenseAllocation>;
3385
- /**
3386
- * The pricing model type
3387
- */
3388
- model_type: 'scalable_matrix_with_unit_pricing';
3389
- /**
3390
- * The name of the price.
3391
- */
3392
- name: string;
3393
- /**
3394
- * Configuration for scalable_matrix_with_unit_pricing pricing
3395
- */
3396
- scalable_matrix_with_unit_pricing_config: NewLicenseAllocationScalableMatrixWithUnitPricingPrice.ScalableMatrixWithUnitPricingConfig;
3397
- /**
3398
- * The id of the billable metric for the price. Only needed if the price is
3399
- * usage-based.
3400
- */
3401
- billable_metric_id?: string | null;
3402
- /**
3403
- * If the Price represents a fixed cost, the price will be billed in-advance if
3404
- * this is true, and in-arrears if this is false.
3405
- */
3406
- billed_in_advance?: boolean | null;
3407
- /**
3408
- * For custom cadence: specifies the duration of the billing period in days or
3409
- * months.
3410
- */
3411
- billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
3412
- /**
3413
- * The per unit conversion rate of the price currency to the invoicing currency.
3414
- */
3415
- conversion_rate?: number | null;
3416
- /**
3417
- * The configuration for the rate of the price currency to the invoicing currency.
3418
- */
3419
- conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
3420
- /**
3421
- * An ISO 4217 currency string, or custom pricing unit identifier, in which this
3422
- * price is billed.
3423
- */
3424
- currency?: string | null;
3425
- /**
3426
- * For dimensional price: specifies a price group and dimension values
3427
- */
3428
- dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
3429
- /**
3430
- * An alias for the price.
3431
- */
3432
- external_price_id?: string | null;
3433
- /**
3434
- * If the Price represents a fixed cost, this represents the quantity of units
3435
- * applied.
3436
- */
3437
- fixed_price_quantity?: number | null;
3438
- /**
3439
- * The property used to group this price on an invoice
3440
- */
3441
- invoice_grouping_key?: string | null;
3442
- /**
3443
- * Within each billing cycle, specifies the cadence at which invoices are produced.
3444
- * If unspecified, a single invoice is produced per billing cycle.
3445
- */
3446
- invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
3447
- /**
3448
- * The ID of the license type to associate with this price.
3449
- */
3450
- license_type_id?: string | null;
3451
- /**
3452
- * User-specified key/value pairs for the resource. Individual keys can be removed
3453
- * by setting the value to `null`, and the entire metadata mapping can be cleared
3454
- * by setting `metadata` to `null`.
3455
- */
3456
- metadata?: {
3457
- [key: string]: string | null;
3458
- } | null;
3459
- /**
3460
- * A transient ID that can be used to reference this price when adding adjustments
3461
- * in the same API call.
3462
- */
3463
- reference_id?: string | null;
3464
- }
3465
- namespace NewLicenseAllocationScalableMatrixWithUnitPricingPrice {
3466
- interface LicenseAllocation {
3467
- /**
3468
- * The amount of credits granted per active license per cadence.
3469
- */
3470
- amount: string;
3471
- /**
3472
- * The currency of the license allocation.
3473
- */
3474
- currency: string;
3475
- /**
3476
- * When True, overage beyond the allocation is written off.
3477
- */
3478
- write_off_overage?: boolean | null;
3479
- }
3480
- /**
3481
- * Configuration for scalable_matrix_with_unit_pricing pricing
3482
- */
3483
- interface ScalableMatrixWithUnitPricingConfig {
3484
- /**
3485
- * Used to determine the unit rate
3486
- */
3487
- first_dimension: string;
3488
- /**
3489
- * Apply a scaling factor to each dimension
3490
- */
3491
- matrix_scaling_factors: Array<ScalableMatrixWithUnitPricingConfig.MatrixScalingFactor>;
3492
- /**
3493
- * The final unit price to rate against the output of the matrix
3494
- */
3495
- unit_price: string;
3496
- /**
3497
- * The property used to group this price
3498
- */
3499
- grouping_key?: string | null;
3500
- /**
3501
- * If true, the unit price will be prorated to the billing period
3502
- */
3503
- prorate?: boolean | null;
3504
- /**
3505
- * Used to determine the unit rate (optional)
3506
- */
3507
- second_dimension?: string | null;
3508
- }
3509
- namespace ScalableMatrixWithUnitPricingConfig {
3510
- /**
3511
- * Configuration for a single matrix scaling factor
3512
- */
3513
- interface MatrixScalingFactor {
3514
- first_dimension_value: string;
3515
- scaling_factor: string;
3516
- second_dimension_value?: string | null;
3517
- }
3518
- }
3519
- }
3520
- interface NewLicenseAllocationScalableMatrixWithTieredPricingPrice {
3521
- /**
3522
- * The cadence to bill for this price on.
3523
- */
3524
- cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
3525
- /**
3526
- * The id of the item the price will be associated with.
3527
- */
3528
- item_id: string;
3529
- /**
3530
- * License allocations to associate with this price. Each entry defines a
3531
- * per-license credit pool granted each cadence. Requires license_type_id or
3532
- * license_type_configuration to be set.
3533
- */
3534
- license_allocations: Array<NewLicenseAllocationScalableMatrixWithTieredPricingPrice.LicenseAllocation>;
3535
- /**
3536
- * The pricing model type
3537
- */
3538
- model_type: 'scalable_matrix_with_tiered_pricing';
3539
- /**
3540
- * The name of the price.
3541
- */
3542
- name: string;
3543
- /**
3544
- * Configuration for scalable_matrix_with_tiered_pricing pricing
3545
- */
3546
- scalable_matrix_with_tiered_pricing_config: NewLicenseAllocationScalableMatrixWithTieredPricingPrice.ScalableMatrixWithTieredPricingConfig;
3547
- /**
3548
- * The id of the billable metric for the price. Only needed if the price is
3549
- * usage-based.
3550
- */
3551
- billable_metric_id?: string | null;
3552
- /**
3553
- * If the Price represents a fixed cost, the price will be billed in-advance if
3554
- * this is true, and in-arrears if this is false.
3555
- */
3556
- billed_in_advance?: boolean | null;
3557
- /**
3558
- * For custom cadence: specifies the duration of the billing period in days or
3559
- * months.
3560
- */
3561
- billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
3562
- /**
3563
- * The per unit conversion rate of the price currency to the invoicing currency.
3564
- */
3565
- conversion_rate?: number | null;
3566
- /**
3567
- * The configuration for the rate of the price currency to the invoicing currency.
3568
- */
3569
- conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
3570
- /**
3571
- * An ISO 4217 currency string, or custom pricing unit identifier, in which this
3572
- * price is billed.
3573
- */
3574
- currency?: string | null;
3575
- /**
3576
- * For dimensional price: specifies a price group and dimension values
3577
- */
3578
- dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
3579
- /**
3580
- * An alias for the price.
3581
- */
3582
- external_price_id?: string | null;
3583
- /**
3584
- * If the Price represents a fixed cost, this represents the quantity of units
3585
- * applied.
3586
- */
3587
- fixed_price_quantity?: number | null;
3588
- /**
3589
- * The property used to group this price on an invoice
3590
- */
3591
- invoice_grouping_key?: string | null;
3592
- /**
3593
- * Within each billing cycle, specifies the cadence at which invoices are produced.
3594
- * If unspecified, a single invoice is produced per billing cycle.
3595
- */
3596
- invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
3597
- /**
3598
- * The ID of the license type to associate with this price.
3599
- */
3600
- license_type_id?: string | null;
3601
- /**
3602
- * User-specified key/value pairs for the resource. Individual keys can be removed
3603
- * by setting the value to `null`, and the entire metadata mapping can be cleared
3604
- * by setting `metadata` to `null`.
3605
- */
3606
- metadata?: {
3607
- [key: string]: string | null;
3608
- } | null;
3609
- /**
3610
- * A transient ID that can be used to reference this price when adding adjustments
3611
- * in the same API call.
3612
- */
3613
- reference_id?: string | null;
3614
- }
3615
- namespace NewLicenseAllocationScalableMatrixWithTieredPricingPrice {
3616
- interface LicenseAllocation {
3617
- /**
3618
- * The amount of credits granted per active license per cadence.
3619
- */
3620
- amount: string;
3621
- /**
3622
- * The currency of the license allocation.
3623
- */
3624
- currency: string;
3625
- /**
3626
- * When True, overage beyond the allocation is written off.
3627
- */
3628
- write_off_overage?: boolean | null;
3629
- }
3630
- /**
3631
- * Configuration for scalable_matrix_with_tiered_pricing pricing
3632
- */
3633
- interface ScalableMatrixWithTieredPricingConfig {
3634
- /**
3635
- * Used for the scalable matrix first dimension
3636
- */
3637
- first_dimension: string;
3638
- /**
3639
- * Apply a scaling factor to each dimension
3640
- */
3641
- matrix_scaling_factors: Array<ScalableMatrixWithTieredPricingConfig.MatrixScalingFactor>;
3642
- tiers: Array<ScalableMatrixWithTieredPricingConfig.Tier>;
3643
- /**
3644
- * Used for the scalable matrix second dimension (optional)
3645
- */
3646
- second_dimension?: string | null;
3647
- }
3648
- namespace ScalableMatrixWithTieredPricingConfig {
3649
- /**
3650
- * Configuration for a single matrix scaling factor
3651
- */
3652
- interface MatrixScalingFactor {
3653
- first_dimension_value: string;
3654
- scaling_factor: string;
3655
- second_dimension_value?: string | null;
3656
- }
3657
- /**
3658
- * Configuration for a single tier entry with business logic
3659
- */
3660
- interface Tier {
3661
- tier_lower_bound: string;
3662
- unit_amount: string;
3663
- }
3664
- }
3665
- }
3666
- interface NewLicenseAllocationCumulativeGroupedBulkPrice {
3667
- /**
3668
- * The cadence to bill for this price on.
3669
- */
3670
- cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
3671
- /**
3672
- * Configuration for cumulative_grouped_bulk pricing
3673
- */
3674
- cumulative_grouped_bulk_config: NewLicenseAllocationCumulativeGroupedBulkPrice.CumulativeGroupedBulkConfig;
3675
- /**
3676
- * The id of the item the price will be associated with.
3677
- */
3678
- item_id: string;
3679
- /**
3680
- * License allocations to associate with this price. Each entry defines a
3681
- * per-license credit pool granted each cadence. Requires license_type_id or
3682
- * license_type_configuration to be set.
3683
- */
3684
- license_allocations: Array<NewLicenseAllocationCumulativeGroupedBulkPrice.LicenseAllocation>;
3685
- /**
3686
- * The pricing model type
3687
- */
3688
- model_type: 'cumulative_grouped_bulk';
3689
- /**
3690
- * The name of the price.
3691
- */
3692
- name: string;
3693
- /**
3694
- * The id of the billable metric for the price. Only needed if the price is
3695
- * usage-based.
3696
- */
3697
- billable_metric_id?: string | null;
3698
- /**
3699
- * If the Price represents a fixed cost, the price will be billed in-advance if
3700
- * this is true, and in-arrears if this is false.
3701
- */
3702
- billed_in_advance?: boolean | null;
3703
- /**
3704
- * For custom cadence: specifies the duration of the billing period in days or
3705
- * months.
3706
- */
3707
- billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
3708
- /**
3709
- * The per unit conversion rate of the price currency to the invoicing currency.
3710
- */
3711
- conversion_rate?: number | null;
3712
- /**
3713
- * The configuration for the rate of the price currency to the invoicing currency.
3714
- */
3715
- conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
3716
- /**
3717
- * An ISO 4217 currency string, or custom pricing unit identifier, in which this
3718
- * price is billed.
3719
- */
3720
- currency?: string | null;
3721
- /**
3722
- * For dimensional price: specifies a price group and dimension values
3723
- */
3724
- dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
3725
- /**
3726
- * An alias for the price.
3727
- */
3728
- external_price_id?: string | null;
3729
- /**
3730
- * If the Price represents a fixed cost, this represents the quantity of units
3731
- * applied.
3732
- */
3733
- fixed_price_quantity?: number | null;
3734
- /**
3735
- * The property used to group this price on an invoice
3736
- */
3737
- invoice_grouping_key?: string | null;
3738
- /**
3739
- * Within each billing cycle, specifies the cadence at which invoices are produced.
3740
- * If unspecified, a single invoice is produced per billing cycle.
3741
- */
3742
- invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
3743
- /**
3744
- * The ID of the license type to associate with this price.
3745
- */
3746
- license_type_id?: string | null;
3747
- /**
3748
- * User-specified key/value pairs for the resource. Individual keys can be removed
3749
- * by setting the value to `null`, and the entire metadata mapping can be cleared
3750
- * by setting `metadata` to `null`.
3751
- */
3752
- metadata?: {
3753
- [key: string]: string | null;
3754
- } | null;
3755
- /**
3756
- * A transient ID that can be used to reference this price when adding adjustments
3757
- * in the same API call.
3758
- */
3759
- reference_id?: string | null;
3760
- }
3761
- namespace NewLicenseAllocationCumulativeGroupedBulkPrice {
3762
- /**
3763
- * Configuration for cumulative_grouped_bulk pricing
3764
- */
3765
- interface CumulativeGroupedBulkConfig {
3766
- /**
3767
- * Each tier lower bound must have the same group of values.
3768
- */
3769
- dimension_values: Array<CumulativeGroupedBulkConfig.DimensionValue>;
3770
- group: string;
3771
- }
3772
- namespace CumulativeGroupedBulkConfig {
3773
- /**
3774
- * Configuration for a dimension value entry
3775
- */
3776
- interface DimensionValue {
3777
- /**
3778
- * Grouping key value
3779
- */
3780
- grouping_key: string;
3781
- /**
3782
- * Tier lower bound
3783
- */
3784
- tier_lower_bound: string;
3785
- /**
3786
- * Unit amount for this combination
3787
- */
3788
- unit_amount: string;
3789
- }
3790
- }
3791
- interface LicenseAllocation {
3792
- /**
3793
- * The amount of credits granted per active license per cadence.
3794
- */
3795
- amount: string;
3796
- /**
3797
- * The currency of the license allocation.
3798
- */
3799
- currency: string;
3800
- /**
3801
- * When True, overage beyond the allocation is written off.
3802
- */
3803
- write_off_overage?: boolean | null;
3804
- }
3805
- }
3806
- interface NewLicenseAllocationCumulativeGroupedAllocationPrice {
3807
- /**
3808
- * The cadence to bill for this price on.
3809
- */
3810
- cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
3811
- /**
3812
- * Configuration for cumulative_grouped_allocation pricing
3813
- */
3814
- cumulative_grouped_allocation_config: NewLicenseAllocationCumulativeGroupedAllocationPrice.CumulativeGroupedAllocationConfig;
3815
- /**
3816
- * The id of the item the price will be associated with.
3817
- */
3818
- item_id: string;
3819
- /**
3820
- * License allocations to associate with this price. Each entry defines a
3821
- * per-license credit pool granted each cadence. Requires license_type_id or
3822
- * license_type_configuration to be set.
3823
- */
3824
- license_allocations: Array<NewLicenseAllocationCumulativeGroupedAllocationPrice.LicenseAllocation>;
3825
- /**
3826
- * The pricing model type
3827
- */
3828
- model_type: 'cumulative_grouped_allocation';
3829
- /**
3830
- * The name of the price.
3831
- */
3832
- name: string;
3833
- /**
3834
- * The id of the billable metric for the price. Only needed if the price is
3835
- * usage-based.
3836
- */
3837
- billable_metric_id?: string | null;
3838
- /**
3839
- * If the Price represents a fixed cost, the price will be billed in-advance if
3840
- * this is true, and in-arrears if this is false.
3841
- */
3842
- billed_in_advance?: boolean | null;
3843
- /**
3844
- * For custom cadence: specifies the duration of the billing period in days or
3845
- * months.
3846
- */
3847
- billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
3848
- /**
3849
- * The per unit conversion rate of the price currency to the invoicing currency.
3850
- */
3851
- conversion_rate?: number | null;
3852
- /**
3853
- * The configuration for the rate of the price currency to the invoicing currency.
3854
- */
3855
- conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
3856
- /**
3857
- * An ISO 4217 currency string, or custom pricing unit identifier, in which this
3858
- * price is billed.
3859
- */
3860
- currency?: string | null;
3861
- /**
3862
- * For dimensional price: specifies a price group and dimension values
3863
- */
3864
- dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
3865
- /**
3866
- * An alias for the price.
3867
- */
3868
- external_price_id?: string | null;
3869
- /**
3870
- * If the Price represents a fixed cost, this represents the quantity of units
3871
- * applied.
3872
- */
3873
- fixed_price_quantity?: number | null;
3874
- /**
3875
- * The property used to group this price on an invoice
3876
- */
3877
- invoice_grouping_key?: string | null;
3878
- /**
3879
- * Within each billing cycle, specifies the cadence at which invoices are produced.
3880
- * If unspecified, a single invoice is produced per billing cycle.
3881
- */
3882
- invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
3883
- /**
3884
- * The ID of the license type to associate with this price.
3885
- */
3886
- license_type_id?: string | null;
3887
- /**
3888
- * User-specified key/value pairs for the resource. Individual keys can be removed
3889
- * by setting the value to `null`, and the entire metadata mapping can be cleared
3890
- * by setting `metadata` to `null`.
3891
- */
3892
- metadata?: {
3893
- [key: string]: string | null;
3894
- } | null;
3895
- /**
3896
- * A transient ID that can be used to reference this price when adding adjustments
3897
- * in the same API call.
3898
- */
3899
- reference_id?: string | null;
3900
- }
3901
- namespace NewLicenseAllocationCumulativeGroupedAllocationPrice {
3902
- /**
3903
- * Configuration for cumulative_grouped_allocation pricing
3904
- */
3905
- interface CumulativeGroupedAllocationConfig {
3906
- /**
3907
- * The overall allocation across all groups
3908
- */
3909
- cumulative_allocation: string;
3910
- /**
3911
- * The allocation per individual group
3912
- */
3913
- group_allocation: string;
3914
- /**
3915
- * The event property used to group usage before applying allocations
3916
- */
3917
- grouping_key: string;
3918
- /**
3919
- * The amount to charge for each unit outside of the allocation
3920
- */
3921
- unit_amount: string;
3922
- }
3923
- interface LicenseAllocation {
3924
- /**
3925
- * The amount of credits granted per active license per cadence.
3926
- */
3927
- amount: string;
3928
- /**
3929
- * The currency of the license allocation.
3930
- */
3931
- currency: string;
3932
- /**
3933
- * When True, overage beyond the allocation is written off.
3934
- */
3935
- write_off_overage?: boolean | null;
3936
- }
3937
- }
3938
- interface NewLicenseAllocationMinimumCompositePrice {
3939
- /**
3940
- * The cadence to bill for this price on.
3941
- */
3942
- cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
3943
- /**
3944
- * The id of the item the price will be associated with.
3945
- */
3946
- item_id: string;
3947
- /**
3948
- * License allocations to associate with this price. Each entry defines a
3949
- * per-license credit pool granted each cadence. Requires license_type_id or
3950
- * license_type_configuration to be set.
3951
- */
3952
- license_allocations: Array<NewLicenseAllocationMinimumCompositePrice.LicenseAllocation>;
3953
- /**
3954
- * Configuration for minimum_composite pricing
3955
- */
3956
- minimum_composite_config: NewLicenseAllocationMinimumCompositePrice.MinimumCompositeConfig;
3957
- /**
3958
- * The pricing model type
3959
- */
3960
- model_type: 'minimum_composite';
3961
- /**
3962
- * The name of the price.
3963
- */
3964
- name: string;
3965
- /**
3966
- * The id of the billable metric for the price. Only needed if the price is
3967
- * usage-based.
3968
- */
3969
- billable_metric_id?: string | null;
3970
- /**
3971
- * If the Price represents a fixed cost, the price will be billed in-advance if
3972
- * this is true, and in-arrears if this is false.
3973
- */
3974
- billed_in_advance?: boolean | null;
3975
- /**
3976
- * For custom cadence: specifies the duration of the billing period in days or
3977
- * months.
3978
- */
3979
- billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
3980
- /**
3981
- * The per unit conversion rate of the price currency to the invoicing currency.
3982
- */
3983
- conversion_rate?: number | null;
3984
- /**
3985
- * The configuration for the rate of the price currency to the invoicing currency.
3986
- */
3987
- conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
3988
- /**
3989
- * An ISO 4217 currency string, or custom pricing unit identifier, in which this
3990
- * price is billed.
3991
- */
3992
- currency?: string | null;
3993
- /**
3994
- * For dimensional price: specifies a price group and dimension values
3995
- */
3996
- dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
3997
- /**
3998
- * An alias for the price.
3999
- */
4000
- external_price_id?: string | null;
4001
- /**
4002
- * If the Price represents a fixed cost, this represents the quantity of units
4003
- * applied.
4004
- */
4005
- fixed_price_quantity?: number | null;
4006
- /**
4007
- * The property used to group this price on an invoice
4008
- */
4009
- invoice_grouping_key?: string | null;
4010
- /**
4011
- * Within each billing cycle, specifies the cadence at which invoices are produced.
4012
- * If unspecified, a single invoice is produced per billing cycle.
4013
- */
4014
- invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
4015
- /**
4016
- * The ID of the license type to associate with this price.
4017
- */
4018
- license_type_id?: string | null;
4019
- /**
4020
- * User-specified key/value pairs for the resource. Individual keys can be removed
4021
- * by setting the value to `null`, and the entire metadata mapping can be cleared
4022
- * by setting `metadata` to `null`.
4023
- */
4024
- metadata?: {
4025
- [key: string]: string | null;
4026
- } | null;
4027
- /**
4028
- * A transient ID that can be used to reference this price when adding adjustments
4029
- * in the same API call.
4030
- */
4031
- reference_id?: string | null;
4032
- }
4033
- namespace NewLicenseAllocationMinimumCompositePrice {
4034
- interface LicenseAllocation {
4035
- /**
4036
- * The amount of credits granted per active license per cadence.
4037
- */
4038
- amount: string;
4039
- /**
4040
- * The currency of the license allocation.
4041
- */
4042
- currency: string;
4043
- /**
4044
- * When True, overage beyond the allocation is written off.
4045
- */
4046
- write_off_overage?: boolean | null;
4047
- }
4048
- /**
4049
- * Configuration for minimum_composite pricing
4050
- */
4051
- interface MinimumCompositeConfig {
4052
- /**
4053
- * The minimum amount to apply
4054
- */
4055
- minimum_amount: string;
4056
- /**
4057
- * If true, subtotals from this price are prorated based on the service period
4058
- */
4059
- prorated?: boolean;
4060
- }
4061
- }
4062
- interface NewLicenseAllocationPercentCompositePrice {
4063
- /**
4064
- * The cadence to bill for this price on.
4065
- */
4066
- cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
4067
- /**
4068
- * The id of the item the price will be associated with.
4069
- */
4070
- item_id: string;
4071
- /**
4072
- * License allocations to associate with this price. Each entry defines a
4073
- * per-license credit pool granted each cadence. Requires license_type_id or
4074
- * license_type_configuration to be set.
4075
- */
4076
- license_allocations: Array<NewLicenseAllocationPercentCompositePrice.LicenseAllocation>;
4077
- /**
4078
- * The pricing model type
4079
- */
4080
- model_type: 'percent';
4081
- /**
4082
- * The name of the price.
4083
- */
4084
- name: string;
4085
- /**
4086
- * Configuration for percent pricing
4087
- */
4088
- percent_config: NewLicenseAllocationPercentCompositePrice.PercentConfig;
4089
- /**
4090
- * The id of the billable metric for the price. Only needed if the price is
4091
- * usage-based.
4092
- */
4093
- billable_metric_id?: string | null;
4094
- /**
4095
- * If the Price represents a fixed cost, the price will be billed in-advance if
4096
- * this is true, and in-arrears if this is false.
4097
- */
4098
- billed_in_advance?: boolean | null;
4099
- /**
4100
- * For custom cadence: specifies the duration of the billing period in days or
4101
- * months.
4102
- */
4103
- billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
4104
- /**
4105
- * The per unit conversion rate of the price currency to the invoicing currency.
4106
- */
4107
- conversion_rate?: number | null;
4108
- /**
4109
- * The configuration for the rate of the price currency to the invoicing currency.
4110
- */
4111
- conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
4112
- /**
4113
- * An ISO 4217 currency string, or custom pricing unit identifier, in which this
4114
- * price is billed.
4115
- */
4116
- currency?: string | null;
4117
- /**
4118
- * For dimensional price: specifies a price group and dimension values
4119
- */
4120
- dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
4121
- /**
4122
- * An alias for the price.
4123
- */
4124
- external_price_id?: string | null;
4125
- /**
4126
- * If the Price represents a fixed cost, this represents the quantity of units
4127
- * applied.
4128
- */
4129
- fixed_price_quantity?: number | null;
4130
- /**
4131
- * The property used to group this price on an invoice
4132
- */
4133
- invoice_grouping_key?: string | null;
4134
- /**
4135
- * Within each billing cycle, specifies the cadence at which invoices are produced.
4136
- * If unspecified, a single invoice is produced per billing cycle.
4137
- */
4138
- invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
4139
- /**
4140
- * The ID of the license type to associate with this price.
4141
- */
4142
- license_type_id?: string | null;
4143
- /**
4144
- * User-specified key/value pairs for the resource. Individual keys can be removed
4145
- * by setting the value to `null`, and the entire metadata mapping can be cleared
4146
- * by setting `metadata` to `null`.
4147
- */
4148
- metadata?: {
4149
- [key: string]: string | null;
4150
- } | null;
4151
- /**
4152
- * A transient ID that can be used to reference this price when adding adjustments
4153
- * in the same API call.
4154
- */
4155
- reference_id?: string | null;
4156
- }
4157
- namespace NewLicenseAllocationPercentCompositePrice {
4158
- interface LicenseAllocation {
4159
- /**
4160
- * The amount of credits granted per active license per cadence.
4161
- */
4162
- amount: string;
4163
- /**
4164
- * The currency of the license allocation.
4165
- */
4166
- currency: string;
4167
- /**
4168
- * When True, overage beyond the allocation is written off.
4169
- */
4170
- write_off_overage?: boolean | null;
4171
- }
4172
- /**
4173
- * Configuration for percent pricing
4174
- */
4175
- interface PercentConfig {
4176
- /**
4177
- * What percent of the component subtotals to charge
4178
- */
4179
- percent: number;
703
+ namespace MatrixWithThresholdDiscountsConfig {
704
+ interface MatrixValue {
705
+ first_dimension_value: string;
706
+ unit_amount: string;
707
+ second_dimension_value?: string | null;
708
+ }
709
+ interface ThresholdDiscountGroup {
710
+ /**
711
+ * Discount rate applied to spend above the threshold.
712
+ */
713
+ above_threshold_discount_percentage: string;
714
+ /**
715
+ * Discount rate applied to spend at or below the threshold. Set to 0 for no
716
+ * baseline discount.
717
+ */
718
+ below_threshold_discount_percentage: string;
719
+ /**
720
+ * Semicolon-separated list of matrix cell coordinates targeted by this group. Each
721
+ * coordinate is `first,second` when the matrix has two dimensions, or just `first`
722
+ * for a single-dimension matrix. Example: `blue,circle;green,triangle`.
723
+ */
724
+ cell_coordinates: string;
725
+ threshold_amount: string;
726
+ description?: string | null;
727
+ }
4180
728
  }
4181
729
  }
4182
- interface NewLicenseAllocationEventOutputPrice {
730
+ interface NewPlanTieredWithProrationPrice {
4183
731
  /**
4184
732
  * The cadence to bill for this price on.
4185
733
  */
4186
734
  cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
4187
- /**
4188
- * Configuration for event_output pricing
4189
- */
4190
- event_output_config: NewLicenseAllocationEventOutputPrice.EventOutputConfig;
4191
735
  /**
4192
736
  * The id of the item the price will be associated with.
4193
737
  */
4194
738
  item_id: string;
4195
- /**
4196
- * License allocations to associate with this price. Each entry defines a
4197
- * per-license credit pool granted each cadence. Requires license_type_id or
4198
- * license_type_configuration to be set.
4199
- */
4200
- license_allocations: Array<NewLicenseAllocationEventOutputPrice.LicenseAllocation>;
4201
739
  /**
4202
740
  * The pricing model type
4203
741
  */
4204
- model_type: 'event_output';
742
+ model_type: 'tiered_with_proration';
4205
743
  /**
4206
744
  * The name of the price.
4207
745
  */
4208
746
  name: string;
747
+ /**
748
+ * Configuration for tiered_with_proration pricing
749
+ */
750
+ tiered_with_proration_config: NewPlanTieredWithProrationPrice.TieredWithProrationConfig;
4209
751
  /**
4210
752
  * The id of the billable metric for the price. Only needed if the price is
4211
753
  * usage-based.
@@ -4274,51 +816,42 @@ export declare namespace PlanCreateParams {
4274
816
  */
4275
817
  reference_id?: string | null;
4276
818
  }
4277
- namespace NewLicenseAllocationEventOutputPrice {
819
+ namespace NewPlanTieredWithProrationPrice {
4278
820
  /**
4279
- * Configuration for event_output pricing
821
+ * Configuration for tiered_with_proration pricing
4280
822
  */
4281
- interface EventOutputConfig {
4282
- /**
4283
- * The key in the event data to extract the unit rate from.
4284
- */
4285
- unit_rating_key: string;
4286
- /**
4287
- * If provided, this amount will be used as the unit rate when an event does not
4288
- * have a value for the `unit_rating_key`. If not provided, events missing a unit
4289
- * rate will be ignored.
4290
- */
4291
- default_unit_rate?: string | null;
823
+ interface TieredWithProrationConfig {
4292
824
  /**
4293
- * An optional key in the event data to group by (e.g., event ID). All events will
4294
- * also be grouped by their unit rate.
825
+ * Tiers for rating based on total usage quantities into the specified tier with
826
+ * proration
4295
827
  */
4296
- grouping_key?: string | null;
828
+ tiers: Array<TieredWithProrationConfig.Tier>;
4297
829
  }
4298
- interface LicenseAllocation {
4299
- /**
4300
- * The amount of credits granted per active license per cadence.
4301
- */
4302
- amount: string;
4303
- /**
4304
- * The currency of the license allocation.
4305
- */
4306
- currency: string;
830
+ namespace TieredWithProrationConfig {
4307
831
  /**
4308
- * When True, overage beyond the allocation is written off.
832
+ * Configuration for a single tiered with proration tier
4309
833
  */
4310
- write_off_overage?: boolean | null;
834
+ interface Tier {
835
+ /**
836
+ * Inclusive tier starting value
837
+ */
838
+ tier_lower_bound: string;
839
+ /**
840
+ * Amount per unit
841
+ */
842
+ unit_amount: string;
843
+ }
4311
844
  }
4312
845
  }
4313
- interface NewPlanBulkWithFiltersPrice {
4314
- /**
4315
- * Configuration for bulk_with_filters pricing
4316
- */
4317
- bulk_with_filters_config: NewPlanBulkWithFiltersPrice.BulkWithFiltersConfig;
846
+ interface NewPlanGroupedWithMinMaxThresholdsPrice {
4318
847
  /**
4319
848
  * The cadence to bill for this price on.
4320
849
  */
4321
850
  cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
851
+ /**
852
+ * Configuration for grouped_with_min_max_thresholds pricing
853
+ */
854
+ grouped_with_min_max_thresholds_config: NewPlanGroupedWithMinMaxThresholdsPrice.GroupedWithMinMaxThresholdsConfig;
4322
855
  /**
4323
856
  * The id of the item the price will be associated with.
4324
857
  */
@@ -4326,7 +859,7 @@ export declare namespace PlanCreateParams {
4326
859
  /**
4327
860
  * The pricing model type
4328
861
  */
4329
- model_type: 'bulk_with_filters';
862
+ model_type: 'grouped_with_min_max_thresholds';
4330
863
  /**
4331
864
  * The name of the price.
4332
865
  */
@@ -4399,54 +932,38 @@ export declare namespace PlanCreateParams {
4399
932
  */
4400
933
  reference_id?: string | null;
4401
934
  }
4402
- namespace NewPlanBulkWithFiltersPrice {
935
+ namespace NewPlanGroupedWithMinMaxThresholdsPrice {
4403
936
  /**
4404
- * Configuration for bulk_with_filters pricing
937
+ * Configuration for grouped_with_min_max_thresholds pricing
4405
938
  */
4406
- interface BulkWithFiltersConfig {
939
+ interface GroupedWithMinMaxThresholdsConfig {
4407
940
  /**
4408
- * Property filters to apply (all must match)
941
+ * The event property used to group before applying thresholds
4409
942
  */
4410
- filters: Array<BulkWithFiltersConfig.Filter>;
943
+ grouping_key: string;
4411
944
  /**
4412
- * Bulk tiers for rating based on total usage volume
945
+ * The maximum amount to charge each group
4413
946
  */
4414
- tiers: Array<BulkWithFiltersConfig.Tier>;
4415
- }
4416
- namespace BulkWithFiltersConfig {
947
+ maximum_charge: string;
4417
948
  /**
4418
- * Configuration for a single property filter
949
+ * The minimum amount to charge each group, regardless of usage
4419
950
  */
4420
- interface Filter {
4421
- /**
4422
- * Event property key to filter on
4423
- */
4424
- property_key: string;
4425
- /**
4426
- * Event property value to match
4427
- */
4428
- property_value: string;
4429
- }
951
+ minimum_charge: string;
4430
952
  /**
4431
- * Configuration for a single bulk pricing tier
953
+ * The base price charged per group
4432
954
  */
4433
- interface Tier {
4434
- /**
4435
- * Amount per unit
4436
- */
4437
- unit_amount: string;
4438
- /**
4439
- * The lower bound for this tier
4440
- */
4441
- tier_lower_bound?: string | null;
4442
- }
955
+ per_unit_rate: string;
4443
956
  }
4444
957
  }
4445
- interface NewPlanTieredWithProrationPrice {
958
+ interface NewPlanCumulativeGroupedAllocationPrice {
4446
959
  /**
4447
960
  * The cadence to bill for this price on.
4448
961
  */
4449
962
  cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
963
+ /**
964
+ * Configuration for cumulative_grouped_allocation pricing
965
+ */
966
+ cumulative_grouped_allocation_config: NewPlanCumulativeGroupedAllocationPrice.CumulativeGroupedAllocationConfig;
4450
967
  /**
4451
968
  * The id of the item the price will be associated with.
4452
969
  */
@@ -4454,15 +971,11 @@ export declare namespace PlanCreateParams {
4454
971
  /**
4455
972
  * The pricing model type
4456
973
  */
4457
- model_type: 'tiered_with_proration';
974
+ model_type: 'cumulative_grouped_allocation';
4458
975
  /**
4459
976
  * The name of the price.
4460
977
  */
4461
978
  name: string;
4462
- /**
4463
- * Configuration for tiered_with_proration pricing
4464
- */
4465
- tiered_with_proration_config: NewPlanTieredWithProrationPrice.TieredWithProrationConfig;
4466
979
  /**
4467
980
  * The id of the billable metric for the price. Only needed if the price is
4468
981
  * usage-based.
@@ -4531,42 +1044,38 @@ export declare namespace PlanCreateParams {
4531
1044
  */
4532
1045
  reference_id?: string | null;
4533
1046
  }
4534
- namespace NewPlanTieredWithProrationPrice {
1047
+ namespace NewPlanCumulativeGroupedAllocationPrice {
4535
1048
  /**
4536
- * Configuration for tiered_with_proration pricing
1049
+ * Configuration for cumulative_grouped_allocation pricing
4537
1050
  */
4538
- interface TieredWithProrationConfig {
1051
+ interface CumulativeGroupedAllocationConfig {
4539
1052
  /**
4540
- * Tiers for rating based on total usage quantities into the specified tier with
4541
- * proration
1053
+ * The overall allocation across all groups
4542
1054
  */
4543
- tiers: Array<TieredWithProrationConfig.Tier>;
4544
- }
4545
- namespace TieredWithProrationConfig {
1055
+ cumulative_allocation: string;
4546
1056
  /**
4547
- * Configuration for a single tiered with proration tier
1057
+ * The allocation per individual group
4548
1058
  */
4549
- interface Tier {
4550
- /**
4551
- * Inclusive tier starting value
4552
- */
4553
- tier_lower_bound: string;
4554
- /**
4555
- * Amount per unit
4556
- */
4557
- unit_amount: string;
4558
- }
1059
+ group_allocation: string;
1060
+ /**
1061
+ * The event property used to group usage before applying allocations
1062
+ */
1063
+ grouping_key: string;
1064
+ /**
1065
+ * The amount to charge for each unit outside of the allocation
1066
+ */
1067
+ unit_amount: string;
4559
1068
  }
4560
1069
  }
4561
- interface NewPlanGroupedWithMinMaxThresholdsPrice {
1070
+ interface NewPlanDailyCreditAllowancePrice {
4562
1071
  /**
4563
1072
  * The cadence to bill for this price on.
4564
1073
  */
4565
1074
  cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
4566
1075
  /**
4567
- * Configuration for grouped_with_min_max_thresholds pricing
1076
+ * Configuration for daily_credit_allowance pricing
4568
1077
  */
4569
- grouped_with_min_max_thresholds_config: NewPlanGroupedWithMinMaxThresholdsPrice.GroupedWithMinMaxThresholdsConfig;
1078
+ daily_credit_allowance_config: NewPlanDailyCreditAllowancePrice.DailyCreditAllowanceConfig;
4570
1079
  /**
4571
1080
  * The id of the item the price will be associated with.
4572
1081
  */
@@ -4574,7 +1083,7 @@ export declare namespace PlanCreateParams {
4574
1083
  /**
4575
1084
  * The pricing model type
4576
1085
  */
4577
- model_type: 'grouped_with_min_max_thresholds';
1086
+ model_type: 'daily_credit_allowance';
4578
1087
  /**
4579
1088
  * The name of the price.
4580
1089
  */
@@ -4647,46 +1156,69 @@ export declare namespace PlanCreateParams {
4647
1156
  */
4648
1157
  reference_id?: string | null;
4649
1158
  }
4650
- namespace NewPlanGroupedWithMinMaxThresholdsPrice {
1159
+ namespace NewPlanDailyCreditAllowancePrice {
4651
1160
  /**
4652
- * Configuration for grouped_with_min_max_thresholds pricing
1161
+ * Configuration for daily_credit_allowance pricing
4653
1162
  */
4654
- interface GroupedWithMinMaxThresholdsConfig {
1163
+ interface DailyCreditAllowanceConfig {
4655
1164
  /**
4656
- * The event property used to group before applying thresholds
1165
+ * Credits granted per day. Lose-it-or-use-it; does not roll over.
4657
1166
  */
4658
- grouping_key: string;
1167
+ daily_allowance: string;
4659
1168
  /**
4660
- * The maximum amount to charge each group
1169
+ * Default per-unit credit rate for any usage not bucketed into a specified
1170
+ * matrix_value
4661
1171
  */
4662
- maximum_charge: string;
1172
+ default_unit_amount: string;
4663
1173
  /**
4664
- * The minimum amount to charge each group, regardless of usage
1174
+ * One or two event property values to evaluate matrix groups by
4665
1175
  */
4666
- minimum_charge: string;
1176
+ dimensions: Array<string | null>;
4667
1177
  /**
4668
- * The base price charged per group
1178
+ * Event property whose value identifies the day bucket the event belongs to (e.g.
1179
+ * 'event_day' set to an ISO date string in the customer's timezone). The allowance
1180
+ * resets per distinct value of this property.
4669
1181
  */
4670
- per_unit_rate: string;
1182
+ event_day_property: string;
1183
+ /**
1184
+ * Per-dimension credit rates
1185
+ */
1186
+ matrix_values: Array<DailyCreditAllowanceConfig.MatrixValue>;
1187
+ }
1188
+ namespace DailyCreditAllowanceConfig {
1189
+ /**
1190
+ * Per-dimension credit price for the daily credit allowance model.
1191
+ */
1192
+ interface MatrixValue {
1193
+ /**
1194
+ * One or two matrix keys to filter usage to this value by. For example, ["model"]
1195
+ * could be used to apply a different credit rate to each AI model.
1196
+ */
1197
+ dimension_values: Array<string | null>;
1198
+ /**
1199
+ * Credits charged per unit of usage matching the specified dimension_values
1200
+ */
1201
+ unit_amount: string;
1202
+ }
4671
1203
  }
4672
1204
  }
4673
- interface NewPlanCumulativeGroupedAllocationPrice {
1205
+ interface NewPlanMeteredAllowancePrice {
4674
1206
  /**
4675
1207
  * The cadence to bill for this price on.
4676
1208
  */
4677
1209
  cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
4678
- /**
4679
- * Configuration for cumulative_grouped_allocation pricing
4680
- */
4681
- cumulative_grouped_allocation_config: NewPlanCumulativeGroupedAllocationPrice.CumulativeGroupedAllocationConfig;
4682
1210
  /**
4683
1211
  * The id of the item the price will be associated with.
4684
1212
  */
4685
1213
  item_id: string;
1214
+ /**
1215
+ * Configuration for metered_allowance pricing
1216
+ */
1217
+ metered_allowance_config: NewPlanMeteredAllowancePrice.MeteredAllowanceConfig;
4686
1218
  /**
4687
1219
  * The pricing model type
4688
1220
  */
4689
- model_type: 'cumulative_grouped_allocation';
1221
+ model_type: 'metered_allowance';
4690
1222
  /**
4691
1223
  * The name of the price.
4692
1224
  */
@@ -4759,27 +1291,40 @@ export declare namespace PlanCreateParams {
4759
1291
  */
4760
1292
  reference_id?: string | null;
4761
1293
  }
4762
- namespace NewPlanCumulativeGroupedAllocationPrice {
1294
+ namespace NewPlanMeteredAllowancePrice {
4763
1295
  /**
4764
- * Configuration for cumulative_grouped_allocation pricing
1296
+ * Configuration for metered_allowance pricing
4765
1297
  */
4766
- interface CumulativeGroupedAllocationConfig {
1298
+ interface MeteredAllowanceConfig {
4767
1299
  /**
4768
- * The overall allocation across all groups
1300
+ * The grouping_key value whose summed quantity represents the allowance for this
1301
+ * period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption
1302
+ * — credit can never exceed actual usage.
4769
1303
  */
4770
- cumulative_allocation: string;
1304
+ allowance_grouping_value: string;
4771
1305
  /**
4772
- * The allocation per individual group
1306
+ * The grouping_key value whose summed quantity represents consumption (e.g.
1307
+ * 'download'). Charged at unit_amount.
4773
1308
  */
4774
- group_allocation: string;
1309
+ consumption_grouping_value: string;
4775
1310
  /**
4776
- * The event property used to group usage before applying allocations
1311
+ * Event property used to partition the metric into consumption and allowance
1312
+ * quantities (e.g. 'event_name'). The metric is queried with this key and the two
1313
+ * values below select which partition is which.
4777
1314
  */
4778
1315
  grouping_key: string;
4779
1316
  /**
4780
- * The amount to charge for each unit outside of the allocation
1317
+ * Per-unit price applied to gross consumption and to the allowance credit.
4781
1318
  */
4782
1319
  unit_amount: string;
1320
+ /**
1321
+ * Sub-line label for the credit row (e.g. 'Up to 3x free egress').
1322
+ */
1323
+ allowance_display_name?: string;
1324
+ /**
1325
+ * Sub-line label for the gross consumption row (e.g. 'bytes gotten').
1326
+ */
1327
+ consumption_display_name?: string;
4783
1328
  }
4784
1329
  }
4785
1330
  interface NewPlanPercentCompositePrice {
@@ -4877,9 +1422,23 @@ export declare namespace PlanCreateParams {
4877
1422
  */
4878
1423
  interface PercentConfig {
4879
1424
  /**
4880
- * What percent of the component subtotals to charge
1425
+ * Fraction of the component subtotals to charge (0 < percent <= 1).
4881
1426
  */
4882
1427
  percent: number;
1428
+ /**
1429
+ * Maximum amount to charge. If unset, the fee has no upper bound.
1430
+ */
1431
+ maximum_amount?: string | null;
1432
+ /**
1433
+ * Minimum amount to charge. If unset, the fee is bounded below by 0.
1434
+ */
1435
+ minimum_amount?: string | null;
1436
+ /**
1437
+ * If true, the minimum_amount is prorated based on the service period. The
1438
+ * maximum_amount is an absolute cap (never prorated), and the percent applied to
1439
+ * upstream subtotals is never prorated either.
1440
+ */
1441
+ prorated?: boolean;
4883
1442
  }
4884
1443
  }
4885
1444
  interface NewPlanEventOutputPrice {
@@ -4998,12 +1557,77 @@ export declare namespace PlanCreateParams {
4998
1557
  /**
4999
1558
  * The definition of a new adjustment to create and add to the plan.
5000
1559
  */
5001
- adjustment: Shared.NewPercentageDiscount | Shared.NewUsageDiscount | Shared.NewAmountDiscount | Shared.NewMinimum | Shared.NewMaximum;
1560
+ adjustment: Shared.NewPercentageDiscount | Shared.NewUsageDiscount | Shared.NewAmountDiscount | Shared.NewMinimum | Shared.NewMaximum | Adjustment.NewTieredPercentageDiscount;
5002
1561
  /**
5003
1562
  * The phase to add this adjustment to.
5004
1563
  */
5005
1564
  plan_phase_order?: number | null;
5006
1565
  }
1566
+ namespace Adjustment {
1567
+ interface NewTieredPercentageDiscount {
1568
+ adjustment_type: 'tiered_percentage_discount';
1569
+ tiers: Array<NewTieredPercentageDiscount.Tier>;
1570
+ /**
1571
+ * If set, the adjustment will apply to every price on the subscription.
1572
+ */
1573
+ applies_to_all?: true | null;
1574
+ /**
1575
+ * The set of item IDs to which this adjustment applies.
1576
+ */
1577
+ applies_to_item_ids?: Array<string> | null;
1578
+ /**
1579
+ * The set of price IDs to which this adjustment applies.
1580
+ */
1581
+ applies_to_price_ids?: Array<string> | null;
1582
+ /**
1583
+ * If set, only prices in the specified currency will have the adjustment applied.
1584
+ */
1585
+ currency?: string | null;
1586
+ /**
1587
+ * A list of filters that determine which prices this adjustment will apply to.
1588
+ */
1589
+ filters?: Array<NewTieredPercentageDiscount.Filter> | null;
1590
+ /**
1591
+ * When false, this adjustment will be applied to a single price. Otherwise, it
1592
+ * will be applied at the invoice level, possibly to multiple prices.
1593
+ */
1594
+ is_invoice_level?: boolean;
1595
+ /**
1596
+ * If set, only prices of the specified type will have the adjustment applied.
1597
+ */
1598
+ price_type?: 'usage' | 'fixed_in_advance' | 'fixed_in_arrears' | 'fixed' | 'in_arrears' | null;
1599
+ }
1600
+ namespace NewTieredPercentageDiscount {
1601
+ interface Tier {
1602
+ /**
1603
+ * Exclusive lower bound of cumulative spend for this tier.
1604
+ */
1605
+ lower_bound: number;
1606
+ /**
1607
+ * The percentage (0-1) discounted from spend in this tier.
1608
+ */
1609
+ percentage: number;
1610
+ /**
1611
+ * Inclusive upper bound of cumulative spend; null for the final open-ended tier.
1612
+ */
1613
+ upper_bound?: number | null;
1614
+ }
1615
+ interface Filter {
1616
+ /**
1617
+ * The property of the price to filter on.
1618
+ */
1619
+ field: 'price_id' | 'item_id' | 'price_type' | 'currency' | 'pricing_unit_id';
1620
+ /**
1621
+ * Should prices that match the filter be included or excluded.
1622
+ */
1623
+ operator: 'includes' | 'excludes';
1624
+ /**
1625
+ * The IDs or values that match this filter.
1626
+ */
1627
+ values: Array<string>;
1628
+ }
1629
+ }
1630
+ }
5007
1631
  interface PlanPhase {
5008
1632
  /**
5009
1633
  * Determines the ordering of the phase in a plan's lifecycle. 1 = first phase.
@@ -5022,6 +1646,10 @@ export declare namespace PlanCreateParams {
5022
1646
  }
5023
1647
  }
5024
1648
  export interface PlanUpdateParams {
1649
+ /**
1650
+ * An optional user-defined description of the plan.
1651
+ */
1652
+ description?: string | null;
5025
1653
  /**
5026
1654
  * An optional user-defined ID for this plan resource, used throughout the system
5027
1655
  * as an alias for this Plan. Use this field to identify a plan by an existing