orb-billing 6.9.0 → 6.11.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 +14 -0
- package/package.json +1 -1
- package/resources/beta/beta.d.mts +252 -2
- package/resources/beta/beta.d.mts.map +1 -1
- package/resources/beta/beta.d.ts +252 -2
- 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.mts +252 -2
- package/resources/beta/external-plan-id.d.mts.map +1 -1
- package/resources/beta/external-plan-id.d.ts +252 -2
- package/resources/beta/external-plan-id.d.ts.map +1 -1
- package/resources/plans/plans.d.mts +126 -1
- package/resources/plans/plans.d.mts.map +1 -1
- package/resources/plans/plans.d.ts +126 -1
- 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.mts +360 -3
- package/resources/prices/prices.d.mts.map +1 -1
- package/resources/prices/prices.d.ts +360 -3
- 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.mts +145 -1
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +145 -1
- package/resources/shared.d.ts.map +1 -1
- package/resources/subscriptions.d.mts +695 -43
- package/resources/subscriptions.d.mts.map +1 -1
- package/resources/subscriptions.d.ts +695 -43
- package/resources/subscriptions.d.ts.map +1 -1
- package/resources/subscriptions.js +39 -6
- package/resources/subscriptions.js.map +1 -1
- package/resources/subscriptions.mjs +39 -6
- package/resources/subscriptions.mjs.map +1 -1
- package/src/resources/beta/beta.ts +298 -0
- package/src/resources/beta/external-plan-id.ts +298 -0
- package/src/resources/plans/plans.ts +149 -0
- package/src/resources/prices/prices.ts +426 -0
- package/src/resources/shared.ts +185 -0
- package/src/resources/subscriptions.ts +890 -119
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.mts.map +1 -1
- package/version.d.ts +1 -1
- package/version.d.ts.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +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
|
-
*
|
|
980
|
-
*
|
|
981
|
-
*
|
|
982
|
-
*
|
|
983
|
-
*
|
|
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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c,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
|
-
*
|
|
977
|
-
*
|
|
978
|
-
*
|
|
979
|
-
*
|
|
980
|
-
*
|
|
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;IAC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OAAO,CAAC,CAAC;IACpG,CAAC;IAED;;;;;;;;;;;;;;;OAeG;IACH,iCAAiC,CAC/B,cAAsB,EACtB,IAAyD,EACzD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,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,IAAI,CAAA,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,IAAI,CAAA,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,IAAI,CAAA,kBAAkB,cAAc,eAAe,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACtG,CAAC;CACF"}
|
|
@@ -372,6 +372,7 @@ export namespace BetaCreatePlanVersionParams {
|
|
|
372
372
|
| Shared.NewPlanTieredPackagePrice
|
|
373
373
|
| Shared.NewPlanTieredWithMinimumPrice
|
|
374
374
|
| Shared.NewPlanGroupedTieredPrice
|
|
375
|
+
| AddPrice.NewPlanGroupedTieredMatrixPrice
|
|
375
376
|
| Shared.NewPlanTieredPackageWithMinimumPrice
|
|
376
377
|
| Shared.NewPlanPackageWithAllocationPrice
|
|
377
378
|
| Shared.NewPlanUnitWithPercentPrice
|
|
@@ -690,6 +691,154 @@ export namespace BetaCreatePlanVersionParams {
|
|
|
690
691
|
}
|
|
691
692
|
}
|
|
692
693
|
|
|
694
|
+
export interface NewPlanGroupedTieredMatrixPrice {
|
|
695
|
+
/**
|
|
696
|
+
* The cadence to bill for this price on.
|
|
697
|
+
*/
|
|
698
|
+
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
|
|
699
|
+
|
|
700
|
+
/**
|
|
701
|
+
* Configuration for grouped_tiered_matrix pricing
|
|
702
|
+
*/
|
|
703
|
+
grouped_tiered_matrix_config: NewPlanGroupedTieredMatrixPrice.GroupedTieredMatrixConfig;
|
|
704
|
+
|
|
705
|
+
/**
|
|
706
|
+
* The id of the item the price will be associated with.
|
|
707
|
+
*/
|
|
708
|
+
item_id: string;
|
|
709
|
+
|
|
710
|
+
/**
|
|
711
|
+
* The pricing model type
|
|
712
|
+
*/
|
|
713
|
+
model_type: 'grouped_tiered_matrix';
|
|
714
|
+
|
|
715
|
+
/**
|
|
716
|
+
* The name of the price.
|
|
717
|
+
*/
|
|
718
|
+
name: string;
|
|
719
|
+
|
|
720
|
+
/**
|
|
721
|
+
* The id of the billable metric for the price. Only needed if the price is
|
|
722
|
+
* usage-based.
|
|
723
|
+
*/
|
|
724
|
+
billable_metric_id?: string | null;
|
|
725
|
+
|
|
726
|
+
/**
|
|
727
|
+
* If the Price represents a fixed cost, the price will be billed in-advance if
|
|
728
|
+
* this is true, and in-arrears if this is false.
|
|
729
|
+
*/
|
|
730
|
+
billed_in_advance?: boolean | null;
|
|
731
|
+
|
|
732
|
+
/**
|
|
733
|
+
* For custom cadence: specifies the duration of the billing period in days or
|
|
734
|
+
* months.
|
|
735
|
+
*/
|
|
736
|
+
billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
737
|
+
|
|
738
|
+
/**
|
|
739
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
740
|
+
*/
|
|
741
|
+
conversion_rate?: number | null;
|
|
742
|
+
|
|
743
|
+
/**
|
|
744
|
+
* The configuration for the rate of the price currency to the invoicing currency.
|
|
745
|
+
*/
|
|
746
|
+
conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
|
|
747
|
+
|
|
748
|
+
/**
|
|
749
|
+
* An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
750
|
+
* price is billed.
|
|
751
|
+
*/
|
|
752
|
+
currency?: string | null;
|
|
753
|
+
|
|
754
|
+
/**
|
|
755
|
+
* For dimensional price: specifies a price group and dimension values
|
|
756
|
+
*/
|
|
757
|
+
dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
|
|
758
|
+
|
|
759
|
+
/**
|
|
760
|
+
* An alias for the price.
|
|
761
|
+
*/
|
|
762
|
+
external_price_id?: string | null;
|
|
763
|
+
|
|
764
|
+
/**
|
|
765
|
+
* If the Price represents a fixed cost, this represents the quantity of units
|
|
766
|
+
* applied.
|
|
767
|
+
*/
|
|
768
|
+
fixed_price_quantity?: number | null;
|
|
769
|
+
|
|
770
|
+
/**
|
|
771
|
+
* The property used to group this price on an invoice
|
|
772
|
+
*/
|
|
773
|
+
invoice_grouping_key?: string | null;
|
|
774
|
+
|
|
775
|
+
/**
|
|
776
|
+
* Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
777
|
+
* If unspecified, a single invoice is produced per billing cycle.
|
|
778
|
+
*/
|
|
779
|
+
invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
780
|
+
|
|
781
|
+
/**
|
|
782
|
+
* The ID of the license type to associate with this price.
|
|
783
|
+
*/
|
|
784
|
+
license_type_id?: string | null;
|
|
785
|
+
|
|
786
|
+
/**
|
|
787
|
+
* User-specified key/value pairs for the resource. Individual keys can be removed
|
|
788
|
+
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
789
|
+
* by setting `metadata` to `null`.
|
|
790
|
+
*/
|
|
791
|
+
metadata?: { [key: string]: string | null } | null;
|
|
792
|
+
|
|
793
|
+
/**
|
|
794
|
+
* A transient ID that can be used to reference this price when adding adjustments
|
|
795
|
+
* in the same API call.
|
|
796
|
+
*/
|
|
797
|
+
reference_id?: string | null;
|
|
798
|
+
}
|
|
799
|
+
|
|
800
|
+
export namespace NewPlanGroupedTieredMatrixPrice {
|
|
801
|
+
/**
|
|
802
|
+
* Configuration for grouped_tiered_matrix pricing
|
|
803
|
+
*/
|
|
804
|
+
export interface GroupedTieredMatrixConfig {
|
|
805
|
+
/**
|
|
806
|
+
* Per unit rate for usage whose dimension value has no configured tiers
|
|
807
|
+
*/
|
|
808
|
+
default_unit_amount: string;
|
|
809
|
+
|
|
810
|
+
/**
|
|
811
|
+
* The billable metric property used to group usage before tiering
|
|
812
|
+
*/
|
|
813
|
+
dimension: string;
|
|
814
|
+
|
|
815
|
+
/**
|
|
816
|
+
* Graduated tiers keyed by dimension value; usage for a value is tiered only
|
|
817
|
+
* against its own rows
|
|
818
|
+
*/
|
|
819
|
+
tiers: Array<GroupedTieredMatrixConfig.Tier>;
|
|
820
|
+
}
|
|
821
|
+
|
|
822
|
+
export namespace GroupedTieredMatrixConfig {
|
|
823
|
+
/**
|
|
824
|
+
* Configuration for a single tier scoped to a dimension value
|
|
825
|
+
*/
|
|
826
|
+
export interface Tier {
|
|
827
|
+
/**
|
|
828
|
+
* The dimension value this tier applies to
|
|
829
|
+
*/
|
|
830
|
+
dimension_value: string;
|
|
831
|
+
|
|
832
|
+
tier_lower_bound: string;
|
|
833
|
+
|
|
834
|
+
/**
|
|
835
|
+
* Per unit amount
|
|
836
|
+
*/
|
|
837
|
+
unit_amount: string;
|
|
838
|
+
}
|
|
839
|
+
}
|
|
840
|
+
}
|
|
841
|
+
|
|
693
842
|
export interface NewPlanMatrixWithThresholdDiscountsPrice {
|
|
694
843
|
/**
|
|
695
844
|
* The cadence to bill for this price on.
|
|
@@ -1997,6 +2146,7 @@ export namespace BetaCreatePlanVersionParams {
|
|
|
1997
2146
|
| Shared.NewPlanTieredPackagePrice
|
|
1998
2147
|
| Shared.NewPlanTieredWithMinimumPrice
|
|
1999
2148
|
| Shared.NewPlanGroupedTieredPrice
|
|
2149
|
+
| ReplacePrice.NewPlanGroupedTieredMatrixPrice
|
|
2000
2150
|
| Shared.NewPlanTieredPackageWithMinimumPrice
|
|
2001
2151
|
| Shared.NewPlanPackageWithAllocationPrice
|
|
2002
2152
|
| Shared.NewPlanUnitWithPercentPrice
|
|
@@ -2315,6 +2465,154 @@ export namespace BetaCreatePlanVersionParams {
|
|
|
2315
2465
|
}
|
|
2316
2466
|
}
|
|
2317
2467
|
|
|
2468
|
+
export interface NewPlanGroupedTieredMatrixPrice {
|
|
2469
|
+
/**
|
|
2470
|
+
* The cadence to bill for this price on.
|
|
2471
|
+
*/
|
|
2472
|
+
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
|
|
2473
|
+
|
|
2474
|
+
/**
|
|
2475
|
+
* Configuration for grouped_tiered_matrix pricing
|
|
2476
|
+
*/
|
|
2477
|
+
grouped_tiered_matrix_config: NewPlanGroupedTieredMatrixPrice.GroupedTieredMatrixConfig;
|
|
2478
|
+
|
|
2479
|
+
/**
|
|
2480
|
+
* The id of the item the price will be associated with.
|
|
2481
|
+
*/
|
|
2482
|
+
item_id: string;
|
|
2483
|
+
|
|
2484
|
+
/**
|
|
2485
|
+
* The pricing model type
|
|
2486
|
+
*/
|
|
2487
|
+
model_type: 'grouped_tiered_matrix';
|
|
2488
|
+
|
|
2489
|
+
/**
|
|
2490
|
+
* The name of the price.
|
|
2491
|
+
*/
|
|
2492
|
+
name: string;
|
|
2493
|
+
|
|
2494
|
+
/**
|
|
2495
|
+
* The id of the billable metric for the price. Only needed if the price is
|
|
2496
|
+
* usage-based.
|
|
2497
|
+
*/
|
|
2498
|
+
billable_metric_id?: string | null;
|
|
2499
|
+
|
|
2500
|
+
/**
|
|
2501
|
+
* If the Price represents a fixed cost, the price will be billed in-advance if
|
|
2502
|
+
* this is true, and in-arrears if this is false.
|
|
2503
|
+
*/
|
|
2504
|
+
billed_in_advance?: boolean | null;
|
|
2505
|
+
|
|
2506
|
+
/**
|
|
2507
|
+
* For custom cadence: specifies the duration of the billing period in days or
|
|
2508
|
+
* months.
|
|
2509
|
+
*/
|
|
2510
|
+
billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
2511
|
+
|
|
2512
|
+
/**
|
|
2513
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
2514
|
+
*/
|
|
2515
|
+
conversion_rate?: number | null;
|
|
2516
|
+
|
|
2517
|
+
/**
|
|
2518
|
+
* The configuration for the rate of the price currency to the invoicing currency.
|
|
2519
|
+
*/
|
|
2520
|
+
conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
|
|
2521
|
+
|
|
2522
|
+
/**
|
|
2523
|
+
* An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
2524
|
+
* price is billed.
|
|
2525
|
+
*/
|
|
2526
|
+
currency?: string | null;
|
|
2527
|
+
|
|
2528
|
+
/**
|
|
2529
|
+
* For dimensional price: specifies a price group and dimension values
|
|
2530
|
+
*/
|
|
2531
|
+
dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
|
|
2532
|
+
|
|
2533
|
+
/**
|
|
2534
|
+
* An alias for the price.
|
|
2535
|
+
*/
|
|
2536
|
+
external_price_id?: string | null;
|
|
2537
|
+
|
|
2538
|
+
/**
|
|
2539
|
+
* If the Price represents a fixed cost, this represents the quantity of units
|
|
2540
|
+
* applied.
|
|
2541
|
+
*/
|
|
2542
|
+
fixed_price_quantity?: number | null;
|
|
2543
|
+
|
|
2544
|
+
/**
|
|
2545
|
+
* The property used to group this price on an invoice
|
|
2546
|
+
*/
|
|
2547
|
+
invoice_grouping_key?: string | null;
|
|
2548
|
+
|
|
2549
|
+
/**
|
|
2550
|
+
* Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
2551
|
+
* If unspecified, a single invoice is produced per billing cycle.
|
|
2552
|
+
*/
|
|
2553
|
+
invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
2554
|
+
|
|
2555
|
+
/**
|
|
2556
|
+
* The ID of the license type to associate with this price.
|
|
2557
|
+
*/
|
|
2558
|
+
license_type_id?: string | null;
|
|
2559
|
+
|
|
2560
|
+
/**
|
|
2561
|
+
* User-specified key/value pairs for the resource. Individual keys can be removed
|
|
2562
|
+
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
2563
|
+
* by setting `metadata` to `null`.
|
|
2564
|
+
*/
|
|
2565
|
+
metadata?: { [key: string]: string | null } | null;
|
|
2566
|
+
|
|
2567
|
+
/**
|
|
2568
|
+
* A transient ID that can be used to reference this price when adding adjustments
|
|
2569
|
+
* in the same API call.
|
|
2570
|
+
*/
|
|
2571
|
+
reference_id?: string | null;
|
|
2572
|
+
}
|
|
2573
|
+
|
|
2574
|
+
export namespace NewPlanGroupedTieredMatrixPrice {
|
|
2575
|
+
/**
|
|
2576
|
+
* Configuration for grouped_tiered_matrix pricing
|
|
2577
|
+
*/
|
|
2578
|
+
export interface GroupedTieredMatrixConfig {
|
|
2579
|
+
/**
|
|
2580
|
+
* Per unit rate for usage whose dimension value has no configured tiers
|
|
2581
|
+
*/
|
|
2582
|
+
default_unit_amount: string;
|
|
2583
|
+
|
|
2584
|
+
/**
|
|
2585
|
+
* The billable metric property used to group usage before tiering
|
|
2586
|
+
*/
|
|
2587
|
+
dimension: string;
|
|
2588
|
+
|
|
2589
|
+
/**
|
|
2590
|
+
* Graduated tiers keyed by dimension value; usage for a value is tiered only
|
|
2591
|
+
* against its own rows
|
|
2592
|
+
*/
|
|
2593
|
+
tiers: Array<GroupedTieredMatrixConfig.Tier>;
|
|
2594
|
+
}
|
|
2595
|
+
|
|
2596
|
+
export namespace GroupedTieredMatrixConfig {
|
|
2597
|
+
/**
|
|
2598
|
+
* Configuration for a single tier scoped to a dimension value
|
|
2599
|
+
*/
|
|
2600
|
+
export interface Tier {
|
|
2601
|
+
/**
|
|
2602
|
+
* The dimension value this tier applies to
|
|
2603
|
+
*/
|
|
2604
|
+
dimension_value: string;
|
|
2605
|
+
|
|
2606
|
+
tier_lower_bound: string;
|
|
2607
|
+
|
|
2608
|
+
/**
|
|
2609
|
+
* Per unit amount
|
|
2610
|
+
*/
|
|
2611
|
+
unit_amount: string;
|
|
2612
|
+
}
|
|
2613
|
+
}
|
|
2614
|
+
}
|
|
2615
|
+
|
|
2318
2616
|
export interface NewPlanMatrixWithThresholdDiscountsPrice {
|
|
2319
2617
|
/**
|
|
2320
2618
|
* The cadence to bill for this price on.
|