o
    f>hg                     @   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 - Lookups
    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                !       sh  e Zd ZG dd deZ	 	d"dedeeef de	e f fddZ
ed#ddZejejejejejejejejejejejejejejejfdeeef deeef deeef deeef deeef deeef deeef deeef deeef deeef deeef deeef deeef deeef deeef d	d f ddZejejejejejejejejejejejejejejejfdeeef deeef deeef deeef deeef deeef deeef deeef deeef deeef deeef deeef deeef deeef deeef d	d f ddZd	efd d!Z  ZS )$PhoneNumberInstancec                   @   s$   e Zd ZdZdZdZdZdZdZdS )z#PhoneNumberInstance.ValidationError	TOO_SHORTTOO_LONGINVALID_BUT_POSSIBLEINVALID_COUNTRY_CODEINVALID_LENGTHNOT_A_NUMBERN)	__name__
__module____qualname__r   r   r   r   r   r    r   r   V/var/www/html/venv/lib/python3.10/site-packages/twilio/rest/lookups/v2/phone_number.pyValidationError   s    r   Nversionpayloadphone_numberc                    s   t  | |d| _|d| _|d| _|d| _|d| _|d| _|d| _	|d| _
|d	| _|d
| _|d| _|d| _|d| _|d| _|d| _|d| _|d| _d|pq| ji| _d | _d S )Ncalling_country_codecountry_coder   national_formatvalidvalidation_errorscaller_namesim_swapcall_forwardingline_statusline_type_intelligenceidentity_matchreassigned_numbersms_pumping_riskphone_number_quality_scorepre_fillurl)super__init__getr   r   r   r   r   r    r!   r"   r#   r$   r%   r&   r'   r(   r)   r*   r+   	_solution_context)selfr   r   r   	__class__r   r   r-   5   s@   

zPhoneNumberInstance.__init__returnPhoneNumberContextc                 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: PhoneNumberContext for this PhoneNumberInstance
        Nr   r   )r0   r5   _versionr/   r1   r   r   r   _proxy`   s   
zPhoneNumberInstance._proxyfieldsr   
first_name	last_nameaddress_line1address_line2citystatepostal_codeaddress_country_codenational_iddate_of_birthlast_verified_dateverification_sidpartner_sub_idc                 C   s*   | j j|||||||||	|
|||||dS )v
  
        Fetch the PhoneNumberInstance

        :param fields: A comma-separated list of fields to return. Possible values are validation, caller_name, sim_swap, call_forwarding, line_status, line_type_intelligence, identity_match, reassigned_number, sms_pumping_risk, phone_number_quality_score, pre_fill.
        :param country_code: The [country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) used if the phone number provided is in national format.
        :param first_name: User’s first name. This query parameter is only used (optionally) for identity_match package requests.
        :param last_name: User’s last name. This query parameter is only used (optionally) for identity_match package requests.
        :param address_line1: User’s first address line. This query parameter is only used (optionally) for identity_match package requests.
        :param address_line2: User’s second address line. This query parameter is only used (optionally) for identity_match package requests.
        :param city: User’s city. This query parameter is only used (optionally) for identity_match package requests.
        :param state: User’s country subdivision, such as state, province, or locality. This query parameter is only used (optionally) for identity_match package requests.
        :param postal_code: User’s postal zip code. This query parameter is only used (optionally) for identity_match package requests.
        :param address_country_code: User’s country, up to two characters. This query parameter is only used (optionally) for identity_match package requests.
        :param national_id: User’s national ID, such as SSN or Passport ID. This query parameter is only used (optionally) for identity_match package requests.
        :param date_of_birth: User’s date of birth, in YYYYMMDD format. This query parameter is only used (optionally) for identity_match package requests.
        :param last_verified_date: The date you obtained consent to call or text the end-user of the phone number or a date on which you are reasonably certain that the end-user could still be reached at that number. This query parameter is only used (optionally) for reassigned_number package requests.
        :param verification_sid: The unique identifier associated with a verification process through verify API. This query parameter is only used (optionally) for pre_fill package requests.
        :param partner_sub_id: The optional partnerSubId parameter to provide context for your sub-accounts, tenantIDs, sender IDs or other segmentation, enhancing the accuracy of the risk analysis.

        :returns: The fetched PhoneNumberInstance
        r:   r   r;   r<   r=   r>   r?   r@   rA   rB   rC   rD   rE   rF   rG   )r9   fetchr1   r:   r   r;   r<   r=   r>   r?   r@   rA   rB   rC   rD   rE   rF   rG   r   r   r   rJ   o   s"   'zPhoneNumberInstance.fetchc                    s2   | j j|||||||||	|
|||||dI dH S )
  
        Asynchronous coroutine to fetch the PhoneNumberInstance

        :param fields: A comma-separated list of fields to return. Possible values are validation, caller_name, sim_swap, call_forwarding, line_status, line_type_intelligence, identity_match, reassigned_number, sms_pumping_risk, phone_number_quality_score, pre_fill.
        :param country_code: The [country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) used if the phone number provided is in national format.
        :param first_name: User’s first name. This query parameter is only used (optionally) for identity_match package requests.
        :param last_name: User’s last name. This query parameter is only used (optionally) for identity_match package requests.
        :param address_line1: User’s first address line. This query parameter is only used (optionally) for identity_match package requests.
        :param address_line2: User’s second address line. This query parameter is only used (optionally) for identity_match package requests.
        :param city: User’s city. This query parameter is only used (optionally) for identity_match package requests.
        :param state: User’s country subdivision, such as state, province, or locality. This query parameter is only used (optionally) for identity_match package requests.
        :param postal_code: User’s postal zip code. This query parameter is only used (optionally) for identity_match package requests.
        :param address_country_code: User’s country, up to two characters. This query parameter is only used (optionally) for identity_match package requests.
        :param national_id: User’s national ID, such as SSN or Passport ID. This query parameter is only used (optionally) for identity_match package requests.
        :param date_of_birth: User’s date of birth, in YYYYMMDD format. This query parameter is only used (optionally) for identity_match package requests.
        :param last_verified_date: The date you obtained consent to call or text the end-user of the phone number or a date on which you are reasonably certain that the end-user could still be reached at that number. This query parameter is only used (optionally) for reassigned_number package requests.
        :param verification_sid: The unique identifier associated with a verification process through verify API. This query parameter is only used (optionally) for pre_fill package requests.
        :param partner_sub_id: The optional partnerSubId parameter to provide context for your sub-accounts, tenantIDs, sender IDs or other segmentation, enhancing the accuracy of the risk analysis.

        :returns: The fetched PhoneNumberInstance
        rI   N)r9   fetch_asyncrK   r   r   r   rM      s$   'zPhoneNumberInstance.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>       z/PhoneNumberInstance.__repr__.<locals>.<genexpr>z*<Twilio.Lookups.V2.PhoneNumberInstance {}>joinr/   itemsrT   r1   contextr   r   r   __repr__      
zPhoneNumberInstance.__repr__)N)r4   r5   )r   r   r   objectr   r   r   strr   r   r-   propertyr9   r   unsetr   rJ   rM   r`   __classcell__r   r   r2   r   r      s    
+







	








