202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
|
# File 'lib/megam/core/flavors.rb', line 202
def self.json_create(o)
fav = new({})
fav.id(o['id']) if o.key?('id')
fav.org_id(o['org_id']) if o.key?('org_id')
fav.account_id(o["account_id"]) if o.has_key?("account_id")
fav.name(o['name']) if o.key?('name')
fav.cpu(o['cpu']) if o.key?('cpu')
fav.ram(o['ram']) if o.key?('ram')
fav.disk(o['disk']) if o.key?('disk')
fav.regions(o['regions']) if o.key?('regions')
fav.price(o['price']) if o.key?('price')
fav.properties(o['properties']) if o.key?('properties')
fav.category(o['category']) if o.key?('category')
fav.status(o['status']) if o.key?('status')
fav.created_at(o['created_at']) if o.key?('created_at')
fav.updated_at(o['updated_at']) if o.key?('updated_at')
fav.some_msg[:code] = o["code"] if o.has_key?("code")
fav.some_msg[:msg_type] = o["msg_type"] if o.has_key?("msg_type")
fav.some_msg[:msg]= o["msg"] if o.has_key?("msg")
fav.some_msg[:links] = o["links"] if o.has_key?("links")
fav
end
|