public class DefaultCouponFacade extends Object
| Constructor and Description |
|---|
DefaultCouponFacade() |
public boolean checkVoucherCode(String voucherCode)
public VoucherData getVoucher(String voucherCode) throws VoucherOperationException
VoucherOperationExceptionpublic void applyVoucher(String voucherCode) throws VoucherOperationException
VoucherOperationExceptionpublic void releaseVoucher(String voucherCode) throws VoucherOperationException
VoucherOperationExceptionpublic List<VoucherData> getVouchersForCart()
protected List<VoucherData> getCouponsForOrder(AbstractOrderModel order)
protected void acceptIfCartExists(String code, BiConsumer<String,AbstractOrderModel> orderConsumer) throws VoucherOperationException
VoucherOperationExceptionprotected <R> R applyIfCartExists(String code, BiFunction<String,CartModel,R> orderConsumer) throws VoucherOperationException
VoucherOperationExceptionprotected <R> R applyIfCartExists(Function<AbstractOrderModel,R> orderFunction)
protected CouponService getCouponService()
public void setCouponService(CouponService couponService)
protected CartService getCartService()
public void setCartService(CartService cartService)
protected <any> getCouponCodeModelConverter()
public void setCouponCodeModelConverter(<any> couponCodeModelConverter)
@Deprecated protected <any> getCouponCodeDetailsConverter()
@Deprecated public void setCouponCodeDetailsConverter(<any> couponDetailsConverter)
protected Converter<AbstractCouponModel,VoucherData> getCouponModelConverter()
public void setCouponModelConverter(Converter<AbstractCouponModel,VoucherData> couponModelConverter)
Copyright © 2017 SAP SE. All Rights Reserved.