Module: BookingSync::API::Client::LivingRooms
- Included in:
- BookingSync::API::Client
- Defined in:
- lib/bookingsync/api/client/living_rooms.rb
Instance Method Summary collapse
-
#cancel_living_room(living_room) ⇒ NilClass
Cancel a living_room.
-
#create_living_room(rental, options = {}) ⇒ BookingSync::API::Resource
Create a new living_room.
-
#edit_living_room(living_room, options = {}) ⇒ BookingSync::API::Resource
Edit a living_room.
-
#living_room(living_room, options = {}) ⇒ BookingSync::API::Resource
Get a single living_room.
-
#living_rooms(options = {}, &block) ⇒ Array<BookingSync::API::Resource>
List living_rooms.
Instance Method Details
#cancel_living_room(living_room) ⇒ NilClass
Cancel a living_room
60 61 62 |
# File 'lib/bookingsync/api/client/living_rooms.rb', line 60 def cancel_living_room(living_room) delete "living_rooms/#{living_room}" end |
#create_living_room(rental, options = {}) ⇒ BookingSync::API::Resource
Create a new living_room
37 38 39 |
# File 'lib/bookingsync/api/client/living_rooms.rb', line 37 def create_living_room(rental, = {}) post("rentals/#{rental}/living_rooms", living_rooms: []).pop end |
#edit_living_room(living_room, options = {}) ⇒ BookingSync::API::Resource
Edit a living_room
51 52 53 |
# File 'lib/bookingsync/api/client/living_rooms.rb', line 51 def edit_living_room(living_room, = {}) put("living_rooms/#{living_room}", living_rooms: []).pop end |
#living_room(living_room, options = {}) ⇒ BookingSync::API::Resource
Get a single living_room
27 28 29 |
# File 'lib/bookingsync/api/client/living_rooms.rb', line 27 def living_room(living_room, = {}) get("living_rooms/#{living_room}", ).pop end |
#living_rooms(options = {}, &block) ⇒ Array<BookingSync::API::Resource>
List living_rooms
Returns living_rooms for the account user is authenticated with.
16 17 18 |
# File 'lib/bookingsync/api/client/living_rooms.rb', line 16 def living_rooms( = {}, &block) paginate :living_rooms, , &block end |