CaptainHook (captain_hook v1.8.0) View Source

Link to this section Summary

Functions

Link to this section Functions

Link to this function

create_webhook_endpoint(attrs)

View Source

Specs

create_webhook_endpoint(map()) ::
  {:ok, CaptainHook.WebhookEndpoints.WebhookEndpoint.t()}
  | {:error, Ecto.Changeset.t()}

Callback implementation for CaptainHook.Behaviour.create_webhook_endpoint/1.

Link to this function

delete_webhook_endpoint(webhook_endpoint)

View Source

Specs

Callback implementation for CaptainHook.Behaviour.delete_webhook_endpoint/1.

Link to this function

disable_notification_type(webhook_endpoint, notification_type)

View Source

Specs

Callback implementation for CaptainHook.Behaviour.disable_notification_type/2.

Link to this function

enable_notification_type(webhook_endpoint, notification_type)

View Source

Specs

Callback implementation for CaptainHook.Behaviour.enable_notification_type/2.

Link to this function

get_webhook_conversation(id, opts \\ [])

View Source

Specs

get_webhook_conversation(binary(), keyword()) ::
  CaptainHook.WebhookConversations.WebhookConversation.t() | nil

Callback implementation for CaptainHook.Behaviour.get_webhook_conversation/2.

Link to this function

get_webhook_endpoint(id, opts \\ [])

View Source

Specs

get_webhook_endpoint(binary(), keyword()) ::
  CaptainHook.WebhookEndpoints.WebhookEndpoint.t() | nil

Callback implementation for CaptainHook.Behaviour.get_webhook_endpoint/2.

Link to this function

get_webhook_endpoint!(id, opts \\ [])

View Source

Specs

Callback implementation for CaptainHook.Behaviour.get_webhook_endpoint!/2.

Link to this function

get_webhook_notification(id, opts \\ [])

View Source

Specs

get_webhook_notification(binary(), keyword()) ::
  CaptainHook.WebhookNotifications.WebhookNotification.t() | nil

Callback implementation for CaptainHook.Behaviour.get_webhook_notification/2.

Link to this function

get_webhook_notification!(id, opts \\ [])

View Source

Specs

Callback implementation for CaptainHook.Behaviour.get_webhook_notification!/2.

Link to this function

list_webhook_conversations(opts \\ [])

View Source

Specs

list_webhook_conversations(keyword()) :: %{
  data: [CaptainHook.WebhookConversations.WebhookConversation.t()],
  total: integer()
}

Callback implementation for CaptainHook.Behaviour.list_webhook_conversations/1.

Link to this function

list_webhook_endpoints(opts \\ [])

View Source

Specs

list_webhook_endpoints(keyword()) :: [
  CaptainHook.WebhookEndpoints.WebhookEndpoint.t()
]

Callback implementation for CaptainHook.Behaviour.list_webhook_endpoints/1.

Link to this function

list_webhook_notifications(opts \\ [])

View Source

Specs

list_webhook_notifications(keyword()) :: %{
  data: [CaptainHook.WebhookNotifications.WebhookNotification.t()],
  total: integer()
}

Callback implementation for CaptainHook.Behaviour.list_webhook_notifications/1.

Link to this function

notify(webhook, livemode?, notification_type, data, opts \\ [])

View Source

Specs

Callback implementation for CaptainHook.Behaviour.notify/5.

Link to this function

roll_webhook_endpoint_secret(webhook_endpoint, expires_at \\ DateTime.utc_now())

View Source

Specs

roll_webhook_endpoint_secret(
  CaptainHook.WebhookEndpoints.WebhookEndpoint.t(),
  DateTime.t()
) :: {:ok, Secrets.WebhookEndpointSecret.t()} | {:error, Ecto.Changeset.t()}

Callback implementation for CaptainHook.Behaviour.roll_webhook_endpoint_secret/2.

Link to this function

send_webhook_notification(webhook_endpoint, webhook_notification)

View Source

Specs

Callback implementation for CaptainHook.Behaviour.send_webhook_notification/2.

Link to this function

update_webhook_endpoint(webhook_endpoint, attrs)

View Source

Specs

Callback implementation for CaptainHook.Behaviour.update_webhook_endpoint/2.