;







	








9r   c                !       s4  e Zd Zdedef fddZejejejejejejejejejejejejejejejfdeee	f deee	f deee	f deee	f d	eee	f d
eee	f deee	f deee	f deee	f deee	f deee	f deee	f deee	f deee	f deee	f de
f ddZejejejejejejejejejejejejejejejfdeee	f deee	f deee	f deee	f d	eee	f d
eee	f deee	f deee	f deee	f deee	f deee	f deee	f deee	f deee	f deee	f de
f ddZdefddZ  ZS )r5   r   r   c                    s.   t  | d|i| _djdi | j| _dS )z
        Initialize the PhoneNumberContext

        :param version: Version that contains the resource
        :param phone_number: The phone number to lookup in E.164 or national format. Default country code is +1 (North America).
        r   z/PhoneNumbers/{phone_number}Nr   )r,   r-   r/   rT   _uri)r1   r   r   r2   r   r   r-      s   zPhoneNumberContext.__init__r:   r   r;   r<   r=   r>   r?   r@   rA   rB   rC   rD   rE   rF   rG   r4   c                 C   sh   t |||||||||	|
|||||d}t i }d|d< | jjd| j||d}t| j|| jd dS )rH   FieldsCountryCode	FirstNameLastNameAddressLine1AddressLine2CityState
PostalCodeAddressCountryCode
NationalIdDateOfBirthLastVerifiedDateVerificationSidPartnerSubIdapplication/jsonAcceptGETmethoduriparamsheadersr   r6   )r   ofr7   rJ   rg   r   r/   r1   r:   r   r;   r<   r=   r>   r?   r@   rA   rB   rC   rD   rE   rF   rG   datar   r   r   r   r   rJ      s8   (

zPhoneNumberContext.fetchc                    sp   t |||||||||	|
|||||d}t i }d|d< | jjd| j||dI dH }t| j|| jd dS )	rL   rh   rx   ry   rz   r{   Nr   r6   )r   r   r7   rM   rg   r   r/   r   r   r   r   rM   F  s:   (

zPhoneNumberContext.fetch_asyncc                 C   rN   )rO   rP   c                 s   rQ   rR   rS   rU   r   r   r   rY     rZ   z.PhoneNumberContext.__repr__.<locals>.<genexpr>z)<Twilio.Lookups.V2.PhoneNumberContext {}>r[   r^   r   r   r   r`     ra   zPhoneNumberContext.__repr__)r   r   r   r   rc   r-   r   re   r   rb   r   rJ   rM   r`   rf   r   r   r2   r   r5      s    







	








L







	








Jr5   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 )PhoneNumberListr   c                    s   t  | dS )zm
        Initialize the PhoneNumberList

        :param version: Version that contains the resource

        N)r,   r-   )r1   r   r2   r   r   r-     s   zPhoneNumberList.__init__r   r4   c                 C      t | j|dS z
        Constructs a PhoneNumberContext

        :param phone_number: The phone number to lookup in E.164 or national format. Default country code is +1 (North America).
        r6   r5   r7   r1   r   r   r   r   r.        zPhoneNumberList.getc                 C   r   r   r   r   r   r   r   __call__  r   zPhoneNumberList.__call__c                 C   s   dS )rO   z#<Twilio.Lookups.V2.PhoneNumberList>r   r8   r   r   r   r`     s   zPhoneNumberList.__repr__)r   r   r   r   r-   rc   r5   r.   r   r`   rf   r   r   r2   r   r     s
    	r   N)__doc__typingr   r   r   r   r   twilio.baser   twilio.base.instance_contextr   twilio.base.instance_resourcer	   twilio.base.list_resourcer
   twilio.base.versionr   r   r5   r   r   r   r   r   <module>   s     U 0