public double Calculate(Purchase purchase)
        {
            var discount = _priceTable.DiscountTo(purchase.Value);

            var shipping = _deliveryService.Calculate(purchase.City);

            return(purchase.Value * (1 - discount) + shipping);
        }
Beispiel #2
0
 private double CalculateDelivery(CartDto cart)
 {
     return(_deliveryService.Calculate(cart, _costPerDelivery, _costPerProduct, _fixedCost));
 }