o
    �¨Êh/I  ã                   @   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ejfdd„Zdd„ Zdd„ Zdd„ Z‡  ZS )ÚRatePlanListú  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.wireless.v1.rate_plan.RatePlanList
        :rtype: twilio.rest.wireless.v1.rate_plan.RatePlanList
        z
/RatePlansN© )Úsuperr	   Ú__init__Ú	_solutionÚformatÚ_uri)ÚselfÚversion©Ú	__class__r   úS/var/www/html/env/lib/python3.10/site-packages/twilio/rest/wireless/v1/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.wireless.v1.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 )a_  
        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.wireless.v1.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.wireless.v1.rate_plan.RatePlanPage
        )Ú	PageTokenr   ÚPageSizeÚGET©Úparams)r   Úofr   r   r   ÚRatePlanPager   )r   Ú
page_tokenÚpage_numberr   r#   Úresponser   r   r   r   M   s   ýzRatePlanList.pagec                 C   s"   | j jj d|¡}t| j || jƒS )a8  
        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.wireless.v1.rate_plan.RatePlanPage
        r!   )r   ÚdomainÚtwilioÚrequestr%   r   )r   Ú
target_urlr(   r   r   r   Úget_paged   s
   

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

        :param unicode unique_name: A user-provided string that uniquely identifies this resource as an alternative to the Sid.
        :param unicode friendly_name: A user-provided string that identifies this resource.
        :param bool data_enabled: Defines whether SIMs are capable of using GPRS/3G/LTE data connectivity.
        :param unicode data_limit: Network-enforced limit specifying the total Megabytes of data usage allowed during one month on the home network.
        :param unicode data_metering: The model by which to meter data usage, in accordance with the two available data metering models.
        :param bool messaging_enabled: Defines whether SIMs are capable of making and sending and receiving SMS messages via either Commands or Programmable SMS APIs.
        :param bool voice_enabled: Defines whether SIMs are capable of making and receiving voice calls.
        :param bool national_roaming_enabled: Defines whether SIMs can roam onto other networks in the SIM's home country.
        :param unicode international_roaming: The international_roaming
        :param unicode national_roaming_data_limit: Network-enforced limit specifying the total Megabytes of national roaming data usage allowed during one month.
        :param unicode international_roaming_data_limit: The international_roaming_data_limit

        :returns: Newly created RatePlanInstance
        :rtype: twilio.rest.wireless.v1.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ÚNationalRoamingEnabledÚInternationalRoamingÚNationalRoamingDataLimitÚInternationalRoamingDataLimitÚPOST©Údata)r   r$   r   Úmapr   Úcreater   ÚRatePlanInstance)r   Úunique_nameÚfriendly_nameÚdata_enabledÚ
