
    <@g3                     ~    d dl mZ d dlmZ d dlmZ d dlmZ d dlm	Z	 d dl
mZmZmZ d dlmZmZmZ  G d d	e      Zy
)    )
ListObject)PromotionCode)RequestOptions)StripeService)sanitize_id)DictListcast)LiteralNotRequired	TypedDictc            	          e Zd Z G d de      Z G d de      Z G d de      Z G d de      Z G d	 d
e      Z G d de      Z	 G d de      Z
 G d de      Z G d de      Zi i fdddedee   fdZi i fdddedee   fdZi fdddedefdZi fdddedefdZi i fdedddedefdZi i fdedddedefdZi i fdedd dedefd!Zi i fdedd dedefd"Zy#)$PromotionCodeServicec                       e Zd ZU ee   ed<   	 ee   ed<   	 eed<   	 ee   ed<   	 eee      ed<   	 ee   ed<   	 ee   ed<   	 ee	eef      ed<   	 ed	   ed
<   y)!PromotionCodeService.CreateParamsactivecodecouponcustomerexpand
expires_atmax_redemptionsmetadata-PromotionCodeService.CreateParamsRestrictionsrestrictionsN)
__name__
__module____qualname__r   bool__annotations__strr	   intr        ]/var/www/html/AdoubleTech/venv/lib/python3.12/site-packages/stripe/_promotion_code_service.pyCreateParamsr      s    D!!	 #	
 	 c""	 DI&&	  $$	 %S))	 d38n--	 ";
 	
	r$   r&   c                   ^    e Zd ZU eeedf      ed<   	 ee   ed<   	 ee   ed<   	 ee   ed<   y)r   <PromotionCodeService.CreateParamsRestrictionsCurrencyOptionscurrency_optionsfirst_time_transactionminimum_amountminimum_amount_currencyN)	r   r   r   r   r   r!   r    r   r"   r#   r$   r%   CreateParamsRestrictionsz-PromotionCodeService.CreateParamsRestrictions7   s^    %NP
 	
	 !,D 11	 $C((	 "-S!11	r$   r-   c                       e Zd ZU ee   ed<   y)r(   r+   Nr   r   r   r   r"   r    r#   r$   r%   'CreateParamsRestrictionsCurrencyOptionsz<PromotionCodeService.CreateParamsRestrictionsCurrencyOptionsN       #C((	r$   r0   c                       e Zd ZU ee   ed<   	 ee   ed<   	 ee   ed<   	 ed   ed<   	 ee   ed<   	 ee   ed<   	 eee      ed<   	 ee   ed	<   	 ee   ed
<   y)PromotionCodeService.ListParamsr   r   r   z*PromotionCodeService.ListParamsCreated|intcreatedr   ending_beforer   limitstarting_afterN)	r   r   r   r   r   r    r!   r	   r"   r#   r$   r%   
ListParamsr3   T   s    D!!	 #	 C  	 IJJ	 c""	 #3''	 DI&&	 3	 $C((	r$   r8   c                   T    e Zd ZU ee   ed<   	 ee   ed<   	 ee   ed<   	 ee   ed<   y)&PromotionCodeService.ListParamsCreatedgtgteltlteNr/   r#   r$   r%   ListParamsCreatedr:   z   sH    	 	 	 	r$   r?   c                   $    e Zd ZU eee      ed<   y)#PromotionCodeService.RetrieveParamsr   N)r   r   r   r   r	   r!   r    r#   r$   r%   RetrieveParamsrA      s    DI&&	r$   rB   c                   Z    e Zd ZU ee   ed<   	 eee      ed<   	 ed   ed<   	 ed   ed<   y)!PromotionCodeService.UpdateParamsr   r   zLiteral['']|Dict[str, str]r   -PromotionCodeService.UpdateParamsRestrictionsr   N)r   r   r   r   r   r    r	   r!   r#   r$   r%   UpdateParamsrD      sR    D!!	 DI&&	 :;;	 ";
 	
	r$   rF   c                   (    e Zd ZU eeedf      ed<   y)rE   <PromotionCodeService.UpdateParamsRestrictionsCurrencyOptionsr)   N)r   r   r   r   r   r!   r    r#   r$   r%   UpdateParamsRestrictionsz-PromotionCodeService.UpdateParamsRestrictions   s(    %NP
 	
	r$   rI   c                       e Zd ZU ee   ed<   y)rH   r+   Nr/   r#   r$   r%   'UpdateParamsRestrictionsCurrencyOptionsz<PromotionCodeService.UpdateParamsRestrictionsCurrencyOptions   r1   r$   rK   paramsr3   optionsreturnc           
      X    t        t        t           | j                  ddd||            S )9
        Returns a list of your promotion codes.
        get/v1/promotion_codesapibase_addressrL   rM   )r
   r   r   _requestselfrL   rM   s      r%   listzPromotionCodeService.list   s9     }%MM%"  	
 		
