Class: FbGraph::AdAccount
- Includes:
- Connections::AdCampaignStats, Connections::AdCampaigns, Connections::AdConnectionObjects, Connections::AdGroupStats, Connections::AdGroups, Connections::AdPreviews, Connections::BroadTargetingCategories, Connections::ReachEstimates
- Defined in:
- lib/fb_graph/ad_account.rb
Instance Attribute Summary collapse
-
#account_groups ⇒ Object
Returns the value of attribute account_groups.
-
#account_id ⇒ Object
Returns the value of attribute account_id.
-
#account_status ⇒ Object
Returns the value of attribute account_status.
-
#capabilities ⇒ Object
Returns the value of attribute capabilities.
-
#currency ⇒ Object
Returns the value of attribute currency.
-
#daily_spend_limit ⇒ Object
Returns the value of attribute daily_spend_limit.
-
#name ⇒ Object
Returns the value of attribute name.
-
#timezone_id ⇒ Object
Returns the value of attribute timezone_id.
-
#timezone_name ⇒ Object
Returns the value of attribute timezone_name.
-
#users ⇒ Object
Returns the value of attribute users.
Attributes inherited from Node
#access_token, #endpoint, #identifier
Instance Method Summary collapse
-
#initialize(identifier, attributes = {}) ⇒ AdAccount
constructor
A new instance of AdAccount.
Methods included from Connections::AdPreviews
Methods included from Connections::AdConnectionObjects
Methods included from Connections::ReachEstimates
Methods included from Connections::BroadTargetingCategories
Methods included from Connections::AdGroupStats
Methods included from Connections::AdCampaignStats
Methods included from Connections::AdGroups
Methods included from Connections::AdCampaigns
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_groups ⇒ Object
Returns the value of attribute account_groups.
12 13 14 |
# File 'lib/fb_graph/ad_account.rb', line 12 def account_groups @account_groups end |
#account_id ⇒ Object
Returns the value of attribute account_id.
12 13 14 |
# File 'lib/fb_graph/ad_account.rb', line 12 def account_id @account_id end |
#account_status ⇒ Object
Returns the value of attribute account_status.
12 13 14 |
# File 'lib/fb_graph/ad_account.rb', line 12 def account_status @account_status end |
#capabilities ⇒ Object
Returns the value of attribute capabilities.
12 13 14 |
# File 'lib/fb_graph/ad_account.rb', line 12 def capabilities @capabilities end |
#currency ⇒ Object
Returns the value of attribute currency.
12 13 14 |
# File 'lib/fb_graph/ad_account.rb', line 12 def currency @currency end |
#daily_spend_limit ⇒ Object
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 |
#name ⇒ Object
Returns the value of attribute name.
12 13 14 |
# File 'lib/fb_graph/ad_account.rb', line 12 def name @name end |
#timezone_id ⇒ Object
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_name ⇒ Object
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 |
#users ⇒ Object
Returns the value of attribute users.
12 13 14 |
# File 'lib/fb_graph/ad_account.rb', line 12 def users @users end |