22
33from  __future__ import  annotations 
44
5- from  typing  import  List , Optional 
5+ from  typing  import  List , Iterable ,  Optional 
66from  typing_extensions  import  Literal , Required , TypedDict 
77
8- __all__  =  ["TrialDiscount" ]
8+ __all__  =  ["TrialDiscount" , "Filter" ]
9+ 
10+ 
11+ class  Filter (TypedDict , total = False ):
12+     field : Required [Literal ["price_id" , "item_id" , "price_type" , "currency" , "pricing_unit_id" ]]
13+     """The property of the price to filter on.""" 
14+ 
15+     operator : Required [Literal ["includes" , "excludes" ]]
16+     """Should prices that match the filter be included or excluded.""" 
17+ 
18+     values : Required [List [str ]]
19+     """The IDs or values that match this filter.""" 
920
1021
1122class  TrialDiscount (TypedDict , total = False ):
@@ -17,6 +28,9 @@ class TrialDiscount(TypedDict, total=False):
1728    For plan/plan phase discounts, this can be a subset of prices. 
1829    """ 
1930
31+     filters : Optional [Iterable [Filter ]]
32+     """The filters that determine which prices to apply this discount to.""" 
33+ 
2034    reason : Optional [str ]
2135
2236    trial_amount_discount : Optional [str ]
0 commit comments