U
    hRf                     @   s   d Z ddlmZ ddlmZmZmZmZmZmZm	Z	 ddl
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G dd deZdS )a  
    This code was generated by
   ___ _ _ _ _ _    _ ____    ____ ____ _    ____ ____ _  _ ____ ____ ____ ___ __   __
    |  | | | | |    | |  | __ |  | |__| | __ | __ |___ |\ | |___ |__/ |__|  | |  | |__/
    |  |_|_| | |___ | |__|    |__| |  | |    |__] |___ | \| |___ |  \ |  |  | |__| |  \

    Twilio - Messaging
    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.
    )datetime)AnyDictListOptionalUnionIteratorAsyncIterator)deserialize	serializevalues)InstanceContext)InstanceResource)ListResource)Version)Pagec                       s(  e Zd ZG dd deZG dd deZdeeee	f e
e d fddZed	d
ddZed
ddZed
ddZd d
ddZd 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ejejejejejejfeeef eeef eeef eee ef eeef eeef eee ef edef eeef eeef eeef eeef eeef eeef eeef eeef eeef eeef eeef eeef eeef d 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ejejejejejejfeeef eeef eeef eee ef eeef eeef eee ef edef eeef eeef eeef eeef eeef eeef eeef eeef eeef eeef eeef eeef eeef d dddZed
ddZ  ZS )TollfreeVerificationInstancec                   @   s$   e Zd ZdZdZdZdZdZdZdS )&TollfreeVerificationInstance.OptInTypeVERBALWEB_FORM
PAPER_FORMVIA_TEXTMOBILE_QR_CODEIMPORTN)	__name__
__module____qualname__r   r   r   r   r   r    r   r   R/tmp/pip-unpacked-wheel-74se_viw/twilio/rest/messaging/v1/tollfree_verification.py	OptInType   s   r   c                   @   s   e Zd ZdZdZdZdZdS )#TollfreeVerificationInstance.StatusPENDING_REVIEW	IN_REVIEWTWILIO_APPROVEDTWILIO_REJECTEDN)r   r   r   r!   r"   r#   r$   r   r   r   r   Status#   s   r%   N)versionpayloadsidc                    s  t  | |d| _|d| _|d| _|d| _t|d| _	t|d| _
|d| _|d| _|d	| _|d
| _|d| _|d| _|d| _|d| _|d| _|d| _|d| _|d| _|d| _|d| _|d| _|d| _|d| _|d| _|d| _|d| _|d| _|d| _ |d| _!|d| _"|d| _#t$|d | _%t|d!| _&|d"| _'|d#| _(|d$| _)|d%| _*d|p| ji| _+d | _,d S )&Nr(   account_sidcustomer_profile_sidtrust_product_siddate_createddate_updatedregulated_item_sidbusiness_namebusiness_street_addressbusiness_street_address2business_citybusiness_state_province_regionbusiness_postal_codebusiness_countrybusiness_websitebusiness_contact_first_namebusiness_contact_last_namebusiness_contact_emailbusiness_contact_phonenotification_emailuse_case_categoriesuse_case_summaryproduction_message_sampleopt_in_image_urlsopt_in_typemessage_volumeadditional_informationtollfree_phone_number_sidstatusurlrejection_reason
error_codeedit_expirationedit_allowedrejection_reasonsresource_linksexternal_reference_id)-super__init__getr(   r)   r*   r+   r
   iso8601_datetimer,   r-   r.   r/   r0   r1   r2   r3   r4   r5   r6   r7   r8   r9   r:   r;   r<   r=   r>   r?   r@   rA   rB   rC   rD   rE   rF   integerrG   rH   rI   rJ   rK   rL   	_solution_context)selfr&   r'   r(   	__class__r   r   rN   Q   s     
