예제 #1
0
        public async Task FaresAsyncReturnsSuccessResponse()
        {
            var request = CreateValidInitialRequest();

            var initializeQuery = await _client.InitializeQueryAsync(request);

            var response = await _client.FaresAsync(new FaresRequest(initializeQuery.Id));

            Assert.NotNull(response);
            Assert.True(response.Succeeded);
        }
예제 #2
0
        public static async Task Main(string[] args)
        {
            var initialization = await QueryInitializationAsync();

            using (var client = new AirlineClient())
            {
                var request = new FaresRequest(initialization.Id);

                var response = await client.FaresAsync(request);

                Console.WriteLine($"[Search result]: {response.Arln.Count} airlines found.");

                foreach (var airline in response.Arln)
                {
                    Console.WriteLine($"The {airline.N} found {airline.FareVerbose.Count} fares.");
                    foreach (var fare in airline.FareVerbose)
                    {
                        Console.WriteLine($"Fare - [Id: {fare.F} TotalAmount:${fare.TotalAmount}]");
                    }
                }
            }
        }