orb-billing 5.6.0 → 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 +19 -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 +2 -4
- package/index.d.ts +2 -4
- package/index.d.ts.map +1 -1
- package/index.js.map +1 -1
- package/index.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/beta/beta.d.ts +288 -10
- 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 +288 -10
- package/resources/beta/external-plan-id.d.ts.map +1 -1
- package/resources/customers/customers.d.ts +27 -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/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/invoices.d.ts +3 -0
- package/resources/invoices.d.ts.map +1 -1
- package/resources/invoices.js.map +1 -1
- package/resources/invoices.mjs.map +1 -1
- package/resources/plans/plans.d.ts +144 -5
- 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 +924 -123
- 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 +2468 -338
- 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 +1367 -174
- package/resources/subscriptions.d.ts.map +1 -1
- package/resources/subscriptions.js.map +1 -1
- package/resources/subscriptions.mjs.map +1 -1
- package/src/core.ts +3 -3
- package/src/index.ts +0 -4
- package/src/resources/beta/beta.ts +348 -20
- package/src/resources/beta/external-plan-id.ts +348 -20
- package/src/resources/customers/customers.ts +48 -6
- package/src/resources/index.ts +0 -1
- package/src/resources/invoices.ts +3 -0
- package/src/resources/plans/plans.ts +174 -10
- package/src/resources/prices/prices.ts +1058 -113
- package/src/resources/shared.ts +2786 -288
- package/src/resources/subscriptions.ts +1607 -202
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -320,53 +320,190 @@ export namespace PlanCreateParams {
|
|
|
320
320
|
plan_phase_order?: number | null;
|
|
321
321
|
|
|
322
322
|
/**
|
|
323
|
-
*
|
|
323
|
+
* New plan price request body params.
|
|
324
324
|
*/
|
|
325
325
|
price?:
|
|
326
326
|
| Shared.NewPlanUnitPrice
|
|
327
|
-
| Shared.NewPlanPackagePrice
|
|
328
|
-
| Shared.NewPlanMatrixPrice
|
|
329
327
|
| Shared.NewPlanTieredPrice
|
|
330
328
|
| Shared.NewPlanBulkPrice
|
|
329
|
+
| Shared.NewPlanPackagePrice
|
|
330
|
+
| Shared.NewPlanMatrixPrice
|
|
331
331
|
| Shared.NewPlanThresholdTotalAmountPrice
|
|
332
332
|
| Shared.NewPlanTieredPackagePrice
|
|
333
333
|
| Shared.NewPlanTieredWithMinimumPrice
|
|
334
|
-
| Shared.
|
|
334
|
+
| Shared.NewPlanGroupedTieredPrice
|
|
335
|
+
| Shared.NewPlanTieredPackageWithMinimumPrice
|
|
335
336
|
| Shared.NewPlanPackageWithAllocationPrice
|
|
336
|
-
| Shared.
|
|
337
|
+
| Shared.NewPlanUnitWithPercentPrice
|
|
338
|
+
| Shared.NewPlanMatrixWithAllocationPrice
|
|
339
|
+
| Price.NewPlanTieredWithProrationPrice
|
|
337
340
|
| Shared.NewPlanUnitWithProrationPrice
|
|
338
341
|
| Shared.NewPlanGroupedAllocationPrice
|
|
342
|
+
| Shared.NewPlanBulkWithProrationPrice
|
|
339
343
|
| Shared.NewPlanGroupedWithProratedMinimumPrice
|
|
340
344
|
| Shared.NewPlanGroupedWithMeteredMinimumPrice
|
|
341
345
|
| Price.NewPlanGroupedWithMinMaxThresholdsPrice
|
|
342
346
|
| Shared.NewPlanMatrixWithDisplayNamePrice
|
|
343
|
-
| Shared.NewPlanBulkWithProrationPrice
|
|
344
347
|
| Shared.NewPlanGroupedTieredPackagePrice
|
|
345
348
|
| Shared.NewPlanMaxGroupTieredPackagePrice
|
|
346
349
|
| Shared.NewPlanScalableMatrixWithUnitPricingPrice
|
|
347
350
|
| Shared.NewPlanScalableMatrixWithTieredPricingPrice
|
|
348
351
|
| Shared.NewPlanCumulativeGroupedBulkPrice
|
|
349
|
-
| Shared.NewPlanTieredPackageWithMinimumPrice
|
|
350
|
-
| Shared.NewPlanMatrixWithAllocationPrice
|
|
351
|
-
| Shared.NewPlanGroupedTieredPrice
|
|
352
352
|
| Shared.NewPlanMinimumCompositePrice
|
|
353
353
|
| null;
|
|
354
354
|
}
|
|
355
355
|
|
|
356
356
|
export namespace Price {
|
|
357
|
+
export interface NewPlanTieredWithProrationPrice {
|
|
358
|
+
/**
|
|
359
|
+
* The cadence to bill for this price on.
|
|
360
|
+
*/
|
|
361
|
+
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
|
|
362
|
+
|
|
363
|
+
/**
|
|
364
|
+
* The id of the item the price will be associated with.
|
|
365
|
+
*/
|
|
366
|
+
item_id: string;
|
|
367
|
+
|
|
368
|
+
/**
|
|
369
|
+
* The pricing model type
|
|
370
|
+
*/
|
|
371
|
+
model_type: 'tiered_with_proration';
|
|
372
|
+
|
|
373
|
+
/**
|
|
374
|
+
* The name of the price.
|
|
375
|
+
*/
|
|
376
|
+
name: string;
|
|
377
|
+
|
|
378
|
+
/**
|
|
379
|
+
* Configuration for tiered_with_proration pricing
|
|
380
|
+
*/
|
|
381
|
+
tiered_with_proration_config: NewPlanTieredWithProrationPrice.TieredWithProrationConfig;
|
|
382
|
+
|
|
383
|
+
/**
|
|
384
|
+
* The id of the billable metric for the price. Only needed if the price is
|
|
385
|
+
* usage-based.
|
|
386
|
+
*/
|
|
387
|
+
billable_metric_id?: string | null;
|
|
388
|
+
|
|
389
|
+
/**
|
|
390
|
+
* If the Price represents a fixed cost, the price will be billed in-advance if
|
|
391
|
+
* this is true, and in-arrears if this is false.
|
|
392
|
+
*/
|
|
393
|
+
billed_in_advance?: boolean | null;
|
|
394
|
+
|
|
395
|
+
/**
|
|
396
|
+
* For custom cadence: specifies the duration of the billing period in days or
|
|
397
|
+
* months.
|
|
398
|
+
*/
|
|
399
|
+
billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
400
|
+
|
|
401
|
+
/**
|
|
402
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
403
|
+
*/
|
|
404
|
+
conversion_rate?: number | null;
|
|
405
|
+
|
|
406
|
+
/**
|
|
407
|
+
* The configuration for the rate of the price currency to the invoicing currency.
|
|
408
|
+
*/
|
|
409
|
+
conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
|
|
410
|
+
|
|
411
|
+
/**
|
|
412
|
+
* An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
413
|
+
* price is billed.
|
|
414
|
+
*/
|
|
415
|
+
currency?: string | null;
|
|
416
|
+
|
|
417
|
+
/**
|
|
418
|
+
* For dimensional price: specifies a price group and dimension values
|
|
419
|
+
*/
|
|
420
|
+
dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
|
|
421
|
+
|
|
422
|
+
/**
|
|
423
|
+
* An alias for the price.
|
|
424
|
+
*/
|
|
425
|
+
external_price_id?: string | null;
|
|
426
|
+
|
|
427
|
+
/**
|
|
428
|
+
* If the Price represents a fixed cost, this represents the quantity of units
|
|
429
|
+
* applied.
|
|
430
|
+
*/
|
|
431
|
+
fixed_price_quantity?: number | null;
|
|
432
|
+
|
|
433
|
+
/**
|
|
434
|
+
* The property used to group this price on an invoice
|
|
435
|
+
*/
|
|
436
|
+
invoice_grouping_key?: string | null;
|
|
437
|
+
|
|
438
|
+
/**
|
|
439
|
+
* Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
440
|
+
* If unspecified, a single invoice is produced per billing cycle.
|
|
441
|
+
*/
|
|
442
|
+
invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
443
|
+
|
|
444
|
+
/**
|
|
445
|
+
* User-specified key/value pairs for the resource. Individual keys can be removed
|
|
446
|
+
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
447
|
+
* by setting `metadata` to `null`.
|
|
448
|
+
*/
|
|
449
|
+
metadata?: { [key: string]: string | null } | null;
|
|
450
|
+
|
|
451
|
+
/**
|
|
452
|
+
* A transient ID that can be used to reference this price when adding adjustments
|
|
453
|
+
* in the same API call.
|
|
454
|
+
*/
|
|
455
|
+
reference_id?: string | null;
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
export namespace NewPlanTieredWithProrationPrice {
|
|
459
|
+
/**
|
|
460
|
+
* Configuration for tiered_with_proration pricing
|
|
461
|
+
*/
|
|
462
|
+
export interface TieredWithProrationConfig {
|
|
463
|
+
/**
|
|
464
|
+
* Tiers for rating based on total usage quantities into the specified tier with
|
|
465
|
+
* proration
|
|
466
|
+
*/
|
|
467
|
+
tiers: Array<TieredWithProrationConfig.Tier>;
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
export namespace TieredWithProrationConfig {
|
|
471
|
+
/**
|
|
472
|
+
* Configuration for a single tiered with proration tier
|
|
473
|
+
*/
|
|
474
|
+
export interface Tier {
|
|
475
|
+
/**
|
|
476
|
+
* Inclusive tier starting value
|
|
477
|
+
*/
|
|
478
|
+
tier_lower_bound: string;
|
|
479
|
+
|
|
480
|
+
/**
|
|
481
|
+
* Amount per unit
|
|
482
|
+
*/
|
|
483
|
+
unit_amount: string;
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
|
|
357
488
|
export interface NewPlanGroupedWithMinMaxThresholdsPrice {
|
|
358
489
|
/**
|
|
359
490
|
* The cadence to bill for this price on.
|
|
360
491
|
*/
|
|
361
492
|
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
|
|
362
493
|
|
|
363
|
-
|
|
494
|
+
/**
|
|
495
|
+
* Configuration for grouped_with_min_max_thresholds pricing
|
|
496
|
+
*/
|
|
497
|
+
grouped_with_min_max_thresholds_config: NewPlanGroupedWithMinMaxThresholdsPrice.GroupedWithMinMaxThresholdsConfig;
|
|
364
498
|
|
|
365
499
|
/**
|
|
366
500
|
* The id of the item the price will be associated with.
|
|
367
501
|
*/
|
|
368
502
|
item_id: string;
|
|
369
503
|
|
|
504
|
+
/**
|
|
505
|
+
* The pricing model type
|
|
506
|
+
*/
|
|
370
507
|
model_type: 'grouped_with_min_max_thresholds';
|
|
371
508
|
|
|
372
509
|
/**
|
|
@@ -448,6 +585,33 @@ export namespace PlanCreateParams {
|
|
|
448
585
|
*/
|
|
449
586
|
reference_id?: string | null;
|
|
450
587
|
}
|
|
588
|
+
|
|
589
|
+
export namespace NewPlanGroupedWithMinMaxThresholdsPrice {
|
|
590
|
+
/**
|
|
591
|
+
* Configuration for grouped_with_min_max_thresholds pricing
|
|
592
|
+
*/
|
|
593
|
+
export interface GroupedWithMinMaxThresholdsConfig {
|
|
594
|
+
/**
|
|
595
|
+
* The event property used to group before applying thresholds
|
|
596
|
+
*/
|
|
597
|
+
grouping_key: string;
|
|
598
|
+
|
|
599
|
+
/**
|
|
600
|
+
* The maximum amount to charge each group
|
|
601
|
+
*/
|
|
602
|
+
maximum_charge: string;
|
|
603
|
+
|
|
604
|
+
/**
|
|
605
|
+
* The minimum amount to charge each group, regardless of usage
|
|
606
|
+
*/
|
|
607
|
+
minimum_charge: string;
|
|
608
|
+
|
|
609
|
+
/**
|
|
610
|
+
* The base price charged per group
|
|
611
|
+
*/
|
|
612
|
+
per_unit_rate: string;
|
|
613
|
+
}
|
|
614
|
+
}
|
|
451
615
|
}
|
|
452
616
|
|
|
453
617
|
export interface Adjustment {
|