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); }
public double Apply(Checkout.ItemCodeCounts item, IOffers offer) { return(Apply(item, (Offers)offer)); }