class Postmen::CreateLabelQuery

This class holds all the logic behind preparing query for creating a Label. It does type convertion, removes empty values and so on. @see LabelCollection#create Usage

Public Instance Methods

to_query() click to toggle source

Converts query object to hash @return [Hash]

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

Private Instance Methods

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