TreasuryPrime.AccountLock (TreasuryPrime v1.0.0)

Copy Markdown View Source

Read-only history of lock/unlock events for accounts. To actually lock or unlock an account, use TreasuryPrime.Account.lock/3 and TreasuryPrime.Account.unlock/2 (which PATCH the account itself) — this resource only lets you list/inspect what happened, e.g. for an audit trail.

Summary

Functions

Fetches a single account lock event by id.

Lists lock/unlock history.

Types

t()

@type t() :: %TreasuryPrime.AccountLock{
  account_id: String.t() | nil,
  additional_context: String.t() | nil,
  created_at: String.t() | nil,
  id: String.t() | nil,
  locked: boolean() | nil,
  reason: String.t() | nil,
  updated_at: String.t() | nil
}

Functions

get(client, id)

@spec get(TreasuryPrime.Client.t(), String.t()) ::
  {:ok, t()} | {:error, TreasuryPrime.Error.t()}

Fetches a single account lock event by id.

get!(client, id)

@spec get!(TreasuryPrime.Client.t(), String.t()) :: t()

list(client, params \\ %{})

@spec list(TreasuryPrime.Client.t(), map()) ::
  {:ok, TreasuryPrime.Page.t()} | {:error, TreasuryPrime.Error.t()}

Lists lock/unlock history.

Filterable params

account_id.

list!(client, params \\ %{})