Class EnhancedProratedOfferAdjustment
- All Implemented Interfaces:
com.broadleafcommerce.promotion.offer.client.web.context.info.ProratedOfferAdjustment
,Serializable
- Author:
- Sunny Yu
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
javax.money.MonetaryAmount
The 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.LineItemRef
TheLineItemRef
of theEnhancedLineItem
that gets this adjustment.com.broadleafcommerce.promotion.offer.client.web.context.info.OfferRef
getOffer()
TheOfferRef
for the offer where this prorated adjustment is from.int
The total quantity of merchandising items from theEnhancedLineItem
to which this adjustment applies.int
hashCode()
void
setAmount
(javax.money.MonetaryAmount amount) The amount of the prorated adjustment for the item.void
setCodeUsed
(String codeUsed) The code used (if any) that triggered the application of the offer for this adjustment.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.void
setLineItem
(com.broadleafcommerce.promotion.offer.client.web.context.info.LineItemRef lineItem) TheLineItemRef
of theEnhancedLineItem
that gets this adjustment.void
setOffer
(com.broadleafcommerce.promotion.offer.client.web.context.info.OfferRef offer) TheOfferRef
for the offer where this prorated adjustment is from.void
setQuantity
(int quantity) The total quantity of merchandising items from theEnhancedLineItem
to which this adjustment applies.toString()
-
Constructor Details
-
EnhancedProratedOfferAdjustment
public EnhancedProratedOfferAdjustment()
-
-
Method Details
-
getLineItem
public com.broadleafcommerce.promotion.offer.client.web.context.info.LineItemRef getLineItem()TheLineItemRef
of theEnhancedLineItem
that gets this adjustment.- Specified by:
getLineItem
in interfacecom.broadleafcommerce.promotion.offer.client.web.context.info.ProratedOfferAdjustment
- Returns:
- The
LineItemRef
of theEnhancedLineItem
that gets this adjustment.
-
getOffer
public com.broadleafcommerce.promotion.offer.client.web.context.info.OfferRef getOffer()TheOfferRef
for the offer where this prorated adjustment is from.- Specified by:
getOffer
in interfacecom.broadleafcommerce.promotion.offer.client.web.context.info.ProratedOfferAdjustment
- Returns:
- The
OfferRef
for 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:
getAmount
in 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 theEnhancedLineItem
to which this adjustment applies.This should equal to the sum of
ItemProrationDetail.getQuantity()
ingetItemProrationDetails()
.- Specified by:
getQuantity
in interfacecom.broadleafcommerce.promotion.offer.client.web.context.info.ProratedOfferAdjustment
- Returns:
- The quantity of merchandising items from the
EnhancedLineItem
to which this adjustment applies.
-
getCodeUsed
The code used (if any) that triggered the application of the offer for this adjustment.- Specified by:
getCodeUsed
in 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:
getItemProrationDetails
in 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) TheLineItemRef
of theEnhancedLineItem
that gets this adjustment.- Specified by:
setLineItem
in interfacecom.broadleafcommerce.promotion.offer.client.web.context.info.ProratedOfferAdjustment
- Parameters:
itemLineNumber
- TheLineItemRef
of theEnhancedLineItem
that gets this adjustment.
-
setOffer
public void setOffer(com.broadleafcommerce.promotion.offer.client.web.context.info.OfferRef offer) TheOfferRef
for the offer where this prorated adjustment is from.- Specified by:
setOffer
in interfacecom.broadleafcommerce.promotion.offer.client.web.context.info.ProratedOfferAdjustment
- Parameters:
offerRef
- TheOfferRef
for 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:
setAmount
in 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 theEnhancedLineItem
to which this adjustment applies.This should equal to the sum of
ItemProrationDetail.getQuantity()
ingetItemProrationDetails()
.- Specified by:
setQuantity
in interfacecom.broadleafcommerce.promotion.offer.client.web.context.info.ProratedOfferAdjustment
- Parameters:
quantity
- The quantity of merchandising items from theEnhancedLineItem
to which this adjustment applies.
-
setCodeUsed
The code used (if any) that triggered the application of the offer for this adjustment.- Specified by:
setCodeUsed
in 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:
setItemProrationDetails
in 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
-