const amadeus = require('../config/amadeusClient');

// Hotel Booking API v2
exports.createHotelBooking = async (bookingData) => {
  try {
    // bookingData should already have "data" key
    const response = await amadeus.booking.hotelOrders.post(bookingData);
    return response.data;
  } catch (error) {
    console.error('Hotel Booking Error:', error);
    throw error;
  }
};
