amadeus-travel-innovation-sandbox / sandbox-content

Decommission of the Travel Innovation Sandbox
14 stars 28 forks source link

Deserialising issue when making a CarRentalAirportSearch() #4

Closed obito1406 closed 8 years ago

obito1406 commented 8 years ago

Hi all. I was trying to get a CarSearchResponse(some parameters) and i get the following error:

image The Rate in response looks like this: " "rates": [ { "type": "DAILY", "price": { "amount": "68.65", "currency": "EUR" } } ],

What i guess it could be the error its that the library is trying to deserialize a Rate array but since I have set the Currency param to EUR its only retrieving the Rate for EUR, consecuently not being an array, and the library its not ready for that. Having seen the problem again it seems more that it is trying to deserialize the array but it doesnt expect the array, but a Rate object . If you could see what the problem is and fix it it would be great. Regards

tadhgpearson commented 8 years ago

Thanks @obito1406 Could you let us know what language are you're using, and what parameters you provided for the search?

obito1406 commented 8 years ago

Of course sorry about that. The language is C#. Using the C# library you provided(not the C# .net 2.0). And the query parameters are: CarSearchResponse response = Amadeus.CarRentalAirportSearch(apikey, "MAD", "2016-08-03", "2016-08-05"), "es", "eur", null, null, null, null, null);

location = "MAD" pick_up = "2016-08-03" drop_Off = "2016-08-05" lang = "es" currency = "EUR"

Just to know "es" witch is the code for spanish, its not a supported language right? Cause I still get the response in english in https://sandbox.amadeus.com.

tadhgpearson commented 8 years ago

OK - I was able to reproduce the issue. It was due to an error in the specification file used by the generator - it did not include a required tag explicitly declaring the array.

I've fixed that and it seems to be working for me now, could you let me know if it works for you?

Thanks, Tadhg

obito1406 commented 8 years ago

The issue is fixed thank you Tadhg it is not the first time youve solve issues for me, and always so fast. Great to have people like you in the world.

tadhgpearson commented 8 years ago

Likewise - thanks for reporting this, glad we could help!