Polar::Api::Webhooks
API client for webhooks operations
Constants
Constructors
Creates a new Webhooks instance
@param client [Client] The Polar API client instance
Instance methods
Create Webhook Endpoint
Create a webhook endpoint.
Scopes: webhooks:write
Endpoint: POST /v1/webhooks/endpoints
Parameters:
body(required): Request body as Polar::Models::WebhookEndpointCreate
Returns: Polar::Models::WebhookEndpoint
Raises:
ResourceNotFoundErroron 404NotPermittedErroron 403HTTPValidationErroron 422PolarErroron other errors
Delete Webhook Endpoint
Delete a webhook endpoint.
Scopes: webhooks:write
Endpoint: DELETE /v1/webhooks/endpoints/{id}
Parameters:
id(required): The webhook endpoint ID.
Returns: JSON response string
Raises:
ResourceNotFoundErroron 404NotPermittedErroron 403HTTPValidationErroron 422PolarErroron other errors
Get Webhook Endpoint
Get a webhook endpoint by ID.
Scopes: webhooks:read webhooks:write
Endpoint: GET /v1/webhooks/endpoints/{id}
Parameters:
id(required): The webhook endpoint ID.
Returns: Polar::Models::WebhookEndpoint
Raises:
ResourceNotFoundErroron 404NotPermittedErroron 403HTTPValidationErroron 422PolarErroron other errors
List Webhook Deliveries
List webhook deliveries.
Deliveries are all the attempts to deliver a webhook event to an endpoint.
Scopes: webhooks:read webhooks:write
Endpoint: GET /v1/webhooks/deliveries
Parameters:
endpoint_id(optional): Filter by webhook endpoint ID.start_timestamp(optional): Filter deliveries after this timestamp.end_timestamp(optional): Filter deliveries before this timestamp.page(optional): Page number, defaults to 1.limit(optional): Size of a page, defaults to 10. Maximum is 100.
Returns: Polar::Models::ListResource(Polar::Models::WebhookDelivery)
Raises:
ResourceNotFoundErroron 404NotPermittedErroron 403HTTPValidationErroron 422PolarErroron other errors
List Webhook Endpoints
List webhook endpoints.
Scopes: webhooks:read webhooks:write
Endpoint: GET /v1/webhooks/endpoints
Parameters:
organization_id(optional): Filter by organization ID.page(optional): Page number, defaults to 1.limit(optional): Size of a page, defaults to 10. Maximum is 100.
Returns: Polar::Models::ListResource(Polar::Models::WebhookEndpoint)
Raises:
ResourceNotFoundErroron 404NotPermittedErroron 403HTTPValidationErroron 422PolarErroron other errors
Redeliver Webhook Event
Schedule the re-delivery of a webhook event.
Scopes: webhooks:write
Endpoint: POST /v1/webhooks/events/{id}/redeliver
Parameters:
id(required): The webhook event ID.
Returns: JSON response string
Raises:
ResourceNotFoundErroron 404NotPermittedErroron 403HTTPValidationErroron 422PolarErroron other errors
Reset Webhook Endpoint Secret
Regenerate a webhook endpoint secret.
Scopes: webhooks:write
Endpoint: PATCH /v1/webhooks/endpoints/{id}/secret
Parameters:
id(required): The webhook endpoint ID.
Returns: Polar::Models::WebhookEndpoint
Raises:
ResourceNotFoundErroron 404NotPermittedErroron 403HTTPValidationErroron 422PolarErroron other errors
Update Webhook Endpoint
Update a webhook endpoint.
Scopes: webhooks:write
Endpoint: PATCH /v1/webhooks/endpoints/{id}
Parameters:
id(required): The webhook endpoint ID.body(required): Request body as Polar::Models::WebhookEndpointUpdate
Returns: Polar::Models::WebhookEndpoint
Raises:
ResourceNotFoundErroron 404NotPermittedErroron 403HTTPValidationErroron 422PolarErroron other errors