
    d{i5                         d Z ddl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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Optional)values)ApiResponse)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ddZdd	Zdefd
ZdefdZdefdZ xZS )NumberInstancea  
    :ivar number: The phone number.
    :ivar country: The name of the country.
    :ivar iso_country: The [ISO country code](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
    :ivar outbound_call_price:
    :ivar inbound_call_price:
    :ivar price_unit: The currency in which prices are measured, specified in [ISO 4127](http://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numberc                    t         |   |       |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _        |j                  d      | _	        d|xs | j                  i| _
        d | _        y )Nr   countryiso_countryoutbound_call_priceinbound_call_price
price_uniturl)super__init__getr   r   r   r   r   r   r   	_solution_context)selfr   r   r   	__class__s       a/home/sas/my/fyp/ringai/.venv/lib/python3.12/site-packages/twilio/rest/pricing/v1/voice/number.pyr   zNumberInstance.__init__#   s     	!%,[[%:&-kk)&<*1++m*D29++>S2T 18=Q1R)0\)B")++e"4 f+
 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._proxy5   s9     == )~~h/DM }}r    c                 6    | j                   j                         S )Y
        Fetch the NumberInstance


        :returns: The fetched NumberInstance
        )r'   fetchr&   s    r   r*   zNumberInstance.fetchD   s     {{  ""r    c                 R   K   | j                   j                          d{   S 7 w)s
        Asynchronous coroutine to fetch the NumberInstance


        :returns: The fetched NumberInstance
        N)r'   fetch_asyncr&   s    r   r-   zNumberInstance.fetch_asyncM   s!      [[,,....   '%'c                 6    | j                   j                         S )z
        Fetch the NumberInstance with HTTP info


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


        :returns: ApiResponse with instance, status code, and headers
        N)r'   fetch_with_http_info_asyncr&   s    r   r2   z)NumberInstance.fetch_with_http_info_async_   s!      [[;;====r.   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>n        SDAq7>>!Q/S   !z%<Twilio.Pricing.V1.NumberInstance {}>joinr   itemsr9   r   contexts     r   __repr__zNumberInstance.__repr__h   s6     ((SDNN<P<P<RSS6==gFFr    )N)r!   r$   )r!   r   )__name__
__module____qualname____doc__r   r   strr   r   r   propertyr'   r*   r-   r   r0   r2   rF   __classcell__r   s   @r   r   r      s|     RV66)-c3h6AI#6$  #/2k 2>+ >G# G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)z
        Initialize the NumberContext

        :param version: Version that contains the resource
        :param number: The phone number to fetch.
        r   z/Voice/Numbers/{number}N )r   r   r   r9   _uri)r   r   r   r   s      r   r   zNumberContext.__init__t   s@     	! f
 5-44Ft~~F	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_inforR   r   rZ   s     r   _fetchzNumberContext._fetch   sB     ))B-.}}55dii 6 
 	
r    c                 t    | j                         \  }}}t        | j                  || j                  d         S )r)   r   r#   )r^   r   r%   r   r   r   _s      r   r*   zNumberContext.fetch   s8     AMM>>(+
 	
r    c                     | j                         \  }}}t        | j                  || j                  d         }t	        |||      S )z
        Fetch the NumberInstance and return response metadata


        :returns: ApiResponse with instance, status code, and headers
        r   r#   datastatus_coderZ   )r^   r   r%   r   r   r   r   re   rZ   instances        r   r0   z"NumberContext.fetch_with_http_info   sG     )-%g!MM>>(+

 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)
        rT   rU   rV   rW   N)r   r[   r%   fetch_with_response_info_asyncrR   r]   s     r   _fetch_asynczNumberContext._fetch_async   sQ      ))B-.]]AAdii B 
 
 	
 
s   AAA	Ac                    K   | j                          d{   \  }}}t        | j                  || j                  d         S 7 -w)r,   Nr   r#   )rj   r   r%   r   r`   s      r   r-   zNumberContext.fetch_async   sG      #//11AMM>>(+
 	
 2s   AA.Ac                    K   | j                          d{   \  }}}t        | j                  || j                  d         }t	        |||      S 7 ;w)z
        Asynchronous coroutine to fetch the NumberInstance and return response metadata


        :returns: ApiResponse with instance, status code, and headers
        Nr   r#   rc   )rj   r   r%   r   r   rf   s        r   r2   z(NumberContext.fetch_with_http_info_async   sW      /3.?.?.A(A%g!MM>>(+

 k7SS )Bs   AA<Ac                     dj                  d | j                  j                         D              }dj                  |      S )r4   r5   c              3   F   K   | ]  \  }}d j                  ||        ywr7   r8   r:   s      r   r>   z)NumberContext.__repr__.<locals>.<genexpr>   r?   r@   z$<Twilio.Pricing.V1.NumberContext {}>rA   rD   s     r   rF   zNumberContext.__repr__   s6     ((SDNN<P<P<RSS5<<WEEr    )rG   rH   rI   r   rK   r   tupler^   r   r*   r   r0   rj   r-   r2   rF   rM   rN   s   @r   r$   r$   r   ss    G G G
 
 
~ 
Tk T
E 
 
> 
T+ T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 z_
        Constructs a NumberContext

        :param number: The phone number to fetch.
        r#   r$   r%   r   r   s     r   r   zNumberList.get        T]]6::r    c                 0    t        | j                  |      S rt   ru   rv   s     r   __call__zNumberList.__call__   rw   r    c                      y)r4   z<Twilio.Pricing.V1.NumberList>rQ   r&   s    r   rF   zNumberList.__repr__  s     0r    )rG   rH   rI   r   r   rK   r$   r   ry   rF   rM   rN   s   @r   rq   rq      sA    " ";# ;- ;;s ;} ;0# 0r    rq   N)rJ   typingr   r   r   twilio.baser   twilio.base.api_responser   twilio.base.instance_contextr   twilio.base.instance_resourcer	   twilio.base.list_resourcer
   twilio.base.versionr   r   r$   rq   rQ   r    r   <module>r      sS    ' &  0 8 : 2 'WG% WGtrFO rFj!0 !0r    