Class: Zm::Client::MountpointJsnsInitializer

Inherits:
Object
  • Object
show all
Defined in:
lib/zm/client/mountpoint/mountpoint_jsns_initializer.rb

Overview

class for initialize account mountpoint

Class Method Summary collapse

Class Method Details

.create(parent, json) ⇒ Object



8
9
10
11
# File 'lib/zm/client/mountpoint/mountpoint_jsns_initializer.rb', line 8

def create(parent, json)
  item = MountPoint.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
29
30
31
32
33
34
35
36
37
38
# File 'lib/zm/client/mountpoint/mountpoint_jsns_initializer.rb', line 13

def update(item, json)
  item.id = json[:id].to_i
  item.name = json[:name]
  item.owner = json[:owner]
  item.rev = json[:rev]
  item.reminder = json[:reminder]
  item.ms = json[:ms]
  item.deletable = json[:deletable]
  item.rid = json[:rid].to_i
  item.uuid = json[:uuid]
  item.url = json[:url]
  item.f = json[:f]
  item.broken = json[:broken]
  item.luuid = json[:luuid]
  item.ruuid = json[:ruuid]
  item.activesyncdisabled = json[:activesyncdisabled]
  item.absFolderPath = json[:absFolderPath]
  item.view = json[:view]
  item.zid = json[:zid]
  item.webOfflineSyncDays = json[:webOfflineSyncDays]
  item.l = json[:l].to_i
  item.color = json[:color].to_i
  item.rgb = json[:rgb].to_i

  item
end