orb-billing 5.5.1 → 5.7.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.
- package/CHANGELOG.md +33 -0
- package/core.js +3 -3
- package/core.js.map +1 -1
- package/core.mjs +3 -3
- package/core.mjs.map +1 -1
- package/index.d.mts +4 -15
- package/index.d.ts +4 -15
- package/index.d.ts.map +1 -1
- package/index.js.map +1 -1
- package/index.mjs.map +1 -1
- package/package.json +4 -1
- package/resources/alerts.d.ts +1 -1
- package/resources/beta/beta.d.ts +448 -4
- package/resources/beta/beta.d.ts.map +1 -1
- package/resources/beta/beta.js.map +1 -1
- package/resources/beta/beta.mjs.map +1 -1
- package/resources/beta/external-plan-id.d.ts +448 -4
- package/resources/beta/external-plan-id.d.ts.map +1 -1
- package/resources/customers/balance-transactions.d.ts +2 -2
- package/resources/customers/balance-transactions.d.ts.map +1 -1
- package/resources/customers/balance-transactions.js.map +1 -1
- package/resources/customers/balance-transactions.mjs.map +1 -1
- package/resources/customers/credits/ledger.d.ts +22 -8
- package/resources/customers/credits/ledger.d.ts.map +1 -1
- package/resources/customers/credits/ledger.js.map +1 -1
- package/resources/customers/credits/ledger.mjs.map +1 -1
- package/resources/customers/customers.d.ts +54 -6
- package/resources/customers/customers.d.ts.map +1 -1
- package/resources/customers/customers.js.map +1 -1
- package/resources/customers/customers.mjs.map +1 -1
- package/resources/dimensional-price-groups/dimensional-price-groups.d.ts +1 -1
- package/resources/dimensional-price-groups/dimensional-price-groups.js +1 -1
- package/resources/dimensional-price-groups/dimensional-price-groups.mjs +1 -1
- package/resources/events/backfills.d.ts +2 -2
- package/resources/events/backfills.js +2 -2
- package/resources/events/backfills.mjs +2 -2
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/invoice-line-items.d.ts +1 -1
- package/resources/invoices.d.ts +39 -11
- package/resources/invoices.d.ts.map +1 -1
- package/resources/invoices.js +4 -4
- package/resources/invoices.js.map +1 -1
- package/resources/invoices.mjs +4 -4
- package/resources/invoices.mjs.map +1 -1
- package/resources/plans/plans.d.ts +224 -2
- package/resources/plans/plans.d.ts.map +1 -1
- package/resources/plans/plans.js.map +1 -1
- package/resources/plans/plans.mjs.map +1 -1
- package/resources/prices/prices.d.ts +1089 -192
- package/resources/prices/prices.d.ts.map +1 -1
- package/resources/prices/prices.js.map +1 -1
- package/resources/prices/prices.mjs.map +1 -1
- package/resources/shared.d.ts +2656 -925
- package/resources/shared.d.ts.map +1 -1
- package/resources/shared.js.map +1 -1
- package/resources/shared.mjs.map +1 -1
- package/resources/subscriptions.d.ts +1831 -370
- package/resources/subscriptions.d.ts.map +1 -1
- package/resources/subscriptions.js +1 -1
- package/resources/subscriptions.js.map +1 -1
- package/resources/subscriptions.mjs +1 -1
- package/resources/subscriptions.mjs.map +1 -1
- package/src/core.ts +3 -3
- package/src/index.ts +5 -21
- package/src/resources/alerts.ts +1 -1
- package/src/resources/beta/beta.ts +544 -24
- package/src/resources/beta/external-plan-id.ts +544 -24
- package/src/resources/customers/balance-transactions.ts +4 -2
- package/src/resources/customers/credits/ledger.ts +24 -8
- package/src/resources/customers/customers.ts +79 -6
- package/src/resources/dimensional-price-groups/dimensional-price-groups.ts +1 -1
- package/src/resources/events/backfills.ts +2 -2
- package/src/resources/index.ts +1 -4
- package/src/resources/invoice-line-items.ts +1 -1
- package/src/resources/invoices.ts +44 -11
- package/src/resources/plans/plans.ts +272 -12
- package/src/resources/prices/prices.ts +1255 -206
- package/src/resources/shared.ts +3057 -1046
- package/src/resources/subscriptions.ts +2401 -694
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -181,40 +181,300 @@ export namespace BetaCreatePlanVersionParams {
|
|
|
181
181
|
plan_phase_order?: number | null;
|
|
182
182
|
|
|
183
183
|
/**
|
|
184
|
-
*
|
|
184
|
+
* New plan price request body params.
|
|
185
185
|
*/
|
|
186
186
|
price?:
|
|
187
187
|
| Shared.NewPlanUnitPrice
|
|
188
|
-
| Shared.NewPlanPackagePrice
|
|
189
|
-
| Shared.NewPlanMatrixPrice
|
|
190
188
|
| Shared.NewPlanTieredPrice
|
|
191
|
-
| Shared.NewPlanTieredBPSPrice
|
|
192
|
-
| Shared.NewPlanBPSPrice
|
|
193
|
-
| Shared.NewPlanBulkBPSPrice
|
|
194
189
|
| Shared.NewPlanBulkPrice
|
|
190
|
+
| Shared.NewPlanPackagePrice
|
|
191
|
+
| Shared.NewPlanMatrixPrice
|
|
195
192
|
| Shared.NewPlanThresholdTotalAmountPrice
|
|
196
193
|
| Shared.NewPlanTieredPackagePrice
|
|
197
194
|
| Shared.NewPlanTieredWithMinimumPrice
|
|
198
|
-
| Shared.
|
|
195
|
+
| Shared.NewPlanGroupedTieredPrice
|
|
196
|
+
| Shared.NewPlanTieredPackageWithMinimumPrice
|
|
199
197
|
| Shared.NewPlanPackageWithAllocationPrice
|
|
200
|
-
| Shared.
|
|
198
|
+
| Shared.NewPlanUnitWithPercentPrice
|
|
199
|
+
| Shared.NewPlanMatrixWithAllocationPrice
|
|
200
|
+
| AddPrice.NewPlanTieredWithProrationPrice
|
|
201
201
|
| Shared.NewPlanUnitWithProrationPrice
|
|
202
202
|
| Shared.NewPlanGroupedAllocationPrice
|
|
203
|
+
| Shared.NewPlanBulkWithProrationPrice
|
|
203
204
|
| Shared.NewPlanGroupedWithProratedMinimumPrice
|
|
204
205
|
| Shared.NewPlanGroupedWithMeteredMinimumPrice
|
|
206
|
+
| AddPrice.NewPlanGroupedWithMinMaxThresholdsPrice
|
|
205
207
|
| Shared.NewPlanMatrixWithDisplayNamePrice
|
|
206
|
-
| Shared.NewPlanBulkWithProrationPrice
|
|
207
208
|
| Shared.NewPlanGroupedTieredPackagePrice
|
|
208
209
|
| Shared.NewPlanMaxGroupTieredPackagePrice
|
|
209
210
|
| Shared.NewPlanScalableMatrixWithUnitPricingPrice
|
|
210
211
|
| Shared.NewPlanScalableMatrixWithTieredPricingPrice
|
|
211
212
|
| Shared.NewPlanCumulativeGroupedBulkPrice
|
|
212
|
-
| Shared.
|
|
213
|
-
| Shared.NewPlanMatrixWithAllocationPrice
|
|
214
|
-
| Shared.NewPlanGroupedTieredPrice
|
|
213
|
+
| Shared.NewPlanMinimumCompositePrice
|
|
215
214
|
| null;
|
|
216
215
|
}
|
|
217
216
|
|
|
217
|
+
export namespace AddPrice {
|
|
218
|
+
export interface NewPlanTieredWithProrationPrice {
|
|
219
|
+
/**
|
|
220
|
+
* The cadence to bill for this price on.
|
|
221
|
+
*/
|
|
222
|
+
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* The id of the item the price will be associated with.
|
|
226
|
+
*/
|
|
227
|
+
item_id: string;
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* The pricing model type
|
|
231
|
+
*/
|
|
232
|
+
model_type: 'tiered_with_proration';
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* The name of the price.
|
|
236
|
+
*/
|
|
237
|
+
name: string;
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
* Configuration for tiered_with_proration pricing
|
|
241
|
+
*/
|
|
242
|
+
tiered_with_proration_config: NewPlanTieredWithProrationPrice.TieredWithProrationConfig;
|
|
243
|
+
|
|
244
|
+
/**
|
|
245
|
+
* The id of the billable metric for the price. Only needed if the price is
|
|
246
|
+
* usage-based.
|
|
247
|
+
*/
|
|
248
|
+
billable_metric_id?: string | null;
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
* If the Price represents a fixed cost, the price will be billed in-advance if
|
|
252
|
+
* this is true, and in-arrears if this is false.
|
|
253
|
+
*/
|
|
254
|
+
billed_in_advance?: boolean | null;
|
|
255
|
+
|
|
256
|
+
/**
|
|
257
|
+
* For custom cadence: specifies the duration of the billing period in days or
|
|
258
|
+
* months.
|
|
259
|
+
*/
|
|
260
|
+
billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
261
|
+
|
|
262
|
+
/**
|
|
263
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
264
|
+
*/
|
|
265
|
+
conversion_rate?: number | null;
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* The configuration for the rate of the price currency to the invoicing currency.
|
|
269
|
+
*/
|
|
270
|
+
conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
|
|
271
|
+
|
|
272
|
+
/**
|
|
273
|
+
* An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
274
|
+
* price is billed.
|
|
275
|
+
*/
|
|
276
|
+
currency?: string | null;
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* For dimensional price: specifies a price group and dimension values
|
|
280
|
+
*/
|
|
281
|
+
dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
|
|
282
|
+
|
|
283
|
+
/**
|
|
284
|
+
* An alias for the price.
|
|
285
|
+
*/
|
|
286
|
+
external_price_id?: string | null;
|
|
287
|
+
|
|
288
|
+
/**
|
|
289
|
+
* If the Price represents a fixed cost, this represents the quantity of units
|
|
290
|
+
* applied.
|
|
291
|
+
*/
|
|
292
|
+
fixed_price_quantity?: number | null;
|
|
293
|
+
|
|
294
|
+
/**
|
|
295
|
+
* The property used to group this price on an invoice
|
|
296
|
+
*/
|
|
297
|
+
invoice_grouping_key?: string | null;
|
|
298
|
+
|
|
299
|
+
/**
|
|
300
|
+
* Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
301
|
+
* If unspecified, a single invoice is produced per billing cycle.
|
|
302
|
+
*/
|
|
303
|
+
invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
304
|
+
|
|
305
|
+
/**
|
|
306
|
+
* User-specified key/value pairs for the resource. Individual keys can be removed
|
|
307
|
+
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
308
|
+
* by setting `metadata` to `null`.
|
|
309
|
+
*/
|
|
310
|
+
metadata?: { [key: string]: string | null } | null;
|
|
311
|
+
|
|
312
|
+
/**
|
|
313
|
+
* A transient ID that can be used to reference this price when adding adjustments
|
|
314
|
+
* in the same API call.
|
|
315
|
+
*/
|
|
316
|
+
reference_id?: string | null;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
export namespace NewPlanTieredWithProrationPrice {
|
|
320
|
+
/**
|
|
321
|
+
* Configuration for tiered_with_proration pricing
|
|
322
|
+
*/
|
|
323
|
+
export interface TieredWithProrationConfig {
|
|
324
|
+
/**
|
|
325
|
+
* Tiers for rating based on total usage quantities into the specified tier with
|
|
326
|
+
* proration
|
|
327
|
+
*/
|
|
328
|
+
tiers: Array<TieredWithProrationConfig.Tier>;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
export namespace TieredWithProrationConfig {
|
|
332
|
+
/**
|
|
333
|
+
* Configuration for a single tiered with proration tier
|
|
334
|
+
*/
|
|
335
|
+
export interface Tier {
|
|
336
|
+
/**
|
|
337
|
+
* Inclusive tier starting value
|
|
338
|
+
*/
|
|
339
|
+
tier_lower_bound: string;
|
|
340
|
+
|
|
341
|
+
/**
|
|
342
|
+
* Amount per unit
|
|
343
|
+
*/
|
|
344
|
+
unit_amount: string;
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
export interface NewPlanGroupedWithMinMaxThresholdsPrice {
|
|
350
|
+
/**
|
|
351
|
+
* The cadence to bill for this price on.
|
|
352
|
+
*/
|
|
353
|
+
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
|
|
354
|
+
|
|
355
|
+
/**
|
|
356
|
+
* Configuration for grouped_with_min_max_thresholds pricing
|
|
357
|
+
*/
|
|
358
|
+
grouped_with_min_max_thresholds_config: NewPlanGroupedWithMinMaxThresholdsPrice.GroupedWithMinMaxThresholdsConfig;
|
|
359
|
+
|
|
360
|
+
/**
|
|
361
|
+
* The id of the item the price will be associated with.
|
|
362
|
+
*/
|
|
363
|
+
item_id: string;
|
|
364
|
+
|
|
365
|
+
/**
|
|
366
|
+
* The pricing model type
|
|
367
|
+
*/
|
|
368
|
+
model_type: 'grouped_with_min_max_thresholds';
|
|
369
|
+
|
|
370
|
+
/**
|
|
371
|
+
* The name of the price.
|
|
372
|
+
*/
|
|
373
|
+
name: string;
|
|
374
|
+
|
|
375
|
+
/**
|
|
376
|
+
* The id of the billable metric for the price. Only needed if the price is
|
|
377
|
+
* usage-based.
|
|
378
|
+
*/
|
|
379
|
+
billable_metric_id?: string | null;
|
|
380
|
+
|
|
381
|
+
/**
|
|
382
|
+
* If the Price represents a fixed cost, the price will be billed in-advance if
|
|
383
|
+
* this is true, and in-arrears if this is false.
|
|
384
|
+
*/
|
|
385
|
+
billed_in_advance?: boolean | null;
|
|
386
|
+
|
|
387
|
+
/**
|
|
388
|
+
* For custom cadence: specifies the duration of the billing period in days or
|
|
389
|
+
* months.
|
|
390
|
+
*/
|
|
391
|
+
billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
392
|
+
|
|
393
|
+
/**
|
|
394
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
395
|
+
*/
|
|
396
|
+
conversion_rate?: number | null;
|
|
397
|
+
|
|
398
|
+
/**
|
|
399
|
+
* The configuration for the rate of the price currency to the invoicing currency.
|
|
400
|
+
*/
|
|
401
|
+
conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
|
|
402
|
+
|
|
403
|
+
/**
|
|
404
|
+
* An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
405
|
+
* price is billed.
|
|
406
|
+
*/
|
|
407
|
+
currency?: string | null;
|
|
408
|
+
|
|
409
|
+
/**
|
|
410
|
+
* For dimensional price: specifies a price group and dimension values
|
|
411
|
+
*/
|
|
412
|
+
dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
|
|
413
|
+
|
|
414
|
+
/**
|
|
415
|
+
* An alias for the price.
|
|
416
|
+
*/
|
|
417
|
+
external_price_id?: string | null;
|
|
418
|
+
|
|
419
|
+
/**
|
|
420
|
+
* If the Price represents a fixed cost, this represents the quantity of units
|
|
421
|
+
* applied.
|
|
422
|
+
*/
|
|
423
|
+
fixed_price_quantity?: number | null;
|
|
424
|
+
|
|
425
|
+
/**
|
|
426
|
+
* The property used to group this price on an invoice
|
|
427
|
+
*/
|
|
428
|
+
invoice_grouping_key?: string | null;
|
|
429
|
+
|
|
430
|
+
/**
|
|
431
|
+
* Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
432
|
+
* If unspecified, a single invoice is produced per billing cycle.
|
|
433
|
+
*/
|
|
434
|
+
invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
435
|
+
|
|
436
|
+
/**
|
|
437
|
+
* User-specified key/value pairs for the resource. Individual keys can be removed
|
|
438
|
+
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
439
|
+
* by setting `metadata` to `null`.
|
|
440
|
+
*/
|
|
441
|
+
metadata?: { [key: string]: string | null } | null;
|
|
442
|
+
|
|
443
|
+
/**
|
|
444
|
+
* A transient ID that can be used to reference this price when adding adjustments
|
|
445
|
+
* in the same API call.
|
|
446
|
+
*/
|
|
447
|
+
reference_id?: string | null;
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
export namespace NewPlanGroupedWithMinMaxThresholdsPrice {
|
|
451
|
+
/**
|
|
452
|
+
* Configuration for grouped_with_min_max_thresholds pricing
|
|
453
|
+
*/
|
|
454
|
+
export interface GroupedWithMinMaxThresholdsConfig {
|
|
455
|
+
/**
|
|
456
|
+
* The event property used to group before applying thresholds
|
|
457
|
+
*/
|
|
458
|
+
grouping_key: string;
|
|
459
|
+
|
|
460
|
+
/**
|
|
461
|
+
* The maximum amount to charge each group
|
|
462
|
+
*/
|
|
463
|
+
maximum_charge: string;
|
|
464
|
+
|
|
465
|
+
/**
|
|
466
|
+
* The minimum amount to charge each group, regardless of usage
|
|
467
|
+
*/
|
|
468
|
+
minimum_charge: string;
|
|
469
|
+
|
|
470
|
+
/**
|
|
471
|
+
* The base price charged per group
|
|
472
|
+
*/
|
|
473
|
+
per_unit_rate: string;
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
|
|
218
478
|
export interface RemoveAdjustment {
|
|
219
479
|
/**
|
|
220
480
|
* The id of the adjustment to remove from on the plan.
|
|
@@ -278,39 +538,299 @@ export namespace BetaCreatePlanVersionParams {
|
|
|
278
538
|
plan_phase_order?: number | null;
|
|
279
539
|
|
|
280
540
|
/**
|
|
281
|
-
*
|
|
541
|
+
* New plan price request body params.
|
|
282
542
|
*/
|
|
283
543
|
price?:
|
|
284
544
|
| Shared.NewPlanUnitPrice
|
|
285
|
-
| Shared.NewPlanPackagePrice
|
|
286
|
-
| Shared.NewPlanMatrixPrice
|
|
287
545
|
| Shared.NewPlanTieredPrice
|
|
288
|
-
| Shared.NewPlanTieredBPSPrice
|
|
289
|
-
| Shared.NewPlanBPSPrice
|
|
290
|
-
| Shared.NewPlanBulkBPSPrice
|
|
291
546
|
| Shared.NewPlanBulkPrice
|
|
547
|
+
| Shared.NewPlanPackagePrice
|
|
548
|
+
| Shared.NewPlanMatrixPrice
|
|
292
549
|
| Shared.NewPlanThresholdTotalAmountPrice
|
|
293
550
|
| Shared.NewPlanTieredPackagePrice
|
|
294
551
|
| Shared.NewPlanTieredWithMinimumPrice
|
|
295
|
-
| Shared.
|
|
552
|
+
| Shared.NewPlanGroupedTieredPrice
|
|
553
|
+
| Shared.NewPlanTieredPackageWithMinimumPrice
|
|
296
554
|
| Shared.NewPlanPackageWithAllocationPrice
|
|
297
|
-
| Shared.
|
|
555
|
+
| Shared.NewPlanUnitWithPercentPrice
|
|
556
|
+
| Shared.NewPlanMatrixWithAllocationPrice
|
|
557
|
+
| ReplacePrice.NewPlanTieredWithProrationPrice
|
|
298
558
|
| Shared.NewPlanUnitWithProrationPrice
|
|
299
559
|
| Shared.NewPlanGroupedAllocationPrice
|
|
560
|
+
| Shared.NewPlanBulkWithProrationPrice
|
|
300
561
|
| Shared.NewPlanGroupedWithProratedMinimumPrice
|
|
301
562
|
| Shared.NewPlanGroupedWithMeteredMinimumPrice
|
|
563
|
+
| ReplacePrice.NewPlanGroupedWithMinMaxThresholdsPrice
|
|
302
564
|
| Shared.NewPlanMatrixWithDisplayNamePrice
|
|
303
|
-
| Shared.NewPlanBulkWithProrationPrice
|
|
304
565
|
| Shared.NewPlanGroupedTieredPackagePrice
|
|
305
566
|
| Shared.NewPlanMaxGroupTieredPackagePrice
|
|
306
567
|
| Shared.NewPlanScalableMatrixWithUnitPricingPrice
|
|
307
568
|
| Shared.NewPlanScalableMatrixWithTieredPricingPrice
|
|
308
569
|
| Shared.NewPlanCumulativeGroupedBulkPrice
|
|
309
|
-
| Shared.
|
|
310
|
-
| Shared.NewPlanMatrixWithAllocationPrice
|
|
311
|
-
| Shared.NewPlanGroupedTieredPrice
|
|
570
|
+
| Shared.NewPlanMinimumCompositePrice
|
|
312
571
|
| null;
|
|
313
572
|
}
|
|
573
|
+
|
|
574
|
+
export namespace ReplacePrice {
|
|
575
|
+
export interface NewPlanTieredWithProrationPrice {
|
|
576
|
+
/**
|
|
577
|
+
* The cadence to bill for this price on.
|
|
578
|
+
*/
|
|
579
|
+
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
|
|
580
|
+
|
|
581
|
+
/**
|
|
582
|
+
* The id of the item the price will be associated with.
|
|
583
|
+
*/
|
|
584
|
+
item_id: string;
|
|
585
|
+
|
|
586
|
+
/**
|
|
587
|
+
* The pricing model type
|
|
588
|
+
*/
|
|
589
|
+
model_type: 'tiered_with_proration';
|
|
590
|
+
|
|
591
|
+
/**
|
|
592
|
+
* The name of the price.
|
|
593
|
+
*/
|
|
594
|
+
name: string;
|
|
595
|
+
|
|
596
|
+
/**
|
|
597
|
+
* Configuration for tiered_with_proration pricing
|
|
598
|
+
*/
|
|
599
|
+
tiered_with_proration_config: NewPlanTieredWithProrationPrice.TieredWithProrationConfig;
|
|
600
|
+
|
|
601
|
+
/**
|
|
602
|
+
* The id of the billable metric for the price. Only needed if the price is
|
|
603
|
+
* usage-based.
|
|
604
|
+
*/
|
|
605
|
+
billable_metric_id?: string | null;
|
|
606
|
+
|
|
607
|
+
/**
|
|
608
|
+
* If the Price represents a fixed cost, the price will be billed in-advance if
|
|
609
|
+
* this is true, and in-arrears if this is false.
|
|
610
|
+
*/
|
|
611
|
+
billed_in_advance?: boolean | null;
|
|
612
|
+
|
|
613
|
+
/**
|
|
614
|
+
* For custom cadence: specifies the duration of the billing period in days or
|
|
615
|
+
* months.
|
|
616
|
+
*/
|
|
617
|
+
billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
618
|
+
|
|
619
|
+
/**
|
|
620
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
621
|
+
*/
|
|
622
|
+
conversion_rate?: number | null;
|
|
623
|
+
|
|
624
|
+
/**
|
|
625
|
+
* The configuration for the rate of the price currency to the invoicing currency.
|
|
626
|
+
*/
|
|
627
|
+
conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
|
|
628
|
+
|
|
629
|
+
/**
|
|
630
|
+
* An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
631
|
+
* price is billed.
|
|
632
|
+
*/
|
|
633
|
+
currency?: string | null;
|
|
634
|
+
|
|
635
|
+
/**
|
|
636
|
+
* For dimensional price: specifies a price group and dimension values
|
|
637
|
+
*/
|
|
638
|
+
dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
|
|
639
|
+
|
|
640
|
+
/**
|
|
641
|
+
* An alias for the price.
|
|
642
|
+
*/
|
|
643
|
+
external_price_id?: string | null;
|
|
644
|
+
|
|
645
|
+
/**
|
|
646
|
+
* If the Price represents a fixed cost, this represents the quantity of units
|
|
647
|
+
* applied.
|
|
648
|
+
*/
|
|
649
|
+
fixed_price_quantity?: number | null;
|
|
650
|
+
|
|
651
|
+
/**
|
|
652
|
+
* The property used to group this price on an invoice
|
|
653
|
+
*/
|
|
654
|
+
invoice_grouping_key?: string | null;
|
|
655
|
+
|
|
656
|
+
/**
|
|
657
|
+
* Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
658
|
+
* If unspecified, a single invoice is produced per billing cycle.
|
|
659
|
+
*/
|
|
660
|
+
invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
661
|
+
|
|
662
|
+
/**
|
|
663
|
+
* User-specified key/value pairs for the resource. Individual keys can be removed
|
|
664
|
+
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
665
|
+
* by setting `metadata` to `null`.
|
|
666
|
+
*/
|
|
667
|
+
metadata?: { [key: string]: string | null } | null;
|
|
668
|
+
|
|
669
|
+
/**
|
|
670
|
+
* A transient ID that can be used to reference this price when adding adjustments
|
|
671
|
+
* in the same API call.
|
|
672
|
+
*/
|
|
673
|
+
reference_id?: string | null;
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
export namespace NewPlanTieredWithProrationPrice {
|
|
677
|
+
/**
|
|
678
|
+
* Configuration for tiered_with_proration pricing
|
|
679
|
+
*/
|
|
680
|
+
export interface TieredWithProrationConfig {
|
|
681
|
+
/**
|
|
682
|
+
* Tiers for rating based on total usage quantities into the specified tier with
|
|
683
|
+
* proration
|
|
684
|
+
*/
|
|
685
|
+
tiers: Array<TieredWithProrationConfig.Tier>;
|
|
686
|
+
}
|
|
687
|
+
|
|
688
|
+
export namespace TieredWithProrationConfig {
|
|
689
|
+
/**
|
|
690
|
+
* Configuration for a single tiered with proration tier
|
|
691
|
+
*/
|
|
692
|
+
export interface Tier {
|
|
693
|
+
/**
|
|
694
|
+
* Inclusive tier starting value
|
|
695
|
+
*/
|
|
696
|
+
tier_lower_bound: string;
|
|
697
|
+
|
|
698
|
+
/**
|
|
699
|
+
* Amount per unit
|
|
700
|
+
*/
|
|
701
|
+
unit_amount: string;
|
|
702
|
+
}
|
|
703
|
+
}
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
export interface NewPlanGroupedWithMinMaxThresholdsPrice {
|
|
707
|
+
/**
|
|
708
|
+
* The cadence to bill for this price on.
|
|
709
|
+
*/
|
|
710
|
+
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
|
|
711
|
+
|
|
712
|
+
/**
|
|
713
|
+
* Configuration for grouped_with_min_max_thresholds pricing
|
|
714
|
+
*/
|
|
715
|
+
grouped_with_min_max_thresholds_config: NewPlanGroupedWithMinMaxThresholdsPrice.GroupedWithMinMaxThresholdsConfig;
|
|
716
|
+
|
|
717
|
+
/**
|
|
718
|
+
* The id of the item the price will be associated with.
|
|
719
|
+
*/
|
|
720
|
+
item_id: string;
|
|
721
|
+
|
|
722
|
+
/**
|
|
723
|
+
* The pricing model type
|
|
724
|
+
*/
|
|
725
|
+
model_type: 'grouped_with_min_max_thresholds';
|
|
726
|
+
|
|
727
|
+
/**
|
|
728
|
+
* The name of the price.
|
|
729
|
+
*/
|
|
730
|
+
name: string;
|
|
731
|
+
|
|
732
|
+
/**
|
|
733
|
+
* The id of the billable metric for the price. Only needed if the price is
|
|
734
|
+
* usage-based.
|
|
735
|
+
*/
|
|
736
|
+
billable_metric_id?: string | null;
|
|
737
|
+
|
|
738
|
+
/**
|
|
739
|
+
* If the Price represents a fixed cost, the price will be billed in-advance if
|
|
740
|
+
* this is true, and in-arrears if this is false.
|
|
741
|
+
*/
|
|
742
|
+
billed_in_advance?: boolean | null;
|
|
743
|
+
|
|
744
|
+
/**
|
|
745
|
+
* For custom cadence: specifies the duration of the billing period in days or
|
|
746
|
+
* months.
|
|
747
|
+
*/
|
|
748
|
+
billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
749
|
+
|
|
750
|
+
/**
|
|
751
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
752
|
+
*/
|
|
753
|
+
conversion_rate?: number | null;
|
|
754
|
+
|
|
755
|
+
/**
|
|
756
|
+
* The configuration for the rate of the price currency to the invoicing currency.
|
|
757
|
+
*/
|
|
758
|
+
conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
|
|
759
|
+
|
|
760
|
+
/**
|
|
761
|
+
* An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
762
|
+
* price is billed.
|
|
763
|
+
*/
|
|
764
|
+
currency?: string | null;
|
|
765
|
+
|
|
766
|
+
/**
|
|
767
|
+
* For dimensional price: specifies a price group and dimension values
|
|
768
|
+
*/
|
|
769
|
+
dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
|
|
770
|
+
|
|
771
|
+
/**
|
|
772
|
+
* An alias for the price.
|
|
773
|
+
*/
|
|
774
|
+
external_price_id?: string | null;
|
|
775
|
+
|
|
776
|
+
/**
|
|
777
|
+
* If the Price represents a fixed cost, this represents the quantity of units
|
|
778
|
+
* applied.
|
|
779
|
+
*/
|
|
780
|
+
fixed_price_quantity?: number | null;
|
|
781
|
+
|
|
782
|
+
/**
|
|
783
|
+
* The property used to group this price on an invoice
|
|
784
|
+
*/
|
|
785
|
+
invoice_grouping_key?: string | null;
|
|
786
|
+
|
|
787
|
+
/**
|
|
788
|
+
* Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
789
|
+
* If unspecified, a single invoice is produced per billing cycle.
|
|
790
|
+
*/
|
|
791
|
+
invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
792
|
+
|
|
793
|
+
/**
|
|
794
|
+
* User-specified key/value pairs for the resource. Individual keys can be removed
|
|
795
|
+
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
796
|
+
* by setting `metadata` to `null`.
|
|
797
|
+
*/
|
|
798
|
+
metadata?: { [key: string]: string | null } | null;
|
|
799
|
+
|
|
800
|
+
/**
|
|
801
|
+
* A transient ID that can be used to reference this price when adding adjustments
|
|
802
|
+
* in the same API call.
|
|
803
|
+
*/
|
|
804
|
+
reference_id?: string | null;
|
|
805
|
+
}
|
|
806
|
+
|
|
807
|
+
export namespace NewPlanGroupedWithMinMaxThresholdsPrice {
|
|
808
|
+
/**
|
|
809
|
+
* Configuration for grouped_with_min_max_thresholds pricing
|
|
810
|
+
*/
|
|
811
|
+
export interface GroupedWithMinMaxThresholdsConfig {
|
|
812
|
+
/**
|
|
813
|
+
* The event property used to group before applying thresholds
|
|
814
|
+
*/
|
|
815
|
+
grouping_key: string;
|
|
816
|
+
|
|
817
|
+
/**
|
|
818
|
+
* The maximum amount to charge each group
|
|
819
|
+
*/
|
|
820
|
+
maximum_charge: string;
|
|
821
|
+
|
|
822
|
+
/**
|
|
823
|
+
* The minimum amount to charge each group, regardless of usage
|
|
824
|
+
*/
|
|
825
|
+
minimum_charge: string;
|
|
826
|
+
|
|
827
|
+
/**
|
|
828
|
+
* The base price charged per group
|
|
829
|
+
*/
|
|
830
|
+
per_unit_rate: string;
|
|
831
|
+
}
|
|
832
|
+
}
|
|
833
|
+
}
|
|
314
834
|
}
|
|
315
835
|
|
|
316
836
|
export interface BetaSetDefaultPlanVersionParams {
|