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
12
# File 'lib/zm/client/mountpoint/mountpoint_jsns_initializer.rb', line 8

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

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

  item
end