public DateTime CalculateEta(string origin, Address destination)
        {
            if (origin != destination.Country)
            {
                throw new IllegalOrderException(string.Format("Cannot use selected shipping method to ship to {0}, {1}", destination.City, destination.Country));
            }

            return DateTime.Now.AddDays(14);
        }
Esempio n. 2
0
        private DateTime CalculateOrderEta(Order order, Address destination)
        {
            return _shippingCalculators[order.ShippingMethod].CalculateEta(_originCountry, destination);

        }
Esempio n. 3
0
 private async Task SendAsync(Order order, Address address)
 {
     await Task.FromResult(false);
 }
 public DateTime CalculateEta(string origin, Address destination)
 {
     return DateTime.Now.AddDays(2.5);
 }
 public DateTime CalculateEta(string origin, Address destination)
 {
     return DateTime.Now.AddHours(12);
 }