Module: Rentlinx::PropertyClientMethods

Included in:
Client
Defined in:
lib/rentlinx/modules/property_client_methods.rb

Overview

Client methods for property

Instance Method Summary collapse

Instance Method Details

#get_units_for_property_id(id) ⇒ Object

Gets all the units for a given property id

Parameters:

  • id (String)

    the id of the property

Returns:

  • a list of Rentlinx::Unit objects



8
9
10
11
12
13
# File 'lib/rentlinx/modules/property_client_methods.rb', line 8

def get_units_for_property_id(id)
  data = request('GET', "properties/#{id}/units")['data']
  data.map do |unit_data|
    Unit.new(symbolize_data(unit_data))
  end
end