internal void ApplyDiscount(DatedDiscount datedDiscount) { if (datedDiscount.DoesApplyTo(_product)) { _appliedDiscount = new AppliedDiscount(datedDiscount.DiscountPercent, _appliedDiscount); } }
public void ApplyDiscount(DatedDiscount datedDiscount) { if (datedDiscount.IsValidOn(OrderDate)) { foreach (OrderedProduct orderedProduct in Products) { orderedProduct.ApplyDiscount(datedDiscount); } } }