o
    f>h@0                     @   s   d Z ddlmZ ddlmZmZmZmZmZmZm	Z	 ddl
mZ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 - Supersim
    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.
    )datetime)AnyDictListOptionalUnionIteratorAsyncIterator)deserializevalues)InstanceResource)ListResource)Version)Pagec                       sR   e Zd ZG dd deZ	 dedeeef def fddZ	defd	d
Z
  ZS )BillingPeriodInstancec                   @   s   e Zd ZdZdZdS )zBillingPeriodInstance.BpTypereadyactiveN)__name__
__module____qualname__READYACTIVE r   r   ]/var/www/html/venv/lib/python3.10/site-packages/twilio/rest/supersim/v1/sim/billing_period.pyBpType   s    r   versionpayloadsim_sidc                    s   t  | |d| _|d| _|d| _t|d| _t|d| _	|d| _
t|d| _t|d| _d|i| _d S )	Nsidaccount_sidr   
start_timeend_timeperiod_typedate_createddate_updated)super__init__getr   r   r   r
   iso8601_datetimer    r!   r"   r#   r$   	_solution)selfr   r   r   	__class__r   r   r&   *   s*   
zBillingPeriodInstance.__init__returnc                 C   s$   d dd | j D }d|S )f
        Provide a friendly representation

        :returns: Machine friendly representation
         c                 s   s     | ]\}}d  ||V  qdS )z{}={}N)format).0kvr   r   r   	<genexpr>J   s    z1BillingPeriodInstance.__repr__.<locals>.<genexpr>z-<Twilio.Supersim.V1.BillingPeriodInstance {}>)joinr)   itemsr0   )r*   contextr   r   r   __repr__D   s   
zBillingPeriodInstance.__repr__)r   r   r   objectr   r   r   strr   r&   r8   __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 )BillingPeriodPager   r-   c                 C   s   t | j|| jd dS )zs
        Build an instance of BillingPeriodInstance

        :param payload: Payload response from the API
        r   )r   )r   _versionr)   )r*   r   r   r   r   get_instanceP   s   zBillingPeriodPage.get_instancec                 C      dS )r.   z&<Twilio.Supersim.V1.BillingPeriodPage>r   r*   r   r   r   r8   Z      zBillingPeriodPage.__repr__N)	r   r   r   r   r:   r   r   r>   r8   r   r   r   r   r<   N   s    
r<   c                	       sx  e Zd Zdedef fddZ		ddee dee dee	 fd	d
Z
		ddee dee dee	 fddZ		ddee dee dee	 fddZ		ddee dee dee	 fddZejejej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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 )BillingPeriodListr   r   c                    s.   t  | d|i| _djdi | j| _dS )z
        Initialize the BillingPeriodList

        :param version: Version that contains the resource
        :param sim_sid: The SID of the Super SIM to list Billing Periods for.

        r   z/Sims/{sim_sid}/BillingPeriodsNr   )r%   r&   r)   r0   _uri)r*   r   r   r+   r   r   r&   e   s   zBillingPeriodList.__init__Nlimit	page_sizer-   c                 C   s0   | j ||}| j|d d}| j ||d S )ac  
        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 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
        rE   rE   rD   )r=   read_limitspagestreamr*   rD   rE   limitsrH   r   r   r   rI   u   s   zBillingPeriodList.streamc                    s8   | j ||}| j|d dI dH }| j ||d S )ar  
        Asynchronously 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 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
        rE   rF   NrD   )r=   rG   
page_asyncstream_asyncrJ   r   r   r   rM      s   zBillingPeriodList.stream_asyncc                 C   s   t | j||dS )a   
        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 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
        rD   rE   )listrI   r*   rD   rE   r   r   r   rO      s   zBillingPeriodList.listc                    s&   dd | j ||dI dH 2 I dH S )a  
        Asynchronously 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 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   )r1   recordr   r   r   
<listcomp>   s
    z0BillingPeriodList.list_async.<locals>.<listcomp>rN   N)rM   rP   r   r   r   
list_async   s   
zBillingPeriodList.list_async
page_tokenpage_numberc                 C   sN   t |||d}t ddi}d|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 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 BillingPeriodInstance
        	PageTokenr   PageSizeContent-Type!application/x-www-form-urlencodedapplication/jsonAcceptGETmethoduriparamsheaders)r   ofr=   rH   rC   r<   r)   r*   rT   rU   rE   datarb   responser   r   r   rH      s   
zBillingPeriodList.pagec                    sV   t |||d}t ddi}d|d< | jjd| j||dI dH }t| j|| jS )	a  
        Asynchronously retrieve a single page of BillingPeriodInstance records from the API.
        Request is executed immediately

        :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 BillingPeriodInstance
        rV   rY   rZ   r[   r\   r]   r^   N)r   rc   r=   rL   rC   r<   r)   rd   r   r   r   rL      s   
zBillingPeriodList.page_async
target_urlc                 C   s"   | j jjd|}t| j || jS )z
        Retrieve a specific page of BillingPeriodInstance records from the API.
        Request is executed immediately

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

        :returns: Page of BillingPeriodInstance
        r]   )r=   domaintwiliorequestr<   r)   r*   rg   rf   r   r   r   get_page  s   	zBillingPeriodList.get_pagec                    s*   | j jjd|I dH }t| j || jS )a  
        Asynchronously retrieve a specific page of BillingPeriodInstance records from the API.
        Request is executed immediately

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

        :returns: Page of BillingPeriodInstance
        r]   N)r=   rh   ri   request_asyncr<   r)   rk   r   r   r   get_page_async*  s   	z BillingPeriodList.get_page_asyncc                 C   r?   )r.   z&<Twilio.Supersim.V1.BillingPeriodList>r   r@   r   r   r   r8   6  rA   zBillingPeriodList.__repr__)NN)r   r   r   r   r:   r&   r   intr   r   rI   r	   rM   r   rO   rS   r   unsetr   r9   r<   rH   rL   rl   rn   r8   r;   r   r   r+   r   rB   c   s    







#



!rB   N)__doc__r   typingr   r   r   r   r   r   r	   twilio.baser
   r   twilio.base.instance_resourcer   twilio.base.list_resourcer   twilio.base.versionr   twilio.base.pager   r   r<   rB   r   r   r   r   <module>   s    $5