z%TollfreeVerificationInstance.__init__TollfreeVerificationContextreturnc                 C   s&   | j dk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: TollfreeVerificationContext for this TollfreeVerificationInstance
        Nr(   r(   )rS   rW   _versionrR   rT   r   r   r   _proxy   s    
z#TollfreeVerificationInstance._proxyc                 C   s
   | j  S )w
        Deletes the TollfreeVerificationInstance


        :returns: True if delete succeeds, False otherwise
        )r]   deleter\   r   r   r   r_      s    z#TollfreeVerificationInstance.deletec                    s   | j  I dH S )
        Asynchronous coroutine that deletes the TollfreeVerificationInstance


        :returns: True if delete succeeds, False otherwise
        N)r]   delete_asyncr\   r   r   r   ra      s    z)TollfreeVerificationInstance.delete_asyncc                 C   s
   | j  S )u
        Fetch the TollfreeVerificationInstance


        :returns: The fetched TollfreeVerificationInstance
        )r]   fetchr\   r   r   r   rc      s    z"TollfreeVerificationInstance.fetchc                    s   | j  I dH S )
        Asynchronous coroutine to fetch the TollfreeVerificationInstance


        :returns: The fetched TollfreeVerificationInstance
        N)r]   fetch_asyncr\   r   r   r   re      s    z(TollfreeVerificationInstance.fetch_asyncr   r/   r6   r;   r<   r=   r>   r?   r@   rA   r0   r1   r2   r3   r4   r5   rB   r7   r8   r9   r:   edit_reasonrY   c                 C   s6   | j j|||||||||	|
|||||||||||dS )2
  
        Update the TollfreeVerificationInstance

        :param business_name: The name of the business or organization using the Tollfree number.
        :param business_website: The website of the business or organization using the Tollfree number.
        :param notification_email: The email address to receive the notification about the verification result. .
        :param use_case_categories: The category of the use case for the Tollfree Number. List as many are applicable..
        :param use_case_summary: Use this to further explain how messaging is used by the business or organization.
        :param production_message_sample: An example of message content, i.e. a sample message.
        :param opt_in_image_urls: Link to an image that shows the opt-in workflow. Multiple images allowed and must be a publicly hosted URL.
        :param opt_in_type:
        :param message_volume: Estimate monthly volume of messages from the Tollfree Number.
        :param business_street_address: The address of the business or organization using the Tollfree number.
        :param business_street_address2: The address of the business or organization using the Tollfree number.
        :param business_city: The city of the business or organization using the Tollfree number.
        :param business_state_province_region: The state/province/region of the business or organization using the Tollfree number.
        :param business_postal_code: The postal code of the business or organization using the Tollfree number.
        :param business_country: The country of the business or organization using the Tollfree number.
        :param additional_information: Additional information to be provided for verification.
        :param business_contact_first_name: The first name of the contact for the business or organization using the Tollfree number.
        :param business_contact_last_name: The last name of the contact for the business or organization using the Tollfree number.
        :param business_contact_email: The email address of the contact for the business or organization using the Tollfree number.
        :param business_contact_phone: The E.164 formatted phone number of the contact for the business or organization using the Tollfree number.
        :param edit_reason: Describe why the verification is being edited. If the verification was rejected because of a technical issue, such as the website being down, and the issue has been resolved this parameter should be set to something similar to 'Website fixed'.

        :returns: The updated TollfreeVerificationInstance
        r/   r6   r;   r<   r=   r>   r?   r@   rA   r0   r1   r2   r3   r4   r5   rB   r7   r8   r9   r:   rg   )r]   updaterT   r/   r6   r;   r<   r=   r>   r?   r@   rA   r0   r1   r2   r3   r4   r5   rB   r7   r8   r9   r:   rg   r   r   r   rj      s.    5z#TollfreeVerificationInstance.updatec                    s<   | j j|||||||||	|
