class Postmen::CreateRateQuery

This class holds all the logic behind preparing query for creating a Rate. It does type convertion, removes empty values and so on.

Public Instance Methods

to_query() click to toggle source

Converts query object to hash @return [Hash]

# File lib/postmen/query/create_rate_query.rb, line 15
def to_query
  {
    json: query
  }
end

Private Instance Methods

query() click to toggle source
# File lib/postmen/query/create_rate_query.rb, line 23
def query
  to_hash.reject { |_k, v| v.nil? }
end