orb-billing 4.29.0 → 4.31.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.
@@ -878,6 +878,27 @@ export declare class Subscriptions extends APIResource {
878
878
  * for the difference for the remainder of the billing period.
879
879
  */
880
880
  updateFixedFeeQuantity(subscriptionId: string, body: SubscriptionUpdateFixedFeeQuantityParams, options?: Core.RequestOptions): Core.APIPromise<Subscription>;
881
+ /**
882
+ * This endpoint is used to update the trial end date for a subscription. The new
883
+ * trial end date must be within the time range of the current plan (i.e. the new
884
+ * trial end date must be on or after the subscription's start date on the current
885
+ * plan, and on or before the subscription end date).
886
+ *
887
+ * In order to retroactively remove a trial completely, the end date can be set to
888
+ * the transition date of the subscription to this plan (or, if this is the first
889
+ * plan for this subscription, the subscription's start date). In order to end a
890
+ * trial immediately, the keyword `immediate` can be provided as the trial end
891
+ * date.
892
+ *
893
+ * By default, Orb will shift only the trial end date (and price intervals that
894
+ * start or end on the previous trial end date), and leave all other future price
895
+ * intervals untouched. If the `shift` parameter is set to `true`, Orb will shift
896
+ * all subsequent price and adjustment intervals by the same amount as the trial
897
+ * end date shift (so, e.g., if a plan change is scheduled or an add-on price was
898
+ * added, that change will be pushed back by the same amount of time the trial is
899
+ * extended).
900
+ */
901
+ updateTrial(subscriptionId: string, body: SubscriptionUpdateTrialParams, options?: Core.RequestOptions): Core.APIPromise<Subscription>;
881
902
  }
882
903
  export declare class SubscriptionsPage extends Page<Subscription> {
883
904
  }
@@ -1956,11 +1977,22 @@ export interface SubscriptionCreateParams {
1956
1977
  * this property or `external_plan_id` must be specified.
1957
1978
  */
1958
1979
  plan_id?: string | null;
1980
+ /**
1981
+ * Specifies which version of the plan to subscribe to. If null, the default
1982
+ * version will be used.
1983
+ */
1984
+ plan_version_number?: number | null;
1959
1985
  /**
1960
1986
  * Optionally provide a list of overrides for prices on the plan
1961
1987
  */
1962
1988
  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.OverrideGroupedWithMeteredMinimumPrice | SubscriptionCreateParams.OverrideBulkWithProrationPrice | SubscriptionCreateParams.OverrideUnitWithProrationPrice | SubscriptionCreateParams.OverrideTieredWithProrationPrice> | null;
1963
1989
  start_date?: string | null;
1990
+ /**
1991
+ * The duration of the trial period in days. If not provided, this defaults to the
1992
+ * value specified in the plan. If `0` is provided, the trial on the plan will be
1993
+ * skipped.
1994
+ */
1995
+ trial_duration_days?: number | null;
1964
1996
  }
