Incoming-payment permissions in a grant's access-item union.
Required type is incoming-payment; required actions is an array of unique
strings from create, complete, read, read-all, list and list-all. Empty actions
are allowed by the pinned schema. Optional identifier is an absolute URI:
omission becomes nil, while explicit JSON null is invalid. Its spelling is
preserved without HTTP request-target validation or payment-pointer conversion.
The enclosing access-item union forbids extra fields. This grant-facing type enforces that rule even though the standalone access-incoming branch does not repeat it. Inspection omits the identifier; explicit map/JSON export includes it. Decoding permissions does not obtain a grant or authorize a network request.
Struct literals can bypass validation. Call validate/1 after constructing or
modifying a struct; to_map/1 converts its shape without validating it.
Summary
Functions
Decodes an incoming-payment grant access entry using the union's field rules.
Converts to protocol fields, omitting a nil identifier, without validating.
Validates a struct, treating a nil identifier as omitted.
Types
Functions
@spec from_map(map()) :: {:ok, t()} | {:error, OpenPayments.Error.t()}
Decodes an incoming-payment grant access entry using the union's field rules.
Converts to protocol fields, omitting a nil identifier, without validating.
@spec validate(t()) :: :ok | {:error, OpenPayments.Error.t()}
Validates a struct, treating a nil identifier as omitted.