o
    eH                     @   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 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 )RatePlanListc                    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
   T/var/www/html/venv/lib/python3.10/site-packages/twilio/rest/wireless/v1/rate_plan.pyr      s   	zRatePlanList.__init__Nc                 C   s0   | j ||}| j|d d}| j ||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)_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)methoduriparams)r   ofr   r   r   RatePlanPager   )r   
page_tokenpage_numberr   dataresponser
   r
   r   r   L   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_page_   s
   

zRatePlanList.get_pagec                 C   sN   t ||||||||t|	dd |
|d}| jjd| j|d}t| j|S )a  
        Create the RatePlanInstance

        :param unicode unique_name: An application-defined string that uniquely identifies the resource
        :param unicode friendly_name: A string to describe the resource
        :param bool data_enabled: Whether SIMs can use GPRS/3G/4G/LTE data connectivity
        :param unicode data_limit: The total data usage in Megabytes that the Network allows during one month on the home network
        :param unicode data_metering: The model used to meter data usage
        :param bool messaging_enabled: Whether SIMs can make, send, and receive SMS using Commands
        :param bool voice_enabled: Deprecated
        :param bool national_roaming_enabled: Whether SIMs can roam on networks other than the home network in the United States
        :param list[unicode] international_roaming: The services that SIMs capable of using GPRS/3G/4G/LTE data connectivity can use outside of the United States
        :param unicode national_roaming_data_limit: The total data usage in Megabytes that the Network allows during one month on non-home networks in the United States
        :param unicode international_roaming_data_limit: The total data usage (download and upload combined) in Megabytes that the Network allows during one month when roaming outside the United States

        :returns: The 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r    r!   r'   )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?   p   s   zRatePlanList.createc                 C      t | j|dS z
        Constructs a RatePlanContext

        :param sid: The SID that identifies the resource to fetch

        :returns: twilio.rest.wireless.v1.rate_plan.RatePlanContext
        :rtype: twilio.rest.wireless.v1.rate_plan.RatePlanContext
        sidRatePlanContextr   r   rP   r
   r
   r   get      	zRatePlanList.getc                 C   rM   rN   rQ   rS   r
   r
   r   __call__   rU   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__r   r   r   r   unsetr   r-   r?   rT   rV   rZ   __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 )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
        )r@   r   r   rL   r
   r
   r   get_instance   s   	zRatePlanPage.get_instancec                 C   rW   )rX   z!<Twilio.Wireless.V1.RatePlanPage>r
   rY   r
   r
   r   rZ      r[   zRatePlanPage.__repr__)r\   r]   r^   r   rc   rZ   r`   r
   r
   r   r   r$      s    r$   c                       sF   e 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 )rR   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 that identifies the resource to fetch

        :returns: twilio.rest.wireless.v1.rate_plan.RatePlanContext
        :rtype: twilio.rest.wireless.v1.rate_plan.RatePlanContext
        rP   z/RatePlans/{sid}Nr
   )r   rR   r   r   r   r   )r   r   rP   r   r
   r   r      s   

zRatePlanContext.__init__c                 C   s(   | j jd| jd}t| j || jd dS )
        Fetch the RatePlanInstance

        :returns: The fetched RatePlanInstance
        :rtype: twilio.rest.wireless.v1.rate_plan.RatePlanInstance
        r   r    r!   rP   rO   )r   fetchr   r@   r   rb   r
   r
   r   rf      s   zRatePlanContext.fetchc                 C   s:   t ||d}| jjd| j|d}t| j|| jd dS )Q  
        Update the RatePlanInstance

        :param unicode unique_name: An application-defined string that uniquely identifies the resource
        :param unicode friendly_name: A string to describe the resource

        :returns: The updated RatePlanInstance
        :rtype: twilio.rest.wireless.v1.rate_plan.RatePlanInstance
        )r1   r2   r<   r=   rP   rO   )r   r#   r   updater   r@   r   )r   rA   rB   r'   rL   r
   r
   r   rh      s   
zRatePlanContext.updatec                 C   s   | j jd| jdS )
        Deletes the RatePlanInstance

        :returns: True if delete succeeds, False otherwise
        :rtype: bool
        DELETEre   )r   deleter   rY   r
   r
   r   rk     s   zRatePlanContext.deletec                 C   $   d dd | j D }d|S )rX    c                 s        | ]\}}d  ||V  qdS z{}={}Nr   .0kvr
   r
   r   	<genexpr>      z+RatePlanContext.__repr__.<locals>.<genexpr>z'<Twilio.Wireless.V1.RatePlanContext {}>joinr   itemsr   r   contextr
   r
   r   rZ        
zRatePlanContext.__repr__)r\   r]   r^   r   rf   r   r_   rh   rk   rZ   r`   r
   r
   r   r   rR      s    	rR   c                       s$  e Zd ZG dd deZd0 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 )1r@   c                   @   s   e Zd ZdZdZdS )z"RatePlanInstance.DataLimitStrategyblockthrottleN)r\   r]   r^   BLOCKTHROTTLEr
   r
   r
   r   DataLimitStrategy$  s    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|p| 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
        rP   rA   account_sidrB   rC   rE   rD   rF   rG   rH   rJ   rI   rK   date_createddate_updatedurlN)
