Package tbdex.sdk.protocol.models
Object Close.Companion
-
- All Implemented Interfaces:
public class Close.Companion
-
-
Field Summary
Fields Modifier and Type Field Description public final static Close.CompanionINSTANCE
-
Method Summary
Modifier and Type Method Description final Closecreate(String to, String from, String exchangeId, CloseData closeData, String protocol, String externalId)Creates a new Closemessage, autopopulating the id, creation time, and message kind.final Closeparse(String payload)Takes an existing Close in the form of a json string and parses it into a Close object. -
-
Method Detail
-
create
final Close create(String to, String from, String exchangeId, CloseData closeData, String protocol, String externalId)
Creates a new
Closemessage, autopopulating the id, creation time, and message kind.- Parameters:
to- DID that the message is being sent to.from- DID of the sender.exchangeId- ID of the exchange.closeData- Specific parameters relevant to a Close.protocol- version of the tbdex protocol.externalId- external reference for the Close.- Returns:
Close instance.
-
parse
final Close parse(String payload)
Takes an existing Close in the form of a json string and parses it into a Close object. Validates object structure and performs an integrity check using the message signature.
- Parameters:
payload- The Close as a json string.- Returns:
The json string parsed into a Close
-
-
-
-