o
    f>h#                     @   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dedeeef dee f fddZ	e
dd
dZejfdeeef dd fddZejfdeeef dd fddZdef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|p;| 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__ P/var/www/html/venv/lib/python3.10/site-packages/twilio/rest/pricing/v2/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    _proxy=   s   
zNumberInstance._proxyr   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)   L   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,   Z   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>n       z*NumberInstance.__repr__.<locals>.<genexpr>z%<Twilio.Pricing.V2.NumberInstance {}>joinr   itemsr3   r   contextr   r   r    __repr__h      
zNumberInstance.__repr__)N)r!   r"   )__name__
__module____qualname____doc__r   r   strr   r   r   propertyr&   r   unsetr   objectr)   r,   r?   __classcell__r   r   r   r    r      s2    




r   c                       st   e Zd Zdedef fddZejfdeee	f de
fddZejfdeee	f 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 )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}Nr   )r   r   r   r3   _uri)r   r   r   r   r   r    r   t   s   zNumberContext.__init__r   r!   c                 C   sL   t d|i}t i }d|d< | jjd| j||d}t| j|| jd dS )r'   OriginationNumberapplication/jsonAcceptGETmethoduriparamsheadersr   r#   )r   ofr$   r)   rJ   r   r   r   r   datarS   r   r   r   r    r)      s   

zNumberContext.fetchc                    sT   t d|i}t i }d|d< | jjd| j||dI dH }t| j|| jd dS )	r+   rK   rL   rM   rN   rO   Nr   r#   )r   rT   r$   r,   rJ   r   r   rU   r   r   r    r,      s   

zNumberContext.fetch_asyncc                 C   r-   )r.   r/   c                 s   r0   r1   r2   r4   r   r   r    r8      r9   z)NumberContext.__repr__.<locals>.<genexpr>z$<Twilio.Pricing.V2.NumberContext {}>r:   r=   r   r   r    r?      r@   zNumberContext.__repr__)rA   rB   rC   r   rE   r   r   rG   r   rH   r   r)   r,   r?   rI   r   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 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         zNumberList.getc                 C   rX   rY   rZ   r[   r   r   r    __call__   r\   zNumberList.__call__c                 C   s   dS )r.   z<Twilio.Pricing.V2.NumberList>r   r%   r   r   r    r?      s   zNumberList.__repr__)rA   rB   rC   r   r   rE   r"   r   r]   r?   rI   r   r   r   r    rW      s
    	rW   N)rD   typingr   r   r   r   r   twilio.baser   twilio.base.instance_contextr   twilio.base.instance_resourcer	   twilio.base.list_resourcer
   twilio.base.versionr   r   r"   rW   r   r   r   r    <module>   s    [Y