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
Modifier and TypeMethodDescriptionbooleanisCouponRedeemable(T coupon, UserModel user, String code) Check the whether coupon meets the conditions required in order to be redeemed.booleanisRedeemable(T coupon, AbstractOrderModel abstractOrder, String code) Check the whether coupon meets the conditions required in order to be redeemed.
-
Method Details
-
isRedeemable
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
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.
-