r   r@   r   rT   r   integeriso8601_datetime_properties_contextr   )r   r   rL   rP   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
        NrP   rO   )r   rR   r   r   rY   r
   r
   r   _proxyI  s   
	zRatePlanInstance._proxyc                 C   
   | j d S )zb
        :returns: The unique string that identifies the resource
        :rtype: unicode
        rP   r   rY   r
   r
   r   rP   V     
zRatePlanInstance.sidc                 C   r   )zw
        :returns: An application-defined string that uniquely identifies the resource
        :rtype: unicode
        rA   r   rY   r
   r
   r   rA   ^  r   zRatePlanInstance.unique_namec                 C   r   )zd
        :returns: The SID of the Account that created the resource
        :rtype: unicode
        r   r   rY   r
   r
   r   r   f  r   zRatePlanInstance.account_sidc                 C   r   )zi
        :returns: The string that you assigned to describe the resource
        :rtype: unicode
        rB   r   rY   r
   r
   r   rB   n  r   zRatePlanInstance.friendly_namec                 C   r   )zf
        :returns: Whether SIMs can use GPRS/3G/4G/LTE data connectivity
        :rtype: bool
        rC   r   rY   r
   r
   r   rC   v  r   zRatePlanInstance.data_enabledc                 C   r   )zV
        :returns: The model used to meter data usage
        :rtype: unicode
        rE   r   rY   r
   r
   r   rE   ~  r   zRatePlanInstance.data_meteringc                 C   r   )z
        :returns: The total data usage in Megabytes that the Network allows during one month on the home network
        :rtype: unicode
        rD   r   rY   r
   r
   r   rD     r   zRatePlanInstance.data_limitc                 C   r   )zl
        :returns: Whether SIMs can make, send, and receive SMS using Commands
        :rtype: bool
        rF   r   rY   r
   r
   r   rF     r   z"RatePlanInstance.messaging_enabledc                 C   r   )zj
        :returns: Deprecated. Whether SIMs can make and receive voice calls
        :rtype: bool
        rG   r   rY   r
   r
   r   rG     r   zRatePlanInstance.voice_enabledc                 C   r   )z
        :returns: Whether SIMs can roam on networks other than the home network in the United States
        :rtype: bool
        rH   r   rY   r
   r
   r   rH     r   z)RatePlanInstance.national_roaming_enabledc                 C   r   )z
        :returns: The total data usage in Megabytes that the Network allows during one month on non-home networks in the United States
        :rtype: unicode
        rJ   r   rY   r
   r
   r   rJ     r   z,RatePlanInstance.national_roaming_data_limitc                 C   r   )z
        :returns: The services that SIMs capable of using GPRS/3G/4G/LTE data connectivity can use outside of the United States
        :rtype: list[unicode]
        rI   r   rY   r
   r
   r   rI     r   z&RatePlanInstance.international_roamingc                 C   r   )z
        :returns: The total data usage (download and upload combined) in Megabytes that the Network allows during one month when roaming outside the United States
        :rtype: unicode
        rK   r   rY   r
   r
   r   rK     r   z1RatePlanInstance.international_roaming_data_limitc                 C   r   )z|
        :returns: The date when the resource was created, given as GMT in ISO 8601 format
        :rtype: datetime
        r   r   rY   r
   r
   r   r     r   zRatePlanInstance.date_createdc                 C   r   )z
        :returns: The date when the resource was last updated, given as GMT in ISO 8601 format
        :rtype: datetime
        r   r   rY   r
   r
   r   r     r   zRatePlanInstance.date_updatedc                 C   r   )zT
        :returns: The absolute URL of the resource
        :rtype: unicode
        r   r   rY   r
   r
   r   r     r   zRatePlanInstance.urlc                 C   
   | j  S )rd   )r   rf   rY   r
   r
   r   rf        
zRatePlanInstance.fetchc                 C   s   | j j||dS )rg   )rA   rB   )r   rh   )r   rA   rB   r
   r
   r   rh     s   
zRatePlanInstance.updatec                 C   r   )ri   )r   rk   rY   r
   r
   r   rk     r   zRatePlanInstance.deletec                 C   rl   )rX   rm   c                 s   rn   ro   rp   rq   r
   r
   r   ru     rv   z,RatePlanInstance.__repr__.<locals>.<genexpr>z(<Twilio.Wireless.V1.RatePlanInstance {}>rw   rz   r
   r
   r   rZ     r|   zRatePlanInstance.__repr__r.   )r\   r]   r^   objectr   r   propertyr   rP   rA   r   rB   rC   rE   rD   rF   rG   rH   rJ   rI   rK   r   r   r   rf   r   r_   rh   rk   rZ   r`   r
   r
   r   r   r@   "  sR    !
















		r@   N)__doc__twilio.baser   r   r   twilio.base.instance_contextr   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.pager   r	   r$   rR   r@   r
   r
   r
   r   <module>   s    *&A