Sha256: c53f662c81c7705e93df77a07664a5e30d2c81fe8fdddb925d95acab71615616

Contents?: true

Size: 535 Bytes

Versions: 12

Compression:

Stored size: 535 Bytes

Contents

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

      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
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
helium-ruby-0.12.0 lib/helium/client/organizations.rb
helium-ruby-0.11.0 lib/helium/client/organizations.rb
helium-ruby-0.10.0 lib/helium/client/organizations.rb
helium-ruby-0.9.0 lib/helium/client/organizations.rb
helium-ruby-0.8.0 lib/helium/client/organizations.rb
helium-ruby-0.7.0 lib/helium/client/organizations.rb
helium-ruby-0.6.0 lib/helium/client/organizations.rb
helium-ruby-0.5.0 lib/helium/client/organizations.rb
helium-ruby-0.4.0 lib/helium/client/organizations.rb
helium-ruby-0.3.0 lib/helium/client/organizations.rb
helium-ruby-0.2.0 lib/helium/client/organizations.rb
helium-ruby-0.1.0 lib/helium/client/organizations.rb