a
    !fE                     @   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 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)InstanceContext)InstanceResource)ListResource)Versionc                       st   e Zd ZdZdeeeef ee d fddZ	e
dddd	Zd dd
dZd dddZed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|pj| 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__ d/var/www/html/python-backend/venv/lib/python3.9/site-packages/twilio/rest/pricing/v1/voice/number.pyr   #   s    
zNumberInstance.__init__NumberContextreturnc                 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   _proxy5   s    
zNumberInstance._proxyc                 C   s
   | j  S )Y
        Fetch the NumberInstance


        :returns: The fetched NumberInstance
        )r#   fetchr"   r   r   r   r%   D   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'   M   s    zNumberInstance.fetch_asyncc                 C   s$   d dd | j D }d|S )f
        Provide a friendly representation

        :returns: Machine friendly representation
         c                 s   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__V   s    zNumberInstance.__repr__)N)__name__
__module____qualname____doc__r   r   strr   r   r   propertyr#   r%   r'   r8   __classcell__r   r   r   r   r	      s    		r	   c                       sN   e Zd Zeed fddZedddZedddZedd	d
Z	  Z
S )r   )r
   r   c                    s.   t  | d|i| _djf 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}N)r   r   r   r,   _uri)r   r
   r   r   r   r   r   a   s    zNumberContext.__init__r   c                 C   s(   | j jd| jd}t| j || jd dS )r$   GETmethodurir   r    )r!   r%   r@   r	   r   r   r   r   r   r   r%   p   s    zNumberContext.fetchc                    s.   | j jd| jdI dH }t| j || jd dS )r&   rA   rB   Nr   r    )r!   r'   r@   r	   r   rE   r   r   r   r'      s    zNumberContext.fetch_asyncc                 C   s$   d dd | j D }d|S )r(   r)   c                 s   s   | ]\}}d  ||V  qdS r*   r+   r-   r   r   r   r1      r2   z)NumberContext.__repr__.<locals>.<genexpr>z$<Twilio.Pricing.V1.NumberContext {}>r3   r6   r   r   r   r8      s    zNumberContext.__repr__)r9   r:   r;   r   r=   r   r	   r%   r'   r8   r?   r   r   r   r   r   `   s   r   c                       sP   e Zd Zed fddZeedddZeedddZed	d
dZ	  Z
S )
NumberList)r
   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   s   t | j|dS z_
        Constructs a NumberContext

        :param number: The phone number to fetch.
        r    r   r!   r   r   r   r   r   r      s    zNumberList.getc                 C   s   t | j|dS rG   rH   rI   r   r   r   __call__   s    zNumberList.__call__r   c                 C   s   dS )r(   z<Twilio.Pricing.V1.NumberList>r   r"   r   r   r   r8      s    zNumberList.__repr__)r9   r:   r;   r   r   r=   r   r   rJ   r8   r?   r   r   r   r   rF      s   	rF   N)r<   typingr   r   r   Ztwilio.base.instance_contextr   Ztwilio.base.instance_resourcer   Ztwilio.base.list_resourcer   Ztwilio.base.versionr   r	   r   rF   r   r   r   r   <module>   s   I@