Packages

A complete, production-grade Elixir client for the Mercury Banking API (accounts, transactions, recipients, invoices, payments, treasury, webhooks, and more), with typed errors, retry with backoff, and lazy auto-paginating streams.

Current section

Files

Jump to
mercury_client lib mercury support.ex
Raw

lib/mercury/support.ex

defmodule Mercury.Support do
@moduledoc false
# Shared by every resource module's `!`-suffixed functions.
@spec bang!(outcome :: :ok | {:ok, result} | {:error, Exception.t()}) :: result | no_return()
when result: any()
def bang!(:ok), do: :ok
def bang!({:ok, value}), do: value
def bang!({:error, error}), do: raise(error)
end