
    pi2$                         d Z ddl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  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)values)InstanceContext)InstanceResource)ListResource)Versionc                        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ej                  fdeeef   dd fd	Zej                  fdeeef   dd fd
ZdefdZ xZS )NumberInstancea  
    :ivar destination_number: The destination phone number in [E.164](https://www.twilio.com/docs/glossary/what-e164) format, which consists of a + followed by the country code and subscriber number.
    :ivar origination_number: The origination phone number in [[E.164](https://www.twilio.com/docs/glossary/what-e164) format, which consists of a + followed by the country code and subscriber number.
    :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 outbound_call_prices: The list of [OutboundCallPriceWithOrigin](https://www.twilio.com/docs/voice/pricing#outbound-call-price-with-origin) records.
    :ivar inbound_call_price:
    :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destination_numberc                    t         |   |       |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _	        |j                  d      | _
        d|xs | j                  i| _        d | _        y )	Nr   origination_numbercountryiso_countryoutbound_call_pricesinbound_call_price
price_uniturl)super__init__getr   r   r   r   r   r   r   r   	_solution_context)selfr   r   r   	__class__s       e/opt/services/ai/voice_agent/venv/lib/python3.12/site-packages/twilio/rest/pricing/v2/voice/number.pyr   zNumberInstance.__init__#   s     	!18=Q1R18=Q1R&-kk)&<*1++m*D9@":
! 29=Q1R)0\)B")++e"4 !"4"O8O8O
 26    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: NumberContext for this NumberInstance
        r   r   )r   NumberContext_versionr   r   s    r!   _proxyzNumberInstance._proxy;   s:     == )#'>>2F#GDM }}r"   r   c                 :    | j                   j                  |      S )m  
        Fetch the NumberInstance

        :param origination_number: The origination phone number, in [E.164](https://www.twilio.com/docs/glossary/what-e164) format, for which to fetch the origin-based voice pricing information. E.164 format consists of a + followed by the country code and subscriber number.

        :returns: The fetched NumberInstance
        r   )r)   fetchr   r   s     r!   r-   zNumberInstance.fetchJ   s#     {{  1 ! 
 	
r"   c                 V   K   | j                   j                  |       d{   S 7 w)  
        Asynchronous coroutine to fetch the NumberInstance

        :param origination_number: The origination phone number, in [E.164](https://www.twilio.com/docs/glossary/what-e164) format, for which to fetch the origin-based voice pricing information. E.164 format consists of a + followed by the country code and subscriber number.

        :returns: The fetched NumberInstance
        r,   N)r)   fetch_asyncr.   s     r!   r1   zNumberInstance.fetch_asyncX   s1      [[,,1 - 
 
 	
 
s    )')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*NumberInstance.__repr__.<locals>.<genexpr>l        SDAq7>>!Q/S   !z%<Twilio.Pricing.V2.NumberInstance {}>joinr   itemsr8   r   contexts     r!   __repr__zNumberInstance.__repr__f   s6     ((SDNN<P<P<RSS6==gFFr"   )N)r#   r&   )__name__
__module____qualname____doc__r   r   strr   r   r   propertyr)   r   unsetr   objectr-   r1   rE   __classcell__r    s   @r!   r   r      s    	 -1	66 c3h6 %SM	60   8>||
"'V"4
	
 8>||
"'V"4
	
G# Gr"   r   c                        e Zd Zdedef fdZej                  fdeee	f   de
fdZej                  fdeee	f   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 NumberContext

        :param version: Version that contains the resource
        :param destination_number: The destination phone number, in [E.164](https://www.twilio.com/docs/glossary/what-e164) format, for which to fetch the origin-based voice pricing information. E.164 format consists of a + followed by the country code and subscriber number.
        r   z#/Voice/Numbers/{destination_number}N )r   r   r   r8   _uri)r   r   r   r    s      r!   r   zNumberContext.__init__r   sB     	! !"4
 A9@@R4>>R	r"   r   r#   c                     t        j                  d|i      }t        j                  i       }d|d<   | j                  j                  d| j                  ||      }t        | j                  || j                  d         S )r+   OriginationNumberapplication/jsonAcceptGETmethoduriparamsheadersr   r%   )r   ofr'   r-   rS   r   r   r   r   r\   r]   r   s        r!   r-   zNumberContext.fetch   s     #%7
 ))B-.--%%dii & 
 MM#~~.BC
 	
r"   c                   K   t        j                  d|i      }t        j                  i       }d|d<   | j                  j                  d| j                  ||       d{   }t        | j                  || j                  d         S 7 )w)	r0   rU   rV   rW   rX   rY   Nr   r%   )r   r^   r'   r1   rS   r   r   r_   s        r!   r1   zNumberContext.fetch_async   s      #%7
 ))B-.11dii 2 
 
 MM#~~.BC
 	
	
s   AB B
!*Bc                     dj                  d | j                  j                         D              }dj                  |      S )r3   r4   c              3   F   K   | ]  \  }}d j                  ||        ywr6   r7   r9   s      r!   r=   z)NumberContext.__repr__.<locals>.<genexpr>   r>   r?   z$<Twilio.Pricing.V2.NumberContext {}>r@   rC   s     r!   rE   zNumberContext.__repr__   s6     ((SDNN<P<P<RSS5<<WEEr"   )rF   rG   rH   r   rJ   r   r   rL   r   rM   r   r-   r1   rE   rN   rO   s   @r!   r&   r&   p   sv    S SS S  8>||
"'V"4
	
@ 8>||
"'V"4
	
>F# Fr"   r&   c                   P     e Zd Zdef 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 )
NumberListr   c                 $    t         |   |       y)zh
        Initialize the NumberList

        :param version: Version that contains the resource

        N)r   r   )r   r   r    s     r!   r   zNumberList.__init__   s     	!r"   r   r#   c                 0    t        | j                  |      S aA  
        Constructs a NumberContext

        :param destination_number: The destination phone number, in [E.164](https://www.twilio.com/docs/glossary/what-e164) format, for which to fetch the origin-based voice pricing information. E.164 format consists of a + followed by the country code and subscriber number.
        r%   r&   r'   r   r   s     r!   r   zNumberList.get        T]]?QRRr"   c                 0    t        | j                  |      S rg   rh   ri   s     r!   __call__zNumberList.__call__   rj   r"   c                      y)r3   z<Twilio.Pricing.V2.NumberList>rR   r(   s    r!   rE   zNumberList.__repr__   s     0r"   )rF   rG   rH   r   r   rJ   r&   r   rl   rE   rN   rO   s   @r!   rd   rd      sG    " "Sc Sm SS3 S= S0# 0r"   rd   N)rI   typingr   r   r   r   r   twilio.baser   twilio.base.instance_contextr	   twilio.base.instance_resourcer
   twilio.base.list_resourcer   twilio.base.versionr   r   r&   rd   rR   r"   r!   <module>rt      sP    4 3  8 : 2 'VG% VGrVFO VFr!0 !0r"   