Class: ESP::ExternalAccount
- Inherits:
-
Resource
- Object
- ActiveResource::Base
- Resource
- ESP::ExternalAccount
- Defined in:
- lib/esp/resources/external_account.rb
Class Method Summary collapse
-
.all ⇒ ActiveResource::PaginatedCollection<ESP::ExternalAccount>
Return a paginated list.
-
.create(attributes = {}) ⇒ ESP::ExternalAccount
Create an ExternalAccount.
-
.find(id) ⇒ ESP::ExternalAccount
Find an ExternalAccount by id.
-
.where(clauses = {}) ⇒ ActiveResource::PaginatedCollection<ESP::ExternalAccount>
Return a paginated ExternalAccount list filtered by search parameters.
Instance Method Summary collapse
-
#destroy ⇒ self
Delete an ExternalAccount.
-
#generate_external_id ⇒ String
Helper to generate an external id.
-
#organization ⇒ ESP::Organization
The organization the external account belongs to.
-
#reports ⇒ ActiveResource::PaginatedCollection<ESP::Report>
The collection of reports that belong to the team.
-
#save ⇒ Boolean
Create or update an ExternalAccount.
-
#scan_intervals ⇒ ActiveResource::PaginatedCollection<ESP::ScanInterval>
Returns a collection of scan_intervals for the external account.
-
#sub_organization ⇒ ESP::SubOrganization
The sub_organization the external account belongs to.
-
#team ⇒ ESP::Team
The team the external account belongs to.
Methods included from Dirty
#changed_attributes, #original_attributes, #original_attributes=
Methods included from LoadWithOriginalAttributes
Class Method Details
.all ⇒ ActiveResource::PaginatedCollection<ESP::ExternalAccount>
Return a paginated list
|
# File 'lib/esp/resources/external_account.rb', line 78
|
.create(attributes = {}) ⇒ ESP::ExternalAccount
Create an ExternalAccount. call-seq -> super.create(attributes={})
|
# File 'lib/esp/resources/external_account.rb', line 83
|
.find(id) ⇒ ESP::ExternalAccount .find(id, options = {}) ⇒ ESP::ExternalAccount
Find an ExternalAccount by id
call-seq -> super.find(id, options = {})
|
# File 'lib/esp/resources/external_account.rb', line 60
|
.where(clauses = {}) ⇒ ActiveResource::PaginatedCollection<ESP::ExternalAccount>
Return a paginated ExternalAccount list filtered by search parameters
call-seq -> super.where(clauses = {})
|
# File 'lib/esp/resources/external_account.rb', line 49
|
Instance Method Details
#destroy ⇒ self
Delete an ExternalAccount
|
# File 'lib/esp/resources/external_account.rb', line 107
|
#generate_external_id ⇒ String
Helper to generate an external id. Called automatically when creating an ExternalAccount if external_id
is not already set.
27 28 29 |
# File 'lib/esp/resources/external_account.rb', line 27 def generate_external_id SecureRandom.uuid end |
#organization ⇒ ESP::Organization
The organization the external account belongs to.
6 |
# File 'lib/esp/resources/external_account.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/external_account.rb', line 21 has_many :reports, class_name: 'ESP::Report' |
#save ⇒ Boolean
|
# File 'lib/esp/resources/external_account.rb', line 95
|
#scan_intervals ⇒ ActiveResource::PaginatedCollection<ESP::ScanInterval>
Returns a collection of scan_intervals for the external account
45 46 47 |
# File 'lib/esp/resources/external_account.rb', line 45 def scan_intervals ESP::ScanInterval.for_external_account(id) end |
#sub_organization ⇒ ESP::SubOrganization
The sub_organization the external account belongs to.
11 |
# File 'lib/esp/resources/external_account.rb', line 11 belongs_to :sub_organization, class_name: 'ESP::SubOrganization' |
#team ⇒ ESP::Team
The team the external account belongs to.
16 |
# File 'lib/esp/resources/external_account.rb', line 16 belongs_to :team, class_name: 'ESP::Team' |