Class: DataComApi::QueryParameters

Inherits:
Hashie::Trash
  • Object
show all
Defined in:
lib/data-com-api/query_parameters.rb

Constant Summary collapse

UNALLOWED_FIELDS =
[
  :offset,
  :pageSize,
  :page_size,
  :username,
  :password,
  :token
].freeze

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.stringify_hash_values(hash) ⇒ Object

Destructively convert all values using into strings



54
55
56
57
58
59
# File 'lib/data-com-api/query_parameters.rb', line 54

def self.stringify_hash_values(hash)
  hash.each_pair do |key, value|
    hash[key] = value.to_s
  end
  hash
end

Instance Method Details

#to_hashObject



61
62
63
# File 'lib/data-com-api/query_parameters.rb', line 61

def to_hash
  self.class.stringify_hash_values(super)
end