Class: Zm::Client::TaskJsnsInitializer

Inherits:
Object
  • Object
show all
Defined in:
lib/zm/client/task/task_jsns_initializer.rb

Overview

class for account document

Class Method Summary collapse

Class Method Details

.create(parent, json) ⇒ Object



8
9
10
11
# File 'lib/zm/client/task/task_jsns_initializer.rb', line 8

def create(parent, json)
  item = Task.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
39
40
41
# File 'lib/zm/client/task/task_jsns_initializer.rb', line 13

def update(item, json)
  item.uid = json[:uid]
  item.priority = json[:priority].to_i
  item.ptst = json[:ptst]
  item.percentComplete = json[:percentComplete].to_f
  item.name = json[:name]
  item.loc = json[:loc]
  item.alarm = json[:alarm]
  item.isOrg = json[:isOrg]
  item.id = json[:id].to_i
  item.invId = json[:invId]
  item.compNum = json[:compNum]
  item.l = json[:l].to_i
  item.status = json[:status]
  item.class = json[:class]
  item.allDay = json[:allDay]
  item.f = json[:f]
  item.tn = json[:tn]
  item.t = json[:t]
  item.rev = json[:rev]
  item.s = json[:s]
  item.d = json[:d]
  item.md = json[:md]
  item.ms = json[:ms]
  item.cm = json[:cm]
  item.sf = json[:sf]

  item
end