OpenPayments. Types. OutgoingPaymentPaginationResult
(open_payments_elixir v1.0.0)
Copy Markdown
View Source
One page of detailed outgoing-payment results and typed pagination metadata.
Required pagination becomes PageInfo; required result becomes an ordered list
of strict OutgoingPayment structs, including an empty list. Requiring both
fields matches Node's public PaginationResult contract and is stricter than the
pinned wrapper schema, which declares the properties without marking them
required. Missing or null fields are invalid; no defaults are inserted.
Items follow the outgoing-payment schema directly, including three required typed amounts and optional failed, quote_id and metadata. Unknown item fields, including grant spent amounts, are forbidden. Permitted nested amount extensions and metadata are preserved. Additional JSON wrapper fields remain in extensions.
Item order and duplicates are preserved. Flags/cursors are not compared with IDs, items, counts or ordering. Both failed and nonfailed data are valid, with omitted failed remaining nil. Asset, amount and failure-state consistency checks belong to resource operations. This codec makes no requests or page traversal.
Inspection hides all payload data. Explicit map/JSON exports include cursors,
related references, amounts, metadata and extensions. Errors retain safe indexed
paths without rejected values or unknown names. Validate modified structs with
validate/1; to_map/1 converts without validating.
Summary
Functions
Decodes required pagination metadata and every detailed payment in a page.
Exports protocol data, including cursors and metadata, without validating.
Revalidates typed metadata, each strict typed payment and JSON extensions.
Types
@type t() :: %OpenPayments.Types.OutgoingPaymentPaginationResult{ extensions: %{optional(String.t()) => term()}, pagination: OpenPayments.Types.PageInfo.t(), result: [OpenPayments.Types.OutgoingPayment.t()] }
Functions
@spec from_map(map()) :: {:ok, t()} | {:error, OpenPayments.Error.t()}
Decodes required pagination metadata and every detailed payment in a page.
Exports protocol data, including cursors and metadata, without validating.
@spec validate(t()) :: :ok | {:error, OpenPayments.Error.t()}
Revalidates typed metadata, each strict typed payment and JSON extensions.