public void ProcessCoupon(ICoupon coupon, IBasket basket, IBasketCoupon basketCoupon) { if (coupon.MinSpend < basket.BasketTotal()) { basketCoupon.Value = coupon.Value * (basket.BasketTotal() / 100); basketCoupon.CouponCode = coupon.CouponCode; basketCoupon.CouponDescription = coupon.CouponDescription; basketCoupon.CouponId = coupon.CouponId; basket.AddBasketCoupon(basketCoupon); } } //end ProcessCoupon
public void AddBasketCoupon(IBasketCoupon coupon) { _basketCoupons.Add((BasketCoupon)coupon); }