Object Order.Companion

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final Order create(String to, String from, String exchangeId, String protocol, String externalId) Creates a new Order message, autopopulating the id, creation time, and message kind.
      final Order parse(String payload) Takes an existing Order in the form of a json string and parses it into an Order object.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • create

         final Order create(String to, String from, String exchangeId, String protocol, String externalId)

        Creates a new Order message, 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.
        protocol - version of the tbdex protocol.
        externalId - external reference for the order.
        Returns:

        Order instance.

      • parse

         final Order parse(String payload)

        Takes an existing Order in the form of a json string and parses it into an Order object. Validates object structure and performs an integrity check using the message signature.

        Parameters:
        payload - The Order as a json string.
        Returns:

        The json string parsed into an Order