Class: FbGraph::AdAccount

Instance Attribute Summary collapse

Attributes inherited from Node

#access_token, #endpoint, #identifier

Instance Method Summary collapse

Methods included from Connections::AdPreviews

#ad_previews

Methods included from Connections::AdConnectionObjects

#connection_objects

Methods included from Connections::ReachEstimates

#reach_estimates

Methods included from Connections::BroadTargetingCategories

#broad_targeting_categories

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.



14
15
16
17
18
19
20
21
22
23
24
# File 'lib/fb_graph/ad_account.rb', line 14

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.



12
13
14
# File 'lib/fb_graph/ad_account.rb', line 12

def 
  @account_groups
end

#account_idObject

Returns the value of attribute account_id.



12
13
14
# File 'lib/fb_graph/ad_account.rb', line 12

def 
  @account_id
end

#account_statusObject

Returns the value of attribute account_status.



12
13
14
# File 'lib/fb_graph/ad_account.rb', line 12

def 
  @account_status
end

#capabilitiesObject

Returns the value of attribute capabilities.



12
13
14
# File 'lib/fb_graph/ad_account.rb', line 12

def capabilities
  @capabilities
end

#currencyObject

Returns the value of attribute currency.



12
13
14
# File 'lib/fb_graph/ad_account.rb', line 12

def currency
  @currency
end

#daily_spend_limitObject

Returns the value of attribute daily_spend_limit.



12
13
14
# File 'lib/fb_graph/ad_account.rb', line 12

def daily_spend_limit
  @daily_spend_limit
end

#nameObject

Returns the value of attribute name.



12
13
14
# File 'lib/fb_graph/ad_account.rb', line 12

def name
  @name
end

#timezone_idObject

Returns the value of attribute timezone_id.



12
13
14
# File 'lib/fb_graph/ad_account.rb', line 12

def timezone_id
  @timezone_id
end

#timezone_nameObject

Returns the value of attribute timezone_name.



12
13
14
# File 'lib/fb_graph/ad_account.rb', line 12

def timezone_name
  @timezone_name
end

#usersObject

Returns the value of attribute users.



12
13
14
# File 'lib/fb_graph/ad_account.rb', line 12

def users
  @users
end