
    Yj/                    <   d dl mZ d dlmZ d dl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 ddlmZ dd	lmZmZ dd
lmZmZ ddlmZ ddlmZ ddlmZ ddlmZ ddgZ  G d de      Z! G d de      Z" G d d      Z# G d d      Z$ G d d      Z% G d d      Z&y)    )annotations)LiteralN   )_legacy_response)BodyQueryHeadersNotGiven	not_given)maybe_transformasync_maybe_transform)cached_property)SyncAPIResourceAsyncAPIResource)to_streamed_response_wrapper"async_to_streamed_response_wrapper)make_request_options)spend_limit_update_params)OrganizationSpendLimit)OrganizationSpendLimitDeleted
SpendLimitAsyncSpendLimitc                      e Zd Zedd       Zed	d       Zddded	 	 	 	 	 	 	 	 	 d
dZddded	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 ddZddded	 	 	 	 	 	 	 	 	 ddZ	y)r   c                    t        |       S a  
        This property can be used as a prefix for any HTTP method call to return
        the raw response object instead of the parsed content.

        For more information, see https://www.github.com/openai/openai-python#accessing-raw-response-data-eg-headers
        )SpendLimitWithRawResponseselfs    n/var/www/html/vmm-quimica/venv/lib/python3.12/site-packages/openai/resources/admin/organization/spend_limit.pywith_raw_responsezSpendLimit.with_raw_response   s     )..    c                    t        |       S z
        An alternative to `.with_raw_response` that doesn't eagerly read the response body.

        For more information, see https://www.github.com/openai/openai-python#with_streaming_response
        )SpendLimitWithStreamingResponser   s    r   with_streaming_responsez"SpendLimit.with_streaming_response"   s     /t44r!   Nextra_headersextra_query
extra_bodytimeoutc               R    | j                  dt        ||||ddi      t              S )(Get the organization's hard spend limit./organization/spend_limitadmin_api_key_authTr'   r(   r)   r*   securityoptionscast_to_getr   r   r   r'   r(   r)   r*   s        r   retrievezSpendLimit.retrieve+   s>     yy'(+'%.5 +  

 
	
r!   c                   | j                  dt        |||dt        j                        t	        ||||ddi      t
              S )  
        Create or replace the organization's hard spend limit.

        Args:
          currency: The currency for the threshold amount. Currently, only `USD` is supported.

          interval: The time interval for evaluating spend against the threshold. Currently, only
              `month` is supported.

          threshold_amount: The hard spend limit amount, in cents.

          extra_headers: Send extra headers

          extra_query: Add additional query parameters to the request

          extra_body: Add additional JSON properties to the request

          timeout: Override the client-level default timeout for this request, in seconds
        r-   currencyintervalthreshold_amountr.   Tr/   bodyr2   r3   )_postr   r   SpendLimitUpdateParamsr   r   r   r;   r<   r=   r'   r(   r)   r*   s           r   updatezSpendLimit.updateB   sb    @ zz'  ( ((8
 *@@ )+'%.5 +#  
 	
r!   c               R    | j                  dt        ||||ddi      t              S )+Delete the organization's hard spend limit.r-   r.   Tr/   r1   _deleter   r   r6   s        r   deletezSpendLimit.deletev   s>     ||'(+'%.5 2  

 
	
r!   )returnr   )rI   r$   
r'   Headers | Noner(   Query | Noner)   Body | Noner*   (float | httpx2.Timeout | None | NotGivenrI   r   r;   zLiteral['USD']r<   zLiteral['month']r=   intr'   rK   r(   rL   r)   rM   r*   rN   rI   r   
r'   rK   r(   rL   r)   rM   r*   rN   rI   r   
__name__
__module____qualname__r   r    r%   r   r7   rC   rH    r!   r   r   r      s   / / 5 5 )-$("&<E

 &
 "
  
 :
 
 
> )-$("&<E2
 !2
 #	2

 2
 &2
 "2
  2
 :2
 
 2
r )-$("&<E

 &
 "
  
 :
 
'
r!   c                      e Zd Zedd       Zed	d       Zddded	 	 	 	 	 	 	 	 	 d
dZddded	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 ddZddded	 	 	 	 	 	 	 	 	 ddZ	y)r   c                    t        |       S r   )AsyncSpendLimitWithRawResponser   s    r   r    z!AsyncSpendLimit.with_raw_response   s     .d33r!   c                    t        |       S r#   )$AsyncSpendLimitWithStreamingResponser   s    r   r%   z'AsyncSpendLimit.with_streaming_response   s     4D99r!   Nr&   c               n   K   | j                  dt        ||||ddi      t               d{   S 7 w)r,   r-   r.   Tr/   r1   Nr4   r6   s        r   r7   zAsyncSpendLimit.retrieve   sL      YY'(+'%.5 +  

 

 
	
 

   ,535c                  K   | j                  dt        |||dt        j                         d{   t	        ||||ddi      t
               d{   S 7 '7 w)r9   r-   r:   Nr.   Tr/   r>   )r@   r   r   rA   r   r   rB   s           r   rC   zAsyncSpendLimit.update   s{     @ ZZ', ( ((8
 *@@  )+'%.5 +#   
 
 	

s!   .AA
"AAAAc               n   K   | j                  dt        ||||ddi      t               d{   S 7 w)rE   r-   r.   Tr/   r1   NrF   r6   s        r   rH   zAsyncSpendLimit.delete   sL      \\'(+'%.5 2 " 

 

 
	
 

r]   )rI   rY   )rI   r[   rJ   rO   rQ   rR   rV   r!   r   r   r      s   4 4 : : )-$("&<E

 &
 "
  
 :
 
 
> )-$("&<E2
 !2
 #	2

 2
 &2
 "2
  2
 :2
 
 2
r )-$("&<E

 &
 "
  
 :
 
'
r!   c                      e Zd ZddZy)r   c                    || _         t        j                  |j                        | _        t        j                  |j                        | _        t        j                  |j
                        | _        y N)_spend_limitr   to_raw_response_wrapperr7   rC   rH   r   spend_limits     r   __init__z"SpendLimitWithRawResponse.__init__  s_    '(@@  
 '>>
 '>>
