ZCRMSDK 2.1.0 → 3.0.0.beta

Sign up to get free protection for your applications and to get access to all the features.
Files changed (163) hide show
  1. checksums.yaml +4 -4
  2. data/src/ZCRMSDK.rb +84 -1
  3. data/src/com/zoho/api/authenticator/oauth_token.rb +87 -31
  4. data/src/com/zoho/api/authenticator/store/db_store.rb +48 -28
  5. data/src/com/zoho/api/authenticator/store/file_store.rb +69 -21
  6. data/src/com/zoho/api/authenticator/store/token_store.rb +7 -0
  7. data/src/com/zoho/api/logger/sdk_logger.rb +19 -9
  8. data/src/com/zoho/crm/api/assignment_rules/api_exception.rb +121 -0
  9. data/src/com/zoho/crm/api/assignment_rules/assignment_rule.rb +215 -0
  10. data/src/com/zoho/crm/api/assignment_rules/assignment_rules_operations.rb +61 -0
  11. data/src/com/zoho/crm/api/assignment_rules/default_user.rb +80 -0
  12. data/src/com/zoho/crm/api/assignment_rules/response_handler.rb +10 -0
  13. data/src/com/zoho/crm/api/assignment_rules/response_wrapper.rb +63 -0
  14. data/src/com/zoho/crm/api/attachments/attachment.rb +4 -4
  15. data/src/com/zoho/crm/api/attachments/attachments_operations.rb +6 -6
  16. data/src/com/zoho/crm/api/blue_print/blue_print_operations.rb +2 -2
  17. data/src/com/zoho/crm/api/blue_print/escalation.rb +80 -0
  18. data/src/com/zoho/crm/api/blue_print/field.rb +1107 -0
  19. data/src/com/zoho/crm/api/blue_print/next_transition.rb +38 -0
  20. data/src/com/zoho/crm/api/blue_print/process_info.rb +4 -4
  21. data/src/com/zoho/crm/api/blue_print/transition.rb +19 -1
  22. data/src/com/zoho/crm/api/blue_print/validation_error.rb +57 -0
  23. data/src/com/zoho/crm/api/bulk_read/bulk_read_operations.rb +3 -3
  24. data/src/com/zoho/crm/api/bulk_read/criteria.rb +20 -0
  25. data/src/com/zoho/crm/api/bulk_read/query.rb +5 -4
  26. data/src/com/zoho/crm/api/bulk_write/bulk_write_operations.rb +3 -3
  27. data/src/com/zoho/crm/api/bulk_write/resource.rb +24 -4
  28. data/src/com/zoho/crm/api/contact_roles/contact_roles_operations.rb +7 -7
  29. data/src/com/zoho/crm/api/currencies/currencies_operations.rb +7 -7
  30. data/src/com/zoho/crm/api/custom_views/criteria.rb +5 -4
  31. data/src/com/zoho/crm/api/custom_views/custom_view.rb +100 -41
  32. data/src/com/zoho/crm/api/custom_views/custom_views_operations.rb +2 -2
  33. data/src/com/zoho/crm/api/custom_views/{shared_details.rb → shared_to.rb} +2 -2
  34. data/src/com/zoho/crm/api/dc/au_datacenter.rb +3 -3
  35. data/src/com/zoho/crm/api/dc/cn_datacenter.rb +3 -3
  36. data/src/com/zoho/crm/api/dc/datacenter.rb +3 -2
  37. data/src/com/zoho/crm/api/dc/eu_datacenter.rb +3 -3
  38. data/src/com/zoho/crm/api/dc/in_datacenter.rb +3 -3
  39. data/src/com/zoho/crm/api/dc/us_datacenter.rb +3 -3
  40. data/src/com/zoho/crm/api/email_templates/api_exception.rb +121 -0
  41. data/src/com/zoho/crm/api/email_templates/attachment.rb +118 -0
  42. data/src/com/zoho/crm/api/email_templates/email_template.rb +390 -0
  43. data/src/com/zoho/crm/api/email_templates/email_templates_operations.rb +61 -0
  44. data/src/com/zoho/crm/api/email_templates/response_handler.rb +10 -0
  45. data/src/com/zoho/crm/api/email_templates/response_wrapper.rb +83 -0
  46. data/src/com/zoho/crm/api/field_attachments/api_exception.rb +121 -0
  47. data/src/com/zoho/crm/api/field_attachments/body_wrapper.rb +62 -0
  48. data/src/com/zoho/crm/api/field_attachments/field_attachments_operations.rb +52 -0
  49. data/src/com/zoho/crm/api/field_attachments/file_body_wrapper.rb +64 -0
  50. data/src/com/zoho/crm/api/field_attachments/response_handler.rb +10 -0
  51. data/src/com/zoho/crm/api/fields/external.rb +99 -0
  52. data/src/com/zoho/crm/api/fields/field.rb +192 -38
  53. data/src/com/zoho/crm/api/fields/fields_operations.rb +2 -2
  54. data/src/com/zoho/crm/api/fields/history_tracking.rb +80 -0
  55. data/src/com/zoho/crm/api/fields/maps.rb +80 -0
  56. data/src/com/zoho/crm/api/fields/multi_select_lookup.rb +19 -0
  57. data/src/com/zoho/crm/api/fields/multi_user_lookup.rb +175 -0
  58. data/src/com/zoho/crm/api/fields/pick_list_value.rb +19 -0
  59. data/src/com/zoho/crm/api/fields/related_details.rb +19 -0
  60. data/src/com/zoho/crm/api/files/file_operations.rb +2 -2
  61. data/src/com/zoho/crm/api/initializer.rb +40 -15
  62. data/src/com/zoho/crm/api/inventory_templates/api_exception.rb +121 -0
  63. data/src/com/zoho/crm/api/inventory_templates/inventory_template.rb +352 -0
  64. data/src/com/zoho/crm/api/inventory_templates/inventory_templates_operations.rb +82 -0
  65. data/src/com/zoho/crm/api/inventory_templates/response_handler.rb +10 -0
  66. data/src/com/zoho/crm/api/inventory_templates/response_wrapper.rb +83 -0
  67. data/src/com/zoho/crm/api/layouts/layout.rb +38 -0
  68. data/src/com/zoho/crm/api/layouts/layouts_operations.rb +2 -2
  69. data/src/com/zoho/crm/api/layouts/section.rb +19 -0
  70. data/src/com/zoho/crm/api/modules/module.rb +57 -0
  71. data/src/com/zoho/crm/api/modules/modules_operations.rb +4 -4
  72. data/src/com/zoho/crm/api/notes/notes_operations.rb +7 -7
  73. data/src/com/zoho/crm/api/notification/notification_operations.rb +6 -6
  74. data/src/com/zoho/crm/api/org/org_operations.rb +2 -2
  75. data/src/com/zoho/crm/api/pipeline/action_handler.rb +10 -0
  76. data/src/com/zoho/crm/api/pipeline/action_response.rb +10 -0
  77. data/src/com/zoho/crm/api/pipeline/action_wrapper.rb +63 -0
  78. data/src/com/zoho/crm/api/pipeline/api_exception.rb +129 -0
  79. data/src/com/zoho/crm/api/pipeline/body_wrapper.rb +61 -0
  80. data/src/com/zoho/crm/api/pipeline/forecast_category.rb +80 -0
  81. data/src/com/zoho/crm/api/pipeline/pick_list_value.rb +175 -0
  82. data/src/com/zoho/crm/api/pipeline/pipeline.rb +213 -0
  83. data/src/com/zoho/crm/api/pipeline/pipeline_operations.rb +165 -0
  84. data/src/com/zoho/crm/api/pipeline/response_handler.rb +10 -0
  85. data/src/com/zoho/crm/api/pipeline/response_wrapper.rb +63 -0
  86. data/src/com/zoho/crm/api/pipeline/stage.rb +80 -0
  87. data/src/com/zoho/crm/api/pipeline/success_response.rb +123 -0
  88. data/src/com/zoho/crm/api/pipeline/transfer_action_handler.rb +10 -0
  89. data/src/com/zoho/crm/api/pipeline/transfer_action_response.rb +10 -0
  90. data/src/com/zoho/crm/api/pipeline/transfer_action_wrapper.rb +63 -0
  91. data/src/com/zoho/crm/api/pipeline/transfer_and_delete_wrapper.rb +61 -0
  92. data/src/com/zoho/crm/api/pipeline/transfer_pipe_line.rb +80 -0
  93. data/src/com/zoho/crm/api/profiles/default_view.rb +99 -0
  94. data/src/com/zoho/crm/api/profiles/profile.rb +57 -0
  95. data/src/com/zoho/crm/api/profiles/profiles_operations.rb +2 -2
  96. data/src/com/zoho/crm/api/query/query_operations.rb +1 -1
  97. data/src/com/zoho/crm/api/record/api_exception.rb +2 -0
  98. data/src/com/zoho/crm/api/record/body_wrapper.rb +0 -19
  99. data/src/com/zoho/crm/api/record/count_handler.rb +10 -0
  100. data/src/com/zoho/crm/api/record/count_wrapper.rb +63 -0
  101. data/src/com/zoho/crm/api/record/field.rb +1 -0
  102. data/src/com/zoho/crm/api/record/image_upload.rb +213 -0
  103. data/src/com/zoho/crm/api/record/inventory_line_items.rb +56 -39
  104. data/src/com/zoho/crm/api/record/mass_update_body_wrapper.rb +4 -4
  105. data/src/com/zoho/crm/api/record/mass_update_territory.rb +80 -0
  106. data/src/com/zoho/crm/api/record/multi_select_lookup.rb +99 -0
  107. data/src/com/zoho/crm/api/record/multi_select_picklist.rb +80 -0
  108. data/src/com/zoho/crm/api/record/price_book.rb +31 -0
  109. data/src/com/zoho/crm/api/record/record_operations.rb +201 -111
  110. data/src/com/zoho/crm/api/record/tax.rb +80 -0
  111. data/src/com/zoho/crm/api/record/territory.rb +70 -12
  112. data/src/com/zoho/crm/api/record/widget.rb +80 -0
  113. data/src/com/zoho/crm/api/record/wizard.rb +80 -0
  114. data/src/com/zoho/crm/api/related_lists/related_lists_operations.rb +2 -2
  115. data/src/com/zoho/crm/api/related_records/related_records_operations.rb +8 -36
  116. data/src/com/zoho/crm/api/request_proxy.rb +3 -4
  117. data/src/com/zoho/crm/api/roles/roles_operations.rb +2 -2
  118. data/src/com/zoho/crm/api/sdk_config.rb +2 -68
  119. data/src/com/zoho/crm/api/send_mail/action_handler.rb +10 -0
  120. data/src/com/zoho/crm/api/send_mail/action_response.rb +10 -0
  121. data/src/com/zoho/crm/api/send_mail/action_wrapper.rb +63 -0
  122. data/src/com/zoho/crm/api/send_mail/api_exception.rb +125 -0
  123. data/src/com/zoho/crm/api/send_mail/body_wrapper.rb +61 -0
  124. data/src/com/zoho/crm/api/send_mail/data_subject_request.rb +80 -0
  125. data/src/com/zoho/crm/api/send_mail/inventory_details.rb +100 -0
  126. data/src/com/zoho/crm/api/send_mail/mail.rb +423 -0
  127. data/src/com/zoho/crm/api/send_mail/response_handler.rb +10 -0
  128. data/src/com/zoho/crm/api/send_mail/response_wrapper.rb +63 -0
  129. data/src/com/zoho/crm/api/send_mail/send_mail_operations.rb +61 -0
  130. data/src/com/zoho/crm/api/send_mail/success_response.rb +121 -0
  131. data/src/com/zoho/crm/api/send_mail/template.rb +10 -0
  132. data/src/com/zoho/crm/api/send_mail/user_address.rb +137 -0
  133. data/src/com/zoho/crm/api/share_records/share_records_operations.rb +4 -4
  134. data/src/com/zoho/crm/api/tags/tag.rb +19 -0
  135. data/src/com/zoho/crm/api/tags/tags_operations.rb +11 -11
  136. data/src/com/zoho/crm/api/taxes/taxes_operations.rb +6 -6
  137. data/src/com/zoho/crm/api/territories/response_wrapper.rb +20 -0
  138. data/src/com/zoho/crm/api/territories/territories_operations.rb +2 -2
  139. data/src/com/zoho/crm/api/territories/territory.rb +61 -23
  140. data/src/com/zoho/crm/api/users/users_operations.rb +6 -6
  141. data/src/com/zoho/crm/api/util/api_http_connector.rb +5 -5
  142. data/src/com/zoho/crm/api/util/common_api_handler.rb +0 -1
  143. data/src/com/zoho/crm/api/util/constants.rb +140 -13
  144. data/src/com/zoho/crm/api/util/converter.rb +21 -4
  145. data/src/com/zoho/crm/api/util/form_data_converter.rb +3 -15
  146. data/src/com/zoho/crm/api/util/utility.rb +226 -86
  147. data/src/com/zoho/crm/api/variable_groups/variable_groups_operations.rb +3 -3
  148. data/src/com/zoho/crm/api/variables/variables_operations.rb +9 -9
  149. data/src/com/zoho/crm/api/wizards/api_exception.rb +121 -0
  150. data/src/com/zoho/crm/api/wizards/button.rb +214 -0
  151. data/src/com/zoho/crm/api/wizards/chart_data.rb +118 -0
  152. data/src/com/zoho/crm/api/wizards/connection.rb +80 -0
  153. data/src/com/zoho/crm/api/wizards/container.rb +119 -0
  154. data/src/com/zoho/crm/api/wizards/node.rb +118 -0
  155. data/src/com/zoho/crm/api/wizards/response_handler.rb +10 -0
  156. data/src/com/zoho/crm/api/wizards/response_wrapper.rb +63 -0
  157. data/src/com/zoho/crm/api/wizards/screen.rb +99 -0
  158. data/src/com/zoho/crm/api/wizards/segment.rb +176 -0
  159. data/src/com/zoho/crm/api/wizards/wizard.rb +273 -0
  160. data/src/com/zoho/crm/api/wizards/wizards_operations.rb +61 -0
  161. data/src/resources/JSONDetails.json +1 -1
  162. data/src/version.rb +1 -1
  163. metadata +88 -5
