org.broadleafcommerce.core.order.fulfillment.domain
Interface FulfillmentPriceBand

All Superinterfaces:
FulfillmentBand, Serializable
All Known Implementing Classes:
FulfillmentPriceBandImpl

public interface FulfillmentPriceBand
extends FulfillmentBand

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:

  1. The prices of all of the OrderItems in a FulfillmentGroup (which is obtained through their relationship with FulfillmentGroupItem are summed together
  2. The FulfillmentPriceBand should be looked up by getting the closest band less than the sum of the price
  3. If FulfillmentBand.getResultAmountType() returns FulfillmentBandResultAmountType.RATE, then the cost for the fulfillment group is whatever is defined in FulfillmentBand.getResultAmount()
  4. If FulfillmentBand.getResultAmountType() returns FulfillmentBandResultAmountType.PERCENTAGE, then the fulfillment cost is the percentage obtained by FulfillmentBand.getResultAmount() * retailPriceTotal
  5. If two bands have the same retail price minimum amount, the cheapest resulting amount is used

Author:
Phillip Verheyden
See Also:
BandedPriceFulfillmentOption}

Method Summary
 BandedPriceFulfillmentOption getOption()
          Gets the BandedPriceFulfillmentOption that this band is associated to
 BigDecimal getRetailPriceMinimumAmount()
          Gets the minimum amount that this band is valid for.
 void setOption(BandedPriceFulfillmentOption option)
          Sets the BandedPriceFulfillmentOption to associate with this band
 void setRetailPriceMinimumAmount(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 Detail

getRetailPriceMinimumAmount

BigDecimal getRetailPriceMinimumAmount()
Gets the minimum amount that this band is valid for. If the addition of all of the retail prices on all the OrderItems in a FulfillmentGroup comes 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 a FulfillmentGroup that this band qualifies for

setRetailPriceMinimumAmount

void setRetailPriceMinimumAmount(BigDecimal retailPriceMinimumAmount)
Set the minimum amount that this band is valid for. If the addition of all of the retail prices on all the OrderItems in a FulfillmentGroup comes 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 the OrderItems in a FulfillmentGroup

getOption

BandedPriceFulfillmentOption getOption()
Gets the BandedPriceFulfillmentOption that this band is associated to

Returns:
the associated BandedPriceFulfillmentOption

setOption

void setOption(BandedPriceFulfillmentOption option)
Sets the BandedPriceFulfillmentOption to associate with this band

Parameters:
option -


Copyright © 2012. All Rights Reserved.