private IFinalPrice UseNoDiscount(IFinalPrice cart, ref string view) { var noDiscount = new NoDiscount(cart); noDiscount.CalculatePriceWithoutDiscount(); view += "Price without any discount : $" + cart.GetFinalPrice() + " \n"; return(noDiscount.AdjustedCart); }
private IFinalPrice UseCouponDiscount(IFinalPrice cart, ref string view) { var coupon = new CouponDiscount(cart, _discountVariablesRepository); coupon.AdjustPriceByCouponDiscount(); view += "Coupon discount adjustment : $" + cart.GetAdjustment() * -1 + " \n"; view += "Price after coupon discount : $" + cart.GetFinalPrice() + " \n"; return(coupon.AdjustedCart); }
private IFinalPrice UseBulkDiscount(IFinalPrice cart, ref string view) { var bulkDiscount = new BulkDiscount(cart, _discountVariablesRepository); bulkDiscount.AdjustPriceByBulkDiscount(); view += "Bulk discount adjustment : $" + cart.GetAdjustment() * -1 + " \n"; view += "Price after bulk discount : $" + cart.GetFinalPrice() + " \n"; return(bulkDiscount.AdjustedCart); }
public BulkDiscount(IFinalPrice adjustedCart, IDiscountVariablesRepository discountVariablesRepository) : base(adjustedCart) { _discountVariablesRepository = discountVariablesRepository; }
public NoDiscount(IFinalPrice adjustedCart) : base(adjustedCart) { }
protected PriceAdjustment(IFinalPrice adjustedCart) { AdjustedCart = adjustedCart; }