o
    �¨ÊhÊ   ã                   @   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                       s8   e Zd ZdZ‡ fdd„Zdd„ Zdd„ Zdd	„ Z‡  ZS )
Ú
NumberListú  c                    s   t t| ƒ |¡ i | _dS )zð
        Initialize the NumberList

        :param Version version: Version that contains the resource

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

        :param destination_number: Fetches voice prices for number

        :returns: twilio.rest.pricing.v2.voice.number.NumberContext
        :rtype: twilio.rest.pricing.v2.voice.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__7   ó   zNumberList.__repr__)	Ú__name__Ú
__module__Ú__qualname__Ú__doc__r
   r   r   r    Ú__classcell__r   r   r   r   r      s    r   c                       s0   e Zd ZdZ‡ fdd„Zdd„ Zdd„ Z‡  ZS )Ú
NumberPager   c                    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.voice.number.NumberPage
        :rtype: twilio.rest.pricing.v2.voice.number.NumberPage
        N)r	   r'   r
   r   )r   r   ÚresponseÚsolutionr   r   r   r
   D   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.voice.number.NumberInstance
        :rtype: twilio.rest.pricing.v2.voice.number.NumberInstance
        )ÚNumberInstancer   )r   Úpayloadr   r   r   Úget_instanceS   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   r'   A   s
    r'   c                       s6   e Zd ZdZ‡ fdd„Zejfdd„Zdd„ Z‡  Z	S )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 destination_number: Fetches voice prices for number

        :returns: twilio.rest.pricing.v2.voice.number.NumberContext
        :rtype: twilio.rest.pricing.v2.voice.number.NumberContext
        r   z#/Voice/Numbers/{destination_number}Nr   )r	   r   r
   r   ÚformatÚ_uri)r   r   r   r   r   r   r
   k   s   

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

        :param unicode origination_number: The origination_number

        :returns: Fetched NumberInstance
        :rtype: twilio.rest.pricing.v2.voice.number.NumberInstance
        ÚOriginationNumberÚGET)Úparamsr   r   )r   Úofr   Úfetchr.   r*   r   )r   Úorigination_numberr2   r+   r   r   r   r4   {   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
   r   Úunsetr4   r    r&   r   r   r   r   r   h   s
    r   c                       s¤   e Zd 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*   r   Nc              	      sf   t t| ƒ |¡ |d |d |d |d |d |d |d |d d	œ| _d
| _d|p.| jd i| _d
S )z¸
        Initialize the NumberInstance

        :returns: twilio.rest.pricing.v2.voice.number.NumberInstance
        :rtype: twilio.rest.pricing.v2.voice.number.NumberInstance
        r   r5   ÚcountryÚiso_countryÚoutbound_call_pricesÚinbound_call_priceÚ
price_unitÚurl)r   r5   rH   rI   rJ   rK   rL   rM   N)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.voice.number.NumberContext
        Nr   r   )rO   r   r   r   r   r   r   r   Ú_proxy»   s   
	þzNumberInstance._proxyc                 C   ó
   | j d S )zZ
        :returns: The destination phone number, in E.164
        :rtype: unicode
        r   ©rN   r   r   r   r   r   Ë   ó   
z!NumberInstance.destination_numberc                 C   rQ   )zZ
        :returns: The origination phone number, in E.164
        :rtype: unicode
        r5   rR   r   r   r   r   r5   Ó   rS   z!NumberInstance.origination_numberc                 C   rQ   )zG
        :returns: Name of the country
        :rtype: unicode
        rH   rR   r   r   r   r   rH   Û   rS   zNumberInstance.countryc                 C   rQ   )zH
        :returns: The ISO country code
        :rtype: unicode
        rI   rR   r   r   r   r   rI   ã   rS   zNumberInstance.iso_countryc                 C   rQ   )z_
        :returns: List of OutboundCallPriceWithOrigin records
        :rtype: unicode
        rJ   rR   r   r   r   r   rJ   ë   rS   z#NumberInstance.outbound_call_pricesc                 C   rQ   )zT
        :returns: List of InboundCallPrice records
        :rtype: unicode
        rK   rR   r   r   r   r   rK   ó   rS   z!NumberInstance.inbound_call_pricec                 C   rQ   )z‡
        :returns: The currency in which prices are measured, in ISO 4127 format (e.g. usd, eur, jpy).
        :rtype: unicode
        rL   rR   r   r   r   r   rL   û   rS   zNumberInstance.price_unitc                 C   rQ   )zM
        :returns: The URL of this resource.
        :rtype: unicode
        rM   rR   r   r   r   r   rM     rS   zNumberInstance.urlc                 C   s   | j j|d�S )r/   )r5   )rP   r4   )r   r5   r   r   r   r4     r   zNumberInstance.fetchc                 C   r6   )r   r7   c                 s   r8   r9   r:   r;   r   r   r   r?     r@   z*NumberInstance.__repr__.<locals>.<genexpr>z%<Twilio.Pricing.V2.NumberInstance {}>rA   rD   r   r   r   r      rF   zNumberInstance.__repr__)N)r"   r#   r$   r%   r
   ÚpropertyrP   r   r5   rH   rI   rJ   rK   rL   rM   r   rG   r4   r    r&   r   r   r   r   r*   �   s.    








r*   N)r%   Ú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   1'5