Class: PropertySolutions::Units
- Inherits:
-
ApiConsumer
- Object
- ApiConsumer
- PropertySolutions::Units
- Defined in:
- app/models/property_solutions/units.rb
Constant Summary collapse
- @@field_order =
'id'
- @@base =
'propertyunits'
Class Method Summary collapse
-
.where(options) ⇒ Object
Pulls a list of Unit availability and their pricing.
Methods inherited from ApiConsumer
Class Method Details
.where(options) ⇒ Object
Pulls a list of Unit availability and their pricing
23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'app/models/property_solutions/units.rb', line 23 def self.where() resp = self.request('getUnitsAvailabilityAndPricing', { 'propertyId' => ['property_id'], # [Integer] required 'floorplanId' => ['floor_plan_id'], # [Integer] optional 'unitTypeId' => ['unit_type_id'], # [Integer] optional 'propertyUnitId' => ['unit_id'], # [Integer] optional 'availableUnitsOnly' => ['available'] # [Boolean] optional }) return resp #return [] if !resp || resp['PhysicalProperty'].nil? || resp['PhysicalProperty']['Property'].nil? #units = resp['PhysicalProperty']['Property'].collect { |p| Property.new(p) } #units = self.sort(units) #return units end |