OpenPayments.Types.AccessOutgoing (open_payments_elixir v1.0.0)

Copy Markdown View Source

Outgoing-payment permissions in a grant's access-item union.

Requires type outgoing-payment, unique action strings from create/read/read-all/ list/list-all, and an absolute-URI identifier. Empty actions are permitted. Optional limits and cardAuthorization decode to typed OutgoingLimits and CardAuthorization structs. Omitted fields become nil; explicit null is invalid. The enclosing union forbids extra top-level fields.

Identifier spelling is preserved without request-target policy or pointer conversion. This type does not obtain a grant, process a card or issue payments. Inspection omits the identifier and nested payloads; explicit map/JSON export includes sensitive card and PIN working-key data when present.

Validate manually constructed or modified structs with validate/1; to_map/1 converts shape without validating it.

Summary

Functions

Decodes an outgoing-payment access entry and its optional typed payloads.

Converts to protocol fields, including nested card data, without validating.

Validates required fields and revalidates optional typed payloads.

Types

t()

@type t() :: %OpenPayments.Types.AccessOutgoing{
  actions: [String.t()],
  card_authorization: OpenPayments.Types.CardAuthorization.t() | nil,
  identifier: String.t(),
  limits: OpenPayments.Types.OutgoingLimits.t() | nil,
  type: String.t()
}

Functions

from_map(data)

@spec from_map(map()) :: {:ok, t()} | {:error, OpenPayments.Error.t()}

Decodes an outgoing-payment access entry and its optional typed payloads.

to_map(access)

@spec to_map(t()) :: map()

Converts to protocol fields, including nested card data, without validating.

validate(access)

@spec validate(t()) :: :ok | {:error, OpenPayments.Error.t()}

Validates required fields and revalidates optional typed payloads.