6
6
from datetime import datetime
7
7
from typing_extensions import Literal , Required , Annotated , TypedDict
8
8
9
+ from .shared import BillingCycleRelativeDate
9
10
from .._utils import PropertyInfo
10
11
11
12
__all__ = [
@@ -941,7 +942,7 @@ class AddPriceNewFloatingUnitWithPercentPrice(TypedDict, total=False):
941
942
942
943
class Add (TypedDict , total = False ):
943
944
start_date : Required [
944
- Annotated [Union [Union [str , datetime ], Literal [ "start_of_term" , "end_of_term" ] ], PropertyInfo (format = "iso8601" )]
945
+ Annotated [Union [Union [str , datetime ], BillingCycleRelativeDate ], PropertyInfo (format = "iso8601" )]
945
946
]
946
947
"""The start date of the price interval.
947
948
@@ -951,9 +952,7 @@ class Add(TypedDict, total=False):
951
952
discounts : Optional [Iterable [AddDiscount ]]
952
953
"""A list of discounts to initialize on the price interval."""
953
954
954
- end_date : Annotated [
955
- Union [Union [str , datetime ], Literal ["start_of_term" , "end_of_term" ], None ], PropertyInfo (format = "iso8601" )
956
- ]
955
+ end_date : Annotated [Union [Union [str , datetime ], BillingCycleRelativeDate , None ], PropertyInfo (format = "iso8601" )]
957
956
"""The end date of the price interval.
958
957
959
958
This is the date that the price will stop billing on the subscription.
@@ -1003,9 +1002,7 @@ class Edit(TypedDict, total=False):
1003
1002
overlapping price intervals must have the same billing cycle day.
1004
1003
"""
1005
1004
1006
- end_date : Annotated [
1007
- Union [Union [str , datetime ], Literal ["start_of_term" , "end_of_term" ], None ], PropertyInfo (format = "iso8601" )
1008
- ]
1005
+ end_date : Annotated [Union [Union [str , datetime ], BillingCycleRelativeDate , None ], PropertyInfo (format = "iso8601" )]
1009
1006
"""The updated end date of this price interval.
1010
1007
1011
1008
If not specified, the start date will not be updated.
@@ -1018,9 +1015,7 @@ class Edit(TypedDict, total=False):
1018
1015
on the price interval.
1019
1016
"""
1020
1017
1021
- start_date : Annotated [
1022
- Union [Union [str , datetime ], Literal ["start_of_term" , "end_of_term" ]], PropertyInfo (format = "iso8601" )
1023
- ]
1018
+ start_date : Annotated [Union [Union [str , datetime ], BillingCycleRelativeDate ], PropertyInfo (format = "iso8601" )]
1024
1019
"""The updated start date of this price interval.
1025
1020
1026
1021
If not specified, the start date will not be updated.
0 commit comments