
    <@g                     l    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d         Zy)	    )
ListObject)ListableAPIResource)RequestOptions)ClassVarDictList)LiteralNotRequiredUnpackc                       e Zd ZU dZdZeed      ed<    G d de      Z	 G d de      Z
eed<   	 ed   ed	<   	 eeef   ed
<   	 eded   ded    fd       Zeded   ded    fd       Zededed   dd fd       Zededed   dd fd       Zy)ExchangeRatea  
    `ExchangeRate` objects allow you to determine the rates that Stripe is currently
    using to convert from one currency to another. Since this number is variable
    throughout the day, there are various reasons why you might want to know the current
    rate (for example, to dynamically price an item for a user with a default
    payment in a foreign currency).

    Please refer to our [Exchange Rates API](https://stripe.com/docs/fx-rates) guide for more details.

    *[Note: this integration path is supported but no longer recommended]* Additionally,
    you can guarantee that a charge is made with an exchange rate that you expect is
    current. To do so, you must pass in the exchange_rate to charges endpoints. If the
    value is no longer up to date, the charge won't go through. Please refer to our
    [Using with charges](https://stripe.com/docs/exchange-rates) guide for more details.

    -----

    &nbsp;

    *This Exchange Rates API is a Beta Service and is subject to Stripe's terms of service. You may use the API solely for the purpose of transacting on Stripe. For example, the API may be queried in order to:*

    - *localize prices for processing payments on Stripe*
    - *reconcile Stripe transactions*
    - *determine how much money to send to a connected account*
    - *determine app fees to charge a connected account*

    *Using this Exchange Rates API beta for any purpose other than to transact on Stripe is strictly prohibited and constitutes a violation of Stripe's terms of service.*
    exchange_rateOBJECT_NAMEc                   Z    e Zd ZU ee   ed<   	 eee      ed<   	 ee   ed<   	 ee   ed<   y)ExchangeRate.ListParamsending_beforeexpandlimitstarting_afterN)__name__
__module____qualname__r
   str__annotations__r   int     T/var/www/html/AdoubleTech/venv/lib/python3.12/site-packages/stripe/_exchange_rate.py
ListParamsr   *   sL    "3''	 DI&&	 3	 $C((	r   r   c                   $    e Zd ZU eee      ed<   y)ExchangeRate.RetrieveParamsr   N)r   r   r   r
   r   r   r   r   r   r   RetrieveParamsr!   <   s    DI&&	r   r"   idobjectratesparamsr   returnc                     | j                  d| j                         |      }t        |t              s!t	        dt        |      j                  z        |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r&   %Expected list object from API, got %s)_static_request	class_url
isinstancer   	TypeErrortyper   clsr&   results      r   listzExchangeRate.listO   s]     $$MMO % 

 &*-7<((* 
 r   c                    K   | j                  d| j                         |       d{   }t        |t              s!t	        dt        |      j                  z        |S 7 7w)r)   r*   r+   Nr,   )_static_request_asyncr.   r/   r   r0   r1   r   r2   s      r   
list_asynczExchangeRate.list_asyncc   sk      00MMO 1 
 

 &*-7<((* 
 
s   &A"A 8A"r!   c                 8     | |fi |}|j                          |S )c
        Retrieves the exchange rates from the given currency to every supported currency.
        )refreshr3   r#   r&   instances       r   retrievezExchangeRate.retrievew   s$     r$V$r   c                 T   K    | |fi |}|j                          d{    |S 7 w)r:   N)refresh_asyncr<   s       r   retrieve_asynczExchangeRate.retrieve_async   s3      r$V$$$&&& 	's   (&(N)r   r   r   __doc__r   r   r	   r   r   r   r"   r   r   floatclassmethodr   r   r5   r8   r>   rA   r   r   r   r   r   
   s,   : 7FK'/23E^ $  	G O$$ U
 78	N	# & 78	N	# &  &'D E	   &'D E	 r   r   N)stripe._list_objectr   stripe._listable_api_resourcer   stripe._request_optionsr   typingr   r   r   typing_extensionsr	   r
   r   r   r   r   r   <module>rJ      s0    + = 2 ' ' : :A&~6 Ar   