o
    �¨ÊhE"  ã                   @   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
 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
      /       /
é    )Úvalues)ÚInstanceContext)ÚInstanceResource)ÚListResource)ÚPagec                       s8   e Zd ZdZ‡ fdd„Zdd„ Zdd„ Zdd	„ Z‡  ZS )
Ú	UsageListúÉ PLEASE NOTE that this class contains preview products that are subject
    to change. Use them with caution. If you currently do not have developer
    preview access, please contact help@twilio.com. c                    s   t t| ƒ |¡ d|i| _dS )a  
        Initialize the UsageList

        :param Version version: Version that contains the resource
        :param sim_sid: The sim_sid

        :returns: twilio.rest.preview.wireless.sim.usage.UsageList
        :rtype: twilio.rest.preview.wireless.sim.usage.UsageList
        Úsim_sidN)Úsuperr   Ú__init__Ú	_solution©ÚselfÚversionr	   ©Ú	__class__© úX/var/www/html/env/lib/python3.10/site-packages/twilio/rest/preview/wireless/sim/usage.pyr      s   
zUsageList.__init__c                 C   ó   t | j| jd d�S ©z¶
        Constructs a UsageContext

        :returns: twilio.rest.preview.wireless.sim.usage.UsageContext
        :rtype: twilio.rest.preview.wireless.sim.usage.UsageContext
        r	   ©r	   ©ÚUsageContextÚ_versionr   ©r   r   r   r   Úget$   ó   zUsageList.getc                 C   r   r   r   r   r   r   r   Ú__call__-   r   zUsageList.__call__c                 C   ó   dS )úz
        Provide a friendly representation

        :returns: Machine friendly representation
        :rtype: str
        z#<Twilio.Preview.Wireless.UsageList>r   r   r   r   r   Ú__repr__6   ó   zUsageList.__repr__)	Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   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 )Ú	UsagePager   c                    s   t t| ƒ ||¡ || _dS )aO  
        Initialize the UsagePage

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

        :returns: twilio.rest.preview.wireless.sim.usage.UsagePage
        :rtype: twilio.rest.preview.wireless.sim.usage.UsagePage
        N)r
   r'   r   r   )r   r   ÚresponseÚsolutionr   r   r   r   E   s   
zUsagePage.__init__c                 C   s   t | j|| jd d�S )zý
        Build an instance of UsageInstance

        :param dict payload: Payload response from the API

        :returns: twilio.rest.preview.wireless.sim.usage.UsageInstance
        :rtype: twilio.rest.preview.wireless.sim.usage.UsageInstance
        r	   r   )ÚUsageInstancer   r   )r   Úpayloadr   r   r   Úget_instanceU   s   	zUsagePage.get_instancec                 C   r   )r   z#<Twilio.Preview.Wireless.UsagePage>r   r   r   r   r   r    `   r!   zUsagePage.__repr__)r"   r#   r$   r%   r   r,   r    r&   r   r   r   r   r'   @   s
    r'   c                       s:   e Zd ZdZ‡ fdd„Zejejfdd„Zdd„ Z‡  Z	S )r   r   c                    s2   t t| ƒ |¡ d|i| _djdi | j¤Ž| _dS )a   
        Initialize the UsageContext

        :param Version version: Version that contains the resource
        :param sim_sid: The sim_sid

        :returns: twilio.rest.preview.wireless.sim.usage.UsageContext
        :rtype: twilio.rest.preview.wireless.sim.usage.UsageContext
        r	   z/Sims/{sim_sid}/UsageNr   )r
   r   r   r   ÚformatÚ_urir   r   r   r   r   o   s   

zUsageContext.__init__c                 C   s:   t  ||dœ¡}| jjd| j|d�}t| j|| jd d�S )úâ
        Fetch a UsageInstance

        :param unicode end: The end
        :param unicode start: The start

        :returns: Fetched UsageInstance
        :rtype: twilio.rest.preview.wireless.sim.usage.UsageInstance
        )ÚEndÚStartÚGET)Úparamsr	   r   )r   Úofr   Úfetchr.   r*   r   )r   ÚendÚstartr3   r+   r   r   r   r5      s   
