Ejemplo n.º 1
0
 public void CalculateTotal()
 {
     CartItems.ForEach(x =>
     {
         TotalAmount += Pricing.Price(x.Key) * x.Count;
     });
 }
Ejemplo n.º 2
0
        public void HandlePromoDiscount(PromotionRule rule)
        {
            var promoPrice = Pricing.PromoPrice(rule.Code);

            TotalAmount        += promoPrice;
            Details[_seqeuence] = new Tuple <string, string>($"{rule.Code}", $"Promo Price :{promoPrice} | Total Amount : {TotalAmount}");
            _seqeuence++;
        }