r$   c           
      t   K   t        t        t           | j                  ddd||       d{         S 7 w)rP   rQ   rR   rS   rT   N)r
   r   r   _request_asyncrW   s      r%   
list_asynczPromotionCodeService.list_async   sI      }%%%%" &  	
 		
s   +86
	8r   c           
      J    t        t        | j                  ddd||            S )
        A promotion code points to a coupon. You can optionally restrict the code to a specific customer, redemption limit, and expiration date.
        postrR   rS   rT   )r
   r   rV   rW   s      r%   createzPromotionCodeService.create   s4     MM%"  	
 		
r$   c           
      f   K   t        t        | j                  ddd||       d{         S 7 w)r^   r_   rR   rS   rT   N)r
   r   r[   rW   s      r%   create_asyncz!PromotionCodeService.create_async   sD      %%%" &  	
 		
s   $1/
	1promotion_coderA   c                 |    t        t        | j                  ddj                  t	        |            d||            S )
        Retrieves the promotion code with the given ID. In order to retrieve a promotion code by the customer-facing code use [list](https://stripe.com/docs/api/promotion_codes/list) with the desired code.
        rQ   $/v1/promotion_codes/{promotion_code}rc   rS   rT   r
   r   rV   formatr   rX   rc   rL   rM   s       r%   retrievezPromotionCodeService.retrieve  sN     MM6==#.~#> >  #  
 	
r$   c                    K   t        t        | j                  ddj                  t	        |            d||       d{         S 7 w)re   rQ   rf   rg   rS   rT   Nr
   r   r[   ri   r   rj   s       r%   retrieve_asyncz#PromotionCodeService.retrieve_async  s^      %%6==#.~#> >  # &  
 	
   =A
A
 	A
rD   c                 |    t        t        | j                  ddj                  t	        |            d||            S )
        Updates the specified promotion code by setting the values of the parameters passed. Most fields are, by design, not editable.
        r_   rf   rg   rS   rT   rh   rj   s       r%   updatezPromotionCodeService.update/  sN     MM6==#.~#> >  #  
 	
r$   c                    K   t        t        | j                  ddj                  t	        |            d||       d{         S 7 w)rq   r_   rf   rg   rS   rT   Nrm   rj   s       r%   update_asyncz!PromotionCodeService.update_asyncE  s^      %%6==#.~#> >  # &  
 	
ro   N)r   r   r   r   r&   r-   r0   r8   r?   rB   rF   rI   rK   r   r   r   rY   r\   r`   rb   r!   rk   rn   rr   rt   r#   r$   r%   r   r      s   (y (T9 .) $Y $LI $ y (	9 	)  57"$
1
  
 
M	"	
* 57"$
1
  
 
M	"	
, #%
3
  
 
	
, #%
3
  
 
	
, 9;"$	

 6
  	

 

2 9;"$	

 6
  	

 

2 79"$	

 4
  	

 

2 79"$	

 4
  	

 

r$   r   N)stripe._list_objectr   stripe._promotion_coder   stripe._request_optionsr   stripe._stripe_servicer   stripe._utilr   typingr   r	   r
   typing_extensionsr   r   r   r   r#   r$   r%   <module>r|      s0    + 0 2 0 $ # # = =M
= M
r$   