Closed EvanTedesco closed 10 years ago
Forgive me if I'm not being able to understand your question. But to my understanding you are not being able to get any available room with get_availability method provided by the gem.
After setting the Auth Credentials of Exepdia app;
list_of_hotels = api.get_list({:propertyName => 'Hotel Moa Berlin', :destinationString => 'berlin'})
# 459433 is the id of the hotel searched above
avail_rooms = api.get_availability({:hotelId => 359433, :SupplierType => 'E', :arrivalDate => '6/12/2015',
:departureDate => '6/15/2015', :room1 => '2,5,7', :includeDetails => 'true', :options => 'ROOM_AMENITIES,ROOM_TYPES', :minorRev => 24})
It gives me 3 different types of rooms available for 2 adults and 2 children of age 5 and 7.
One other thing could be, that there are no available rooms to reserve with the criteria you are mentioning.
Thank you for your detailed response. You definitely answered my question. I didn't know how the line :room1 => '2,5,7', should be formatted and I thought that was my problem but apparently it is something else. The example you gave works perfectly but for some reason I cannot get the availability for the one hotel I actually need the info for. I have the ID from the get_list method but I keep getting an error when I try to use the get_availability call. The code I am running is
get_availability({:hotelId => 193964, :SupplierType => 'W', :arrivalDate => '6/12/2015', :departureDate => '6/15/2015', :room1 => '2,5,7', :includeDetails => 'true', :options => 'ROOM_AMENITIES,ROOM_TYPES', :minorRev => 24})
and I have tried using a different supplier type as per the documentation. I realize my problem is likely outside of the scope of Github issues so I thank you for your time and for making this super cool gem and seek a resolution elsewhere. Again thank you!
I figured out my problem and I figured I would post the solution here in case it could be of value to anyone in the future. The hotel I was trying to get availability for does not accept reservations with children. Thanks again for everything!
I have been trying to figure out how to format the number of rooms/ guests section using this gem for some time and simply cannot figure it out. The api docs say :
"Room format for REST The REST format compacts the values from the previous elements into a comma-delimited list. To declare a room and its occupants, use the following format:
&room[room number, starting with 1]= [number of adults], [comma-delimited list of children's ages]
For example, to declare that a room has one adult and two children ages 5 and 12, you would send &room1=1,5,12 . There is no separate declaration for the number of children - each age value is assumed to belong to a child."
I feel like I have tried every combination under the sun and I can't get a number of rooms to show up in my get request. Would it be possible to get an example of the format?