public class DefaultCouponManagementService extends Object implements CouponManagementService
CouponManagementService.| Constructor and Description |
|---|
DefaultCouponManagementService() |
@Deprecated public Optional<CouponCodeDetails> getCouponDetails(String couponCode)
getCouponDetails in interface CouponManagementServicecouponCode - Coupon code to get coupon details forCouponCodeDetailspublic Optional<AbstractCouponModel> getCouponForCode(String couponCode)
CouponManagementServicegetCouponForCode in interface CouponManagementServicecouponCode - Coupon code to get coupon details forAbstractCouponModelpublic Optional<AbstractCouponModel> getValidatedCouponForCode(String couponCode)
CouponManagementServicegetValidatedCouponForCode in interface CouponManagementServicecouponCode - Coupon code to get coupon details forAbstractCouponModelprotected Optional<AbstractCouponModel> getCouponForCode(String couponCode, Function<FindCouponStrategy,Optional<AbstractCouponModel>> findCouponFunction)
public CouponResponse verifyCouponCode(String couponCode, AbstractOrderModel abstractOrder)
CouponManagementServiceverifyCouponCode in interface CouponManagementServicecouponCode - Coupon code to checkabstractOrder - AbstractOrderModel for which the coupon will be redeemedCouponResponse containing true if coupon code is valid or false if not, including the message why
it is not valid.protected Optional<AbstractCouponModel> findCoupon(String couponCode, AbstractOrderModel order)
protected Optional<AbstractCouponModel> checkRedeemability(AbstractCouponModel coupon, AbstractOrderModel order, String couponCode)
public void releaseCouponCode(String couponCode)
CouponManagementServicecouponCode.releaseCouponCode in interface CouponManagementServicecouponCode - Coupon code to releasepublic boolean redeem(String couponCode, CartModel cart)
CouponManagementServiceredeem in interface CouponManagementServicecouponCode - Coupon code to redeemcart - CartModel to redeem couponpublic CouponResponse redeem(String couponCode, OrderModel order)
CouponManagementServiceredeem in interface CouponManagementServicecouponCode - Coupon code to redeemorder - OrderModel to redeem couponprotected void createCouponRedemption(String couponCode, OrderModel order)
protected ModelService getModelService()
public void setModelService(ModelService modelService)
public void setRedemptionStrategyMap(Map<String,CouponRedemptionStrategy> redemptionStrategyMap)
protected Map<String,CouponRedemptionStrategy> getRedemptionStrategyMap()
protected List<FindCouponStrategy> getFindCouponStrategiesList()
public void setFindCouponStrategiesList(List<FindCouponStrategy> findCouponStrategiesList)
Copyright © 2000-2016 SAP SE. All Rights Reserved.