o
    i                     @   s   d dl mZ d dlmZ d dlmZmZ d dlmZ erRd 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 d dlmZ d dlmZ d dlmZ G dd deZdS )    )StripeService)sanitize_id)Optionalcast)TYPE_CHECKING)
ListObject)RequestOptions)Alert)AlertActivateParams)AlertArchiveParams)AlertCreateParams)AlertDeactivateParams)AlertListParams)AlertRetrieveParamsc                	   @   s  e Zd Z		d'ded ded ddfdd	Z		d'ded ded ddfd
dZ	d(ddded ddfddZ	d(ddded ddfddZ		d'deded ded ddfddZ			d'deded ded ddfddZ
		d'deded ded ddfddZ		d'deded ded ddfddZ		d'deded ded ddfddZ		d'deded ded ddfd d!Z		d'deded" ded ddfd#d$Z		d'deded" ded ddfd%d&ZdS ))AlertServiceNparamsr   optionsr   returnListObject[Alert]c              	   C      t d| jddd||dS ):
        Lists billing active and inactive alerts
        r   get/v1/billing/alertsapibase_addressr   r   r   _requestselfr   r    r    }/var/www/snowflake_co_dev_github/snow_flake_back_end_deploy/env/lib/python3.10/site-packages/stripe/billing/_alert_service.pylist      zAlertService.listc              	      "   t d| jddd||dI dH S )r   r   r   r   r   r   Nr   _request_asyncr   r    r    r!   
list_async.      
zAlertService.list_asyncr   r	   c              	   C   r   ))
        Creates a billing alert
        r	   postr   r   r   r   r   r    r    r!   createA   r#   zAlertService.createc              	      r$   )r)   r	   r*   r   r   r   Nr%   r   r    r    r!   create_asyncT   r(   zAlertService.create_asyncidr   c              	   C   &   t d| jddjt|dd||dS )7
        Retrieves a billing alert given an ID
        r	   r   /v1/billing/alerts/{id}r-   r   r   r   r   formatr   r   r-   r   r   r    r    r!   retrieveg      	zAlertService.retrievec              	      .   t d| jddjt|dd||dI dH S )r/   r	   r   r0   r1   r   r   Nr   r&   r3   r   r4   r    r    r!   retrieve_async{      	
zAlertService.retrieve_asyncr
   c              	   C   r.   )G
        Reactivates this alert, allowing it to trigger again.
        r	   r*    /v1/billing/alerts/{id}/activater1   r   r   r2   r4   r    r    r!   activate   r6   zAlertService.activatec              	      r7   )r;   r	   r*   r<   r1   r   r   Nr8   r4   r    r    r!   activate_async   r:   zAlertService.activate_asyncr   c              	   C   r.   )g
        Archives this alert, removing it from the list view and APIs. This is non-reversible.
        r	   r*   /v1/billing/alerts/{id}/archiver1   r   r   r2   r4   r    r    r!   archive   r6   zAlertService.archivec              	      r7   )r?   r	   r*   r@   r1   r   r   Nr8   r4   r    r    r!   archive_async   r:   zAlertService.archive_asyncr   c              	   C   r.   )H
        Deactivates this alert, preventing it from triggering.
        r	   r*   "/v1/billing/alerts/{id}/deactivater1   r   r   r2   r4   r    r    r!   
deactivate   s   	zAlertService.deactivatec              	      r7   )rC   r	   r*   rD   r1   r   r   Nr8   r4   r    r    r!   deactivate_async   s   	
zAlertService.deactivate_async)NN)N)__name__
__module____qualname__r   r"   r'   r+   r,   strr5   r9   r=   r>   rA   rB   rE   rF   r    r    r    r!   r      s    










r   N)stripe._stripe_servicer   stripe._utilr   typingr   r   typing_extensionsr   stripe._list_objectr   stripe._request_optionsr   stripe.billing._alertr	   ,stripe.params.billing._alert_activate_paramsr
   +stripe.params.billing._alert_archive_paramsr   *stripe.params.billing._alert_create_paramsr   .stripe.params.billing._alert_deactivate_paramsr   (stripe.params.billing._alert_list_paramsr   ,stripe.params.billing._alert_retrieve_paramsr   r   r    r    r    r!   <module>   s   