|||||||||||dI dH S )L
  
        Asynchronous coroutine to update the TollfreeVerificationInstance

        :param business_name: The name of the business or organization using the Tollfree number.
        :param business_website: The website of the business or organization using the Tollfree number.
        :param notification_email: The email address to receive the notification about the verification result. .
        :param use_case_categories: The category of the use case for the Tollfree Number. List as many are applicable..
        :param use_case_summary: Use this to further explain how messaging is used by the business or organization.
        :param production_message_sample: An example of message content, i.e. a sample message.
        :param opt_in_image_urls: Link to an image that shows the opt-in workflow. Multiple images allowed and must be a publicly hosted URL.
        :param opt_in_type:
        :param message_volume: Estimate monthly volume of messages from the Tollfree Number.
        :param business_street_address: The address of the business or organization using the Tollfree number.
        :param business_street_address2: The address of the business or organization using the Tollfree number.
        :param business_city: The city of the business or organization using the Tollfree number.
        :param business_state_province_region: The state/province/region of the business or organization using the Tollfree number.
        :param business_postal_code: The postal code of the business or organization using the Tollfree number.
        :param business_country: The country of the business or organization using the Tollfree number.
        :param additional_information: Additional information to be provided for verification.
        :param business_contact_first_name: The first name of the contact for the business or organization using the Tollfree number.
        :param business_contact_last_name: The last name of the contact for the business or organization using the Tollfree number.
        :param business_contact_email: The email address of the contact for the business or organization using the Tollfree number.
        :param business_contact_phone: The E.164 formatted phone number of the contact for the business or organization using the Tollfree number.
        :param edit_reason: Describe why the verification is being edited. If the verification was rejected because of a technical issue, such as the website being down, and the issue has been resolved this parameter should be set to something similar to 'Website fixed'.

        :returns: The updated TollfreeVerificationInstance
        ri   N)r]   update_asyncrk   r   r   r   rm   #  s.    5z)TollfreeVerificationInstance.update_asyncc                 C   s$   d dd | j D }d|S )f
        Provide a friendly representation

        :returns: Machine friendly representation
         c                 s   s   | ]\}}d  ||V  qdS z{}={}Nformat.0kvr   r   r   	<genexpr>v  s     z8TollfreeVerificationInstance.__repr__.<locals>.<genexpr>z5<Twilio.Messaging.V1.TollfreeVerificationInstance {}>joinrR   itemsrr   rT   contextr   r   r   __repr__p  s    z%TollfreeVerificationInstance.__repr__)N)r   r   r   objectr   r%   r   r   strr   r   rN   propertyr]   boolr_   ra   rc   re   r   unsetr   r   rj   rm   r}   __classcell__r   r   rU   r   r      s   /  
 R			

















O

















