
    d{iN^                         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 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y)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)ApiResponse)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def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.
    versionpayloadiso_countryc                 h   t         |   |       |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        d|xs | j                  i| _	        d | _
        y )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       \/home/sas/my/fyp/ringai/.venv/lib/python3.12/site-packages/twilio/rest/pricing/v2/country.pyr   zCountryInstance.__init__#   s     	!&-kk)&<*1++m*D>Ekk'?
& =DKK%=
$ *1\)B")++e"4 ;:$*:*:
 37    returnc                     | 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
        r   r   )r    CountryContext_versionr   r!   s    r#   _proxyzCountryInstance._proxy;   s9     == * NN=9DM }}r$   c                 6    | j                   j                         S )[
        Fetch the CountryInstance


        :returns: The fetched CountryInstance
        )r+   fetchr*   s    r#   r.   zCountryInstance.fetchJ   s     {{  ""r$   c                 R   K   | j                   j                          d{   S 7 w)u
        Asynchronous coroutine to fetch the CountryInstance


        :returns: The fetched CountryInstance
        N)r+   fetch_asyncr*   s    r#   r1   zCountryInstance.fetch_asyncS   s!      [[,,....   '%'c                 6    | j                   j                         S )z
        Fetch the CountryInstance with HTTP info


        :returns: ApiResponse with instance, status code, and headers
        )r+   fetch_with_http_infor*   s    r#   r4   z$CountryInstance.fetch_with_http_info\   s     {{//11r$   c                 R   K   | j                   j                          d{   S 7 w)z
        Asynchronous coroutine to fetch the CountryInstance with HTTP info


        :returns: ApiResponse with instance, status code, and headers
        N)r+   fetch_with_http_info_asyncr*   s    r#   r6   z*CountryInstance.fetch_with_http_info_asynce   s!      [[;;====r2   c                     dj                  d | j                  j                         D              }dj                  |      S )f
        Provide a friendly representation

        :returns: Machine friendly representation
         c              3   F   K   | ]  \  }}d j                  ||        ywz{}={}Nformat.0kvs      r#   	<genexpr>z+CountryInstance.__repr__.<locals>.<genexpr>t        SDAq7>>!Q/S   !z&<Twilio.Pricing.V2.CountryInstance {}>joinr   itemsr=   r!   contexts     r#   __repr__zCountryInstance.__repr__n   s6     ((SDNN<P<P<RSS7>>wGGr$   )N)r%   r(   )r%   r   )__name__
__module____qualname____doc__r   r   strr   r   r   propertyr+   r.   r1   r   r4   r6   rJ   __classcell__r"   s   @r#   r   r      s~     &*	77 c3h7 c]	70  #/2k 2>+ >H# Hr$   r   c                   |     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de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                 x    t         |   |       d|i| _         dj                  di | j                  | _        y)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   r=   _uri)r!   r   r   r"   s      r#   r   zCountryContext.__init__z   s@     	! ;
 ?7>>PP	r$   r%   c                     t        j                  i       }d|d<   | j                  j                  d| j                  |      S )zz
        Internal helper for fetch operation

        Returns:
            tuple: (payload, status_code, headers)
        application/jsonAcceptGETmethoduriheaders)r
   ofr)   fetch_with_response_inforV   r!   r^   s     r#   _fetchzCountryContext._fetch   sB     ))B-.}}55dii 6 
 	
r$   c                 t    | j                         \  }}}t        | j                  || j                  d         S )r-   r   r'   )rb   r   r)   r   r!   r   _s      r#   r.   zCountryContext.fetch   s8     AMM}5
 	
r$   c                     | j                         \  }}}t        | j                  || j                  d         }t	        |||      S )z
        Fetch the CountryInstance and return response metadata


        :returns: ApiResponse with instance, status code, and headers
        r   r'   datastatus_coder^   )rb   r   r)   r   r   r!   r   ri   r^   instances        r#   r4   z#CountryContext.fetch_with_http_info   sG     )-%g"MM}5

 k7SSr$   c                    K   t        j                  i       }d|d<   | j                  j                  d| j                  |       d{   S 7 w)z
        Internal async helper for fetch operation

        Returns:
            tuple: (payload, status_code, headers)
        rX   rY   rZ   r[   N)r
   r_   r)   fetch_with_response_info_asyncrV   ra   s     r#   _fetch_asynczCountryContext._fetch_async   sQ      ))B-.]]AAdii B 
 
 	
 
