Class: Postmen::CreateLabelQuery

Inherits:
Dry::Struct
  • Object
show all
Defined in:
lib/postmen/query/create_label_query.rb

Overview

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

See Also:

Instance Method Summary collapse

Instance Method Details

#to_queryHash

Converts query object to hash

Returns:

  • (Hash)


23
24
25
26
27
# File 'lib/postmen/query/create_label_query.rb', line 23

def to_query
  {
    json: query
  }
end