Beispiel #1
0
        public double Apply(Checkout.ItemCodeCounts item, Offers offer)
        {
            var offerCount = item.Count / offer.ItemCount;
            var itemsLeft  = item.Count % offer.ItemCount;

            item.Count = itemsLeft;
            return(offer.DiscountPrice * offerCount);
        }
Beispiel #2
0
 public double Apply(Checkout.ItemCodeCounts item, IOffers offer)
 {
     return(Apply(item, (Offers)offer));
 }