Class: ESP::Team

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

Constant Summary

Constants inherited from Resource

Resource::PREDICATES

Instance Method Summary collapse

Methods inherited from Resource

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

Instance Method Details

#create_reportObject

Enqueue a report to be run for this team. Returns a Report object with a status of ‘queued’ and an id Periodically check the API

ESP::Report.find(<id>)

until status is ‘complete’. If not successful, returns a Report object with the errors object populated.



31
32
33
# File 'lib/esp/resources/team.rb', line 31

def create_report
  Report.create_for_team(id)
end

#custom_signaturesObject

The collection of custom_signatures that belong to the team.



21
22
23
# File 'lib/esp/resources/team.rb', line 21

def custom_signatures
  CustomSignature.where(teams_id_eq: id)
end

#external_accountsObject

The collection of external_accounts that belong to the team.



13
# File 'lib/esp/resources/team.rb', line 13

has_many :external_accounts, class_name: 'ESP::ExternalAccount'

#organizationObject

The organization this team belongs to.



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

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

#reportsObject

The collection of reports that belong to the team.



17
# File 'lib/esp/resources/team.rb', line 17

has_many :reports, class_name: 'ESP::Report'

#sub_organizationObject

The sub organization this team belongs to.



9
# File 'lib/esp/resources/team.rb', line 9

belongs_to :sub_organization, class_name: 'ESP::SubOrganization'