a
    !f#                     @   s   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	 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ListOptionalUnion)values)InstanceContext)InstanceResource)ListResource)Versionc                       s   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ejfeeef d d
ddZejfeeef d d
ddZedddZ  ZS )NumberInstanceaQ  
    :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 terminating_prefix_prices:
    :ivar originating_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.
    N)versionpayloaddestination_numberc                    s   t  | |d| _|d| _|d| _|d| _|d| _|d| _|d| _	|d| _
d|pv| ji| _d | _d S )	Nr   origination_numbercountryiso_countryterminating_prefix_pricesoriginating_call_price
price_uniturl)super__init__getr   r   r   r   r   r   r   r   	_solution_context)selfr   r   r   	__class__ ^/var/www/html/python-backend/venv/lib/python3.9/site-packages/twilio/rest/pricing/v2/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    _proxy?   s    
zNumberInstance._proxyr   r#   c                 C   s   | j j|d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   r   r   r    r+   N   s    
zNumberInstance.fetchc                    s   | j j|dI dH S )  
        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,   r   r   r    r.   \   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>p       z*NumberInstance.__repr__.<locals>.<genexpr>z%<Twilio.Pricing.V2.NumberInstance {}>joinr   itemsr3   r   contextr   r   r    __repr__j   s    zNumberInstance.__repr__)N)__name__
__module____qualname____doc__r   r   strr   r   r   propertyr'   r   unsetr   objectr+   r.   r?   __classcell__r   r   r   r    r      s(    


r   c                       sn   e Zd Zeed fddZejfeee	f e
dddZejfeee	f 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 )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&/Trunking/Numbers/{destination_number}N)r   r   r   r3   _uri)r   r   r   r   r   r    r   u   s    zNumberContext.__init__r(   c                 C   s8   t d|i}| jjd| j|d}t| j|| jd dS )r)   OriginationNumberGETmethoduriparamsr   r$   )r   ofr%   r+   rI   r   r   r   r   datar   r   r   r    r+      s    zNumberContext.fetchc                    s>   t d|i}| jjd| j|dI dH }t| j|| jd dS )r-   rJ   rK   rL   Nr   r$   )r   rP   r%   r.   rI   r   r   rQ   r   r   r    r.      s    zNumberContext.fetch_asyncr"   c                 C   s$   d dd | j D }d|S )r/   r0   c                 s   s   | ]\}}d  ||V  qdS r1   r2   r4   r   r   r    r8      r9   z)NumberContext.__repr__.<locals>.<genexpr>z$<Twilio.Pricing.V2.NumberContext {}>r:   r=   r   r   r    r?      s    zNumberContext.__repr__)r@   rA   rB   r   rD   r   r   rF   r   rG   r   r+   r.   r?   rH   r   r   r   r    r!   t   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 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   r   r   r    r      s    zNumberList.getc                 C   s   t | j|dS rT   rU   rV   r   r   r    __call__   s    zNumberList.__call__r"   c                 C   s   dS )r/   z<Twilio.Pricing.V2.NumberList>r   r&   r   r   r    r?      s    zNumberList.__repr__)r@   rA   rB   r   r   rD   r!   r   rW   r?   rH   r   r   r   r    rS      s   	rS   N)rC   typingr   r   r   r   r   Ztwilio.baser   Ztwilio.base.instance_contextr   Ztwilio.base.instance_resourcer	   Ztwilio.base.list_resourcer
   Ztwilio.base.versionr   r   r!   rS   r   r   r   r    <module>   s   \N