public void ProcessVoucher(IVoucher voucher, IBasket basket, IBasketVoucher basketVoucher) { if (voucher.MinSpend > basket.BasketTotal()) { basketVoucher.Value = voucher.Value; basketVoucher.VoucherCode = voucher.VoucherCode; basketVoucher.VoucherDescription = voucher.VoucherDescription; basketVoucher.VoucherId = voucher.VoucherId; basket.AddBasketVoucher(basketVoucher); } }
public void ProcessVoucher(IVoucher voucher, IBasket basket, IBasketVoucher basketVoucher) { if (voucher.MinSpend < basket.BasketTotal()) { basketVoucher.Value = voucher.Value; basketVoucher.VoucherCode = voucher.VoucherCode; basketVoucher.VoucherDescription = voucher.VoucherDescription; basketVoucher.VoucherId = voucher.VoucherId; basket.AddBasketVoucher(basketVoucher); } }
public void ProcessVoucher(IVoucher vc, IBasket bkt, IBasketVoucher bv) { if (vc.MinSpend < bkt.BasketTotal()) { bv.Value = -vc.Value; bv.VoucherCode = vc.VoucherCode; bv.VoucherDescription = vc.VoucherDescription; bv.VoucherId = vc.VoucherId; bkt.AddBasketVoucher(bv); } }
public void ProcessVoucher(IVoucher voucher, IBasket basket, IBasketVoucher basketVoucher) { decimal basketTotal = basket.BasketTotal(); if (voucher.MinSpend < basketTotal) { basketVoucher.Value = voucher.Value * (basketTotal / 100) - 1; basketVoucher.VoucherCode = voucher.VoucherCode; basketVoucher.VoucherDescription = voucher.VoucherDescription; basketVoucher.VoucherId = voucher.VoucherId; basket.AddBasketVoucher(basketVoucher); } }
public void ProcessVoucher(IVoucher vc, IBasket bkt, IBasketVoucher bv) { decimal basketTotal = bkt.BasketTotal(); if (vc.MinSpend < basketTotal) { bv.Value = -vc.Value * (basketTotal / 100); bv.VoucherCode = vc.VoucherCode; bv.VoucherDescription = vc.VoucherDescription; bv.VoucherId = vc.VoucherId; bkt.AddBasketVoucher(bv); } }
public void AddBasketVoucher(IBasketVoucher voucher) { _basketVouchers.Add((BasketVoucher)voucher); }
public void AddBasketVoucher(IBasketVoucher voucher) { _basketVouchers.Add((BasketVoucher) voucher); }