File tree Expand file tree Collapse file tree 3 files changed +23
-3
lines changed
src/amadeus/namespaces/booking Expand file tree Collapse file tree 3 files changed +23
-3
lines changed Original file line number Diff line number Diff line change @@ -405,7 +405,16 @@ amadeus.shopping.hotelOffersSearch.get({
405405// Check offer conditions of a specific offer id
406406amadeus .shopping .hotelOfferSearch (' XXX' ).get ()
407407
408- // Hotel Booking API
408+ // Hotel Booking API V2
409+ amadeus .booking .hotelOrders .post ({
410+ guests: [],
411+ travelAgent: {},
412+ roomAssociations: [],
413+ payment: {}
414+ })
415+
416+
417+ // Hotel Booking API V1
409418amadeus .booking .hotelBookings .post (
410419 JSON .stringify ({
411420 ' offerId' : ' XXX' ,
Original file line number Diff line number Diff line change @@ -156,6 +156,7 @@ describe('Namespaces', () => {
156156 expect ( amadeus . shopping . flightOffers . pricing . post ) . toBeDefined ( ) ;
157157 expect ( amadeus . shopping . seatmaps . post ) . toBeDefined ( ) ;
158158 expect ( amadeus . booking . hotelBookings . post ) . toBeDefined ( ) ;
159+ expect ( amadeus . booking . hotelOrders . post ) . toBeDefined ( ) ;
159160 expect ( amadeus . shopping . transferOffers . post ) . toBeDefined ( ) ;
160161 expect ( amadeus . ordering . transferOrders . post ) . toBeDefined ( ) ;
161162 expect ( amadeus . ordering . transferOrder ( 'XXX' ) . transfers . cancellation . post ) . toBeDefined ( ) ;
@@ -451,7 +452,16 @@ describe('Namespaces', () => {
451452 amadeus . client . post = jest . fn ( ) ;
452453 amadeus . booking . hotelOrders . post ( ) ;
453454 expect ( amadeus . client . post )
454- . toHaveBeenCalledWith ( '/v2/booking/hotel-orders' , { } ) ;
455+ . toHaveBeenCalledWith ( '/v2/booking/hotel-orders' , JSON . stringify ( {
456+ data : {
457+ type : 'hotel-order' ,
458+ guests : [ ] ,
459+ travelAgent : { } ,
460+ roomAssociations : [ ] ,
461+ payment : { } ,
462+ arrivalInformation : { }
463+ }
464+ } ) ) ;
455465 } ) ;
456466
457467 it ( '.amadeus.eReputation.hotelSentiments.get' , ( ) => {
Original file line number Diff line number Diff line change @@ -29,7 +29,8 @@ class HotelOrders {
2929 * 'guests': [],
3030 * 'travel_agent: {},
3131 * 'room_associations: [],
32- * 'payment': {}
32+ * 'payment': {},
33+ * 'arrivalInformation': {}
3334 * });
3435 * ```
3536 */
You can’t perform that action at this time.
0 commit comments