public async Task<TripOptionViewModels> GetFlights(SearchFlightRequest request) { string tripOptionsResponse = await SendRequest(request); Response response = new Response(tripOptionsResponse); TripOptionViewModels tripOptions = new TripOptionViewModels(response); return tripOptions; }
public async Task<ActionResult> Search(SearchFlightRequest request) { var model = await _flightsService.GetFlights(request); return View(model); }
public ActionResult Index() { var model = new SearchFlightRequest(); return View(model); }
private async Task<string> SendRequest(SearchFlightRequest request) { var qpxRequest = Mapper.ToQpxRequest(request); return await SendRequest(qpxRequest); }