o
    Bi                     @   sp   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 d dlmZmZ G dd	 d	eZd
S )    )ExchangeRate)
ListObject)RequestOptions)StripeService)sanitize_id)Listcast)NotRequired	TypedDictc                	   @   s   e Zd 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 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 )ExchangeRateServicec                   @   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 )ExchangeRateService.ListParamsending_beforeexpandlimitstarting_afterN)__name__
__module____qualname__r	   str__annotations__r   int r   r   ]/var/www/html/Trade-python/venv/lib/python3.10/site-packages/stripe/_exchange_rate_service.py
ListParams   s   
 r   c                   @   s   e Zd ZU eee  ed< dS )"ExchangeRateService.RetrieveParamsr   N)r   r   r   r	   r   r   r   r   r   r   r   RetrieveParams   s   
 r   paramsr   optionsreturnc              	   C   s   t tt | jddd||dS )
        Returns a list of objects that contain the rates at which foreign currencies are converted to one another. Only shows the currencies for which Stripe supports.
        get/v1/exchange_ratesapibase_addressr   r   )r   r   r   _requestselfr   r   r   r   r   list%   s   zExchangeRateService.listc              	      s&   t tt | jddd||dI dH S )r   r    r!   r"   r#   N)r   r   r   _request_asyncr&   r   r   r   
list_async8   s   
zExchangeRateService.list_asyncrate_idr   c              	   C   s&   t t| jddjt|dd||dS )c
        Retrieves the exchange rates from the given currency to every supported currency.
        r    /v1/exchange_rates/{rate_id}r+   r"   r#   )r   r   r%   formatr   r'   r+   r   r   r   r   r   retrieveK   s   	zExchangeRateService.retrievec              	      s.   t t| jddjt|dd||dI dH S )r,   r    r-   r.   r"   r#   N)r   r   r)   r/   r   r0   r   r   r   retrieve_asynca   s   	
z"ExchangeRateService.retrieve_asyncN)r   r   r   r
   r   r   r   r   r   r(   r*   r   r1   r2   r   r   r   r   r      sV    


r   N)stripe._exchange_rater   stripe._list_objectr   stripe._request_optionsr   stripe._stripe_servicer   stripe._utilr   typingr   r   typing_extensionsr	   r
   r   r   r   r   r   <module>   s   