
    !+h8                         d Z ddlmZmZmZmZmZ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lmZ ddlmZ  G d	 d
e          Z G d de          Z G d de          Z G d de          ZdS )a  
    This code was generated by
   ___ _ _ _ _ _    _ ____    ____ ____ _    ____ ____ _  _ ____ ____ ____ ___ __   __
    |  | | | | |    | |  | __ |  | |__| | __ | __ |___ |\ | |___ |__/ |__|  | |  | |__/
    |  |_|_| | |___ | |__|    |__| |  | |    |__] |___ | \| |___ |  \ |  |  | |__| |  \

    Twilio - Pricing
    This is the public Twilio REST API.

    NOTE: This class is auto generated by OpenAPI Generator.
    https://openapi-generator.tech
    Do not edit the class manually.
    )AnyDictListOptionalUnionIteratorAsyncIterator)values)InstanceContext)InstanceResource)ListResource)Version)Pagec                        e Zd ZdZ	 ddedeeef         dee         f fdZ	e
dd	            Zdd
ZddZdefdZ xZS )CountryInstancea  
    :ivar country: The name of the country.
    :ivar iso_country: The [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
    :ivar terminating_prefix_prices: The list of [TerminatingPrefixPrice](https://www.twilio.com/docs/voice/pricing#outbound-prefix-price-with-origin) records.
    :ivar originating_call_prices: The list of [OriginatingCallPrice](https://www.twilio.com/docs/voice/pricing#inbound-call-price) records.
    :ivar price_unit: The currency in which prices are measured, specified in [ISO 4127](https://www.iso.org/iso/home/standards/currency_codes.htm) format (e.g. `usd`, `eur`, `jpy`).
    :ivar url: The absolute URL of the resource.
    Nversionpayloadiso_countryc                    t                                          |           |                    d          | _        |                    d          | _        |                    d          | _        |                    d          | _        |                    d          | _        |                    d          | _        d|p| j        i| _	        d | _
        d S )Ncountryr   terminating_prefix_pricesoriginating_call_prices
price_uniturl)super__init__getr   r   r   r   r   r   	_solution_context)selfr   r   r   	__class__s       b/var/www/html/e360mart/e360mart_env/lib/python3.11/site-packages/twilio/rest/pricing/v2/country.pyr   zCountryInstance.__init__"   s     	!!!&-kk)&<&<*1++m*D*D>Ekk'?
 ?
& =DKK%=
 =
$ *1\)B)B")++e"4"4 ;:$*:
 37    returnCountryContextc                 j    | j         &t          | j        | j        d                   | _         | j         S )z
        Generate an instance context for the instance, the context is capable of
        performing various actions. All instance actions are proxied to the context

        :returns: CountryContext for this CountryInstance
        Nr   r   )r   r%   _versionr   r    s    r"   _proxyzCountryInstance._proxy:   s;     = * N=9  DM }r#   c                 4    | j                                         S )[
        Fetch the CountryInstance


        :returns: The fetched CountryInstance
        )r*   fetchr)   s    r"   r-   zCountryInstance.fetchI   s     {  """r#   c                 D   K   | j                                          d{V S )u
        Asynchronous coroutine to fetch the CountryInstance


        :returns: The fetched CountryInstance
        N)r*   fetch_asyncr)   s    r"   r0   zCountryInstance.fetch_asyncR   s.       [,,.........r#   c                     d                     d | j                                        D                       }d                    |          S )f
        Provide a friendly representation

        :returns: Machine friendly representation
         c              3   H   K   | ]\  }}d                      ||          V  dS z{}={}Nformat.0kvs      r"   	<genexpr>z+CountryInstance.__repr__.<locals>.<genexpr>a   4      SSDAq7>>!Q//SSSSSSr#   z&<Twilio.Pricing.V2.CountryInstance {}>joinr   itemsr7   r    contexts     r"   __repr__zCountryInstance.__repr__[   sF     ((SSDN<P<P<R<RSSSSS7>>wGGGr#   N)r$   r%   )r$   r   )__name__
__module____qualname____doc__r   r   strr   r   r   propertyr*   r-   r0   rC   __classcell__r!   s   @r"   r   r      s          &*	7 77 c3h7 c]	7 7 7 7 7 70    X# # # #/ / / /H# H H H H H H H Hr#   r   c                   L     e Zd Zdedef fdZdefdZdefdZdefdZ	 xZ
S )r%   r   r   c                     t                                          |           d|i| _         dj        di | j        | _        dS )a  
        Initialize the CountryContext

        :param version: Version that contains the resource
        :param iso_country: The [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the origin-based voice pricing information to fetch.
        r   z!/Trunking/Countries/{iso_country}N )r   r   r   r7   _uri)r    r   r   r!   s      r"   r   zCountryContext.__init__g   sP     	!!! ;
 ?7>PPPP			r#   r$   c                     | j                             d| j                  }t          | j         || j        d                   S )r,   GETmethodurir   r'   )r(   r-   rP   r   r   r    r   s     r"   r-   zCountryContext.fetchv   sS     -%%	 & 
 

 M}5
 
 
 	
