Class ProratedOfferAdjustment
- java.lang.Object
-
- com.broadleafcommerce.order.common.domain.ProratedOfferAdjustment
-
- All Implemented Interfaces:
Serializable
public class ProratedOfferAdjustment extends Object implements Serializable
DTO containing prorated price adjustment information for aEnhancedLineItem
caused by an order-level or fulfillment group-level offer.If there's an order-level offer applied to the order, the offer adjustment would be spread across all the discountable
EnhancedLineItems
.Practically, this information is only needed for downstream services since the total discount is the same for the
EnhancedLineItem
.- Author:
- Sunny Yu
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ProratedOfferAdjustment()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
canEqual(Object other)
boolean
equals(Object o)
javax.money.MonetaryAmount
getAmount()
The amount of the prorated adjustment for the item.List<ItemProrationDetail>
getItemProrationDetails()
The details about how this prorated adjustment on a per-quantity basis.OfferRef
getOfferRef()
TheOfferRef
for the offer where this prorated adjustment is from.int
hashCode()
void
setAmount(javax.money.MonetaryAmount amount)
The amount of the prorated adjustment for the item.void
setItemProrationDetails(List<ItemProrationDetail> itemProrationDetails)
The details about how this prorated adjustment on a per-quantity basis.void
setOfferRef(OfferRef offerRef)
TheOfferRef
for the offer where this prorated adjustment is from.String
toString()
-
-
-
Method Detail
-
getOfferRef
public OfferRef getOfferRef()
TheOfferRef
for the offer where this prorated adjustment is from.- 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()
.- Returns:
- The amount of the prorated adjustment for the item.
-
getItemProrationDetails
public List<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
- Returns:
- The details about how this prorated adjustment on a per-quantity basis.
-
setOfferRef
public void setOfferRef(OfferRef offerRef)
TheOfferRef
for the offer where this prorated adjustment is from.- 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()
.- Parameters:
amount
- The amount of the prorated adjustment for the item.
-
setItemProrationDetails
public void setItemProrationDetails(List<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
- Parameters:
itemProrationDetails
- The details about how this prorated adjustment on a per-quantity basis.
-
canEqual
protected boolean canEqual(Object other)
-
-