Class: Zaptec::Installation
- Inherits:
-
Object
- Object
- Zaptec::Installation
- Defined in:
- lib/zaptec/installation.rb
Instance Method Summary collapse
- #address ⇒ Object
- #city ⇒ Object
- #country_code ⇒ Object
- #id ⇒ Object
-
#initialize(data) ⇒ Installation
constructor
A new instance of Installation.
- #latitude ⇒ Object
- #longitude ⇒ Object
- #zip_code ⇒ Object
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
#address ⇒ Object
8 |
# File 'lib/zaptec/installation.rb', line 8 def address = @data[:Address] |
#city ⇒ Object
10 |
# File 'lib/zaptec/installation.rb', line 10 def city = @data[:City] |
#country_code ⇒ Object
12 |
# File 'lib/zaptec/installation.rb', line 12 def country_code = Constants.country_id_to_country_code(@data[:CountryId]) |
#id ⇒ Object
7 |
# File 'lib/zaptec/installation.rb', line 7 def id = @data.fetch(:Id) |
#latitude ⇒ Object
11 |
# File 'lib/zaptec/installation.rb', line 11 def latitude = @data[:Latitude] |
#longitude ⇒ Object
13 |
# File 'lib/zaptec/installation.rb', line 13 def longitude = @data[:Longitude] |
#zip_code ⇒ Object
9 |
# File 'lib/zaptec/installation.rb', line 9 def zip_code = @data[:ZipCode] |