Class: Zm::Client::IdentityJsnsInitializer
- Inherits:
-
Object
- Object
- Zm::Client::IdentityJsnsInitializer
- Defined in:
- lib/zm/client/identity/identity_jsns_initializer.rb
Overview
class for initialize account identity
Class Method Summary collapse
Class Method Details
.create(parent, json) ⇒ Object
8 9 10 11 12 |
# File 'lib/zm/client/identity/identity_jsns_initializer.rb', line 8 def create(parent, json) Identity.new(parent).tap do |item| update(item, json) end end |
.update(item, json) ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/zm/client/identity/identity_jsns_initializer.rb', line 14 def update(item, json) item.id = json.delete(:id) item.name = json.delete(:name) return item if json[:_attrs].nil? || json[:_attrs].empty? json[:_attrs].each do |k, v| m = Utils.equals_name(k) item.send(m, v) if item.respond_to?(m) end item end |