Module: Helium::Client::Organizations

Included in:
Helium::Client
Defined in:
lib/helium/client/organizations.rb

Instance Method Summary collapse

Instance Method Details

#organizationObject



4
5
6
7
8
# File 'lib/helium/client/organizations.rb', line 4

def organization
  response = get('/organization')
  org_data = JSON.parse(response.body)["data"]
  return Organization.new(client: self, params: org_data)
end

#organization_usersObject



10
11
12
13
14
15
16
17
18
19
# File 'lib/helium/client/organizations.rb', line 10

def organization_users
  response = get('/organization/user')
  users_data = JSON.parse(response.body)["data"]

  users = users_data.map do |user_data|
    User.new(client: self, params: user_data)
  end

  return users
end