
    ]j                         d dl 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
 ddlmZ ddlmZ dd	lmZ  G d
 d      Z G d d      Zy)    N)JSONDecodeError   )ApiError)AsyncClientWrapperSyncClientWrapper)AsyncHttpResponseHttpResponse)RequestOptions)construct_type)BillingInfoResponsec                   N    e Zd ZdefdZdddej                  e   dee	   fdZ
y)RawBillingClientclient_wrapperc                    || _         y N_client_wrapperselfr   s     M/root/env/lib/python3.12/site-packages/label_studio_sdk/billing/raw_client.py__init__zRawBillingClient.__init__   
    -    Nrequest_optionsr   returnc                   | j                   j                  j                  dd|      }	 d|j                  cxk  rdk  rGn nDt	        j
                  t        t        t        |j                                     }t        ||      S |j                         }t        |j                  t        |j                        |      # t        $ r6 t        |j                  t        |j                        |j                        w xY w)	ah  
        <Card href="https://humansignal.com/goenterprise">
                <img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
                <p style="margin-top: 10px; font-size: 14px;">
                    This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
                </p>
            </Card>
        Retrieve billing checks and feature flags for the active organization.

        Parameters
        ----------
        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        HttpResponse[BillingInfoResponse]
            Billing information for the active organization
        api/billing/infoGETmethodr      ,  type_object_responsedatastatus_codeheadersbody)r   httpx_clientrequestr+   typingcastr   r   jsonr	   r   r   dictr,   textr   r   	_response_data_response_jsons        r   infozRawBillingClient.info   s    ( ((55==+ > 
	
	ti++1c1'"1 ) 0 $YUCC&^^-N 9#8#8$yGXGXBY`noo  	ty'<'<d9K\K\F]dmdrdrss	ts   AC C ?D )__name__
__module____qualname__r   r   r0   Optionalr
   r	   r   r9    r   r   r   r      s<    .*; . JN &pv~'F &pR^_rRs &pr   r   c                   N    e Zd ZdefdZdddej                  e   dee	   fdZ
y)AsyncRawBillingClientr   c                    || _         y r   r   r   s     r   r   zAsyncRawBillingClient.__init__<   r   r   Nr   r   r   c                "  K   | j                   j                  j                  dd|       d{   }	 d|j                  cxk  rdk  rGn nDt	        j
                  t        t        t        |j                                     }t        ||      S |j                         }t        |j                  t        |j                        |	      7 # t        $ r6 t        |j                  t        |j                        |j                  	      w xY ww)
am  
        <Card href="https://humansignal.com/goenterprise">
                <img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
                <p style="margin-top: 10px; font-size: 14px;">
                    This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
                </p>
            </Card>
        Retrieve billing checks and feature flags for the active organization.

        Parameters
        ----------
        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        AsyncHttpResponse[BillingInfoResponse]
            Billing information for the active organization
        r   r   r    Nr"   r#   r$   r'   r*   )r   r.   r/   r+   r0   r1   r   r   r2   r   r   r   r3   r,   r4   r5   s        r   r9   zAsyncRawBillingClient.info?   s     , ..;;CC+ D 
 
	
	ti++1c1'"1 ) 0 ))%HH&^^-N 9#8#8$yGXGXBY`noo%
   	ty'<'<d9K\K\F]dmdrdrss	ts3   ,DCDAC DC  ,D?DD)r:   r;   r<   r   r   r0   r=   r
   r   r   r9   r>   r   r   r@   r@   ;   s=    .*< . EI(p"(//."A(p	.	/(pr   r@   )r0   json.decoderr   core.api_errorr   core.client_wrapperr   r   core.http_responser   r	   core.request_optionsr
   core.unchecked_base_modelr   types.billing_info_responser   r   r@   r>   r   r   <module>rJ      s8     ( % G @ 1 6 =*p *pZ,p ,pr   