File tree Expand file tree Collapse file tree 2 files changed +25
-16
lines changed
src/amadeus/namespaces/booking Expand file tree Collapse file tree 2 files changed +25
-16
lines changed Original file line number Diff line number Diff line change @@ -406,22 +406,27 @@ amadeus.shopping.hotelOffersSearch.get({
406406amadeus .shopping .hotelOfferSearch (' XXX' ).get ()
407407
408408// Hotel Booking API v2
409- amadeus .booking .hotelOrders .post ({
410- guests: [],
411- travelAgent: {},
412- roomAssociations: [],
413- payment: {}
414- })
409+ amadeus .booking .hotelOrders .post (
410+ JSON .stringfy ({
411+ " data" : {
412+ " type" : " hotel-order" ,
413+ " guests" : [],
414+ " travelAgent" : {},
415+ " roomAssociations" : [],
416+ " payment" : {}
417+ }})
418+ )
415419
416420
417421// Hotel Booking API v1
418422amadeus .booking .hotelBookings .post (
419423 JSON .stringify ({
420- ' offerId' : ' XXX' ,
421- ' guests' : [],
422- ' payments' : []
423- }
424- )
424+ " data" : {
425+ " offerId" : " XXXX" ,
426+ " guests" : [],
427+ " payments" : [],
428+ " rooms" : []
429+ }})
425430)
426431
427432// On-Demand Flight Status
Original file line number Diff line number Diff line change @@ -25,11 +25,15 @@ class HotelBookings {
2525 * To book the hotel offer with ID 'XXX' with guests & payments info
2626 *
2727 * ```js
28- * amadeus.booking.hotelBookings.post({
29- * 'offerId': 'XXX',
30- * 'guests': [],
31- * 'payments': []
32- * });
28+ * amadeus.booking.hotelBookings.post(
29+ * JSON.stringify({
30+ * "data": {
31+ * "offerId": "XXXX",
32+ * "guests": [],
33+ * "payments": [],
34+ * "rooms": []
35+ * }})
36+ * )
3337 * ```
3438 */
3539 post ( params = { } ) {
You can’t perform that action at this time.
0 commit comments