Class: GoogleApi::Ga::Account
Instance Attribute Summary
Attributes inherited from Management
#created, #id, #name, #updated
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Management
#camelize
Constructor Details
#initialize(account) ⇒ Account
Returns a new instance of Account.
5
6
7
|
# File 'lib/google_api/ga/management/account.rb', line 5
def initialize(account)
set(account)
end
|
Class Method Details
.all(account_id = '~all') ⇒ Object
9
10
11
|
# File 'lib/google_api/ga/management/account.rb', line 9
def self.all(account_id = '~all')
get({ accountId: account_id }).map { |account| Account.new(account) }
end
|
.find(account_id) ⇒ Object
13
14
15
|
# File 'lib/google_api/ga/management/account.rb', line 13
def self.find(account_id)
all(account_id).first
end
|
Instance Method Details
#refresh ⇒ Object
17
18
19
20
21
22
23
|
# File 'lib/google_api/ga/management/account.rb', line 17
def refresh
@webproperties = nil
set( Account.get({ accountId: @id }).first )
return true
end
|
#webproperties ⇒ Object
25
26
27
|
# File 'lib/google_api/ga/management/account.rb', line 25
def webproperties
@webproperties ||= Webproperty.all(@id)
end
|