1965
1997
  export declare namespace SubscriptionCreateParams {
1966
1998
  interface BillingCycleAnchorConfiguration {
@@ -2029,20 +2061,11 @@ export declare namespace SubscriptionCreateParams {
2029
2061
  * Only available if discount_type is `amount`.
2030
2062
  */
2031
2063
  amount_discount?: string | null;
2032
- /**
2033
- * List of price_ids that this discount applies to. For plan/plan phase discounts,
2034
- * this can be a subset of prices.
2035
- */
2036
- applies_to_price_ids?: Array<string> | null;
2037
2064
  /**
2038
2065
  * Only available if discount_type is `percentage`. This is a number between 0
2039
2066
  * and 1.
2040
2067
  */
2041
2068
  percentage_discount?: number | null;
2042
- /**
2043
- * Only available if discount_type is `trial`
2044
- */
2045
- trial_amount_discount?: string | null;
2046
2069
  /**
2047
2070
  * Only available if discount_type is `usage`. Number of usage units that this
2048
2071
  * discount is for
@@ -2101,20 +2124,11 @@ export declare namespace SubscriptionCreateParams {
2101
2124
  * Only available if discount_type is `amount`.
2102
2125
  */
2103
2126
  amount_discount?: string | null;
2104
- /**
2105
- * List of price_ids that this discount applies to. For plan/plan phase discounts,
2106
- * this can be a subset of prices.
2107
- */
2108
- applies_to_price_ids?: Array<string> | null;
2109
2127
  /**
2110
2128
  * Only available if discount_type is `percentage`. This is a number between 0
2111
2129
  * and 1.
2112
2130
  */
2113
2131
  percentage_discount?: number | null;
2114
- /**
2115
- * Only available if discount_type is `trial`
2116
- */
2117
- trial_amount_discount?: string | null;
2118
2132
  /**
2119
2133
  * Only available if discount_type is `usage`. Number of usage units that this
2120
2134
  * discount is for
@@ -2190,20 +2204,11 @@ export declare namespace SubscriptionCreateParams {
2190
2204
  * Only available if discount_type is `amount`.
2191
2205
  */
2192
2206
  amount_discount?: string | null;
2193
- /**
2194
- * List of price_ids that this discount applies to. For plan/plan phase discounts,
2195
- * this can be a subset of prices.
2196
- */
2197
- applies_to_price_ids?: Array<string> | null;
2198
2207
  /**
2199
2208
  * Only available if discount_type is `percentage`. This is a number between 0
2200
2209
  * and 1.
2201
2210
  */
2202
2211
  percentage_discount?: number | null;
2203
- /**
2204
- * Only available if discount_type is `trial`
2205
- */
2206
- trial_amount_discount?: string | null;
2207
2212
  /**
2208
2213
  * Only available if discount_type is `usage`. Number of usage units that this
2209
2214
  * discount is for
@@ -2273,20 +2278,11 @@ export declare namespace SubscriptionCreateParams {
2273
2278
  * Only available if discount_type is `amount`.
2274
2279
  */
2275
2280
  amount_discount?: string | null;
2276
- /**
2277
- * List of price_ids that this discount applies to. For plan/plan phase discounts,
2278
- * this can be a subset of prices.
2279
- */
2280
- applies_to_price_ids?: Array<string> | null;
2281
2281
  /**
2282
2282
  * Only available if discount_type is `percentage`. This is a number between 0
2283
2283
  * and 1.
2284
2284
  */
2285
2285
  percentage_discount?: number | null;
2286
- /**
2287
- * Only available if discount_type is `trial`
2288
- */
2289
- trial_amount_discount?: string | null;
2290
2286
  /**
2291
2287
  * Only available if discount_type is `usage`. Number of usage units that this
2292
2288
  * discount is for
@@ -2361,20 +2357,11 @@ export declare namespace SubscriptionCreateParams {
2361
2357
  * Only available if discount_type is `amount`.
2362
2358
  */
2363
2359
  amount_discount?: string | null;
2364
- /**
2365
- * List of price_ids that this discount applies to. For plan/plan phase discounts,
2366
- * this can be a subset of prices.
2367
- */
2368
- applies_to_price_ids?: Array<string> | null;
2369
2360
  /**
2370
2361
  * Only available if discount_type is `percentage`. This is a number between 0
2371
2362
  * and 1.
2372
2363
  */
2373
2364
  percentage_discount?: number | null;
2374
- /**
2375
- * Only available if discount_type is `trial`
2376
- */
2377
- trial_amount_discount?: string | null;
2378
2365
  /**
2379
2366
  * Only available if discount_type is `usage`. Number of usage units that this
2380
2367
  * discount is for
@@ -2432,20 +2419,11 @@ export declare namespace SubscriptionCreateParams {
2432
2419
  * Only available if discount_type is `amount`.
2433
2420
  */
2434
2421
  amount_discount?: string | null;
2435
- /**
2436
- * List of price_ids that this discount applies to. For plan/plan phase discounts,
2437
- * this can be a subset of prices.
2438
- */
2439
- applies_to_price_ids?: Array<string> | null;
2440
2422
  /**
2441
2423
  * Only available if discount_type is `percentage`. This is a number between 0
2442
2424
  * and 1.
2443
2425
  */
2444
2426
  percentage_discount?: number | null;
2445
- /**
2446
- * Only available if discount_type is `trial`
2447
- */
2448
- trial_amount_discount?: string | null;
2449
2427
  /**
2450
2428
  * Only available if discount_type is `usage`. Number of usage units that this
2451
2429
  * discount is for
@@ -2516,20 +2494,11 @@ export declare namespace SubscriptionCreateParams {
2516
2494
  * Only available if discount_type is `amount`.
2517
2495
  */
2518
2496
  amount_discount?: string | null;
2519
- /**
2520
- * List of price_ids that this discount applies to. For plan/plan phase discounts,
2521
- * this can be a subset of prices.
2522
- */
2523
- applies_to_price_ids?: Array<string> | null;
2524
2497
  /**
2525
2498
  * Only available if discount_type is `percentage`. This is a number between 0
2526
2499
  * and 1.
2527
2500
  */
2528
2501
  percentage_discount?: number | null;
2529
- /**
2530
- * Only available if discount_type is `trial`
2531
- */
2532
- trial_amount_discount?: string | null;
2533
2502
  /**
2534
2503
  * Only available if discount_type is `usage`. Number of usage units that this
2535
2504
  * discount is for
@@ -2595,20 +2564,11 @@ export declare namespace SubscriptionCreateParams {
2595
2564
  * Only available if discount_type is `amount`.
2596
2565
  */
2597
2566
  amount_discount?: string | null;
2598
- /**
2599
- * List of price_ids that this discount applies to. For plan/plan phase discounts,
2600
- * this can be a subset of prices.
2601
- */
2602
- applies_to_price_ids?: Array<string> | null;
2603
2567
  /**
2604
2568
  * Only available if discount_type is `percentage`. This is a number between 0
2605
2569
  * and 1.
2606
2570
  */
2607
2571
  percentage_discount?: number | null;
2608
- /**
2609
- * Only available if discount_type is `trial`
2610
- */
2611
- trial_amount_discount?: string | null;
2612
2572
  /**
2613
2573
  * Only available if discount_type is `usage`. Number of usage units that this
2614
2574
  * discount is for
@@ -2656,20 +2616,11 @@ export declare namespace SubscriptionCreateParams {
2656
2616
  * Only available if discount_type is `amount`.
2657
2617
  */
2658
2618
  amount_discount?: string | null;
2659
- /**
2660
- * List of price_ids that this discount applies to. For plan/plan phase discounts,
2661
- * this can be a subset of prices.
2662
- */
2663
- applies_to_price_ids?: Array<string> | null;
2664
2619
  /**
2665
2620
  * Only available if discount_type is `percentage`. This is a number between 0
2666
2621
  * and 1.
2667
2622
  */
2668
2623
  percentage_discount?: number | null;
2669
- /**
2670
- * Only available if discount_type is `trial`
2671
- */
2672
- trial_amount_discount?: string | null;
2673
2624
  /**
2674
2625
  * Only available if discount_type is `usage`. Number of usage units that this
2675
2626
  * discount is for
@@ -2717,20 +2668,11 @@ export declare namespace SubscriptionCreateParams {
2717
2668
  * Only available if discount_type is `amount`.
2718
2669
  */
2719
2670
  amount_discount?: string | null;
2720
- /**
2721
- * List of price_ids that this discount applies to. For plan/plan phase discounts,
2722
- * this can be a subset of prices.
2723
- */
2724
- applies_to_price_ids?: Array<string> | null;
2725
2671
  /**
2726
2672
  * Only available if discount_type is `percentage`. This is a number between 0
2727
2673
  * and 1.
2728
2674
  */
2729
2675
  percentage_discount?: number | null;
2730
- /**
2731
- * Only available if discount_type is `trial`
2732
- */
2733
- trial_amount_discount?: string | null;
2734
2676
  /**
2735
2677
  * Only available if discount_type is `usage`. Number of usage units that this
2736
2678
  * discount is for
@@ -2778,20 +2720,11 @@ export declare namespace SubscriptionCreateParams {
2778
2720
  * Only available if discount_type is `amount`.
2779
2721
  */
2780
2722
  amount_discount?: string | null;
2781
- /**
2782
- * List of price_ids that this discount applies to. For plan/plan phase discounts,
2783
- * this can be a subset of prices.
2784
- */
2785
- applies_to_price_ids?: Array<string> | null;
2786
2723
  /**
2787
2724
  * Only available if discount_type is `percentage`. This is a number between 0
2788
2725
  * and 1.
2789
2726
  */
2790
2727
  percentage_discount?: number | null;
2791
- /**
2792
- * Only available if discount_type is `trial`
2793
- */
2794
- trial_amount_discount?: string | null;
2795
2728
  /**
2796
2729
  * Only available if discount_type is `usage`. Number of usage units that this
2797
2730
  * discount is for
@@ -2839,20 +2772,11 @@ export declare namespace SubscriptionCreateParams {
2839
2772
  * Only available if discount_type is `amount`.
2840
2773
  */
2841
2774
  amount_discount?: string | null;
2842
- /**
2843
- * List of price_ids that this discount applies to. For plan/plan phase discounts,
2844
- * this can be a subset of prices.
2845
- */
2846
- applies_to_price_ids?: Array<string> | null;
2847
2775
  /**
2848
2776
  * Only available if discount_type is `percentage`. This is a number between 0
2849
2777
  * and 1.
2850
2778
  */
2851
2779
  percentage_discount?: number | null;
2852
- /**
2853
- * Only available if discount_type is `trial`
2854
- */
2855
- trial_amount_discount?: string | null;
2856
2780
  /**
2857
2781
  * Only available if discount_type is `usage`. Number of usage units that this
2858
2782
  * discount is for
@@ -2900,20 +2824,11 @@ export declare namespace SubscriptionCreateParams {
2900
2824
  * Only available if discount_type is `amount`.
2901
2825
  */
2902
2826
  amount_discount?: string | null;
2903
- /**
2904
- * List of price_ids that this discount applies to. For plan/plan phase discounts,
2905
- * this can be a subset of prices.
2906
- */
2907
- applies_to_price_ids?: Array<string> | null;
2908
2827
  /**
2909
2828
  * Only available if discount_type is `percentage`. This is a number between 0
2910
2829
  * and 1.
2911
2830
  */
2912
2831
  percentage_discount?: number | null;
2913
- /**
2914
- * Only available if discount_type is `trial`
2915
- */
2916
- trial_amount_discount?: string | null;
2917
2832
  /**
2918
2833
  * Only available if discount_type is `usage`. Number of usage units that this
2919
2834
  * discount is for
@@ -2961,20 +2876,11 @@ export declare namespace SubscriptionCreateParams {
2961
2876
  * Only available if discount_type is `amount`.
2962
2877
  */
2963
2878
  amount_discount?: string | null;
2964
- /**
2965
- * List of price_ids that this discount applies to. For plan/plan phase discounts,
2966
- * this can be a subset of prices.
2967
- */
2968
- applies_to_price_ids?: Array<string> | null;
2969
2879
  /**
2970
2880
  * Only available if discount_type is `percentage`. This is a number between 0
2971
2881
  * and 1.
2972
2882
  */
2973
2883
  percentage_discount?: number | null;
2974
- /**
2975
- * Only available if discount_type is `trial`
2976
- */
2977
- trial_amount_discount?: string | null;
2978
2884
  /**
2979
2885
  * Only available if discount_type is `usage`. Number of usage units that this
2980
2886
  * discount is for
@@ -3022,20 +2928,11 @@ export declare namespace SubscriptionCreateParams {
3022
2928
  * Only available if discount_type is `amount`.
3023
2929
  */
3024
2930
  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
2931
  /**
3031
2932
  * Only available if discount_type is `percentage`. This is a number between 0
3032
2933
  * and 1.
3033
2934
  */
3034
2935
  percentage_discount?: number | null;
3035
- /**
3036
- * Only available if discount_type is `trial`
3037
- */
3038
- trial_amount_discount?: string | null;
3039
2936
  /**
3040
2937
  * Only available if discount_type is `usage`. Number of usage units that this
3041
2938
  * discount is for
@@ -3083,20 +2980,11 @@ export declare namespace SubscriptionCreateParams {
3083
2980
  * Only available if discount_type is `amount`.
3084
2981
  */
3085
2982
  amount_discount?: string | null;
3086
- /**
3087
- * List of price_ids that this discount applies to. For plan/plan phase discounts,
3088
- * this can be a subset of prices.
3089
- */
3090
- applies_to_price_ids?: Array<string> | null;
3091
2983
  /**
3092
2984
  * Only available if discount_type is `percentage`. This is a number between 0
3093
2985
  * and 1.
3094
2986
  */
3095
2987
  percentage_discount?: number | null;
3096
- /**
3097
- * Only available if discount_type is `trial`
3098
- */
3099
- trial_amount_discount?: string | null;
3100
2988
  /**
3101
2989
  * Only available if discount_type is `usage`. Number of usage units that this
3102
2990
  * discount is for
@@ -3144,20 +3032,11 @@ export declare namespace SubscriptionCreateParams {
3144
3032
  * Only available if discount_type is `amount`.
3145
3033
  */
3146
3034
  amount_discount?: string | null;
3147
- /**
3148
- * List of price_ids that this discount applies to. For plan/plan phase discounts,
3149
- * this can be a subset of prices.
3150
- */
3151
- applies_to_price_ids?: Array<string> | null;
3152
3035
  /**
3153
3036
  * Only available if discount_type is `percentage`. This is a number between 0
3154
3037
  * and 1.
3155
3038
  */
3156
3039
  percentage_discount?: number | null;
3157
- /**
3158
- * Only available if discount_type is `trial`
3159
- */
3160
- trial_amount_discount?: string | null;
3161
3040
  /**
3162
3041
  * Only available if discount_type is `usage`. Number of usage units that this
3163
3042
  * discount is for
@@ -3205,20 +3084,11 @@ export declare namespace SubscriptionCreateParams {
3205
3084
  * Only available if discount_type is `amount`.
3206
3085
  */
3207
3086
  amount_discount?: string | null;
3208
- /**
3209
- * List of price_ids that this discount applies to. For plan/plan phase discounts,
3210
- * this can be a subset of prices.
3211
- */
3212
- applies_to_price_ids?: Array<string> | null;
3213
3087
  /**
3214
3088
  * Only available if discount_type is `percentage`. This is a number between 0
3215
3089
  * and 1.
3216
3090
  */
3217
3091
  percentage_discount?: number | null;
3218
- /**
3219
- * Only available if discount_type is `trial`
3220
- */
3221
- trial_amount_discount?: string | null;
3222
3092
  /**
3223
3093
  * Only available if discount_type is `usage`. Number of usage units that this
3224
3094
  * discount is for
@@ -3266,20 +3136,11 @@ export declare namespace SubscriptionCreateParams {
3266
3136
  * Only available if discount_type is `amount`.
3267
3137
  */
3268
3138
  amount_discount?: string | null;
3269
- /**
3270
- * List of price_ids that this discount applies to. For plan/plan phase discounts,
3271
- * this can be a subset of prices.
3272
- */
3273
- applies_to_price_ids?: Array<string> | null;
3274
3139
  /**
3275
3140
  * Only available if discount_type is `percentage`. This is a number between 0
3276
3141
  * and 1.
3277
3142
  */
3278
3143
  percentage_discount?: number | null;
3279
- /**
3280
- * Only available if discount_type is `trial`
3281
- */
3282
- trial_amount_discount?: string | null;
3283
3144
  /**
3284
3145
  * Only available if discount_type is `usage`. Number of usage units that this
3285
3146
  * discount is for
@@ -5922,10 +5783,21 @@ export interface SubscriptionSchedulePlanChangeParams {
5922
5783
  * this property or `external_plan_id` must be specified.
5923
5784
  */
5924
5785
  plan_id?: string | null;
5786
+ /**
5787
+ * Specifies which version of the plan to change to. If null, the default version
5788
+ * will be used.
5789
+ */
5790
+ plan_version_number?: number | null;
5925
5791
  /**
5926
5792
  * Optionally provide a list of overrides for prices on the plan
5927
5793
  */
5928
5794
  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.OverrideGroupedWithMeteredMinimumPrice | SubscriptionSchedulePlanChangeParams.OverrideBulkWithProrationPrice | SubscriptionSchedulePlanChangeParams.OverrideUnitWithProrationPrice | SubscriptionSchedulePlanChangeParams.OverrideTieredWithProrationPrice> | null;
5795
+ /**
5796
+ * The duration of the trial period in days. If not provided, this defaults to the
5797
+ * value specified in the plan. If `0` is provided, the trial on the plan will be
5798
+ * skipped.
5799
+ */
5800
+ trial_duration_days?: number | null;
5929
5801
  }
5930
5802
  export declare namespace SubscriptionSchedulePlanChangeParams {
5931
5803
  interface OverrideUnitPrice {
@@ -5974,20 +5846,11 @@ export declare namespace SubscriptionSchedulePlanChangeParams {
5974
5846
  * Only available if discount_type is `amount`.
5975
5847
  */
5976
5848
  amount_discount?: string | null;
5977
- /**
5978
- * List of price_ids that this discount applies to. For plan/plan phase discounts,
5979
- * this can be a subset of prices.
5980
- */
5981
- applies_to_price_ids?: Array<string> | null;
5982
5849
  /**
5983
5850
  * Only available if discount_type is `percentage`. This is a number between 0
5984
5851
  * and 1.
5985
5852
  */
5986
5853
  percentage_discount?: number | null;
5987
- /**
5988
- * Only available if discount_type is `trial`
5989
- */
5990
- trial_amount_discount?: string | null;
5991
5854
  /**
5992
5855
  * Only available if discount_type is `usage`. Number of usage units that this
5993
5856
  * discount is for
@@ -6046,20 +5909,11 @@ export declare namespace SubscriptionSchedulePlanChangeParams {
6046
5909
  * Only available if discount_type is `amount`.
6047
5910
  */
6048
5911
  amount_discount?: string | null;
6049
- /**
6050
- * List of price_ids that this discount applies to. For plan/plan phase discounts,
6051
- * this can be a subset of prices.
6052
- */
6053
- applies_to_price_ids?: Array<string> | null;
6054
5912
  /**
6055
5913
  * Only available if discount_type is `percentage`. This is a number between 0
6056
5914
  * and 1.
6057
5915
  */
6058
5916
  percentage_discount?: number | null;
6059
- /**
6060
- * Only available if discount_type is `trial`
6061
- */
6062
- trial_amount_discount?: string | null;
6063
5917
  /**
6064
5918
  * Only available if discount_type is `usage`. Number of usage units that this
6065
5919
  * discount is for
@@ -6135,20 +5989,11 @@ export declare namespace SubscriptionSchedulePlanChangeParams {
6135
5989
  * Only available if discount_type is `amount`.
6136
5990
  */
6137
5991
  amount_discount?: string | null;
6138
- /**
6139
- * List of price_ids that this discount applies to. For plan/plan phase discounts,
6140
- * this can be a subset of prices.
6141
- */
6142
- applies_to_price_ids?: Array<string> | null;
6143
5992
  /**
6144
5993
  * Only available if discount_type is `percentage`. This is a number between 0
6145
5994
  * and 1.
6146
5995
  */
6147
5996
  percentage_discount?: number | null;
6148
- /**
6149
- * Only available if discount_type is `trial`
6150
- */
6151
- trial_amount_discount?: string | null;
6152
5997
  /**
6153
5998
  * Only available if discount_type is `usage`. Number of usage units that this
6154
5999
  * discount is for
@@ -6218,20 +6063,11 @@ export declare namespace SubscriptionSchedulePlanChangeParams {
6218
6063
  * Only available if discount_type is `amount`.
6219
6064
  */
6220
6065
  amount_discount?: string | null;
6221
- /**
6222
- * List of price_ids that this discount applies to. For plan/plan phase discounts,
6223
- * this can be a subset of prices.
6224
- */
6225
- applies_to_price_ids?: Array<string> | null;
6226
6066
  /**
6227
6067
  * Only available if discount_type is `percentage`. This is a number between 0
6228
6068
  * and 1.
6229
6069
  */
6230
6070
  percentage_discount?: number | null;
6231
- /**
6232
- * Only available if discount_type is `trial`
6233
- */
6234
- trial_amount_discount?: string | null;
6235
6071
  /**
6236
6072
  * Only available if discount_type is `usage`. Number of usage units that this
6237
6073
  * discount is for
@@ -6306,20 +6142,11 @@ export declare namespace SubscriptionSchedulePlanChangeParams {
6306
6142
  * Only available if discount_type is `amount`.
6307
6143
  */
6308
6144
  amount_discount?: string | null;
6309
- /**
6310
- * List of price_ids that this discount applies to. For plan/plan phase discounts,
6311
- * this can be a subset of prices.
6312
- */
6313
- applies_to_price_ids?: Array<string> | null;
6314
6145
  /**
6315
6146
  * Only available if discount_type is `percentage`. This is a number between 0
6316
6147
  * and 1.
6317
6148
  */
6318
6149
  percentage_discount?: number | null;
6319
- /**
6320
- * Only available if discount_type is `trial`
6321
- */
6322
- trial_amount_discount?: string | null;
6323
6150
  /**
6324
6151
  * Only available if discount_type is `usage`. Number of usage units that this
6325
6152
  * discount is for
@@ -6377,20 +6204,11 @@ export declare namespace SubscriptionSchedulePlanChangeParams {
6377
6204
  * Only available if discount_type is `amount`.
6378
6205
  */
6379
6206
  amount_discount?: string | null;
6380
- /**
6381
- * List of price_ids that this discount applies to. For plan/plan phase discounts,
6382
- * this can be a subset of prices.
6383
- */
6384
- applies_to_price_ids?: Array<string> | null;
6385
6207
  /**
6386
6208
  * Only available if discount_type is `percentage`. This is a number between 0
6387
6209
  * and 1.
6388
6210
  */
6389
6211
  percentage_discount?: number | null;
6390
- /**
6391
- * Only available if discount_type is `trial`
6392
- */
6393
- trial_amount_discount?: string | null;
6394
6212
  /**
6395
6213
  * Only available if discount_type is `usage`. Number of usage units that this
6396
6214
  * discount is for
@@ -6461,20 +6279,11 @@ export declare namespace SubscriptionSchedulePlanChangeParams {
6461
6279
  * Only available if discount_type is `amount`.
6462
6280
  */
6463
6281
  amount_discount?: string | null;
6464
- /**
6465
- * List of price_ids that this discount applies to. For plan/plan phase discounts,
6466
- * this can be a subset of prices.
6467
- */
6468
- applies_to_price_ids?: Array<string> | null;
6469
6282
  /**
6470
6283
  * Only available if discount_type is `percentage`. This is a number between 0
6471
6284
  * and 1.
6472
6285
  */
6473
6286
  percentage_discount?: number | null;
6474
- /**
6475
- * Only available if discount_type is `trial`
6476
- */
6477
- trial_amount_discount?: string | null;
6478
6287
  /**
6479
6288
  * Only available if discount_type is `usage`. Number of usage units that this
6480
6289
  * discount is for
@@ -6540,20 +6349,11 @@ export declare namespace SubscriptionSchedulePlanChangeParams {
6540
6349
  * Only available if discount_type is `amount`.
6541
6350
  */
6542
6351
  amount_discount?: string | null;
6543
- /**
6544
- * List of price_ids that this discount applies to. For plan/plan phase discounts,
6545
- * this can be a subset of prices.
6546
- */
6547
- applies_to_price_ids?: Array<string> | null;
6548
6352
  /**
6549
6353
  * Only available if discount_type is `percentage`. This is a number between 0
6550
6354
  * and 1.
6551
6355
  */
6552
6356
  percentage_discount?: number | null;
6553
- /**
6554
- * Only available if discount_type is `trial`
6555
- */
6556
- trial_amount_discount?: string | null;
6557
6357
  /**
6558
6358
  * Only available if discount_type is `usage`. Number of usage units that this
6559
6359
  * discount is for
@@ -6601,20 +6401,11 @@ export declare namespace SubscriptionSchedulePlanChangeParams {
6601
6401
  * Only available if discount_type is `amount`.
6602
6402
  */
6603
6403
  amount_discount?: string | null;
6604
- /**
6605
- * List of price_ids that this discount applies to. For plan/plan phase discounts,
6606
- * this can be a subset of prices.
6607
- */
6608
- applies_to_price_ids?: Array<string> | null;
6609
6404
  /**
6610
6405
  * Only available if discount_type is `percentage`. This is a number between 0
6611
6406
  * and 1.
6612
6407
  */
6613
6408
  percentage_discount?: number | null;
6614
- /**
6615
- * Only available if discount_type is `trial`
6616
- */
6617
- trial_amount_discount?: string | null;
6618
6409
  /**
6619
6410
  * Only available if discount_type is `usage`. Number of usage units that this
6620
6411
  * discount is for
@@ -6662,20 +6453,11 @@ export declare namespace SubscriptionSchedulePlanChangeParams {
6662
6453
  * Only available if discount_type is `amount`.
6663
6454
  */
6664
6455
  amount_discount?: string | null;
6665
- /**
6666
- * List of price_ids that this discount applies to. For plan/plan phase discounts,
6667
- * this can be a subset of prices.
6668
- */
6669
- applies_to_price_ids?: Array<string> | null;
6670
6456
  /**
6671
6457
  * Only available if discount_type is `percentage`. This is a number between 0
6672
6458
  * and 1.
6673
6459
  */
6674
6460
  percentage_discount?: number | null;
6675
- /**
6676
- * Only available if discount_type is `trial`
6677
- */
6678
- trial_amount_discount?: string | null;
6679
6461
  /**
6680
6462
  * Only available if discount_type is `usage`. Number of usage units that this
6681
6463
  * discount is for
@@ -6723,20 +6505,11 @@ export declare namespace SubscriptionSchedulePlanChangeParams {
6723
6505
  * Only available if discount_type is `amount`.
6724
6506
  */
6725
6507
  amount_discount?: string | null;
6726
- /**
6727
- * List of price_ids that this discount applies to. For plan/plan phase discounts,
6728
- * this can be a subset of prices.
6729
- */
6730
- applies_to_price_ids?: Array<string> | null;
6731
6508
  /**
6732
6509
  * Only available if discount_type is `percentage`. This is a number between 0
6733
6510
  * and 1.
6734
6511
  */
6735
6512
  percentage_discount?: number | null;
6736
- /**
6737
- * Only available if discount_type is `trial`
6738
- */
6739
- trial_amount_discount?: string | null;
6740
6513
  /**
6741
6514
  * Only available if discount_type is `usage`. Number of usage units that this
6742
6515
  * discount is for
@@ -6784,20 +6557,11 @@ export declare namespace SubscriptionSchedulePlanChangeParams {
6784
6557
  * Only available if discount_type is `amount`.
6785
6558
  */
6786
6559
  amount_discount?: string | null;
6787
- /**
6788
- * List of price_ids that this discount applies to. For plan/plan phase discounts,
6789
- * this can be a subset of prices.
6790
- */
6791
- applies_to_price_ids?: Array<string> | null;
6792
6560
  /**
6793
6561
  * Only available if discount_type is `percentage`. This is a number between 0
6794
6562
  * and 1.
6795
6563
  */
6796
6564
  percentage_discount?: number | null;
6797
- /**
6798
- * Only available if discount_type is `trial`
6799
- */
6800
- trial_amount_discount?: string | null;
6801
6565
  /**
6802
6566
  * Only available if discount_type is `usage`. Number of usage units that this
6803
6567
  * discount is for
@@ -6845,20 +6609,11 @@ export declare namespace SubscriptionSchedulePlanChangeParams {
6845
6609
  * Only available if discount_type is `amount`.
6846
6610
  */
6847
6611
  amount_discount?: string | null;
6848
- /**
6849
- * List of price_ids that this discount applies to. For plan/plan phase discounts,
6850
- * this can be a subset of prices.
6851
- */
6852
- applies_to_price_ids?: Array<string> | null;
6853
6612
  /**
6854
6613
  * Only available if discount_type is `percentage`. This is a number between 0
6855
6614
  * and 1.
6856
6615
  */
6857
6616
  percentage_discount?: number | null;
6858
- /**
6859
- * Only available if discount_type is `trial`
6860
- */
6861
- trial_amount_discount?: string | null;
6862
6617
  /**
6863
6618
  * Only available if discount_type is `usage`. Number of usage units that this
6864
6619
  * discount is for
@@ -6906,20 +6661,11 @@ export declare namespace SubscriptionSchedulePlanChangeParams {
6906
6661
  * Only available if discount_type is `amount`.
6907
6662
  */
6908
6663
  amount_discount?: string | null;
6909
- /**
6910
- * List of price_ids that this discount applies to. For plan/plan phase discounts,
6911
- * this can be a subset of prices.
6912
- */
6913
- applies_to_price_ids?: Array<string> | null;
6914
6664
  /**
6915
6665
  * Only available if discount_type is `percentage`. This is a number between 0
6916
6666
  * and 1.
6917
6667
  */
6918
6668
  percentage_discount?: number | null;
6919
- /**
6920
- * Only available if discount_type is `trial`
6921
- */
6922
- trial_amount_discount?: string | null;
6923
6669
  /**
6924
6670
  * Only available if discount_type is `usage`. Number of usage units that this
6925
6671
  * discount is for
@@ -6967,20 +6713,11 @@ export declare namespace SubscriptionSchedulePlanChangeParams {
6967
6713
  * Only available if discount_type is `amount`.
6968
6714
  */
6969
6715
  amount_discount?: string | null;
6970
- /**
6971
- * List of price_ids that this discount applies to. For plan/plan phase discounts,
6972
- * this can be a subset of prices.
6973
- */
6974
- applies_to_price_ids?: Array<string> | null;
6975
6716
  /**
6976
6717
  * Only available if discount_type is `percentage`. This is a number between 0
6977
6718
  * and 1.
6978
6719
  */
6979
6720
  percentage_discount?: number | null;
6980
- /**
6981
- * Only available if discount_type is `trial`
6982
- */
6983
- trial_amount_discount?: string | null;
6984
6721
  /**
6985
6722
  * Only available if discount_type is `usage`. Number of usage units that this
6986
6723
  * discount is for
@@ -7028,20 +6765,11 @@ export declare namespace SubscriptionSchedulePlanChangeParams {
7028
6765
  * Only available if discount_type is `amount`.
7029
6766
  */
7030
6767
  amount_discount?: string | null;
7031
- /**
7032
- * List of price_ids that this discount applies to. For plan/plan phase discounts,
7033
- * this can be a subset of prices.
7034
- */
7035
- applies_to_price_ids?: Array<string> | null;
7036
6768
  /**
7037
6769
  * Only available if discount_type is `percentage`. This is a number between 0
7038
6770
  * and 1.
7039
6771
  */
7040
6772
  percentage_discount?: number | null;
7041
- /**
7042
- * Only available if discount_type is `trial`
7043
- */
7044
- trial_amount_discount?: string | null;
7045
6773
  /**
7046
6774
  * Only available if discount_type is `usage`. Number of usage units that this
7047
6775
  * discount is for
@@ -7089,20 +6817,11 @@ export declare namespace SubscriptionSchedulePlanChangeParams {
7089
6817
  * Only available if discount_type is `amount`.
7090
6818
  */
7091
6819
  amount_discount?: string | null;
7092
- /**
7093
- * List of price_ids that this discount applies to. For plan/plan phase discounts,
7094
- * this can be a subset of prices.
7095
- */
7096
- applies_to_price_ids?: Array<string> | null;
7097
6820
  /**
7098
6821
  * Only available if discount_type is `percentage`. This is a number between 0
7099
6822
  * and 1.
7100
6823
  */
7101
6824
  percentage_discount?: number | null;
7102
- /**
7103
- * Only available if discount_type is `trial`
7104
- */
7105
- trial_amount_discount?: string | null;
7106
6825
  /**
7107
6826
  * Only available if discount_type is `usage`. Number of usage units that this
7108
6827
  * discount is for
@@ -7150,20 +6869,11 @@ export declare namespace SubscriptionSchedulePlanChangeParams {
7150
6869
  * Only available if discount_type is `amount`.
7151
6870
  */
7152
6871
  amount_discount?: string | null;
7153
- /**
7154
- * List of price_ids that this discount applies to. For plan/plan phase discounts,
7155
- * this can be a subset of prices.
7156
- */
7157
- applies_to_price_ids?: Array<string> | null;
7158
6872
  /**
7159
6873
  * Only available if discount_type is `percentage`. This is a number between 0
7160
6874
  * and 1.
7161
6875
  */
7162
6876
  percentage_discount?: number | null;
7163
- /**
7164
- * Only available if discount_type is `trial`
7165
- */
7166
- trial_amount_discount?: string | null;
7167
6877
  /**
7168
6878
  * Only available if discount_type is `usage`. Number of usage units that this
7169
6879
  * discount is for
@@ -7211,20 +6921,11 @@ export declare namespace SubscriptionSchedulePlanChangeParams {
7211
6921
  * Only available if discount_type is `amount`.
7212
6922
  */
7213
6923
  amount_discount?: string | null;
7214
- /**
7215
- * List of price_ids that this discount applies to. For plan/plan phase discounts,
7216
- * this can be a subset of prices.
7217
- */
7218
- applies_to_price_ids?: Array<string> | null;
7219
6924
  /**
7220
6925
  * Only available if discount_type is `percentage`. This is a number between 0
7221
6926
  * and 1.
7222
6927
  */
7223
6928
  percentage_discount?: number | null;
7224
- /**
7225
- * Only available if discount_type is `trial`
7226
- */
7227
- trial_amount_discount?: string | null;
7228
6929
  /**
7229
6930
  * Only available if discount_type is `usage`. Number of usage units that this
7230
6931
  * discount is for
@@ -7265,6 +6966,18 @@ export interface SubscriptionUpdateFixedFeeQuantityParams {
7265
6966
  */
7266
6967
  effective_date?: string | null;
7267
6968
  }
6969
+ export interface SubscriptionUpdateTrialParams {
6970
+ /**
6971
+ * The new date that the trial should end, or the literal string `immediate` to end
6972
+ * the trial immediately.
6973
+ */
6974
+ trial_end_date: (string & {}) | 'immediate';
6975
+ /**
6976
+ * If true, shifts subsequent price and adjustment intervals (preserving their
6977
+ * durations, but adjusting their absolute dates).
6978
+ */
6979
+ shift?: boolean;
6980
+ }
7268
6981
  export declare namespace Subscriptions {
7269
6982
  export import Subscription = SubscriptionsAPI.Subscription;
7270
6983
  export import SubscriptionUsage = SubscriptionsAPI.SubscriptionUsage;
@@ -7285,5 +6998,6 @@ export declare namespace Subscriptions {
7285
6998
  export import SubscriptionTriggerPhaseParams = SubscriptionsAPI.SubscriptionTriggerPhaseParams;
7286
6999
  export import SubscriptionUnscheduleFixedFeeQuantityUpdatesParams = SubscriptionsAPI.SubscriptionUnscheduleFixedFeeQuantityUpdatesParams;
7287
7000
  export import SubscriptionUpdateFixedFeeQuantityParams = SubscriptionsAPI.SubscriptionUpdateFixedFeeQuantityParams;
7001
+ export import SubscriptionUpdateTrialParams = SubscriptionsAPI.SubscriptionUpdateTrialParams;
7288
7002
  }
7289
7003
  //# sourceMappingURL=subscriptions.d.ts.map