Mercury.Transaction (mercury_client v1.0.0)

Copy Markdown View Source

A Mercury transaction (a payment, deposit, fee, or transfer).

Compound nested fields that don't have their own resource module are grouped under extra (keeping their original camelCase API keys) rather than as individual top-level struct fields — Elixir structs with 32 or more fields change their internal BEAM representation, so keeping the struct under that threshold avoids the extra memory overhead. extra holds: "glAllocations", "attachments", "relatedTransactions", "categoryData", "merchant", "currencyExchangeInfo", "details" — consult the Mercury API reference for their shape.

Summary

Types

t()

@type t() :: %Mercury.Transaction{
  account_id: String.t(),
  amount: float(),
  bank_description: String.t() | nil,
  check_number: String.t() | nil,
  compliant_with_receipt_policy: boolean(),
  counterparty_id: String.t() | nil,
  counterparty_name: String.t() | nil,
  counterparty_nickname: String.t() | nil,
  created_at: DateTime.t() | nil,
  credit_account_period_id: String.t() | nil,
  dashboard_link: String.t(),
  estimated_delivery_date: DateTime.t() | nil,
  external_memo: String.t() | nil,
  extra: map(),
  failed_at: DateTime.t() | nil,
  fee_id: String.t() | nil,
  has_generated_receipt: boolean(),
  id: String.t(),
  kind: String.t(),
  mercury_category: String.t() | nil,
  note: String.t() | nil,
  posted_at: DateTime.t() | nil,
  reason_for_failure: String.t() | nil,
  request_id: String.t() | nil,
  status: String.t(),
  tracking_number: String.t() | nil
}