Packages
monzo_client
1.0.0
A complete, production-grade Elixir client for the Monzo API: OAuth2, Accounts, Balance, Pots, Transactions, Feed Items, Attachments, Transaction Receipts, and Webhooks. Zero required dependencies.
Current section
Files
Jump to
Current section
Files
lib/monzo/webhook.ex
defmodule Monzo.Webhook do
@moduledoc "A registered callback URL for an account."
defmodule Event do
@moduledoc "An inbound webhook delivery."
@type t :: %__MODULE__{
type: String.t(),
data: Monzo.Transaction.t()
}
defstruct [:type, :data]
end
@type t :: %__MODULE__{
id: String.t(),
account_id: String.t(),
url: String.t()
}
defstruct [:id, :account_id, :url]
@doc false
@spec from_json(map()) :: t()
def from_json(json) do
%__MODULE__{id: json["id"], account_id: json["account_id"], url: json["url"]}
end
end