o
    Bi 3                     @   sx   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	 d	eZd
S )    )
ListObject)PromotionCode)RequestOptions)StripeService)sanitize_id)DictListcast)LiteralNotRequired	TypedDictc                	   @   s  e Zd ZG dd deZG dd deZG dd deZG dd deZG d	d
 d
eZG dd deZ	G dd deZ
G dd deZG dd deZi i fdddedee fddZi i fdddedee fddZi fdddedefddZi fdddedefddZi i fd edd!dedefd"d#Zi i fd edd!dedefd$d%Zi i fd edd&dedefd'd(Zi i fd edd&dedefd)d*Zd+S ),PromotionCodeServicec                   @   s   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
< dS )!PromotionCodeService.CreateParamsactivecodecouponcustomerexpand
expires_atmax_redemptionsmetadata-PromotionCodeService.CreateParamsRestrictionsrestrictionsN)
__name__
__module____qualname__r   bool__annotations__strr   intr    r    r    ^/var/www/html/Trade-python/venv/lib/python3.10/site-packages/stripe/_promotion_code_service.pyCreateParams   s*   
 r"   c                   @   sL   e Zd ZU eeedf  ed< 	 ee ed< 	 ee ed< 	 ee ed< dS )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    r!   CreateParamsRestrictions5   s   
 r(   c                   @      e Zd ZU ee ed< dS )r#   r&   Nr   r   r   r   r   r   r    r    r    r!   'CreateParamsRestrictionsCurrencyOptionsL      
 r+   c                   @   s   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
< dS )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    r!   
ListParamsR   s&   
 r2   c                   @   sD   e Zd ZU ee ed< 	 ee ed< 	 ee ed< 	 ee ed< dS )z&PromotionCodeService.ListParamsCreatedgtgteltlteNr*   r    r    r    r!   ListParamsCreatedx   s   
 r7   c                   @   s   e Zd ZU eee  ed< dS )#PromotionCodeService.RetrieveParamsr   N)r   r   r   r   r   r   r   r    r    r    r!   RetrieveParams   s   
 r9   c                   @   sH   e Zd ZU ee ed< 	 eee  ed< 	 ed ed< 	 ed ed< dS )!PromotionCodeService.UpdateParamsr   r   zLiteral['']|Dict[str, str]r   -PromotionCodeService.UpdateParamsRestrictionsr   N)r   r   r   r   r   r   r   r   r    r    r    r!   UpdateParams   s   
 r<   c                   @   s"   e Zd ZU eeedf  ed< dS )r;   <PromotionCodeService.UpdateParamsRestrictionsCurrencyOptionsr$   N)r   r   r   r   r   r   r   r    r    r    r!   UpdateParamsRestrictions   s   
 r>   c                   @   r)   )r=   r&   Nr*   r    r    r    r!   'UpdateParamsRestrictionsCurrencyOptions   r,   r?   paramsr-   optionsreturnc              	   C   s   t tt | jddd||dS )9
        Returns a list of your promotion codes.
        get/v1/promotion_codesapibase_addressr@   rA   )r	   r   r   _requestselfr@   rA   r    r    r!   list   s   zPromotionCodeService.listc              	      s&   t tt | jddd||dI dH S )rC   rD   rE   rF   rG   N)r	   r   r   _request_asyncrJ   r    r    r!   
list_async   s   
zPromotionCodeService.list_asyncr   c              	   C   s   t t| jd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.
        postrE   rF   rG   )r	   r   rI   rJ   r    r    r!   create   s   zPromotionCodeService.createc              	      s"   t t| jddd||dI dH S )rO   rP   rE   rF   rG   N)r	   r   rM   rJ   r    r    r!   create_async   s   
z!PromotionCodeService.create_asyncpromotion_coder8   c              	   C   &   t t| jddjt|dd||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.
        rD   $/v1/promotion_codes/{promotion_code}rS   rF   rG   r	   r   rI   formatr   rK   rS   r@   rA   r    r    r!   retrieve     	zPromotionCodeService.retrievec              	      .   t t| jddjt|dd||dI dH S )rU   rD   rV   rW   rF   rG   Nr	   r   rM   rY   r   rZ   r    r    r!   retrieve_async     	
z#PromotionCodeService.retrieve_asyncr:   c              	   C   rT   )
        Updates the specified promotion code by setting the values of the parameters passed. Most fields are, by design, not editable.
        rP   rV   rW   rF   rG   rX   rZ   r    r    r!   update-  r\   zPromotionCodeService.updatec              	      r]   )ra   rP   rV   rW   rF   rG   Nr^   rZ   r    r    r!   update_asyncC  r`   z!PromotionCodeService.update_asyncN)r   r   r   r   r"   r(   r+   r2   r7   r9   r<   r>   r?   r   r   r   rL   rN   rQ   rR   r   r[   r_   rb   rc   r    r    r    r!   r      s    (&






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    r!   <module>   s   