Interface MinimumAmountValidationStrategy
- All Known Implementing Classes:
DefaultMinimumAmountValidationStrategy
public interface MinimumAmountValidationStrategy
The strategy validates if Discount is applicable or not checking lower price limit of Order and LineItem.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanisLineItemLowerLimitValid(LineItem lineItem, LineItemDiscount discount) Checks if the LineItem subtotal and the Order subtotal are valid after application of the Discount to the LineItem.booleanisOrderLowerLimitValid(Order cart, OrderDiscount discount) Checks if the subtotal is valid after application of the Discount to the Cart.
-
Method Details
-
isOrderLowerLimitValid
Checks if the subtotal is valid after application of the Discount to the Cart.- Parameters:
cart- Cart to checkdiscount- Discount to apply- Returns:
- true if Cart subtotal is not lower than valid limit, false - otherwise
-
isLineItemLowerLimitValid
Checks if the LineItem subtotal and the Order subtotal are valid after application of the Discount to the LineItem.- Parameters:
lineItem- LineItem to checkdiscount- Discount to apply- Returns:
- true if LineItem and Order subtotal is not lower than valid limit, false - otherwise
-