Class: Zaptec::Installation

Inherits:
Object
  • Object
show all
Defined in:
lib/zaptec/installation.rb

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ Installation



3
4
5
# File 'lib/zaptec/installation.rb', line 3

def initialize(data)
  @data = data.deep_symbolize_keys
end

Instance Method Details

#addressObject



8
# File 'lib/zaptec/installation.rb', line 8

def address = @data[:Address]

#cityObject



10
# File 'lib/zaptec/installation.rb', line 10

def city = @data[:City]

#country_codeObject



12
# File 'lib/zaptec/installation.rb', line 12

def country_code = Constants.country_id_to_country_code(@data[:CountryId])

#idObject



7
# File 'lib/zaptec/installation.rb', line 7

def id = @data.fetch(:Id)

#latitudeObject



11
# File 'lib/zaptec/installation.rb', line 11

def latitude = @data[:Latitude]

#longitudeObject



13
# File 'lib/zaptec/installation.rb', line 13

def longitude = @data[:Longitude]

#zip_codeObject



9
# File 'lib/zaptec/installation.rb', line 9

def zip_code = @data[:ZipCode]