Sha256: 309e7f56b008652eec2dfa587d44d7e2e01ab4af90f7174f004402b1fcf00c03

Contents?: true

Size: 867 Bytes

Versions: 14

Compression:

Stored size: 867 Bytes

Contents

module FbGraph
  class AdAccount < Node
    include Connections::AdCampaigns
    include Connections::AdGroups
    include Connections::AdCampaignStats
    include Connections::AdGroupStats
    include Connections::BroadTargetingCategories
    include Connections::ReachEstimates
    include Connections::AdConnectionObjects

    attr_accessor :account_id, :name, :account_status, :daily_spend_limit, :users, :currency, :timezone_id, :timezone_name, :capabilities, :account_groups

    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
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
fb_graph-2.2.4 lib/fb_graph/ad_account.rb
fb_graph-2.2.3 lib/fb_graph/ad_account.rb
fb_graph-2.2.2 lib/fb_graph/ad_account.rb
fb_graph-2.2.1 lib/fb_graph/ad_account.rb
fb_graph-2.2.0 lib/fb_graph/ad_account.rb
fb_graph-2.2.0.beta lib/fb_graph/ad_account.rb
fb_graph-2.2.0.alpha2 lib/fb_graph/ad_account.rb
fb_graph-2.2.0.alpha lib/fb_graph/ad_account.rb
fb_graph-2.1.13 lib/fb_graph/ad_account.rb
fb_graph-2.1.12 lib/fb_graph/ad_account.rb
fb_graph-2.1.11 lib/fb_graph/ad_account.rb
fb_graph-2.1.10 lib/fb_graph/ad_account.rb
fb_graph-2.1.9 lib/fb_graph/ad_account.rb
fb_graph-2.1.8 lib/fb_graph/ad_account.rb