@@ -0,0 +1,118 @@
1
+ require_relative '../util/model'
2
+
3
+ module EmailTemplates
4
+ class Attachment
5
+ include Util::Model
6
+
7
+ # Creates an instance of Attachment
8
+ def initialize
9
+ @size = nil
10
+ @file_name = nil
11
+ @file_id = nil
12
+ @id = nil
13
+ @key_modified = Hash.new
14
+ end
15
+
16
+ # The method to get the size
17
+ # @return A Integer value
18
+
19
+ def size
20
+ @size
21
+ end
22
+
23
+ # The method to set the value to size
24
+ # @param size [Integer] A Integer
25
+
26
+ def size=(size)
27
+ if size!=nil and !size.is_a? Integer
28
+ raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: size EXPECTED TYPE: Integer', nil, nil)
29
+ end
30
+ @size = size
31
+ @key_modified['size'] = 1
32
+ end
33
+
34
+ # The method to get the file_name
35
+ # @return A String value
36
+
37
+ def file_name
38
+ @file_name
39
+ end
40
+
41
+ # The method to set the value to file_name
42
+ # @param file_name [String] A String
43
+
44
+ def file_name=(file_name)
45
+ if file_name!=nil and !file_name.is_a? String
46
+ raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: file_name EXPECTED TYPE: String', nil, nil)
47
+ end
48
+ @file_name = file_name
49
+ @key_modified['file_name'] = 1
50
+ end
51
+
52
+ # The method to get the file_id
53
+ # @return A String value
54
+
55
+ def file_id
56
+ @file_id
57
+ end
58
+
59
+ # The method to set the value to file_id
60
+ # @param file_id [String] A String
61
+
62
+ def file_id=(file_id)
63
+ if file_id!=nil and !file_id.is_a? String
64
+ raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: file_id EXPECTED TYPE: String', nil, nil)
65
+ end
66
+ @file_id = file_id
67
+ @key_modified['file_id'] = 1
68
+ end
69
+
70
+ # The method to get the id
71
+ # @return A Integer value
72
+
73
+ def id
74
+ @id
75
+ end
76
+
77
+ # The method to set the value to id
78
+ # @param id [Integer] A Integer
79
+
80
+ def id=(id)
81
+ if id!=nil and !id.is_a? Integer
82
+ raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: id EXPECTED TYPE: Integer', nil, nil)
83
+ end
84
+ @id = id
85
+ @key_modified['id'] = 1
86
+ end
87
+
88
+ # The method to check if the user has modified the given key
89
+ # @param key [String] A String
90
+ # @return A Integer value
91
+
92
+ def is_key_modified(key)
93
+ if key!=nil and !key.is_a? String
94
+ raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: String', nil, nil)
95
+ end
96
+ if @key_modified.key?(key)
97
+ return @key_modified[key]
98
+ end
99
+
100
+ nil
101
+ end
102
+
103
+ # The method to mark the given key as modified
104
+ # @param key [String] A String
105
+ # @param modification [Integer] A Integer
106
+
107
+ def set_key_modified(key, modification)
108
+ if key!=nil and !key.is_a? String
109
+ raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: String', nil, nil)
110
+ end
111
+ if modification!=nil and !modification.is_a? Integer
112
+ raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: Integer', nil, nil)
113
+ end
114
+ @key_modified[key] = modification
115
+ end
116
+
117
+ end
118
+ end
@@ -0,0 +1,390 @@
1
+ require_relative '../modules/module'
2
+ require_relative '../send_mail/template'
3
+ require_relative '../users/user'
4
+ require_relative '../util/model'
5
+
6
+ module EmailTemplates
7
+ require_relative '../send_mail/template'
8
+
9
+ class EmailTemplate
10
+ include SendMail::Template
11
+ include Util::Model
12
+
13
+ # Creates an instance of EmailTemplate
14
+ def initialize
15
+ @content = nil
16
+ @created_time = nil
17
+ @subject = nil
18
+ @module_1 = nil
19
+ @type = nil
20
+ @created_by = nil
21
+ @modified_time = nil
22
+ @last_usage_time = nil
23
+ @associated = nil
24
+ @name = nil
25
+ @modified_by = nil
26
+ @description = nil
27
+ @id = nil
28
+ @editor_mode = nil
29
+ @favorite = nil
30
+ @attachments = nil
31
+ @folder = nil
32
+ @consent_linked = nil
33
+ @key_modified = Hash.new
34
+ end
35
+
36
+ # The method to get the content
37
+ # @return A String value
38
+
39
+ def content
40
+ @content
41
+ end
42
+
43
+ # The method to set the value to content
44
+ # @param content [String] A String
45
+
46
+ def content=(content)
47
+ if content!=nil and !content.is_a? String
48
+ raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: content EXPECTED TYPE: String', nil, nil)
49
+ end
50
+ @content = content
51
+ @key_modified['content'] = 1
52
+ end
53
+
54
+ # The method to get the created_time
55
+ # @return An instance of DateTime
56
+
57
+ def created_time
58
+ @created_time
59
+ end
60
+
61
+ # The method to set the value to created_time
62
+ # @param created_time [DateTime] An instance of DateTime
63
+
64
+ def created_time=(created_time)
65
+ if created_time!=nil and !created_time.is_a? DateTime
66
+ raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: created_time EXPECTED TYPE: DateTime', nil, nil)
67
+ end
68
+ @created_time = created_time
69
+ @key_modified['created_time'] = 1
70
+ end
71
+
72
+ # The method to get the subject
73
+ # @return A String value
74
+
75
+ def subject
76
+ @subject
77
+ end
78
+
79
+ # The method to set the value to subject
80
+ # @param subject [String] A String
81
+
82
+ def subject=(subject)
83
+ if subject!=nil and !subject.is_a? String
84
+ raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: subject EXPECTED TYPE: String', nil, nil)
85
+ end
86
+ @subject = subject
87
+ @key_modified['subject'] = 1
88
+ end
89
+
90
+ # The method to get the module
91
+ # @return An instance of Modules::Module
92
+
93
+ def module
94
+ @module_1
95
+ end
96
+
97
+ # The method to set the value to module
98
+ # @param module_1 [Modules::Module] An instance of Modules::Module
99
+
100
+ def module=(module_1)
101
+ if module_1!=nil and !module_1.is_a? Modules::Module
102
+ raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: module_1 EXPECTED TYPE: Module', nil, nil)
103
+ end
104
+ @module_1 = module_1
105
+ @key_modified['module'] = 1
106
+ end
107
+
108
+ # The method to get the type
109
+ # @return A String value
110
+
111
+ def type
112
+ @type
113
+ end
114
+
115
+ # The method to set the value to type
116
+ # @param type [String] A String
117
+
118
+ def type=(type)
119
+ if type!=nil and !type.is_a? String
120
+ raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: type EXPECTED TYPE: String', nil, nil)
121
+ end
122
+ @type = type
123
+ @key_modified['type'] = 1
124
+ end
125
+
126
+ # The method to get the created_by
127
+ # @return An instance of Users::User
128
+
129
+ def created_by
130
+ @created_by
131
+ end
132
+
133
+ # The method to set the value to created_by
134
+ # @param created_by [Users::User] An instance of Users::User
135
+
136
+ def created_by=(created_by)
137
+ if created_by!=nil and !created_by.is_a? Users::User
138
+ raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: created_by EXPECTED TYPE: User', nil, nil)
139
+ end
140
+ @created_by = created_by
141
+ @key_modified['created_by'] = 1
142
+ end
143
+
144
+ # The method to get the modified_time
145
+ # @return An instance of DateTime
146
+
147
+ def modified_time
148
+ @modified_time
149
+ end
150
+
151
+ # The method to set the value to modified_time
152
+ # @param modified_time [DateTime] An instance of DateTime
153
+
154
+ def modified_time=(modified_time)
155
+ if modified_time!=nil and !modified_time.is_a? DateTime
156
+ raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: modified_time EXPECTED TYPE: DateTime', nil, nil)
157
+ end
158
+ @modified_time = modified_time
159
+ @key_modified['modified_time'] = 1
160
+ end
161
+
162
+ # The method to get the last_usage_time
163
+ # @return An instance of DateTime
164
+
165
+ def last_usage_time
166
+ @last_usage_time
167
+ end
168
+
169
+ # The method to set the value to last_usage_time
170
+ # @param last_usage_time [DateTime] An instance of DateTime
171
+
172
+ def last_usage_time=(last_usage_time)
173
+ if last_usage_time!=nil and !last_usage_time.is_a? DateTime
174
+ raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: last_usage_time EXPECTED TYPE: DateTime', nil, nil)
175
+ end
176
+ @last_usage_time = last_usage_time
177
+ @key_modified['last_usage_time'] = 1
178
+ end
179
+
180
+ # The method to get the associated
181
+ # @return A Boolean value
182
+
183
+ def associated
184
+ @associated
185
+ end
186
+
187
+ # The method to set the value to associated
188
+ # @param associated [Boolean] A Boolean
189
+
190
+ def associated=(associated)
191
+ if associated!=nil and ! [true, false].include?associated
192
+ raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: associated EXPECTED TYPE: Boolean', nil, nil)
193
+ end
194
+ @associated = associated
195
+ @key_modified['associated'] = 1
196
+ end
197
+
198
+ # The method to get the name
199
+ # @return A String value
200
+
201
+ def name
202
+ @name
203
+ end
204
+
205
+ # The method to set the value to name
206
+ # @param name [String] A String
207
+
208
+ def name=(name)
209
+ if name!=nil and !name.is_a? String
210
+ raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: name EXPECTED TYPE: String', nil, nil)
211
+ end
212
+ @name = name
213
+ @key_modified['name'] = 1
214
+ end
215
+
216
+ # The method to get the modified_by
217
+ # @return An instance of Users::User
218
+
219
+ def modified_by
220
+ @modified_by
221
+ end
222
+
223
+ # The method to set the value to modified_by
224
+ # @param modified_by [Users::User] An instance of Users::User
225
+
226
+ def modified_by=(modified_by)
227
+ if modified_by!=nil and !modified_by.is_a? Users::User
228
+ raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: modified_by EXPECTED TYPE: User', nil, nil)
229
+ end
230
+ @modified_by = modified_by
231
+ @key_modified['modified_by'] = 1
232
+ end
233
+
234
+ # The method to get the description
235
+ # @return A String value
236
+
237
+ def description
238
+ @description
239
+ end
240
+
241
+ # The method to set the value to description
242
+ # @param description [String] A String
243
+
244
+ def description=(description)
245
+ if description!=nil and !description.is_a? String
246
+ raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: description EXPECTED TYPE: String', nil, nil)
247
+ end
248
+ @description = description
249
+ @key_modified['description'] = 1
250
+ end
251
+
252
+ # The method to get the id
253
+ # @return A Integer value
254
+
255
+ def id
256
+ @id
257
+ end
258
+
259
+ # The method to set the value to id
260
+ # @param id [Integer] A Integer
261
+
262
+ def id=(id)
263
+ if id!=nil and !id.is_a? Integer
264
+ raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: id EXPECTED TYPE: Integer', nil, nil)
265
+ end
266
+ @id = id
267
+ @key_modified['id'] = 1
268
+ end
269
+
270
+ # The method to get the editor_mode
271
+ # @return A String value
272
+
273
+ def editor_mode
274
+ @editor_mode
275
+ end
276
+
277
+ # The method to set the value to editor_mode
278
+ # @param editor_mode [String] A String
279
+
280
+ def editor_mode=(editor_mode)
281
+ if editor_mode!=nil and !editor_mode.is_a? String
282
+ raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: editor_mode EXPECTED TYPE: String', nil, nil)
283
+ end
284
+ @editor_mode = editor_mode
285
+ @key_modified['editor_mode'] = 1
286
+ end
287
+
288
+ # The method to get the favorite
289
+ # @return A Boolean value
290
+
291
+ def favorite
292
+ @favorite
293
+ end
294
+
295
+ # The method to set the value to favorite
296
+ # @param favorite [Boolean] A Boolean
297
+
298
+ def favorite=(favorite)
299
+ if favorite!=nil and ! [true, false].include?favorite
300
+ raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: favorite EXPECTED TYPE: Boolean', nil, nil)
301
+ end
302
+ @favorite = favorite
303
+ @key_modified['favorite'] = 1
304
+ end
305
+
306
+ # The method to get the attachments
307
+ # @return An instance of Array
308
+
309
+ def attachments
310
+ @attachments
311
+ end
312
+
313
+ # The method to set the value to attachments
314
+ # @param attachments [Array] An instance of Array
315
+
316
+ def attachments=(attachments)
317
+ if attachments!=nil and !attachments.is_a? Array
318
+ raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: attachments EXPECTED TYPE: Array', nil, nil)
319
+ end
320
+ @attachments = attachments
321
+ @key_modified['attachments'] = 1
322
+ end
323
+
324
+ # The method to get the folder
325
+ # @return An instance of EmailTemplate
326
+
327
+ def folder
328
+ @folder
329
+ end
330
+
331
+ # The method to set the value to folder
332
+ # @param folder [EmailTemplate] An instance of EmailTemplate
333
+
334
+ def folder=(folder)
335
+ if folder!=nil and !folder.is_a? EmailTemplate
336
+ raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: folder EXPECTED TYPE: EmailTemplate', nil, nil)
337
+ end
338
+ @folder = folder
339
+ @key_modified['folder'] = 1
340
+ end
341
+
342
+ # The method to get the consent_linked
343
+ # @return A Boolean value
344
+
345
+ def consent_linked
346
+ @consent_linked
347
+ end
348
+
349
+ # The method to set the value to consent_linked
350
+ # @param consent_linked [Boolean] A Boolean
351
+
352
+ def consent_linked=(consent_linked)
353
+ if consent_linked!=nil and ! [true, false].include?consent_linked
354
+ raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: consent_linked EXPECTED TYPE: Boolean', nil, nil)
355
+ end
356
+ @consent_linked = consent_linked
357
+ @key_modified['consent_linked'] = 1
358
+ end
359
+
360
+ # The method to check if the user has modified the given key
361
+ # @param key [String] A String
362
+ # @return A Integer value
363
+
364
+ def is_key_modified(key)
365
+ if key!=nil and !key.is_a? String
366
+ raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: String', nil, nil)
367
+ end
368
+ if @key_modified.key?(key)
369
+ return @key_modified[key]
370
+ end
371
+
372
+ nil
373
+ end
374
+
375
+ # The method to mark the given key as modified
376
+ # @param key [String] A String
377
+ # @param modification [Integer] A Integer
378
+
379
+ def set_key_modified(key, modification)
380
+ if key!=nil and !key.is_a? String
381
+ raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: String', nil, nil)
382
+ end
383
+ if modification!=nil and !modification.is_a? Integer
384
+ raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: Integer', nil, nil)
385
+ end
386
+ @key_modified[key] = modification
387
+ end
388
+
389
+ end
390
+ end