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rLd 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)WebhookEndpoint)WebhookEndpointCreateParams)WebhookEndpointDeleteParams)WebhookEndpointListParams)WebhookEndpointRetrieveParams)WebhookEndpointUpdateParamsc                	   @   s  e Z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 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S )$WebhookEndpointServiceNwebhook_endpointparamsr   optionsr   returnr	   c              	   C   &   t d| jddjt|dd||dS )
        You can also delete webhook endpoints via the [webhook endpoint management](https://dashboard.stripe.com/account/webhooks) page of the Stripe dashboard.
        r	   delete(/v1/webhook_endpoints/{webhook_endpoint}r   apibase_addressr   r   r   _requestformatr   selfr   r   r    r!   /var/www/snowflake_co_dev_github/snow_flake_back_end_deploy/env/lib/python3.10/site-packages/stripe/_webhook_endpoint_service.pyr         	zWebhookEndpointService.deletec              	      .   t d| jddjt|dd||dI dH S )r   r	   r   r   r   r   r   Nr   _request_asyncr   r   r   r!   r!   r"   delete_async4      	
z#WebhookEndpointService.delete_asyncr   c              	   C   r   )C
        Retrieves the webhook endpoint with the given ID.
        r	   getr   r   r   r   r   r   r!   r!   r"   retrieveJ   r#   zWebhookEndpointService.retrievec              	      r$   )r)   r	   r*   r   r   r   r   Nr%   r   r!   r!   r"   retrieve_async`   r(   z%WebhookEndpointService.retrieve_asyncr   c              	   C   r   )
        Updates the webhook endpoint. You may edit the url, the list of enabled_events, and the status of your endpoint.
        r	   postr   r   r   r   r   r   r!   r!   r"   updatev   r#   zWebhookEndpointService.updatec              	      r$   )r-   r	   r.   r   r   r   r   Nr%   r   r!   r!   r"   update_async   r(   z#WebhookEndpointService.update_asyncr   ListObject[WebhookEndpoint]c              	   C      t d| jddd||dS );
        Returns a list of your webhook endpoints.
        r1   r*   /v1/webhook_endpointsr   r   r   r   r    r   r   r!   r!   r"   list      zWebhookEndpointService.listc              	      "   t d| jddd||dI dH S )r3   r1   r*   r4   r   r   Nr   r&   r6   r!   r!   r"   
list_async      
z!WebhookEndpointService.list_asyncr
   c              	   C   r2   )  
        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.
        r	   r.   r4   r   r   r5   r6   r!   r!   r"   create   r8   zWebhookEndpointService.createc              	      r9   )r=   r	   r.   r4   r   r   Nr:   r6   r!   r!   r"   create_async   r<   z#WebhookEndpointService.create_async)NN)N)__name__
__module____qualname__strr   r   r'   r+   r,   r/   r0   r7   r;   r>   r?   r!   r!   r!   r"   r      s    








r   N)stripe._stripe_servicer   stripe._utilr   typingr   r   typing_extensionsr   stripe._list_objectr   stripe._request_optionsr   stripe._webhook_endpointr	   -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   r!   r!   r!   r"   <module>   s   