:py:mod:`abacusai.webhook`
==========================

.. py:module:: abacusai.webhook


Module Contents
---------------

Classes
~~~~~~~

.. autoapisummary::

   abacusai.webhook.Webhook




.. py:class:: Webhook(client, webhookId=None, deploymentId=None, endpoint=None, webhookEventType=None, payloadTemplate=None, createdAt=None)

   Bases: :py:obj:`abacusai.return_class.AbstractApiClass`

   A Abacus.AI Webhook attached to an endpoint and event trigger for a given object.

   :param client: An authenticated API Client instance
   :type client: ApiClient
   :param webhookId: Unique identifier for this webhook.
   :type webhookId: str
   :param deploymentId: Identifier for the deployment this webhook is attached to.
   :type deploymentId: str
   :param endpoint: The URI this webhook will send HTTP POST requests to.
   :type endpoint: str
   :param webhookEventType: The event that triggers the webhook action.
   :type webhookEventType: str
   :param payloadTemplate: Template for JSON Dictionary to be sent as the body of the POST request.
   :type payloadTemplate: str
   :param createdAt: The date and time this webhook was created.
   :type createdAt: str

   .. py:method:: __repr__()

      Return repr(self).


   .. py:method:: to_dict()

      Get a dict representation of the parameters in this class

      :returns: The dict value representation of the class parameters
      :rtype: dict


   .. py:method:: refresh()

      Calls describe and refreshes the current object's fields

      :returns: The current object
      :rtype: Webhook


   .. py:method:: describe()

      Describe the webhook with a given ID.

      :param webhook_id: Unique string identifier of the target webhook.
      :type webhook_id: str

      :returns: The webhook with the given ID.
      :rtype: Webhook


   .. py:method:: update(endpoint = None, webhook_event_type = None, payload_template = None)

      Update the webhook

      :param endpoint: If provided, changes the webhook's endpoint.
      :type endpoint: str
      :param webhook_event_type: If provided, changes the event type.
      :type webhook_event_type: str
      :param payload_template: If provided, changes the payload template.
      :type payload_template: dict


   .. py:method:: delete()

      Delete the webhook

      :param webhook_id: Unique identifier of the target webhook.
      :type webhook_id: str



