public virtual void AddShipment(ExpeditionService expeditionService, Func <decimal, Tuple <decimal, EstimatedTimeDelivery> > getShippingCost) { var totalWeight = this.Items.Sum(i => i.Product.Weight * i.Quantity); var result = getShippingCost(totalWeight); var shippingCost = result.Item1; var estimatedTimeDelivery = result.Item2; this.Shipment = new OrderShipment(expeditionService, shippingCost, estimatedTimeDelivery); calculateSummary(); }
public TenantExpeditionService(ExpeditionService expeditionService) { this.ExpeditionService = expeditionService; this.IsActive = true; }