Package tbdex.sdk.resources
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 Balancecreate(String from, BalanceData data, String protocol)Creates a new Balance resource. final BalancefromJsonString(String json)Parses a Balance resource from a JSON string. -
-
Method Detail
-
create
final Balance create(String from, BalanceData data, String protocol)
Creates a new Balance resource.
- Parameters:
from- The DID of the sender (the PFI).data- The balance data containing the currency code and available balance.protocol- Optional protocol version.- Returns:
The newly created Balance resource.
-
fromJsonString
final Balance fromJsonString(String json)
Parses a Balance resource from a JSON string.
- Parameters:
json- The JSON string representing the Balance resource.- Returns:
The deserialized Balance resource.
-
-
-
-