o
    �¨Êh|B  ã                   @   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                
       sœ   e Zd ZdZ‡ fdd„Zddd„Zddd„Zejejejfd	d
„Z	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 )ÚRatePlanListúÉ PLEASE NOTE that this class contains preview products that are subject
    to change. Use them with caution. If you currently do not have developer
    preview access, please contact help@twilio.com. c                    s.   t t| ƒ |¡ i | _djdi | j¤Ž| _dS )zü
        Initialize the RatePlanList

        :param Version version: Version that contains the resource

        :returns: twilio.rest.preview.wireless.rate_plan.RatePlanList
        :rtype: twilio.rest.preview.wireless.rate_plan.RatePlanList
        z
/RatePlansN© )Úsuperr	   Ú__init__Ú	_solutionÚformatÚ_uri)ÚselfÚversion©Ú	__class__r   úX/var/www/html/env/lib/python3.10/site-packages/twilio/rest/preview/wireless/rate_plan.pyr      s   	zRatePlanList.__init__Nc                 C   s6   | j  ||¡}| j|d d�}| j  ||d |d ¡S )aÄ  
        Streams RatePlanInstance 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 int limit: Upper limit for the number of records to return. stream()
                          guarantees to never return more than limit.  Default is no limit
        :param int 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
        :rtype: list[twilio.rest.preview.wireless.rate_plan.RatePlanInstance]
        Ú	page_size)r   ÚlimitÚ
page_limit)Ú_versionÚread_limitsÚpageÚstream)r   r   r   Úlimitsr   r   r   r   r   &   s   zRatePlanList.streamc                 C   s   t | j||d�ƒS )ad  
        Lists RatePlanInstance records from the API as a list.
        Unlike stream(), this operation is eager and will load `limit` records into
        memory before returning.

        :param int limit: Upper limit for the number of records to return. list() guarantees
                          never to return more than limit.  Default is no limit
        :param int 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: Generator that will yield up to limit results
        :rtype: list[twilio.rest.preview.wireless.rate_plan.RatePlanInstance]
        )r   r   )Úlistr   )r   r   r   r   r   r   r   =   s   zRatePlanList.listc                 C   s6   t  |||dœ¡}| jjd| j|d�}t| j|| jƒS )aÅ  
        Retrieve a single page of RatePlanInstance records from the API.
        Request is executed immediately

        :param str page_token: PageToken provided by the API
        :param int page_number: Page Number, this value is simply for client state
        :param int page_size: Number of records to return, defaults to 50

        :returns: Page of RatePlanInstance
        :rtype: twilio.rest.preview.wireless.rate_plan.RatePlanPage
        )Ú	PageTokenr   ÚPageSizeÚGET©Úparams)r   Úofr   r   r   ÚRatePlanPager   )r   Ú
page_tokenÚpage_numberr   r#   Úresponser   r   r   r   O   s   ýzRatePlanList.pagec                 C   s"   | j jj d|¡}t| j || jƒS )a=  
        Retrieve a specific page of RatePlanInstance records from the API.
        Request is executed immediately

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

        :returns: Page of RatePlanInstance
        :rtype: twilio.rest.preview.wireless.rate_plan.RatePlanPage
        r!   )r   ÚdomainÚtwilioÚrequestr%   r   )r   Ú
target_urlr(   r   r   r   Úget_pagef   s
   

þzRatePlanList.get_pagec                 C   sL   t  |||||||||	t |
dd„ ¡dœ
¡}| jjd| j|d�}t| j|ƒS )aó  
        Create a new RatePlanInstance

        :param unicode unique_name: The unique_name
        :param unicode friendly_name: The friendly_name
        :param bool data_enabled: The data_enabled
        :param unicode data_limit: The data_limit
        :param unicode data_metering: The data_metering
        :param bool messaging_enabled: The messaging_enabled
        :param bool voice_enabled: The voice_enabled
        :param bool commands_enabled: The commands_enabled
        :param bool national_roaming_enabled: The national_roaming_enabled
        :param unicode international_roaming: The international_roaming

        :returns: Newly created RatePlanInstance
        :rtype: twilio.rest.preview.wireless.rate_plan.RatePlanInstance
        c                 S   s   | S ©Nr   )Úer   r   r   Ú<lambda>˜   s    z%RatePlanList.create.<locals>.<lambda>)
