154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
|
# File 'lib/megam/core/billingtransactions.rb', line 154
def self.json_create(o)
bal = new({})
bal.id(o["id"]) if o.has_key?("id")
bal.accounts_id(o["accounts_id"]) if o.has_key?("accounts_id")
bal.gateway(o["gateway"]) if o.has_key?("gateway")
bal.amountin(o["amountin"]) if o.has_key?("amountin")
bal.amountout(o["amountout"]) if o.has_key?("amountout")
bal.fees(o["fees"]) if o.has_key?("fees")
bal.tranid(o["tranid"]) if o.has_key?("tranid")
bal.trandate(o["trandate"]) if o.has_key?("trandate")
bal.currency_type(o["currency_type"]) if o.has_key?("currency_type")
bal.created_at(o["created_at"]) if o.has_key?("created_at")
bal.some_msg[:code] = o["code"] if o.has_key?("code")
bal.some_msg[:msg_type] = o["msg_type"] if o.has_key?("msg_type")
bal.some_msg[:msg]= o["msg"] if o.has_key?("msg")
bal.some_msg[:links] = o["links"] if o.has_key?("links")
bal
end
|