Sha256: 9cd20365dbdca22e27276b463803cbca4ef18c32fe0a930d882baa72c3cac819

Contents?: true

Size: 636 Bytes

Versions: 3

Compression:

Stored size: 636 Bytes

Contents

require 'httparty'
require 'json'
require 'uri'

require 'flapjack-diner/version'
require 'flapjack-diner/argument_validator'

module Flapjack
  module Diner
    module Resources
      module Statistics
        def statistics(*args)
          ids, data = unwrap_ids(*args), unwrap_data(*args)
          validate_params(data) do
            validate :query => :fields,  :as => :string_or_array_of_strings
            validate :query => :filter,  :as => :hash
            validate :query => [:page, :per_page], :as => :positive_integer
          end
          perform_get('/statistics', ids, data)
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
flapjack-diner-2.0.0.pre.alpha.3 lib/flapjack-diner/resources/statistics.rb
flapjack-diner-2.0.0.pre.alpha.2 lib/flapjack-diner/resources/statistics.rb
flapjack-diner-2.0.0.pre.alpha.1 lib/flapjack-diner/resources/statistics.rb