Interface CouponRedemptionStrategy<T extends AbstractCouponModel>
-
- All Known Implementing Classes:
DefaultCustomerCouponRedemptionStrategy,DefaultMultiCodeCouponRedemptionStrategy,DefaultSingleCodeCouponRedemptionStrategy
public interface CouponRedemptionStrategy<T extends AbstractCouponModel>The strategy interface provides methods for checking the coupon capability of being redeemed.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanisCouponRedeemable(T coupon, UserModel user, java.lang.String code)Check the whether coupon meets the conditions required in order to be redeemed.booleanisRedeemable(T coupon, AbstractOrderModel abstractOrder, java.lang.String code)Check the whether coupon meets the conditions required in order to be redeemed.
-
-
-
Method Detail
-
isRedeemable
boolean isRedeemable(T coupon, AbstractOrderModel abstractOrder, java.lang.String code)
Check the whether coupon meets the conditions required in order to be redeemed.- Parameters:
coupon-AbstractCouponModelcoupon to redeemabstractOrder-AbstractOrderModelto redeem couponcode- the coupon code to check- Returns:
- boolean true if coupon could be redeem at cart/order or false if it cannot be redeemed.
-
isCouponRedeemable
boolean isCouponRedeemable(T coupon, UserModel user, java.lang.String code)
Check the whether coupon meets the conditions required in order to be redeemed.- Parameters:
coupon-AbstractCouponModelcoupon to redeemuser-UserModelto redeem couponcode- the coupon code to check- Returns:
- boolean true if coupon could be redeem at cart/order or false if it cannot be redeemed.
-
-