
    pi@0                         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
e      Z G d de      Z G d de      Zy)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                   Z     e Zd Z G d de      Z	 dedeeef   def fdZ	defdZ
 xZS )	BillingPeriodInstancec                       e Zd ZdZdZy)BillingPeriodInstance.BpTypereadyactiveN)__name__
__module____qualname__READYACTIVE     l/opt/services/ai/voice_agent/venv/lib/python3.12/site-packages/twilio/rest/supersim/v1/sim/billing_period.pyBpTyper      s    r   r   versionpayloadsim_sidc                 .   t         |   |       |j                  d      | _        |j                  d      | _        |j                  d      | _        t        j                  |j                  d            | _        t        j                  |j                  d            | _	        |j                  d      | _
        t        j                  |j                  d            | _        t        j                  |j                  d            | _        d|i| _        y )	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__s       r   r,   zBillingPeriodInstance.__init__*   s    !")++e"4*1++m*D&-kk)&<.9.J.JKK%/
 -8,H,HKK
#-
 FM[[F
 1<0L0LKK'1
 1<0L0LKK'1

 w
r   returnc                     dj                  d | j                  j                         D              }dj                  |      S )f
        Provide a friendly representation

        :returns: Machine friendly representation
         c              3   F   K   | ]  \  }}d j                  ||        yw)z{}={}N)format).0kvs      r   	<genexpr>z1BillingPeriodInstance.__repr__.<locals>.<genexpr>J   s     SDAq7>>!Q/Ss   !z-<Twilio.Supersim.V1.BillingPeriodInstance {}>)joinr/   itemsr7   )r0   contexts     r   __repr__zBillingPeriodInstance.__repr__D   s6     ((SDNN<P<P<RSS>EEgNNr   )r   r   r   objectr   r   r   strr   r,   r?   __classcell__r1   s   @r   r   r      sD     	
 
$sCx. 
3 
4O# Or   r   c                   2    e Zd Zdeeef   defdZdefdZy)BillingPeriodPager!   r2   c                 L    t        | j                  || j                  d         S )zs
        Build an instance of BillingPeriodInstance

        :param payload: Payload response from the API
        r"   )r"   )r   _versionr/   )r0   r!   s     r   get_instancezBillingPeriodPage.get_instanceP   s%     %MM7DNN9,E
 	
r   c                      y)r4   z&<Twilio.Supersim.V1.BillingPeriodPage>r   r0   s    r   r?   zBillingPeriodPage.__repr__Z        8r   N)	r   r   r   r   rA   r   r   rH   r?   r   r   r   rE   rE   N   s*    
DcN 
7L 
8# 8r   rE   c            	           e Zd Zdedef fdZ	 	 ddee   dee   dee	   fdZ
	 	 ddee   dee   dee	   fdZ	 	 ddee   dee   dee	   fd	Z	 	 ddee   dee   dee	   f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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ZdedefdZdedefdZdefdZ xZS )BillingPeriodListr    r"   c                 x    t         |   |       d|i| _         dj                  di | j                  | _        y)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/   r7   _uri)r0   r    r"   r1   s      r   r,   zBillingPeriodList.__init__e   s@     	! w
 <4;;MdnnM	r   limit	page_sizer2   c                     | j                   j                  ||      }| j                  |d         }| j                   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
        rQ   rQ   rP   )rG   read_limitspagestreamr0   rP   rQ   limitsrU   s        r   rV   zBillingPeriodList.streamu   sJ    ( **5)<yy6+#6y7}}##D&/::r   c                    K   | j                   j                  ||      }| j                  |d          d{   }| j                   j                  ||d         S 7 #w)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
        rQ   rS   NrP   )rG   rT   
page_asyncstream_asyncrW   s        r   r[   zBillingPeriodList.stream_async   sW     ( **5)<__vk/B_CC}}))$w@@ Ds   5AA$Ac                 :    t        | j                  ||            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
        rP   rQ   )listrV   )r0   rP   rQ   s      r   r^   zBillingPeriodList.list   s(    & KK#  
 	
r   c                 z   K   | j                  ||       d{   2 cg c3 d{   }|7 7 	6 c}S c c}w w)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
        r]   N)r[   )r0   rP   rQ   records       r   
list_asynczBillingPeriodList.list_async   sT     * '+&7&7# '8 ' !
 
 !
 
 	
 
s0   ;.;620
26;26;
page_tokenpage_numberc                     t        j                  |||d      }t        j                  ddi      }d|d<   | j                  j                  d| j                  ||      }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   ofrG   rU   rO   rE   r/   r0   rb   rc   rQ   datarq   responses          r   rU   zBillingPeriodList.page   s      yy'#%
 ))^-PQR.==%%diig & 
 !$..IIr   c                   K   t        j                  |||d      }t        j                  ddi      }d|d<   | j                  j                  d| j                  ||       d{   }t        | j                  || j                        S 7 %w)	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
        re   rh   ri   rj   rk   rl   rm   N)r   rr   rG   rZ   rO   rE   r/   rs   s          r   rZ   zBillingPeriodList.page_async   s       yy'#%
 ))^-PQR.11diig 2 
 
 !$..II
s   A"B$B
%&B
target_urlc                     | j                   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
        rl   )rG   domaintwiliorequestrE   r/   r0   rw   ru   s      r   get_pagezBillingPeriodList.get_page  s=     ==''..66ujI $..IIr   c                    K   | j                   j                  j                  j                  d|       d{   }t	        | j                   || j
                        S 7 %w)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
        rl   N)rG   ry   rz   request_asyncrE   r/   r|   s      r   get_page_asyncz BillingPeriodList.get_page_async*  sJ      --44BB5*UU $..II Vs   4AA&Ac                      y)r4   z&<Twilio.Supersim.V1.BillingPeriodList>r   rJ   s    r   r?   zBillingPeriodList.__repr__6  rK   r   )NN)r   r   r   r   rA   r,   r   intr	   r   rV   r
   r[   r   r^   ra   r   unsetr   r@   rE   rU   rZ   r}   r   r?   rB   rC   s   @r   rM   rM   c   s   N N# N$  $#';}; C=; 
'	(	;6  $#'A}A C=A 
,	-	A6  $#'
}
 C=
 
#	$	
8  $#'
}
 C=
 
#	$	
: *0*0,,(.	J#v+&J 3;'J f%	J
 
JF *0*0,,(.	J#v+&J 3;'J f%	J
 
JB
J3 
J+< 
J
Js 
J7H 
J8# 8r   rM   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   rE   rM   r   r   r   <module>r      sQ     L L L + : 2 ' !2O, 2Oj8 8*Y8 Y8r   