
    kh                          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 er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e      Zy)    )
ListObject)RequestOptions)StripeService)sanitize_id)WebhookEndpoint)Optionalcast)TYPE_CHECKING)WebhookEndpointCreateParams)WebhookEndpointDeleteParams)WebhookEndpointListParams)WebhookEndpointRetrieveParams)WebhookEndpointUpdateParamsc            	          e Zd Z	 	 ddeded   dee   defdZ	 	 ddeded   dee   defdZ	 	 ddeded	   dee   defd
Z		 	 ddeded	   dee   defdZ
	 	 ddeded   dee   defdZ	 	 ddeded   dee   defdZ	 	 dded   dee   dee   fdZ	 	 dded   dee   dee   fdZ	 ddddee   defdZ	 ddddee   defdZy)WebhookEndpointServiceNwebhook_endpointparamsr   optionsreturnc                 |    t        t        | j                  ddj                  t	        |            d||            S )
        You can also delete webhook endpoints via the [webhook endpoint management](https://dashboard.stripe.com/account/webhooks) page of the Stripe dashboard.
        delete(/v1/webhook_endpoints/{webhook_endpoint}r   apibase_addressr   r   r	   r   _requestformatr   selfr   r   r   s       `/var/www/api/v1/venv_fitandmore/lib/python3.12/site-packages/stripe/_webhook_endpoint_service.pyr   zWebhookEndpointService.delete   sP     MM:AA%01A%B B  #  
 	
    c                    K   t        t        | j                  ddj                  t	        |            d||       d{         S 7 w)r   r   r   r   r   r   Nr	   r   _request_asyncr    r   r!   s       r#   delete_asyncz#WebhookEndpointService.delete_async4   s`      %%:AA%01A%B B  # &  
 	
   =A
A
 	A
r   c                 |    t        t        | j                  ddj                  t	        |            d||            S )C
        Retrieves the webhook endpoint with the given ID.
        getr   r   r   r   r   r!   s       r#   retrievezWebhookEndpointService.retrieveJ   sP     MM:AA%01A%B B  #  
 	
r$   c                    K   t        t        | j                  ddj                  t	        |            d||       d{         S 7 w)r+   r,   r   r   r   r   Nr&   r!   s       r#   retrieve_asyncz%WebhookEndpointService.retrieve_async`   s`      %%:AA%01A%B B  # &  
 	
r)   r   c                 |    t        t        | j                  ddj                  t	        |            d||            S )
        Updates the webhook endpoint. You may edit the url, the list of enabled_events, and the status of your endpoint.
        postr   r   r   r   r   r!   s       r#   updatezWebhookEndpointService.updatev   sP     MM:AA%01A%B B  #  
 	
r$   c                    K   t        t        | j                  ddj                  t	        |            d||       d{         S 7 w)r1   r2   r   r   r   r   Nr&   r!   s       r#   update_asyncz#WebhookEndpointService.update_async   s`      %%:AA%01A%B B  # &  
 	
r)   r   c           
      X    t        t        t           | j                  ddd||            S );
        Returns a list of your webhook endpoints.
        r,   /v1/webhook_endpointsr   r   )r	   r   r   r   r"   r   r   s      r#   listzWebhookEndpointService.list   s9     'MM'"  	
 		
r$   c           
      t   K   t        t        t           | j                  ddd||       d{         S 7 w)r7   r,   r8   r   r   N)r	   r   r   r'   r9   s      r#   
list_asyncz!WebhookEndpointService.list_async   sI      '%%'" &  	
 		
s   +86
	8r   c           
      J    t        t        | j                  ddd||            S )  
        A webhook endpoint must have a url and a list of enabled_events. You may optionally specify the Boolean connect parameter. If set to true, then a Connect webhook endpoint that notifies the specified url about events from all connected accounts is created; otherwise an account webhook endpoint that notifies the specified url only about events from your account is created. You can also create webhook endpoints in the [webhooks settings](https://dashboard.stripe.com/account/webhooks) section of the Dashboard.
        r2   r8   r   r   )r	   r   r   r9   s      r#   createzWebhookEndpointService.create   s4     MM'"  	
 		
r$   c           
      f   K   t        t        | j                  ddd||       d{         S 7 w)r>   r2   r8   r   r   N)r	   r   r'   r9   s      r#   create_asyncz#WebhookEndpointService.create_async   sD      %%'" &  	
 		
s   $1/
	1)NN)N)__name__
__module____qualname__strr   r   r   r   r(   r-   r/   r3   r5   r   r:   r<   r?   rA    r$   r#   r   r      s@    ;?,0	

 67
 .)	

 

2 ;?,0	

 67
 .)	

 

2 =A,0	

 89
 .)	

 

2 =A,0	

 89
 .)	

 

2 ;?,0	

 67
 .)	

 

2 ;?,0	

 67
 .)	

 

0 9=,0
45
 .)
 
O	$	
* 9=,0
45
 .)
 
O	$	
, -1
-
 .)
 
	
, -1
-
 .)
 
	
r$   r   N)stripe._list_objectr   stripe._request_optionsr   stripe._stripe_servicer   stripe._utilr   stripe._webhook_endpointr   typingr   r	   typing_extensionsr
   -stripe.params._webhook_endpoint_create_paramsr   -stripe.params._webhook_endpoint_delete_paramsr   +stripe.params._webhook_endpoint_list_paramsr   /stripe.params._webhook_endpoint_retrieve_paramsr   -stripe.params._webhook_endpoint_update_paramsr   r   rF   r$   r#   <module>rS      sF    + 2 0 $ 4 ! +
O
] O
r$   