o
    Bi                     @   s`   d dl mZ d dlmZ d dlmZ d dlmZmZ d dl	m
Z
mZmZ G dd ded ZdS )	    )
ListObject)ListableAPIResource)RequestOptions)ClassVarList)LiteralNotRequiredUnpackc                   @   s   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
eed< 	 eed	< 	 eed
< 	 ed ed< 	 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dZdS )TaxCodezo
    [Tax codes](https://stripe.com/docs/tax/tax-categories) classify goods and services for tax purposes.
    tax_codeOBJECT_NAMEc                   @   sH   e Zd ZU ee ed< 	 eee  ed< 	 ee ed< 	 ee ed< dS )TaxCode.ListParamsending_beforeexpandlimitstarting_afterN)__name__
__module____qualname__r   str__annotations__r   int r   r   P/var/www/html/Trade-python/venv/lib/python3.10/site-packages/stripe/_tax_code.py
ListParams   s   
 r   c                   @   s   e Zd ZU eee  ed< dS )TaxCode.RetrieveParamsr   N)r   r   r   r   r   r   r   r   r   r   r   RetrieveParams#   s   
 r   descriptionidnameobjectparamsr   returnc                 K   s4   | j d|  |d}t|tstdt|j |S )
        A list of [all tax codes available](https://stripe.com/docs/tax/tax-categories) to add to Products in order to allow specific tax calculations.
        getr!   %Expected list object from API, got %s)_static_request	class_url
isinstancer   	TypeErrortyper   clsr!   resultr   r   r   list:   s   
zTaxCode.listc                    s<   | j d|  |dI dH }t|tstdt|j |S )r#   r$   r%   Nr&   )_static_request_asyncr(   r)   r   r*   r+   r   r,   r   r   r   
list_asyncN   s   
zTaxCode.list_asyncr   c                 K   s   | |fi |}|   |S )
        Retrieves the details of an existing tax code. Supply the unique tax code ID and Stripe will return the corresponding tax code information.
        )refreshr-   r   r!   instancer   r   r   retrieveb   s   zTaxCode.retrievec                    s$   | |fi |}|  I dH  |S )r2   N)refresh_asyncr4   r   r   r   retrieve_asyncm   s   zTaxCode.retrieve_asyncN)r   r   r   __doc__r   r   r   r   r   r   r   r   classmethodr	   r   r/   r1   r6   r8   r   r   r   r   r
   
   sR   
 
r
   N)stripe._list_objectr   stripe._listable_api_resourcer   stripe._request_optionsr   typingr   r   typing_extensionsr   r   r	   r
   r   r   r   r   <module>   s   