Class Fee
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanThe date where the fee stops being active.The date from which the fee should be active.javax.money.CurrencyUnitThe currency of this fee.Where to apply the fee during cart pricing.How to calculate the fee to be applied onto the cart.The unique code for the fee.javax.money.MonetaryAmountThe fixed amount of the fee to be applied.getId()getLabel()The label of the fee to be displayed as the cart item name on the cart.intThe priority with which to apply the fee onto the cart pricing.getRate()The percentage of the cart subtotal to be used to determine the fee to be applied.The tax code identifier for this fee.inthashCode()booleanWhether to apply the fee before or after offers/discounts are applied onto the cart.booleanWhether the fee is refundable.voidsetActiveEndDate(Instant activeEndDate) The date where the fee stops being active.voidsetActiveStartDate(Instant activeStartDate) The date from which the fee should be active.voidsetApplyBeforeDiscounts(boolean applyBeforeDiscounts) Whether to apply the fee before or after offers/discounts are applied onto the cart.voidsetCurrency(javax.money.CurrencyUnit currency) The currency of this fee.voidsetFeeCalculationMethod(String feeCalculationMethod) Where to apply the fee during cart pricing.voidsetFeeCalculationOperation(String feeCalculationOperation) How to calculate the fee to be applied onto the cart.voidsetFeeCode(String feeCode) The unique code for the fee.voidsetFixedAmount(javax.money.MonetaryAmount fixedAmount) The fixed amount of the fee to be applied.voidvoidThe label of the fee to be displayed as the cart item name on the cart.voidsetPriority(int priority) The priority with which to apply the fee onto the cart pricing.voidsetRate(BigDecimal rate) The percentage of the cart subtotal to be used to determine the fee to be applied.voidsetRefundable(boolean refundable) Whether the fee is refundable.voidsetTaxCode(String taxCode) The tax code identifier for this fee.toString()
-
Constructor Details
-
Fee
public Fee()
-
-
Method Details
-
getId
-
getLabel
The label of the fee to be displayed as the cart item name on the cart. -
getFeeCode
The unique code for the fee. -
getActiveStartDate
The date from which the fee should be active. -
getActiveEndDate
The date where the fee stops being active. -
getCurrency
public javax.money.CurrencyUnit getCurrency()The currency of this fee.- Specified by:
getCurrencyin interfacejavax.money.CurrencySupplier
-
getFeeCalculationMethod
Where to apply the fee during cart pricing. By default, is applied onto the Cart subtotal. -
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 whenfeeCalculationOperationisFeeCalculationOperation.FIXED_AMOUNT. -
getRate
The percentage of the cart subtotal to be used to determine the fee to be applied. Only populated whenfeeCalculationOperationisFeeCalculationOperation.RATE. -
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
-
setLabel
The label of the fee to be displayed as the cart item name on the cart. -
setFeeCode
The unique code for the fee. -
setActiveStartDate
The date from which the fee should be active. -
setActiveEndDate
The date where the fee stops being active. -
setCurrency
public void setCurrency(javax.money.CurrencyUnit currency) The currency of this fee.- Specified by:
setCurrencyin interfacecom.broadleafcommerce.money.CurrencyConsumer
-
setFeeCalculationMethod
Where to apply the fee during cart pricing. By default, is applied onto the Cart subtotal. -
setFeeCalculationOperation
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 whenfeeCalculationOperationisFeeCalculationOperation.FIXED_AMOUNT. -
setRate
The percentage of the cart subtotal to be used to determine the fee to be applied. Only populated whenfeeCalculationOperationisFeeCalculationOperation.RATE. -
setTaxCode
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
-
canEqual
-
hashCode
public int hashCode() -
toString
-