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
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
Transform the ruby obj ->  to a Hash