public double CalculateShippingCharge(Order o) { double shipping; if (o.IsPriority) { shipping = _courierService.GetQuote(o.PackageWeigth); } else if (IsHolidaySeason(o)) { shipping = 0; } else { if (IsSmallOrder(o)) { shipping = o.PackageWeigth * 0.2; } else if (IsMediumOrder(o)) { shipping = 20; } else { shipping = 0; } } return(shipping); }
public double CalculateShippingCharge(Order o) { if (o.IsPriority) { return(_courierService.GetQuote(o.PackageWeigth)); } if (IsFreeShipping(o)) { return(0); } if (IsMediumOrder(o)) { return(20); } return(CalculateNormalShipping(o)); }
public double Calculate(Order o) { return(_courierService.GetQuote(o.PackageWeigth)); }