s   AAA	Ac                    K   | j                          d{   \  }}}t        | j                  || j                  d         S 7 -w)r0   Nr   r'   )rn   r   r)   r   rd   s      r#   r1   zCountryContext.fetch_async   sG      #//11AMM}5
 	
 2s   AA.Ac                    K   | j                          d{   \  }}}t        | j                  || j                  d         }t	        |||      S 7 ;w)z
        Asynchronous coroutine to fetch the CountryInstance and return response metadata


        :returns: ApiResponse with instance, status code, and headers
        Nr   r'   rg   )rn   r   r)   r   r   rj   s        r#   r6   z)CountryContext.fetch_with_http_info_async   sW      /3.?.?.A(A%g"MM}5

 k7SS )Bs   AA<Ac                     dj                  d | j                  j                         D              }dj                  |      S )r8   r9   c              3   F   K   | ]  \  }}d j                  ||        ywr;   r<   r>   s      r#   rB   z*CountryContext.__repr__.<locals>.<genexpr>   rC   rD   z%<Twilio.Pricing.V2.CountryContext {}>rE   rH   s     r#   rJ   zCountryContext.__repr__   s6     ((SDNN<P<P<RSS6==gFFr$   )rK   rL   rM   r   rO   r   tuplerb   r   r.   r   r4   rn   r1   r6   rJ   rQ   rR   s   @r#   r(   r(   x   ss    Q Qc Q
 
 
 
Tk T
E 
 
? 
T+ TG# Gr$   r(   c                   2    e Zd Zdeeef   defdZdefdZy)CountryPager   r%   c                 .    t        | j                  |      S )zm
        Build an instance of CountryInstance

        :param payload: Payload response from the API
        )r   r)   )r!   r   s     r#   get_instancezCountryPage.get_instance   s     t}}g66r$   c                      y)r8   z<Twilio.Pricing.V2.CountryPage>rU   r*   s    r#   rJ   zCountryPage.__repr__        1r$   N)	rK   rL   rM   r   rO   r   r   rw   rJ   rU   r$   r#   ru   ru      s)    7DcN 7 71# 1r$   ru   c            	           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fdZ	 	 ddee   dee   d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fdZ	 	 ddee   dee   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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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                 2    t         |   |       d| _        y)zi
        Initialize the CountryList

        :param version: Version that contains the resource

        z/Trunking/CountriesN)r   r   rV   )r!   r   r"   s     r#   r   zCountryList.__init__  s     	!)	r$   limit	page_sizer%   c                     | j                   j                  ||      }| j                  |d         }| j                   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
        r~   r~   r}   )r)   read_limitspagestreamr!   r}   r~   limitsr   s        r#   r   zCountryList.stream  sJ    ( **5)<yy6+#6y7}}##D&/::r$   c                    K   | j                   j                  ||      }| j                  |d          d{   }| j                   j                  ||d         S 7 #w)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
        r~   r   Nr}   )r)   r   
page_asyncstream_asyncr   s        r#   r   zCountryList.stream_async&  sW     ( **5)<__vk/B_CC}}))$w@@ Ds   5AA$Ac                     | j                   j                  ||      }| j                  |d         }| j                   j                  |j                  |d         }||j
                  |j                  fS )a  
        Streams CountryInstance and returns headers from first page


        :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: tuple of (generator, status_code, headers) where generator yields instances
        r~   r   r}   )r)   r   page_with_http_infor   rh   ri   r^   r!   r}   r~   r   page_response	generators         r#   stream_with_http_infoz!CountryList.stream_with_http_info?  sk    $ **5)<006+;N0OMM((););VG_M	=44m6K6KLLr$   c                   K   | j                   j                  ||      }| j                  |d          d{   }| j                   j                  |j                  |d         }||j
                  |j                  fS 7 Fw)a  
        Asynchronously streams CountryInstance and returns headers from first page


        :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: tuple of (generator, status_code, headers) where generator yields instances
        r~   r   Nr}   )r)   r   page_with_http_info_asyncr   rh   ri   r^   r   s         r#   stream_with_http_info_asyncz'CountryList.stream_with_http_info_asyncW  s     $ **5)<"<<[) = 
 
 MM..}/A/A6'?S	=44m6K6KLL
s   5B A>AB c                 :    t        | j                  ||            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
        r}   r~   )listr   )r!   r}   r~   s      r#   r   zCountryList.listq  s(    & KK#  
 	
r$   c                 z   K   | j                  ||       d{   2 cg c3 d{   }|7 7 	6 c}S c c}w w)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
        r   N)r   )r!   r}   r~   records       r#   
list_asynczCountryList.list_async  sT     * '+&7&7# '8 ' !
 
 !
 
 	
 
s0   ;.;620
26;26;c                 b    | j                  ||      \  }}}t        |      }t        |||      S )a  
        Lists CountryInstance and returns headers from first page


        :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: ApiResponse with list of instances, status code, and headers
        r   rg   )r   r   r   )r!   r}   r~   r   ri   r^   rG   s          r#   list_with_http_infozCountryList.list_with_http_info  sA    $ +/*D*D +E +
