public override decimal GetAmount(LineItem lineItem, Basket.Basket basket)
 {
     return
         (from c in PerRegionCosts
          where c.DestinationRegion == lineItem.DeliveryRegion
          select c.Amount).Single();
 }
        public ActionResult AddItem(LineItemViewModel lineItemViewModel)
        {
            var shippingOptions = _getShippingOptions.Invoke(new GetShippingOptionsRequest()).ShippingOptions;

            var lineItem = new LineItem()
                               {
                                   Amount = lineItemViewModel.Amount,
                                   ProductId = lineItemViewModel.ProductId,
                                   Shipping = shippingOptions[lineItemViewModel.ShippingOption],
                                   SupplierId = lineItemViewModel.SupplierId,
                                   DeliveryRegion = lineItemViewModel.DeliveryRegion,
                               };

            _addToBasket.Invoke(new AddToBasketRequest() {LineItem = lineItem});

            return RedirectToAction("Index");
        }
 public override string GetDescription(LineItem lineItem, Basket.Basket basket)
 {
     return "Flat rate shipping";
 }
 public override decimal GetAmount(LineItem lineItem, Basket.Basket basket)
 {
     return FlatRate;
 }
 public abstract string GetDescription(LineItem lineItem, Basket.Basket basket);
 public abstract decimal GetAmount(LineItem lineItem, Basket.Basket basket);
 public override string GetDescription(LineItem lineItem, Basket.Basket basket)
 {
     return string.Format("Shipping to {0}", lineItem.DeliveryRegion);
 }