Polarex.Webhooks (Polarex v0.2.3)

View Source

Provides API endpoints related to webhooks

Summary

Functions

webhooks_create_webhook_endpoint(body, opts \\ [])

@spec webhooks_create_webhook_endpoint(
  Polarex.WebhookEndpointCreate.t(),
  keyword()
) ::
  {:ok, Polarex.WebhookEndpoint.t()} | {:error, Polarex.HTTPValidationError.t()}

Create Webhook Endpoint

Create a webhook endpoint.

Scopes: webhooks:write

webhooks_delete_webhook_endpoint(id, opts \\ [])

@spec webhooks_delete_webhook_endpoint(
  String.t(),
  keyword()
) ::
  :ok | {:error, Polarex.HTTPValidationError.t() | Polarex.ResourceNotFound.t()}

Delete Webhook Endpoint

Delete a webhook endpoint.

Scopes: webhooks:write

webhooks_get_webhook_endpoint(id, opts \\ [])

@spec webhooks_get_webhook_endpoint(
  String.t(),
  keyword()
) ::
  {:ok, Polarex.WebhookEndpoint.t()}
  | {:error, Polarex.HTTPValidationError.t() | Polarex.ResourceNotFound.t()}

Get Webhook Endpoint

Get a webhook endpoint by ID.

Scopes: webhooks:read webhooks:write

webhooks_list_webhook_deliveries(opts \\ [])

@spec webhooks_list_webhook_deliveries(keyword()) ::
  {:ok, Polarex.ListResourceWebhookDelivery.t()}
  | {:error, Polarex.HTTPValidationError.t()}

List Webhook Deliveries

List webhook deliveries.

Deliveries are all the attempts to deliver a webhook event to an endpoint.

Scopes: webhooks:read webhooks:write

Options

  • endpoint_id: Filter by webhook endpoint ID.
  • page: Page number, defaults to 1.
  • limit: Size of a page, defaults to 10. Maximum is 100.

webhooks_list_webhook_endpoints(opts \\ [])

@spec webhooks_list_webhook_endpoints(keyword()) ::
  {:ok, Polarex.ListResourceWebhookEndpoint.t()}
  | {:error, Polarex.HTTPValidationError.t()}

List Webhook Endpoints

List webhook endpoints.

Scopes: webhooks:read webhooks:write

Options

  • organization_id: Filter by organization ID.
  • page: Page number, defaults to 1.
  • limit: Size of a page, defaults to 10. Maximum is 100.

webhooks_redeliver_webhook_event(id, opts \\ [])

@spec webhooks_redeliver_webhook_event(
  String.t(),
  keyword()
) ::
  {:ok, map()}
  | {:error, Polarex.HTTPValidationError.t() | Polarex.ResourceNotFound.t()}

Redeliver Webhook Event

Schedule the re-delivery of a webhook event.

Scopes: webhooks:write

webhooks_update_webhook_endpoint(id, body, opts \\ [])

@spec webhooks_update_webhook_endpoint(
  String.t(),
  Polarex.WebhookEndpointUpdate.t(),
  keyword()
) ::
  {:ok, Polarex.WebhookEndpoint.t()}
  | {:error, Polarex.HTTPValidationError.t() | Polarex.ResourceNotFound.t()}

Update Webhook Endpoint

Update a webhook endpoint.

Scopes: webhooks:write