Skip to content

Commit

Permalink
example updated
Browse files Browse the repository at this point in the history
  • Loading branch information
minjikarin committed Jun 20, 2024
1 parent 804bcb8 commit e019c32
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 16 deletions.
27 changes: 16 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -406,22 +406,27 @@ amadeus.shopping.hotelOffersSearch.get({
amadeus.shopping.hotelOfferSearch('XXX').get()

// Hotel Booking API v2
amadeus.booking.hotelOrders.post({
guests: [],
travelAgent: {},
roomAssociations: [],
payment: {}
})
amadeus.booking.hotelOrders.post(
JSON.stringfy({
"data": {
"type": "hotel-order",
"guests": [],
"travelAgent": {},
"roomAssociations": [],
"payment": {}
}})
)


// Hotel Booking API v1
amadeus.booking.hotelBookings.post(
JSON.stringify({
'offerId': 'XXX',
'guests': [],
'payments': []
}
)
"data": {
"offerId": "XXXX",
"guests": [],
"payments": [],
"rooms": []
}})
)

// On-Demand Flight Status
Expand Down
14 changes: 9 additions & 5 deletions src/amadeus/namespaces/booking/hotel_bookings.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,15 @@ class HotelBookings {
* To book the hotel offer with ID 'XXX' with guests & payments info
*
* ```js
* amadeus.booking.hotelBookings.post({
* 'offerId': 'XXX',
* 'guests': [],
* 'payments': []
* });
* amadeus.booking.hotelBookings.post(
* JSON.stringify({
* "data": {
* "offerId": "XXXX",
* "guests": [],
* "payments": [],
* "rooms": []
* }})
* )
* ```
*/
post(params = {}) {
Expand Down

0 comments on commit e019c32

Please sign in to comment.