'	; Y;PPr$   c                    K   | j                  ||       d{   \  }}}|2 cg c3 d{   }|7 7 	6 nc c}w }}t        |||      S w)a  
        Asynchronously lists CountryInstance and returns headers from first page


        :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: ApiResponse with list of instances, status code, and headers
        r   Nrg   )r   r   )r!   r}   r~   r   ri   r^   r   rG   s           r#   list_with_http_info_asyncz%CountryList.list_with_http_info_async  sf     $ 150P0P 1Q 1
 +
'	; -666&	+
 7666;PPs4   A4A:86
8:A8:A
page_tokenpage_numberc                     t        j                  |||d      }t        j                  ddi      }d|d<   | j                  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   PageSizeContent-Type!application/x-www-form-urlencodedrX   rY   rZ   r\   r]   paramsr^   )r
   r_   r)   r   rV   ru   r!   r   r   r~   rh   r^   responses          r#   r   zCountryList.page  sy      yy'#%
 ))^-PQR.==%%diig & 
 4==(33r$   c                   K   t        j                  |||d      }t        j                  ddi      }d|d<   | j                  j                  d| j                  ||       d{   }t        | j                  |      S 7 w)	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   r   r   rX   rY   rZ   r   N)r
   r_   r)   r   rV   ru   r   s          r#   r   zCountryList.page_async  s       yy'#%
 ))^-PQR.11diig 2 
 
 4==(33
s   A"B$A?%Bc                    t        j                  |||d      }t        j                  ddi      }d|d<   | j                  j                  d| j                  ||      \  }}}t        | j                  |      }	t        |	||      S )	aY  
        Retrieve a single page with response metadata


        :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: ApiResponse with CountryPage, status code, and headers
        r   r   r   rX   rY   rZ   r   rg   )r
   r_   r)   page_with_response_inforV   ru   r   
r!   r   r   r~   rh   r^   r   ri   response_headersr   s
             r#   r   zCountryList.page_with_http_info  s      yy'#%
 ))^-PQR.26--2W2Wdiig 3X 3
/+/ 4==(3+GWXXr$   c                 *  K   t        j                  |||d      }t        j                  ddi      }d|d<   | j                  j                  d| j                  ||       d{   \  }}}t        | j                  |      }	t        |	||	      S 7 ,w)
ah  
        Asynchronously retrieve a single page with response metadata


        :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: ApiResponse with CountryPage, status code, and headers
        r   r   r   rX   rY   rZ   r   Nrg   )r
   r_   r)   page_with_response_info_asyncrV   ru   r   r   s
             r#   r   z%CountryList.page_with_http_info_async<  s       yy'#%
 ))^-PQR. --==$))D' >   	0+/
 4==(3+GWXXs   A"B$B%-B
target_urlc                     | j                   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
        rZ   )r)   domaintwiliorequestru   r!   r   r   s      r#   get_pagezCountryList.get_page`  s7     ==''..66ujI4==(33r$   c                    K   | j                   j                  j                  j                  d|       d{   }t	        | j                   |      S 7 w)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
        rZ   N)r)   r   r   request_asyncru   r   s      r#   get_page_asynczCountryList.get_page_asyncl  sD      --44BB5*UU4==(33 Vs   4AAAr   c                 0    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.getx       dmmEEr$   c                 0    t        | j                  |      S r   r   r   s     r#   __call__zCountryList.__call__  r   r$   c                      y)r8   z<Twilio.Pricing.V2.CountryList>rU   r*   s    r#   rJ   zCountryList.__repr__  ry   r$   )NN)&rK   rL   rM   r   r   r   intr   r   r   r	   r   rs   r   r   r   r   r   r   r   r   r
   unsetr   rO   objectru   r   r   r   r   r   r   r(   r   r   rJ   rQ   rR   s   @r#   r{   r{      s   	* 	*  $#';}; C=; 
/	"	;6  $#'A}A C=A 
	'	A6  $#'M}M C=M 
	M4  $#'M}M C=M 
	M8  $#'
}
 C=
 
o		
8  $#'
}
 C=
 
o		
:  $#'Q}Q C=Q 
	Q6  $#'Q}Q C=Q 
	Q6 *0*0,,(.	4#v+&4 3;'4 f%	4
 
4F *0*0,,(.	4#v+&4 3;'4 f%	4
 
4F *0*0,,(.	 Y#v+& Y 3;' Y f%	 Y
 
 YH *0*0,,(.	"Y#v+&"Y 3;'"Y f%	"Y
 
"YH
43 
4; 
4
4s 
4{ 
4Fs F~ FFC FN F1# 1r$   r{   N)rN   typingr   r   r   r   r   r   r	   twilio.baser
   twilio.base.api_responser   twilio.base.instance_contextr   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.versionr   twilio.base.pager   r   r(   ru   r{   rU   r$   r#   <module>r      sh    M L L  0 8 : 2 ' !\H& \H~rG_ rGj1$ 1&N1, N1r$   