orb-billing 6.14.0 → 6.16.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 +276 -2
- package/resources/beta/beta.d.mts.map +1 -1
- package/resources/beta/beta.d.ts +276 -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 +276 -2
- package/resources/beta/external-plan-id.d.mts.map +1 -1
- package/resources/beta/external-plan-id.d.ts +276 -2
- package/resources/beta/external-plan-id.d.ts.map +1 -1
- package/resources/customers/credits/top-ups.d.mts +14 -2
- package/resources/customers/credits/top-ups.d.mts.map +1 -1
- package/resources/customers/credits/top-ups.d.ts +14 -2
- package/resources/customers/credits/top-ups.d.ts.map +1 -1
- package/resources/customers/credits/top-ups.js +14 -2
- package/resources/customers/credits/top-ups.js.map +1 -1
- package/resources/customers/credits/top-ups.mjs +14 -2
- package/resources/customers/credits/top-ups.mjs.map +1 -1
- package/resources/dimensional-price-groups/dimensional-price-groups.d.mts +11 -2
- package/resources/dimensional-price-groups/dimensional-price-groups.d.mts.map +1 -1
- package/resources/dimensional-price-groups/dimensional-price-groups.d.ts +11 -2
- package/resources/dimensional-price-groups/dimensional-price-groups.d.ts.map +1 -1
- package/resources/dimensional-price-groups/dimensional-price-groups.js +11 -2
- package/resources/dimensional-price-groups/dimensional-price-groups.js.map +1 -1
- package/resources/dimensional-price-groups/dimensional-price-groups.mjs +11 -2
- package/resources/dimensional-price-groups/dimensional-price-groups.mjs.map +1 -1
- package/resources/dimensional-price-groups/external-dimensional-price-group-id.d.mts +4 -1
- package/resources/dimensional-price-groups/external-dimensional-price-group-id.d.mts.map +1 -1
- package/resources/dimensional-price-groups/external-dimensional-price-group-id.d.ts +4 -1
- package/resources/dimensional-price-groups/external-dimensional-price-group-id.d.ts.map +1 -1
- package/resources/dimensional-price-groups/external-dimensional-price-group-id.js +4 -1
- package/resources/dimensional-price-groups/external-dimensional-price-group-id.js.map +1 -1
- package/resources/dimensional-price-groups/external-dimensional-price-group-id.mjs +4 -1
- package/resources/dimensional-price-groups/external-dimensional-price-group-id.mjs.map +1 -1
- package/resources/items.d.mts +3 -1
- package/resources/items.d.mts.map +1 -1
- package/resources/items.d.ts +3 -1
- package/resources/items.d.ts.map +1 -1
- package/resources/items.js +3 -1
- package/resources/items.js.map +1 -1
- package/resources/items.mjs +3 -1
- package/resources/items.mjs.map +1 -1
- package/resources/plans/migrations.d.mts +3 -1
- package/resources/plans/migrations.d.mts.map +1 -1
- package/resources/plans/migrations.d.ts +3 -1
- package/resources/plans/migrations.d.ts.map +1 -1
- package/resources/plans/migrations.js +3 -1
- package/resources/plans/migrations.js.map +1 -1
- package/resources/plans/migrations.mjs +3 -1
- package/resources/plans/migrations.mjs.map +1 -1
- package/resources/plans/plans.d.mts +138 -1
- package/resources/plans/plans.d.mts.map +1 -1
- package/resources/plans/plans.d.ts +138 -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 +396 -3
- package/resources/prices/prices.d.mts.map +1 -1
- package/resources/prices/prices.d.ts +396 -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 +153 -1
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +153 -1
- package/resources/shared.d.ts.map +1 -1
- package/resources/subscriptions.d.mts +702 -23
- package/resources/subscriptions.d.mts.map +1 -1
- package/resources/subscriptions.d.ts +702 -23
- package/resources/subscriptions.d.ts.map +1 -1
- package/src/resources/beta/beta.ts +324 -0
- package/src/resources/beta/external-plan-id.ts +324 -0
- package/src/resources/customers/credits/top-ups.ts +14 -2
- package/src/resources/dimensional-price-groups/dimensional-price-groups.ts +11 -2
- package/src/resources/dimensional-price-groups/external-dimensional-price-group-id.ts +4 -1
- package/src/resources/items.ts +3 -1
- package/src/resources/plans/migrations.ts +3 -1
- package/src/resources/plans/plans.ts +162 -0
- package/src/resources/prices/prices.ts +465 -0
- package/src/resources/shared.ts +194 -0
- package/src/resources/subscriptions.ts +931 -128
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -377,6 +377,7 @@ export namespace BetaCreatePlanVersionParams {
|
|
|
377
377
|
| Shared.NewPlanPackageWithAllocationPrice
|
|
378
378
|
| Shared.NewPlanUnitWithPercentPrice
|
|
379
379
|
| Shared.NewPlanMatrixWithAllocationPrice
|
|
380
|
+
| AddPrice.NewPlanTieredMatrixWithAllocationPrice
|
|
380
381
|
| AddPrice.NewPlanMatrixWithThresholdDiscountsPrice
|
|
381
382
|
| AddPrice.NewPlanTieredWithProrationPrice
|
|
382
383
|
| Shared.NewPlanUnitWithProrationPrice
|
|
@@ -852,6 +853,167 @@ export namespace BetaCreatePlanVersionParams {
|
|
|
852
853
|
}
|
|
853
854
|
}
|
|
854
855
|
|
|
856
|
+
export interface NewPlanTieredMatrixWithAllocationPrice {
|
|
857
|
+
/**
|
|
858
|
+
* The cadence to bill for this price on.
|
|
859
|
+
*/
|
|
860
|
+
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
|
|
861
|
+
|
|
862
|
+
/**
|
|
863
|
+
* The id of the item the price will be associated with.
|
|
864
|
+
*/
|
|
865
|
+
item_id: string;
|
|
866
|
+
|
|
867
|
+
/**
|
|
868
|
+
* The pricing model type
|
|
869
|
+
*/
|
|
870
|
+
model_type: 'tiered_matrix_with_allocation';
|
|
871
|
+
|
|
872
|
+
/**
|
|
873
|
+
* The name of the price.
|
|
874
|
+
*/
|
|
875
|
+
name: string;
|
|
876
|
+
|
|
877
|
+
/**
|
|
878
|
+
* Configuration for tiered_matrix_with_allocation pricing
|
|
879
|
+
*/
|
|
880
|
+
tiered_matrix_with_allocation_config: NewPlanTieredMatrixWithAllocationPrice.TieredMatrixWithAllocationConfig;
|
|
881
|
+
|
|
882
|
+
/**
|
|
883
|
+
* The id of the billable metric for the price. Only needed if the price is
|
|
884
|
+
* usage-based.
|
|
885
|
+
*/
|
|
886
|
+
billable_metric_id?: string | null;
|
|
887
|
+
|
|
888
|
+
/**
|
|
889
|
+
* If the Price represents a fixed cost, the price will be billed in-advance if
|
|
890
|
+
* this is true, and in-arrears if this is false.
|
|
891
|
+
*/
|
|
892
|
+
billed_in_advance?: boolean | null;
|
|
893
|
+
|
|
894
|
+
/**
|
|
895
|
+
* For custom cadence: specifies the duration of the billing period in days or
|
|
896
|
+
* months.
|
|
897
|
+
*/
|
|
898
|
+
billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
899
|
+
|
|
900
|
+
/**
|
|
901
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
902
|
+
*/
|
|
903
|
+
conversion_rate?: number | null;
|
|
904
|
+
|
|
905
|
+
/**
|
|
906
|
+
* The configuration for the rate of the price currency to the invoicing currency.
|
|
907
|
+
*/
|
|
908
|
+
conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
|
|
909
|
+
|
|
910
|
+
/**
|
|
911
|
+
* An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
912
|
+
* price is billed.
|
|
913
|
+
*/
|
|
914
|
+
currency?: string | null;
|
|
915
|
+
|
|
916
|
+
/**
|
|
917
|
+
* For dimensional price: specifies a price group and dimension values
|
|
918
|
+
*/
|
|
919
|
+
dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
|
|
920
|
+
|
|
921
|
+
/**
|
|
922
|
+
* An alias for the price.
|
|
923
|
+
*/
|
|
924
|
+
external_price_id?: string | null;
|
|
925
|
+
|
|
926
|
+
/**
|
|
927
|
+
* If the Price represents a fixed cost, this represents the quantity of units
|
|
928
|
+
* applied.
|
|
929
|
+
*/
|
|
930
|
+
fixed_price_quantity?: number | null;
|
|
931
|
+
|
|
932
|
+
/**
|
|
933
|
+
* The property used to group this price on an invoice
|
|
934
|
+
*/
|
|
935
|
+
invoice_grouping_key?: string | null;
|
|
936
|
+
|
|
937
|
+
/**
|
|
938
|
+
* Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
939
|
+
* If unspecified, a single invoice is produced per billing cycle.
|
|
940
|
+
*/
|
|
941
|
+
invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
942
|
+
|
|
943
|
+
/**
|
|
944
|
+
* The ID of the license type to associate with this price. On a usage price this
|
|
945
|
+
* also marks the price as eligible to draw down from that license type's
|
|
946
|
+
* allocation; a usage price created without it is billed normally. Usage prices
|
|
947
|
+
* with a license type must use the `unit` model, and only draw down when their
|
|
948
|
+
* currency matches the allocation's.
|
|
949
|
+
*/
|
|
950
|
+
license_type_id?: string | null;
|
|
951
|
+
|
|
952
|
+
/**
|
|
953
|
+
* User-specified key/value pairs for the resource. Individual keys can be removed
|
|
954
|
+
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
955
|
+
* by setting `metadata` to `null`.
|
|
956
|
+
*/
|
|
957
|
+
metadata?: { [key: string]: string | null } | null;
|
|
958
|
+
|
|
959
|
+
/**
|
|
960
|
+
* A transient ID that can be used to reference this price when adding adjustments
|
|
961
|
+
* in the same API call.
|
|
962
|
+
*/
|
|
963
|
+
reference_id?: string | null;
|
|
964
|
+
}
|
|
965
|
+
|
|
966
|
+
export namespace NewPlanTieredMatrixWithAllocationPrice {
|
|
967
|
+
/**
|
|
968
|
+
* Configuration for tiered_matrix_with_allocation pricing
|
|
969
|
+
*/
|
|
970
|
+
export interface TieredMatrixWithAllocationConfig {
|
|
971
|
+
/**
|
|
972
|
+
* Usage allocation, pooled across all matrix cells
|
|
973
|
+
*/
|
|
974
|
+
allocation: string;
|
|
975
|
+
|
|
976
|
+
/**
|
|
977
|
+
* Per unit rate for usage whose matrix cell has no configured tiers
|
|
978
|
+
*/
|
|
979
|
+
default_unit_amount: string;
|
|
980
|
+
|
|
981
|
+
/**
|
|
982
|
+
* One or two event property values to evaluate matrix cells by
|
|
983
|
+
*/
|
|
984
|
+
dimensions: Array<string>;
|
|
985
|
+
|
|
986
|
+
/**
|
|
987
|
+
* Graduated tiers keyed by matrix cell; usage in a cell is tiered only against its
|
|
988
|
+
* own rows
|
|
989
|
+
*/
|
|
990
|
+
tiers: Array<TieredMatrixWithAllocationConfig.Tier>;
|
|
991
|
+
}
|
|
992
|
+
|
|
993
|
+
export namespace TieredMatrixWithAllocationConfig {
|
|
994
|
+
/**
|
|
995
|
+
* Configuration for a single tier scoped to one matrix cell
|
|
996
|
+
*/
|
|
997
|
+
export interface Tier {
|
|
998
|
+
/**
|
|
999
|
+
* The matrix cell this tier applies to, as one or two dimension values
|
|
1000
|
+
*/
|
|
1001
|
+
dimension_values: Array<string>;
|
|
1002
|
+
|
|
1003
|
+
/**
|
|
1004
|
+
* Exclusive tier starting value. The tier runs up to and including the next bound
|
|
1005
|
+
* configured for the same matrix cell.
|
|
1006
|
+
*/
|
|
1007
|
+
tier_lower_bound: string;
|
|
1008
|
+
|
|
1009
|
+
/**
|
|
1010
|
+
* Per unit amount
|
|
1011
|
+
*/
|
|
1012
|
+
unit_amount: string;
|
|
1013
|
+
}
|
|
1014
|
+
}
|
|
1015
|
+
}
|
|
1016
|
+
|
|
855
1017
|
export interface NewPlanMatrixWithThresholdDiscountsPrice {
|
|
856
1018
|
/**
|
|
857
1019
|
* The cadence to bill for this price on.
|
|
@@ -2196,6 +2358,7 @@ export namespace BetaCreatePlanVersionParams {
|
|
|
2196
2358
|
| Shared.NewPlanPackageWithAllocationPrice
|
|
2197
2359
|
| Shared.NewPlanUnitWithPercentPrice
|
|
2198
2360
|
| Shared.NewPlanMatrixWithAllocationPrice
|
|
2361
|
+
| ReplacePrice.NewPlanTieredMatrixWithAllocationPrice
|
|
2199
2362
|
| ReplacePrice.NewPlanMatrixWithThresholdDiscountsPrice
|
|
2200
2363
|
| ReplacePrice.NewPlanTieredWithProrationPrice
|
|
2201
2364
|
| Shared.NewPlanUnitWithProrationPrice
|
|
@@ -2671,6 +2834,167 @@ export namespace BetaCreatePlanVersionParams {
|
|
|
2671
2834
|
}
|
|
2672
2835
|
}
|
|
2673
2836
|
|
|
2837
|
+
export interface NewPlanTieredMatrixWithAllocationPrice {
|
|
2838
|
+
/**
|
|
2839
|
+
* The cadence to bill for this price on.
|
|
2840
|
+
*/
|
|
2841
|
+
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
|
|
2842
|
+
|
|
2843
|
+
/**
|
|
2844
|
+
* The id of the item the price will be associated with.
|
|
2845
|
+
*/
|
|
2846
|
+
item_id: string;
|
|
2847
|
+
|
|
2848
|
+
/**
|
|
2849
|
+
* The pricing model type
|
|
2850
|
+
*/
|
|
2851
|
+
model_type: 'tiered_matrix_with_allocation';
|
|
2852
|
+
|
|
2853
|
+
/**
|
|
2854
|
+
* The name of the price.
|
|
2855
|
+
*/
|
|
2856
|
+
name: string;
|
|
2857
|
+
|
|
2858
|
+
/**
|
|
2859
|
+
* Configuration for tiered_matrix_with_allocation pricing
|
|
2860
|
+
*/
|
|
2861
|
+
tiered_matrix_with_allocation_config: NewPlanTieredMatrixWithAllocationPrice.TieredMatrixWithAllocationConfig;
|
|
2862
|
+
|
|
2863
|
+
/**
|
|
2864
|
+
* The id of the billable metric for the price. Only needed if the price is
|
|
2865
|
+
* usage-based.
|
|
2866
|
+
*/
|
|
2867
|
+
billable_metric_id?: string | null;
|
|
2868
|
+
|
|
2869
|
+
/**
|
|
2870
|
+
* If the Price represents a fixed cost, the price will be billed in-advance if
|
|
2871
|
+
* this is true, and in-arrears if this is false.
|
|
2872
|
+
*/
|
|
2873
|
+
billed_in_advance?: boolean | null;
|
|
2874
|
+
|
|
2875
|
+
/**
|
|
2876
|
+
* For custom cadence: specifies the duration of the billing period in days or
|
|
2877
|
+
* months.
|
|
2878
|
+
*/
|
|
2879
|
+
billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
2880
|
+
|
|
2881
|
+
/**
|
|
2882
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
2883
|
+
*/
|
|
2884
|
+
conversion_rate?: number | null;
|
|
2885
|
+
|
|
2886
|
+
/**
|
|
2887
|
+
* The configuration for the rate of the price currency to the invoicing currency.
|
|
2888
|
+
*/
|
|
2889
|
+
conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
|
|
2890
|
+
|
|
2891
|
+
/**
|
|
2892
|
+
* An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
2893
|
+
* price is billed.
|
|
2894
|
+
*/
|
|
2895
|
+
currency?: string | null;
|
|
2896
|
+
|
|
2897
|
+
/**
|
|
2898
|
+
* For dimensional price: specifies a price group and dimension values
|
|
2899
|
+
*/
|
|
2900
|
+
dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
|
|
2901
|
+
|
|
2902
|
+
/**
|
|
2903
|
+
* An alias for the price.
|
|
2904
|
+
*/
|
|
2905
|
+
external_price_id?: string | null;
|
|
2906
|
+
|
|
2907
|
+
/**
|
|
2908
|
+
* If the Price represents a fixed cost, this represents the quantity of units
|
|
2909
|
+
* applied.
|
|
2910
|
+
*/
|
|
2911
|
+
fixed_price_quantity?: number | null;
|
|
2912
|
+
|
|
2913
|
+
/**
|
|
2914
|
+
* The property used to group this price on an invoice
|
|
2915
|
+
*/
|
|
2916
|
+
invoice_grouping_key?: string | null;
|
|
2917
|
+
|
|
2918
|
+
/**
|
|
2919
|
+
* Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
2920
|
+
* If unspecified, a single invoice is produced per billing cycle.
|
|
2921
|
+
*/
|
|
2922
|
+
invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
2923
|
+
|
|
2924
|
+
/**
|
|
2925
|
+
* The ID of the license type to associate with this price. On a usage price this
|
|
2926
|
+
* also marks the price as eligible to draw down from that license type's
|
|
2927
|
+
* allocation; a usage price created without it is billed normally. Usage prices
|
|
2928
|
+
* with a license type must use the `unit` model, and only draw down when their
|
|
2929
|
+
* currency matches the allocation's.
|
|
2930
|
+
*/
|
|
2931
|
+
license_type_id?: string | null;
|
|
2932
|
+
|
|
2933
|
+
/**
|
|
2934
|
+
* User-specified key/value pairs for the resource. Individual keys can be removed
|
|
2935
|
+
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
2936
|
+
* by setting `metadata` to `null`.
|
|
2937
|
+
*/
|
|
2938
|
+
metadata?: { [key: string]: string | null } | null;
|
|
2939
|
+
|
|
2940
|
+
/**
|
|
2941
|
+
* A transient ID that can be used to reference this price when adding adjustments
|
|
2942
|
+
* in the same API call.
|
|
2943
|
+
*/
|
|
2944
|
+
reference_id?: string | null;
|
|
2945
|
+
}
|
|
2946
|
+
|
|
2947
|
+
export namespace NewPlanTieredMatrixWithAllocationPrice {
|
|
2948
|
+
/**
|
|
2949
|
+
* Configuration for tiered_matrix_with_allocation pricing
|
|
2950
|
+
*/
|
|
2951
|
+
export interface TieredMatrixWithAllocationConfig {
|
|
2952
|
+
/**
|
|
2953
|
+
* Usage allocation, pooled across all matrix cells
|
|
2954
|
+
*/
|
|
2955
|
+
allocation: string;
|
|
2956
|
+
|
|
2957
|
+
/**
|
|
2958
|
+
* Per unit rate for usage whose matrix cell has no configured tiers
|
|
2959
|
+
*/
|
|
2960
|
+
default_unit_amount: string;
|
|
2961
|
+
|
|
2962
|
+
/**
|
|
2963
|
+
* One or two event property values to evaluate matrix cells by
|
|
2964
|
+
*/
|
|
2965
|
+
dimensions: Array<string>;
|
|
2966
|
+
|
|
2967
|
+
/**
|
|
2968
|
+
* Graduated tiers keyed by matrix cell; usage in a cell is tiered only against its
|
|
2969
|
+
* own rows
|
|
2970
|
+
*/
|
|
2971
|
+
tiers: Array<TieredMatrixWithAllocationConfig.Tier>;
|
|
2972
|
+
}
|
|
2973
|
+
|
|
2974
|
+
export namespace TieredMatrixWithAllocationConfig {
|
|
2975
|
+
/**
|
|
2976
|
+
* Configuration for a single tier scoped to one matrix cell
|
|
2977
|
+
*/
|
|
2978
|
+
export interface Tier {
|
|
2979
|
+
/**
|
|
2980
|
+
* The matrix cell this tier applies to, as one or two dimension values
|
|
2981
|
+
*/
|
|
2982
|
+
dimension_values: Array<string>;
|
|
2983
|
+
|
|
2984
|
+
/**
|
|
2985
|
+
* Exclusive tier starting value. The tier runs up to and including the next bound
|
|
2986
|
+
* configured for the same matrix cell.
|
|
2987
|
+
*/
|
|
2988
|
+
tier_lower_bound: string;
|
|
2989
|
+
|
|
2990
|
+
/**
|
|
2991
|
+
* Per unit amount
|
|
2992
|
+
*/
|
|
2993
|
+
unit_amount: string;
|
|
2994
|
+
}
|
|
2995
|
+
}
|
|
2996
|
+
}
|
|
2997
|
+
|
|
2674
2998
|
export interface NewPlanMatrixWithThresholdDiscountsPrice {
|
|
2675
2999
|
/**
|
|
2676
3000
|
* The cadence to bill for this price on.
|
|
@@ -229,6 +229,7 @@ export namespace ExternalPlanIDCreatePlanVersionParams {
|
|
|
229
229
|
| Shared.NewPlanPackageWithAllocationPrice
|
|
230
230
|
| Shared.NewPlanUnitWithPercentPrice
|
|
231
231
|
| Shared.NewPlanMatrixWithAllocationPrice
|
|
232
|
+
| AddPrice.NewPlanTieredMatrixWithAllocationPrice
|
|
232
233
|
| AddPrice.NewPlanMatrixWithThresholdDiscountsPrice
|
|
233
234
|
| AddPrice.NewPlanTieredWithProrationPrice
|
|
234
235
|
| Shared.NewPlanUnitWithProrationPrice
|
|
@@ -704,6 +705,167 @@ export namespace ExternalPlanIDCreatePlanVersionParams {
|
|
|
704
705
|
}
|
|
705
706
|
}
|
|
706
707
|
|
|
708
|
+
export interface NewPlanTieredMatrixWithAllocationPrice {
|
|
709
|
+
/**
|
|
710
|
+
* The cadence to bill for this price on.
|
|
711
|
+
*/
|
|
712
|
+
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
|
|
713
|
+
|
|
714
|
+
/**
|
|
715
|
+
* The id of the item the price will be associated with.
|
|
716
|
+
*/
|
|
717
|
+
item_id: string;
|
|
718
|
+
|
|
719
|
+
/**
|
|
720
|
+
* The pricing model type
|
|
721
|
+
*/
|
|
722
|
+
model_type: 'tiered_matrix_with_allocation';
|
|
723
|
+
|
|
724
|
+
/**
|
|
725
|
+
* The name of the price.
|
|
726
|
+
*/
|
|
727
|
+
name: string;
|
|
728
|
+
|
|
729
|
+
/**
|
|
730
|
+
* Configuration for tiered_matrix_with_allocation pricing
|
|
731
|
+
*/
|
|
732
|
+
tiered_matrix_with_allocation_config: NewPlanTieredMatrixWithAllocationPrice.TieredMatrixWithAllocationConfig;
|
|
733
|
+
|
|
734
|
+
/**
|
|
735
|
+
* The id of the billable metric for the price. Only needed if the price is
|
|
736
|
+
* usage-based.
|
|
737
|
+
*/
|
|
738
|
+
billable_metric_id?: string | null;
|
|
739
|
+
|
|
740
|
+
/**
|
|
741
|
+
* If the Price represents a fixed cost, the price will be billed in-advance if
|
|
742
|
+
* this is true, and in-arrears if this is false.
|
|
743
|
+
*/
|
|
744
|
+
billed_in_advance?: boolean | null;
|
|
745
|
+
|
|
746
|
+
/**
|
|
747
|
+
* For custom cadence: specifies the duration of the billing period in days or
|
|
748
|
+
* months.
|
|
749
|
+
*/
|
|
750
|
+
billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
751
|
+
|
|
752
|
+
/**
|
|
753
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
754
|
+
*/
|
|
755
|
+
conversion_rate?: number | null;
|
|
756
|
+
|
|
757
|
+
/**
|
|
758
|
+
* The configuration for the rate of the price currency to the invoicing currency.
|
|
759
|
+
*/
|
|
760
|
+
conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
|
|
761
|
+
|
|
762
|
+
/**
|
|
763
|
+
* An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
764
|
+
* price is billed.
|
|
765
|
+
*/
|
|
766
|
+
currency?: string | null;
|
|
767
|
+
|
|
768
|
+
/**
|
|
769
|
+
* For dimensional price: specifies a price group and dimension values
|
|
770
|
+
*/
|
|
771
|
+
dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
|
|
772
|
+
|
|
773
|
+
/**
|
|
774
|
+
* An alias for the price.
|
|
775
|
+
*/
|
|
776
|
+
external_price_id?: string | null;
|
|
777
|
+
|
|
778
|
+
/**
|
|
779
|
+
* If the Price represents a fixed cost, this represents the quantity of units
|
|
780
|
+
* applied.
|
|
781
|
+
*/
|
|
782
|
+
fixed_price_quantity?: number | null;
|
|
783
|
+
|
|
784
|
+
/**
|
|
785
|
+
* The property used to group this price on an invoice
|
|
786
|
+
*/
|
|
787
|
+
invoice_grouping_key?: string | null;
|
|
788
|
+
|
|
789
|
+
/**
|
|
790
|
+
* Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
791
|
+
* If unspecified, a single invoice is produced per billing cycle.
|
|
792
|
+
*/
|
|
793
|
+
invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
794
|
+
|
|
795
|
+
/**
|
|
796
|
+
* The ID of the license type to associate with this price. On a usage price this
|
|
797
|
+
* also marks the price as eligible to draw down from that license type's
|
|
798
|
+
* allocation; a usage price created without it is billed normally. Usage prices
|
|
799
|
+
* with a license type must use the `unit` model, and only draw down when their
|
|
800
|
+
* currency matches the allocation's.
|
|
801
|
+
*/
|
|
802
|
+
license_type_id?: string | null;
|
|
803
|
+
|
|
804
|
+
/**
|
|
805
|
+
* User-specified key/value pairs for the resource. Individual keys can be removed
|
|
806
|
+
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
807
|
+
* by setting `metadata` to `null`.
|
|
808
|
+
*/
|
|
809
|
+
metadata?: { [key: string]: string | null } | null;
|
|
810
|
+
|
|
811
|
+
/**
|
|
812
|
+
* A transient ID that can be used to reference this price when adding adjustments
|
|
813
|
+
* in the same API call.
|
|
814
|
+
*/
|
|
815
|
+
reference_id?: string | null;
|
|
816
|
+
}
|
|
817
|
+
|
|
818
|
+
export namespace NewPlanTieredMatrixWithAllocationPrice {
|
|
819
|
+
/**
|
|
820
|
+
* Configuration for tiered_matrix_with_allocation pricing
|
|
821
|
+
*/
|
|
822
|
+
export interface TieredMatrixWithAllocationConfig {
|
|
823
|
+
/**
|
|
824
|
+
* Usage allocation, pooled across all matrix cells
|
|
825
|
+
*/
|
|
826
|
+
allocation: string;
|
|
827
|
+
|
|
828
|
+
/**
|
|
829
|
+
* Per unit rate for usage whose matrix cell has no configured tiers
|
|
830
|
+
*/
|
|
831
|
+
default_unit_amount: string;
|
|
832
|
+
|
|
833
|
+
/**
|
|
834
|
+
* One or two event property values to evaluate matrix cells by
|
|
835
|
+
*/
|
|
836
|
+
dimensions: Array<string>;
|
|
837
|
+
|
|
838
|
+
/**
|
|
839
|
+
* Graduated tiers keyed by matrix cell; usage in a cell is tiered only against its
|
|
840
|
+
* own rows
|
|
841
|
+
*/
|
|
842
|
+
tiers: Array<TieredMatrixWithAllocationConfig.Tier>;
|
|
843
|
+
}
|
|
844
|
+
|
|
845
|
+
export namespace TieredMatrixWithAllocationConfig {
|
|
846
|
+
/**
|
|
847
|
+
* Configuration for a single tier scoped to one matrix cell
|
|
848
|
+
*/
|
|
849
|
+
export interface Tier {
|
|
850
|
+
/**
|
|
851
|
+
* The matrix cell this tier applies to, as one or two dimension values
|
|
852
|
+
*/
|
|
853
|
+
dimension_values: Array<string>;
|
|
854
|
+
|
|
855
|
+
/**
|
|
856
|
+
* Exclusive tier starting value. The tier runs up to and including the next bound
|
|
857
|
+
* configured for the same matrix cell.
|
|
858
|
+
*/
|
|
859
|
+
tier_lower_bound: string;
|
|
860
|
+
|
|
861
|
+
/**
|
|
862
|
+
* Per unit amount
|
|
863
|
+
*/
|
|
864
|
+
unit_amount: string;
|
|
865
|
+
}
|
|
866
|
+
}
|
|
867
|
+
}
|
|
868
|
+
|
|
707
869
|
export interface NewPlanMatrixWithThresholdDiscountsPrice {
|
|
708
870
|
/**
|
|
709
871
|
* The cadence to bill for this price on.
|
|
@@ -2048,6 +2210,7 @@ export namespace ExternalPlanIDCreatePlanVersionParams {
|
|
|
2048
2210
|
| Shared.NewPlanPackageWithAllocationPrice
|
|
2049
2211
|
| Shared.NewPlanUnitWithPercentPrice
|
|
2050
2212
|
| Shared.NewPlanMatrixWithAllocationPrice
|
|
2213
|
+
| ReplacePrice.NewPlanTieredMatrixWithAllocationPrice
|
|
2051
2214
|
| ReplacePrice.NewPlanMatrixWithThresholdDiscountsPrice
|
|
2052
2215
|
| ReplacePrice.NewPlanTieredWithProrationPrice
|
|
2053
2216
|
| Shared.NewPlanUnitWithProrationPrice
|
|
@@ -2523,6 +2686,167 @@ export namespace ExternalPlanIDCreatePlanVersionParams {
|
|
|
2523
2686
|
}
|
|
2524
2687
|
}
|
|
2525
2688
|
|
|
2689
|
+
export interface NewPlanTieredMatrixWithAllocationPrice {
|
|
2690
|
+
/**
|
|
2691
|
+
* The cadence to bill for this price on.
|
|
2692
|
+
*/
|
|
2693
|
+
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
|
|
2694
|
+
|
|
2695
|
+
/**
|
|
2696
|
+
* The id of the item the price will be associated with.
|
|
2697
|
+
*/
|
|
2698
|
+
item_id: string;
|
|
2699
|
+
|
|
2700
|
+
/**
|
|
2701
|
+
* The pricing model type
|
|
2702
|
+
*/
|
|
2703
|
+
model_type: 'tiered_matrix_with_allocation';
|
|
2704
|
+
|
|
2705
|
+
/**
|
|
2706
|
+
* The name of the price.
|
|
2707
|
+
*/
|
|
2708
|
+
name: string;
|
|
2709
|
+
|
|
2710
|
+
/**
|
|
2711
|
+
* Configuration for tiered_matrix_with_allocation pricing
|
|
2712
|
+
*/
|
|
2713
|
+
tiered_matrix_with_allocation_config: NewPlanTieredMatrixWithAllocationPrice.TieredMatrixWithAllocationConfig;
|
|
2714
|
+
|
|
2715
|
+
/**
|
|
2716
|
+
* The id of the billable metric for the price. Only needed if the price is
|
|
2717
|
+
* usage-based.
|
|
2718
|
+
*/
|
|
2719
|
+
billable_metric_id?: string | null;
|
|
2720
|
+
|
|
2721
|
+
/**
|
|
2722
|
+
* If the Price represents a fixed cost, the price will be billed in-advance if
|
|
2723
|
+
* this is true, and in-arrears if this is false.
|
|
2724
|
+
*/
|
|
2725
|
+
billed_in_advance?: boolean | null;
|
|
2726
|
+
|
|
2727
|
+
/**
|
|
2728
|
+
* For custom cadence: specifies the duration of the billing period in days or
|
|
2729
|
+
* months.
|
|
2730
|
+
*/
|
|
2731
|
+
billing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
2732
|
+
|
|
2733
|
+
/**
|
|
2734
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
2735
|
+
*/
|
|
2736
|
+
conversion_rate?: number | null;
|
|
2737
|
+
|
|
2738
|
+
/**
|
|
2739
|
+
* The configuration for the rate of the price currency to the invoicing currency.
|
|
2740
|
+
*/
|
|
2741
|
+
conversion_rate_config?: Shared.UnitConversionRateConfig | Shared.TieredConversionRateConfig | null;
|
|
2742
|
+
|
|
2743
|
+
/**
|
|
2744
|
+
* An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
2745
|
+
* price is billed.
|
|
2746
|
+
*/
|
|
2747
|
+
currency?: string | null;
|
|
2748
|
+
|
|
2749
|
+
/**
|
|
2750
|
+
* For dimensional price: specifies a price group and dimension values
|
|
2751
|
+
*/
|
|
2752
|
+
dimensional_price_configuration?: Shared.NewDimensionalPriceConfiguration | null;
|
|
2753
|
+
|
|
2754
|
+
/**
|
|
2755
|
+
* An alias for the price.
|
|
2756
|
+
*/
|
|
2757
|
+
external_price_id?: string | null;
|
|
2758
|
+
|
|
2759
|
+
/**
|
|
2760
|
+
* If the Price represents a fixed cost, this represents the quantity of units
|
|
2761
|
+
* applied.
|
|
2762
|
+
*/
|
|
2763
|
+
fixed_price_quantity?: number | null;
|
|
2764
|
+
|
|
2765
|
+
/**
|
|
2766
|
+
* The property used to group this price on an invoice
|
|
2767
|
+
*/
|
|
2768
|
+
invoice_grouping_key?: string | null;
|
|
2769
|
+
|
|
2770
|
+
/**
|
|
2771
|
+
* Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
2772
|
+
* If unspecified, a single invoice is produced per billing cycle.
|
|
2773
|
+
*/
|
|
2774
|
+
invoicing_cycle_configuration?: Shared.NewBillingCycleConfiguration | null;
|
|
2775
|
+
|
|
2776
|
+
/**
|
|
2777
|
+
* The ID of the license type to associate with this price. On a usage price this
|
|
2778
|
+
* also marks the price as eligible to draw down from that license type's
|
|
2779
|
+
* allocation; a usage price created without it is billed normally. Usage prices
|
|
2780
|
+
* with a license type must use the `unit` model, and only draw down when their
|
|
2781
|
+
* currency matches the allocation's.
|
|
2782
|
+
*/
|
|
2783
|
+
license_type_id?: string | null;
|
|
2784
|
+
|
|
2785
|
+
/**
|
|
2786
|
+
* User-specified key/value pairs for the resource. Individual keys can be removed
|
|
2787
|
+
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
2788
|
+
* by setting `metadata` to `null`.
|
|
2789
|
+
*/
|
|
2790
|
+
metadata?: { [key: string]: string | null } | null;
|
|
2791
|
+
|
|
2792
|
+
/**
|
|
2793
|
+
* A transient ID that can be used to reference this price when adding adjustments
|
|
2794
|
+
* in the same API call.
|
|
2795
|
+
*/
|
|
2796
|
+
reference_id?: string | null;
|
|
2797
|
+
}
|
|
2798
|
+
|
|
2799
|
+
export namespace NewPlanTieredMatrixWithAllocationPrice {
|
|
2800
|
+
/**
|
|
2801
|
+
* Configuration for tiered_matrix_with_allocation pricing
|
|
2802
|
+
*/
|
|
2803
|
+
export interface TieredMatrixWithAllocationConfig {
|
|
2804
|
+
/**
|
|
2805
|
+
* Usage allocation, pooled across all matrix cells
|
|
2806
|
+
*/
|
|
2807
|
+
allocation: string;
|
|
2808
|
+
|
|
2809
|
+
/**
|
|
2810
|
+
* Per unit rate for usage whose matrix cell has no configured tiers
|
|
2811
|
+
*/
|
|
2812
|
+
default_unit_amount: string;
|
|
2813
|
+
|
|
2814
|
+
/**
|
|
2815
|
+
* One or two event property values to evaluate matrix cells by
|
|
2816
|
+
*/
|
|
2817
|
+
dimensions: Array<string>;
|
|
2818
|
+
|
|
2819
|
+
/**
|
|
2820
|
+
* Graduated tiers keyed by matrix cell; usage in a cell is tiered only against its
|
|
2821
|
+
* own rows
|
|
2822
|
+
*/
|
|
2823
|
+
tiers: Array<TieredMatrixWithAllocationConfig.Tier>;
|
|
2824
|
+
}
|
|
2825
|
+
|
|
2826
|
+
export namespace TieredMatrixWithAllocationConfig {
|
|
2827
|
+
/**
|
|
2828
|
+
* Configuration for a single tier scoped to one matrix cell
|
|
2829
|
+
*/
|
|
2830
|
+
export interface Tier {
|
|
2831
|
+
/**
|
|
2832
|
+
* The matrix cell this tier applies to, as one or two dimension values
|
|
2833
|
+
*/
|
|
2834
|
+
dimension_values: Array<string>;
|
|
2835
|
+
|
|
2836
|
+
/**
|
|
2837
|
+
* Exclusive tier starting value. The tier runs up to and including the next bound
|
|
2838
|
+
* configured for the same matrix cell.
|
|
2839
|
+
*/
|
|
2840
|
+
tier_lower_bound: string;
|
|
2841
|
+
|
|
2842
|
+
/**
|
|
2843
|
+
* Per unit amount
|
|
2844
|
+
*/
|
|
2845
|
+
unit_amount: string;
|
|
2846
|
+
}
|
|
2847
|
+
}
|
|
2848
|
+
}
|
|
2849
|
+
|
|
2526
2850
|
export interface NewPlanMatrixWithThresholdDiscountsPrice {
|
|
2527
2851
|
/**
|
|
2528
2852
|
* The cadence to bill for this price on.
|