Package tbdex.sdk.resources
Class Balance
-
- All Implemented Interfaces:
public final class BalanceRepresents a Balance resource in the tbDEX protocol.
A Balance resource communicates the amounts of each currency held by a PFI on behalf of a customer.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classBalance.Companion
-
Field Summary
Fields Modifier and Type Field Description private final ResourceMetadatametadataprivate final BalanceDatadataprivate final Stringsignaturepublic final static Balance.CompanionCompanion
-
Method Summary
Modifier and Type Method Description final ResourceMetadatagetMetadata()Metadata about the resource, including the sender and resource type. final BalanceDatagetData()The balance data, including currency code and available balance. final StringgetSignature()The signature verifying the authenticity and integrity of the Balance resource. final StringtoJsonString()Serializes the Balance resource to a JSON string. final Unitsign(BearerDid bearerDid)Signs the Balance resource using the provided Bearer DID. final Unitverify()Verifies the Balance resource's signature and validity. -
-
Method Detail
-
getMetadata
final ResourceMetadata getMetadata()
Metadata about the resource, including the sender and resource type.
-
getData
final BalanceData getData()
The balance data, including currency code and available balance.
-
getSignature
final String getSignature()
The signature verifying the authenticity and integrity of the Balance resource.
-
toJsonString
final String toJsonString()
Serializes the Balance resource to a JSON string.
- Returns:
The serialized JSON string of the Balance resource.
-
sign
final Unit sign(BearerDid bearerDid)
Signs the Balance resource using the provided Bearer DID.
- Parameters:
bearerDid- The Bearer DID used to sign the Balance resource.
-
-
-
-