o
    et                     @   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.v1.voice.number.NumberList
        :rtype: twilio.rest.pricing.v1.voice.number.NumberList
        N)superr   __init__	_solution)selfversion	__class__ V/var/www/html/venv/lib/python3.10/site-packages/twilio/rest/pricing/v1/voice/number.pyr	      s   	
zNumberList.__init__c                 C      t | j|dS z
        Constructs a NumberContext

        :param number: The phone number to fetch

        :returns: twilio.rest.pricing.v1.voice.number.NumberContext
        :rtype: twilio.rest.pricing.v1.voice.number.NumberContext
        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.V1.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                       ,   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.v1.voice.number.NumberPage
        :rtype: twilio.rest.pricing.v1.voice.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.v1.voice.number.NumberInstance
        :rtype: twilio.rest.pricing.v1.voice.number.NumberInstance
        )NumberInstancer   r   payloadr   r   r   get_instanceQ   s   	zNumberPage.get_instancec                 C   r   )r   z<Twilio.Pricing.V1.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                       r%   )r   c                    s2   t t| | d|i| _djdi | j| _dS )a*  
        Initialize the NumberContext

        :param Version version: Version that contains the resource
        :param number: The phone number to fetch

        :returns: twilio.rest.pricing.v1.voice.number.NumberContext
        :rtype: twilio.rest.pricing.v1.voice.number.NumberContext
        r   z/Voice/Numbers/{number}Nr   )r   r   r	   r
   format_uri)r   r   r   r   r   r   r	   h   s   

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

        :returns: The fetched NumberInstance
        :rtype: twilio.rest.pricing.v1.voice.number.NumberInstance
        GET)methodurir   r   )r   fetchr.   r)   r
   r*   r   r   r   r3   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.V1.NumberContext {}>joinr
   itemsr-   r   contextr   r   r   r         
zNumberContext.__repr__)r!   r"   r#   r	   r3   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dd Zdd Z  ZS )r)   Nc              	      sn   t t| | |d|d|d|d|d|d|dd| _d	| _d|p2| jd i| _d	S )
z
        Initialize the NumberInstance

        :returns: twilio.rest.pricing.v1.voice.number.NumberInstance
        :rtype: twilio.rest.pricing.v1.voice.number.NumberInstance
        r   countryiso_countryoutbound_call_priceinbound_call_price
price_uniturl)r   rE   rF   rG   rH   rI   rJ   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.v1.voice.number.NumberContext
        Nr   r   )rL   r   r   r
   r   r   r   r   _proxy   s   
	zNumberInstance._proxyc                 C   
   | j d S )zD
        :returns: The phone number
        :rtype: unicode
        r   rK   r   r   r   r   r         
zNumberInstance.numberc                 C   rN   )zK
        :returns: The name of the country
        :rtype: unicode
        rE   rO   r   r   r   r   rE      rP   zNumberInstance.countryc                 C   rN   )zH
        :returns: The ISO country code
        :rtype: unicode
        rF   rO   r   r   r   r   rF      rP   zNumberInstance.iso_countryc                 C   rN   )zP
        :returns: The OutboundCallPrice record
        :rtype: unicode
        rG   rO   r   r   r   r   rG      rP   z"NumberInstance.outbound_call_pricec                 C   rN   )zO
        :returns: The InboundCallPrice record
        :rtype: unicode
        rH   rO   r   r   r   r   rH      rP   z!NumberInstance.inbound_call_pricec                 C   rN   )z
        :returns: The currency in which prices are measured, in ISO 4127 format (e.g. usd, eur, jpy)
        :rtype: unicode
        rI   rO   r   r   r   r   rI      rP   zNumberInstance.price_unitc                 C   rN   )zT
        :returns: The absolute URL of the resource
        :rtype: unicode
        rJ   rO   r   r   r   r   rJ      rP   zNumberInstance.urlc                 C   s
   | j  S )r/   )rM   r3   r   r   r   r   r3      s   
zNumberInstance.fetchc                 C   r4   )r   r5   c                 s   r6   r7   r8   r9   r   r   r   r=      r>   z*NumberInstance.__repr__.<locals>.<genexpr>z%<Twilio.Pricing.V1.NumberInstance {}>r?   rB   r   r   r   r      rD   zNumberInstance.__repr__)N)r!   r"   r#   r	   propertyrM   r   rE   rF   rG   rH   rI   rJ   r3   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&(