Class: Openlive::Booking
Instance Attribute Summary
Attributes inherited from Base
Class Method Summary collapse
-
.create(attributes) ⇒ Booking
Create a new booking on Openlive.
-
.delete(id) ⇒ Truthy
Delete an existing booking on Openlive.
-
.find(id) ⇒ Booking
Find and return a booking record.
Instance Method Summary collapse
-
#delete ⇒ Truthy
Convenience method for deleting this booking.
Methods inherited from Base
connection, #connection, handle_response, #initialize, #method_missing, #oauth, oauth, #refresh
Constructor Details
This class inherits a constructor from Openlive::Base
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Openlive::Base
Class Method Details
.create(attributes) ⇒ Booking
Create a new booking on Openlive
34 35 36 37 38 39 40 |
# File 'lib/openlive/booking.rb', line 34 def create(attributes) response = Request.post("bookings", format_attributes(attributes)) handle_response(response, error_class: APIError) do |response| new(response.body, response: response) end end |
Instance Method Details
#delete ⇒ Truthy
Convenience method for deleting this booking
7 8 9 |
# File 'lib/openlive/booking.rb', line 7 def delete self.class.delete(id) end |