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
Constant Summary collapse
- ATTRS =
[ :account_id, :name, :account_status, :daily_spend_limit, :users, :currency, :timezone_id, :timezone_name, :capabilities, :account_groups, :is_personal, :business_name, :business_street, :business_street2, :business_city, :business_state, :business_zip, :business_country_code, :vat_status, :agency_client_declaration, :spend_cap, :amount_spent ]
Instance Attribute Summary
Attributes inherited from Node
#access_token, #endpoint, #identifier, #raw_attributes
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.
39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/fb_graph/ad_account.rb', line 39 def initialize(identifier, attributes = {}) super ATTRS.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 |