Mr   c                       s  e Zd Zeed fddZedddZedddZe	d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ejejejejejejfeeef eeef eeef eee ef eeef eeef eee ef edef eeef eeef eeef eeef eeef eeef eeef eeef eeef eeef eeef eeef eeef 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ejejejejejejfeeef eeef eeef eee ef eeef eeef eee ef edef eeef eeef eeef eeef eeef eeef eeef eeef eeef eeef eeef eeef eeef e	dddZedddZ  ZS )rW   )r&   r(   c                    s*   t  | d|i| _djf | j| _dS )z
        Initialize the TollfreeVerificationContext

        :param version: Version that contains the resource
        :param sid: The unique string to identify Tollfree Verification.
        r(   z/Tollfree/Verifications/{sid}N)rM   rN   rR   rr   _uri)rT   r&   r(   rU   r   r   rN   |  s
     z$TollfreeVerificationContext.__init__rX   c                 C   s   | j jd| jdS )r^   DELETEmethoduri)r[   r_   r   r\   r   r   r   r_     s    z"TollfreeVerificationContext.deletec                    s   | j jd| jdI dH S )r`   r   r   N)r[   ra   r   r\   r   r   r   ra     s    z(TollfreeVerificationContext.delete_asyncc                 C   s(   | j jd| jd}t| j || jd dS )rb   GETr   r(   rZ   )r[   rc   r   r   rR   rT   r'   r   r   r   rc     s    z!TollfreeVerificationContext.fetchc                    s.   | j jd| jdI dH }t| j || jd dS )rd   r   r   Nr(   rZ   )r[   re   r   r   rR   r   r   r   r   re     s    z'TollfreeVerificationContext.fetch_asyncr   rf   c                 C   sx   t |||t|dd ||t|dd ||	|
|||||||||||d}| jjd| j|d}t| j|| jd dS )	rh   c                 S   s   | S Nr   er   r   r   <lambda>      z4TollfreeVerificationContext.update.<locals>.<lambda>c                 S   s   | S r   r   r   r   r   r   r     r   BusinessNameBusinessWebsiteNotificationEmailUseCaseCategoriesUseCaseSummaryProductionMessageSampleOptInImageUrlsr   MessageVolumeBusinessStreetAddressBusinessStreetAddress2BusinessCityBusinessStateProvinceRegionBusinessPostalCodeBusinessCountryAdditionalInformationBusinessContactFirstNameBusinessContactLastNameBusinessContactEmailBusinessContactPhoneZ
EditReasonPOSTr   r   datar(   rZ   )	r   ofr   mapr[   rj   r   r   rR   rT   r/   r6   r;   r<   r=   r>   r?   r@   rA   r0   r1   r2   r3   r4   r5   rB   r7   r8   r9   r:   rg   r   r'   r   r   r   rj     sD    5  z"TollfreeVerificationContext.updatec                    s~   t |||t|dd ||t|dd ||	|
|||||||||||d}| jjd| j|dI dH }t| j|| jd d	S )
rl   c                 S   s   | S r   r   r   r   r   r   r   \  r   z:TollfreeVerificationContext.update_async.<locals>.<lambda>c                 S   s   | S r   r   r   r   r   r   r   _  r   r   r   r   Nr(   rZ   )	r   r   r   r   r[   rm   r   r   rR   r   r   r   r   rm   "  sD    5  z(TollfreeVerificationContext.update_asyncc                 C   s$   d dd | j D }d|S )rn   ro   c                 s   s   | ]\}}d  ||V  qdS rp   rq   rs   r   r   r   rw     s     z7TollfreeVerificationContext.__repr__.<locals>.<genexpr>z4<Twilio.Messaging.V1.TollfreeVerificationContext {}>rx   r{   r   r   r   r}   {  s    z$TollfreeVerificationContext.__repr__)r   r   r   r   r   rN   r   r_   ra   r   rc   re   r   r   r   r~   r   rj   rm   r}   r   r   r   rU   r   rW   z  s   

















[

















YrW   c                   @   s2   e Zd Zeeef edddZedddZdS )TollfreeVerificationPage)r'   rY   c                 C   s   t | j|S )zz
        Build an instance of TollfreeVerificationInstance

        :param payload: Payload response from the API
        )r   r[   r   r   r   r   get_instance  s    z%TollfreeVerificationPage.get_instancerX   c                 C   s   dS )rn   z.<Twilio.Messaging.V1.TollfreeVerificationPage>r   r\   r   r   r   r}     s    z!TollfreeVerificationPage.__repr__N)	r   r   r   r   r   r   r   r   r}   r   r   r   r   r     s   r   c                       s  e Zd Ze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feeeee eeee deee	ee
