Class: Zm::Client::Base::FolderObject

Inherits:
AccountObject show all
Defined in:
lib/zm/client/base/folder_object.rb

Overview

Abstract Class FolderObject

Direct Known Subclasses

Folder, MountPoint, SearchFolder

Instance Attribute Summary

Attributes inherited from Object

#grantee_type, #id, #name, #parent, #token

Instance Method Summary collapse

Methods inherited from AccountObject

#concat, #create!, #init_from_json, #soap_account_connector, #to_h

Methods inherited from Object

#arrow_name, #clone, #concat, #convert_json_string_value, #disable_builder, #enable_builder, #init_from_json, #instance_variables_array, #instance_variables_hash, #logger, #recorded?, #save!, #to_s, #use_builder?

Constructor Details

#initialize(parent) ⇒ FolderObject

Returns a new instance of FolderObject.



9
10
11
12
# File 'lib/zm/client/base/folder_object.rb', line 9

def initialize(parent)
  @l = FolderDefault::ROOT[:id]
  super(parent)
end

Instance Method Details

#color!Object



14
15
16
17
# File 'lib/zm/client/base/folder_object.rb', line 14

def color!
  @parent.sacc.folder_action(@parent.token, jsns_builder.to_color) if color_changed? || rgb_changed?
  true
end

#delete!Object



19
20
21
22
# File 'lib/zm/client/base/folder_object.rb', line 19

def delete!
  @parent.sacc.folder_action(@parent.token, jsns_builder.to_delete)
  super
end

#modify!Object



24
25
26
27
# File 'lib/zm/client/base/folder_object.rb', line 24

def modify!
  @parent.sacc.folder_action(@parent.token, jsns_builder.to_update)
  true
end

#move!Object



29
30
31
32
# File 'lib/zm/client/base/folder_object.rb', line 29

def move!
  @parent.sacc.folder_action(@parent.token, jsns_builder.to_move) if l_changed?
  true
end

#rename!Object



34
35
36
37
# File 'lib/zm/client/base/folder_object.rb', line 34

def rename!
  @parent.sacc.folder_action(@parent.token, jsns_builder.to_rename) if name_changed?
  super
end