private DeliveryOptionResponse Map(RawDeliveryOption rawDeliveryOption) { return(new DeliveryOptionResponse() { Name = rawDeliveryOption.Name, Price = rawDeliveryOption.Price, DeliveryDate = _deliveryEstimator.EstimateDeliveryFor(rawDeliveryOption) }); }
public DateTime EstimateDeliveryFor(RawDeliveryOption rawDeliveryOptions) { return(_clock.UtcNow .AddDays(rawDeliveryOptions.DaysToDispatch) .AddDays(rawDeliveryOptions.DaysToDeliver).Date); }