data_limitÚdata_meteringÚmessaging_enabledÚvoice_enabledÚnational_roaming_enabledÚinternational_roamingÚnational_roaming_data_limitÚ international_roaming_data_limitr>   Úpayloadr   r   r   r@   u   s&   õýzRatePlanList.createc                 C   ó   t | j|d�S ©zÒ
        Constructs a RatePlanContext

        :param sid: The sid

        :returns: twilio.rest.wireless.v1.rate_plan.RatePlanContext
        :rtype: twilio.rest.wireless.v1.rate_plan.RatePlanContext
        ©Úsid©ÚRatePlanContextr   ©r   rQ   r   r   r   Úget¤   ó   	zRatePlanList.getc                 C   rN   rO   rR   rT   r   r   r   Ú__call__¯   rV   zRatePlanList.__call__c                 C   ó   dS )úz
        Provide a friendly representation

        :returns: Machine friendly representation
        :rtype: str
        z!<Twilio.Wireless.V1.RatePlanList>r   ©r   r   r   r   Ú__repr__º   ó   zRatePlanList.__repr__)NN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   Úunsetr   r-   r@   rU   rW   r[   Ú__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 )a*  
        Initialize the RatePlanPage

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

        :returns: twilio.rest.wireless.v1.rate_plan.RatePlanPage
        :rtype: twilio.rest.wireless.v1.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 )zü
        Build an instance of RatePlanInstance

        :param dict payload: Payload response from the API

        :returns: twilio.rest.wireless.v1.rate_plan.RatePlanInstance
        :rtype: twilio.rest.wireless.v1.rate_plan.RatePlanInstance
        )rA   r   )r   rM   r   r   r   Úget_instanceÖ   s   	zRatePlanPage.get_instancec                 C   rX   )rY   z!<Twilio.Wireless.V1.RatePlanPage>r   rZ   r   r   r   r[   á   r\   zRatePlanPage.__repr__)r]   r^   r_   r`   r   rd   r[   rb   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 )rS   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.wireless.v1.rate_plan.RatePlanContext
        :rtype: twilio.rest.wireless.v1.rate_plan.RatePlanContext
        rQ   z/RatePlans/{sid}Nr   )r   rS   r   r   r   r   )r   r   rQ   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.wireless.v1.rate_plan.RatePlanInstance
        r!   r"   rQ   rP   )r   r$   r   Úfetchr   rA   r   )r   r#   rM   r   r   r   rf   þ   s   
ýzRatePlanContext.fetchc                 C   s:   t  ||dœ¡}| jjd| j|d�}t| j|| jd d�S )áy  
        Update the RatePlanInstance

        :param unicode unique_name: A user-provided string that uniquely identifies this resource as an alternative to the Sid.
        :param unicode friendly_name: A user-provided string that identifies this resource.

        :returns: Updated RatePlanInstance
        :rtype: twilio.rest.wireless.v1.rate_plan.RatePlanInstance
        )r1   r2   r<   r=   rQ   rP   )r   r$   r   Úupdater   rA   r   )r   rB   rC   r>   rM   r   r   r   rh     s   
ýzRatePlanContext.updatec                 C   s   | j  d| j¡S )ú
        Deletes the RatePlanInstance

        :returns: True if delete succeeds, False otherwise
        :rtype: bool
        Údelete)r   rj   r   rZ   r   r   r   rj   #  s   zRatePlanContext.deletec                 C   ó$   d  dd„ | j ¡ D ƒ¡}d |¡S )rY   ú c                 s   ó    � | ]\}}d   ||¡V  qdS ©z{}={}N©r   ©Ú.0ÚkÚvr   r   r   Ú	<genexpr>3  ó   € z+RatePlanContext.__repr__.<locals>.<genexpr>z'<Twilio.Wireless.V1.RatePlanContext {}>©Újoinr   Úitemsr   ©r   Úcontextr   r   r   r[   ,  ó   
zRatePlanContext.__repr__)r]   r^   r_   r`   r   rf   r   ra   rh   rj   r[   rb   r   r   r   r   rS   ë   s    	rS   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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 )0rA   r
   Nc                    sò   t t| ƒ |¡ i d|d “d|d “d|d “d|d “d|d “d|d “dt |d ¡“d|d “d	|d	 “d
|d
 “dt |d ¡“d|d “dt |d ¡“dt |d ¡“dt |d ¡“d|d “| _d| _d|pt| jd i| _dS )zº
        Initialize the RatePlanInstance

        :returns: twilio.rest.wireless.v1.rate_plan.RatePlanInstance
        :rtype: twilio.rest.wireless.v1.rate_plan.RatePlanInstance
        rQ   rB   Úaccount_sidrC   rD   rF   rE   rG   rH   rI   rK   rJ   rL   Údate_createdÚdate_updatedÚurlN)	r   rA   r   r   ÚintegerÚiso8601_datetimeÚ_propertiesÚ_contextr   )r   r   rM   rQ   r   r   r   r   :  sH   ÿþýüûúùø	÷
öõôóòñðzRatePlanInstance.__init__c                 C   s&   | j du 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: RatePlanContext for this RatePlanInstance
        :rtype: twilio.rest.wireless.v1.rate_plan.RatePlanContext
        NrQ   rP   )rƒ   rS   r   r   rZ   r   r   r   Ú_proxy[  s   
	zRatePlanInstance._proxyc                 C   ó
   | j d S )zq
        :returns: A 34 character string that uniquely identifies this resource.
        :rtype: unicode
        rQ   ©r‚   rZ   r   r   r   rQ   h  ó   