Ú
UniqueNameÚFriendlyNameÚDataEnabledÚ	DataLimitÚDataMeteringÚMessagingEnabledÚVoiceEnabledÚCommandsEnabledÚNationalRoamingEnabledÚInternationalRoamingÚPOST©Údata)r   r$   r   Úmapr   Úcreater   ÚRatePlanInstance)r   Úunique_nameÚfriendly_nameÚdata_enabledÚ
data_limitÚdata_meteringÚmessaging_enabledÚvoice_enabledÚcommands_enabledÚnational_roaming_enabledÚinternational_roamingr=   Úpayloadr   r   r   r?   w   s$   öýzRatePlanList.createc                 C   ó   t | j|d�S ©zÜ
        Constructs a RatePlanContext

        :param sid: The sid

        :returns: twilio.rest.preview.wireless.rate_plan.RatePlanContext
        :rtype: twilio.rest.preview.wireless.rate_plan.RatePlanContext
        ©Úsid©ÚRatePlanContextr   ©r   rO   r   r   r   Úget£   ó   	zRatePlanList.getc                 C   rL   rM   rP   rR   r   r   r   Ú__call__®   rT   zRatePlanList.__call__c                 C   ó   dS )úz
        Provide a friendly representation

        :returns: Machine friendly representation
        :rtype: str
        z&<Twilio.Preview.Wireless.RatePlanList>r   ©r   r   r   r   Ú__repr__¹   ó   zRatePlanList.__repr__)NN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   Úunsetr   r-   r?   rS   rU   rY   Ú__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 )r%   r
   c                    s   t t| ƒ ||¡ || _dS )a4  
        Initialize the RatePlanPage

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

        :returns: twilio.rest.preview.wireless.rate_plan.RatePlanPage
        :rtype: twilio.rest.preview.wireless.rate_plan.RatePlanPage
        N)r   r%   r   r   )r   r   r(   Úsolutionr   r   r   r   È   s   

zRatePlanPage.__init__c                 C   s   t | j|ƒS )a  
        Build an instance of RatePlanInstance

        :param dict payload: Payload response from the API

        :returns: twilio.rest.preview.wireless.rate_plan.RatePlanInstance
        :rtype: twilio.rest.preview.wireless.rate_plan.RatePlanInstance
        )r@   r   )r   rK   r   r   r   Úget_instance×   s   	zRatePlanPage.get_instancec                 C   rV   )rW   z&<Twilio.Preview.Wireless.RatePlanPage>r   rX   r   r   r   rY   â   rZ   zRatePlanPage.__repr__)r[   r\   r]   r^   r   rb   rY   r`   r   r   r   r   r%   Ã   s
    r%   c                       sJ   e Zd ZdZ‡ fdd„Zdd„ Zejejfdd„Zdd	„ Z	d
d„ Z
‡  ZS )rQ   r
   c                    s2   t t| ƒ |¡ d|i| _djdi | j¤Ž| _dS )a!  
        Initialize the RatePlanContext

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

        :returns: twilio.rest.preview.wireless.rate_plan.RatePlanContext
        :rtype: twilio.rest.preview.wireless.rate_plan.RatePlanContext
        rO   z/RatePlans/{sid}Nr   )r   rQ   r   r   r   r   )r   r   rO   r   r   r   r   ñ   s   

zRatePlanContext.__init__c                 C   s4   t  i ¡}| jjd| j|d�}t| j|| jd d�S )úž
        Fetch a RatePlanInstance

        :returns: Fetched RatePlanInstance
        :rtype: twilio.rest.preview.wireless.rate_plan.RatePlanInstance
        r!   r"   rO   rN   )r   r$   r   Úfetchr   r@   r   )r   r#   rK   r   r   r   rd     s   
ýzRatePlanContext.fetchc                 C   s:   t  ||dœ¡}| jjd| j|d�}t| j|| jd d�S )á  
        Update the RatePlanInstance

        :param unicode unique_name: The unique_name
        :param unicode friendly_name: The friendly_name

        :returns: Updated RatePlanInstance
        :rtype: twilio.rest.preview.wireless.rate_plan.RatePlanInstance
        )r1   r2   r;   r<   rO   rN   )r   r$   r   Úupdater   r@   r   )r   rA   rB   r=   rK   r   r   r   rf     s   
ýzRatePlanContext.updatec                 C   s   | j  d| j¡S )ú
        Deletes the RatePlanInstance

        :returns: True if delete succeeds, False otherwise
        :rtype: bool
        Údelete)r   rh   r   rX   r   r   r   rh   &  s   zRatePlanContext.deletec                 C   ó$   d  dd„ | j ¡ D ƒ¡}d |¡S )rW   ú c                 s   ó    � | ]\}}d   ||¡V  qdS ©z{}={}N©r   ©Ú.0ÚkÚvr   r   r   Ú	<genexpr>6  ó   € z+RatePlanContext.__repr__.<locals>.<genexpr>z,<Twilio.Preview.Wireless.RatePlanContext {}>©Újoinr   Úitemsr   ©r   Úcontextr   r   r   rY   /  ó   
zRatePlanContext.__repr__)r[   r\   r]   r^   r   rd   r   r_   rf   rh   rY   r`   r   r   r   r   rQ   ì   s    	rQ   c                       s   e Zd Zd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ejejfd%d&„Zd'd(„ Zd)d*„ Z‡  ZS ),r@   r
   Nc                    sœ   t t| ƒ |¡ |d |d |d |d |d |d t |d ¡|d |d	 |d
 |d t |d ¡t |d ¡|d dœ| _d| _d|pI| jd i| _dS )zÄ
        Initialize the RatePlanInstance

        :returns: twilio.rest.preview.wireless.rate_plan.RatePlanInstance
        :rtype: twilio.rest.preview.wireless.rate_plan.RatePlanInstance
        rO   rA   Úaccount_sidrB   rC   rE   rD   rF   rG   rI   rJ   Údate_createdÚdate_updatedÚurl)rO   rA   rz   rB   rC   rE   rD   rF   rG   rI   rJ   r{   r|   r}   N)	r   r@   r   r   ÚintegerÚiso8601_datetimeÚ_propertiesÚ_contextr   )r   r   rK   rO   r   r   r   r   ?  s$   òzRatePlanInstance.__init__c                 C   s&   | j du rt| j| jd d�| _ | j S )a3  
        Generate an instance context for the instance, the context is capable of
        performing various actions.  All instance actions are proxied to the context

        :returns: RatePlanContext for this RatePlanInstance
        :rtype: twilio.rest.preview.wireless.rate_plan.RatePlanContext
        NrO   rN   )r�   rQ   r   r   rX   r   r   r   Ú_proxy^  s   
	zRatePlanInstance._proxyc                 C   ó
   | j d S )z;
        :returns: The sid
        :rtype: unicode
        rO   ©r€   rX   r   r   r   rO   k  ó   
