Class: Zm::Client::Base::AccountObject
- Inherits:
-
Object
- Object
- Object
- Zm::Client::Base::AccountObject
show all
- Defined in:
- lib/zm/client/base/account_object.rb
Overview
Abstract Class Provisionning AccountObject
Direct Known Subclasses
Ace, Appointment, FolderObject, Contact, Document, Identity, Message, Share, Signature, Tag, Task
Instance Attribute Summary
Attributes inherited from Object
#grantee_type, #id, #name, #parent, #token
Instance Method Summary
collapse
Methods inherited from Object
#arrow_name, #clone, #convert_json_string_value, #disable_builder, #enable_builder, #initialize, #instance_variables_array, #instance_variables_hash, #logger, #recorded?, #save!, #to_s, #use_builder?
Instance Method Details
15
16
17
|
# File 'lib/zm/client/base/account_object.rb', line 15
def concat
all_instance_variable_keys.map { |key| instance_variable_get(arrow_name(key)) }
end
|
32
33
34
|
# File 'lib/zm/client/base/account_object.rb', line 32
def create!
@id
end
|
45
46
47
|
# File 'lib/zm/client/base/account_object.rb', line 45
def delete!
remove_instance_variable(:@id)
end
|
#init_from_json(json) ⇒ Object
19
20
21
22
23
24
|
# File 'lib/zm/client/base/account_object.rb', line 19
def init_from_json(json)
all_instance_variable_keys.each do |key|
next if json[key].nil?
instance_variable_set(arrow_name(key), json[key])
end
end
|
36
37
38
39
|
# File 'lib/zm/client/base/account_object.rb', line 36
def modify!
rename!
true
end
|
41
42
43
|
# File 'lib/zm/client/base/account_object.rb', line 41
def rename!
true
end
|
#soap_account_connector ⇒ Object
Also known as:
sacc
9
10
11
|
# File 'lib/zm/client/base/account_object.rb', line 9
def soap_account_connector
@parent.soap_account_connector
end
|
26
27
28
29
30
|
# File 'lib/zm/client/base/account_object.rb', line 26
def to_h
hashmap = Hash[all_instance_variable_keys.map { |key| [key, instance_variable_get(arrow_name(key))] }]
hashmap.delete_if { |_, v| v.nil? }
hashmap
end
|