o
    f>h?                     @   s   d Z ddlmZmZ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 - Numbers
    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IteratorAsyncIterator)values)InstanceResource)ListResource)Version)Pagec                       s@   e Zd ZdZdedeeef f fddZdefddZ	  Z
S )	#SigningRequestConfigurationInstanceu  
    :ivar logo_sid: The SID of the document  that includes the logo that will appear in the LOA. To upload documents follow the following guide: https://www.twilio.com/docs/phone-numbers/regulatory/getting-started/create-new-bundle-public-rest-apis#supporting-document-create
    :ivar friendly_name: This is the string that you assigned as a friendly name for describing the creation of the configuration.
    :ivar product: The product or service for which is requesting the signature.
    :ivar country: The country ISO code to apply the configuration.
    :ivar email_subject: Subject of the email that the end client will receive ex: “Twilio Hosting Request”, maximum length of 255 characters.
    :ivar email_message: Content of the email that the end client will receive ex: “This is a Hosting request from Twilio, please check the document and sign it”, maximum length of 5,000 characters.
    :ivar url_redirection: Url the end client will be redirected after signing a document.
    :ivar url:
    versionpayloadc                    sp   t  | |d| _|d| _|d| _|d| _|d| _|d| _|d| _	|d| _
d S )	Nlogo_sidfriendly_nameproductcountryemail_subjectemail_messageurl_redirectionurl)super__init__getr   r   r   r   r   r   r   r   )selfr   r   	__class__ g/var/www/html/venv/lib/python3.10/site-packages/twilio/rest/numbers/v1/signing_request_configuration.pyr   $   s   z,SigningRequestConfigurationInstance.__init__returnc                 C      dS )f
        Provide a friendly representation

        :returns: Machine friendly representation
        z7<Twilio.Numbers.V1.SigningRequestConfigurationInstance>r   r   r   r   r    __repr__0   s   z,SigningRequestConfigurationInstance.__repr__)__name__
__module____qualname____doc__r   r   strr   r   r%   __classcell__r   r   r   r    r      s    r   c                   @   s4   e Zd Zdeeef defddZdefddZdS )SigningRequestConfigurationPager   r!   c                 C   s   t | j|S )z
        Build an instance of SigningRequestConfigurationInstance

        :param payload: Payload response from the API
        )r   _version)r   r   r   r   r    get_instance<   s   z,SigningRequestConfigurationPage.get_instancec                 C   r"   )r#   z3<Twilio.Numbers.V1.SigningRequestConfigurationPage>r   r$   r   r   r    r%   F      z(SigningRequestConfigurationPage.__repr__N)	r&   r'   r(   r   r*   r   r   r.   r%   r   r   r   r    r,   :   s    


r,   c                       st  e Zd Zdef fddZejfdeeef de	fddZ
ejfdeeef de	fdd	Zejejd
d
fdeeef deeef dee dee dee	 f
ddZejejd
d
fdeeef deeef dee dee dee	 f
ddZejejd
d
fdeeef deeef dee dee dee	 f
ddZejejd
d
fdeeef deeef dee dee dee	 f
ddZ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fddZ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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 )$SigningRequestConfigurationListr   c                    s   t  | d| _dS )z}
        Initialize the SigningRequestConfigurationList

        :param version: Version that contains the resource

        z/SigningRequest/ConfigurationN)r   r   _uri)r   r   r   r   r    r   Q   s   
z(SigningRequestConfigurationList.__init__bodyr!   c                 C   sH   |  }tddi}d|d< d|d< | jjd| j||d}t| j|S )z
        Create the SigningRequestConfigurationInstance

        :param body:

        :returns: The created SigningRequestConfigurationInstance
        Content-Type!application/x-www-form-urlencodedapplication/jsonAcceptPOSTmethoduridataheaders)to_dictr	   ofr-   creater1   r   r   r2   r;   r<   r   r   r   r    r?   \   s   

z&SigningRequestConfigurationList.createc                    sP   |  }tddi}d|d< d|d< | jjd| j||dI dH }t| j|S )z
        Asynchronously create the SigningRequestConfigurationInstance

        :param body:

        :returns: The created SigningRequestConfigurationInstance
        r3   r4   r5   r6   r7   r8   N)r=   r	   r>   r-   create_asyncr1   r   r@   r   r   r    rA   t   s   

z,SigningRequestConfigurationList.create_asyncNr   r   limit	page_sizec                 C   s4   | j ||}| j|||d d}| j ||d S )ay  
        Streams SigningRequestConfigurationInstance 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 country: The country ISO code to apply this configuration, this is an optional field, Example: US, MX
        :param str product: The product or service for which is requesting the signature, this is an optional field, Example: Porting, Hosting
        :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
        rC   r   r   rC   rB   )r-   read_limitspagestreamr   r   r   rB   rC   limitsrF   r   r   r    rG      s
   