zRatePlanInstance.sidc                 C   rƒ   )zC
        :returns: The unique_name
        :rtype: unicode
        rA   r„   rX   r   r   r   rA   s  r…   zRatePlanInstance.unique_namec                 C   rƒ   )zC
        :returns: The account_sid
        :rtype: unicode
        rz   r„   rX   r   r   r   rz   {  r…   zRatePlanInstance.account_sidc                 C   rƒ   )zE
        :returns: The friendly_name
        :rtype: unicode
        rB   r„   rX   r   r   r   rB   ƒ  r…   zRatePlanInstance.friendly_namec                 C   rƒ   )zA
        :returns: The data_enabled
        :rtype: bool
        rC   r„   rX   r   r   r   rC   ‹  r…   zRatePlanInstance.data_enabledc                 C   rƒ   )zE
        :returns: The data_metering
        :rtype: unicode
        rE   r„   rX   r   r   r   rE   “  r…   zRatePlanInstance.data_meteringc                 C   rƒ   )zB
        :returns: The data_limit
        :rtype: unicode
        rD   r„   rX   r   r   r   rD   ›  r…   zRatePlanInstance.data_limitc                 C   rƒ   )zF
        :returns: The messaging_enabled
        :rtype: bool
        rF   r„   rX   r   r   r   rF   £  r…   z"RatePlanInstance.messaging_enabledc                 C   rƒ   )zB
        :returns: The voice_enabled
        :rtype: bool
        rG   r„   rX   r   r   r   rG   «  r…   zRatePlanInstance.voice_enabledc                 C   rƒ   )zM
        :returns: The national_roaming_enabled
        :rtype: bool
        rI   r„   rX   r   r   r   rI   ³  r…   z)RatePlanInstance.national_roaming_enabledc                 C   rƒ   )zM
        :returns: The international_roaming
        :rtype: unicode
        rJ   r„   rX   r   r   r   rJ   »  r…   z&RatePlanInstance.international_roamingc                 C   rƒ   )zE
        :returns: The date_created
        :rtype: datetime
        r{   r„   rX   r   r   r   r{   Ã  r…   zRatePlanInstance.date_createdc                 C   rƒ   )zE
        :returns: The date_updated
        :rtype: datetime
        r|   r„   rX   r   r   r   r|   Ë  r…   zRatePlanInstance.date_updatedc                 C   rƒ   )z;
        :returns: The url
        :rtype: unicode
        r}   r„   rX   r   r   r   r}   Ó  r…   zRatePlanInstance.urlc                 C   ó
   | j  ¡ S )rc   )r‚   rd   rX   r   r   r   rd   Û  ó   
zRatePlanInstance.fetchc                 C   s   | j j||d�S )re   )rA   rB   )r‚   rf   )r   rA   rB   r   r   r   rf   ä  s   
zRatePlanInstance.updatec                 C   r†   )rg   )r‚   rh   rX   r   r   r   rh   ð  r‡   zRatePlanInstance.deletec                 C   ri   )rW   rj   c                 s   rk   rl   rm   rn   r   r   r   rr      rs   z,RatePlanInstance.__repr__.<locals>.<genexpr>z-<Twilio.Preview.Wireless.RatePlanInstance {}>rt   rw   r   r   r   rY   ù  ry   zRatePlanInstance.__repr__r.   )r[   r\   r]   r^   r   Úpropertyr‚   rO   rA   rz   rB   rC   rE   rD   rF   rG   rI   rJ   r{   r|   r}   rd   r   r_   rf   rh   rY   r`   r   r   r   r   r@   :  sJ    














		r@   N)r^   Útwilio.baser   r   r   Útwilio.base.instance_contextr   Útwilio.base.instance_resourcer   Útwilio.base.list_resourcer   Útwilio.base.pager   r	   r%   rQ   r@   r   r   r   r   Ú<module>   s    2)N