r#   c                    K   | j                             d| j                   d{V }t          | j         || j        d                   S )r/   rR   rS   Nr   r'   )r(   r0   rP   r   r   rV   s     r"   r0   zCountryContext.fetch_async   su       11	 2 
 
 
 
 
 
 
 

 M}5
 
 
 	
r#   c                     d                     d | j                                        D                       }d                    |          S )r2   r3   c              3   H   K   | ]\  }}d                      ||          V  dS r5   r6   r8   s      r"   r<   z*CountryContext.__repr__.<locals>.<genexpr>   r=   r#   z%<Twilio.Pricing.V2.CountryContext {}>r>   rA   s     r"   rC   zCountryContext.__repr__   sF     ((SSDN<P<P<R<RSSSSS6==gFFFr#   )rE   rF   rG   r   rI   r   r   r-   r0   rC   rK   rL   s   @r"   r%   r%   e   s        Q Qc Q Q Q Q Q Q
 
 
 
 
&
? 
 
 
 
&G# G G G G G G G Gr#   r%   c                   :    e Zd Zdeeef         defdZdefdZdS )CountryPager   r$   c                 ,    t          | j        |          S )zm
        Build an instance of CountryInstance

        :param payload: Payload response from the API
        )r   r(   rV   s     r"   get_instancezCountryPage.get_instance   s     t}g666r#   c                     dS )r2   z<Twilio.Pricing.V2.CountryPage>rO   r)   s    r"   rC   zCountryPage.__repr__   
     10r#   N)	rE   rF   rG   r   rI   r   r   r]   rC   rO   r#   r"   r[   r[      sY        7DcN 7 7 7 7 71# 1 1 1 1 1 1r#   r[   c            	       D    e Zd Zdef fdZ	 	 ddee         dee         dee         fdZ		 	 ddee         dee         de
e         fdZ	 	 ddee         dee         dee         fd	Z	 	 ddee         dee         dee         fd
Zej        ej        ej        fdeeef         deeef         deeef         defdZej        ej        ej        fdeeef         deeef         deeef         defdZdedefdZdedefdZdedefdZdedefdZdefdZ xZS )CountryListr   c                 X    t                                          |           d| _        dS )zi
        Initialize the CountryList

        :param version: Version that contains the resource

        z/Trunking/CountriesN)r   r   rP   )r    r   r!   s     r"   r   zCountryList.__init__   s(     	!!!)			r#   Nlimit	page_sizer$   c                     | j                             ||          }|                     |d                   }| j                             ||d                   S )a]  
        Streams CountryInstance records from the API as a generator stream.
        This operation lazily loads records as efficiently as possible until the limit
        is reached.
        The results are returned as a generator, so this operation is memory efficient.

        :param limit: Upper limit for the number of records to return. stream()
                      guarantees to never return more than limit.  Default is no limit
        :param page_size: Number of records to fetch per request, when not set will use
                          the default value of 50 records.  If no page_size is defined
                          but a limit is defined, stream() will attempt to read the
                          limit with the most efficient page size, i.e. min(limit, 1000)

        :returns: Generator that will yield up to limit results
        rd   rd   rc   )r(   read_limitspagestreamr    rc   rd   limitsrh   s        r"   ri   zCountryList.stream   sO    ( **5)<<yy6+#6y77}##D&/:::r#   c                    K   | j                             ||          }|                     |d                    d{V }| j                             ||d                   S )al  
        Asynchronously streams CountryInstance records from the API as a generator stream.
        This operation lazily loads records as efficiently as possible until the limit
        is reached.
        The results are returned as a generator, so this operation is memory efficient.

        :param limit: Upper limit for the number of records to return. stream()
                      guarantees to never return more than limit.  Default is no limit
        :param page_size: Number of records to fetch per request, when not set will use
                          the default value of 50 records.  If no page_size is defined
                          but a limit is defined, stream() will attempt to read the
                          limit with the most efficient page size, i.e. min(limit, 1000)

        :returns: Generator that will yield up to limit results
        rd   rf   Nrc   )r(   rg   
page_asyncstream_asyncrj   s        r"   rn   zCountryList.stream_async   se      ( **5)<<__vk/B_CCCCCCCC}))$w@@@r#   c                 J    t          |                     ||                    S )a  
        Lists CountryInstance records from the API as a list.
        Unlike stream(), this operation is eager and will load `limit` records into
        memory before returning.

        :param limit: Upper limit for the number of records to return. list() guarantees
                      never to return more than limit.  Default is no limit
        :param page_size: Number of records to fetch per request, when not set will use
                          the default value of 50 records.  If no page_size is defined
                          but a limit is defined, list() will attempt to read the limit
                          with the most efficient page size, i.e. min(limit, 1000)

        :returns: list that will contain up to limit results
        rc   rd   )listri   r    rc   rd   s      r"   rq   zCountryList.list   s2    & KK#   
 
 	
