Class: HotelsPro::Api::ApiMethod
- Inherits:
-
Object
- Object
- HotelsPro::Api::ApiMethod
- Includes:
- ApiParams, Virtus
- Defined in:
- lib/hotels_pro/api/api_method.rb
Direct Known Subclasses
Methods::AllocateHotelCode, Methods::AmendHotelBooking, Methods::CancelHotelBooking, Methods::GetAvailableHotel, Methods::GetBalance, Methods::GetHotelBookingStatus, Methods::GetHotelCancellationPolicy, Methods::MakeHotelBooking
Defined Under Namespace
Classes: Result
Instance Method Summary collapse
Methods included from ApiParams
#api_param_name, #api_param_value, #to_api_params
Instance Method Details
#perform ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'lib/hotels_pro/api/api_method.rb', line 11 def perform response = request.perform if response.error? raise response.error else "#{self.class.name}::Result".constantize.new(response.data) end end |