o
    f>h                     @   s   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 G dd	 d	e
ZG d
d deZG d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Optional)values)InstanceContext)InstanceResource)ListResource)Versionc                       sn   e Zd ZdZ	ddedeeef dee f fddZ	e
dd
dZdddZdddZdefddZ  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.
    Nversionpayloadnumberc                    sz   t  | |d| _|d| _|d| _|d| _|d| _|d| _|d| _	d|p5| ji| _
d | _d S )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__ V/var/www/html/venv/lib/python3.10/site-packages/twilio/rest/pricing/v1/voice/number.pyr   "   s   

zNumberInstance.__init__returnNumberContextc                 C   s&   | j du rt| j| jd 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
        Nr   r   )r   r   _versionr   r   r   r   r   _proxy4   s   
zNumberInstance._proxyc                 C   s
   | j  S )Y
        Fetch the NumberInstance


        :returns: The fetched NumberInstance
        )r#   fetchr"   r   r   r   r%   C   s   
zNumberInstance.fetchc                    s   | j  I dH S )s
        Asynchronous coroutine to fetch the NumberInstance


        :returns: The fetched NumberInstance
        N)r#   fetch_asyncr"   r   r   r   r'   L   s   zNumberInstance.fetch_asyncc                 C   $   d dd | j D }d|S )f
        Provide a friendly representation

        :returns: Machine friendly representation
         c                 s        | ]\}}d  ||V  qdS z{}={}Nformat.0kvr   r   r   	<genexpr>[       z*NumberInstance.__repr__.<locals>.<genexpr>z%<Twilio.Pricing.V1.NumberInstance {}>joinr   itemsr.   r   contextr   r   r   __repr__U      
zNumberInstance.__repr__)N)r   r   )r   r
   )__name__
__module____qualname____doc__r	   r   strr   r   r   propertyr#   r%   r'   r:   __classcell__r   r   r   r   r
      s    


		r
   c                       sP   e Zd Zdedef fddZdefddZdefdd	Zdefd
dZ	  Z
S )r   r   r   c                    s.   t  | d|i| _djdi | j| _dS )z
        Initialize the NumberContext

        :param version: Version that contains the resource
        :param number: The phone number to fetch.
        r   z/Voice/Numbers/{number}Nr   )r   r   r   r.   _uri)r   r   r   r   r   r   r   a   s   zNumberContext.__init__r   c                 C   s<   t i }d|d< | jjd| j|d}t| j|| jd dS )r$   application/jsonAcceptGETmethoduriheadersr   r    )r   ofr!   r%   rC   r
   r   r   rJ   r   r   r   r   r%   p   s   
zNumberContext.fetchc                    sD   t i }d|d< | jjd| j|dI dH }t| j|| jd dS )r&   rD   rE   rF   rG   Nr   r    )r   rK   r!   r'   rC   r
   r   rL   r   r   r   r'      s   
zNumberContext.fetch_asyncc                 C   r(   )r)   r*   c                 s   r+   r,   r-   r/   r   r   r   r3      r4   z)NumberContext.__repr__.<locals>.<genexpr>z$<Twilio.Pricing.V1.NumberContext {}>r5   r8   r   r   r   r:      r;   zNumberContext.__repr__)r<   r=   r>   r	   r@   r   r
   r%   r'   r:   rB   r   r   r   r   r   _   s
    r   c                       sT   e Zd Zdef fddZdedefddZdedefdd	Zdefd
dZ	  Z
S )
NumberListr   c                    s   t  | dS )zh
        Initialize the NumberList

        :param version: Version that contains the resource

        N)r   r   )r   r   r   r   r   r      s   zNumberList.__init__r   r   c                 C      t | j|dS z_
        Constructs a NumberContext

        :param number: The phone number to fetch.
        r    r   r!   r   r   r   r   r   r         zNumberList.getc                 C   rN   rO   rP   rQ   r   r   r   __call__   rR   zNumberList.__call__c                 C   s   dS )r)   z<Twilio.Pricing.V1.NumberList>r   r"   r   r   r   r:      s   zNumberList.__repr__)r<   r=   r>   r	   r   r@   r   r   rS   r:   rB   r   r   r   r   rM      s
    	rM   N)r?   typingr   r   r   twilio.baser   twilio.base.instance_contextr   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.versionr	   r
   r   rM   r   r   r   r   <module>   s    HE