Class: ESP::Team
- Defined in:
- lib/esp/resources/team.rb
Constant Summary
Constants inherited from Resource
Instance Method Summary collapse
-
#create_report ⇒ Object
Enqueue a report to be run for this team.
-
#custom_signatures ⇒ Object
The collection of custom_signatures that belong to the team.
-
#external_accounts ⇒ Object
The collection of external_accounts that belong to the team.
-
#organization ⇒ Object
The organization this team belongs to.
-
#reports ⇒ Object
The collection of reports that belong to the team.
-
#sub_organization ⇒ Object
The sub organization this team belongs to.
Methods inherited from Resource
arrange_options, filters, find, make_pageable, #serializable_hash, where
Instance Method Details
#create_report ⇒ Object
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_signatures ⇒ Object
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_accounts ⇒ Object
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' |
#organization ⇒ Object
The organization this team belongs to.
5 |
# File 'lib/esp/resources/team.rb', line 5 belongs_to :organization, class_name: 'ESP::Organization' |
#reports ⇒ Object
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_organization ⇒ Object
The sub organization this team belongs to.
9 |
# File 'lib/esp/resources/team.rb', line 9 belongs_to :sub_organization, class_name: 'ESP::SubOrganization' |