Module: BookingSync::API::Client::RentalAgreements
- Included in:
- BookingSync::API::Client
- Defined in:
- lib/bookingsync/api/client/rental_agreements.rb
Instance Method Summary collapse
-
#create_rental_agreement(options = {}) ⇒ BookingSync::API::Resource
Create a new rental agreement for an account.
-
#create_rental_agreement_for_booking(booking, options = {}) ⇒ BookingSync::API::Resource
Create a new rental agreement for a booking.
-
#create_rental_agreement_for_rental(rental, options = {}) ⇒ BookingSync::API::Resource
Create a new rental agreement for a rental.
-
#rental_agreements(options = {}, &block) ⇒ Array<BookingSync::API::Resource>
List rental agreements.
Instance Method Details
#create_rental_agreement(options = {}) ⇒ BookingSync::API::Resource
Create a new rental agreement for an account.
48 49 50 |
# File 'lib/bookingsync/api/client/rental_agreements.rb', line 48 def create_rental_agreement( = {}) post(:rental_agreements, rental_agreements: []).pop end |
#create_rental_agreement_for_booking(booking, options = {}) ⇒ BookingSync::API::Resource
Create a new rental agreement for a booking.
28 29 30 31 |
# File 'lib/bookingsync/api/client/rental_agreements.rb', line 28 def create_rental_agreement_for_booking(booking, = {}) post("bookings/#{booking}/rental_agreements", rental_agreements: []).pop end |
#create_rental_agreement_for_rental(rental, options = {}) ⇒ BookingSync::API::Resource
Create a new rental agreement for a rental.
39 40 41 42 |
# File 'lib/bookingsync/api/client/rental_agreements.rb', line 39 def create_rental_agreement_for_rental(rental, = {}) post("rentals/#{rental}/rental_agreements", rental_agreements: []).pop end |
#rental_agreements(options = {}, &block) ⇒ Array<BookingSync::API::Resource>
List rental agreements.
Returns rental agreements for the rentals of the account
user is authenticated with.
18 19 20 |
# File 'lib/bookingsync/api/client/rental_agreements.rb', line 18 def rental_agreements( = {}, &block) paginate :rental_agreements, , &block end |