@@ -651,6 +651,7 @@ def cancel(
651
651
subscription_id : str ,
652
652
* ,
653
653
cancel_option : Literal ["end_of_subscription_term" , "immediate" , "requested_date" ],
654
+ allow_invoice_credit_or_void : Optional [bool ] | NotGiven = NOT_GIVEN ,
654
655
cancellation_date : Union [str , datetime , None ] | NotGiven = NOT_GIVEN ,
655
656
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
656
657
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -727,6 +728,10 @@ def cancel(
727
728
Args:
728
729
cancel_option: Determines the timing of subscription cancellation
729
730
731
+ allow_invoice_credit_or_void: If false, this request will fail if it would void an issued invoice or create a
732
+ credit note. Consider using this as a safety mechanism if you do not expect
733
+ existing invoices to be changed.
734
+
730
735
cancellation_date: The date that the cancellation should take effect. This parameter can only be
731
736
passed if the `cancel_option` is `requested_date`.
732
737
@@ -747,6 +752,7 @@ def cancel(
747
752
body = maybe_transform (
748
753
{
749
754
"cancel_option" : cancel_option ,
755
+ "allow_invoice_credit_or_void" : allow_invoice_credit_or_void ,
750
756
"cancellation_date" : cancellation_date ,
751
757
},
752
758
subscription_cancel_params .SubscriptionCancelParams ,
@@ -1207,6 +1213,7 @@ def price_intervals(
1207
1213
* ,
1208
1214
add : Iterable [subscription_price_intervals_params .Add ] | NotGiven = NOT_GIVEN ,
1209
1215
add_adjustments : Iterable [subscription_price_intervals_params .AddAdjustment ] | NotGiven = NOT_GIVEN ,
1216
+ allow_invoice_credit_or_void : Optional [bool ] | NotGiven = NOT_GIVEN ,
1210
1217
edit : Iterable [subscription_price_intervals_params .Edit ] | NotGiven = NOT_GIVEN ,
1211
1218
edit_adjustments : Iterable [subscription_price_intervals_params .EditAdjustment ] | NotGiven = NOT_GIVEN ,
1212
1219
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -1296,6 +1303,10 @@ def price_intervals(
1296
1303
1297
1304
add_adjustments: A list of adjustments to add to the subscription.
1298
1305
1306
+ allow_invoice_credit_or_void: If false, this request will fail if it would void an issued invoice or create a
1307
+ credit note. Consider using this as a safety mechanism if you do not expect
1308
+ existing invoices to be changed.
1309
+
1299
1310
edit: A list of price intervals to edit on the subscription.
1300
1311
1301
1312
edit_adjustments: A list of adjustments to edit on the subscription.
@@ -1318,6 +1329,7 @@ def price_intervals(
1318
1329
{
1319
1330
"add" : add ,
1320
1331
"add_adjustments" : add_adjustments ,
1332
+ "allow_invoice_credit_or_void" : allow_invoice_credit_or_void ,
1321
1333
"edit" : edit ,
1322
1334
"edit_adjustments" : edit_adjustments ,
1323
1335
},
@@ -1693,6 +1705,7 @@ def trigger_phase(
1693
1705
self ,
1694
1706
subscription_id : str ,
1695
1707
* ,
1708
+ allow_invoice_credit_or_void : Optional [bool ] | NotGiven = NOT_GIVEN ,
1696
1709
effective_date : Union [str , date , None ] | NotGiven = NOT_GIVEN ,
1697
1710
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1698
1711
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -1707,6 +1720,10 @@ def trigger_phase(
1707
1720
specified).
1708
1721
1709
1722
Args:
1723
+ allow_invoice_credit_or_void: If false, this request will fail if it would void an issued invoice or create a
1724
+ credit note. Consider using this as a safety mechanism if you do not expect
1725
+ existing invoices to be changed.
1726
+
1710
1727
effective_date: The date on which the phase change should take effect. If not provided, defaults
1711
1728
to today in the customer's timezone.
1712
1729
@@ -1725,7 +1742,11 @@ def trigger_phase(
1725
1742
return self ._post (
1726
1743
f"/subscriptions/{ subscription_id } /trigger_phase" ,
1727
1744
body = maybe_transform (
1728
- {"effective_date" : effective_date }, subscription_trigger_phase_params .SubscriptionTriggerPhaseParams
1745
+ {
1746
+ "allow_invoice_credit_or_void" : allow_invoice_credit_or_void ,
1747
+ "effective_date" : effective_date ,
1748
+ },
1749
+ subscription_trigger_phase_params .SubscriptionTriggerPhaseParams ,
1729
1750
),
1730
1751
options = make_request_options (
1731
1752
extra_headers = extra_headers ,
@@ -1880,6 +1901,7 @@ def update_fixed_fee_quantity(
1880
1901
* ,
1881
1902
price_id : str ,
1882
1903
quantity : float ,
1904
+ allow_invoice_credit_or_void : Optional [bool ] | NotGiven = NOT_GIVEN ,
1883
1905
change_option : Literal ["immediate" , "upcoming_invoice" , "effective_date" ] | NotGiven = NOT_GIVEN ,
1884
1906
effective_date : Union [str , date , None ] | NotGiven = NOT_GIVEN ,
1885
1907
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -1909,6 +1931,10 @@ def update_fixed_fee_quantity(
1909
1931
Args:
1910
1932
price_id: Price for which the quantity should be updated. Must be a fixed fee.
1911
1933
1934
+ allow_invoice_credit_or_void: If false, this request will fail if it would void an issued invoice or create a
1935
+ credit note. Consider using this as a safety mechanism if you do not expect
1936
+ existing invoices to be changed.
1937
+
1912
1938
change_option: Determines when the change takes effect. Note that if `effective_date` is
1913
1939
specified, this defaults to `effective_date`. Otherwise, this defaults to
1914
1940
`immediate` unless it's explicitly set to `upcoming_invoice.
@@ -1935,6 +1961,7 @@ def update_fixed_fee_quantity(
1935
1961
{
1936
1962
"price_id" : price_id ,
1937
1963
"quantity" : quantity ,
1964
+ "allow_invoice_credit_or_void" : allow_invoice_credit_or_void ,
1938
1965
"change_option" : change_option ,
1939
1966
"effective_date" : effective_date ,
1940
1967
},
@@ -2619,6 +2646,7 @@ async def cancel(
2619
2646
subscription_id : str ,
2620
2647
* ,
2621
2648
cancel_option : Literal ["end_of_subscription_term" , "immediate" , "requested_date" ],
2649
+ allow_invoice_credit_or_void : Optional [bool ] | NotGiven = NOT_GIVEN ,
2622
2650
cancellation_date : Union [str , datetime , None ] | NotGiven = NOT_GIVEN ,
2623
2651
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
2624
2652
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -2695,6 +2723,10 @@ async def cancel(
2695
2723
Args:
2696
2724
cancel_option: Determines the timing of subscription cancellation
2697
2725
2726
+ allow_invoice_credit_or_void: If false, this request will fail if it would void an issued invoice or create a
2727
+ credit note. Consider using this as a safety mechanism if you do not expect
2728
+ existing invoices to be changed.
2729
+
2698
2730
cancellation_date: The date that the cancellation should take effect. This parameter can only be
2699
2731
passed if the `cancel_option` is `requested_date`.
2700
2732
@@ -2715,6 +2747,7 @@ async def cancel(
2715
2747
body = await async_maybe_transform (
2716
2748
{
2717
2749
"cancel_option" : cancel_option ,
2750
+ "allow_invoice_credit_or_void" : allow_invoice_credit_or_void ,
2718
2751
"cancellation_date" : cancellation_date ,
2719
2752
},
2720
2753
subscription_cancel_params .SubscriptionCancelParams ,
@@ -3175,6 +3208,7 @@ async def price_intervals(
3175
3208
* ,
3176
3209
add : Iterable [subscription_price_intervals_params .Add ] | NotGiven = NOT_GIVEN ,
3177
3210
add_adjustments : Iterable [subscription_price_intervals_params .AddAdjustment ] | NotGiven = NOT_GIVEN ,
3211
+ allow_invoice_credit_or_void : Optional [bool ] | NotGiven = NOT_GIVEN ,
3178
3212
edit : Iterable [subscription_price_intervals_params .Edit ] | NotGiven = NOT_GIVEN ,
3179
3213
edit_adjustments : Iterable [subscription_price_intervals_params .EditAdjustment ] | NotGiven = NOT_GIVEN ,
3180
3214
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -3264,6 +3298,10 @@ async def price_intervals(
3264
3298
3265
3299
add_adjustments: A list of adjustments to add to the subscription.
3266
3300
3301
+ allow_invoice_credit_or_void: If false, this request will fail if it would void an issued invoice or create a
3302
+ credit note. Consider using this as a safety mechanism if you do not expect
3303
+ existing invoices to be changed.
3304
+
3267
3305
edit: A list of price intervals to edit on the subscription.
3268
3306
3269
3307
edit_adjustments: A list of adjustments to edit on the subscription.
@@ -3286,6 +3324,7 @@ async def price_intervals(
3286
3324
{
3287
3325
"add" : add ,
3288
3326
"add_adjustments" : add_adjustments ,
3327
+ "allow_invoice_credit_or_void" : allow_invoice_credit_or_void ,
3289
3328
"edit" : edit ,
3290
3329
"edit_adjustments" : edit_adjustments ,
3291
3330
},
@@ -3661,6 +3700,7 @@ async def trigger_phase(
3661
3700
self ,
3662
3701
subscription_id : str ,
3663
3702
* ,
3703
+ allow_invoice_credit_or_void : Optional [bool ] | NotGiven = NOT_GIVEN ,
3664
3704
effective_date : Union [str , date , None ] | NotGiven = NOT_GIVEN ,
3665
3705
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
3666
3706
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -3675,6 +3715,10 @@ async def trigger_phase(
3675
3715
specified).
3676
3716
3677
3717
Args:
3718
+ allow_invoice_credit_or_void: If false, this request will fail if it would void an issued invoice or create a
3719
+ credit note. Consider using this as a safety mechanism if you do not expect
3720
+ existing invoices to be changed.
3721
+
3678
3722
effective_date: The date on which the phase change should take effect. If not provided, defaults
3679
3723
to today in the customer's timezone.
3680
3724
@@ -3693,7 +3737,11 @@ async def trigger_phase(
3693
3737
return await self ._post (
3694
3738
f"/subscriptions/{ subscription_id } /trigger_phase" ,
3695
3739
body = await async_maybe_transform (
3696
- {"effective_date" : effective_date }, subscription_trigger_phase_params .SubscriptionTriggerPhaseParams
3740
+ {
3741
+ "allow_invoice_credit_or_void" : allow_invoice_credit_or_void ,
3742
+ "effective_date" : effective_date ,
3743
+ },
3744
+ subscription_trigger_phase_params .SubscriptionTriggerPhaseParams ,
3697
3745
),
3698
3746
options = make_request_options (
3699
3747
extra_headers = extra_headers ,
@@ -3848,6 +3896,7 @@ async def update_fixed_fee_quantity(
3848
3896
* ,
3849
3897
price_id : str ,
3850
3898
quantity : float ,
3899
+ allow_invoice_credit_or_void : Optional [bool ] | NotGiven = NOT_GIVEN ,
3851
3900
change_option : Literal ["immediate" , "upcoming_invoice" , "effective_date" ] | NotGiven = NOT_GIVEN ,
3852
3901
effective_date : Union [str , date , None ] | NotGiven = NOT_GIVEN ,
3853
3902
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -3877,6 +3926,10 @@ async def update_fixed_fee_quantity(
3877
3926
Args:
3878
3927
price_id: Price for which the quantity should be updated. Must be a fixed fee.
3879
3928
3929
+ allow_invoice_credit_or_void: If false, this request will fail if it would void an issued invoice or create a
3930
+ credit note. Consider using this as a safety mechanism if you do not expect
3931
+ existing invoices to be changed.
3932
+
3880
3933
change_option: Determines when the change takes effect. Note that if `effective_date` is
3881
3934
specified, this defaults to `effective_date`. Otherwise, this defaults to
3882
3935
`immediate` unless it's explicitly set to `upcoming_invoice.
@@ -3903,6 +3956,7 @@ async def update_fixed_fee_quantity(
3903
3956
{
3904
3957
"price_id" : price_id ,
3905
3958
"quantity" : quantity ,
3959
+ "allow_invoice_credit_or_void" : allow_invoice_credit_or_void ,
3906
3960
"change_option" : change_option ,
3907
3961
"effective_date" : effective_date ,
3908
3962
},
0 commit comments