Class: ESP::User

Inherits:
Resource
  • Object
show all
Defined in:
lib/esp/resources/user.rb

Instance Method Summary collapse

Methods inherited from Resource

arrange_options, filters, find, make_pageable, #serializable_hash, where

Instance Method Details

#destroyObject

Not Implemented. You cannot destroy a User.



13
14
15
# File 'lib/esp/resources/user.rb', line 13

def destroy
  fail ESP::NotImplementedError
end

#organizationObject

The organization this user belongs to.



5
# File 'lib/esp/resources/user.rb', line 5

belongs_to :organization, class_name: 'ESP::Organization'

#saveObject

Not Implemented. You cannot create or update a User.



8
9
10
# File 'lib/esp/resources/user.rb', line 8

def save
  fail ESP::NotImplementedError
end

#sub_organizationsObject

The collection of sub organizations that belong to the user.



19
20
21
# File 'lib/esp/resources/user.rb', line 19

def sub_organizations
  SubOrganization.find(:all, params: { id: sub_organization_ids })
end

#teamsObject

The collection of teams that belong to the user.



25
26
27
# File 'lib/esp/resources/user.rb', line 25

def teams
  Team.find(:all, params: { id: team_ids })
end