Class DefaultSingleCodeCouponRedemptionStrategy
java.lang.Object
de.hybris.platform.couponservices.redemption.strategies.impl.DefaultSingleCodeCouponRedemptionStrategy
- All Implemented Interfaces:
CouponRedemptionStrategy<SingleCodeCouponModel>
public class DefaultSingleCodeCouponRedemptionStrategy
extends Object
implements CouponRedemptionStrategy<SingleCodeCouponModel>
The strategy provides methods for checking the single code coupon capability of being redeemed.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanprotected booleanprotected CouponRedemptionDaobooleanisCouponRedeemable(SingleCodeCouponModel coupon, UserModel user, String couponCode) Check the whether coupon meets the conditions required in order to be redeemed.booleanisRedeemable(SingleCodeCouponModel coupon, AbstractOrderModel abstractOrder, String couponCode) Check the whether coupon meets the conditions required in order to be redeemed.voidsetCouponRedemptionDao(CouponRedemptionDao couponRedemptionDao)
-
Constructor Details
-
DefaultSingleCodeCouponRedemptionStrategy
public DefaultSingleCodeCouponRedemptionStrategy()
-
-
Method Details
-
isRedeemable
public boolean isRedeemable(SingleCodeCouponModel coupon, AbstractOrderModel abstractOrder, String couponCode) Description copied from interface:CouponRedemptionStrategyCheck the whether coupon meets the conditions required in order to be redeemed.- Specified by:
isRedeemablein interfaceCouponRedemptionStrategy<SingleCodeCouponModel>- Parameters:
coupon-AbstractCouponModelcoupon to redeemabstractOrder-AbstractOrderModelto redeem couponcouponCode- the coupon code to check- Returns:
- boolean true if coupon could be redeem at cart/order or false if it cannot be redeemed.
-
isCouponRedeemable
Description copied from interface:CouponRedemptionStrategyCheck the whether coupon meets the conditions required in order to be redeemed.- Specified by:
isCouponRedeemablein interfaceCouponRedemptionStrategy<SingleCodeCouponModel>- Parameters:
coupon-AbstractCouponModelcoupon to redeemuser-UserModelto redeem couponcouponCode- the coupon code to check- Returns:
- boolean true if coupon could be redeem at cart/order or false if it cannot be redeemed.
-
checkSingleCodeCouponRedeemableForUser
protected boolean checkSingleCodeCouponRedeemableForUser(SingleCodeCouponModel coupon, UserModel user) -
checkSingleCodeCouponRedeemable
-
getCouponRedemptionDao
-
setCouponRedemptionDao
-