File tree Expand file tree Collapse file tree 2 files changed +4
-23
lines changed
src/amadeus/namespaces/booking Expand file tree Collapse file tree 2 files changed +4
-23
lines changed Original file line number Diff line number Diff line change @@ -452,16 +452,7 @@ describe('Namespaces', () => {
452452 amadeus . client . post = jest . fn ( ) ;
453453 amadeus . booking . hotelOrders . post ( ) ;
454454 expect ( amadeus . client . post )
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- } ) ) ;
455+ . toHaveBeenCalledWith ( '/v2/booking/hotel-orders' , { } ) ;
465456 } ) ;
466457
467458 it ( '.amadeus.eReputation.hotelSentiments.get' , ( ) => {
Original file line number Diff line number Diff line change @@ -27,26 +27,16 @@ class HotelOrders {
2727 * ```js
2828 * amadeus.booking.hotelOrders.post({
2929 * 'guests': [],
30- * 'travel_agent : {},
31- * 'room_associations : [],
30+ * 'travelAgent : {},
31+ * 'roomAssociations : [],
3232 * 'payment': {},
3333 * 'arrivalInformation': {}
3434 * });
3535 * ```
3636 */
3737 post ( params = { } ) {
38- const body = {
39- data : {
40- type : 'hotel-order' ,
41- guests : params . guests || [ ] ,
42- travelAgent : params . travelAgent || { } ,
43- roomAssociations : params . roomAssociations || [ ] ,
44- payment : params . payment || { } ,
45- arrivalInformation : params . arrivalInformation || { }
46- }
47- } ;
4838
49- return this . client . post ( '/v2/booking/hotel-orders' , JSON . stringify ( body ) ) ;
39+ return this . client . post ( '/v2/booking/hotel-orders' , params ) ;
5040 }
5141}
5242
You can’t perform that action at this time.
0 commit comments