Method: Megam::Promos#to_hash

Defined in:
lib/megam/core/promos.rb

#to_hashObject

Transform the ruby obj -> to a Hash



78
79
80
81
82
83
84
85
86
# File 'lib/megam/core/promos.rb', line 78

def to_hash
  index_hash = Hash.new
  index_hash["json_claz"] = self.class.name
  index_hash["id"] = id
  index_hash["code"] = code
  index_hash["amount"] = amount
  index_hash["created_at"] = created_at
  index_hash
end