88
89
90
91
92
93
94
95
96
97
98
99
100
|
# File 'lib/megam/core/credits.rb', line 88
def self.json_create(o)
cr = new({})
cr.id(o["id"]) if o.has_key?("id")
cr.account_id(o["account_id"]) if o.has_key?("account_id")
cr.credit(o["credit"]) if o.has_key?("credit")
cr.created_at(o["created_at"]) if o.has_key?("created_at")
cr.some_msg[:code] = o["code"] if o.has_key?("code")
cr.some_msg[:msg_type] = o["msg_type"] if o.has_key?("msg_type")
cr.some_msg[:msg]= o["msg"] if o.has_key?("msg")
cr.some_msg[:links] = o["links"] if o.has_key?("links")
cr
end
|