f e	ee
f e	ee
f e	ee
f e	ee
f e	ee
f e	ee
f e	ee
f e	ee
f e	ee
f e	ee
f e	ee
f e	ee
f 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feeeee eeee deee	ee
f e	ee
f e	ee
f e	ee
f e	ee
f e	ee
f e	ee
f e	ee
f e	ee
f e	ee
f e	ee
f e	ee
f e	ee
f eddd	Zejejejejd
d
fe	ee
f e	de
f e	ee
f e	ee
f ee ee ee dddZejejejejd
d
fe	ee
f e	de
f e	ee
f e	ee
f ee ee ee dddZejejejejd
d
fe	ee
f e	de
f e	ee
f e	ee
f ee ee ee dddZejejejejd
d
fe	ee
f e	de
f e	ee
f e	ee
f ee ee ee dddZejejejejejejejfe	ee
f e	de
f e	ee
f e	ee
f e	ee
f e	ee
f e	ee
f edddZejejejejejejejfe	ee
f e	de
f e	ee
f e	ee
f e	ee
f e	ee
f e	ee
f edddZeedddZeedddZeedd d!Zeedd"d#Zed$d%d&Z  Z S )'TollfreeVerificationList)r&   c                    s   t  | d| _dS )zv
        Initialize the TollfreeVerificationList

        :param version: Version that contains the resource

        z/Tollfree/VerificationsN)rM   rN   r   )rT   r&   rU   r   r   rN     s    z!TollfreeVerificationList.__init__r   )r/   r6   r;   r<   r=   r>   r?   r@   rA   rC   r*   r0   r1   r2   r3   r4   r5   rB   r7   r8   r9   r:   rL   rY   c                 C   s   t |||t|dd ||t|dd ||	|
