o
    O`5                     @   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
 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
      /       /
    )deserialize)	serialize)values)InstanceContext)InstanceResource)ListResource)Pagec                
       sf   e Zd Z fddZejejejejejejejejejejf
ddZdd Zdd Zd	d
 Z	  Z
S )VerificationListc                    s2   t t| | d|i| _djdi | j| _dS )ah  
        Initialize the VerificationList

        :param Version version: Version that contains the resource
        :param service_sid: The SID of the Service that the resource is associated with

        :returns: twilio.rest.verify.v2.service.verification.VerificationList
        :rtype: twilio.rest.verify.v2.service.verification.VerificationList
        service_sidz%/Services/{service_sid}/VerificationsN )superr	   __init__	_solutionformat_uri)selfversionr
   	__class__r   n/var/www/html/asistente-voz-ia/venv/lib/python3.10/site-packages/twilio/rest/verify/v2/service/verification.pyr      s   

zVerificationList.__init__c                 C   sZ   t |||||||||	t|
t||d}| jjd| j|d}t| j|| jd dS )az  
        Create the VerificationInstance

        :param unicode to: The phone number or email to verify
        :param unicode channel: The verification method to use
        :param unicode custom_friendly_name: A custom user defined friendly name
        :param unicode custom_message: The text of a custom message to use for the verification
        :param unicode send_digits: The digits to send after a phone call is answered
        :param unicode locale: The locale to use for the verification SMS or call
        :param unicode custom_code: A pre-generated code
        :param unicode amount: The amount of the associated PSD2 compliant transaction.
        :param unicode payee: The payee of the associated PSD2 compliant transaction
        :param dict rate_limits: The custom key-value pairs of Programmable Rate Limits.
        :param dict channel_configuration: Channel specific configuration in json format.
        :param unicode app_hash: Your App Hash to be appended at the end of an SMS.

        :returns: The created VerificationInstance
        :rtype: twilio.rest.verify.v2.service.verification.VerificationInstance
        )ToChannelCustomFriendlyNameCustomMessage
SendDigitsLocale
CustomCodeAmountPayee
RateLimitsChannelConfigurationAppHashPOSTmethoduridatar
   r
   )	r   ofr   object_versioncreater   VerificationInstancer   )r   tochannelcustom_friendly_namecustom_messagesend_digitslocalecustom_codeamountpayeerate_limitschannel_configurationapp_hashr&   payloadr   r   r   r+   $   s    zVerificationList.createc                 C      t | j| jd |dS a  
        Constructs a VerificationContext

        :param sid: The unique string that identifies the resource

        :returns: twilio.rest.verify.v2.service.verification.VerificationContext
        :rtype: twilio.rest.verify.v2.service.verification.VerificationContext
        r
   r
   sidVerificationContextr*   r   r   r=   r   r   r   getO      	zVerificationList.getc                 C   r:   r;   r>   r@   r   r   r   __call__Z   rB   zVerificationList.__call__c                 C      dS )z
        Provide a friendly representation

        :returns: Machine friendly representation
        :rtype: str
        z#<Twilio.Verify.V2.VerificationList>r   r   r   r   r   __repr__e      zVerificationList.__repr__)__name__
__module____qualname__r   r   unsetr+   rA   rC   rG   __classcell__r   r   r   r   r	      s    
+r	   c                       s,   e Zd Z fddZdd Zdd Z  ZS )VerificationPagec                    s   t t| || || _dS )a  
        Initialize the VerificationPage

        :param Version version: Version that contains the resource
        :param Response response: Response from the API
        :param service_sid: The SID of the Service that the resource is associated with

        :returns: twilio.rest.verify.v2.service.verification.VerificationPage
        :rtype: twilio.rest.verify.v2.service.verification.VerificationPage
        N)r   rN   r   r   )r   r   responsesolutionr   r   r   r   q   s   
zVerificationPage.__init__c                 C   s   t | j|| jd dS )a  
        Build an instance of VerificationInstance

        :param dict payload: Payload response from the API

        :returns: twilio.rest.verify.v2.service.verification.VerificationInstance
        :rtype: twilio.rest.verify.v2.service.verification.VerificationInstance
        r
   r'   )r,   r*   r   r   r9   r   r   r   get_instance   rB   zVerificationPage.get_instancec                 C   rD   )rE   z#<Twilio.Verify.V2.VerificationPage>r   rF   r   r   r   rG      rH   zVerificationPage.__repr__)rI   rJ   rK   r   rR   rG   rM   r   r   r   r   rN   o   s    rN   c                       s4   e Zd Z fddZdd Zdd Zdd Z  ZS )	r?   c                    s4   t t| | ||d| _djdi | j| _dS )a  
        Initialize the VerificationContext

        :param Version version: Version that contains the resource
        :param service_sid: The SID of the verification Service to fetch the resource from
        :param sid: The unique string that identifies the resource

        :returns: twilio.rest.verify.v2.service.verification.VerificationContext
        :rtype: twilio.rest.verify.v2.service.verification.VerificationContext
        r<   z+/Services/{service_sid}/Verifications/{sid}Nr   )r   r?   r   r   r   r   )r   r   r
   r=   r   r   r   r      s   zVerificationContext.__init__c                 C   s@   t d|i}| jjd| j|d}t| j|| jd | jd dS )  
        Update the VerificationInstance

        :param VerificationInstance.Status status: The new status of the resource

        :returns: The updated VerificationInstance
        :rtype: twilio.rest.verify.v2.service.verification.VerificationInstance
        Statusr"   r#   r
   r=   r<   )r   r(   r*   updater   r,   r   )r   statusr&   r9   r   r   r   rU      s   	zVerificationContext.updatec                 C   s0   | j jd| jd}t| j || jd | jd dS )
        Fetch the VerificationInstance

        :returns: The fetched VerificationInstance
        :rtype: twilio.rest.verify.v2.service.verification.VerificationInstance
        GET)r$   r%   r
   r=   r<   )r*   fetchr   r,   r   rQ   r   r   r   rY      s   zVerificationContext.fetchc                 C   $   d dd | j D }d|S )rE    c                 s        | ]\}}d  ||V  qdS z{}={}Nr   .0kvr   r   r   	<genexpr>       z/VerificationContext.__repr__.<locals>.<genexpr>z)<Twilio.Verify.V2.VerificationContext {}>joinr   itemsr   r   contextr   r   r   rG         
zVerificationContext.__repr__)rI   rJ   rK   r   rU   rY   rG   rM   r   r   r   r   r?      s
    r?   c                       s
  e Zd ZG dd de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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d*d+ Z  ZS )-r,   c                   @   s   e Zd ZdZdZdZdS )zVerificationInstance.ChannelsmscallemailN)rI   rJ   rK   SMSCALLEMAILr   r   r   r   r      s    r   c                   @   s   e Zd ZdZdZdS )zVerificationInstance.StatuscanceledapprovedN)rI   rJ   rK   CANCELEDAPPROVEDr   r   r   r   rT      s    rT   Nc                    s   t t| | |d|d|d|d|d|d|d|d|d	|d
|dt|dt|d|dd| _d| _||pT| jd d| _dS )z
        Initialize the VerificationInstance

        :returns: twilio.rest.verify.v2.service.verification.VerificationInstance
        :rtype: twilio.rest.verify.v2.service.verification.VerificationInstance
        r=   r
   account_sidr-   r.   rV   validlookupr4   r5   send_code_attemptsdate_createddate_updatedurl)r=   r
   ru   r-   r.   rV   rv   rw   r4   r5   rx   ry   rz   r{   Nr<   )	r   r,   r   rA   r   iso8601_datetime_properties_contextr   )r   r   r9   r
   r=   r   r   r   r      s$   zVerificationInstance.__init__c                 C   s.   | j du rt| j| jd | jd d| _ | j S )aC  
        Generate an instance context for the instance, the context is capable of
        performing various actions.  All instance actions are proxied to the context

        :returns: VerificationContext for this VerificationInstance
        :rtype: twilio.rest.verify.v2.service.verification.VerificationContext
        Nr
   r=   r<   )r~   r?   r*   r   rF   r   r   r   _proxy  s   
	zVerificationInstance._proxyc                 C   
   | j d S )zb
        :returns: The unique string that identifies the resource
        :rtype: unicode
        r=   r}   rF   r   r   r   r=        
zVerificationInstance.sidc                 C   r   )zo
        :returns: The SID of the Service that the resource is associated with
        :rtype: unicode
        r
   r   rF   r   r   r   r
     r   z VerificationInstance.service_sidc                 C   r   )zd
        :returns: The SID of the Account that created the resource
        :rtype: unicode
        ru   r   rF   r   r   r   ru   #  r   z VerificationInstance.account_sidc                 C   r   )z\
        :returns: The phone number or email being verified
        :rtype: unicode
        r-   r   rF   r   r   r   r-   +  r   zVerificationInstance.toc                 C   r   )zf
        :returns: The verification method used.
        :rtype: VerificationInstance.Channel
        r.   r   rF   r   r   r   r.   3  r   zVerificationInstance.channelc                 C   r   )z[
        :returns: The status of the verification resource
        :rtype: unicode
        rV   r   rF   r   r   r   rV   ;  r   zVerificationInstance.statusc                 C   r   )zX
        :returns: Whether the verification was successful
        :rtype: bool
        rv   r   rF   r   r   r   rv   C  r   zVerificationInstance.validc                 C   r   )zb
        :returns: Information about the phone number being verified
        :rtype: dict
        rw   r   rF   r   r   r   rw   K  r   zVerificationInstance.lookupc                 C   r   )zl
        :returns: The amount of the associated PSD2 compliant transaction.
        :rtype: unicode
        r4   r   rF   r   r   r   r4   S  r   zVerificationInstance.amountc                 C   r   )zj
        :returns: The payee of the associated PSD2 compliant transaction
        :rtype: unicode
        r5   r   rF   r   r   r   r5   [  r   zVerificationInstance.payeec                 C   r   )z`
        :returns: An array of verification attempt objects.
        :rtype: list[dict]
        rx   r   rF   r   r   r   rx   c  r   z'VerificationInstance.send_code_attemptsc                 C   r   )zt
        :returns: The RFC 2822 date and time in GMT when the resource was created
        :rtype: datetime
        ry   r   rF   r   r   r   ry   k  r   z!VerificationInstance.date_createdc                 C   r   )zy
        :returns: The RFC 2822 date and time in GMT when the resource was last updated
        :rtype: datetime
        rz   r   rF   r   r   r   rz   s  r   z!VerificationInstance.date_updatedc                 C   r   )za
        :returns: The absolute URL of the Verification resource
        :rtype: unicode
        r{   r   rF   r   r   r   r{   {  r   zVerificationInstance.urlc                 C   s   | j |S )rS   )r   rU   )r   rV   r   r   r   rU     s   	zVerificationInstance.updatec                 C   s
   | j  S )rW   )r   rY   rF   r   r   r   rY     s   
zVerificationInstance.fetchc                 C   rZ   )rE   r[   c                 s   r\   r]   r^   r_   r   r   r   rc     rd   z0VerificationInstance.__repr__.<locals>.<genexpr>z*<Twilio.Verify.V2.VerificationInstance {}>re   rh   r   r   r   rG     rj   zVerificationInstance.__repr__)N)rI   rJ   rK   r)   r   rT   r   propertyr   r=   r
   ru   r-   r.   rV   rv   rw   r4   r5   rx   ry   rz   r{   rU   rY   rG   rM   r   r   r   r   r,      sJ    














	r,   N)__doc__twilio.baser   r   r   twilio.base.instance_contextr   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.pager   r	   rN   r?   r,   r   r   r   r   <module>   s   ]'B