Class: Zm::Client::ShareJsnsInitializer

Inherits:
Object
  • Object
show all
Defined in:
lib/zm/client/share/share_jsns_initializer.rb

Overview

class for account share

Class Method Summary collapse

Class Method Details

.create(parent, json) ⇒ Object



8
9
10
11
# File 'lib/zm/client/share/share_jsns_initializer.rb', line 8

def create(parent, json)
  item = Share.new(parent)
  update(item, json)
end

.update(item, json) ⇒ Object



13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/zm/client/share/share_jsns_initializer.rb', line 13

def update(item, json)
  item.ownerId = json[:ownerId]
  item.ownerEmail = json[:ownerEmail]
  item.ownerName = json[:ownerName]
  item.folderId = json[:folderId]
  item.folderUuid = json[:folderUuid]
  item.folderPath = json[:folderPath]
  item.view = json[:view]
  item.rights = json[:rights]
  item.granteeType = json[:granteeType]
  item.granteeId = json[:granteeId]
  item.granteeName = json[:granteeName]
  item.mid = json[:mid]

  item
end