PolarExpress.Services.WebhooksService (polar_express v0.1.5)

Copy Markdown View Source

Webhooks

Webhooks API operations.

Summary

Functions

create_webhook_endpoint(client, params \\ %{}, opts \\ [])

@spec create_webhook_endpoint(PolarExpress.Client.t(), map(), keyword()) ::
  {:ok, PolarExpress.Schemas.WebhookEndpoint.t()}
  | {:error, PolarExpress.Error.t()}

Create Webhook Endpoint

Create a webhook endpoint.

Scopes: webhooks:write

See PolarExpress.Params.WebhooksCreateWebhookEndpointParams for parameter details.

delete_webhook_endpoint(client, id, params \\ %{}, opts \\ [])

@spec delete_webhook_endpoint(PolarExpress.Client.t(), String.t(), map(), keyword()) ::
  {:ok, term()} | {:error, PolarExpress.Error.t()}

Delete Webhook Endpoint

Delete a webhook endpoint.

Scopes: webhooks:write

See PolarExpress.Params.WebhooksDeleteWebhookEndpointParams for parameter details.

get_webhook_endpoint(client, id, params \\ %{}, opts \\ [])

@spec get_webhook_endpoint(PolarExpress.Client.t(), String.t(), map(), keyword()) ::
  {:ok, PolarExpress.Schemas.WebhookEndpoint.t()}
  | {:error, PolarExpress.Error.t()}

Get Webhook Endpoint

Get a webhook endpoint by ID.

Scopes: webhooks:read webhooks:write

See PolarExpress.Params.WebhooksGetWebhookEndpointParams for parameter details.

list_webhook_deliveries(client, params \\ %{}, opts \\ [])

@spec list_webhook_deliveries(PolarExpress.Client.t(), map(), keyword()) ::
  {:ok, PolarExpress.ListObject.t()} | {:error, PolarExpress.Error.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

See PolarExpress.Params.WebhooksListWebhookDeliveriesParams for parameter details.

list_webhook_endpoints(client, params \\ %{}, opts \\ [])

@spec list_webhook_endpoints(PolarExpress.Client.t(), map(), keyword()) ::
  {:ok, PolarExpress.ListObject.t()} | {:error, PolarExpress.Error.t()}

List Webhook Endpoints

List webhook endpoints.

Scopes: webhooks:read webhooks:write

See PolarExpress.Params.WebhooksListWebhookEndpointsParams for parameter details.

redeliver_webhook_event(client, id, params \\ %{}, opts \\ [])

@spec redeliver_webhook_event(PolarExpress.Client.t(), String.t(), map(), keyword()) ::
  {:ok, term()} | {:error, PolarExpress.Error.t()}

Redeliver Webhook Event

Schedule the re-delivery of a webhook event.

Scopes: webhooks:write

See PolarExpress.Params.WebhooksRedeliverWebhookEventParams for parameter details.

reset_webhook_endpoint_secret(client, id, params \\ %{}, opts \\ [])

@spec reset_webhook_endpoint_secret(
  PolarExpress.Client.t(),
  String.t(),
  map(),
  keyword()
) ::
  {:ok, PolarExpress.Schemas.WebhookEndpoint.t()}
  | {:error, PolarExpress.Error.t()}

Reset Webhook Endpoint Secret

Regenerate a webhook endpoint secret.

Scopes: webhooks:write

See PolarExpress.Params.WebhooksResetWebhookEndpointSecretParams for parameter details.

update_webhook_endpoint(client, id, params \\ %{}, opts \\ [])

@spec update_webhook_endpoint(PolarExpress.Client.t(), String.t(), map(), keyword()) ::
  {:ok, PolarExpress.Schemas.WebhookEndpoint.t()}
  | {:error, PolarExpress.Error.t()}

Update Webhook Endpoint

Update a webhook endpoint.

Scopes: webhooks:write

See PolarExpress.Params.WebhooksUpdateWebhookEndpointParams for parameter details.