java.lang.Object
com.broadleafcommerce.pricing.domain.Fee
All Implemented Interfaces:
com.broadleafcommerce.money.CurrencyConsumer, Serializable, javax.money.CurrencySupplier

public class Fee extends Object implements Serializable, javax.money.CurrencySupplier, com.broadleafcommerce.money.CurrencyConsumer
Represents a fee to be applied to the cart pricing.
Since:
Pricing Services 2.2.0, Release Train 2.3.0
Author:
Julia Lopez-Pozas (jlopezpozas)
See Also:
  • Constructor Details

    • Fee

      public Fee()
  • Method Details

    • getId

      public String getId()
    • getLabel

      public String getLabel()
      The label of the fee to be displayed as the cart item name on the cart.
    • getFeeCode

      public String getFeeCode()
      The unique code for the fee.
    • getActiveStartDate

      public Instant getActiveStartDate()
      The date from which the fee should be active.
    • getActiveEndDate

      public Instant getActiveEndDate()
      The date where the fee stops being active.
    • getCurrency

      public javax.money.CurrencyUnit getCurrency()
      The currency of this fee.
      Specified by:
      getCurrency in interface javax.money.CurrencySupplier
    • getFeeCalculationMethod

      public String getFeeCalculationMethod()
      Where to apply the fee during cart pricing. By default, is applied onto the Cart subtotal.
    • getFeeCalculationOperation

      public String getFeeCalculationOperation()
      How to calculate the fee to be applied onto the cart. By default, is calculated by getting a percentage based on the cart subtotal.
    • getFixedAmount

      @Nullable public javax.money.MonetaryAmount getFixedAmount()
      The fixed amount of the fee to be applied. Only populated when feeCalculationOperation is FeeCalculationOperation.FIXED_AMOUNT.
    • getRate

      @Nullable public BigDecimal getRate()
      The percentage of the cart subtotal to be used to determine the fee to be applied. Only populated when feeCalculationOperation is FeeCalculationOperation.RATE.
    • getTaxCode

      public String getTaxCode()
      The tax code identifier for this fee.
    • getPriority

      public int getPriority()
      The priority with which to apply the fee onto the cart pricing.
    • isApplyBeforeDiscounts

      public boolean isApplyBeforeDiscounts()
      Whether to apply the fee before or after offers/discounts are applied onto the cart.
    • isRefundable

      public boolean isRefundable()
      Whether the fee is refundable.
    • setId

      public void setId(String id)
    • setLabel

      public void setLabel(String label)
      The label of the fee to be displayed as the cart item name on the cart.
    • setFeeCode

      public void setFeeCode(String feeCode)
      The unique code for the fee.
    • setActiveStartDate

      public void setActiveStartDate(Instant activeStartDate)
      The date from which the fee should be active.
    • setActiveEndDate

      public void setActiveEndDate(Instant activeEndDate)
      The date where the fee stops being active.
    • setCurrency

      public void setCurrency(javax.money.CurrencyUnit currency)
      The currency of this fee.
      Specified by:
      setCurrency in interface com.broadleafcommerce.money.CurrencyConsumer
    • setFeeCalculationMethod

      public void setFeeCalculationMethod(String feeCalculationMethod)
      Where to apply the fee during cart pricing. By default, is applied onto the Cart subtotal.
    • setFeeCalculationOperation

      public void setFeeCalculationOperation(String feeCalculationOperation)
      How to calculate the fee to be applied onto the cart. By default, is calculated by getting a percentage based on the cart subtotal.
    • setFixedAmount

      public void setFixedAmount(@Nullable javax.money.MonetaryAmount fixedAmount)
      The fixed amount of the fee to be applied. Only populated when feeCalculationOperation is FeeCalculationOperation.FIXED_AMOUNT.
    • setRate

      public void setRate(@Nullable BigDecimal rate)
      The percentage of the cart subtotal to be used to determine the fee to be applied. Only populated when feeCalculationOperation is FeeCalculationOperation.RATE.
    • setTaxCode

      public void setTaxCode(String taxCode)
      The tax code identifier for this fee.
    • setPriority

      public void setPriority(int priority)
      The priority with which to apply the fee onto the cart pricing.
    • setApplyBeforeDiscounts

      public void setApplyBeforeDiscounts(boolean applyBeforeDiscounts)
      Whether to apply the fee before or after offers/discounts are applied onto the cart.
    • setRefundable

      public void setRefundable(boolean refundable)
      Whether the fee is refundable.
    • equals

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

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object