Object Offering.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 Offering create(String from, OfferingData data, String protocol) Creates a new Offering resource, autopopulating the id, creation/updated time, and resource kind.
      final Offering parse(String payload) Takes an existing Offering in the form of a json string and parses it into an Offering 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 Offering create(String from, OfferingData data, String protocol)

        Creates a new Offering resource, autopopulating the id, creation/updated time, and resource kind.

        Parameters:
        from - DID of the PFI.
        data - Specific parameters relevant to an Offering.
        protocol - version of the tbdex protocol.
        Returns:

        Offering instance.

      • parse

         final Offering parse(String payload)

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

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

        The json string parsed into an Offering