ýzUsageContext.fetchc                 C   ó$   d  dd„ | j ¡ D ƒ¡}d |¡S )r   ú c                 s   ó    � | ]\}}d   ||¡V  qdS ©z{}={}N©r-   ©Ú.0ÚkÚvr   r   r   Ú	<genexpr>š   ó   € z(UsageContext.__repr__.<locals>.<genexpr>z)<Twilio.Preview.Wireless.UsageContext {}>©Újoinr   Úitemsr-   ©r   Úcontextr   r   r   r    “   ó   
zUsageContext.__repr__)
r"   r#   r$   r%   r   r   Úunsetr5   r    r&   r   r   r   r   r   j   s
    r   c                       s²   e Zd Zd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edd„ ƒZedd„ ƒZejejfdd„Zdd„ Z‡  ZS )r*   r   c              
      sb   t t| ƒ |¡ |d |d |d |d |d |d |d |d |d	 d
œ	| _d| _d|i| _dS )z»
        Initialize the UsageInstance

        :returns: twilio.rest.preview.wireless.sim.usage.UsageInstance
        :rtype: twilio.rest.preview.wireless.sim.usage.UsageInstance
        r	   Úsim_unique_nameÚaccount_sidÚperiodÚcommands_usageÚcommands_costsÚ
data_usageÚ
data_costsÚurl)	r	   rJ   rK   rL   rM   rN   rO   rP   rQ   N)r
   r*   r   Ú_propertiesÚ_contextr   )r   r   r+   r	   r   r   r   r   £   s   ÷zUsageInstance.__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: UsageContext for this UsageInstance
        :rtype: twilio.rest.preview.wireless.sim.usage.UsageContext
        Nr	   r   )rS   r   r   r   r   r   r   r   Ú_proxy½   s   
	zUsageInstance._proxyc                 C   ó
   | j d S )z?
        :returns: The sim_sid
        :rtype: unicode
        r	   ©rR   r   r   r   r   r	   Ê   ó   
zUsageInstance.sim_sidc                 C   rU   )zG
        :returns: The sim_unique_name
        :rtype: unicode
        rJ   rV   r   r   r   r   rJ   Ò   rW   zUsageInstance.sim_unique_namec                 C   rU   )zC
        :returns: The account_sid
        :rtype: unicode
        rK   rV   r   r   r   r   rK   Ú   rW   zUsageInstance.account_sidc                 C   rU   )z;
        :returns: The period
        :rtype: dict
        rL   rV   r   r   r   r   rL   â   rW   zUsageInstance.periodc                 C   rU   )zC
        :returns: The commands_usage
        :rtype: dict
        rM   rV   r   r   r   r   rM   ê   rW   zUsageInstance.commands_usagec                 C   rU   )zC
        :returns: The commands_costs
        :rtype: dict
        rN   rV   r   r   r   r   rN   ò   rW   zUsageInstance.commands_costsc                 C   rU   )z?
        :returns: The data_usage
        :rtype: dict
        rO   rV   r   r   r   r   rO   ú   rW   zUsageInstance.data_usagec                 C   rU   )z?
        :returns: The data_costs
        :rtype: dict
        rP   rV   r   r   r   r   rP     rW   zUsageInstance.data_costsc                 C   rU   )z;
        :returns: The url
        :rtype: unicode
        rQ   rV   r   r   r   r   rQ   
  rW   zUsageInstance.urlc                 C   s   | j j||d�S )r/   )r6   r7   )rT   r5   )r   r6   r7   r   r   r   r5     s   
zUsageInstance.fetchc                 C   r8   )r   r9   c                 s   r:   r;   r<   r=   r   r   r   rA   %  rB   z)UsageInstance.__repr__.<locals>.<genexpr>z*<Twilio.Preview.Wireless.UsageInstance {}>rC   rF   r   r   r   r      rH   zUsageInstance.__repr__)r"   r#   r$   r%   r   ÚpropertyrT   r	   rJ   rK   rL   rM   rN   rO   rP   rQ   r   rI   r5   r    r&   r   r   r   r   r*   ž   s2    









r*   N)r%   Útwilio.baser   Útwilio.base.instance_contextr   Útwilio.base.instance_resourcer   Útwilio.base.list_resourcer   Útwilio.base.pager   r   r'   r   r*   r   r   r   r   Ú<module>   s   0*4