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	 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
      /       /
é    )Ú	serialize)Ú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 )
ÚPhoneNumberListú  c                    s   t t| ƒ |¡ i | _dS )zÿ
        Initialize the PhoneNumberList

        :param Version version: Version that contains the resource

        :returns: twilio.rest.lookups.v1.phone_number.PhoneNumberList
        :rtype: twilio.rest.lookups.v1.phone_number.PhoneNumberList
        N)Úsuperr   Ú__init__Ú	_solution)ÚselfÚversion©Ú	__class__© úU/var/www/html/env/lib/python3.10/site-packages/twilio/rest/lookups/v1/phone_number.pyr      s   	
zPhoneNumberList.__init__c                 C   ó   t | j|d�S ©zñ
        Constructs a PhoneNumberContext

        :param phone_number: The phone_number

        :returns: twilio.rest.lookups.v1.phone_number.PhoneNumberContext
        :rtype: twilio.rest.lookups.v1.phone_number.PhoneNumberContext
        ©Úphone_number©ÚPhoneNumberContextÚ_version©r   r   r   r   r   Úget"   ó   	zPhoneNumberList.getc                 C   r   r   r   r   r   r   r   Ú__call__-   r   zPhoneNumberList.__call__c                 C   ó   dS )úz
        Provide a friendly representation

        :returns: Machine friendly representation
        :rtype: str
        z#<Twilio.Lookups.V1.PhoneNumberList>r   ©r   r   r   r   Ú__repr__8   ó   zPhoneNumberList.__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 )ÚPhoneNumberPager	   c                    s   t t| ƒ ||¡ || _dS )a7  
        Initialize the PhoneNumberPage

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

        :returns: twilio.rest.lookups.v1.phone_number.PhoneNumberPage
        :rtype: twilio.rest.lookups.v1.phone_number.PhoneNumberPage
        N)r
   r(   r   r   )r   r   ÚresponseÚsolutionr   r   r   r   E   s   

zPhoneNumberPage.__init__c                 C   s   t | j|ƒS )a	  
        Build an instance of PhoneNumberInstance

        :param dict payload: Payload response from the API

        :returns: twilio.rest.lookups.v1.phone_number.PhoneNumberInstance
        :rtype: twilio.rest.lookups.v1.phone_number.PhoneNumberInstance
        )ÚPhoneNumberInstancer   )r   Úpayloadr   r   r   Úget_instanceT   s   	zPhoneNumberPage.get_instancec                 C   r   )r   z#<Twilio.Lookups.V1.PhoneNumberPage>r   r    r   r   r   r!   _   r"   zPhoneNumberPage.__repr__)r#   r$   r%   r&   r   r-   r!   r'   r   r   r   r   r(   B   s
    r(   c                       sB   e Zd ZdZ‡ fdd„Zejejej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 )a6  
        Initialize the PhoneNumberContext

        :param Version version: Version that contains the resource
        :param phone_number: The phone_number

        :returns: twilio.rest.lookups.v1.phone_number.PhoneNumberContext
        :rtype: twilio.rest.lookups.v1.phone_number.PhoneNumberContext
        r   z/PhoneNumbers/{phone_number}Nr   )r
   r   r   r   ÚformatÚ_uri)r   r   r   r   r   r   r   l   s   

zPhoneNumberContext.__init__c              	   C   sf   t  |t |dd„ ¡t |dd„ ¡dœ¡}| t |d¡¡ | jjd| j|d�}t	| j|| j
d d	�S )
á  
        Fetch a PhoneNumberInstance

        :param unicode country_code: Optional ISO country code of the phone number.
        :param unicode type: Indicates the type of information you would like returned with your request.
        :param unicode add_ons: Indicates the particular Add-on you would like to use to get more information.
        :param dict add_ons_data: The add_ons_data

        :returns: Fetched PhoneNumberInstance
        :rtype: twilio.rest.lookups.v1.phone_number.PhoneNumberInstance
        c                 S   ó   | S ©Nr   ©Úer   r   r   Ú<lambda>‹   ó    z*PhoneNumberContext.fetch.<locals>.<lambda>c                 S   r1   r2   r   r3   r   r   r   r5   Œ   r6   )ÚCountryCodeÚTypeÚAddOnsr9   ÚGET)Úparamsr   r   )r   Úofr   ÚmapÚupdateÚprefixed_collapsible_mapr   Úfetchr/   r+   r   )r   Úcountry_codeÚtypeÚadd_onsÚadd_ons_datar;   r,   r   r   r   r@   |   s   ýýzPhoneNumberContext.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.PhoneNumberContext.__repr__.<locals>.<genexpr>z)<Twilio.Lookups.V1.PhoneNumberContext {}>©Újoinr   Úitemsr.   ©r   Úcontextr   r   r   r!   ˜   ó   
