Class: ESP::Team
- Inherits:
-
Resource
- Object
- ActiveResource::Base
- Resource
- ESP::Team
- Defined in:
- lib/esp/resources/team.rb
Class Method Summary collapse
-
.all ⇒ ActiveResource::PaginatedCollection<ESP::Team>
Return a paginated Team list.
-
.create(attributes = {}) ⇒ ESP::Team
Create a Team.
-
.find(id, options = {}) ⇒ ESP::Team
Find a Team by id.
-
.where(clauses = {}) ⇒ ActiveResource::PaginatedCollection<ESP::Team>
Return a paginated Team list filtered by search parameters.
Instance Method Summary collapse
-
#create_report ⇒ ESP::Report
Enqueue a report to be run for this team.
-
#custom_signatures ⇒ ActiveResource::PaginatedCollection<ESP::CustomSignature>
The collection of custom_signatures that belong to the team.
-
#destroy ⇒ self
Delete a Team.
-
#external_accounts ⇒ ActiveResource::PaginatedCollection<ESP::ExternalAccount>
The collection of external_accounts that belong to the team.
-
#organization ⇒ ESP::Organization
The organization this team belongs to.
-
#reports ⇒ ActiveResource::PaginatedCollection<ESP::Report>
The collection of reports that belong to the team.
-
#save ⇒ Boolean
Create and update a Team.
-
#sub_organization ⇒ ESP::SubOrganization
The sub organization this team belongs to.
Methods included from Dirty
#changed_attributes, #original_attributes, #original_attributes=
Methods included from LoadWithOriginalAttributes
Class Method Details
.all ⇒ ActiveResource::PaginatedCollection<ESP::Team>
Return a paginated Team list
|
# File 'lib/esp/resources/team.rb', line 69
|
.create(attributes = {}) ⇒ ESP::Team
Create a Team. call-seq -> super.create(attributes={})
|
# File 'lib/esp/resources/team.rb', line 74
|
.find(id, options = {}) ⇒ ESP::Team
Find a Team by id
call-seq -> super.find(id, options = {})
|
# File 'lib/esp/resources/team.rb', line 53
|
.where(clauses = {}) ⇒ ActiveResource::PaginatedCollection<ESP::Team>
Return a paginated Team list filtered by search parameters
call-seq -> super.where(clauses = {})
|
# File 'lib/esp/resources/team.rb', line 42
|
Instance Method Details
#create_report ⇒ ESP::Report
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.
38 39 40 |
# File 'lib/esp/resources/team.rb', line 38 def create_report Report.create_for_team(id) end |
#custom_signatures ⇒ ActiveResource::PaginatedCollection<ESP::CustomSignature>
The collection of custom_signatures that belong to the team.
26 27 28 |
# File 'lib/esp/resources/team.rb', line 26 def custom_signatures CustomSignature.where(teams_id_eq: id) end |
#destroy ⇒ self
Delete a Team.
|
# File 'lib/esp/resources/team.rb', line 102
|
#external_accounts ⇒ ActiveResource::PaginatedCollection<ESP::ExternalAccount>
The collection of external_accounts that belong to the team.
16 |
# File 'lib/esp/resources/team.rb', line 16 has_many :external_accounts, class_name: 'ESP::ExternalAccount' |
#organization ⇒ ESP::Organization
The organization this team belongs to.
6 |
# File 'lib/esp/resources/team.rb', line 6 belongs_to :organization, class_name: 'ESP::Organization' |
#reports ⇒ ActiveResource::PaginatedCollection<ESP::Report>
The collection of reports that belong to the team.
21 |
# File 'lib/esp/resources/team.rb', line 21 has_many :reports, class_name: 'ESP::Report' |
#save ⇒ Boolean
Create and update a Team.
Valid Attributes when updating
name
| Required | The new name of the team
Valid Attributes when creating
See API documentation for valid arguments
|
# File 'lib/esp/resources/team.rb', line 86
|
#sub_organization ⇒ ESP::SubOrganization
The sub organization this team belongs to.
11 |
# File 'lib/esp/resources/team.rb', line 11 belongs_to :sub_organization, class_name: 'ESP::SubOrganization' |