zRatePlanInstance.sidc                 C   r…   )z�
        :returns: A user-provided string that uniquely identifies this resource as an alternative to the sid.
        :rtype: unicode
        rB   r†   rZ   r   r   r   rB   p  r‡   zRatePlanInstance.unique_namec                 C   r…   )zp
        :returns: The unique id of the Account that this Rate Plan belongs to.
        :rtype: unicode
        r|   r†   rZ   r   r   r   r|   x  r‡   zRatePlanInstance.account_sidc                 C   r…   )zi
        :returns: A user-provided string that identifies this resource.
        :rtype: unicode
        rC   r†   rZ   r   r   r   rC   €  r‡   zRatePlanInstance.friendly_namec                 C   r…   )z|
        :returns: Defines whether SIMs are capable of using GPRS/3G/4G/LTE data connectivity.
        :rtype: bool
        rD   r†   rZ   r   r   r   rD   ˆ  r‡   zRatePlanInstance.data_enabledc                 C   r…   )z–
        :returns: The model by which to meter data usage, in accordance with the two available data metering models.
        :rtype: unicode
        rF   r†   rZ   r   r   r   rF   �  r‡   zRatePlanInstance.data_meteringc                 C   r…   )z¥
        :returns: Network-enforced limit specifying the total Megabytes of data usage allowed during one month on the home network.
        :rtype: unicode
        rE   r†   rZ   r   r   r   rE   ˜  r‡   zRatePlanInstance.data_limitc                 C   r…   )z‡
        :returns: Defines whether SIMs are capable of making and sending and receiving SMS via Commands.
        :rtype: bool
        rG   r†   rZ   r   r   r   rG      r‡   z"RatePlanInstance.messaging_enabledc                 C   r…   )zv
        :returns: Defines whether SIMs are capable of making and receiving voice calls.
        :rtype: bool
        rH   r†   rZ   r   r   r   rH   ¨  r‡   zRatePlanInstance.voice_enabledc                 C   r…   )z}
        :returns: Defines whether SIMs can roam onto other networks in the SIM's home country.
        :rtype: bool
        rI   r†   rZ   r   r   r   rI   °  r‡   z)RatePlanInstance.national_roaming_enabledc                 C   r…   )z¢
        :returns: Network-enforced limit specifying the total Megabytes of national roaming data usage allowed during one month.
        :rtype: unicode
        rK   r†   rZ   r   r   r   rK   ¸  r‡   z,RatePlanInstance.national_roaming_data_limitc                 C   r…   )zM
        :returns: The international_roaming
        :rtype: unicode
        rJ   r†   rZ   r   r   r   rJ   À  r‡   z&RatePlanInstance.international_roamingc                 C   r…   )zX
        :returns: The international_roaming_data_limit
        :rtype: unicode
        rL   r†   rZ   r   r   r   rL   È  r‡   z1RatePlanInstance.international_roaming_data_limitc                 C   r…   )z~
        :returns: The date that this resource was created, given as GMT in ISO 8601 format.
        :rtype: datetime
        r}   r†   rZ   r   r   r   r}   Ð  r‡   zRatePlanInstance.date_createdc                 C   r…   )zƒ
        :returns: The date that this resource was last updated, given as GMT in ISO 8601 format.
        :rtype: datetime
        r~   r†   rZ   r   r   r   r~   Ø  r‡   zRatePlanInstance.date_updatedc                 C   r…   )zN
        :returns: The URL for this resource.
        :rtype: unicode
        r   r†   rZ   r   r   r   r   à  r‡   zRatePlanInstance.urlc                 C   ó
   | j  ¡ S )re   )r„   rf   rZ   r   r   r   rf   è  ó   
zRatePlanInstance.fetchc                 C   s   | j j||d�S )rg   )rB   rC   )r„   rh   )r   rB   rC   r   r   r   rh   ñ  s   
zRatePlanInstance.updatec                 C   rˆ   )ri   )r„   rj   rZ   r   r   r   rj   ý  r‰   zRatePlanInstance.deletec                 C   rk   )rY   rl   c                 s   rm   rn   ro   rp   r   r   r   rt     ru   z,RatePlanInstance.__repr__.<locals>.<genexpr>z(<Twilio.Wireless.V1.RatePlanInstance {}>rv   ry   r   r   r   r[     r{   zRatePlanInstance.__repr__r.   )r]   r^   r_   r`   r   Úpropertyr„   rQ   rB   r|   rC   rD   rF   rE   rG   rH   rI   rK   rJ   rL   r}   r~   r   rf   r   ra   rh   rj   r[   rb   r   r   r   r   rA   7  sR    !
















		rA   N)r`   Útwilio.baser   r   r   Útwilio.base.instance_contextr   Útwilio.base.instance_resourcer   Útwilio.base.list_resourcer   Útwilio.base.pager   r	   r%   rS   rA   r   r   r   r   Ú<module>   s    3'L