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

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

    • Method Detail

      • parse

         final Balance parse(String payload)

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

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

        The json string parsed into a concrete Balance implementation.

      • create

         final Balance create(String from, BalanceData data, String protocol)

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

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

        Balance instance.