orb-billing 4.13.0 → 4.15.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 +16 -0
- package/package.json +1 -1
- package/resources/plans/plans.d.ts +95 -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.ts +169 -2
- 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/subscriptions.d.ts +263 -4
- package/resources/subscriptions.d.ts.map +1 -1
- package/resources/subscriptions.js.map +1 -1
- package/resources/subscriptions.mjs.map +1 -1
- package/src/resources/plans/plans.ts +114 -0
- package/src/resources/prices/prices.ts +224 -0
- package/src/resources/subscriptions.ts +315 -1
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -1898,12 +1898,26 @@ export declare namespace SubscriptionFetchScheduleResponse {
|
|
|
1898
1898
|
}
|
|
1899
1899
|
export interface SubscriptionCreateParams {
|
|
1900
1900
|
align_billing_with_subscription_start_date?: boolean;
|
|
1901
|
+
/**
|
|
1902
|
+
* Determines whether issued invoices for this subscription will automatically be
|
|
1903
|
+
* charged with the saved payment method on the due date. If not specified, this
|
|
1904
|
+
* defaults to the behavior configured for this customer.
|
|
1905
|
+
*/
|
|
1901
1906
|
auto_collection?: boolean | null;
|
|
1902
1907
|
aws_region?: string | null;
|
|
1903
1908
|
billing_cycle_anchor_configuration?: SubscriptionCreateParams.BillingCycleAnchorConfiguration | null;
|
|
1909
|
+
/**
|
|
1910
|
+
* Redemption code to be used for this subscription. If the coupon cannot be found
|
|
1911
|
+
* by its redemption code, or cannot be redeemed, an error response will be
|
|
1912
|
+
* returned and the subscription creation or plan change will not be scheduled.
|
|
1913
|
+
*/
|
|
1904
1914
|
coupon_redemption_code?: string | null;
|
|
1905
1915
|
credits_overage_rate?: number | null;
|
|
1906
1916
|
customer_id?: string | null;
|
|
1917
|
+
/**
|
|
1918
|
+
* Determines the default memo on this subscription's invoices. Note that if this
|
|
1919
|
+
* is not provided, it is determined by the plan configuration.
|
|
1920
|
+
*/
|
|
1907
1921
|
default_invoice_memo?: string | null;
|
|
1908
1922
|
end_date?: string | null;
|
|
1909
1923
|
external_customer_id?: string | null;
|
|
@@ -1914,7 +1928,15 @@ export interface SubscriptionCreateParams {
|
|
|
1914
1928
|
* to. Note that either this property or `plan_id` must be specified.
|
|
1915
1929
|
*/
|
|
1916
1930
|
external_plan_id?: string | null;
|
|
1931
|
+
/**
|
|
1932
|
+
* The phase of the plan to start with
|
|
1933
|
+
*/
|
|
1917
1934
|
initial_phase_order?: number | null;
|
|
1935
|
+
/**
|
|
1936
|
+
* When this subscription's accrued usage reaches this threshold, an invoice will
|
|
1937
|
+
* be issued for the subscription. If not specified, invoices will only be issued
|
|
1938
|
+
* at the end of the billing period.
|
|
1939
|
+
*/
|
|
1918
1940
|
invoicing_threshold?: string | null;
|
|
1919
1941
|
/**
|
|
1920
1942
|
* User-specified key/value pairs for the resource. Individual keys can be removed
|
|
@@ -1922,6 +1944,11 @@ export interface SubscriptionCreateParams {
|
|
|
1922
1944
|
* by setting `metadata` to `null`.
|
|
1923
1945
|
*/
|
|
1924
1946
|
metadata?: Record<string, string | null> | null;
|
|
1947
|
+
/**
|
|
1948
|
+
* The net terms determines the difference between the invoice date and the issue
|
|
1949
|
+
* date for the invoice. If you intend the invoice to be due on issue, set this
|
|
1950
|
+
* to 0. If not provided, this defaults to the value specified in the plan.
|
|
1951
|
+
*/
|
|
1925
1952
|
net_terms?: number | null;
|
|
1926
1953
|
per_credit_overage_amount?: number | null;
|
|
1927
1954
|
/**
|
|
@@ -1932,7 +1959,7 @@ export interface SubscriptionCreateParams {
|
|
|
1932
1959
|
/**
|
|
1933
1960
|
* Optionally provide a list of overrides for prices on the plan
|
|
1934
1961
|
*/
|
|
1935
|
-
price_overrides?: Array<SubscriptionCreateParams.OverrideUnitPrice | SubscriptionCreateParams.OverridePackagePrice | SubscriptionCreateParams.OverrideMatrixPrice | SubscriptionCreateParams.OverrideTieredPrice | SubscriptionCreateParams.OverrideTieredBpsPrice | SubscriptionCreateParams.OverrideBpsPrice | SubscriptionCreateParams.OverrideBulkBpsPrice | SubscriptionCreateParams.OverrideBulkPrice | SubscriptionCreateParams.OverrideThresholdTotalAmountPrice | SubscriptionCreateParams.OverrideTieredPackagePrice | SubscriptionCreateParams.OverrideTieredWithMinimumPrice | SubscriptionCreateParams.OverridePackageWithAllocationPrice | SubscriptionCreateParams.OverrideUnitWithPercentPrice | SubscriptionCreateParams.OverrideGroupedAllocationPrice | SubscriptionCreateParams.OverrideBulkWithProrationPrice> | null;
|
|
1962
|
+
price_overrides?: Array<SubscriptionCreateParams.OverrideUnitPrice | SubscriptionCreateParams.OverridePackagePrice | SubscriptionCreateParams.OverrideMatrixPrice | SubscriptionCreateParams.OverrideTieredPrice | SubscriptionCreateParams.OverrideTieredBpsPrice | SubscriptionCreateParams.OverrideBpsPrice | SubscriptionCreateParams.OverrideBulkBpsPrice | SubscriptionCreateParams.OverrideBulkPrice | SubscriptionCreateParams.OverrideThresholdTotalAmountPrice | SubscriptionCreateParams.OverrideTieredPackagePrice | SubscriptionCreateParams.OverrideTieredWithMinimumPrice | SubscriptionCreateParams.OverridePackageWithAllocationPrice | SubscriptionCreateParams.OverrideUnitWithPercentPrice | SubscriptionCreateParams.OverrideGroupedAllocationPrice | SubscriptionCreateParams.OverrideGroupedWithProratedMinimumPrice | SubscriptionCreateParams.OverrideBulkWithProrationPrice> | null;
|
|
1936
1963
|
start_date?: string | null;
|
|
1937
1964
|
}
|
|
1938
1965
|
export declare namespace SubscriptionCreateParams {
|
|
@@ -2955,6 +2982,67 @@ export declare namespace SubscriptionCreateParams {
|
|
|
2955
2982
|
usage_discount?: number | null;
|
|
2956
2983
|
}
|
|
2957
2984
|
}
|
|
2985
|
+
interface OverrideGroupedWithProratedMinimumPrice {
|
|
2986
|
+
id: string;
|
|
2987
|
+
grouped_with_prorated_minimum_config: Record<string, unknown>;
|
|
2988
|
+
model_type: 'grouped_with_prorated_minimum';
|
|
2989
|
+
/**
|
|
2990
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
2991
|
+
*/
|
|
2992
|
+
conversion_rate?: number | null;
|
|
2993
|
+
/**
|
|
2994
|
+
* The currency of the price. If not provided, the currency of the plan will be
|
|
2995
|
+
* used.
|
|
2996
|
+
*/
|
|
2997
|
+
currency?: string | null;
|
|
2998
|
+
/**
|
|
2999
|
+
* The subscription's override discount for the plan.
|
|
3000
|
+
*/
|
|
3001
|
+
discount?: OverrideGroupedWithProratedMinimumPrice.Discount | null;
|
|
3002
|
+
/**
|
|
3003
|
+
* The starting quantity of the price, if the price is a fixed price.
|
|
3004
|
+
*/
|
|
3005
|
+
fixed_price_quantity?: number | null;
|
|
3006
|
+
/**
|
|
3007
|
+
* The subscription's override maximum amount for the plan.
|
|
3008
|
+
*/
|
|
3009
|
+
maximum_amount?: string | null;
|
|
3010
|
+
/**
|
|
3011
|
+
* The subscription's override minimum amount for the plan.
|
|
3012
|
+
*/
|
|
3013
|
+
minimum_amount?: string | null;
|
|
3014
|
+
}
|
|
3015
|
+
namespace OverrideGroupedWithProratedMinimumPrice {
|
|
3016
|
+
/**
|
|
3017
|
+
* The subscription's override discount for the plan.
|
|
3018
|
+
*/
|
|
3019
|
+
interface Discount {
|
|
3020
|
+
discount_type: 'percentage' | 'trial' | 'usage' | 'amount';
|
|
3021
|
+
/**
|
|
3022
|
+
* Only available if discount_type is `amount`.
|
|
3023
|
+
*/
|
|
3024
|
+
amount_discount?: string | null;
|
|
3025
|
+
/**
|
|
3026
|
+
* List of price_ids that this discount applies to. For plan/plan phase discounts,
|
|
3027
|
+
* this can be a subset of prices.
|
|
3028
|
+
*/
|
|
3029
|
+
applies_to_price_ids?: Array<string> | null;
|
|
3030
|
+
/**
|
|
3031
|
+
* Only available if discount_type is `percentage`. This is a number between 0
|
|
3032
|
+
* and 1.
|
|
3033
|
+
*/
|
|
3034
|
+
percentage_discount?: number | null;
|
|
3035
|
+
/**
|
|
3036
|
+
* Only available if discount_type is `trial`
|
|
3037
|
+
*/
|
|
3038
|
+
trial_amount_discount?: string | null;
|
|
3039
|
+
/**
|
|
3040
|
+
* Only available if discount_type is `usage`. Number of usage units that this
|
|
3041
|
+
* discount is for
|
|
3042
|
+
*/
|
|
3043
|
+
usage_discount?: number | null;
|
|
3044
|
+
}
|
|
3045
|
+
}
|
|
2958
3046
|
interface OverrideBulkWithProrationPrice {
|
|
2959
3047
|
id: string;
|
|
2960
3048
|
bulk_with_proration_config: Record<string, unknown>;
|
|
@@ -3190,7 +3278,7 @@ export declare namespace SubscriptionPriceIntervalsParams {
|
|
|
3190
3278
|
/**
|
|
3191
3279
|
* The definition of a new price to create and add to the subscription.
|
|
3192
3280
|
*/
|
|
3193
|
-
price?: Add.NewFloatingUnitPrice | Add.NewFloatingPackagePrice | Add.NewFloatingMatrixPrice | Add.NewFloatingMatrixWithAllocationPrice | Add.NewFloatingTieredPrice | Add.NewFloatingTieredBpsPrice | Add.NewFloatingBpsPrice | Add.NewFloatingBulkBpsPrice | Add.NewFloatingBulkPrice | Add.NewFloatingThresholdTotalAmountPrice | Add.NewFloatingTieredPackagePrice | Add.NewFloatingGroupedTieredPrice | Add.NewFloatingTieredWithMinimumPrice | Add.NewFloatingPackageWithAllocationPrice | Add.NewFloatingTieredPackageWithMinimumPrice | Add.NewFloatingUnitWithPercentPrice | Add.NewFloatingTieredWithProrationPrice | Add.NewFloatingUnitWithProrationPrice | Add.NewFloatingGroupedAllocationPrice | Add.NewFloatingBulkWithProrationPrice | null;
|
|
3281
|
+
price?: Add.NewFloatingUnitPrice | Add.NewFloatingPackagePrice | Add.NewFloatingMatrixPrice | Add.NewFloatingMatrixWithAllocationPrice | Add.NewFloatingTieredPrice | Add.NewFloatingTieredBpsPrice | Add.NewFloatingBpsPrice | Add.NewFloatingBulkBpsPrice | Add.NewFloatingBulkPrice | Add.NewFloatingThresholdTotalAmountPrice | Add.NewFloatingTieredPackagePrice | Add.NewFloatingGroupedTieredPrice | Add.NewFloatingTieredWithMinimumPrice | Add.NewFloatingPackageWithAllocationPrice | Add.NewFloatingTieredPackageWithMinimumPrice | Add.NewFloatingUnitWithPercentPrice | Add.NewFloatingTieredWithProrationPrice | Add.NewFloatingUnitWithProrationPrice | Add.NewFloatingGroupedAllocationPrice | Add.NewFloatingGroupedWithProratedMinimumPrice | Add.NewFloatingBulkWithProrationPrice | null;
|
|
3194
3282
|
/**
|
|
3195
3283
|
* The id of the price to add to the subscription.
|
|
3196
3284
|
*/
|
|
@@ -5197,6 +5285,99 @@ export declare namespace SubscriptionPriceIntervalsParams {
|
|
|
5197
5285
|
duration_unit: 'day' | 'month';
|
|
5198
5286
|
}
|
|
5199
5287
|
}
|
|
5288
|
+
interface NewFloatingGroupedWithProratedMinimumPrice {
|
|
5289
|
+
/**
|
|
5290
|
+
* The cadence to bill for this price on.
|
|
5291
|
+
*/
|
|
5292
|
+
cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom';
|
|
5293
|
+
/**
|
|
5294
|
+
* An ISO 4217 currency string for which this price is billed in.
|
|
5295
|
+
*/
|
|
5296
|
+
currency: string;
|
|
5297
|
+
grouped_with_prorated_minimum_config: Record<string, unknown>;
|
|
5298
|
+
/**
|
|
5299
|
+
* The id of the item the plan will be associated with.
|
|
5300
|
+
*/
|
|
5301
|
+
item_id: string;
|
|
5302
|
+
model_type: 'grouped_with_prorated_minimum';
|
|
5303
|
+
/**
|
|
5304
|
+
* The name of the price.
|
|
5305
|
+
*/
|
|
5306
|
+
name: string;
|
|
5307
|
+
/**
|
|
5308
|
+
* The id of the billable metric for the price. Only needed if the price is
|
|
5309
|
+
* usage-based.
|
|
5310
|
+
*/
|
|
5311
|
+
billable_metric_id?: string | null;
|
|
5312
|
+
/**
|
|
5313
|
+
* If the Price represents a fixed cost, the price will be billed in-advance if
|
|
5314
|
+
* this is true, and in-arrears if this is false.
|
|
5315
|
+
*/
|
|
5316
|
+
billed_in_advance?: boolean | null;
|
|
5317
|
+
/**
|
|
5318
|
+
* For custom cadence: specifies the duration of the billing period in days or
|
|
5319
|
+
* months.
|
|
5320
|
+
*/
|
|
5321
|
+
billing_cycle_configuration?: NewFloatingGroupedWithProratedMinimumPrice.BillingCycleConfiguration | null;
|
|
5322
|
+
/**
|
|
5323
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
5324
|
+
*/
|
|
5325
|
+
conversion_rate?: number | null;
|
|
5326
|
+
/**
|
|
5327
|
+
* An alias for the price.
|
|
5328
|
+
*/
|
|
5329
|
+
external_price_id?: string | null;
|
|
5330
|
+
/**
|
|
5331
|
+
* If the Price represents a fixed cost, this represents the quantity of units
|
|
5332
|
+
* applied.
|
|
5333
|
+
*/
|
|
5334
|
+
fixed_price_quantity?: number | null;
|
|
5335
|
+
/**
|
|
5336
|
+
* The property used to group this price on an invoice
|
|
5337
|
+
*/
|
|
5338
|
+
invoice_grouping_key?: string | null;
|
|
5339
|
+
/**
|
|
5340
|
+
* Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
5341
|
+
* If unspecified, a single invoice is produced per billing cycle.
|
|
5342
|
+
*/
|
|
5343
|
+
invoicing_cycle_configuration?: NewFloatingGroupedWithProratedMinimumPrice.InvoicingCycleConfiguration | null;
|
|
5344
|
+
/**
|
|
5345
|
+
* User-specified key/value pairs for the resource. Individual keys can be removed
|
|
5346
|
+
* by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
5347
|
+
* by setting `metadata` to `null`.
|
|
5348
|
+
*/
|
|
5349
|
+
metadata?: Record<string, string | null> | null;
|
|
5350
|
+
}
|
|
5351
|
+
namespace NewFloatingGroupedWithProratedMinimumPrice {
|
|
5352
|
+
/**
|
|
5353
|
+
* For custom cadence: specifies the duration of the billing period in days or
|
|
5354
|
+
* months.
|
|
5355
|
+
*/
|
|
5356
|
+
interface BillingCycleConfiguration {
|
|
5357
|
+
/**
|
|
5358
|
+
* The duration of the billing period.
|
|
5359
|
+
*/
|
|
5360
|
+
duration: number;
|
|
5361
|
+
/**
|
|
5362
|
+
* The unit of billing period duration.
|
|
5363
|
+
*/
|
|
5364
|
+
duration_unit: 'day' | 'month';
|
|
5365
|
+
}
|
|
5366
|
+
/**
|
|
5367
|
+
* Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
5368
|
+
* If unspecified, a single invoice is produced per billing cycle.
|
|
5369
|
+
*/
|
|
5370
|
+
interface InvoicingCycleConfiguration {
|
|
5371
|
+
/**
|
|
5372
|
+
* The duration of the billing period.
|
|
5373
|
+
*/
|
|
5374
|
+
duration: number;
|
|
5375
|
+
/**
|
|
5376
|
+
* The unit of billing period duration.
|
|
5377
|
+
*/
|
|
5378
|
+
duration_unit: 'day' | 'month';
|
|
5379
|
+
}
|
|
5380
|
+
}
|
|
5200
5381
|
interface NewFloatingBulkWithProrationPrice {
|
|
5201
5382
|
bulk_with_proration_config: Record<string, unknown>;
|
|
5202
5383
|
/**
|
|
@@ -5409,6 +5590,12 @@ export interface SubscriptionSchedulePlanChangeParams {
|
|
|
5409
5590
|
* aligned with the plan change's effective date.
|
|
5410
5591
|
*/
|
|
5411
5592
|
align_billing_with_plan_change_date?: boolean | null;
|
|
5593
|
+
/**
|
|
5594
|
+
* Determines whether issued invoices for this subscription will automatically be
|
|
5595
|
+
* charged with the saved payment method on the due date. If not specified, this
|
|
5596
|
+
* defaults to the behavior configured for this customer.
|
|
5597
|
+
*/
|
|
5598
|
+
auto_collection?: boolean | null;
|
|
5412
5599
|
/**
|
|
5413
5600
|
* Reset billing periods to be aligned with the plan change's effective date or
|
|
5414
5601
|
* start of the month. Defaults to `unchanged` which keeps subscription's existing
|
|
@@ -5423,10 +5610,15 @@ export interface SubscriptionSchedulePlanChangeParams {
|
|
|
5423
5610
|
/**
|
|
5424
5611
|
* Redemption code to be used for this subscription. If the coupon cannot be found
|
|
5425
5612
|
* by its redemption code, or cannot be redeemed, an error response will be
|
|
5426
|
-
* returned and the plan change will not be scheduled.
|
|
5613
|
+
* returned and the subscription creation or plan change will not be scheduled.
|
|
5427
5614
|
*/
|
|
5428
5615
|
coupon_redemption_code?: string | null;
|
|
5429
5616
|
credits_overage_rate?: number | null;
|
|
5617
|
+
/**
|
|
5618
|
+
* Determines the default memo on this subscription's invoices. Note that if this
|
|
5619
|
+
* is not provided, it is determined by the plan configuration.
|
|
5620
|
+
*/
|
|
5621
|
+
default_invoice_memo?: string | null;
|
|
5430
5622
|
/**
|
|
5431
5623
|
* The external_plan_id of the plan that the given subscription should be switched
|
|
5432
5624
|
* to. Note that either this property or `plan_id` must be specified.
|
|
@@ -5442,6 +5634,12 @@ export interface SubscriptionSchedulePlanChangeParams {
|
|
|
5442
5634
|
* at the end of the billing period.
|
|
5443
5635
|
*/
|
|
5444
5636
|
invoicing_threshold?: string | null;
|
|
5637
|
+
/**
|
|
5638
|
+
* The net terms determines the difference between the invoice date and the issue
|
|
5639
|
+
* date for the invoice. If you intend the invoice to be due on issue, set this
|
|
5640
|
+
* to 0. If not provided, this defaults to the value specified in the plan.
|
|
5641
|
+
*/
|
|
5642
|
+
net_terms?: number | null;
|
|
5445
5643
|
per_credit_overage_amount?: number | null;
|
|
5446
5644
|
/**
|
|
5447
5645
|
* The plan that the given subscription should be switched to. Note that either
|
|
@@ -5451,7 +5649,7 @@ export interface SubscriptionSchedulePlanChangeParams {
|
|
|
5451
5649
|
/**
|
|
5452
5650
|
* Optionally provide a list of overrides for prices on the plan
|
|
5453
5651
|
*/
|
|
5454
|
-
price_overrides?: Array<SubscriptionSchedulePlanChangeParams.OverrideUnitPrice | SubscriptionSchedulePlanChangeParams.OverridePackagePrice | SubscriptionSchedulePlanChangeParams.OverrideMatrixPrice | SubscriptionSchedulePlanChangeParams.OverrideTieredPrice | SubscriptionSchedulePlanChangeParams.OverrideTieredBpsPrice | SubscriptionSchedulePlanChangeParams.OverrideBpsPrice | SubscriptionSchedulePlanChangeParams.OverrideBulkBpsPrice | SubscriptionSchedulePlanChangeParams.OverrideBulkPrice | SubscriptionSchedulePlanChangeParams.OverrideThresholdTotalAmountPrice | SubscriptionSchedulePlanChangeParams.OverrideTieredPackagePrice | SubscriptionSchedulePlanChangeParams.OverrideTieredWithMinimumPrice | SubscriptionSchedulePlanChangeParams.OverridePackageWithAllocationPrice | SubscriptionSchedulePlanChangeParams.OverrideUnitWithPercentPrice | SubscriptionSchedulePlanChangeParams.OverrideGroupedAllocationPrice | SubscriptionSchedulePlanChangeParams.OverrideBulkWithProrationPrice> | null;
|
|
5652
|
+
price_overrides?: Array<SubscriptionSchedulePlanChangeParams.OverrideUnitPrice | SubscriptionSchedulePlanChangeParams.OverridePackagePrice | SubscriptionSchedulePlanChangeParams.OverrideMatrixPrice | SubscriptionSchedulePlanChangeParams.OverrideTieredPrice | SubscriptionSchedulePlanChangeParams.OverrideTieredBpsPrice | SubscriptionSchedulePlanChangeParams.OverrideBpsPrice | SubscriptionSchedulePlanChangeParams.OverrideBulkBpsPrice | SubscriptionSchedulePlanChangeParams.OverrideBulkPrice | SubscriptionSchedulePlanChangeParams.OverrideThresholdTotalAmountPrice | SubscriptionSchedulePlanChangeParams.OverrideTieredPackagePrice | SubscriptionSchedulePlanChangeParams.OverrideTieredWithMinimumPrice | SubscriptionSchedulePlanChangeParams.OverridePackageWithAllocationPrice | SubscriptionSchedulePlanChangeParams.OverrideUnitWithPercentPrice | SubscriptionSchedulePlanChangeParams.OverrideGroupedAllocationPrice | SubscriptionSchedulePlanChangeParams.OverrideGroupedWithProratedMinimumPrice | SubscriptionSchedulePlanChangeParams.OverrideBulkWithProrationPrice> | null;
|
|
5455
5653
|
}
|
|
5456
5654
|
export declare namespace SubscriptionSchedulePlanChangeParams {
|
|
5457
5655
|
interface OverrideUnitPrice {
|
|
@@ -6453,6 +6651,67 @@ export declare namespace SubscriptionSchedulePlanChangeParams {
|
|
|
6453
6651
|
usage_discount?: number | null;
|
|
6454
6652
|
}
|
|
6455
6653
|
}
|
|
6654
|
+
interface OverrideGroupedWithProratedMinimumPrice {
|
|
6655
|
+
id: string;
|
|
6656
|
+
grouped_with_prorated_minimum_config: Record<string, unknown>;
|
|
6657
|
+
model_type: 'grouped_with_prorated_minimum';
|
|
6658
|
+
/**
|
|
6659
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
6660
|
+
*/
|
|
6661
|
+
conversion_rate?: number | null;
|
|
6662
|
+
/**
|
|
6663
|
+
* The currency of the price. If not provided, the currency of the plan will be
|
|
6664
|
+
* used.
|
|
6665
|
+
*/
|
|
6666
|
+
currency?: string | null;
|
|
6667
|
+
/**
|
|
6668
|
+
* The subscription's override discount for the plan.
|
|
6669
|
+
*/
|
|
6670
|
+
discount?: OverrideGroupedWithProratedMinimumPrice.Discount | null;
|
|
6671
|
+
/**
|
|
6672
|
+
* The starting quantity of the price, if the price is a fixed price.
|
|
6673
|
+
*/
|
|
6674
|
+
fixed_price_quantity?: number | null;
|
|
6675
|
+
/**
|
|
6676
|
+
* The subscription's override maximum amount for the plan.
|
|
6677
|
+
*/
|
|
6678
|
+
maximum_amount?: string | null;
|
|
6679
|
+
/**
|
|
6680
|
+
* The subscription's override minimum amount for the plan.
|
|
6681
|
+
*/
|
|
6682
|
+
minimum_amount?: string | null;
|
|
6683
|
+
}
|
|
6684
|
+
namespace OverrideGroupedWithProratedMinimumPrice {
|
|
6685
|
+
/**
|
|
6686
|
+
* The subscription's override discount for the plan.
|
|
6687
|
+
*/
|
|
6688
|
+
interface Discount {
|
|
6689
|
+
discount_type: 'percentage' | 'trial' | 'usage' | 'amount';
|
|
6690
|
+
/**
|
|
6691
|
+
* Only available if discount_type is `amount`.
|
|
6692
|
+
*/
|
|
6693
|
+
amount_discount?: string | null;
|
|
6694
|
+
/**
|
|
6695
|
+
* List of price_ids that this discount applies to. For plan/plan phase discounts,
|
|
6696
|
+
* this can be a subset of prices.
|
|
6697
|
+
*/
|
|
6698
|
+
applies_to_price_ids?: Array<string> | null;
|
|
6699
|
+
/**
|
|
6700
|
+
* Only available if discount_type is `percentage`. This is a number between 0
|
|
6701
|
+
* and 1.
|
|
6702
|
+
*/
|
|
6703
|
+
percentage_discount?: number | null;
|
|
6704
|
+
/**
|
|
6705
|
+
* Only available if discount_type is `trial`
|
|
6706
|
+
*/
|
|
6707
|
+
trial_amount_discount?: string | null;
|
|
6708
|
+
/**
|
|
6709
|
+
* Only available if discount_type is `usage`. Number of usage units that this
|
|
6710
|
+
* discount is for
|
|
6711
|
+
*/
|
|
6712
|
+
usage_discount?: number | null;
|
|
6713
|
+
}
|
|
6714
|
+
}
|
|
6456
6715
|
interface OverrideBulkWithProrationPrice {
|
|
6457
6716
|
id: string;
|
|
6458
6717
|
bulk_with_proration_config: Record<string, unknown>;
|