class Alman::Booking
Attributes
created_at[RW]
created_at_rfc822[RW]
end_at[RW]
end_at_rfc822[RW]
id[RW]
meta[RW]
object[RW]
start_at[RW]
start_at_rfc822[RW]
updated_at[RW]
updated_at_rfc822[RW]
Public Class Methods
all(params={}, headers={})
click to toggle source
# File lib/alman/resources/booking.rb, line 15 def self.all(params={}, headers={}) res = client.bookings.all(params, headers) res end
retrieve(booking_id, params={}, headers={})
click to toggle source
# File lib/alman/resources/booking.rb, line 20 def self.retrieve(booking_id, params={}, headers={}) res = client.bookings.retrieve(booking_id, params, headers) res end
update(booking_id, params={}, headers={})
click to toggle source
# File lib/alman/resources/booking.rb, line 25 def self.update(booking_id, params={}, headers={}) res = client.bookings.update(booking_id, params, headers) res end
Public Instance Methods
delete(params={}, headers={})
click to toggle source
# File lib/alman/resources/booking.rb, line 35 def delete(params={}, headers={}) res = client.bookings.delete(id, params, headers) self.refresh_from(res.json, res.api_method, res.client) end
refresh(params={}, headers={})
click to toggle source
# File lib/alman/resources/booking.rb, line 30 def refresh(params={}, headers={}) res = client.bookings.retrieve(id, params, headers) self.refresh_from(res.json, res.api_method, res.client) end
save(params={}, headers={})
click to toggle source
# File lib/alman/resources/booking.rb, line 40 def save(params={}, headers={}) params = ParamsBuilder.merge(api_attributes, params) res = client.bookings.update(id, params, headers) self.refresh_from(res.json, res.api_method, res.client) end