Interface FindCouponStrategy
-
- All Known Implementing Classes:
AbstractFindCouponStrategy,DefaultFindCustomerCouponStrategy,DefaultFindMultiCodeCouponStrategy,DefaultFindSingleCodeCouponStrategy
public interface FindCouponStrategyThe FindCouponStrategy interface provides a simple method to retrieve a coupon based on a given coupon code.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.Optional<AbstractCouponModel>findCouponForCouponCode(java.lang.String couponCode)Find the coupon for the providedcouponCodewithout any validaton.java.util.Optional<AbstractCouponModel>findValidatedCouponForCouponCode(java.lang.String couponCode)Find the coupon for the providedcouponCodewith the validation of the coupon throws CouponServiceException if the coupon Code is not active or not within the date range.
-
-
-
Method Detail
-
findCouponForCouponCode
java.util.Optional<AbstractCouponModel> findCouponForCouponCode(java.lang.String couponCode)
Find the coupon for the providedcouponCodewithout any validaton.- Parameters:
couponCode- the coupon code (i.e. as entered in a storefront etc)- Returns:
- AbstractCouponModel if a coupon model is found for the given coupon code.
-
findValidatedCouponForCouponCode
java.util.Optional<AbstractCouponModel> findValidatedCouponForCouponCode(java.lang.String couponCode)
Find the coupon for the providedcouponCodewith the validation of the coupon throws CouponServiceException if the coupon Code is not active or not within the date range.- Parameters:
couponCode- the coupon code (i.e. as entered in a storefront etc)- Returns:
- AbstractCouponModel if a coupon model is found for the given coupon code.
-
-