Moov.Webhook.Event (Moov v1.0.0)

Copy Markdown View Source

A parsed webhook event.

data is intentionally left as a plain, camelCase-keyed map (or its to_snake_case/0-converted form, see Moov.Webhook.Event.to_snake_case/1) since its shape depends entirely on type. See https://docs.moov.io/guides/webhooks/webhook-events/ for the schema of every event type Moov currently sends.

Summary

Functions

Returns a copy of the event with data's keys converted to snake_case strings.

Types

t()

@type t() :: %Moov.Webhook.Event{
  created_on: String.t() | nil,
  data: map(),
  id: String.t() | nil,
  type: String.t()
}

Functions

to_snake_case(event)

@spec to_snake_case(t()) :: t()

Returns a copy of the event with data's keys converted to snake_case strings.