|||||||||||||d}t ddi}| jjd| j||d}t| j|S )	a_
  
        Create the TollfreeVerificationInstance

        :param business_name: The name of the business or organization using the Tollfree number.
        :param business_website: The website of the business or organization using the Tollfree number.
        :param notification_email: The email address to receive the notification about the verification result. .
        :param use_case_categories: The category of the use case for the Tollfree Number. List as many are applicable..
        :param use_case_summary: Use this to further explain how messaging is used by the business or organization.
        :param production_message_sample: An example of message content, i.e. a sample message.
        :param opt_in_image_urls: Link to an image that shows the opt-in workflow. Multiple images allowed and must be a publicly hosted URL.
        :param opt_in_type:
        :param message_volume: Estimate monthly volume of messages from the Tollfree Number.
        :param tollfree_phone_number_sid: The SID of the Phone Number associated with the Tollfree Verification.
        :param customer_profile_sid: Customer's Profile Bundle BundleSid.
        :param business_street_address: The address of the business or organization using the Tollfree number.
        :param business_street_address2: The address of the business or organization using the Tollfree number.
        :param business_city: The city of the business or organization using the Tollfree number.
        :param business_state_province_region: The state/province/region of the business or organization using the Tollfree number.
        :param business_postal_code: The postal code of the business or organization using the Tollfree number.
        :param business_country: The country of the business or organization using the Tollfree number.
        :param additional_information: Additional information to be provided for verification.
        :param business_contact_first_name: The first name of the contact for the business or organization using the Tollfree number.
        :param business_contact_last_name: The last name of the contact for the business or organization using the Tollfree number.
        :param business_contact_email: The email address of the contact for the business or organization using the Tollfree number.
        :param business_contact_phone: The E.164 formatted phone number of the contact for the business or organization using the Tollfree number.
        :param external_reference_id: An optional external reference ID supplied by customer and echoed back on status retrieval.

        :returns: The created TollfreeVerificationInstance
        c                 S   s   | S r   r   r   r   r   r   r     r   z1TollfreeVerificationList.create.<locals>.<lambda>c                 S   s   | S r   r   r   r   r   r   r     r   r   r   r   r   r   r   r   r   r   TollfreePhoneNumberSidZCustomerProfileSidr   r   r   r   r   r   r   r   r   r   r   ExternalReferenceIdContent-Type!application/x-www-form-urlencodedr   r   r   r   headers)r   r   r   r   r[   creater   r   rT   r/   r6   r;   r<   r=   r>   r?   r@   rA   rC   r*   r0   r1   r2   r3   r4   r5   rB   r7   r8   r9   r:   rL   r   r   r'   r   r   r   r     sD    8   zTollfreeVerificationList.createc                    s   t |||t|dd ||t|dd ||	|
|||||||||||||d}t ddi}| jjd| j||dI d	H }t| j|S )
an
  
        Asynchronously create the TollfreeVerificationInstance

        :param business_name: The name of the business or organization using the Tollfree number.
        :param business_website: The website of the business or organization using the Tollfree number.
        :param notification_email: The email address to receive the notification about the verification result. .
        :param use_case_categories: The category of the use case for the Tollfree Number. List as many are applicable..
        :param use_case_summary: Use this to further explain how messaging is used by the business or organization.
        :param production_message_sample: An example of message content, i.e. a sample message.
        :param opt_in_image_urls: Link to an image that shows the opt-in workflow. Multiple images allowed and must be a publicly hosted URL.
        :param opt_in_type:
        :param message_volume: Estimate monthly volume of messages from the Tollfree Number.
        :param tollfree_phone_number_sid: The SID of the Phone Number associated with the Tollfree Verification.
        :param customer_profile_sid: Customer's Profile Bundle BundleSid.
        :param business_street_address: The address of the business or organization using the Tollfree number.
        :param business_street_address2: The address of the business or organization using the Tollfree number.
        :param business_city: The city of the business or organization using the Tollfree number.
        :param business_state_province_region: The state/province/region of the business or organization using the Tollfree number.
        :param business_postal_code: The postal code of the business or organization using the Tollfree number.
        :param business_country: The country of the business or organization using the Tollfree number.
        :param additional_information: Additional information to be provided for verification.
        :param business_contact_first_name: The first name of the contact for the business or organization using the Tollfree number.
        :param business_contact_last_name: The last name of the contact for the business or organization using the Tollfree number.
        :param business_contact_email: The email address of the contact for the business or organization using the Tollfree number.
        :param business_contact_phone: The E.164 formatted phone number of the contact for the business or organization using the Tollfree number.
        :param external_reference_id: An optional external reference ID supplied by customer and echoed back on status retrieval.

        :returns: The created TollfreeVerificationInstance
        c                 S   s   | S r   r   r   r   r   r   r   =  r   z7TollfreeVerificationList.create_async.<locals>.<lambda>c                 S   s   | S r   r   r   r   r   r   r   @  r   r   r   r   r   r   N)r   r   r   r   r[   create_asyncr   r   r   r   r   r   r      sD    8   z%TollfreeVerificationList.create_asyncNr    )rC   rD   rL   include_sub_accountslimit	page_sizerY   c           	      C   s8   | j ||}| j|||||d d}| j ||d S )aH  
        Streams TollfreeVerificationInstance records from the API as a generator stream.
        This operation lazily loads records as efficiently as possible until the limit
        is reached.
        The results are returned as a generator, so this operation is memory efficient.

        :param str tollfree_phone_number_sid: The SID of the Phone Number associated with the Tollfree Verification.
        :param &quot;TollfreeVerificationInstance.Status&quot; status: The compliance status of the Tollfree Verification record.
        :param str external_reference_id: Customer supplied reference id for the Tollfree Verification record.
        :param bool include_sub_accounts: Whether to include Tollfree Verifications from sub accounts in list response.
        :param limit: Upper limit for the number of records to return. stream()
                      guarantees to never return more than limit.  Default is no limit
        :param page_size: Number of records to fetch per request, when not set will use
                          the default value of 50 records.  If no page_size is defined
                          but a limit is defined, stream() will attempt to read the
                          limit with the most efficient page size, i.e. min(limit, 1000)

        :returns: Generator that will yield up to limit results
        r   rC   rD   rL   r   r   r   )r[   read_limitspagestream	rT   rC   rD   rL   r   r   r   Zlimitsr   r   r   r   r   [  s    zTollfreeVerificationList.streamc           	         s>   | j ||}| j|||||d dI dH }| j ||d S )aW  
        Asynchronously streams TollfreeVerificationInstance records from the API as a generator stream.
        This operation lazily loads records as efficiently as possible until the limit
        is reached.
        The results are returned as a generator, so this operation is memory efficient.

        :param str tollfree_phone_number_sid: The SID of the Phone Number associated with the Tollfree Verification.
        :param &quot;TollfreeVerificationInstance.Status&quot; status: The compliance status of the Tollfree Verification record.
        :param str external_reference_id: Customer supplied reference id for the Tollfree Verification record.
        :param bool include_sub_accounts: Whether to include Tollfree Verifications from sub accounts in list response.
        :param limit: Upper limit for the number of records to return. stream()
                      guarantees to never return more than limit.  Default is no limit
        :param page_size: Number of records to fetch per request, when not set will use
                          the default value of 50 records.  If no page_size is defined
                          but a limit is defined, stream() will attempt to read the
                          limit with the most efficient page size, i.e. min(limit, 1000)

        :returns: Generator that will yield up to limit results
        r   r   Nr   )r[   r   
page_asyncstream_asyncr   r   r   r   r     s    z%TollfreeVerificationList.stream_asyncc              	   C   s   t | j||||||dS )a  
        Lists TollfreeVerificationInstance records from the API as a list.
        Unlike stream(), this operation is eager and will load `limit` records into
        memory before returning.

        :param str tollfree_phone_number_sid: The SID of the Phone Number associated with the Tollfree Verification.
        :param &quot;TollfreeVerificationInstance.Status&quot; status: The compliance status of the Tollfree Verification record.
        :param str external_reference_id: Customer supplied reference id for the Tollfree Verification record.
        :param bool include_sub_accounts: Whether to include Tollfree Verifications from sub accounts in list response.
        :param limit: Upper limit for the number of records to return. list() guarantees
                      never to return more than limit.  Default is no limit
        :param page_size: Number of records to fetch per request, when not set will use
                          the default value of 50 records.  If no page_size is defined
                          but a limit is defined, list() will attempt to read the limit
                          with the most efficient page size, i.e. min(limit, 1000)

        :returns: list that will contain up to limit results
        rC   rD   rL   r   r   r   )listr   rT   rC   rD   rL   r   r   r   r   r   r   r     s    zTollfreeVerificationList.listc              	      s,   dd | j ||||||dI dH 2 I dH S )a  
        Asynchronously lists TollfreeVerificationInstance records from the API as a list.
        Unlike stream(), this operation is eager and will load `limit` records into
        memory before returning.

        :param str tollfree_phone_number_sid: The SID of the Phone Number associated with the Tollfree Verification.
        :param &quot;TollfreeVerificationInstance.Status&quot; status: The compliance status of the Tollfree Verification record.
        :param str external_reference_id: Customer supplied reference id for the Tollfree Verification record.
        :param bool include_sub_accounts: Whether to include Tollfree Verifications from sub accounts in list response.
        :param limit: Upper limit for the number of records to return. list() guarantees
                      never to return more than limit.  Default is no limit
        :param page_size: Number of records to fetch per request, when not set will use
                          the default value of 50 records.  If no page_size is defined
                          but a limit is defined, list() will attempt to read the limit
                          with the most efficient page size, i.e. min(limit, 1000)

        :returns: list that will contain up to limit results
        c                    s   g | z3 d H W }|q6 S r   r   )rt   recordr   r   r   
