Package tbdex.sdk.protocol.models
Object Balance.Companion
-
- All Implemented Interfaces:
public class Balance.Companion
-
-
Field Summary
Fields Modifier and Type Field Description public final static Balance.CompanionINSTANCE
-
Method Summary
Modifier and Type Method Description final Balanceparse(String payload)Takes an existing Balance in the form of a json string and parses it into a Balance object. final Balancecreate(String from, BalanceData data, String protocol)Creates a new Balanceresource, autopopulating the id, creation/updated time, and resource kind.-
-
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
Balanceresource, 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.
-
-
-
-