o
    Bi8                     @   s   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 d dlmZmZmZmZmZ d dlmZmZmZmZ G d	d
 d
ed
 ed
 e	d
 ZdS )    )CreateableAPIResource)
ListObject)ListableAPIResource)RequestOptions)UpdateableAPIResource)sanitize_id)ClassVarDictListOptionalcast)LiteralNotRequired	TypedDictUnpackc                   @   s2  e Zd ZU dZdZeed  ed< 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eed< 	 ee ed< 	 eed< 	 ee ed< 	 eed< 	 ee ed< 	 eed< 	 eed< 	 ee ed< 	 eed  ed< 	 eed< 	 eeeef  ed< 	 ed ed< 	 eed< 	 ee ed< 	 eed  ed< 	 ed ed! d"d fd#d$Zed ed! d"d fd%d&Zed ed' d"ed  fd(d)Zed ed' d"ed  fd*d+Zeded ed, d"d fd-d.Zeded ed, d"d fd/d0Zeded ed1 d"d fd2d3Zeded ed1 d"d fd4d5Zd6S )7TaxRatean  
    Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax.

    Related guide: [Tax rates](https://stripe.com/docs/billing/taxes/tax-rates)
    tax_rateOBJECT_NAMEc                   @   s   e Zd ZU ee ed< 	 ee ed< 	 ee ed< 	 eed< 	 eee  ed< 	 eed< 	 ee ed< 	 eeeef  ed< 	 e	ed	< 	 ee ed
< 	 ee
d  ed< dS )TaxRate.CreateParamsactivecountrydescriptiondisplay_nameexpand	inclusivejurisdictionmetadata
percentagestateamusement_taxcommunications_taxgsthstigstjct	lease_taxpstqstrst	sales_taxvattax_typeN)__name__
__module____qualname__r   bool__annotations__strr
   r	   floatr    r4   r4   P/var/www/html/Trade-python/venv/lib/python3.10/site-packages/stripe/_tax_rate.pyCreateParams   s6   
 r6   c                   @   sr   e Zd ZU ee ed< 	 ed ed< 	 ee ed< 	 eee  ed< 	 ee ed< 	 ee ed< 	 ee ed< d	S )
TaxRate.ListParamsr   zTaxRate.ListParamsCreated|intcreatedending_beforer   r   limitstarting_afterN)	r-   r.   r/   r   r0   r1   r2   r
   intr4   r4   r4   r5   
ListParamsW   s   
 r=   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TaxRate.ListParamsCreatedgtgteltlteN)r-   r.   r/   r   r<   r1   r4   r4   r4   r5   ListParamsCreatedu   s   
 rB   c                   @   s   e Zd ZU ee ed< 	 ee ed< 	 ee ed< 	 ee ed< 	 eee  ed< 	 ee ed< 	 ed ed< 	 ee ed	< 	 eed
  ed< dS )TaxRate.ModifyParamsr   r   r   r   r   r   zLiteral['']|Dict[str, str]r   r   r   r,   N)	r-   r.   r/   r   r0   r1   r2   r
   r   r4   r4   r4   r5   ModifyParams   s.   
 rD   c                   @   s   e Zd ZU eee  ed< dS )TaxRate.RetrieveParamsr   N)r-   r.   r/   r   r
   r2   r1   r4   r4   r4   r5   RetrieveParams   s   
 rF   r   r   r8   r   r   effective_percentageidr   r   )cityr   countydistrictmultipler   jurisdiction_levellivemoder   objectr   r   r   r,   paramsr   returnc                 K   s   t d| jd|  |dS ))
        Creates a new tax rate.
        r   postrP   )r   _static_request	class_urlclsrP   r4   r4   r5   create  s   zTaxRate.createc                    s"   t d| jd|  |dI dH S )rR   r   rS   rT   N)r   _static_request_asyncrV   rW   r4   r4   r5   create_async$  s   
zTaxRate.create_asyncr7   c                 K   s4   | j d|  |d}t|tstdt|j |S )
        Returns a list of your tax rates. Tax rates are returned sorted by creation date, with the most recently created tax rates appearing first.
        getrT   %Expected list object from API, got %s)rU   rV   
isinstancer   	TypeErrortyper-   rX   rP   resultr4   r4   r5   list4  s   
zTaxRate.listc                    s<   | j d|  |dI dH }t|tstdt|j |S )r\   r]   rT   Nr^   )rZ   rV   r_   r   r`   ra   r-   rb   r4   r4   r5   
list_asyncH  s   
zTaxRate.list_asyncrC   c                 K   s*   d|   t|f }td| jd||dS )/
        Updates an existing tax rate.
        %s/%sr   rS   rT   )rV   r   r   rU   rX   rH   rP   urlr4   r4   r5   modify\  s   zTaxRate.modifyc                    s2   d|   t|f }td| jd||dI dH S )rf   rg   r   rS   rT   N)rV   r   r   rZ   rh   r4   r4   r5   modify_asyncm  s   
zTaxRate.modify_asyncrE   c                 K   s   | |fi |}|   |S )8
        Retrieves a tax rate with the given ID
        )refreshrX   rH   rP   instancer4   r4   r5   retrieve~  s   zTaxRate.retrievec                    s$   | |fi |}|  I dH  |S )rl   N)refresh_asyncrn   r4   r4   r5   retrieve_async  s   zTaxRate.retrieve_asyncN) r-   r.   r/   __doc__r   r   r   r1   r   r6   r=   r   rB   rD   rF   r0   r   r2   r<   r3   r	   classmethodr   rY   r[   r   rd   re   rj   rk   rp   rr   r4   r4   r4   r5   r      s   
 =5
r   N)stripe._createable_api_resourcer   stripe._list_objectr   stripe._listable_api_resourcer   stripe._request_optionsr   stripe._updateable_api_resourcer   stripe._utilr   typingr   r	   r
   r   r   typing_extensionsr   r   r   r   r   r4   r4   r4   r5   <module>   s   
