o
    e#                     @   st   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	 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)values)InstanceResource)ListResource)Pagec                       sV   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	dd Z
  ZS )BillingPeriodListc                    s2   t t| | d|i| _djdi | j| _dS )ab  
        Initialize the BillingPeriodList

        :param Version version: Version that contains the resource
        :param sim_sid: The SID of the Super SIM the Billing Period belongs to

        :returns: twilio.rest.supersim.v1.sim.billing_period.BillingPeriodList
        :rtype: twilio.rest.supersim.v1.sim.billing_period.BillingPeriodList
        sim_sidz/Sims/{sim_sid}/BillingPeriodsN )superr   __init__	_solutionformat_uri)selfversionr   	__class__r	   ]/var/www/html/venv/lib/python3.10/site-packages/twilio/rest/supersim/v1/sim/billing_period.pyr      s   

zBillingPeriodList.__init__Nc                 C   s0   | j ||}| j|d d}| j ||d S )a  
        Streams BillingPeriodInstance 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.supersim.v1.sim.billing_period.BillingPeriodInstance]
        	page_size)r   limit)_versionread_limitspagestream)r   r   r   limitsr   r	   r	   r   r   "   s   zBillingPeriodList.streamc                 C   s   t | j||dS )ar  
        Lists BillingPeriodInstance 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.supersim.v1.sim.billing_period.BillingPeriodInstance]
        )r   r   )listr   )r   r   r   r	   r	   r   r   9   s   zBillingPeriodList.listc                 C   s6   t |||d}| jjd| j|d}t| j|| jS )a  
        Retrieve a single page of BillingPeriodInstance 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 BillingPeriodInstance
        :rtype: twilio.rest.supersim.v1.sim.billing_period.BillingPeriodPage
        )	PageTokenr   PageSizeGET)methoduriparams)r   ofr   r   r   BillingPeriodPager   )r   
page_tokenpage_numberr   dataresponser	   r	   r   r   K   s   zBillingPeriodList.pagec                 C   s"   | j jjd|}t| j || jS )aP  
        Retrieve a specific page of BillingPeriodInstance records from the API.
        Request is executed immediately

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

        :returns: Page of BillingPeriodInstance
        :rtype: twilio.rest.supersim.v1.sim.billing_period.BillingPeriodPage
        r   )r   domaintwiliorequestr#   r   )r   
target_urlr'   r	   r	   r   get_page^   s
   

zBillingPeriodList.get_pagec                 C      dS )z
        Provide a friendly representation

        :returns: Machine friendly representation
        :rtype: str
        z&<Twilio.Supersim.V1.BillingPeriodList>r	   r   r	   r	   r   __repr__o      zBillingPeriodList.__repr__)NN)__name__
__module____qualname__r   r   r   r   unsetr   r,   r0   __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 BillingPeriodPage

        :param Version version: Version that contains the resource
        :param Response response: Response from the API
        :param sim_sid: The SID of the Super SIM the Billing Period belongs to

        :returns: twilio.rest.supersim.v1.sim.billing_period.BillingPeriodPage
        :rtype: twilio.rest.supersim.v1.sim.billing_period.BillingPeriodPage
        N)r
   r#   r   r   )r   r   r'   solutionr   r	   r   r   {   s   
zBillingPeriodPage.__init__c                 C   s   t | j|| jd dS )a  
        Build an instance of BillingPeriodInstance

        :param dict payload: Payload response from the API

        :returns: twilio.rest.supersim.v1.sim.billing_period.BillingPeriodInstance
        :rtype: twilio.rest.supersim.v1.sim.billing_period.BillingPeriodInstance
        r   )r   )BillingPeriodInstancer   r   )r   payloadr	   r	   r   get_instance   s   	zBillingPeriodPage.get_instancec                 C   r-   )r.   z&<Twilio.Supersim.V1.BillingPeriodPage>r	   r/   r	   r	   r   r0      r1   zBillingPeriodPage.__repr__)r2   r3   r4   r   r:   r0   r6   r	   r	   r   r   r#   y   s    r#   c                       s   e Zd ZG dd deZ 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dd Z  ZS )r8   c                   @   s   e Zd ZdZdZdS )zBillingPeriodInstance.BpTypereadyactiveN)r2   r3   r4   READYACTIVEr	   r	   r	   r   BpType   s    r?   c                    s   t t| | |d|d|dt|dt|d|dt|dt|dd	| _d
| _d|i| _d
S )z
        Initialize the BillingPeriodInstance

        :returns: twilio.rest.supersim.v1.sim.billing_period.BillingPeriodInstance
        :rtype: twilio.rest.supersim.v1.sim.billing_period.BillingPeriodInstance
        sidaccount_sidr   
start_timeend_timeperiod_typedate_createddate_updated)r@   rA   r   rB   rC   rD   rE   rF   N)	r
   r8   r   getr   iso8601_datetime_properties_contextr   )r   r   r9   r   r   r	   r   r      s   zBillingPeriodInstance.__init__c                 C   
   | j d S )zQ
        :returns: The SID of the Billing Period
        :rtype: unicode
        r@   rI   r/   r	   r	   r   r@         
zBillingPeriodInstance.sidc                 C   rK   )zc
        :returns: The SID of the Account the Super SIM belongs to
        :rtype: unicode
        rA   rL   r/   r	   r	   r   rA      rM   z!BillingPeriodInstance.account_sidc                 C   rK   )zj
        :returns: The SID of the Super SIM the Billing Period belongs to
        :rtype: unicode
        r   rL   r/   r	   r	   r   r      rM   zBillingPeriodInstance.sim_sidc                 C   rK   )zY
        :returns: The start time of the Billing Period
        :rtype: datetime
        rB   rL   r/   r	   r	   r   rB      rM   z BillingPeriodInstance.start_timec                 C   rK   )zW
        :returns: The end time of the Billing Period
        :rtype: datetime
        rC   rL   r/   r	   r	   r   rC      rM   zBillingPeriodInstance.end_timec                 C   rK   )zg
        :returns: The type of the Billing Period
        :rtype: BillingPeriodInstance.BpType
        rD   rL   r/   r	   r	   r   rD      rM   z!BillingPeriodInstance.period_typec                 C   rK   )zt
        :returns: The ISO 8601 date and time in GMT when the resource was created
        :rtype: datetime
        rE   rL   r/   r	   r	   r   rE      rM   z"BillingPeriodInstance.date_createdc                 C   rK   )zy
        :returns: The ISO 8601 date and time in GMT when the resource was last updated
        :rtype: datetime
        rF   rL   r/   r	   r	   r   rF      rM   z"BillingPeriodInstance.date_updatedc                 C   r-   )r.   z*<Twilio.Supersim.V1.BillingPeriodInstance>r	   r/   r	   r	   r   r0      r1   zBillingPeriodInstance.__repr__)r2   r3   r4   objectr?   r   propertyr@   rA   r   rB   rC   rD   rE   rF   r0   r6   r	   r	   r   r   r8      s(    







r8   N)__doc__twilio.baser   r   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.pager   r   r#   r8   r	   r	   r	   r   <module>   s   i'