zPhoneNumberContext.__repr__)
r#   r$   r%   r&   r   r   Úunsetr@   r!   r'   r   r   r   r   r   i   s    
ÿr   c                       s´   e Zd ZdZG dd„ deƒ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jejejejfdd„Zdd„ Z‡  ZS )r+   r	   c                   @   s   e Zd ZdZdZdZdS )zPhoneNumberInstance.TypeÚlandlineÚmobileÚvoipN)r#   r$   r%   ÚLANDLINEÚMOBILEÚVOIPr   r   r   r   r8   ¦   s    r8   Nc                    s`   t t| ƒ |¡ |d |d |d |d |d |d |d dœ| _d	| _d|p+| jd i| _d	S )
zÇ
        Initialize the PhoneNumberInstance

        :returns: twilio.rest.lookups.v1.phone_number.PhoneNumberInstance
        :rtype: twilio.rest.lookups.v1.phone_number.PhoneNumberInstance
        Úcaller_namerA   r   Únational_formatÚcarrierrC   Úurl)r]   rA   r   r^   r_   rC   r`   N)r
   r+   r   Ú_propertiesÚ_contextr   )r   r   r,   r   r   r   r   r   «   s   ùzPhoneNumberInstance.__init__c                 C   s&   | j du rt| j| jd d�| _ | j S )a9  
        Generate an instance context for the instance, the context is capable of
        performing various actions.  All instance actions are proxied to the context

        :returns: PhoneNumberContext for this PhoneNumberInstance
        :rtype: twilio.rest.lookups.v1.phone_number.PhoneNumberContext
        Nr   r   )rb   r   r   r   r    r   r   r   Ú_proxyÃ   s   
	zPhoneNumberInstance._proxyc                 C   ó
   | j d S )zp
        :returns: String indicating the name of the owner of the phone number.
        :rtype: unicode
        r]   ©ra   r    r   r   r   r]   Ð   ó   
zPhoneNumberInstance.caller_namec                 C   rd   )z^
        :returns: The ISO country code for the phone number.
        :rtype: unicode
        rA   re   r    r   r   r   rA   Ø   rf   z PhoneNumberInstance.country_codec                 C   rd   )zK
        :returns: The phone number, in E.
        :rtype: unicode
        r   re   r    r   r   r   r   à   rf   z PhoneNumberInstance.phone_numberc                 C   rd   )zY
        :returns: The phone number, in national format.
        :rtype: unicode
        r^   re   r    r   r   r   r^   è   rf   z#PhoneNumberInstance.national_formatc                 C   rd   )z?
        :returns: The carrier
        :rtype: unicode
        r_   re   r    r   r   r   r_   ð   rf   zPhoneNumberInstance.carrierc                 C   rd   )zš
        :returns: Results of any Add-ons you have specified using the AddOn parameter in the request, as a JSON dictionary.
        :rtype: dict
        rC   re   r    r   r   r   rC   ø   rf   zPhoneNumberInstance.add_onsc                 C   rd   )z;
        :returns: The url
        :rtype: unicode
        r`   re   r    r   r   r   r`      rf   zPhoneNumberInstance.urlc                 C   s   | j j||||d�S )r0   )rA   rB   rC   rD   )rc   r@   )r   rA   rB   rC   rD   r   r   r   r@     s   üzPhoneNumberInstance.fetchc                 C   rE   )r   rF   c                 s   rG   rH   rI   rJ   r   r   r   rN   #  rO   z/PhoneNumberInstance.__repr__.<locals>.<genexpr>z*<Twilio.Lookups.V1.PhoneNumberInstance {}>rP   rS   r   r   r   r!     rU   zPhoneNumberInstance.__repr__r2   )r#   r$   r%   r&   Úobjectr8   r   Úpropertyrc   r]   rA   r   r^   r_   rC   r`   r   rV   r@   r!   r'   r   r   r   r   r+   £   s0    








ÿr+   N)r&   Útwilio.baser   r   Ú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':