Class EnhancedProratedOfferAdjustment
- All Implemented Interfaces:
com.broadleafcommerce.promotion.offer.client.web.context.info.ProratedOfferAdjustment,Serializable
- Author:
- Sunny Yu
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanjavax.money.MonetaryAmountThe amount of the prorated adjustment for the item.The code used (if any) that triggered the application of the offer for this adjustment.List<com.broadleafcommerce.promotion.offer.client.web.context.info.ItemProrationDetail>The details about how this prorated adjustment on a per-quantity basis.com.broadleafcommerce.promotion.offer.client.web.context.info.LineItemRefTheLineItemRefof theEnhancedLineItemthat gets this adjustment.com.broadleafcommerce.promotion.offer.client.web.context.info.OfferRefgetOffer()TheOfferReffor the offer where this prorated adjustment is from.intThe total quantity of merchandising items from theEnhancedLineItemto which this adjustment applies.inthashCode()voidsetAmount(javax.money.MonetaryAmount amount) The amount of the prorated adjustment for the item.voidsetCodeUsed(String codeUsed) The code used (if any) that triggered the application of the offer for this adjustment.voidsetItemProrationDetails(List<com.broadleafcommerce.promotion.offer.client.web.context.info.ItemProrationDetail> itemProrationDetails) The details about how this prorated adjustment on a per-quantity basis.voidsetLineItem(com.broadleafcommerce.promotion.offer.client.web.context.info.LineItemRef lineItem) TheLineItemRefof theEnhancedLineItemthat gets this adjustment.voidsetOffer(com.broadleafcommerce.promotion.offer.client.web.context.info.OfferRef offer) TheOfferReffor the offer where this prorated adjustment is from.voidsetQuantity(int quantity) The total quantity of merchandising items from theEnhancedLineItemto which this adjustment applies.toString()
-
Constructor Details
-
EnhancedProratedOfferAdjustment
public EnhancedProratedOfferAdjustment()
-
-
Method Details
-
getLineItem
public com.broadleafcommerce.promotion.offer.client.web.context.info.LineItemRef getLineItem()TheLineItemRefof theEnhancedLineItemthat gets this adjustment.- Specified by:
getLineItemin interfacecom.broadleafcommerce.promotion.offer.client.web.context.info.ProratedOfferAdjustment- Returns:
- The
LineItemRefof theEnhancedLineItemthat gets this adjustment.
-
getOffer
public com.broadleafcommerce.promotion.offer.client.web.context.info.OfferRef getOffer()TheOfferReffor the offer where this prorated adjustment is from.- Specified by:
getOfferin interfacecom.broadleafcommerce.promotion.offer.client.web.context.info.ProratedOfferAdjustment- Returns:
- The
OfferReffor the offer where this prorated adjustment is from.
-
getAmount
public javax.money.MonetaryAmount getAmount()The amount of the prorated adjustment for the item.This should equal to the sum of
ItemProrationDetail.getUnitAmount()*ItemProrationDetail.getQuantity()ingetItemProrationDetails().- Specified by:
getAmountin interfacecom.broadleafcommerce.promotion.offer.client.web.context.info.ProratedOfferAdjustment- Returns:
- The amount of the prorated adjustment for the item.
-
getQuantity
public int getQuantity()The total quantity of merchandising items from theEnhancedLineItemto which this adjustment applies.This should equal to the sum of
ItemProrationDetail.getQuantity()ingetItemProrationDetails().- Specified by:
getQuantityin interfacecom.broadleafcommerce.promotion.offer.client.web.context.info.ProratedOfferAdjustment- Returns:
- The quantity of merchandising items from the
EnhancedLineItemto which this adjustment applies.
-
getCodeUsed
The code used (if any) that triggered the application of the offer for this adjustment.- Specified by:
getCodeUsedin interfacecom.broadleafcommerce.promotion.offer.client.web.context.info.ProratedOfferAdjustment- Returns:
- The code used (if any) that triggered the application of the offer for this adjustment.
-
getItemProrationDetails
public List<com.broadleafcommerce.promotion.offer.client.web.context.info.ItemProrationDetail> getItemProrationDetails()The details about how this prorated adjustment on a per-quantity basis.For example, if the prorated adjustment for this item is $5 and this item has a quantity of 3, there should be one detail with quantity of 2 and amount of $1.67, and one detail with quantity of 1 and amount of $1.66, totaling to $5
- Specified by:
getItemProrationDetailsin interfacecom.broadleafcommerce.promotion.offer.client.web.context.info.ProratedOfferAdjustment- Returns:
- The details about how this prorated adjustment on a per-quantity basis.
-
setLineItem
public void setLineItem(com.broadleafcommerce.promotion.offer.client.web.context.info.LineItemRef lineItem) TheLineItemRefof theEnhancedLineItemthat gets this adjustment.- Specified by:
setLineItemin interfacecom.broadleafcommerce.promotion.offer.client.web.context.info.ProratedOfferAdjustment- Parameters:
itemLineNumber- TheLineItemRefof theEnhancedLineItemthat gets this adjustment.
-
setOffer
public void setOffer(com.broadleafcommerce.promotion.offer.client.web.context.info.OfferRef offer) TheOfferReffor the offer where this prorated adjustment is from.- Specified by:
setOfferin interfacecom.broadleafcommerce.promotion.offer.client.web.context.info.ProratedOfferAdjustment- Parameters:
offerRef- TheOfferReffor the offer where this prorated adjustment is from.
-
setAmount
public void setAmount(javax.money.MonetaryAmount amount) The amount of the prorated adjustment for the item.This should equal to the sum of
ItemProrationDetail.getUnitAmount()*ItemProrationDetail.getQuantity()ingetItemProrationDetails().- Specified by:
setAmountin interfacecom.broadleafcommerce.promotion.offer.client.web.context.info.ProratedOfferAdjustment- Parameters:
amount- The amount of the prorated adjustment for the item.
-
setQuantity
public void setQuantity(int quantity) The total quantity of merchandising items from theEnhancedLineItemto which this adjustment applies.This should equal to the sum of
ItemProrationDetail.getQuantity()ingetItemProrationDetails().- Specified by:
setQuantityin interfacecom.broadleafcommerce.promotion.offer.client.web.context.info.ProratedOfferAdjustment- Parameters:
quantity- The quantity of merchandising items from theEnhancedLineItemto which this adjustment applies.
-
setCodeUsed
The code used (if any) that triggered the application of the offer for this adjustment.- Specified by:
setCodeUsedin interfacecom.broadleafcommerce.promotion.offer.client.web.context.info.ProratedOfferAdjustment- Parameters:
codeUsed- The code used (if any) that triggered the application of the offer for this adjustment.
-
setItemProrationDetails
public void setItemProrationDetails(List<com.broadleafcommerce.promotion.offer.client.web.context.info.ItemProrationDetail> itemProrationDetails) The details about how this prorated adjustment on a per-quantity basis.For example, if the prorated adjustment for this item is $5 and this item has a quantity of 3, there should be one detail with quantity of 2 and amount of $1.67, and one detail with quantity of 1 and amount of $1.66, totaling to $5
- Specified by:
setItemProrationDetailsin interfacecom.broadleafcommerce.promotion.offer.client.web.context.info.ProratedOfferAdjustment- Parameters:
itemProrationDetails- The details about how this prorated adjustment on a per-quantity basis.
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-