Class: FbGraph::AdAccount
- Includes:
- Connections::AdCampaignStats, Connections::AdCampaigns, Connections::AdGroupStats, Connections::AdGroups, 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::ReachEstimates
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.
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_groups ⇒ Object
Returns the value of attribute account_groups.
9 10 11 |
# File 'lib/fb_graph/ad_account.rb', line 9 def account_groups @account_groups end |
#account_id ⇒ Object
Returns the value of attribute account_id.
9 10 11 |
# File 'lib/fb_graph/ad_account.rb', line 9 def account_id @account_id end |
#account_status ⇒ Object
Returns the value of attribute account_status.
9 10 11 |
# File 'lib/fb_graph/ad_account.rb', line 9 def account_status @account_status end |
#capabilities ⇒ Object
Returns the value of attribute capabilities.
9 10 11 |
# File 'lib/fb_graph/ad_account.rb', line 9 def capabilities @capabilities end |
#currency ⇒ Object
Returns the value of attribute currency.
9 10 11 |
# File 'lib/fb_graph/ad_account.rb', line 9 def currency @currency end |
#daily_spend_limit ⇒ Object
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 |
#name ⇒ Object
Returns the value of attribute name.
9 10 11 |
# File 'lib/fb_graph/ad_account.rb', line 9 def name @name end |
#timezone_id ⇒ Object
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_name ⇒ Object
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 |
#users ⇒ Object
Returns the value of attribute users.
9 10 11 |
# File 'lib/fb_graph/ad_account.rb', line 9 def users @users end |