Sha256: a7a04585a98ac3da41d854e256cdc939cf82bda5b884fea2d00e20f2e15efc51

Contents?: true

Size: 775 Bytes

Versions: 20

Compression:

Stored size: 775 Bytes

Contents

module Adparlor
  module Facebook
    module GraphApi
      class AdsPixelStat < GraphObject
        include Fields::AdsPixelStat
        include Traits::Methods
        field_attrs FIELDS

        def get(path, options)
          validate_options(options)
          super(path, options)
        end

        private

        def validate_options(options)
          options.delete(:fields) # just not required for this request so ignore them if they are passed
          raise FbError.new('invalid parameters passed', 500) if
            (options.keys.map(&:to_s) - %w(access_token aggregation end_time event start_time id)).any?
          raise FbError.new('required parameter aggregation missing', 500) if options[:aggregation].nil?
        end
      end
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
adparlor-facebook-0.8.2 lib/adparlor/facebook/graph_api/ads_pixel_stat.rb
adparlor-facebook-0.8.0 lib/adparlor/facebook/graph_api/ads_pixel_stat.rb
adparlor-facebook-0.7.9 lib/adparlor/facebook/graph_api/ads_pixel_stat.rb
adparlor-facebook-0.7.8 lib/adparlor/facebook/graph_api/ads_pixel_stat.rb
adparlor-facebook-0.7.7 lib/adparlor/facebook/graph_api/ads_pixel_stat.rb
adparlor-facebook-0.7.6 lib/adparlor/facebook/graph_api/ads_pixel_stat.rb
adparlor-facebook-0.7.5 lib/adparlor/facebook/graph_api/ads_pixel_stat.rb
adparlor-facebook-0.7.4 lib/adparlor/facebook/graph_api/ads_pixel_stat.rb
adparlor-facebook-0.7.3 lib/adparlor/facebook/graph_api/ads_pixel_stat.rb
adparlor-facebook-0.7.2 lib/adparlor/facebook/graph_api/ads_pixel_stat.rb
adparlor-facebook-0.7.1 lib/adparlor/facebook/graph_api/ads_pixel_stat.rb
adparlor-facebook-0.7.0 lib/adparlor/facebook/graph_api/ads_pixel_stat.rb
adparlor-facebook-0.6.6 lib/adparlor/facebook/graph_api/ads_pixel_stat.rb
adparlor-facebook-0.6.5 lib/adparlor/facebook/graph_api/ads_pixel_stat.rb
adparlor-facebook-0.6.4 lib/adparlor/facebook/graph_api/ads_pixel_stat.rb
adparlor-facebook-0.6.3 lib/adparlor/facebook/graph_api/ads_pixel_stat.rb
adparlor-facebook-0.6.2 lib/adparlor/facebook/graph_api/ads_pixel_stat.rb
adparlor-facebook-0.6.1 lib/adparlor/facebook/graph_api/ads_pixel_stat.rb
adparlor-facebook-0.6.0 lib/adparlor/facebook/graph_api/ads_pixel_stat.rb
adparlor-facebook-0.5.9 lib/adparlor/facebook/graph_api/ads_pixel_stat.rb