Interface FulfillmentPriceBand
- All Superinterfaces:
FulfillmentBand,Serializable
- All Known Implementing Classes:
FulfillmentPriceBandImpl
This entity defines the bands that can be specified for BandedPriceFulfillmentOption. Bands
work on the retail price of an Order and should be calculated as follows:
- The prices of all of the
OrderItemsin aFulfillmentGroup(which is obtained through their relationship withFulfillmentGroupItemare summed together - The
FulfillmentPriceBandshould be looked up by getting the closest band less than the sum of the price - If
FulfillmentBand.getResultAmountType()returnsFulfillmentBandResultAmountType.RATE, then the cost for the fulfillment group is whatever is defined inFulfillmentBand.getResultAmount() - If
FulfillmentBand.getResultAmountType()returnsFulfillmentBandResultAmountType.PERCENTAGE, then the fulfillment cost is the percentage obtained byFulfillmentBand.getResultAmount()* retailPriceTotal - If two bands have the same retail price minimum amount, the cheapest resulting amount is used
- Author:
- Phillip Verheyden
-
Method Summary
Modifier and TypeMethodDescriptionGets theBandedPriceFulfillmentOptionthat this band is associated toGets the minimum amount that this band is valid for.voidSets theBandedPriceFulfillmentOptionto associate with this bandvoidsetRetailPriceMinimumAmount(BigDecimal retailPriceMinimumAmount) Set the minimum amount that this band is valid for.Methods inherited from interface org.broadleafcommerce.core.order.fulfillment.domain.FulfillmentBand
getId, getResultAmount, getResultAmountType, setId, setResultAmount, setResultAmountType
-
Method Details
-
getRetailPriceMinimumAmount
BigDecimal getRetailPriceMinimumAmount()Gets the minimum amount that this band is valid for. If the addition of all of the retail prices on all theOrderItems in aFulfillmentGroupcomes to at least this amount, this band result amount will be applied to the fulfillment cost.- Returns:
- the minimum retail price amount of the sum of the
OrderItems in aFulfillmentGroupthat this band qualifies for
-
setRetailPriceMinimumAmount
Set the minimum amount that this band is valid for. If the addition of all of the retail prices on all theOrderItems in aFulfillmentGroupcomes to at least this amount, this band result amount will be applied to the fulfillment cost.- Parameters:
minimumRetailPriceAmount- - the minimum retail price amount from adding up theOrderItems in aFulfillmentGroup
-
getOption
BandedPriceFulfillmentOption getOption()Gets theBandedPriceFulfillmentOptionthat this band is associated to- Returns:
- the associated
BandedPriceFulfillmentOption
-
setOption
Sets theBandedPriceFulfillmentOptionto associate with this band- Parameters:
option-
-