Class: Rentvine::Property

Inherits:
RentvineModel show all
Defined in:
lib/rentvine/model/property.rb

Instance Method Summary collapse

Methods inherited from RentvineModel

#error?

Constructor Details

#initialize(data = {}) ⇒ Property

Returns a new instance of Property.



3
4
5
# File 'lib/rentvine/model/property.rb', line 3

def initialize(data = {})
  super(data)
end

Instance Method Details

#to_rentvine_hashObject



7
8
9
10
11
12
13
14
# File 'lib/rentvine/model/property.rb', line 7

def to_rentvine_hash
  retval = super()
  unit = retval.delete(:unit)
  {
    property: retval,
    unit: unit
  }
end