Class FeeExtra

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

public final class FeeExtra extends Object
The extra fee charged for the transaction.

Represents additional fees that apply for specific fee components, such as charges beyond included amounts.

  • Constructor Summary

    Constructors
    Constructor
    Description
    FeeExtra(long charged, long count, long feePerUnit, long included, String name, long subtotal)
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    (package private) static FeeExtra
    fromJson(com.google.gson.JsonObject feeExtra)
    Create a FeeExtra from a JSON object returned by the mirror node REST API.
    long
    Extract the charged count of items.
    long
    Extract the actual count of items.
    long
    Extract the fee price per unit in tinycents.
    long
    Extract the count included for free.
    Extract the unique name of this extra fee.
    long
    Extract the subtotal in tinycents.
    int
     
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • FeeExtra

      FeeExtra(long charged, long count, long feePerUnit, long included, @Nullable String name, long subtotal)
      Constructor.
      Parameters:
      charged - the charged count of items
      count - the actual count of items
      feePerUnit - the fee price per unit in tinycents
      included - the count included for free
      name - the unique name of this extra fee
      subtotal - the subtotal in tinycents
  • Method Details

    • fromJson

      static FeeExtra fromJson(com.google.gson.JsonObject feeExtra)
      Create a FeeExtra from a JSON object returned by the mirror node REST API.
      Parameters:
      feeExtra - the JSON object
      Returns:
      the new FeeExtra
    • getCharged

      public long getCharged()
      Extract the charged count of items.
      Returns:
      the charged count of items
    • getCount

      public long getCount()
      Extract the actual count of items.
      Returns:
      the actual count of items
    • getFeePerUnit

      public long getFeePerUnit()
      Extract the fee price per unit in tinycents.
      Returns:
      the fee price per unit in tinycents
    • getIncluded

      public long getIncluded()
      Extract the count included for free.
      Returns:
      the count included for free
    • getName

      @Nullable public String getName()
      Extract the unique name of this extra fee.
      Returns:
      the unique name of this extra fee, or null if not set
    • getSubtotal

      public long getSubtotal()
      Extract the subtotal in tinycents.
      Returns:
      the subtotal in tinycents
    • toString

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

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object