o
    BiW(                     @   st   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mZ d dlmZmZmZ G dd	 d	eZd
S )    )
ListObject)RequestOptions)StripeService)sanitize_id)Alert)Listcast)LiteralNotRequired	TypedDictc                	   @   s   e Zd 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G d	d
 d
eZG dd deZ	G dd deZ
G dd deZi i fdddedee fddZi i fdddedee fddZi fdddedefddZi fdddedefddZi i fdedddedefd d!Zi i fdedddedefd"d#Zi i fdedd$dedefd%d&Zi i fdedd$dedefd'd(Zi i fdedd)dedefd*d+Zi i fdedd)dedefd,d-Zi i fdedd.dedefd/d0Zi i fdedd.dedefd1d2Zd3S )4AlertServicec                   @      e Zd ZU eee  ed< dS )AlertService.ActivateParamsexpandN__name__
__module____qualname__r
   r   str__annotations__ r   r   ]/var/www/html/Trade-python/venv/lib/python3.10/site-packages/stripe/billing/_alert_service.pyActivateParams      
 r   c                   @   r   )AlertService.ArchiveParamsr   Nr   r   r   r   r   ArchiveParams   r   r   c                   @   sR   e Zd ZU ed ed< 	 eee  ed< 	 ed ed< 	 eed< 	 ed ed< d	S )
AlertService.CreateParamsusage_threshold
alert_typer   AlertService.CreateParamsFilterfiltertitle-AlertService.CreateParamsUsageThresholdConfigusage_threshold_configN)r   r   r   r	   r   r
   r   r   r   r   r   r   CreateParams   s   
 r$   c                   @   s6   e Zd ZU ee ed< 	 ee ed< 	 ee ed< dS )r   customersubscriptionsubscription_itemN)r   r   r   r
   r   r   r   r   r   r   CreateParamsFilter1   s   
 r(   c                   @   s2   e Zd ZU eed< 	 ee ed< 	 ed ed< dS )r"   gtemeterone_time
recurrenceN)r   r   r   intr   r
   r   r	   r   r   r   r    CreateParamsUsageThresholdConfig?   s   
 r.   c                   @   r   )AlertService.DeactivateParamsr   Nr   r   r   r   r   DeactivateParamsM   r   r0   c                   @   sh   e Zd ZU eed  ed< 	 ee ed< 	 eee  ed< 	 ee ed< 	 ee ed< 	 ee ed< dS )	AlertService.ListParamsr   r   ending_beforer   limitr*   starting_afterN)	r   r   r   r
   r	   r   r   r   r-   r   r   r   r   
ListParamsS   s   
 r5   c                   @   r   )AlertService.RetrieveParamsr   Nr   r   r   r   r   RetrieveParamsm   r   r7   paramsr1   optionsreturnc              	   C   s   t tt | jddd||dS ):
        Lists billing active and inactive alerts
        get/v1/billing/alertsapibase_addressr8   r9   )r   r   r   _requestselfr8   r9   r   r   r   lists   s   zAlertService.listc              	      s&   t tt | jddd||dI dH S )r;   r<   r=   r>   r?   N)r   r   r   _request_asyncrB   r   r   r   
list_async   s   
zAlertService.list_asyncr   c              	   C   s   t t| jddd||dS ))
        Creates a billing alert
        postr=   r>   r?   )r   r   rA   rB   r   r   r   create   s   zAlertService.createc              	      s"   t t| jddd||dI dH S )rG   rH   r=   r>   r?   N)r   r   rE   rB   r   r   r   create_async   s   
zAlertService.create_asyncidr6   c              	   C   &   t t| jddjt|dd||dS )7
        Retrieves a billing alert given an ID
        r<   /v1/billing/alerts/{id}rK   r>   r?   r   r   rA   formatr   rC   rK   r8   r9   r   r   r   retrieve      	zAlertService.retrievec              	      .   t t| jddjt|dd||dI dH S )rM   r<   rN   rO   r>   r?   Nr   r   rE   rQ   r   rR   r   r   r   retrieve_async      	
zAlertService.retrieve_asyncr   c              	   C   rL   )G
        Reactivates this alert, allowing it to trigger again.
        rH    /v1/billing/alerts/{id}/activaterO   r>   r?   rP   rR   r   r   r   activate   rT   zAlertService.activatec              	      rU   )rY   rH   rZ   rO   r>   r?   NrV   rR   r   r   r   activate_async   rX   zAlertService.activate_asyncr   c              	   C   rL   )g
        Archives this alert, removing it from the list view and APIs. This is non-reversible.
        rH   /v1/billing/alerts/{id}/archiverO   r>   r?   rP   rR   r   r   r   archive  rT   zAlertService.archivec              	      rU   )r]   rH   r^   rO   r>   r?   NrV   rR   r   r   r   archive_async  rX   zAlertService.archive_asyncr/   c              	   C   rL   )H
        Deactivates this alert, preventing it from triggering.
        rH   "/v1/billing/alerts/{id}/deactivaterO   r>   r?   rP   rR   r   r   r   
deactivate3  s   	zAlertService.deactivatec              	      rU   )ra   rH   rb   rO   r>   r?   NrV   rR   r   r   r   deactivate_asyncI  s   	
zAlertService.deactivate_asyncN)r   r   r   r   r   r   r$   r(   r.   r0   r5   r7   r   r   r   rD   rF   rI   rJ   r   rS   rW   r[   r\   r_   r`   rc   rd   r   r   r   r   r      s   










r   N)stripe._list_objectr   stripe._request_optionsr   stripe._stripe_servicer   stripe._utilr   stripe.billing._alertr   typingr   r   typing_extensionsr	   r
   r   r   r   r   r   r   <module>   s   