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