RoutexTicketIssuer

Issues signed JWT tickets for the YAXI routex services.

One method per service, each returning the matching typed Ticket subclass.

Instances are immutable and safe to share across threads / coroutines.

val issuer = RoutexTicketIssuer(apiKeyId = "api-key-2eeba71f-...", base64Secret = System.getenv("YAXI_API_KEY_SECRET"))
val ticket: Ticket.Accounts = issuer.accounts()

Constructors

Link copied to clipboard
constructor(apiKeyId: String, apiKeySecret: ByteArray, ttl: Duration = DEFAULT_TTL)
constructor(apiKeyId: String, base64Secret: String, ttl: Duration = DEFAULT_TTL)

Convenience constructor that decodes base64Secret as standard Base64.

Functions

Link copied to clipboard
fun accounts(ticketId: Uuid = Uuid.random(), ttl: Duration? = null): Ticket.Accounts

Issue a ticket for the accounts service.

Link copied to clipboard
fun balances(ticketId: Uuid = Uuid.random(), ttl: Duration? = null): Ticket.Balances

Issue a ticket for the balances service.

Link copied to clipboard
fun collectPayment(amount: Amount, creditorAccount: AccountIdentifier, creditorName: String, remittance: String, instant: Boolean? = null, fields: List<CollectPaymentField>? = null, ticketId: Uuid = Uuid.random(), ttl: Duration? = null): Ticket.CollectPayment

Issue a ticket for the collect-payment service.

Link copied to clipboard
fun transactions(account: AccountReference, range: Range, webhook: String? = null, ticketId: Uuid = Uuid.random(), ttl: Duration? = null): Ticket.Transactions

Issue a ticket for the transactions service against account.

Link copied to clipboard
fun transfer(ticketId: Uuid = Uuid.random(), ttl: Duration? = null): Ticket.Transfer

Issue a ticket for the transfer service.