예제 #1
0
 public Checkout(ICatalogue catalogue, IDiscounts discounts)
 {
     _subtotal      = new Price();
     _scannedItems  = new Collection <IPurchaseable>();
     _itemCatalogue = catalogue;
     _discounts     = discounts;
 }
예제 #2
0
        public decimal CalculateTotalBill(IDiscounts discounts)
        {
            decimal total = _items.Sum(item => item.GetPrice());

            decimal discount = discounts.GetDiscount(_items);

            return total - discount;
        }
예제 #3
0
 public BusinessLogic(IProcessedData processedData, IFees fees, IDiscounts discounts)
 {
     _processedData = processedData;
     _fees          = fees;
     _discounts     = discounts;
 }
예제 #4
0
 public ChocolateFactory(IDiscounts discountsRealisation)
 {
     this.discountsRealisation = discountsRealisation;
 }
예제 #5
0
 public DiscountsController(IDiscounts discountsRepositorio)
 {
     _discountRepositorio = discountsRepositorio;
 }
예제 #6
0
 public CartsController(ICarts carts, IArticles articles, IDiscounts discounts)
 {
     _carts     = carts;
     _articles  = articles;
     _discounts = discounts;
 }