orb-billing 6.10.0 → 6.12.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 (47) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/package.json +1 -1
  3. package/resources/beta/beta.d.mts +114 -24
  4. package/resources/beta/beta.d.mts.map +1 -1
  5. package/resources/beta/beta.d.ts +114 -24
  6. package/resources/beta/beta.d.ts.map +1 -1
  7. package/resources/beta/beta.js.map +1 -1
  8. package/resources/beta/beta.mjs.map +1 -1
  9. package/resources/beta/external-plan-id.d.mts +114 -24
  10. package/resources/beta/external-plan-id.d.mts.map +1 -1
  11. package/resources/beta/external-plan-id.d.ts +114 -24
  12. package/resources/beta/external-plan-id.d.ts.map +1 -1
  13. package/resources/plans/plans.d.mts +57 -12
  14. package/resources/plans/plans.d.mts.map +1 -1
  15. package/resources/plans/plans.d.ts +57 -12
  16. package/resources/plans/plans.d.ts.map +1 -1
  17. package/resources/plans/plans.js.map +1 -1
  18. package/resources/plans/plans.mjs.map +1 -1
  19. package/resources/prices/prices.d.mts +265 -53
  20. package/resources/prices/prices.d.mts.map +1 -1
  21. package/resources/prices/prices.d.ts +265 -53
  22. package/resources/prices/prices.d.ts.map +1 -1
  23. package/resources/prices/prices.js.map +1 -1
  24. package/resources/prices/prices.mjs.map +1 -1
  25. package/resources/shared.d.mts +255 -51
  26. package/resources/shared.d.mts.map +1 -1
  27. package/resources/shared.d.ts +255 -51
  28. package/resources/shared.d.ts.map +1 -1
  29. package/resources/subscriptions.d.mts +409 -80
  30. package/resources/subscriptions.d.mts.map +1 -1
  31. package/resources/subscriptions.d.ts +409 -80
  32. package/resources/subscriptions.d.ts.map +1 -1
  33. package/resources/subscriptions.js +39 -6
  34. package/resources/subscriptions.js.map +1 -1
  35. package/resources/subscriptions.mjs +39 -6
  36. package/resources/subscriptions.mjs.map +1 -1
  37. package/src/resources/beta/beta.ts +114 -24
  38. package/src/resources/beta/external-plan-id.ts +114 -24
  39. package/src/resources/plans/plans.ts +57 -12
  40. package/src/resources/prices/prices.ts +265 -53
  41. package/src/resources/shared.ts +255 -51
  42. package/src/resources/subscriptions.ts +409 -80
  43. package/src/version.ts +1 -1
  44. package/version.d.mts +1 -1
  45. package/version.d.ts +1 -1
  46. package/version.js +1 -1
  47. package/version.mjs +1 -1
