java.lang.Object
com.hedera.hashgraph.sdk.AssessedCustomFee
A custom transfer fee that was assessed during the handling of a CryptoTransfer.
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal longThe number of units assessed for the feefinal @Nullable AccountIdThe account to receive the assessed feeThe account(s) whose final balances would have been higher in the absence of this assessed feefinal @Nullable TokenIdThe denomination of the fee; taken as hbar if left unset -
Constructor Summary
ConstructorsConstructorDescriptionAssessedCustomFee(long amount, @Nullable TokenId tokenId, @Nullable AccountId feeCollectorAccountId, List<AccountId> payerAccountIdList) -
Method Summary
Modifier and TypeMethodDescriptionstatic AssessedCustomFeefromBytes(byte[] bytes) Convert a byte array into an assessed custom fee object.(package private) static AssessedCustomFeefromProtobuf(AssessedCustomFee assessedCustomFee) Convert the protobuf object to an assessed custom fee object.byte[]toBytes()Create a byte array representation.(package private) com.google.gson.JsonObjectBuild a JSON representation of this assessed custom fee(package private) AssessedCustomFeeCreate the protobuf representation.toString()
-
Field Details
-
amount
public final long amountThe number of units assessed for the fee -
tokenId
The denomination of the fee; taken as hbar if left unset -
feeCollectorAccountId
The account to receive the assessed fee -
payerAccountIdList
The account(s) whose final balances would have been higher in the absence of this assessed fee
-
-
Constructor Details
-
AssessedCustomFee
-
-
Method Details
-
fromProtobuf
Convert the protobuf object to an assessed custom fee object.- Parameters:
assessedCustomFee- protobuf response object- Returns:
- the converted assessed custom fee object
-
fromBytes
public static AssessedCustomFee fromBytes(byte[] bytes) throws com.google.protobuf.InvalidProtocolBufferException Convert a byte array into an assessed custom fee object.- Parameters:
bytes- the byte array- Returns:
- the converted assessed custom fee object
- Throws:
com.google.protobuf.InvalidProtocolBufferException- when there is an issue with the protobuf
-
toJsonObject
com.google.gson.JsonObject toJsonObject()Build a JSON representation of this assessed custom fee- Returns:
- the JSON object
-
toString
-
toProtobuf
AssessedCustomFee toProtobuf()Create the protobuf representation.- Returns:
AssessedCustomFee
-
toBytes
public byte[] toBytes()Create a byte array representation.- Returns:
- the converted assessed custom fees
-