fromJson

fun fromJson(json: JsonObject): Sep08PostTransactionResponse

Parses a JSON response from the SEP-8 approval server into the appropriate Sep08PostTransactionResponse variant.

The JSON must contain a status field with one of the recognized values: "success", "revised", "pending", "action_required", or "rejected". Required fields are validated based on the status type.

Return

The parsed response as the appropriate sealed class variant

Parameters

json

The JSON object returned by the approval server

Throws

if the status field is missing or unrecognized, or if required fields for the given status are missing