r!   Nrf   r   rI   NonerS   rT   rU   rg   rV   r!   r   r   r         
r!   r   c                      e Zd ZddZy)rY   c                    || _         t        j                  |j                        | _        t        j                  |j                        | _        t        j                  |j
                        | _        y rb   )rc   r   async_to_raw_response_wrapperr7   rC   rH   re   s     r   rg   z'AsyncSpendLimitWithRawResponse.__init__  s_    '(FF  
 'DD
 'DD
r!   Nrf   r   rI   ri   rj   rV   r!   r   rY   rY     rk   r!   rY   c                      e Zd ZddZy)r$   c                    || _         t        |j                        | _        t        |j                        | _        t        |j                        | _        y rb   )rc   r   r7   rC   rH   re   s     r   rg   z(SpendLimitWithStreamingResponse.__init__$  sM    '4  
 3
 3
r!   Nrh   rj   rV   r!   r   r$   r$   #  rk   r!   r$   c                      e Zd ZddZy)r[   c                    || _         t        |j                        | _        t        |j                        | _        t        |j                        | _        y rb   )rc   r   r7   rC   rH   re   s     r   rg   z-AsyncSpendLimitWithStreamingResponse.__init__3  sM    ':  
 9
 9
r!   Nro   rj   rV   r!   r   r[   r[   2  rk   r!   r[   )'
__future__r   typing_extensionsr   httpx2 r   _typesr   r   r	   r
   r   _utilsr   r   _compatr   	_resourcer   r   	_responser   r   _base_clientr   types.admin.organizationr   1types.admin.organization.organization_spend_limitr   9types.admin.organization.organization_spend_limit_deletedr   __all__r   r   r   rY   r$   r[   rV   r!   r   <module>r      s    # %  ! @ @ = ' ; Z 1 B X g*
+t
 t
nt
& t
n
 

 

 

 
r!   