View Source Webhoox.Adapter behaviour (Webhoox v0.1.1)

Behaviour for handling webhooks

Link to this section Summary

Link to this section Callbacks

Link to this callback

handle_webhook(conn, handler, opts)

View Source
@callback handle_webhook(conn :: Plug.Conn.t(), handler :: Atom.t(), opts :: []) ::
  {:ok, conn :: Plug.Conn.t()}
  | {:ok, conn :: Plug.Conn.t(), map()}
  | {:error, conn :: Plug.Conn.t(), String.t()}
  | {:error, conn :: Plug.Conn.t(), String.t(), map()}
Link to this callback

normalize_params(payload)

View Source
@callback normalize_params(payload :: any()) :: struct() | nil