o
    e!                     @   s   d 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G dd deZdS )za
This code was generated by
\ / _    _  _|   _  _
 | (_)\/(_)(_|\/| |(/_  v1.0.0
      /       /
    )values)InstanceContext)InstanceResource)ListResource)Pagec                       s4   e Zd Z fddZdd Zdd Zdd Z  ZS )	
NumberListc                    s   t t| | i | _dS )z
        Initialize the NumberList

        :param Version version: Version that contains the resource

        :returns: twilio.rest.pricing.v2.number.NumberList
        :rtype: twilio.rest.pricing.v2.number.NumberList
        N)superr   __init__	_solution)selfversion	__class__ P/var/www/html/venv/lib/python3.10/site-packages/twilio/rest/pricing/v2/number.pyr	      s   	
zNumberList.__init__c                 C      t | j|dS a	  
        Constructs a NumberContext

        :param destination_number: The destination number for which to fetch pricing information

        :returns: twilio.rest.pricing.v2.number.NumberContext
        :rtype: twilio.rest.pricing.v2.number.NumberContext
        destination_numberNumberContext_versionr   r   r   r   r   get       	zNumberList.getc                 C   r   r   r   r   r   r   r   __call__+   r   zNumberList.__call__c                 C      dS )z
        Provide a friendly representation

        :returns: Machine friendly representation
        :rtype: str
        z<Twilio.Pricing.V2.NumberList>r   r   r   r   r   __repr__6      zNumberList.__repr__)__name__
__module____qualname__r	   r   r   r   __classcell__r   r   r   r   r      s
    r   c                       s,   e Zd Z fddZdd Zdd Z  ZS )
NumberPagec                    s   t t| || || _dS )a  
        Initialize the NumberPage

        :param Version version: Version that contains the resource
        :param Response response: Response from the API

        :returns: twilio.rest.pricing.v2.number.NumberPage
        :rtype: twilio.rest.pricing.v2.number.NumberPage
        N)r   r%   r	   r
   )r   r   responsesolutionr   r   r   r	   B   s   

zNumberPage.__init__c                 C   s   t | j|S )z
        Build an instance of NumberInstance

        :param dict payload: Payload response from the API

        :returns: twilio.rest.pricing.v2.number.NumberInstance
        :rtype: twilio.rest.pricing.v2.number.NumberInstance
        )NumberInstancer   )r   payloadr   r   r   get_instanceQ   s   	zNumberPage.get_instancec                 C   r   )r   z<Twilio.Pricing.V2.NumberPage>r   r   r   r   r   r   \   r    zNumberPage.__repr__)r!   r"   r#   r	   r*   r   r$   r   r   r   r   r%   @   s    r%   c                       s2   e Zd Z fddZejfddZdd Z  ZS )r   c                    s2   t t| | d|i| _djdi | j| _dS )aN  
        Initialize the NumberContext

        :param Version version: Version that contains the resource
        :param destination_number: The destination number for which to fetch pricing information

        :returns: twilio.rest.pricing.v2.number.NumberContext
        :rtype: twilio.rest.pricing.v2.number.NumberContext
        r   z&/Trunking/Numbers/{destination_number}Nr   )r   r   r	   r
   format_uri)r   r   r   r   r   r   r	   h   s   

zNumberContext.__init__c                 C   s8   t d|i}| jjd| j|d}t| j|| jd dS )
        Fetch the NumberInstance

        :param unicode origination_number: The origination number for which to fetch pricing information

        :returns: The fetched NumberInstance
        :rtype: twilio.rest.pricing.v2.number.NumberInstance
        OriginationNumberGET)methoduriparamsr   r   )r   ofr   fetchr,   r(   r
   )r   origination_numberdatar)   r   r   r   r4   x   s   	zNumberContext.fetchc                 C   $   d dd | j D }d|S )r    c                 s        | ]\}}d  ||V  qdS z{}={}Nr+   .0kvr   r   r   	<genexpr>       z)NumberContext.__repr__.<locals>.<genexpr>z$<Twilio.Pricing.V2.NumberContext {}>joinr
   itemsr+   r   contextr   r   r   r         
zNumberContext.__repr__)	r!   r"   r#   r	   r   unsetr4   r   r$   r   r   r   r   r   f   s    r   c                       s   e Zd Zd fdd	Zedd Zedd Zedd	 Zed
d Zedd Z	edd Z
edd Zedd Zedd ZejfddZdd Z  ZS )r(   Nc              
      sv   t t| | |d|d|d|d|d|d|d|dd	| _d
| _d|p6| jd i| _d
S )z
        Initialize the NumberInstance

        :returns: twilio.rest.pricing.v2.number.NumberInstance
        :rtype: twilio.rest.pricing.v2.number.NumberInstance
        r   r5   countryiso_countryterminating_prefix_pricesoriginating_call_price
price_uniturl)r   r5   rI   rJ   rK   rL   rM   rN   N)r   r(   r	   r   _properties_contextr
   )r   r   r)   r   r   r   r   r	      s   
zNumberInstance.__init__c                 C   s&   | j du rt| j| jd d| _ | j S )a$  
        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
        :rtype: twilio.rest.pricing.v2.number.NumberContext
        Nr   r   )rP   r   r   r
   r   r   r   r   _proxy   s   
	zNumberInstance._proxyc                 C   
   | j d S )za
        :returns: The destination phone number, in E.164 format
        :rtype: unicode
        r   rO   r   r   r   r   r         
z!NumberInstance.destination_numberc                 C   rR   )za
        :returns: The origination phone number, in E.164 format
        :rtype: unicode
        r5   rS   r   r   r   r   r5      rT   z!NumberInstance.origination_numberc                 C   rR   )zK
        :returns: The name of the country
        :rtype: unicode
        rI   rS   r   r   r   r   rI      rT   zNumberInstance.countryc                 C   rR   )zH
        :returns: The ISO country code
        :rtype: unicode
        rJ   rS   r   r   r   r   rJ      rT   zNumberInstance.iso_countryc                 C   rR   )zW
        :returns: The terminating_prefix_prices
        :rtype: list[unicode]
        rK   rS   r   r   r   r   rK      rT   z(NumberInstance.terminating_prefix_pricesc                 C   rR   )zS
        :returns: The OriginatingCallPrice record
        :rtype: unicode
        rL   rS   r   r   r   r   rL      rT   z%NumberInstance.originating_call_pricec                 C   rR   )z
        :returns: The currency in which prices are measured, in ISO 4127 format (e.g. usd, eur, jpy)
        :rtype: unicode
        rM   rS   r   r   r   r   rM      rT   zNumberInstance.price_unitc                 C   rR   )zT
        :returns: The absolute URL of the resource
        :rtype: unicode
        rN   rS   r   r   r   r   rN      rT   zNumberInstance.urlc                 C   s   | j j|dS )r-   )r5   )rQ   r4   )r   r5   r   r   r   r4     r   zNumberInstance.fetchc                 C   r7   )r   r8   c                 s   r9   r:   r;   r<   r   r   r   r@     rA   z*NumberInstance.__repr__.<locals>.<genexpr>z%<Twilio.Pricing.V2.NumberInstance {}>rB   rE   r   r   r   r     rG   zNumberInstance.__repr__)N)r!   r"   r#   r	   propertyrQ   r   r5   rI   rJ   rK   rL   rM   rN   r   rH   r4   r   r$   r   r   r   r   r(      s,    








r(   N)__doc__twilio.baser   twilio.base.instance_contextr   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.pager   r   r%   r   r(   r   r   r   r   <module>   s   0&0