<listcomp>  s   z7TollfreeVerificationList.list_async.<locals>.<listcomp>r   N)r   r   r   r   r   
list_async  s    
z#TollfreeVerificationList.list_async)rC   rD   rL   r   
page_tokenpage_numberr   rY   c           
   
   C   s@   t |||t||||d}| jjd| j|d}	t| j|	S )a.  
        Retrieve a single page of TollfreeVerificationInstance records from the API.
        Request is executed immediately

        :param tollfree_phone_number_sid: The SID of the Phone Number associated with the Tollfree Verification.
        :param status: The compliance status of the Tollfree Verification record.
        :param external_reference_id: Customer supplied reference id for the Tollfree Verification record.
        :param include_sub_accounts: Whether to include Tollfree Verifications from sub accounts in list response.
        :param page_token: PageToken provided by the API
        :param page_number: Page Number, this value is simply for client state
        :param page_size: Number of records to return, defaults to 50

        :returns: Page of TollfreeVerificationInstance
        r   r%   r   ZIncludeSubAccountsZ	PageTokenr   ZPageSizer   r   r   params)r   r   r   boolean_to_stringr[   r   r   r   
rT   rC   rD   rL   r   r   r   r   r   responser   r   r   r     s    zTollfreeVerificationList.pagec           
   
      sF   t |||t||||d}| jjd| j|dI dH }	t| j|	S )a=  
        Asynchronously retrieve a single page of TollfreeVerificationInstance records from the API.
        Request is executed immediately

        :param tollfree_phone_number_sid: The SID of the Phone Number associated with the Tollfree Verification.
        :param status: The compliance status of the Tollfree Verification record.
        :param external_reference_id: Customer supplied reference id for the Tollfree Verification record.
        :param include_sub_accounts: Whether to include Tollfree Verifications from sub accounts in list response.
        :param page_token: PageToken provided by the API
        :param page_number: Page Number, this value is simply for client state
        :param page_size: Number of records to return, defaults to 50

        :returns: Page of TollfreeVerificationInstance
        r   r   r   N)r   r   r   r   r[   r   r   r   r   r   r   r   r     s       z#TollfreeVerificationList.page_async)
target_urlrY   c                 C   s   | j jjd|}t| j |S )a  
        Retrieve a specific page of TollfreeVerificationInstance records from the API.
        Request is executed immediately

        :param target_url: API-generated URL for the requested results page

        :returns: Page of TollfreeVerificationInstance
        r   )r[   domaintwiliorequestr   rT   r   r   r   r   r   get_pageF  s    	z!TollfreeVerificationList.get_pagec                    s$   | j jjd|I dH }t| j |S )a  
        Asynchronously retrieve a specific page of TollfreeVerificationInstance records from the API.
        Request is executed immediately

        :param target_url: API-generated URL for the requested results page

        :returns: Page of TollfreeVerificationInstance
        r   N)r[   r   r   Zrequest_asyncr   r   r   r   r   get_page_asyncR  s    	z'TollfreeVerificationList.get_page_async)r(   rY   c                 C   s   t | j|dS z
        Constructs a TollfreeVerificationContext

        :param sid: The unique string to identify Tollfree Verification.
        rZ   rW   r[   rT   r(   r   r   r   rO   ^  s    zTollfreeVerificationList.getc                 C   s   t | j|dS r   r   r   r   r   r   __call__f  s    z!TollfreeVerificationList.__call__rX   c                 C   s   dS )rn   z.<Twilio.Messaging.V1.TollfreeVerificationList>r   r\   r   r   r   r}   n  s    z!TollfreeVerificationList.__repr__)!r   r   r   r   rN   r   r   r   r   r   r~   r   r   r   r   r   intr   r   r	   r   r   r   r   r   r   r   r   rW   rO   r   r}   r   r   r   rU   r   r     sd  












g












]



)



)



(



)






)






)r   N)__doc__r   typingr   r   r   r   r   r   r	   Ztwilio.baser
   r   r   Ztwilio.base.instance_contextr   Ztwilio.base.instance_resourcer   Ztwilio.base.list_resourcer   Ztwilio.base.versionr   Ztwilio.base.pager   r   rW   r   r   r   r   r   r   <module>   s    $  c  