Class: Zm::Client::SearchFolderJsnsInitializer

Inherits:
Object
  • Object
show all
Defined in:
lib/zm/client/search_folder/search_folder_jsns_initializer.rb

Overview

class for initialize account search folder

Class Method Summary collapse

Class Method Details

.create(parent, json) ⇒ Object



8
9
10
11
# File 'lib/zm/client/search_folder/search_folder_jsns_initializer.rb', line 8

def create(parent, json)
  item = SearchFolder.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
# File 'lib/zm/client/search_folder/search_folder_jsns_initializer.rb', line 13

def update(item, json)
  item.id = json[:id].to_i
  item.name = json[:name]

  item.uuid = json[:uuid]
  item.deletable = json[:deletable]
  item.absFolderPath = json[:absFolderPath]
  item.l = json[:l].to_i
  item.luuid = json[:luuid]
  item.color = json[:color]
  item.rgb = json[:rgb]
  item.rev = json[:rev]
  item.ms = json[:ms]
  item.webOfflineSyncDays = json[:webOfflineSyncDays]
  item.activesyncdisabled = json[:activesyncdisabled]
  item.query = json[:query]
  item.sortBy = json[:sortBy]
  item.types = json[:types]

  item
end