Module: Xotelia::Bookings
- Included in:
- Client
- Defined in:
- lib/xotelia/bookings.rb
Instance Method Summary collapse
- #create_booking(ota, params = {}) ⇒ Object
- #destroy_booking(ota, params = {}) ⇒ Object
- #list_bookings(start_date, end_date) ⇒ Object
- #update_booking(ota, params = {}) ⇒ Object
Instance Method Details
#create_booking(ota, params = {}) ⇒ Object
7 8 9 |
# File 'lib/xotelia/bookings.rb', line 7 def create_booking(ota, params = {}) call_api(:post, 'bookings/#{ota}', params) end |
#destroy_booking(ota, params = {}) ⇒ Object
15 16 17 |
# File 'lib/xotelia/bookings.rb', line 15 def destroy_booking(ota, params = {}) call_api(:delete, 'bookings/#{ota}', params) end |
#list_bookings(start_date, end_date) ⇒ Object
3 4 5 |
# File 'lib/xotelia/bookings.rb', line 3 def list_bookings(start_date, end_date) call_api(:get, "bookings?start_date=#{start_date.to_date.to_json}&end_date=#{end_date.to_date.to_json}") end |
#update_booking(ota, params = {}) ⇒ Object
11 12 13 |
# File 'lib/xotelia/bookings.rb', line 11 def update_booking(ota, params = {}) call_api(:put, 'bookings/#{ota}', params) end |