Response

sealed class Response<T>

Response from a YAXI Open Banking service.

The response either carries a final, authenticated Result of type T or one of three interrupts that require additional user interaction: a Dialog, a Redirect, or a RedirectHandle. Service methods on RoutexClient specialize T to the per-service result type (e.g. AccountsResult, BalancesResult) so callers get compile-time access to the decoded payload via Result.authenticated.decodeUnverified().

Inheritors

Types

Link copied to clipboard
data class Dialog<T>(val dialog: Dialog) : Response<T>

Interrupt: user dialog that must be presented before the flow can continue.

Link copied to clipboard
data class Redirect<T>(val redirect: Redirect) : Response<T>

Interrupt: fully-formed user redirect to complete the flow in the user agent.

Link copied to clipboard
data class RedirectHandle<T>(val redirectHandle: RedirectHandle) : Response<T>

Interrupt: incomplete user redirect. A final redirect URI must be registered using the handle to receive the URL to send the user to.

Link copied to clipboard
class Result<T> : Response<T>

Final, authenticated service result.