Class: Thesslstore::Order::NewOrder

Inherits:
Object
  • Object
show all
Defined in:
lib/thesslstore/order/new_order.rb

Instance Method Summary collapse

Instance Method Details

#as_json(opts = nil) ⇒ Object



40
41
42
43
44
45
46
47
48
49
# File 'lib/thesslstore/order/new_order.rb', line 40

def as_json(opts = nil)
  hash = super
  hash.reject! do |k,v|
    if Array === v
      v.empty?
    else
      v.nil?
    end
  end
end