z&SigningRequestConfigurationList.streamc                    s<   | j ||}| j|||d dI dH }| j ||d S )a  
        Asynchronously streams SigningRequestConfigurationInstance 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 country: The country ISO code to apply this configuration, this is an optional field, Example: US, MX
        :param str product: The product or service for which is requesting the signature, this is an optional field, Example: Porting, Hosting
        :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
        rC   rD   NrB   )r-   rE   
page_asyncstream_asyncrH   r   r   r    rK      s   
z,SigningRequestConfigurationList.stream_asyncc                 C   s   t | j||||dS )a  
        Lists SigningRequestConfigurationInstance records from the API as a list.
        Unlike stream(), this operation is eager and will load `limit` records into
        memory before returning.

        :param str country: The country ISO code to apply this configuration, this is an optional field, Example: US, MX
        :param str product: The product or service for which is requesting the signature, this is an optional field, Example: Porting, Hosting
        :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
        r   r   rB   rC   )listrG   r   r   r   rB   rC   r   r   r    rM      s   z$SigningRequestConfigurationList.listc                    s*   dd | j ||||dI dH 2 I dH S )a%  
        Asynchronously lists SigningRequestConfigurationInstance records from the API as a list.
        Unlike stream(), this operation is eager and will load `limit` records into
        memory before returning.

        :param str country: The country ISO code to apply this configuration, this is an optional field, Example: US, MX
        :param str product: The product or service for which is requesting the signature, this is an optional field, Example: Porting, Hosting
        :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 )Nr   ).0recordr   r   r    
<listcomp>  s
    z>SigningRequestConfigurationList.list_async.<locals>.<listcomp>rL   N)rK   rN   r   r   r    
list_async   s   
z*SigningRequestConfigurationList.list_async
page_tokenpage_numberc           	      C   sN   t |||||d}t ddi}d|d< | jjd| j||d}t| j|S )a  
        Retrieve a single page of SigningRequestConfigurationInstance records from the API.
        Request is executed immediately

        :param country: The country ISO code to apply this configuration, this is an optional field, Example: US, MX
        :param product: The product or service for which is requesting the signature, this is an optional field, Example: Porting, Hosting
        :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 SigningRequestConfigurationInstance
        CountryProduct	PageTokenr   PageSizer3   r4   r5   r6   GETr9   r:   paramsr<   )r	   r>   r-   rF   r1   r,   	r   r   r   rS   rT   rC   r;   r<   responser   r   r    rF     s   

z$SigningRequestConfigurationList.pagec           	         sV   t |||||d}t ddi}d|d< | jjd| j||dI dH }t| j|S )	a  
        Asynchronously retrieve a single page of SigningRequestConfigurationInstance records from the API.
        Request is executed immediately

        :param country: The country ISO code to apply this configuration, this is an optional field, Example: US, MX
        :param product: The product or service for which is requesting the signature, this is an optional field, Example: Porting, Hosting
        :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 SigningRequestConfigurationInstance
        rU   r3   r4   r5   r6   rZ   r[   N)r	   r>   r-   rJ   r1   r,   r]   r   r   r    rJ   2  s   

z*SigningRequestConfigurationList.page_async
target_urlc                 C   s   | j jjd|}t| j |S )a  
        Retrieve a specific page of SigningRequestConfigurationInstance records from the API.
        Request is executed immediately

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

        :returns: Page of SigningRequestConfigurationInstance
        rZ   )r-   domaintwiliorequestr,   r   r_   r^   r   r   r    get_pageY  s   	z(SigningRequestConfigurationList.get_pagec                    s&   | j jjd|I dH }t| j |S )a*  
        Asynchronously retrieve a specific page of SigningRequestConfigurationInstance records from the API.
        Request is executed immediately

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

        :returns: Page of SigningRequestConfigurationInstance
        rZ   N)r-   r`   ra   request_asyncr,   rc   r   r   r    get_page_asynce  s   	z.SigningRequestConfigurationList.get_page_asyncc                 C   r"   )r#   z3<Twilio.Numbers.V1.SigningRequestConfigurationList>r   r$   r   r   r    r%   q  r/   z(SigningRequestConfigurationList.__repr__)r&   r'   r(   r   r   r	   unsetr   objectr   r?   rA   r*   r   intr   rG   r   rK   r   rM   rR   r,   rF   rJ   rd   rf   r%   r+   r   r   r   r    r0   O   s    






!


!


"


#





)





'r0   N)r)   typingr   r   r   r   r   r   r   twilio.baser	   twilio.base.instance_resourcer
   twilio.base.list_resourcer   twilio.base.versionr   twilio.base.pager   r   r,   r0   r   r   r   r    <module>   s    $"