Module: BookingSync::API::Client::RentalsAmenities
- Included in:
- BookingSync::API::Client
- Defined in:
- lib/bookingsync/api/client/rentals_amenities.rb
Instance Method Summary collapse
-
#create_rentals_amenity(rental, options = {}) ⇒ BookingSync::API::Resource
Create a rental’s amenity.
-
#delete_rentals_amenity(rentals_amenity) ⇒ NilClass
Delete a rentals_amenity.
-
#edit_rentals_amenity(rentals_amenity, options = {}) ⇒ BookingSync::API::Resource
Edit a rentals_amenity.
-
#rentals_amenities(options = {}, &block) ⇒ Array<BookingSync::API::Resource>
List rentals_amenities.
-
#rentals_amenity(rentals_amenity) ⇒ BookingSync::API::Resource
Get a single rentals_amenity.
Instance Method Details
#create_rentals_amenity(rental, options = {}) ⇒ BookingSync::API::Resource
Create a rental’s amenity
37 38 39 |
# File 'lib/bookingsync/api/client/rentals_amenities.rb', line 37 def create_rentals_amenity(rental, = {}) post("rentals/#{rental}/rentals_amenities", rentals_amenities: []).pop end |
#delete_rentals_amenity(rentals_amenity) ⇒ NilClass
Delete a rentals_amenity
60 61 62 |
# File 'lib/bookingsync/api/client/rentals_amenities.rb', line 60 def delete_rentals_amenity(rentals_amenity) delete "rentals_amenities/#{rentals_amenity}" end |
#edit_rentals_amenity(rentals_amenity, options = {}) ⇒ BookingSync::API::Resource
Edit a rentals_amenity
51 52 53 |
# File 'lib/bookingsync/api/client/rentals_amenities.rb', line 51 def edit_rentals_amenity(rentals_amenity, = {}) put("rentals_amenities/#{rentals_amenity}", rentals_amenities: []).pop end |
#rentals_amenities(options = {}, &block) ⇒ Array<BookingSync::API::Resource>
List rentals_amenities
Returns all amenities used by rentals for the current account.
15 16 17 |
# File 'lib/bookingsync/api/client/rentals_amenities.rb', line 15 def rentals_amenities( = {}, &block) paginate :rentals_amenities, , &block end |
#rentals_amenity(rentals_amenity) ⇒ BookingSync::API::Resource
Get a single rentals_amenity
rentals_amenity or ID of the rentals_amenity.
24 25 26 |
# File 'lib/bookingsync/api/client/rentals_amenities.rb', line 24 def rentals_amenity(rentals_amenity) get("rentals_amenities/#{rentals_amenity}").pop end |