OpenPayments. Types. IncomingPaymentPaginationResult
(open_payments_elixir v1.0.0)
Copy Markdown
View Source
One page of detailed incoming-payment results and typed pagination metadata.
Required pagination becomes PageInfo; required result becomes an ordered list
of IncomingPayment structs, including an empty list. Requiring both fields
matches Node's public PaginationResult contract and is stricter than the pinned
response schema, which declares the properties without marking them required.
Missing or null fields are invalid and are never filled with defaults.
The list item schema adds additionalProperties false beside an allOf reference.
As with completion, this codec interprets that restriction over the combined
detailed fields, rejecting methods and other unknown item fields. Arbitrary
metadata and permitted nested amount extensions remain valid; the standalone
IncomingPayment codec continues preserving its own extensions. Additional
JSON fields on the page wrapper are retained in extensions.
Item order and duplicates are preserved. Page flags/cursors are not compared with items, IDs, counts or ordering. Both completed and incomplete payments are valid. Asset, amount and time consistency checks belong to resource operations. This codec makes no HTTP requests or automatic page traversal.
Inspection omits all payload data. Explicit map/JSON exports include cursors,
metadata and extensions. Errors contain safe indexed paths without rejected
values. 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 typed payment, item field restrictions and extensions.
Types
@type t() :: %OpenPayments.Types.IncomingPaymentPaginationResult{ extensions: %{optional(String.t()) => term()}, pagination: OpenPayments.Types.PageInfo.t(), result: [OpenPayments.Types.IncomingPayment.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 typed payment, item field restrictions and extensions.