Package tbdex.sdk.protocol.models
Object Quote.Companion
-
- All Implemented Interfaces:
public class Quote.Companion
-
-
Field Summary
Fields Modifier and Type Field Description public final static Quote.CompanionINSTANCE
-
Method Summary
Modifier and Type Method Description final Quotecreate(String to, String from, String exchangeId, QuoteData quoteData, String protocol, String externalId)Creates a new Quotemessage, autopopulating the id, creation time, and message kind.final Quoteparse(String payload)Takes an existing Quote in the form of a json string and parses it into a Quote object. -
-
Method Detail
-
create
final Quote create(String to, String from, String exchangeId, QuoteData quoteData, String protocol, String externalId)
Creates a new
Quotemessage, 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.quoteData- Specific parameters relevant to a Quote.protocol- version of the tbdex protocol.externalId- external reference for the Quote.- Returns:
Quote instance.
-
parse
final Quote parse(String payload)
Takes an existing Quote in the form of a json string and parses it into a Quote object. Validates object structure and performs an integrity check using the message signature.
- Parameters:
payload- The Quote as a json string.- Returns:
The json string parsed into a Quote
-
-
-
-