Module: BookingSync::API::Client::Rentals

Included in:
BookingSync::API::Client
Defined in:
lib/bookingsync/api/client/rentals.rb

Instance Method Summary collapse

Instance Method Details

#rentals(options = {}) ⇒ Array<Sawyer::Resource>

List rentals

Returns rentals for the account user is authenticated with.

Examples:

Get the list of rentals for the current account

rentals = @api.rentals
rentals.first.name # => "Small apartment"

Get the list of rentals only with name and description for smaller response

@api.rentals(fields: [:name, :description])

Parameters:

  • options (Hash) (defaults to: {})

    A customizable set of options.

Options Hash (options):

  • fields: (Array)

    List of fields to be fetched.

Returns:

  • (Array<Sawyer::Resource>)

    Array of rentals.



16
17
18
# File 'lib/bookingsync/api/client/rentals.rb', line 16

def rentals(options = {})
  get :rentals, options
end