public Invoice MakePurchase(Customer customer,
                                    Product product, Discount discount)
        {
            var purchase
                = purchaseRepository.CreatePurchase(customer);

            purchaseRepository.AddProduct(purchase, product);
            var invoice
                = purchaseRepository.CreateInvoice(purchase);

            if (discount != null)
            {
                invoice.ApplyDiscount(discount);
            }
            return(invoice);
        }