Class AssessedCustomFee

java.lang.Object
com.hedera.hashgraph.sdk.AssessedCustomFee

public class AssessedCustomFee extends Object
A custom transfer fee that was assessed during the handling of a CryptoTransfer.
  • Field Details

    • amount

      public final long amount
      The number of units assessed for the fee
    • tokenId

      @Nullable public final TokenId tokenId
      The denomination of the fee; taken as hbar if left unset
    • feeCollectorAccountId

      @Nullable public final AccountId feeCollectorAccountId
      The account to receive the assessed fee
    • payerAccountIdList

      public final List<AccountId> payerAccountIdList
      The account(s) whose final balances would have been higher in the absence of this assessed fee
  • Constructor Details

    • AssessedCustomFee

      AssessedCustomFee(long amount, @Nullable TokenId tokenId, @Nullable AccountId feeCollectorAccountId, List<AccountId> payerAccountIdList)
  • Method Details

    • fromProtobuf

      static AssessedCustomFee fromProtobuf(AssessedCustomFee assessedCustomFee)
      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
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toProtobuf

      AssessedCustomFee toProtobuf()
      Create the protobuf representation.
      Returns:
      AssessedCustomFee
    • toBytes

      public byte[] toBytes()
      Create a byte array representation.
      Returns:
      the converted assessed custom fees