Class: FbGraph::AdAccount

Inherits:
Node
  • Object
show all
Includes:
Connections::AdCampaignStats, Connections::AdCampaigns, Connections::AdGroupStats, Connections::AdGroups, Connections::ReachEstimates
Defined in:
lib/fb_graph/ad_account.rb

Instance Attribute Summary collapse

Attributes inherited from Node

#access_token, #endpoint, #identifier

Instance Method Summary collapse

Methods included from Connections::ReachEstimates

#reach_estimates

Methods included from Connections::AdGroupStats

#ad_group_stats

Methods included from Connections::AdCampaignStats

#ad_campaign_stats

Methods included from Connections::AdGroups

#ad_group!, #ad_groups

Methods included from Connections::AdCampaigns

#ad_campaign!, #ad_campaigns

Methods inherited from Node

#connection, #destroy, fetch, #fetch, #update

Methods included from Comparison

#==

Constructor Details

#initialize(identifier, attributes = {}) ⇒ AdAccount

Returns a new instance of AdAccount.



11
12
13
14
15
16
17
18
19
20
21
# File 'lib/fb_graph/ad_account.rb', line 11

def initialize(identifier, attributes = {})
  super

  %w(account_id name account_status daily_spend_limit users currency timezone_id timezone_name).each do |field|
    send("#{field}=", attributes[field.to_sym])
  end

  if attributes[:users]
    self.users = attributes[:users].collect { |u| FbGraph::AdUser.new(u["uid"], u) }
  end
end

Instance Attribute Details

#account_groupsObject

Returns the value of attribute account_groups.



9
10
11
# File 'lib/fb_graph/ad_account.rb', line 9

def 
  @account_groups
end

#account_idObject

Returns the value of attribute account_id.



9
10
11
# File 'lib/fb_graph/ad_account.rb', line 9

def 
  @account_id
end

#account_statusObject

Returns the value of attribute account_status.



9
10
11
# File 'lib/fb_graph/ad_account.rb', line 9

def 
  @account_status
end

#capabilitiesObject

Returns the value of attribute capabilities.



9
10
11
# File 'lib/fb_graph/ad_account.rb', line 9

def capabilities
  @capabilities
end

#currencyObject

Returns the value of attribute currency.



9
10
11
# File 'lib/fb_graph/ad_account.rb', line 9

def currency
  @currency
end

#daily_spend_limitObject

Returns the value of attribute daily_spend_limit.



9
10
11
# File 'lib/fb_graph/ad_account.rb', line 9

def daily_spend_limit
  @daily_spend_limit
end

#nameObject

Returns the value of attribute name.



9
10
11
# File 'lib/fb_graph/ad_account.rb', line 9

def name
  @name
end

#timezone_idObject

Returns the value of attribute timezone_id.



9
10
11
# File 'lib/fb_graph/ad_account.rb', line 9

def timezone_id
  @timezone_id
end

#timezone_nameObject

Returns the value of attribute timezone_name.



9
10
11
# File 'lib/fb_graph/ad_account.rb', line 9

def timezone_name
  @timezone_name
end

#usersObject

Returns the value of attribute users.



9
10
11
# File 'lib/fb_graph/ad_account.rb', line 9

def users
  @users
end