public async Task <List <Ticket> > GetPrice( string token, string origin, string destination, DateTime departDate, DateTime returnDate, PeriodType period = PeriodType.Year, bool isOneWay = false, int page = 1, int limit = 30, bool isShowToAffiliates = true, SortingMode sorting = SortingMode.Price, TripClassMode tripClass = TripClassMode.Econom) { var settings = new QuerySettings(origin, destination) { BeginningOfPeriod = departDate, Period = period, IsOneWay = isOneWay, Page = page, Limit = limit, IsShowToAffiliates = isShowToAffiliates, Sorting = sorting, TripClass = tripClass, }; var interval = returnDate - departDate; settings.TripDuration = period == PeriodType.Day ? interval.Days : interval.Days / 7; return(await GetPrice(token, settings)); }
public async Task<List<Ticket>> GetPrice( string token, string origin, string destination, DateTime departDate, DateTime returnDate, PeriodType period = PeriodType.Year, bool isOneWay = false, int page = 1, int limit = 30, bool isShowToAffiliates = true, SortingMode sorting = SortingMode.Price, TripClassMode tripClass = TripClassMode.Econom) { var settings = new QuerySettings(origin, destination) { BeginningOfPeriod = departDate, Period = period, IsOneWay = isOneWay, Page = page, Limit = limit, IsShowToAffiliates = isShowToAffiliates, Sorting = sorting, TripClass = tripClass, }; var interval = returnDate - departDate; settings.TripDuration = period == PeriodType.Day ? interval.Days : interval.Days / 7; return await GetPrice(token, settings); }
public Task <List <Ticket> > GetPrice(string token, string origin, string destination, DateTime departDate, DateTime returnDate, PeriodType period = PeriodType.Year, bool isOneWay = false, int page = 1, int limit = 30, bool isShowToAffiliates = true, SortingMode sorting = SortingMode.Price, TripClassMode tripClass = TripClassMode.Econom) { Contract.Requires <ArgumentNullException>(!String.IsNullOrEmpty(token), "Token can not be null or empty."); return(Task.FromResult(default(List <Ticket>))); }
public Task<List<Ticket>> GetPrice(string token, string origin, string destination, DateTime departDate, DateTime returnDate, PeriodType period = PeriodType.Year, bool isOneWay = false, int page = 1, int limit = 30, bool isShowToAffiliates = true, SortingMode sorting = SortingMode.Price, TripClassMode tripClass = TripClassMode.Econom) { Contract.Requires<ArgumentNullException>(!String.IsNullOrEmpty(token), "Token can not be null or empty."); return Task.FromResult(default(List<Ticket>)); }