class Helium::Organization
Attributes
name[R]
timezone[R]
Public Class Methods
new(opts = {})
click to toggle source
Calls superclass method
# File lib/helium/organization.rb, line 5 def initialize(opts = {}) super(opts) @name = @params.dig('attributes', 'name') @timezone = @params.dig('attributes', 'timezone') end
Public Instance Methods
as_json()
click to toggle source
Calls superclass method
# File lib/helium/organization.rb, line 33 def as_json super.merge({ name: name, timezone: timezone }) end
elements()
click to toggle source
# File lib/helium/organization.rb, line 25 def elements Collection.new(klass: Element, client: @client, belongs_to: self) end
labels()
click to toggle source
# File lib/helium/organization.rb, line 21 def labels Collection.new(klass: Label, client: @client, belongs_to: self) end
resource_path()
click to toggle source
# File lib/helium/organization.rb, line 12 def resource_path "/organization" end
sensors()
click to toggle source
# File lib/helium/organization.rb, line 29 def sensors Collection.new(klass: Sensor, client: @client, belongs_to: self) end
users()
click to toggle source
TODO refactor into relationships
# File lib/helium/organization.rb, line 17 def users Collection.new(klass: User, client: @client, belongs_to: self) end