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_agreement(rental_agreement, options = {}) ⇒ BookingSync::API::Resource
Get a single rental_agreement.
-
#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.
59 60 61 |
# File 'lib/bookingsync/api/client/rental_agreements.rb', line 59 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.
39 40 41 42 |
# File 'lib/bookingsync/api/client/rental_agreements.rb', line 39 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.
50 51 52 53 |
# File 'lib/bookingsync/api/client/rental_agreements.rb', line 50 def create_rental_agreement_for_rental(rental, = {}) post("rentals/#{rental}/rental_agreements", rental_agreements: []).pop end |
#rental_agreement(rental_agreement, options = {}) ⇒ BookingSync::API::Resource
Get a single rental_agreement
29 30 31 |
# File 'lib/bookingsync/api/client/rental_agreements.rb', line 29 def rental_agreement(rental_agreement, = {}) get("rental_agreements/#{rental_agreement}", ).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 |