@@ -792,6 +792,17 @@ class Subscriptions extends resource_1.APIResource {
792
792
  * Note that one of `plan_id` or `external_plan_id` is required in the request body
793
793
  * for this operation.
794
794
  *
795
+ * ## Interaction with scheduled cancellations
796
+ *
797
+ * Scheduling a plan change also unschedules a pending cancellation, as long as the
798
+ * cancellation date is on or after the plan change date: Orb honors the plan
799
+ * change over the scheduled cancellation, and the subscription continues on the
800
+ * new plan. Scheduling a plan change after the subscription's end date returns a
801
+ * validation error instead.
802
+ *
803
+ * Any plan changes already scheduled at or after the new plan change's date are
804
+ * unscheduled and replaced by it.
805
+ *
795
806
  * ## Customize your customer's subscriptions
796
807
  *
797
808
  * Prices and adjustments in a plan can be added, removed, or replaced on the
@@ -976,11 +987,19 @@ class Subscriptions extends resource_1.APIResource {
976
987
  * cancellation. This operation will turn on auto-renew, ensuring that the
977
988
  * subscription does not end at the currently scheduled cancellation time.
978
989
  *
979
- * Note: uncancellation is a lossy operation. Price intervals that were cut short
980
- * by the cancellation are extended to infinity (original end dates are lost), and
981
- * future intervals or phases scheduled after the cancellation time are permanently
982
- * deleted. For complex subscriptions with phases or scheduled plan changes,
983
- * consider creating a new plan change instead of uncancelling.
990
+ * A cancellation that has already taken effect cannot be unscheduled. This
991
+ * includes backdated cancellations: once the subscription's end date is in the
992
+ * past, this endpoint returns a validation error.
993
+ *
994
+ * Note: uncancellation is a lossy operation. Price and adjustment intervals that
995
+ * were cut short by the cancellation are extended to infinity (original end dates
996
+ * are lost), and future intervals or phases scheduled after the cancellation time
997
+ * are permanently deleted. For complex subscriptions with phases or scheduled plan
998
+ * changes, consider creating a new plan change instead of uncancelling.
999
+ *
1000
+ * If the scheduled cancellation already produced invoices or credit notes (for
1001
+ * example, a proration refund credit note for an in-advance fee), uncancelling
1002
+ * voids and reissues them as needed to match the subscription's new state.
984
1003
  *
985
1004
  * @example
986
1005
  * ```ts
@@ -1017,7 +1036,21 @@ class Subscriptions extends resource_1.APIResource {
1017
1036
  }
1018
1037
  /**
1019
1038
  * This endpoint can be used to unschedule any pending plan changes on an existing
1020
- * subscription. When called, all upcoming plan changes will be unscheduled.
1039
+ * subscription. When called, all upcoming plan changes will be unscheduled; it is
1040
+ * not possible to unschedule a single plan change if multiple are scheduled.
1041
+ *
1042
+ * Note: unscheduling a plan change is a lossy operation, with the same semantics
1043
+ * as
1044
+ * [unscheduling a cancellation](/api-reference/subscription/unschedule-subscription-cancellation).
1045
+ * Prices and adjustments on the current plan that were scheduled to end at the
1046
+ * plan change time are extended to infinity (original end dates are lost), and
1047
+ * anything scheduled to start after the plan change time is permanently deleted.
1048
+ * Coupons redeemed as part of an unscheduled plan change are released and can be
1049
+ * redeemed again.
1050
+ *
1051
+ * A scheduled cancellation is not affected by this operation: if the subscription
1052
+ * has both a pending plan change and a scheduled cancellation, unscheduling the
1053
+ * plan change leaves the cancellation in place.
1021
1054
  *
1022
1055
  * @example
1023
1056
  * ```ts
@@ -1 +1 @@
1
- {"version":3,"file":"subscriptions.js","sourceRoot":"","sources":["../src/resources/subscriptions.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAO/C,sDAAwE;AAExE,oDAA8C;AAE9C,MAAa,aAAc,SAAQ,sBAAW;IAC5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,kBAAkB,cAAc,wCAAwC,EAAE;YACrG,IAAI;YACJ,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,4BAA4B,CAC1B,cAAsB,EACtB,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,kBAAkB,cAAc,kCAAkC,EAAE,OAAO,CAAC,CAAC;IAC5G,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,sBAAsB,CACpB,cAAsB,EACtB,IAA8C,EAC9C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,kBAAkB,cAAc,4BAA4B,EAAE;YACzF,IAAI;YACJ,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;IACH,WAAW,CACT,cAAsB,EACtB,IAAmC,EACnC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,kBAAkB,cAAc,eAAe,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACtG,CAAC;CACF;AAjrCD,sCAirCC"}
@@ -789,6 +789,17 @@ export class Subscriptions extends APIResource {
789
789
  * Note that one of `plan_id` or `external_plan_id` is required in the request body
790
790
  * for this operation.
791
791
  *
792
+ * ## Interaction with scheduled cancellations
793
+ *
794
+ * Scheduling a plan change also unschedules a pending cancellation, as long as the
795
+ * cancellation date is on or after the plan change date: Orb honors the plan
796
+ * change over the scheduled cancellation, and the subscription continues on the
797
+ * new plan. Scheduling a plan change after the subscription's end date returns a
798
+ * validation error instead.
799
+ *
800
+ * Any plan changes already scheduled at or after the new plan change's date are
801
+ * unscheduled and replaced by it.
802
+ *
792
803
  * ## Customize your customer's subscriptions
793
804
  *
794
805
  * Prices and adjustments in a plan can be added, removed, or replaced on the
@@ -973,11 +984,19 @@ export class Subscriptions extends APIResource {
973
984
  * cancellation. This operation will turn on auto-renew, ensuring that the
974
985
  * subscription does not end at the currently scheduled cancellation time.
975
986
  *
976
- * Note: uncancellation is a lossy operation. Price intervals that were cut short
977
- * by the cancellation are extended to infinity (original end dates are lost), and
978
- * future intervals or phases scheduled after the cancellation time are permanently
979
- * deleted. For complex subscriptions with phases or scheduled plan changes,
980
- * consider creating a new plan change instead of uncancelling.
987
+ * A cancellation that has already taken effect cannot be unscheduled. This
988
+ * includes backdated cancellations: once the subscription's end date is in the
989
+ * past, this endpoint returns a validation error.
990
+ *
991
+ * Note: uncancellation is a lossy operation. Price and adjustment intervals that
992
+ * were cut short by the cancellation are extended to infinity (original end dates
993
+ * are lost), and future intervals or phases scheduled after the cancellation time
994
+ * are permanently deleted. For complex subscriptions with phases or scheduled plan
995
+ * changes, consider creating a new plan change instead of uncancelling.
996
+ *
997
+ * If the scheduled cancellation already produced invoices or credit notes (for
998
+ * example, a proration refund credit note for an in-advance fee), uncancelling
999
+ * voids and reissues them as needed to match the subscription's new state.
981
1000
  *
982
1001
  * @example
983
1002
  * ```ts
@@ -1014,7 +1033,21 @@ export class Subscriptions extends APIResource {
1014
1033
  }
1015
1034
  /**
1016
1035
  * This endpoint can be used to unschedule any pending plan changes on an existing
1017
- * subscription. When called, all upcoming plan changes will be unscheduled.
1036
+ * subscription. When called, all upcoming plan changes will be unscheduled; it is
1037
+ * not possible to unschedule a single plan change if multiple are scheduled.
1038
+ *
1039
+ * Note: unscheduling a plan change is a lossy operation, with the same semantics
1040
+ * as
1041
+ * [unscheduling a cancellation](/api-reference/subscription/unschedule-subscription-cancellation).
1042
+ * Prices and adjustments on the current plan that were scheduled to end at the
1043
+ * plan change time are extended to infinity (original end dates are lost), and
1044
+ * anything scheduled to start after the plan change time is permanently deleted.
1045
+ * Coupons redeemed as part of an unscheduled plan change are released and can be
1046
+ * redeemed again.
1047
+ *
1048
+ * A scheduled cancellation is not affected by this operation: if the subscription
1049
+ * has both a pending plan change and a scheduled cancellation, unscheduling the
1050
+ * plan change leaves the cancellation in place.
1018
1051
  *
1019
1052
  * @example
1020
1053
  * ```ts
@@ -1 +1 @@
1
- {"version":3,"file":"subscriptions.mjs","sourceRoot":"","sources":["../src/resources/subscriptions.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAO/C,OAAO,EAAE,IAAI,EAAgC,+BAA2B;AAExE,OAAO,EAAE,IAAI,EAAE,mCAA+B;AAE9C,MAAM,OAAO,aAAc,SAAQ,WAAW;IAC5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2QG;IACH,MAAM,CACJ,IAA8B,EAC9B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACnE,CAAC;IAED;;;;;;;;;;;OAWG;IACH,MAAM,CACJ,cAAsB,EACtB,IAA8B,EAC9B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,kBAAkB,cAAc,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACxF,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,IAAI,CACF,QAAmD,EAAE,EACrD,OAAwB;QAExB,OAA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AsB,EACtB,IAAmC,EACnC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,kBAAkB,cAAc,eAAe,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACtG,CAAC;CACF"}
@@ -418,7 +418,8 @@ export namespace BetaCreatePlanVersionParams {
418
418
  /**
419
419
  * License allocations to associate with this price. Each entry defines a
420
420
  * per-license credit pool granted each cadence. Requires license_type_id or
421
- * license_type_configuration to be set.
421
+ * license_type_configuration to be set. Usage prices draw down from these
422
+ * allocations only if they set the same license type.
422
423
  */
423
424
  license_allocations: Array<LicenseAllocationPrice.LicenseAllocation>;
424
425
 
@@ -499,7 +500,11 @@ export namespace BetaCreatePlanVersionParams {
499
500
  invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
500
501
 
501
502
  /**
502
- * The ID of the license type to associate with this price.
503
+ * The ID of the license type to associate with this price. On a usage price this
504
+ * also marks the price as eligible to draw down from that license type's
505
+ * allocation; a usage price created without it is billed normally. Usage prices
506
+ * with a license type must use the `unit` model, and only draw down when their
507
+ * currency matches the allocation's.
503
508
  */
504
509
  license_type_id?: string | null;
505
510
 
@@ -624,7 +629,11 @@ export namespace BetaCreatePlanVersionParams {
624
629
  invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
625
630
 
626
631
  /**
627
- * The ID of the license type to associate with this price.
632
+ * The ID of the license type to associate with this price. On a usage price this
633
+ * also marks the price as eligible to draw down from that license type's
634
+ * allocation; a usage price created without it is billed normally. Usage prices
635
+ * with a license type must use the `unit` model, and only draw down when their
636
+ * currency matches the allocation's.
628
637
  */
629
638
  license_type_id?: string | null;
630
639
 
@@ -779,7 +788,11 @@ export namespace BetaCreatePlanVersionParams {
779
788
  invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
780
789
 
781
790
  /**
782
- * The ID of the license type to associate with this price.
791
+ * The ID of the license type to associate with this price. On a usage price this
792
+ * also marks the price as eligible to draw down from that license type's
793
+ * allocation; a usage price created without it is billed normally. Usage prices
794
+ * with a license type must use the `unit` model, and only draw down when their
795
+ * currency matches the allocation's.
783
796
  */
784
797
  license_type_id?: string | null;
785
798
 
@@ -927,7 +940,11 @@ export namespace BetaCreatePlanVersionParams {
927
940
  invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
928
941
 
929
942
  /**
930
- * The ID of the license type to associate with this price.
943
+ * The ID of the license type to associate with this price. On a usage price this
944
+ * also marks the price as eligible to draw down from that license type's
945
+ * allocation; a usage price created without it is billed normally. Usage prices
946
+ * with a license type must use the `unit` model, and only draw down when their
947
+ * currency matches the allocation's.
931
948
  */
932
949
  license_type_id?: string | null;
933
950
 
@@ -1096,7 +1113,11 @@ export namespace BetaCreatePlanVersionParams {
1096
1113
  invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
1097
1114
 
1098
1115
  /**
1099
- * The ID of the license type to associate with this price.
1116
+ * The ID of the license type to associate with this price. On a usage price this
1117
+ * also marks the price as eligible to draw down from that license type's
1118
+ * allocation; a usage price created without it is billed normally. Usage prices
1119
+ * with a license type must use the `unit` model, and only draw down when their
1120
+ * currency matches the allocation's.
1100
1121
  */
1101
1122
  license_type_id?: string | null;
1102
1123
 
@@ -1232,7 +1253,11 @@ export namespace BetaCreatePlanVersionParams {
1232
1253
  invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
1233
1254
 
1234
1255
  /**
1235
- * The ID of the license type to associate with this price.
1256
+ * The ID of the license type to associate with this price. On a usage price this
1257
+ * also marks the price as eligible to draw down from that license type's
1258
+ * allocation; a usage price created without it is billed normally. Usage prices
1259
+ * with a license type must use the `unit` model, and only draw down when their
1260
+ * currency matches the allocation's.
1236
1261
  */
1237
1262
  license_type_id?: string | null;
1238
1263
 
@@ -1365,7 +1390,11 @@ export namespace BetaCreatePlanVersionParams {
1365
1390
  invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
1366
1391
 
1367
1392
  /**
1368
- * The ID of the license type to associate with this price.
1393
+ * The ID of the license type to associate with this price. On a usage price this
1394
+ * also marks the price as eligible to draw down from that license type's
1395
+ * allocation; a usage price created without it is billed normally. Usage prices
1396
+ * with a license type must use the `unit` model, and only draw down when their
1397
+ * currency matches the allocation's.
1369
1398
  */
1370
1399
  license_type_id?: string | null;
1371
1400
 
@@ -1498,7 +1527,11 @@ export namespace BetaCreatePlanVersionParams {
1498
1527
  invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
1499
1528
 
1500
1529
  /**
1501
- * The ID of the license type to associate with this price.
1530
+ * The ID of the license type to associate with this price. On a usage price this
1531
+ * also marks the price as eligible to draw down from that license type's
1532
+ * allocation; a usage price created without it is billed normally. Usage prices
1533
+ * with a license type must use the `unit` model, and only draw down when their
1534
+ * currency matches the allocation's.
1502
1535
  */
1503
1536
  license_type_id?: string | null;
1504
1537
 
@@ -1657,7 +1690,11 @@ export namespace BetaCreatePlanVersionParams {
1657
1690
  invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
1658
1691
 
1659
1692
  /**
1660
- * The ID of the license type to associate with this price.
1693
+ * The ID of the license type to associate with this price. On a usage price this
1694
+ * also marks the price as eligible to draw down from that license type's
1695
+ * allocation; a usage price created without it is billed normally. Usage prices
1696
+ * with a license type must use the `unit` model, and only draw down when their
1697
+ * currency matches the allocation's.
1661
1698
  */
1662
1699
  license_type_id?: string | null;
1663
1700
 
@@ -1805,7 +1842,11 @@ export namespace BetaCreatePlanVersionParams {
1805
1842
  invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
1806
1843
 
1807
1844
  /**
1808
- * The ID of the license type to associate with this price.
1845
+ * The ID of the license type to associate with this price. On a usage price this
1846
+ * also marks the price as eligible to draw down from that license type's
1847
+ * allocation; a usage price created without it is billed normally. Usage prices
1848
+ * with a license type must use the `unit` model, and only draw down when their
1849
+ * currency matches the allocation's.
1809
1850
  */
1810
1851
  license_type_id?: string | null;
1811
1852
 
@@ -1940,7 +1981,11 @@ export namespace BetaCreatePlanVersionParams {
1940
1981
  invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
1941
1982
 
1942
1983
  /**
1943
- * The ID of the license type to associate with this price.
1984
+ * The ID of the license type to associate with this price. On a usage price this
1985
+ * also marks the price as eligible to draw down from that license type's
1986
+ * allocation; a usage price created without it is billed normally. Usage prices
1987
+ * with a license type must use the `unit` model, and only draw down when their
1988
+ * currency matches the allocation's.
1944
1989
  */
1945
1990
  license_type_id?: string | null;
1946
1991
 
@@ -2192,7 +2237,8 @@ export namespace BetaCreatePlanVersionParams {
2192
2237
  /**
2193
2238
  * License allocations to associate with this price. Each entry defines a
2194
2239
  * per-license credit pool granted each cadence. Requires license_type_id or
2195
- * license_type_configuration to be set.
2240
+ * license_type_configuration to be set. Usage prices draw down from these
2241
+ * allocations only if they set the same license type.
2196
2242
  */
2197
2243
  license_allocations: Array<LicenseAllocationPrice.LicenseAllocation>;
2198
2244
 
@@ -2273,7 +2319,11 @@ export namespace BetaCreatePlanVersionParams {
2273
2319
  invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
2274
2320
 
2275
2321
  /**
2276
- * The ID of the license type to associate with this price.
2322
+ * The ID of the license type to associate with this price. On a usage price this
2323
+ * also marks the price as eligible to draw down from that license type's
2324
+ * allocation; a usage price created without it is billed normally. Usage prices
2325
+ * with a license type must use the `unit` model, and only draw down when their
2326
+ * currency matches the allocation's.
2277
2327
  */
2278
2328
  license_type_id?: string | null;
2279
2329
 
@@ -2398,7 +2448,11 @@ export namespace BetaCreatePlanVersionParams {
2398
2448
  invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
2399
2449
 
2400
2450
  /**
2401
- * The ID of the license type to associate with this price.
2451
+ * The ID of the license type to associate with this price. On a usage price this
2452
+ * also marks the price as eligible to draw down from that license type's
2453
+ * allocation; a usage price created without it is billed normally. Usage prices
2454
+ * with a license type must use the `unit` model, and only draw down when their
2455
+ * currency matches the allocation's.
2402
2456
  */
2403
2457
  license_type_id?: string | null;
2404
2458
 
@@ -2553,7 +2607,11 @@ export namespace BetaCreatePlanVersionParams {
2553
2607
  invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
2554
2608
 
2555
2609
  /**
2556
- * The ID of the license type to associate with this price.
2610
+ * The ID of the license type to associate with this price. On a usage price this
2611
+ * also marks the price as eligible to draw down from that license type's
2612
+ * allocation; a usage price created without it is billed normally. Usage prices
2613
+ * with a license type must use the `unit` model, and only draw down when their
2614
+ * currency matches the allocation's.
2557
2615
  */
2558
2616
  license_type_id?: string | null;
2559
2617
 
@@ -2701,7 +2759,11 @@ export namespace BetaCreatePlanVersionParams {
2701
2759
  invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
2702
2760
 
2703
2761
  /**
2704
- * The ID of the license type to associate with this price.
2762
+ * The ID of the license type to associate with this price. On a usage price this
2763
+ * also marks the price as eligible to draw down from that license type's
2764
+ * allocation; a usage price created without it is billed normally. Usage prices
2765
+ * with a license type must use the `unit` model, and only draw down when their
2766
+ * currency matches the allocation's.
2705
2767
  */
2706
2768
  license_type_id?: string | null;
2707
2769
 
@@ -2870,7 +2932,11 @@ export namespace BetaCreatePlanVersionParams {
2870
2932
  invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
2871
2933
 
2872
2934
  /**
2873
- * The ID of the license type to associate with this price.
2935
+ * The ID of the license type to associate with this price. On a usage price this
2936
+ * also marks the price as eligible to draw down from that license type's
2937
+ * allocation; a usage price created without it is billed normally. Usage prices
2938
+ * with a license type must use the `unit` model, and only draw down when their
2939
+ * currency matches the allocation's.
2874
2940
  */
2875
2941
  license_type_id?: string | null;
2876
2942
 
@@ -3006,7 +3072,11 @@ export namespace BetaCreatePlanVersionParams {
3006
3072
  invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
3007
3073
 
3008
3074
  /**
3009
- * The ID of the license type to associate with this price.
3075
+ * The ID of the license type to associate with this price. On a usage price this
3076
+ * also marks the price as eligible to draw down from that license type's
3077
+ * allocation; a usage price created without it is billed normally. Usage prices
3078
+ * with a license type must use the `unit` model, and only draw down when their
3079
+ * currency matches the allocation's.
3010
3080
  */
3011
3081
  license_type_id?: string | null;
3012
3082
 
@@ -3139,7 +3209,11 @@ export namespace BetaCreatePlanVersionParams {
3139
3209
  invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
3140
3210
 
3141
3211
  /**
3142
- * The ID of the license type to associate with this price.
3212
+ * The ID of the license type to associate with this price. On a usage price this
3213
+ * also marks the price as eligible to draw down from that license type's
3214
+ * allocation; a usage price created without it is billed normally. Usage prices
3215
+ * with a license type must use the `unit` model, and only draw down when their
3216
+ * currency matches the allocation's.
3143
3217
  */
3144
3218
  license_type_id?: string | null;
3145
3219
 
@@ -3272,7 +3346,11 @@ export namespace BetaCreatePlanVersionParams {
3272
3346
  invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
3273
3347
 
3274
3348
  /**
3275
- * The ID of the license type to associate with this price.
3349
+ * The ID of the license type to associate with this price. On a usage price this
3350
+ * also marks the price as eligible to draw down from that license type's
3351
+ * allocation; a usage price created without it is billed normally. Usage prices
3352
+ * with a license type must use the `unit` model, and only draw down when their
3353
+ * currency matches the allocation's.
3276
3354
  */
3277
3355
  license_type_id?: string | null;
3278
3356
 
@@ -3431,7 +3509,11 @@ export namespace BetaCreatePlanVersionParams {
3431
3509
  invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
3432
3510
 
3433
3511
  /**
3434
- * The ID of the license type to associate with this price.
3512
+ * The ID of the license type to associate with this price. On a usage price this
3513
+ * also marks the price as eligible to draw down from that license type's
3514
+ * allocation; a usage price created without it is billed normally. Usage prices
3515
+ * with a license type must use the `unit` model, and only draw down when their
3516
+ * currency matches the allocation's.
3435
3517
  */
3436
3518
  license_type_id?: string | null;
3437
3519
 
@@ -3579,7 +3661,11 @@ export namespace BetaCreatePlanVersionParams {
3579
3661
  invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
3580
3662
 
3581
3663
  /**
3582
- * The ID of the license type to associate with this price.
3664
+ * The ID of the license type to associate with this price. On a usage price this
3665
+ * also marks the price as eligible to draw down from that license type's
3666
+ * allocation; a usage price created without it is billed normally. Usage prices
3667
+ * with a license type must use the `unit` model, and only draw down when their
3668
+ * currency matches the allocation's.
3583
3669
  */
3584
3670
  license_type_id?: string | null;
3585
3671
 
@@ -3714,7 +3800,11 @@ export namespace BetaCreatePlanVersionParams {
3714
3800
  invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
3715
3801
 
3716
3802
  /**
3717
- * The ID of the license type to associate with this price.
3803
+ * The ID of the license type to associate with this price. On a usage price this
3804
+ * also marks the price as eligible to draw down from that license type's
3805
+ * allocation; a usage price created without it is billed normally. Usage prices
3806
+ * with a license type must use the `unit` model, and only draw down when their
3807
+ * currency matches the allocation's.
3718
3808
  */
3719
3809
  license_type_id?: string | null;
3720
3810