Webhook configuration and delivery inspection.
Endpoint secret verification lives in CorvoNfse.Webhooks.
CorvoNfse.Resources.Webhooks.create(client, %{
url: "https://example.com/hooks/corvo",
events: ["nfse.invoice.authorized"]
})
Summary
Functions
Creates a webhook config (POST /v1/webhooks).
Lists webhook configs (GET /v1/webhooks).
Deletes a webhook config (DELETE /v1/webhooks/:id).
Sends a webhook.test event (POST /v1/webhooks/:id/test).
Types
@type list_option() :: {:limit, pos_integer()} | {:cursor, String.t()}
Functions
@spec create(CorvoNfse.Client.t(), CorvoNfse.Types.Webhook.create_params()) :: {:ok, map()} | {:error, CorvoNfse.Error.t()}
Creates a webhook config (POST /v1/webhooks).
The response includes the endpoint secret used to verify signatures -
store it before discarding the result.
@spec list(CorvoNfse.Client.t(), [list_option()]) :: {:ok, CorvoNfse.Types.Common.page()} | {:error, CorvoNfse.Error.t()}
Lists webhook configs (GET /v1/webhooks).
@spec remove(CorvoNfse.Client.t(), String.t()) :: {:ok, map()} | {:error, CorvoNfse.Error.t()}
Deletes a webhook config (DELETE /v1/webhooks/:id).
@spec test(CorvoNfse.Client.t(), String.t()) :: {:ok, map()} | {:error, CorvoNfse.Error.t()}
Sends a webhook.test event (POST /v1/webhooks/:id/test).