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.
- package/CHANGELOG.md +16 -0
- package/core.d.ts +1 -1
- package/core.d.ts.map +1 -1
- package/core.js +1 -1
- package/core.js.map +1 -1
- package/core.mjs +1 -1
- package/core.mjs.map +1 -1
- package/index.d.mts +1 -0
- package/index.d.ts +1 -0
- package/index.d.ts.map +1 -1
- package/index.js.map +1 -1
- package/index.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/subscriptions.d.ts +56 -342
- package/resources/subscriptions.d.ts.map +1 -1
- package/resources/subscriptions.js +23 -0
- package/resources/subscriptions.js.map +1 -1
- package/resources/subscriptions.mjs +23 -0
- package/resources/subscriptions.mjs.map +1 -1
- package/src/core.ts +4 -2
- package/src/index.ts +1 -0
- package/src/resources/index.ts +1 -0
- package/src/resources/subscriptions.ts +69 -418
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -1053,6 +1053,34 @@ export class Subscriptions extends APIResource {
|
|
|
1053
1053
|
...options,
|
|
1054
1054
|
});
|
|
1055
1055
|
}
|
|
1056
|
+
|
|
1057
|
+
/**
|
|
1058
|
+
* This endpoint is used to update the trial end date for a subscription. The new
|
|
1059
|
+
* trial end date must be within the time range of the current plan (i.e. the new
|
|
1060
|
+
* trial end date must be on or after the subscription's start date on the current
|
|
1061
|
+
* plan, and on or before the subscription end date).
|
|
1062
|
+
*
|
|
1063
|
+
* In order to retroactively remove a trial completely, the end date can be set to
|
|
1064
|
+
* the transition date of the subscription to this plan (or, if this is the first
|
|
1065
|
+
* plan for this subscription, the subscription's start date). In order to end a
|
|
1066
|
+
* trial immediately, the keyword `immediate` can be provided as the trial end
|
|
1067
|
+
* date.
|
|
1068
|
+
*
|
|
1069
|
+
* By default, Orb will shift only the trial end date (and price intervals that
|
|
1070
|
+
* start or end on the previous trial end date), and leave all other future price
|
|
1071
|
+
* intervals untouched. If the `shift` parameter is set to `true`, Orb will shift
|
|
1072
|
+
* all subsequent price and adjustment intervals by the same amount as the trial
|
|
1073
|
+
* end date shift (so, e.g., if a plan change is scheduled or an add-on price was
|
|
1074
|
+
* added, that change will be pushed back by the same amount of time the trial is
|
|
1075
|
+
* extended).
|
|
1076
|
+
*/
|
|
1077
|
+
updateTrial(
|
|
1078
|
+
subscriptionId: string,
|
|
1079
|
+
body: SubscriptionUpdateTrialParams,
|
|
1080
|
+
options?: Core.RequestOptions,
|
|
1081
|
+
): Core.APIPromise<Subscription> {
|
|
1082
|
+
return this._client.post(`/subscriptions/${subscriptionId}/update_trial`, { body, ...options });
|
|
1083
|
+
}
|
|
1056
1084
|
}
|
|
1057
1085
|
|
|
1058
1086
|
export class SubscriptionsPage extends Page<Subscription> {}
|
|
@@ -2305,6 +2333,12 @@ export interface SubscriptionCreateParams {
|
|
|
2305
2333
|
*/
|
|
2306
2334
|
plan_id?: string | null;
|
|
2307
2335
|
|
|
2336
|
+
/**
|
|
2337
|
+
* Specifies which version of the plan to subscribe to. If null, the default
|
|
2338
|
+
* version will be used.
|
|
2339
|
+
*/
|
|
2340
|
+
plan_version_number?: number | null;
|
|
2341
|
+
|
|
2308
2342
|
/**
|
|
2309
2343
|
* Optionally provide a list of overrides for prices on the plan
|
|
2310
2344
|
*/
|
|
@@ -2331,6 +2365,13 @@ export interface SubscriptionCreateParams {
|
|
|
2331
2365
|
> | null;
|
|
2332
2366
|
|
|
2333
2367
|
start_date?: string | null;
|
|
2368
|
+
|
|
2369
|
+
/**
|
|
2370
|
+
* The duration of the trial period in days. If not provided, this defaults to the
|
|
2371
|
+
* value specified in the plan. If `0` is provided, the trial on the plan will be
|
|
2372
|
+
* skipped.
|
|
2373
|
+
*/
|
|
2374
|
+
trial_duration_days?: number | null;
|
|
2334
2375
|
}
|
|
2335
2376
|
|
|
2336
2377
|
export namespace SubscriptionCreateParams {
|
|
@@ -2415,23 +2456,12 @@ export namespace SubscriptionCreateParams {
|
|
|
2415
2456
|
*/
|
|
2416
2457
|
amount_discount?: string | null;
|
|
2417
2458
|
|
|
2418
|
-
/**
|
|
2419
|
-
* List of price_ids that this discount applies to. For plan/plan phase discounts,
|
|
2420
|
-
* this can be a subset of prices.
|
|
2421
|
-
*/
|
|
2422
|
-
applies_to_price_ids?: Array<string> | null;
|
|
2423
|
-
|
|
2424
2459
|
/**
|
|
2425
2460
|
* Only available if discount_type is `percentage`. This is a number between 0
|
|
2426
2461
|
* and 1.
|
|
2427
2462
|
*/
|
|
2428
2463
|
percentage_discount?: number | null;
|
|
2429
2464
|
|
|
2430
|
-
/**
|
|
2431
|
-
* Only available if discount_type is `trial`
|
|
2432
|
-
*/
|
|
2433
|
-
trial_amount_discount?: string | null;
|
|
2434
|
-
|
|
2435
2465
|
/**
|
|
2436
2466
|
* Only available if discount_type is `usage`. Number of usage units that this
|
|
2437
2467
|
* discount is for
|
|
@@ -2504,23 +2534,12 @@ export namespace SubscriptionCreateParams {
|
|
|
2504
2534
|
*/
|
|
2505
2535
|
amount_discount?: string | null;
|
|
2506
2536
|
|
|
2507
|
-
/**
|
|
2508
|
-
* List of price_ids that this discount applies to. For plan/plan phase discounts,
|
|
2509
|
-
* this can be a subset of prices.
|
|
2510
|
-
*/
|
|
2511
|
-
applies_to_price_ids?: Array<string> | null;
|
|
2512
|
-
|
|
2513
2537
|
/**
|
|
2514
2538
|
* Only available if discount_type is `percentage`. This is a number between 0
|
|
2515
2539
|
* and 1.
|
|
2516
2540
|
*/
|
|
2517
2541
|
percentage_discount?: number | null;
|
|
2518
2542
|
|
|
2519
|
-
/**
|
|
2520
|
-
* Only available if discount_type is `trial`
|
|
2521
|
-
*/
|
|
2522
|
-
trial_amount_discount?: string | null;
|
|
2523
|
-
|
|
2524
2543
|
/**
|
|
2525
2544
|
* Only available if discount_type is `usage`. Number of usage units that this
|
|
2526
2545
|
* discount is for
|
|
@@ -2613,23 +2632,12 @@ export namespace SubscriptionCreateParams {
|
|
|
2613
2632
|
*/
|
|
2614
2633
|
amount_discount?: string | null;
|
|
2615
2634
|
|
|
2616
|
-
/**
|
|
2617
|
-
* List of price_ids that this discount applies to. For plan/plan phase discounts,
|
|
2618
|
-
* this can be a subset of prices.
|
|
2619
|
-
*/
|
|
2620
|
-
applies_to_price_ids?: Array<string> | null;
|
|
2621
|
-
|
|
2622
2635
|
/**
|
|
2623
2636
|
* Only available if discount_type is `percentage`. This is a number between 0
|
|
2624
2637
|
* and 1.
|
|
2625
2638
|
*/
|
|
2626
2639
|
percentage_discount?: number | null;
|
|
2627
2640
|
|
|
2628
|
-
/**
|
|
2629
|
-
* Only available if discount_type is `trial`
|
|
2630
|
-
*/
|
|
2631
|
-
trial_amount_discount?: string | null;
|
|
2632
|
-
|
|
2633
2641
|
/**
|
|
2634
2642
|
* Only available if discount_type is `usage`. Number of usage units that this
|
|
2635
2643
|
* discount is for
|
|
@@ -2715,23 +2723,12 @@ export namespace SubscriptionCreateParams {
|
|
|
2715
2723
|
*/
|
|
2716
2724
|
amount_discount?: string | null;
|
|
2717
2725
|
|
|
2718
|
-
/**
|
|
2719
|
-
* List of price_ids that this discount applies to. For plan/plan phase discounts,
|
|
2720
|
-
* this can be a subset of prices.
|
|
2721
|
-
*/
|
|
2722
|
-
applies_to_price_ids?: Array<string> | null;
|
|
2723
|
-
|
|
2724
2726
|
/**
|
|
2725
2727
|
* Only available if discount_type is `percentage`. This is a number between 0
|
|
2726
2728
|
* and 1.
|
|
2727
2729
|
*/
|
|
2728
2730
|
percentage_discount?: number | null;
|
|
2729
2731
|
|
|
2730
|
-
/**
|
|
2731
|
-
* Only available if discount_type is `trial`
|
|
2732
|
-
*/
|
|
2733
|
-
trial_amount_discount?: string | null;
|
|
2734
|
-
|
|
2735
2732
|
/**
|
|
2736
2733
|
* Only available if discount_type is `usage`. Number of usage units that this
|
|
2737
2734
|
* discount is for
|
|
@@ -2823,23 +2820,12 @@ export namespace SubscriptionCreateParams {
|
|
|
2823
2820
|
*/
|
|
2824
2821
|
amount_discount?: string | null;
|
|
2825
2822
|
|
|
2826
|
-
/**
|
|
2827
|
-
* List of price_ids that this discount applies to. For plan/plan phase discounts,
|
|
2828
|
-
* this can be a subset of prices.
|
|
2829
|
-
*/
|
|
2830
|
-
applies_to_price_ids?: Array<string> | null;
|
|
2831
|
-
|
|
2832
2823
|
/**
|
|
2833
2824
|
* Only available if discount_type is `percentage`. This is a number between 0
|
|
2834
2825
|
* and 1.
|
|
2835
2826
|
*/
|
|
2836
2827
|
percentage_discount?: number | null;
|
|
2837
2828
|
|
|
2838
|
-
/**
|
|
2839
|
-
* Only available if discount_type is `trial`
|
|
2840
|
-
*/
|
|
2841
|
-
trial_amount_discount?: string | null;
|
|
2842
|
-
|
|
2843
2829
|
/**
|
|
2844
2830
|
* Only available if discount_type is `usage`. Number of usage units that this
|
|
2845
2831
|
* discount is for
|
|
@@ -2911,23 +2897,12 @@ export namespace SubscriptionCreateParams {
|
|
|
2911
2897
|
*/
|
|
2912
2898
|
amount_discount?: string | null;
|
|
2913
2899
|
|
|
2914
|
-
/**
|
|
2915
|
-
* List of price_ids that this discount applies to. For plan/plan phase discounts,
|
|
2916
|
-
* this can be a subset of prices.
|
|
2917
|
-
*/
|
|
2918
|
-
applies_to_price_ids?: Array<string> | null;
|
|
2919
|
-
|
|
2920
2900
|
/**
|
|
2921
2901
|
* Only available if discount_type is `percentage`. This is a number between 0
|
|
2922
2902
|
* and 1.
|
|
2923
2903
|
*/
|
|
2924
2904
|
percentage_discount?: number | null;
|
|
2925
2905
|
|
|
2926
|
-
/**
|
|
2927
|
-
* Only available if discount_type is `trial`
|
|
2928
|
-
*/
|
|
2929
|
-
trial_amount_discount?: string | null;
|
|
2930
|
-
|
|
2931
2906
|
/**
|
|
2932
2907
|
* Only available if discount_type is `usage`. Number of usage units that this
|
|
2933
2908
|
* discount is for
|
|
@@ -3014,23 +2989,12 @@ export namespace SubscriptionCreateParams {
|
|
|
3014
2989
|
*/
|
|
3015
2990
|
amount_discount?: string | null;
|
|
3016
2991
|
|
|
3017
|
-
/**
|
|
3018
|
-
* List of price_ids that this discount applies to. For plan/plan phase discounts,
|
|
3019
|
-
* this can be a subset of prices.
|
|
3020
|
-
*/
|
|
3021
|
-
applies_to_price_ids?: Array<string> | null;
|
|
3022
|
-
|
|
3023
2992
|
/**
|
|
3024
2993
|
* Only available if discount_type is `percentage`. This is a number between 0
|
|
3025
2994
|
* and 1.
|
|
3026
2995
|
*/
|
|
3027
2996
|
percentage_discount?: number | null;
|
|
3028
2997
|
|
|
3029
|
-
/**
|
|
3030
|
-
* Only available if discount_type is `trial`
|
|
3031
|
-
*/
|
|
3032
|
-
trial_amount_discount?: string | null;
|
|
3033
|
-
|
|
3034
2998
|
/**
|
|
3035
2999
|
* Only available if discount_type is `usage`. Number of usage units that this
|
|
3036
3000
|
* discount is for
|
|
@@ -3111,23 +3075,12 @@ export namespace SubscriptionCreateParams {
|
|
|
3111
3075
|
*/
|
|
3112
3076
|
amount_discount?: string | null;
|
|
3113
3077
|
|
|
3114
|
-
/**
|
|
3115
|
-
* List of price_ids that this discount applies to. For plan/plan phase discounts,
|
|
3116
|
-
* this can be a subset of prices.
|
|
3117
|
-
*/
|
|
3118
|
-
applies_to_price_ids?: Array<string> | null;
|
|
3119
|
-
|
|
3120
3078
|
/**
|
|
3121
3079
|
* Only available if discount_type is `percentage`. This is a number between 0
|
|
3122
3080
|
* and 1.
|
|
3123
3081
|
*/
|
|
3124
3082
|
percentage_discount?: number | null;
|
|
3125
3083
|
|
|
3126
|
-
/**
|
|
3127
|
-
* Only available if discount_type is `trial`
|
|
3128
|
-
*/
|
|
3129
|
-
trial_amount_discount?: string | null;
|
|
3130
|
-
|
|
3131
3084
|
/**
|
|
3132
3085
|
* Only available if discount_type is `usage`. Number of usage units that this
|
|
3133
3086
|
* discount is for
|
|
@@ -3187,23 +3140,12 @@ export namespace SubscriptionCreateParams {
|
|
|
3187
3140
|
*/
|
|
3188
3141
|
amount_discount?: string | null;
|
|
3189
3142
|
|
|
3190
|
-
/**
|
|
3191
|
-
* List of price_ids that this discount applies to. For plan/plan phase discounts,
|
|
3192
|
-
* this can be a subset of prices.
|
|
3193
|
-
*/
|
|
3194
|
-
applies_to_price_ids?: Array<string> | null;
|
|
3195
|
-
|
|
3196
3143
|
/**
|
|
3197
3144
|
* Only available if discount_type is `percentage`. This is a number between 0
|
|
3198
3145
|
* and 1.
|
|
3199
3146
|
*/
|
|
3200
3147
|
percentage_discount?: number | null;
|
|
3201
3148
|
|
|
3202
|
-
/**
|
|
3203
|
-
* Only available if discount_type is `trial`
|
|
3204
|
-
*/
|
|
3205
|
-
trial_amount_discount?: string | null;
|
|
3206
|
-
|
|
3207
3149
|
/**
|
|
3208
3150
|
* Only available if discount_type is `usage`. Number of usage units that this
|
|
3209
3151
|
* discount is for
|
|
@@ -3263,23 +3205,12 @@ export namespace SubscriptionCreateParams {
|
|
|
3263
3205
|
*/
|
|
3264
3206
|
amount_discount?: string | null;
|
|
3265
3207
|
|
|
3266
|
-
/**
|
|
3267
|
-
* List of price_ids that this discount applies to. For plan/plan phase discounts,
|
|
3268
|
-
* this can be a subset of prices.
|
|
3269
|
-
*/
|
|
3270
|
-
applies_to_price_ids?: Array<string> | null;
|
|
3271
|
-
|
|
3272
3208
|
/**
|
|
3273
3209
|
* Only available if discount_type is `percentage`. This is a number between 0
|
|
3274
3210
|
* and 1.
|
|
3275
3211
|
*/
|
|
3276
3212
|
percentage_discount?: number | null;
|
|
3277
3213
|
|
|
3278
|
-
/**
|
|
3279
|
-
* Only available if discount_type is `trial`
|
|
3280
|
-
*/
|
|
3281
|
-
trial_amount_discount?: string | null;
|
|
3282
|
-
|
|
3283
3214
|
/**
|
|
3284
3215
|
* Only available if discount_type is `usage`. Number of usage units that this
|
|
3285
3216
|
* discount is for
|
|
@@ -3339,23 +3270,12 @@ export namespace SubscriptionCreateParams {
|
|
|
3339
3270
|
*/
|
|
3340
3271
|
amount_discount?: string | null;
|
|
3341
3272
|
|
|
3342
|
-
/**
|
|
3343
|
-
* List of price_ids that this discount applies to. For plan/plan phase discounts,
|
|
3344
|
-
* this can be a subset of prices.
|
|
3345
|
-
*/
|
|
3346
|
-
applies_to_price_ids?: Array<string> | null;
|
|
3347
|
-
|
|
3348
3273
|
/**
|
|
3349
3274
|
* Only available if discount_type is `percentage`. This is a number between 0
|
|
3350
3275
|
* and 1.
|
|
3351
3276
|
*/
|
|
3352
3277
|
percentage_discount?: number | null;
|
|
3353
3278
|
|
|
3354
|
-
/**
|
|
3355
|
-
* Only available if discount_type is `trial`
|
|
3356
|
-
*/
|
|
3357
|
-
trial_amount_discount?: string | null;
|
|
3358
|
-
|
|
3359
3279
|
/**
|
|
3360
3280
|
* Only available if discount_type is `usage`. Number of usage units that this
|
|
3361
3281
|
* discount is for
|
|
@@ -3415,23 +3335,12 @@ export namespace SubscriptionCreateParams {
|
|
|
3415
3335
|
*/
|
|
3416
3336
|
amount_discount?: string | null;
|
|
3417
3337
|
|
|
3418
|
-
/**
|
|
3419
|
-
* List of price_ids that this discount applies to. For plan/plan phase discounts,
|
|
3420
|
-
* this can be a subset of prices.
|
|
3421
|
-
*/
|
|
3422
|
-
applies_to_price_ids?: Array<string> | null;
|
|
3423
|
-
|
|
3424
3338
|
/**
|
|
3425
3339
|
* Only available if discount_type is `percentage`. This is a number between 0
|
|
3426
3340
|
* and 1.
|
|
3427
3341
|
*/
|
|
3428
3342
|
percentage_discount?: number | null;
|
|
3429
3343
|
|
|
3430
|
-
/**
|
|
3431
|
-
* Only available if discount_type is `trial`
|
|
3432
|
-
*/
|
|
3433
|
-
trial_amount_discount?: string | null;
|
|
3434
|
-
|
|
3435
3344
|
/**
|
|
3436
3345
|
* Only available if discount_type is `usage`. Number of usage units that this
|
|
3437
3346
|
* discount is for
|
|
@@ -3491,23 +3400,12 @@ export namespace SubscriptionCreateParams {
|
|
|
3491
3400
|
*/
|
|
3492
3401
|
amount_discount?: string | null;
|
|
3493
3402
|
|
|
3494
|
-
/**
|
|
3495
|
-
* List of price_ids that this discount applies to. For plan/plan phase discounts,
|
|
3496
|
-
* this can be a subset of prices.
|
|
3497
|
-
*/
|
|
3498
|
-
applies_to_price_ids?: Array<string> | null;
|
|
3499
|
-
|
|
3500
3403
|
/**
|
|
3501
3404
|
* Only available if discount_type is `percentage`. This is a number between 0
|
|
3502
3405
|
* and 1.
|
|
3503
3406
|
*/
|
|
3504
3407
|
percentage_discount?: number | null;
|
|
3505
3408
|
|
|
3506
|
-
/**
|
|
3507
|
-
* Only available if discount_type is `trial`
|
|
3508
|
-
*/
|
|
3509
|
-
trial_amount_discount?: string | null;
|
|
3510
|
-
|
|
3511
3409
|
/**
|
|
3512
3410
|
* Only available if discount_type is `usage`. Number of usage units that this
|
|
3513
3411
|
* discount is for
|
|
@@ -3567,23 +3465,12 @@ export namespace SubscriptionCreateParams {
|
|
|
3567
3465
|
*/
|
|
3568
3466
|
amount_discount?: string | null;
|
|
3569
3467
|
|
|
3570
|
-
/**
|
|
3571
|
-
* List of price_ids that this discount applies to. For plan/plan phase discounts,
|
|
3572
|
-
* this can be a subset of prices.
|
|
3573
|
-
*/
|
|
3574
|
-
applies_to_price_ids?: Array<string> | null;
|
|
3575
|
-
|
|
3576
3468
|
/**
|
|
3577
3469
|
* Only available if discount_type is `percentage`. This is a number between 0
|
|
3578
3470
|
* and 1.
|
|
3579
3471
|
*/
|
|
3580
3472
|
percentage_discount?: number | null;
|
|
3581
3473
|
|
|
3582
|
-
/**
|
|
3583
|
-
* Only available if discount_type is `trial`
|
|
3584
|
-
*/
|
|
3585
|
-
trial_amount_discount?: string | null;
|
|
3586
|
-
|
|
3587
3474
|
/**
|
|
3588
3475
|
* Only available if discount_type is `usage`. Number of usage units that this
|
|
3589
3476
|
* discount is for
|
|
@@ -3643,23 +3530,12 @@ export namespace SubscriptionCreateParams {
|
|
|
3643
3530
|
*/
|
|
3644
3531
|
amount_discount?: string | null;
|
|
3645
3532
|
|
|
3646
|
-
/**
|
|
3647
|
-
* List of price_ids that this discount applies to. For plan/plan phase discounts,
|
|
3648
|
-
* this can be a subset of prices.
|
|
3649
|
-
*/
|
|
3650
|
-
applies_to_price_ids?: Array<string> | null;
|
|
3651
|
-
|
|
3652
3533
|
/**
|
|
3653
3534
|
* Only available if discount_type is `percentage`. This is a number between 0
|
|
3654
3535
|
* and 1.
|
|
3655
3536
|
*/
|
|
3656
3537
|
percentage_discount?: number | null;
|
|
3657
3538
|
|
|
3658
|
-
/**
|
|
3659
|
-
* Only available if discount_type is `trial`
|
|
3660
|
-
*/
|
|
3661
|
-
trial_amount_discount?: string | null;
|
|
3662
|
-
|
|
3663
3539
|
/**
|
|
3664
3540
|
* Only available if discount_type is `usage`. Number of usage units that this
|
|
3665
3541
|
* discount is for
|
|
@@ -3719,23 +3595,12 @@ export namespace SubscriptionCreateParams {
|
|
|
3719
3595
|
*/
|
|
3720
3596
|
amount_discount?: string | null;
|
|
3721
3597
|
|
|
3722
|
-
/**
|
|
3723
|
-
* List of price_ids that this discount applies to. For plan/plan phase discounts,
|
|
3724
|
-
* this can be a subset of prices.
|
|
3725
|
-
*/
|
|
3726
|
-
applies_to_price_ids?: Array<string> | null;
|
|
3727
|
-
|
|
3728
3598
|
/**
|
|
3729
3599
|
* Only available if discount_type is `percentage`. This is a number between 0
|
|
3730
3600
|
* and 1.
|
|
3731
3601
|
*/
|
|
3732
3602
|
percentage_discount?: number | null;
|
|
3733
3603
|
|
|
3734
|
-
/**
|
|
3735
|
-
* Only available if discount_type is `trial`
|
|
3736
|
-
*/
|
|
3737
|
-
trial_amount_discount?: string | null;
|
|
3738
|
-
|
|
3739
3604
|
/**
|
|
3740
3605
|
* Only available if discount_type is `usage`. Number of usage units that this
|
|
3741
3606
|
* discount is for
|
|
@@ -3795,23 +3660,12 @@ export namespace SubscriptionCreateParams {
|
|
|
3795
3660
|
*/
|
|
3796
3661
|
amount_discount?: string | null;
|
|
3797
3662
|
|
|
3798
|
-
/**
|
|
3799
|
-
* List of price_ids that this discount applies to. For plan/plan phase discounts,
|
|
3800
|
-
* this can be a subset of prices.
|
|
3801
|
-
*/
|
|
3802
|
-
applies_to_price_ids?: Array<string> | null;
|
|
3803
|
-
|
|
3804
3663
|
/**
|
|
3805
3664
|
* Only available if discount_type is `percentage`. This is a number between 0
|
|
3806
3665
|
* and 1.
|
|
3807
3666
|
*/
|
|
3808
3667
|
percentage_discount?: number | null;
|
|
3809
3668
|
|
|
3810
|
-
/**
|
|
3811
|
-
* Only available if discount_type is `trial`
|
|
3812
|
-
*/
|
|
3813
|
-
trial_amount_discount?: string | null;
|
|
3814
|
-
|
|
3815
3669
|
/**
|
|
3816
3670
|
* Only available if discount_type is `usage`. Number of usage units that this
|
|
3817
3671
|
* discount is for
|
|
@@ -3871,23 +3725,12 @@ export namespace SubscriptionCreateParams {
|
|
|
3871
3725
|
*/
|
|
3872
3726
|
amount_discount?: string | null;
|
|
3873
3727
|
|
|
3874
|
-
/**
|
|
3875
|
-
* List of price_ids that this discount applies to. For plan/plan phase discounts,
|
|
3876
|
-
* this can be a subset of prices.
|
|
3877
|
-
*/
|
|
3878
|
-
applies_to_price_ids?: Array<string> | null;
|
|
3879
|
-
|
|
3880
3728
|
/**
|
|
3881
3729
|
* Only available if discount_type is `percentage`. This is a number between 0
|
|
3882
3730
|
* and 1.
|
|
3883
3731
|
*/
|
|
3884
3732
|
percentage_discount?: number | null;
|
|
3885
3733
|
|
|
3886
|
-
/**
|
|
3887
|
-
* Only available if discount_type is `trial`
|
|
3888
|
-
*/
|
|
3889
|
-
trial_amount_discount?: string | null;
|
|
3890
|
-
|
|
3891
3734
|
/**
|
|
3892
3735
|
* Only available if discount_type is `usage`. Number of usage units that this
|
|
3893
3736
|
* discount is for
|
|
@@ -3947,23 +3790,12 @@ export namespace SubscriptionCreateParams {
|
|
|
3947
3790
|
*/
|
|
3948
3791
|
amount_discount?: string | null;
|
|
3949
3792
|
|
|
3950
|
-
/**
|
|
3951
|
-
* List of price_ids that this discount applies to. For plan/plan phase discounts,
|
|
3952
|
-
* this can be a subset of prices.
|
|
3953
|
-
*/
|
|
3954
|
-
applies_to_price_ids?: Array<string> | null;
|
|
3955
|
-
|
|
3956
3793
|
/**
|
|
3957
3794
|
* Only available if discount_type is `percentage`. This is a number between 0
|
|
3958
3795
|
* and 1.
|
|
3959
3796
|
*/
|
|
3960
3797
|
percentage_discount?: number | null;
|
|
3961
3798
|
|
|
3962
|
-
/**
|
|
3963
|
-
* Only available if discount_type is `trial`
|
|
3964
|
-
*/
|
|
3965
|
-
trial_amount_discount?: string | null;
|
|
3966
|
-
|
|
3967
3799
|
/**
|
|
3968
3800
|
* Only available if discount_type is `usage`. Number of usage units that this
|
|
3969
3801
|
* discount is for
|
|
@@ -7186,6 +7018,12 @@ export interface SubscriptionSchedulePlanChangeParams {
|
|
|
7186
7018
|
*/
|
|
7187
7019
|
plan_id?: string | null;
|
|
7188
7020
|
|
|
7021
|
+
/**
|
|
7022
|
+
* Specifies which version of the plan to change to. If null, the default version
|
|
7023
|
+
* will be used.
|
|
7024
|
+
*/
|
|
7025
|
+
plan_version_number?: number | null;
|
|
7026
|
+
|
|
7189
7027
|
/**
|
|
7190
7028
|
* Optionally provide a list of overrides for prices on the plan
|
|
7191
7029
|
*/
|
|
@@ -7210,6 +7048,13 @@ export interface SubscriptionSchedulePlanChangeParams {
|
|
|
7210
7048
|
| SubscriptionSchedulePlanChangeParams.OverrideUnitWithProrationPrice
|
|
7211
7049
|
| SubscriptionSchedulePlanChangeParams.OverrideTieredWithProrationPrice
|
|
7212
7050
|
> | null;
|
|
7051
|
+
|
|
7052
|
+
/**
|
|
7053
|
+
* The duration of the trial period in days. If not provided, this defaults to the
|
|
7054
|
+
* value specified in the plan. If `0` is provided, the trial on the plan will be
|
|
7055
|
+
* skipped.
|
|
7056
|
+
*/
|
|
7057
|
+
trial_duration_days?: number | null;
|
|
7213
7058
|
}
|
|
7214
7059
|
|
|
7215
7060
|
export namespace SubscriptionSchedulePlanChangeParams {
|
|
@@ -7271,23 +7116,12 @@ export namespace SubscriptionSchedulePlanChangeParams {
|
|
|
7271
7116
|
*/
|
|
7272
7117
|
amount_discount?: string | null;
|
|
7273
7118
|
|
|
7274
|
-
/**
|
|
7275
|
-
* List of price_ids that this discount applies to. For plan/plan phase discounts,
|
|
7276
|
-
* this can be a subset of prices.
|
|
7277
|
-
*/
|
|
7278
|
-
applies_to_price_ids?: Array<string> | null;
|
|
7279
|
-
|
|
7280
7119
|
/**
|
|
7281
7120
|
* Only available if discount_type is `percentage`. This is a number between 0
|
|
7282
7121
|
* and 1.
|
|
7283
7122
|
*/
|
|
7284
7123
|
percentage_discount?: number | null;
|
|
7285
7124
|
|
|
7286
|
-
/**
|
|
7287
|
-
* Only available if discount_type is `trial`
|
|
7288
|
-
*/
|
|
7289
|
-
trial_amount_discount?: string | null;
|
|
7290
|
-
|
|
7291
7125
|
/**
|
|
7292
7126
|
* Only available if discount_type is `usage`. Number of usage units that this
|
|
7293
7127
|
* discount is for
|
|
@@ -7360,23 +7194,12 @@ export namespace SubscriptionSchedulePlanChangeParams {
|
|
|
7360
7194
|
*/
|
|
7361
7195
|
amount_discount?: string | null;
|
|
7362
7196
|
|
|
7363
|
-
/**
|
|
7364
|
-
* List of price_ids that this discount applies to. For plan/plan phase discounts,
|
|
7365
|
-
* this can be a subset of prices.
|
|
7366
|
-
*/
|
|
7367
|
-
applies_to_price_ids?: Array<string> | null;
|
|
7368
|
-
|
|
7369
7197
|
/**
|
|
7370
7198
|
* Only available if discount_type is `percentage`. This is a number between 0
|
|
7371
7199
|
* and 1.
|
|
7372
7200
|
*/
|
|
7373
7201
|
percentage_discount?: number | null;
|
|
7374
7202
|
|
|
7375
|
-
/**
|
|
7376
|
-
* Only available if discount_type is `trial`
|
|
7377
|
-
*/
|
|
7378
|
-
trial_amount_discount?: string | null;
|
|
7379
|
-
|
|
7380
7203
|
/**
|
|
7381
7204
|
* Only available if discount_type is `usage`. Number of usage units that this
|
|
7382
7205
|
* discount is for
|
|
@@ -7469,23 +7292,12 @@ export namespace SubscriptionSchedulePlanChangeParams {
|
|
|
7469
7292
|
*/
|
|
7470
7293
|
amount_discount?: string | null;
|
|
7471
7294
|
|
|
7472
|
-
/**
|
|
7473
|
-
* List of price_ids that this discount applies to. For plan/plan phase discounts,
|
|
7474
|
-
* this can be a subset of prices.
|
|
7475
|
-
*/
|
|
7476
|
-
applies_to_price_ids?: Array<string> | null;
|
|
7477
|
-
|
|
7478
7295
|
/**
|
|
7479
7296
|
* Only available if discount_type is `percentage`. This is a number between 0
|
|
7480
7297
|
* and 1.
|
|
7481
7298
|
*/
|
|
7482
7299
|
percentage_discount?: number | null;
|
|
7483
7300
|
|
|
7484
|
-
/**
|
|
7485
|
-
* Only available if discount_type is `trial`
|
|
7486
|
-
*/
|
|
7487
|
-
trial_amount_discount?: string | null;
|
|
7488
|
-
|
|
7489
7301
|
/**
|
|
7490
7302
|
* Only available if discount_type is `usage`. Number of usage units that this
|
|
7491
7303
|
* discount is for
|
|
@@ -7571,23 +7383,12 @@ export namespace SubscriptionSchedulePlanChangeParams {
|
|
|
7571
7383
|
*/
|
|
7572
7384
|
amount_discount?: string | null;
|
|
7573
7385
|
|
|
7574
|
-
/**
|
|
7575
|
-
* List of price_ids that this discount applies to. For plan/plan phase discounts,
|
|
7576
|
-
* this can be a subset of prices.
|
|
7577
|
-
*/
|
|
7578
|
-
applies_to_price_ids?: Array<string> | null;
|
|
7579
|
-
|
|
7580
7386
|
/**
|
|
7581
7387
|
* Only available if discount_type is `percentage`. This is a number between 0
|
|
7582
7388
|
* and 1.
|
|
7583
7389
|
*/
|
|
7584
7390
|
percentage_discount?: number | null;
|
|
7585
7391
|
|
|
7586
|
-
/**
|
|
7587
|
-
* Only available if discount_type is `trial`
|
|
7588
|
-
*/
|
|
7589
|
-
trial_amount_discount?: string | null;
|
|
7590
|
-
|
|
7591
7392
|
/**
|
|
7592
7393
|
* Only available if discount_type is `usage`. Number of usage units that this
|
|
7593
7394
|
* discount is for
|
|
@@ -7679,23 +7480,12 @@ export namespace SubscriptionSchedulePlanChangeParams {
|
|
|
7679
7480
|
*/
|
|
7680
7481
|
amount_discount?: string | null;
|
|
7681
7482
|
|
|
7682
|
-
/**
|
|
7683
|
-
* List of price_ids that this discount applies to. For plan/plan phase discounts,
|
|
7684
|
-
* this can be a subset of prices.
|
|
7685
|
-
*/
|
|
7686
|
-
applies_to_price_ids?: Array<string> | null;
|
|
7687
|
-
|
|
7688
7483
|
/**
|
|
7689
7484
|
* Only available if discount_type is `percentage`. This is a number between 0
|
|
7690
7485
|
* and 1.
|
|
7691
7486
|
*/
|
|
7692
7487
|
percentage_discount?: number | null;
|
|
7693
7488
|
|
|
7694
|
-
/**
|
|
7695
|
-
* Only available if discount_type is `trial`
|
|
7696
|
-
*/
|
|
7697
|
-
trial_amount_discount?: string | null;
|
|
7698
|
-
|
|
7699
7489
|
/**
|
|
7700
7490
|
* Only available if discount_type is `usage`. Number of usage units that this
|
|
7701
7491
|
* discount is for
|
|
@@ -7767,23 +7557,12 @@ export namespace SubscriptionSchedulePlanChangeParams {
|
|
|
7767
7557
|
*/
|
|
7768
7558
|
amount_discount?: string | null;
|
|
7769
7559
|
|
|
7770
|
-
/**
|
|
7771
|
-
* List of price_ids that this discount applies to. For plan/plan phase discounts,
|
|
7772
|
-
* this can be a subset of prices.
|
|
7773
|
-
*/
|
|
7774
|
-
applies_to_price_ids?: Array<string> | null;
|
|
7775
|
-
|
|
7776
7560
|
/**
|
|
7777
7561
|
* Only available if discount_type is `percentage`. This is a number between 0
|
|
7778
7562
|
* and 1.
|
|
7779
7563
|
*/
|
|
7780
7564
|
percentage_discount?: number | null;
|
|
7781
7565
|
|
|
7782
|
-
/**
|
|
7783
|
-
* Only available if discount_type is `trial`
|
|
7784
|
-
*/
|
|
7785
|
-
trial_amount_discount?: string | null;
|
|
7786
|
-
|
|
7787
7566
|
/**
|
|
7788
7567
|
* Only available if discount_type is `usage`. Number of usage units that this
|
|
7789
7568
|
* discount is for
|
|
@@ -7870,23 +7649,12 @@ export namespace SubscriptionSchedulePlanChangeParams {
|
|
|
7870
7649
|
*/
|
|
7871
7650
|
amount_discount?: string | null;
|
|
7872
7651
|
|
|
7873
|
-
/**
|
|
7874
|
-
* List of price_ids that this discount applies to. For plan/plan phase discounts,
|
|
7875
|
-
* this can be a subset of prices.
|
|
7876
|
-
*/
|
|
7877
|
-
applies_to_price_ids?: Array<string> | null;
|
|
7878
|
-
|
|
7879
7652
|
/**
|
|
7880
7653
|
* Only available if discount_type is `percentage`. This is a number between 0
|
|
7881
7654
|
* and 1.
|
|
7882
7655
|
*/
|
|
7883
7656
|
percentage_discount?: number | null;
|
|
7884
7657
|
|
|
7885
|
-
/**
|
|
7886
|
-
* Only available if discount_type is `trial`
|
|
7887
|
-
*/
|
|
7888
|
-
trial_amount_discount?: string | null;
|
|
7889
|
-
|
|
7890
7658
|
/**
|
|
7891
7659
|
* Only available if discount_type is `usage`. Number of usage units that this
|
|
7892
7660
|
* discount is for
|
|
@@ -7967,23 +7735,12 @@ export namespace SubscriptionSchedulePlanChangeParams {
|
|
|
7967
7735
|
*/
|
|
7968
7736
|
amount_discount?: string | null;
|
|
7969
7737
|
|
|
7970
|
-
/**
|
|
7971
|
-
* List of price_ids that this discount applies to. For plan/plan phase discounts,
|
|
7972
|
-
* this can be a subset of prices.
|
|
7973
|
-
*/
|
|
7974
|
-
applies_to_price_ids?: Array<string> | null;
|
|
7975
|
-
|
|
7976
7738
|
/**
|
|
7977
7739
|
* Only available if discount_type is `percentage`. This is a number between 0
|
|
7978
7740
|
* and 1.
|
|
7979
7741
|
*/
|
|
7980
7742
|
percentage_discount?: number | null;
|
|
7981
7743
|
|
|
7982
|
-
/**
|
|
7983
|
-
* Only available if discount_type is `trial`
|
|
7984
|
-
*/
|
|
7985
|
-
trial_amount_discount?: string | null;
|
|
7986
|
-
|
|
7987
7744
|
/**
|
|
7988
7745
|
* Only available if discount_type is `usage`. Number of usage units that this
|
|
7989
7746
|
* discount is for
|
|
@@ -8043,23 +7800,12 @@ export namespace SubscriptionSchedulePlanChangeParams {
|
|
|
8043
7800
|
*/
|
|
8044
7801
|
amount_discount?: string | null;
|
|
8045
7802
|
|
|
8046
|
-
/**
|
|
8047
|
-
* List of price_ids that this discount applies to. For plan/plan phase discounts,
|
|
8048
|
-
* this can be a subset of prices.
|
|
8049
|
-
*/
|
|
8050
|
-
applies_to_price_ids?: Array<string> | null;
|
|
8051
|
-
|
|
8052
7803
|
/**
|
|
8053
7804
|
* Only available if discount_type is `percentage`. This is a number between 0
|
|
8054
7805
|
* and 1.
|
|
8055
7806
|
*/
|
|
8056
7807
|
percentage_discount?: number | null;
|
|
8057
7808
|
|
|
8058
|
-
/**
|
|
8059
|
-
* Only available if discount_type is `trial`
|
|
8060
|
-
*/
|
|
8061
|
-
trial_amount_discount?: string | null;
|
|
8062
|
-
|
|
8063
7809
|
/**
|
|
8064
7810
|
* Only available if discount_type is `usage`. Number of usage units that this
|
|
8065
7811
|
* discount is for
|
|
@@ -8119,23 +7865,12 @@ export namespace SubscriptionSchedulePlanChangeParams {
|
|
|
8119
7865
|
*/
|
|
8120
7866
|
amount_discount?: string | null;
|
|
8121
7867
|
|
|
8122
|
-
/**
|
|
8123
|
-
* List of price_ids that this discount applies to. For plan/plan phase discounts,
|
|
8124
|
-
* this can be a subset of prices.
|
|
8125
|
-
*/
|
|
8126
|
-
applies_to_price_ids?: Array<string> | null;
|
|
8127
|
-
|
|
8128
7868
|
/**
|
|
8129
7869
|
* Only available if discount_type is `percentage`. This is a number between 0
|
|
8130
7870
|
* and 1.
|
|
8131
7871
|
*/
|
|
8132
7872
|
percentage_discount?: number | null;
|
|
8133
7873
|
|
|
8134
|
-
/**
|
|
8135
|
-
* Only available if discount_type is `trial`
|
|
8136
|
-
*/
|
|
8137
|
-
trial_amount_discount?: string | null;
|
|
8138
|
-
|
|
8139
7874
|
/**
|
|
8140
7875
|
* Only available if discount_type is `usage`. Number of usage units that this
|
|
8141
7876
|
* discount is for
|
|
@@ -8195,23 +7930,12 @@ export namespace SubscriptionSchedulePlanChangeParams {
|
|
|
8195
7930
|
*/
|
|
8196
7931
|
amount_discount?: string | null;
|
|
8197
7932
|
|
|
8198
|
-
/**
|
|
8199
|
-
* List of price_ids that this discount applies to. For plan/plan phase discounts,
|
|
8200
|
-
* this can be a subset of prices.
|
|
8201
|
-
*/
|
|
8202
|
-
applies_to_price_ids?: Array<string> | null;
|
|
8203
|
-
|
|
8204
7933
|
/**
|
|
8205
7934
|
* Only available if discount_type is `percentage`. This is a number between 0
|
|
8206
7935
|
* and 1.
|
|
8207
7936
|
*/
|
|
8208
7937
|
percentage_discount?: number | null;
|
|
8209
7938
|
|
|
8210
|
-
/**
|
|
8211
|
-
* Only available if discount_type is `trial`
|
|
8212
|
-
*/
|
|
8213
|
-
trial_amount_discount?: string | null;
|
|
8214
|
-
|
|
8215
7939
|
/**
|
|
8216
7940
|
* Only available if discount_type is `usage`. Number of usage units that this
|
|
8217
7941
|
* discount is for
|
|
@@ -8271,23 +7995,12 @@ export namespace SubscriptionSchedulePlanChangeParams {
|
|
|
8271
7995
|
*/
|
|
8272
7996
|
amount_discount?: string | null;
|
|
8273
7997
|
|
|
8274
|
-
/**
|
|
8275
|
-
* List of price_ids that this discount applies to. For plan/plan phase discounts,
|
|
8276
|
-
* this can be a subset of prices.
|
|
8277
|
-
*/
|
|
8278
|
-
applies_to_price_ids?: Array<string> | null;
|
|
8279
|
-
|
|
8280
7998
|
/**
|
|
8281
7999
|
* Only available if discount_type is `percentage`. This is a number between 0
|
|
8282
8000
|
* and 1.
|
|
8283
8001
|
*/
|
|
8284
8002
|
percentage_discount?: number | null;
|
|
8285
8003
|
|
|
8286
|
-
/**
|
|
8287
|
-
* Only available if discount_type is `trial`
|
|
8288
|
-
*/
|
|
8289
|
-
trial_amount_discount?: string | null;
|
|
8290
|
-
|
|
8291
8004
|
/**
|
|
8292
8005
|
* Only available if discount_type is `usage`. Number of usage units that this
|
|
8293
8006
|
* discount is for
|
|
@@ -8347,23 +8060,12 @@ export namespace SubscriptionSchedulePlanChangeParams {
|
|
|
8347
8060
|
*/
|
|
8348
8061
|
amount_discount?: string | null;
|
|
8349
8062
|
|
|
8350
|
-
/**
|
|
8351
|
-
* List of price_ids that this discount applies to. For plan/plan phase discounts,
|
|
8352
|
-
* this can be a subset of prices.
|
|
8353
|
-
*/
|
|
8354
|
-
applies_to_price_ids?: Array<string> | null;
|
|
8355
|
-
|
|
8356
8063
|
/**
|
|
8357
8064
|
* Only available if discount_type is `percentage`. This is a number between 0
|
|
8358
8065
|
* and 1.
|
|
8359
8066
|
*/
|
|
8360
8067
|
percentage_discount?: number | null;
|
|
8361
8068
|
|
|
8362
|
-
/**
|
|
8363
|
-
* Only available if discount_type is `trial`
|
|
8364
|
-
*/
|
|
8365
|
-
trial_amount_discount?: string | null;
|
|
8366
|
-
|
|
8367
8069
|
/**
|
|
8368
8070
|
* Only available if discount_type is `usage`. Number of usage units that this
|
|
8369
8071
|
* discount is for
|
|
@@ -8423,23 +8125,12 @@ export namespace SubscriptionSchedulePlanChangeParams {
|
|
|
8423
8125
|
*/
|
|
8424
8126
|
amount_discount?: string | null;
|
|
8425
8127
|
|
|
8426
|
-
/**
|
|
8427
|
-
* List of price_ids that this discount applies to. For plan/plan phase discounts,
|
|
8428
|
-
* this can be a subset of prices.
|
|
8429
|
-
*/
|
|
8430
|
-
applies_to_price_ids?: Array<string> | null;
|
|
8431
|
-
|
|
8432
8128
|
/**
|
|
8433
8129
|
* Only available if discount_type is `percentage`. This is a number between 0
|
|
8434
8130
|
* and 1.
|
|
8435
8131
|
*/
|
|
8436
8132
|
percentage_discount?: number | null;
|
|
8437
8133
|
|
|
8438
|
-
/**
|
|
8439
|
-
* Only available if discount_type is `trial`
|
|
8440
|
-
*/
|
|
8441
|
-
trial_amount_discount?: string | null;
|
|
8442
|
-
|
|
8443
8134
|
/**
|
|
8444
8135
|
* Only available if discount_type is `usage`. Number of usage units that this
|
|
8445
8136
|
* discount is for
|
|
@@ -8499,23 +8190,12 @@ export namespace SubscriptionSchedulePlanChangeParams {
|
|
|
8499
8190
|
*/
|
|
8500
8191
|
amount_discount?: string | null;
|
|
8501
8192
|
|
|
8502
|
-
/**
|
|
8503
|
-
* List of price_ids that this discount applies to. For plan/plan phase discounts,
|
|
8504
|
-
* this can be a subset of prices.
|
|
8505
|
-
*/
|
|
8506
|
-
applies_to_price_ids?: Array<string> | null;
|
|
8507
|
-
|
|
8508
8193
|
/**
|
|
8509
8194
|
* Only available if discount_type is `percentage`. This is a number between 0
|
|
8510
8195
|
* and 1.
|
|
8511
8196
|
*/
|
|
8512
8197
|
percentage_discount?: number | null;
|
|
8513
8198
|
|
|
8514
|
-
/**
|
|
8515
|
-
* Only available if discount_type is `trial`
|
|
8516
|
-
*/
|
|
8517
|
-
trial_amount_discount?: string | null;
|
|
8518
|
-
|
|
8519
8199
|
/**
|
|
8520
8200
|
* Only available if discount_type is `usage`. Number of usage units that this
|
|
8521
8201
|
* discount is for
|
|
@@ -8575,23 +8255,12 @@ export namespace SubscriptionSchedulePlanChangeParams {
|
|
|
8575
8255
|
*/
|
|
8576
8256
|
amount_discount?: string | null;
|
|
8577
8257
|
|
|
8578
|
-
/**
|
|
8579
|
-
* List of price_ids that this discount applies to. For plan/plan phase discounts,
|
|
8580
|
-
* this can be a subset of prices.
|
|
8581
|
-
*/
|
|
8582
|
-
applies_to_price_ids?: Array<string> | null;
|
|
8583
|
-
|
|
8584
8258
|
/**
|
|
8585
8259
|
* Only available if discount_type is `percentage`. This is a number between 0
|
|
8586
8260
|
* and 1.
|
|
8587
8261
|
*/
|
|
8588
8262
|
percentage_discount?: number | null;
|
|
8589
8263
|
|
|
8590
|
-
/**
|
|
8591
|
-
* Only available if discount_type is `trial`
|
|
8592
|
-
*/
|
|
8593
|
-
trial_amount_discount?: string | null;
|
|
8594
|
-
|
|
8595
8264
|
/**
|
|
8596
8265
|
* Only available if discount_type is `usage`. Number of usage units that this
|
|
8597
8266
|
* discount is for
|
|
@@ -8651,23 +8320,12 @@ export namespace SubscriptionSchedulePlanChangeParams {
|
|
|
8651
8320
|
*/
|
|
8652
8321
|
amount_discount?: string | null;
|
|
8653
8322
|
|
|
8654
|
-
/**
|
|
8655
|
-
* List of price_ids that this discount applies to. For plan/plan phase discounts,
|
|
8656
|
-
* this can be a subset of prices.
|
|
8657
|
-
*/
|
|
8658
|
-
applies_to_price_ids?: Array<string> | null;
|
|
8659
|
-
|
|
8660
8323
|
/**
|
|
8661
8324
|
* Only available if discount_type is `percentage`. This is a number between 0
|
|
8662
8325
|
* and 1.
|
|
8663
8326
|
*/
|
|
8664
8327
|
percentage_discount?: number | null;
|
|
8665
8328
|
|
|
8666
|
-
/**
|
|
8667
|
-
* Only available if discount_type is `trial`
|
|
8668
|
-
*/
|
|
8669
|
-
trial_amount_discount?: string | null;
|
|
8670
|
-
|
|
8671
8329
|
/**
|
|
8672
8330
|
* Only available if discount_type is `usage`. Number of usage units that this
|
|
8673
8331
|
* discount is for
|
|
@@ -8727,23 +8385,12 @@ export namespace SubscriptionSchedulePlanChangeParams {
|
|
|
8727
8385
|
*/
|
|
8728
8386
|
amount_discount?: string | null;
|
|
8729
8387
|
|
|
8730
|
-
/**
|
|
8731
|
-
* List of price_ids that this discount applies to. For plan/plan phase discounts,
|
|
8732
|
-
* this can be a subset of prices.
|
|
8733
|
-
*/
|
|
8734
|
-
applies_to_price_ids?: Array<string> | null;
|
|
8735
|
-
|
|
8736
8388
|
/**
|
|
8737
8389
|
* Only available if discount_type is `percentage`. This is a number between 0
|
|
8738
8390
|
* and 1.
|
|
8739
8391
|
*/
|
|
8740
8392
|
percentage_discount?: number | null;
|
|
8741
8393
|
|
|
8742
|
-
/**
|
|
8743
|
-
* Only available if discount_type is `trial`
|
|
8744
|
-
*/
|
|
8745
|
-
trial_amount_discount?: string | null;
|
|
8746
|
-
|
|
8747
8394
|
/**
|
|
8748
8395
|
* Only available if discount_type is `usage`. Number of usage units that this
|
|
8749
8396
|
* discount is for
|
|
@@ -8803,23 +8450,12 @@ export namespace SubscriptionSchedulePlanChangeParams {
|
|
|
8803
8450
|
*/
|
|
8804
8451
|
amount_discount?: string | null;
|
|
8805
8452
|
|
|
8806
|
-
/**
|
|
8807
|
-
* List of price_ids that this discount applies to. For plan/plan phase discounts,
|
|
8808
|
-
* this can be a subset of prices.
|
|
8809
|
-
*/
|
|
8810
|
-
applies_to_price_ids?: Array<string> | null;
|
|
8811
|
-
|
|
8812
8453
|
/**
|
|
8813
8454
|
* Only available if discount_type is `percentage`. This is a number between 0
|
|
8814
8455
|
* and 1.
|
|
8815
8456
|
*/
|
|
8816
8457
|
percentage_discount?: number | null;
|
|
8817
8458
|
|
|
8818
|
-
/**
|
|
8819
|
-
* Only available if discount_type is `trial`
|
|
8820
|
-
*/
|
|
8821
|
-
trial_amount_discount?: string | null;
|
|
8822
|
-
|
|
8823
8459
|
/**
|
|
8824
8460
|
* Only available if discount_type is `usage`. Number of usage units that this
|
|
8825
8461
|
* discount is for
|
|
@@ -8867,6 +8503,20 @@ export interface SubscriptionUpdateFixedFeeQuantityParams {
|
|
|
8867
8503
|
effective_date?: string | null;
|
|
8868
8504
|
}
|
|
8869
8505
|
|
|
8506
|
+
export interface SubscriptionUpdateTrialParams {
|
|
8507
|
+
/**
|
|
8508
|
+
* The new date that the trial should end, or the literal string `immediate` to end
|
|
8509
|
+
* the trial immediately.
|
|
8510
|
+
*/
|
|
8511
|
+
trial_end_date: (string & {}) | 'immediate';
|
|
8512
|
+
|
|
8513
|
+
/**
|
|
8514
|
+
* If true, shifts subsequent price and adjustment intervals (preserving their
|
|
8515
|
+
* durations, but adjusting their absolute dates).
|
|
8516
|
+
*/
|
|
8517
|
+
shift?: boolean;
|
|
8518
|
+
}
|
|
8519
|
+
|
|
8870
8520
|
export namespace Subscriptions {
|
|
8871
8521
|
export import Subscription = SubscriptionsAPI.Subscription;
|
|
8872
8522
|
export import SubscriptionUsage = SubscriptionsAPI.SubscriptionUsage;
|
|
@@ -8887,4 +8537,5 @@ export namespace Subscriptions {
|
|
|
8887
8537
|
export import SubscriptionTriggerPhaseParams = SubscriptionsAPI.SubscriptionTriggerPhaseParams;
|
|
8888
8538
|
export import SubscriptionUnscheduleFixedFeeQuantityUpdatesParams = SubscriptionsAPI.SubscriptionUnscheduleFixedFeeQuantityUpdatesParams;
|
|
8889
8539
|
export import SubscriptionUpdateFixedFeeQuantityParams = SubscriptionsAPI.SubscriptionUpdateFixedFeeQuantityParams;
|
|
8540
|
+
export import SubscriptionUpdateTrialParams = SubscriptionsAPI.SubscriptionUpdateTrialParams;
|
|
8890
8541
|
}
|