r#   c                 `   K   d |                      ||           d{V 2              d{V S )a	  
        Asynchronously lists CountryInstance records from the API as a list.
        Unlike stream(), this operation is eager and will load `limit` records into
        memory before returning.

        :param limit: Upper limit for the number of records to return. list() guarantees
                      never to return more than limit.  Default is no limit
        :param page_size: Number of records to fetch per request, when not set will use
                          the default value of 50 records.  If no page_size is defined
                          but a limit is defined, list() will attempt to read the limit
                          with the most efficient page size, i.e. min(limit, 1000)

        :returns: list that will contain up to limit results
        c                 $   K   g | 3 d {V 	 }|6 S rD   rO   )r9   records     r"   
<listcomp>z*CountryList.list_async.<locals>.<listcomp>%  sO       
 
 
 
 
 
 
 
 
 
 
 
 
s   rp   N)rn   rr   s      r"   
list_asynczCountryList.list_async  s~      &
 
&*&7&7# '8 ' ' ! ! ! ! ! !
 
 
 
 
 
 
 
 
 	
r#   
page_tokenpage_numberc                     t          j        |||d          }| j                            d| j        |          }t          | j        |          S )as  
        Retrieve a single page of CountryInstance records from the API.
        Request is executed immediately

        :param page_token: PageToken provided by the API
        :param page_number: Page Number, this value is simply for client state
        :param page_size: Number of records to return, defaults to 50

        :returns: Page of CountryInstance
        	PageTokenr   PageSizerR   rT   rU   params)r
   ofr(   rh   rP   r[   r    rx   ry   rd   dataresponses         r"   rh   zCountryList.page-  sZ      y'#% 
 
 =%%U	$%OO4=(333r#   c                    K   t          j        |||d          }| j                            d| j        |           d{V }t          | j        |          S )a  
        Asynchronously retrieve a single page of CountryInstance records from the API.
        Request is executed immediately

        :param page_token: PageToken provided by the API
        :param page_number: Page Number, this value is simply for client state
        :param page_size: Number of records to return, defaults to 50

        :returns: Page of CountryInstance
        r{   rR   r~   N)r
   r   r(   rm   rP   r[   r   s         r"   rm   zCountryList.page_asyncH  s        y'#% 
 
 11di 2 
 
 
 
 
 
 
 
 4=(333r#   
target_urlc                 v    | j         j        j                            d|          }t	          | j         |          S )z
        Retrieve a specific page of CountryInstance records from the API.
        Request is executed immediately

        :param target_url: API-generated URL for the requested results page

        :returns: Page of CountryInstance
        rR   )r(   domaintwiliorequestr[   r    r   r   s      r"   get_pagezCountryList.get_pagee  s3     ='.66ujII4=(333r#   c                    K   | j         j        j                            d|           d{V }t	          | j         |          S )a  
        Asynchronously retrieve a specific page of CountryInstance records from the API.
        Request is executed immediately

        :param target_url: API-generated URL for the requested results page

        :returns: Page of CountryInstance
        rR   N)r(   r   r   request_asyncr[   r   s      r"   get_page_asynczCountryList.get_page_asyncq  sI       -4BB5*UUUUUUUU4=(333r#   r   c                 .    t          | j        |          S z
        Constructs a CountryContext

        :param iso_country: The [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the origin-based voice pricing information to fetch.
        r'   r%   r(   r    r   s     r"   r   zCountryList.get}       dmEEEEr#   c                 .    t          | j        |          S r   r   r   s     r"   __call__zCountryList.__call__  r   r#   c                     dS )r2   z<Twilio.Pricing.V2.CountryList>rO   r)   s    r"   rC   zCountryList.__repr__  r_   r#   )NN)rE   rF   rG   r   r   r   intr   r   ri   r	   rn   r   rq   rw   r
   unsetr   rI   objectr[   rh   rm   r   r   r%   r   r   rC   rK   rL   s   @r"   ra   ra      s       	* 	* 	* 	* 	* 	* 	*  $#'; ;}; C=; 
/	"	; ; ; ;6  $#'A A}A C=A 
	'	A A A A6  $#'
 
}
 C=
 
o		
 
 
 
8  $#'
 
}
 C=
 
o		
 
 
 
: *0*0,(.	4 4#v+&4 3;'4 f%	4
 
4 4 4 4: *0*0,(.	4 4#v+&4 3;'4 f%	4
 
4 4 4 4:
43 
4; 
4 
4 
4 
4
4s 
4{ 
4 
4 
4 
4Fs F~ F F F FFC FN F F F F1# 1 1 1 1 1 1 1 1r#   ra   N)rH   typingr   r   r   r   r   r   r	   twilio.baser
   twilio.base.instance_contextr   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.versionr   twilio.base.pager   r   r%   r[   ra   rO   r#   r"   <module>r      s    M L L L L L L L L L L L L L L L L L       8 8 8 8 8 8 : : : : : : 2 2 2 2 2 2 ' ' ' ' ' ' ! ! ! ! ! !JH JH JH JH JH& JH JH JHZ>G >G >G >G >G_ >G >G >GB1 1 1 1 1$ 1 1 1&Z1 Z1 Z1 Z1 Z1, Z1 Z1 Z1 Z1 Z1r#   