Exemplo n.º 1
0
        public async Task <IActionResult> GetBrowseQuotes(string orininalPlace, string destinationPlace)
        {
            ListOfQuotesViewModels listOfQuoteViewModels = await Execute(() => _skyscannerService.Flight.GetBrowseQuotes(orininalPlace, destinationPlace));

            return(new PartialViewResult
            {
                ViewName = "~/Views/Shared/Partials/_BrowseQuotesPartial.cshtml",
                ViewData = new ViewDataDictionary <ListOfQuotesViewModels>(ViewData, listOfQuoteViewModels)
            });
        }
        public async Task <ListOfQuotesViewModels> GetBrowseQuotes(
            string originPlace,
            string destinationPlace,
            string country             = "UK",
            string currency            = "GBP",
            string locale              = "en-GB",
            string outboundPartialDate = "anytime",
            string inboundPartialDate  = "")
        {
            var result = await FileHelper.GetDataAsync <ListOfQuotes>(FileName.PARENT_FOLDER, FileName.BROWSE_QUOTES_KH_KR);

            ListOfQuotesViewModels quoteViewModels = _skyscannerMapper.MapListOfQuotesToListOfQuotesViewModel(result);

            return(quoteViewModels);
        }
Exemplo n.º 3
0
        public async Task <ListOfQuotesViewModels> GetBrowseQuotes(
            string originPlace,
            string destinationPlace,
            string country             = "UK",
            string currency            = "GBP",
            string locale              = "en-GB",
            string outboundPartialDate = "anytime",
            string inboundPartialDate  = "")
        {
            ListOfQuotes result = await _skyscannerProvider.GetBrowseQuotes(originPlace, destinationPlace, country, currency, locale, outboundPartialDate, inboundPartialDate);

            ListOfQuotesViewModels listOfQuoteViewModels = _skycannerMapper.MapListOfQuotesToListOfQuotesViewModel(result);

            return(listOfQuoteViewModels);
        }