ZCRMSDK 2.0.0 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/src/ZCRMSDK.rb +87 -2
- data/src/com/zoho/api/authenticator/oauth_token.rb +86 -31
- data/src/com/zoho/api/authenticator/store/db_store.rb +71 -29
- data/src/com/zoho/api/authenticator/store/file_store.rb +91 -21
- data/src/com/zoho/api/authenticator/store/token_store.rb +7 -0
- data/src/com/zoho/api/logger/sdk_logger.rb +18 -9
- data/src/com/zoho/crm/api/assignment_rules/api_exception.rb +121 -0
- data/src/com/zoho/crm/api/assignment_rules/assignment_rule.rb +215 -0
- data/src/com/zoho/crm/api/assignment_rules/assignment_rules_operations.rb +61 -0
- data/src/com/zoho/crm/api/assignment_rules/default_user.rb +80 -0
- data/src/com/zoho/crm/api/assignment_rules/response_handler.rb +10 -0
- data/src/com/zoho/crm/api/assignment_rules/response_wrapper.rb +63 -0
- data/src/com/zoho/crm/api/attachments/attachment.rb +42 -4
- data/src/com/zoho/crm/api/attachments/attachments_operations.rb +6 -6
- data/src/com/zoho/crm/api/blue_print/blue_print_operations.rb +2 -2
- data/src/com/zoho/crm/api/blue_print/escalation.rb +80 -0
- data/src/com/zoho/crm/api/blue_print/field.rb +1127 -0
- data/src/com/zoho/crm/api/blue_print/next_transition.rb +38 -0
- data/src/com/zoho/crm/api/blue_print/process_info.rb +4 -4
- data/src/com/zoho/crm/api/blue_print/transition.rb +19 -1
- data/src/com/zoho/crm/api/blue_print/validation_error.rb +57 -0
- data/src/com/zoho/crm/api/bulk_read/bulk_read_operations.rb +3 -3
- data/src/com/zoho/crm/api/bulk_read/criteria.rb +20 -0
- data/src/com/zoho/crm/api/bulk_read/query.rb +5 -4
- data/src/com/zoho/crm/api/bulk_write/bulk_write_operations.rb +3 -3
- data/src/com/zoho/crm/api/bulk_write/resource.rb +24 -4
- data/src/com/zoho/crm/api/contact_roles/contact_roles_operations.rb +7 -7
- data/src/com/zoho/crm/api/currencies/currencies_operations.rb +7 -7
- data/src/com/zoho/crm/api/custom_views/criteria.rb +5 -4
- data/src/com/zoho/crm/api/custom_views/custom_view.rb +100 -41
- data/src/com/zoho/crm/api/custom_views/custom_views_operations.rb +2 -2
- data/src/com/zoho/crm/api/custom_views/{shared_details.rb → shared_to.rb} +2 -2
- data/src/com/zoho/crm/api/dc/au_datacenter.rb +3 -3
- data/src/com/zoho/crm/api/dc/cn_datacenter.rb +3 -3
- data/src/com/zoho/crm/api/dc/datacenter.rb +3 -2
- data/src/com/zoho/crm/api/dc/eu_datacenter.rb +3 -3
- data/src/com/zoho/crm/api/dc/in_datacenter.rb +3 -3
- data/src/com/zoho/crm/api/dc/us_datacenter.rb +3 -3
- data/src/com/zoho/crm/api/email_templates/api_exception.rb +121 -0
- data/src/com/zoho/crm/api/email_templates/attachment.rb +118 -0
- data/src/com/zoho/crm/api/email_templates/email_template.rb +390 -0
- data/src/com/zoho/crm/api/email_templates/email_templates_operations.rb +61 -0
- data/src/com/zoho/crm/api/email_templates/response_handler.rb +10 -0
- data/src/com/zoho/crm/api/email_templates/response_wrapper.rb +83 -0
- data/src/com/zoho/crm/api/field_attachments/api_exception.rb +121 -0
- data/src/com/zoho/crm/api/field_attachments/body_wrapper.rb +62 -0
- data/src/com/zoho/crm/api/field_attachments/field_attachments_operations.rb +52 -0
- data/src/com/zoho/crm/api/field_attachments/file_body_wrapper.rb +64 -0
- data/src/com/zoho/crm/api/field_attachments/response_handler.rb +10 -0
- data/src/com/zoho/crm/api/fields/external.rb +99 -0
- data/src/com/zoho/crm/api/fields/field.rb +215 -61
- data/src/com/zoho/crm/api/fields/fields_operations.rb +2 -2
- data/src/com/zoho/crm/api/fields/history_tracking.rb +80 -0
- data/src/com/zoho/crm/api/fields/maps.rb +80 -0
- data/src/com/zoho/crm/api/fields/multi_module_lookup.rb +99 -0
- data/src/com/zoho/crm/api/fields/multi_select_lookup.rb +19 -0
- data/src/com/zoho/crm/api/fields/multi_user_lookup.rb +175 -0
- data/src/com/zoho/crm/api/fields/pick_list_value.rb +19 -0
- data/src/com/zoho/crm/api/fields/related_details.rb +19 -0
- data/src/com/zoho/crm/api/files/file_operations.rb +2 -2
- data/src/com/zoho/crm/api/initializer.rb +45 -17
- data/src/com/zoho/crm/api/inventory_templates/api_exception.rb +121 -0
- data/src/com/zoho/crm/api/inventory_templates/inventory_template.rb +352 -0
- data/src/com/zoho/crm/api/inventory_templates/inventory_templates_operations.rb +82 -0
- data/src/com/zoho/crm/api/inventory_templates/response_handler.rb +10 -0
- data/src/com/zoho/crm/api/inventory_templates/response_wrapper.rb +83 -0
- data/src/com/zoho/crm/api/layouts/layout.rb +38 -0
- data/src/com/zoho/crm/api/layouts/layouts_operations.rb +2 -2
- data/src/com/zoho/crm/api/layouts/section.rb +19 -0
- data/src/com/zoho/crm/api/modules/module.rb +57 -0
- data/src/com/zoho/crm/api/modules/modules_operations.rb +4 -4
- data/src/com/zoho/crm/api/notes/note.rb +19 -0
- data/src/com/zoho/crm/api/notes/notes_operations.rb +7 -7
- data/src/com/zoho/crm/api/notification/notification_operations.rb +6 -6
- data/src/com/zoho/crm/api/org/hierarchy_preference.rb +61 -0
- data/src/com/zoho/crm/api/org/org.rb +38 -0
- data/src/com/zoho/crm/api/org/org_operations.rb +2 -2
- data/src/com/zoho/crm/api/pipeline/action_handler.rb +10 -0
- data/src/com/zoho/crm/api/pipeline/action_response.rb +10 -0
- data/src/com/zoho/crm/api/pipeline/action_wrapper.rb +63 -0
- data/src/com/zoho/crm/api/pipeline/api_exception.rb +129 -0
- data/src/com/zoho/crm/api/pipeline/body_wrapper.rb +61 -0
- data/src/com/zoho/crm/api/pipeline/forecast_category.rb +80 -0
- data/src/com/zoho/crm/api/pipeline/pick_list_value.rb +175 -0
- data/src/com/zoho/crm/api/pipeline/pipeline.rb +213 -0
- data/src/com/zoho/crm/api/pipeline/pipeline_operations.rb +165 -0
- data/src/com/zoho/crm/api/pipeline/response_handler.rb +10 -0
- data/src/com/zoho/crm/api/pipeline/response_wrapper.rb +63 -0
- data/src/com/zoho/crm/api/pipeline/stage.rb +80 -0
- data/src/com/zoho/crm/api/pipeline/success_response.rb +123 -0
- data/src/com/zoho/crm/api/pipeline/transfer_action_handler.rb +10 -0
- data/src/com/zoho/crm/api/pipeline/transfer_action_response.rb +10 -0
- data/src/com/zoho/crm/api/pipeline/transfer_action_wrapper.rb +63 -0
- data/src/com/zoho/crm/api/pipeline/transfer_and_delete_wrapper.rb +61 -0
- data/src/com/zoho/crm/api/pipeline/transfer_pipe_line.rb +80 -0
- data/src/com/zoho/crm/api/profiles/category.rb +19 -0
- data/src/com/zoho/crm/api/profiles/default_view.rb +99 -0
- data/src/com/zoho/crm/api/profiles/profile.rb +49 -11
- data/src/com/zoho/crm/api/profiles/profiles_operations.rb +2 -2
- data/src/com/zoho/crm/api/query/query_operations.rb +1 -1
- data/src/com/zoho/crm/api/record/api_exception.rb +2 -0
- data/src/com/zoho/crm/api/record/body_wrapper.rb +0 -19
- data/src/com/zoho/crm/api/record/count_handler.rb +10 -0
- data/src/com/zoho/crm/api/record/count_wrapper.rb +63 -0
- data/src/com/zoho/crm/api/record/field.rb +17 -17
- data/src/com/zoho/crm/api/record/image_upload.rb +213 -0
- data/src/com/zoho/crm/api/record/line_tax.rb +19 -0
- data/src/com/zoho/crm/api/record/mass_update_body_wrapper.rb +4 -4
- data/src/com/zoho/crm/api/record/mass_update_territory.rb +80 -0
- data/src/com/zoho/crm/api/record/multi_select_lookup.rb +99 -0
- data/src/com/zoho/crm/api/record/multi_select_picklist.rb +80 -0
- data/src/com/zoho/crm/api/record/price_book.rb +31 -0
- data/src/com/zoho/crm/api/record/record_operations.rb +196 -26
- data/src/com/zoho/crm/api/record/tax.rb +80 -0
- data/src/com/zoho/crm/api/record/territory.rb +70 -12
- data/src/com/zoho/crm/api/record/widget.rb +80 -0
- data/src/com/zoho/crm/api/record/wizard.rb +80 -0
- data/src/com/zoho/crm/api/related_lists/related_lists_operations.rb +2 -2
- data/src/com/zoho/crm/api/related_records/related_records_operations.rb +6 -6
- data/src/com/zoho/crm/api/request_proxy.rb +3 -4
- data/src/com/zoho/crm/api/roles/roles_operations.rb +2 -2
- data/src/com/zoho/crm/api/sdk_config.rb +2 -68
- data/src/com/zoho/crm/api/send_mail/action_handler.rb +10 -0
- data/src/com/zoho/crm/api/send_mail/action_response.rb +10 -0
- data/src/com/zoho/crm/api/send_mail/action_wrapper.rb +63 -0
- data/src/com/zoho/crm/api/send_mail/api_exception.rb +125 -0
- data/src/com/zoho/crm/api/send_mail/body_wrapper.rb +61 -0
- data/src/com/zoho/crm/api/send_mail/data_subject_request.rb +80 -0
- data/src/com/zoho/crm/api/send_mail/inventory_details.rb +100 -0
- data/src/com/zoho/crm/api/send_mail/mail.rb +423 -0
- data/src/com/zoho/crm/api/send_mail/response_handler.rb +10 -0
- data/src/com/zoho/crm/api/send_mail/response_wrapper.rb +63 -0
- data/src/com/zoho/crm/api/send_mail/send_mail_operations.rb +61 -0
- data/src/com/zoho/crm/api/send_mail/success_response.rb +121 -0
- data/src/com/zoho/crm/api/send_mail/template.rb +10 -0
- data/src/com/zoho/crm/api/send_mail/user_address.rb +137 -0
- data/src/com/zoho/crm/api/share_records/share_records_operations.rb +4 -4
- data/src/com/zoho/crm/api/tags/tag.rb +19 -0
- data/src/com/zoho/crm/api/tags/tags_operations.rb +11 -11
- data/src/com/zoho/crm/api/taxes/taxes_operations.rb +6 -6
- data/src/com/zoho/crm/api/territories/response_wrapper.rb +20 -0
- data/src/com/zoho/crm/api/territories/territories_operations.rb +2 -2
- data/src/com/zoho/crm/api/territories/territory.rb +61 -23
- data/src/com/zoho/crm/api/users/user.rb +34 -0
- data/src/com/zoho/crm/api/users/users_operations.rb +6 -6
- data/src/com/zoho/crm/api/util/api_http_connector.rb +6 -5
- data/src/com/zoho/crm/api/util/common_api_handler.rb +5 -3
- data/src/com/zoho/crm/api/util/constants.rb +140 -15
- data/src/com/zoho/crm/api/util/converter.rb +30 -7
- data/src/com/zoho/crm/api/util/data_type_converter.rb +8 -2
- data/src/com/zoho/crm/api/util/form_data_converter.rb +4 -15
- data/src/com/zoho/crm/api/util/json_converter.rb +7 -9
- data/src/com/zoho/crm/api/util/module_fields_handler.rb +1 -1
- data/src/com/zoho/crm/api/util/utility.rb +274 -87
- data/src/com/zoho/crm/api/variable_groups/variable_groups_operations.rb +3 -3
- data/src/com/zoho/crm/api/variables/variables_operations.rb +9 -9
- data/src/com/zoho/crm/api/wizards/api_exception.rb +121 -0
- data/src/com/zoho/crm/api/wizards/button.rb +252 -0
- data/src/com/zoho/crm/api/wizards/chart_data.rb +118 -0
- data/src/com/zoho/crm/api/wizards/connection.rb +80 -0
- data/src/com/zoho/crm/api/wizards/container.rb +119 -0
- data/src/com/zoho/crm/api/wizards/node.rb +118 -0
- data/src/com/zoho/crm/api/wizards/response_handler.rb +10 -0
- data/src/com/zoho/crm/api/wizards/response_wrapper.rb +63 -0
- data/src/com/zoho/crm/api/wizards/screen.rb +99 -0
- data/src/com/zoho/crm/api/wizards/segment.rb +176 -0
- data/src/com/zoho/crm/api/wizards/transition.rb +80 -0
- data/src/com/zoho/crm/api/wizards/wizard.rb +273 -0
- data/src/com/zoho/crm/api/wizards/wizards_operations.rb +61 -0
- data/src/resources/JSONDetails.json +1 -1
- data/src/version.rb +1 -1
- metadata +92 -7
- data/src/com/zoho/crm/api/record/inventory_line_items.rb +0 -235
@@ -1,3 +1,4 @@
|
|
1
|
+
require_relative '../fields/field'
|
1
2
|
require_relative '../util/choice'
|
2
3
|
require_relative '../util/model'
|
3
4
|
|
@@ -34,18 +35,18 @@ module CustomViews
|
|
34
35
|
end
|
35
36
|
|
36
37
|
# The method to get the field
|
37
|
-
# @return
|
38
|
+
# @return An instance of Fields::Field
|
38
39
|
|
39
40
|
def field
|
40
41
|
@field
|
41
42
|
end
|
42
43
|
|
43
44
|
# The method to set the value to field
|
44
|
-
# @param field [
|
45
|
+
# @param field [Fields::Field] An instance of Fields::Field
|
45
46
|
|
46
47
|
def field=(field)
|
47
|
-
if field!=nil and !field.is_a?
|
48
|
-
raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: field EXPECTED TYPE:
|
48
|
+
if field!=nil and !field.is_a? Fields::Field
|
49
|
+
raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: field EXPECTED TYPE: Field', nil, nil)
|
49
50
|
end
|
50
51
|
@field = field
|
51
52
|
@key_modified['field'] = 1
|
@@ -1,3 +1,5 @@
|
|
1
|
+
require_relative '../fields/field'
|
2
|
+
require_relative '../users/user'
|
1
3
|
require_relative '../util/model'
|
2
4
|
|
3
5
|
module CustomViews
|
@@ -10,17 +12,20 @@ module CustomViews
|
|
10
12
|
@name = nil
|
11
13
|
@system_name = nil
|
12
14
|
@display_value = nil
|
13
|
-
@
|
15
|
+
@access_type = nil
|
14
16
|
@category = nil
|
15
17
|
@sort_by = nil
|
16
18
|
@sort_order = nil
|
17
19
|
@favorite = nil
|
18
|
-
@offline = nil
|
19
20
|
@default = nil
|
20
21
|
@system_defined = nil
|
21
22
|
@criteria = nil
|
22
|
-
@
|
23
|
+
@shared_to = nil
|
23
24
|
@fields = nil
|
25
|
+
@modified_time = nil
|
26
|
+
@modified_by = nil
|
27
|
+
@last_accessed_time = nil
|
28
|
+
@created_by = nil
|
24
29
|
@key_modified = Hash.new
|
25
30
|
end
|
26
31
|
|
@@ -96,22 +101,22 @@ module CustomViews
|
|
96
101
|
@key_modified['display_value'] = 1
|
97
102
|
end
|
98
103
|
|
99
|
-
# The method to get the
|
104
|
+
# The method to get the access_type
|
100
105
|
# @return A String value
|
101
106
|
|
102
|
-
def
|
103
|
-
@
|
107
|
+
def access_type
|
108
|
+
@access_type
|
104
109
|
end
|
105
110
|
|
106
|
-
# The method to set the value to
|
107
|
-
# @param
|
111
|
+
# The method to set the value to access_type
|
112
|
+
# @param access_type [String] A String
|
108
113
|
|
109
|
-
def
|
110
|
-
if
|
111
|
-
raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY:
|
114
|
+
def access_type=(access_type)
|
115
|
+
if access_type!=nil and !access_type.is_a? String
|
116
|
+
raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: access_type EXPECTED TYPE: String', nil, nil)
|
112
117
|
end
|
113
|
-
@
|
114
|
-
@key_modified['
|
118
|
+
@access_type = access_type
|
119
|
+
@key_modified['access_type'] = 1
|
115
120
|
end
|
116
121
|
|
117
122
|
# The method to get the category
|
@@ -186,24 +191,6 @@ module CustomViews
|
|
186
191
|
@key_modified['favorite'] = 1
|
187
192
|
end
|
188
193
|
|
189
|
-
# The method to get the offline
|
190
|
-
# @return A Boolean value
|
191
|
-
|
192
|
-
def offline
|
193
|
-
@offline
|
194
|
-
end
|
195
|
-
|
196
|
-
# The method to set the value to offline
|
197
|
-
# @param offline [Boolean] A Boolean
|
198
|
-
|
199
|
-
def offline=(offline)
|
200
|
-
if offline!=nil and ! [true, false].include?offline
|
201
|
-
raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: offline EXPECTED TYPE: Boolean', nil, nil)
|
202
|
-
end
|
203
|
-
@offline = offline
|
204
|
-
@key_modified['offline'] = 1
|
205
|
-
end
|
206
|
-
|
207
194
|
# The method to get the default
|
208
195
|
# @return A Boolean value
|
209
196
|
|
@@ -258,22 +245,22 @@ module CustomViews
|
|
258
245
|
@key_modified['criteria'] = 1
|
259
246
|
end
|
260
247
|
|
261
|
-
# The method to get the
|
248
|
+
# The method to get the shared_to
|
262
249
|
# @return An instance of Array
|
263
250
|
|
264
|
-
def
|
265
|
-
@
|
251
|
+
def shared_to
|
252
|
+
@shared_to
|
266
253
|
end
|
267
254
|
|
268
|
-
# The method to set the value to
|
269
|
-
# @param
|
255
|
+
# The method to set the value to shared_to
|
256
|
+
# @param shared_to [Array] An instance of Array
|
270
257
|
|
271
|
-
def
|
272
|
-
if
|
273
|
-
raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY:
|
258
|
+
def shared_to=(shared_to)
|
259
|
+
if shared_to!=nil and !shared_to.is_a? Array
|
260
|
+
raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: shared_to EXPECTED TYPE: Array', nil, nil)
|
274
261
|
end
|
275
|
-
@
|
276
|
-
@key_modified['
|
262
|
+
@shared_to = shared_to
|
263
|
+
@key_modified['shared_to'] = 1
|
277
264
|
end
|
278
265
|
|
279
266
|
# The method to get the fields
|
@@ -294,6 +281,78 @@ module CustomViews
|
|
294
281
|
@key_modified['fields'] = 1
|
295
282
|
end
|
296
283
|
|
284
|
+
# The method to get the modified_time
|
285
|
+
# @return An instance of DateTime
|
286
|
+
|
287
|
+
def modified_time
|
288
|
+
@modified_time
|
289
|
+
end
|
290
|
+
|
291
|
+
# The method to set the value to modified_time
|
292
|
+
# @param modified_time [DateTime] An instance of DateTime
|
293
|
+
|
294
|
+
def modified_time=(modified_time)
|
295
|
+
if modified_time!=nil and !modified_time.is_a? DateTime
|
296
|
+
raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: modified_time EXPECTED TYPE: DateTime', nil, nil)
|
297
|
+
end
|
298
|
+
@modified_time = modified_time
|
299
|
+
@key_modified['modified_time'] = 1
|
300
|
+
end
|
301
|
+
|
302
|
+
# The method to get the modified_by
|
303
|
+
# @return An instance of Users::User
|
304
|
+
|
305
|
+
def modified_by
|
306
|
+
@modified_by
|
307
|
+
end
|
308
|
+
|
309
|
+
# The method to set the value to modified_by
|
310
|
+
# @param modified_by [Users::User] An instance of Users::User
|
311
|
+
|
312
|
+
def modified_by=(modified_by)
|
313
|
+
if modified_by!=nil and !modified_by.is_a? Users::User
|
314
|
+
raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: modified_by EXPECTED TYPE: User', nil, nil)
|
315
|
+
end
|
316
|
+
@modified_by = modified_by
|
317
|
+
@key_modified['modified_by'] = 1
|
318
|
+
end
|
319
|
+
|
320
|
+
# The method to get the last_accessed_time
|
321
|
+
# @return An instance of DateTime
|
322
|
+
|
323
|
+
def last_accessed_time
|
324
|
+
@last_accessed_time
|
325
|
+
end
|
326
|
+
|
327
|
+
# The method to set the value to last_accessed_time
|
328
|
+
# @param last_accessed_time [DateTime] An instance of DateTime
|
329
|
+
|
330
|
+
def last_accessed_time=(last_accessed_time)
|
331
|
+
if last_accessed_time!=nil and !last_accessed_time.is_a? DateTime
|
332
|
+
raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: last_accessed_time EXPECTED TYPE: DateTime', nil, nil)
|
333
|
+
end
|
334
|
+
@last_accessed_time = last_accessed_time
|
335
|
+
@key_modified['last_accessed_time'] = 1
|
336
|
+
end
|
337
|
+
|
338
|
+
# The method to get the created_by
|
339
|
+
# @return An instance of Users::User
|
340
|
+
|
341
|
+
def created_by
|
342
|
+
@created_by
|
343
|
+
end
|
344
|
+
|
345
|
+
# The method to set the value to created_by
|
346
|
+
# @param created_by [Users::User] An instance of Users::User
|
347
|
+
|
348
|
+
def created_by=(created_by)
|
349
|
+
if created_by!=nil and !created_by.is_a? Users::User
|
350
|
+
raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: created_by EXPECTED TYPE: User', nil, nil)
|
351
|
+
end
|
352
|
+
@created_by = created_by
|
353
|
+
@key_modified['created_by'] = 1
|
354
|
+
end
|
355
|
+
|
297
356
|
# The method to check if the user has modified the given key
|
298
357
|
# @param key [String] A String
|
299
358
|
# @return A Integer value
|
@@ -27,7 +27,7 @@ module CustomViews
|
|
27
27
|
end
|
28
28
|
handler_instance = Handler::CommonAPIHandler.new
|
29
29
|
api_path = ''
|
30
|
-
api_path = api_path + '/crm/v2/settings/custom_views'
|
30
|
+
api_path = api_path + '/crm/v2.1/settings/custom_views'
|
31
31
|
handler_instance.api_path = api_path
|
32
32
|
handler_instance.http_method = Constants::REQUEST_METHOD_GET
|
33
33
|
handler_instance.category_method = 'READ'
|
@@ -47,7 +47,7 @@ module CustomViews
|
|
47
47
|
end
|
48
48
|
handler_instance = Handler::CommonAPIHandler.new
|
49
49
|
api_path = ''
|
50
|
-
api_path = api_path + '/crm/v2/settings/custom_views/'
|
50
|
+
api_path = api_path + '/crm/v2.1/settings/custom_views/'
|
51
51
|
api_path = api_path + id.to_s
|
52
52
|
handler_instance.api_path = api_path
|
53
53
|
handler_instance.http_method = Constants::REQUEST_METHOD_GET
|
@@ -11,8 +11,8 @@ module DC
|
|
11
11
|
'https://content.zohoapis.com.au'
|
12
12
|
end
|
13
13
|
|
14
|
-
PRODUCTION = Environment.new('https://www.zohoapis.com.au', AUDataCenter.new.get_iam_url, AUDataCenter.new.get_file_upload_url)
|
15
|
-
SANDBOX = Environment.new('https://sandbox.zohoapis.com.au', AUDataCenter.new.get_iam_url, AUDataCenter.new.get_file_upload_url)
|
16
|
-
DEVELOPER = Environment.new('https://developer.zohoapis.com.au', AUDataCenter.new.get_iam_url, AUDataCenter.new.get_file_upload_url)
|
14
|
+
PRODUCTION = Environment.new('https://www.zohoapis.com.au', AUDataCenter.new.get_iam_url, AUDataCenter.new.get_file_upload_url,"au_prd")
|
15
|
+
SANDBOX = Environment.new('https://sandbox.zohoapis.com.au', AUDataCenter.new.get_iam_url, AUDataCenter.new.get_file_upload_url,"au_sdb")
|
16
|
+
DEVELOPER = Environment.new('https://developer.zohoapis.com.au', AUDataCenter.new.get_iam_url, AUDataCenter.new.get_file_upload_url,"au_dev")
|
17
17
|
end
|
18
18
|
end
|
@@ -11,8 +11,8 @@ module DC
|
|
11
11
|
'https://content.zohoapis.com.cn'
|
12
12
|
end
|
13
13
|
|
14
|
-
PRODUCTION = Environment.new('https://www.zohoapis.com.cn', CNDataCenter.new.get_iam_url, CNDataCenter.new.get_file_upload_url)
|
15
|
-
SANDBOX = Environment.new('https://sandbox.zohoapis.com.cn', CNDataCenter.new.get_iam_url, CNDataCenter.new.get_file_upload_url)
|
16
|
-
DEVELOPER = Environment.new('https://developer.zohoapis.com.cn', CNDataCenter.new.get_iam_url, CNDataCenter.new.get_file_upload_url)
|
14
|
+
PRODUCTION = Environment.new('https://www.zohoapis.com.cn', CNDataCenter.new.get_iam_url, CNDataCenter.new.get_file_upload_url,"cn_prd")
|
15
|
+
SANDBOX = Environment.new('https://sandbox.zohoapis.com.cn', CNDataCenter.new.get_iam_url, CNDataCenter.new.get_file_upload_url,"cn_sdb")
|
16
|
+
DEVELOPER = Environment.new('https://developer.zohoapis.com.cn', CNDataCenter.new.get_iam_url, CNDataCenter.new.get_file_upload_url,"cn_dev")
|
17
17
|
end
|
18
18
|
end
|
@@ -9,11 +9,12 @@ module DC
|
|
9
9
|
end
|
10
10
|
|
11
11
|
class Environment
|
12
|
-
attr_reader :accounts_url, :url, :file_upload_url
|
13
|
-
def initialize(url, accounts_url, file_upload_url)
|
12
|
+
attr_reader :accounts_url, :url, :file_upload_url,:name
|
13
|
+
def initialize(url, accounts_url, file_upload_url, name)
|
14
14
|
@url = url
|
15
15
|
@accounts_url = accounts_url
|
16
16
|
@file_upload_url = file_upload_url
|
17
|
+
@name = name
|
17
18
|
end
|
18
19
|
end
|
19
20
|
end
|
@@ -11,8 +11,8 @@ module DC
|
|
11
11
|
'https://content.zohoapis.eu'
|
12
12
|
end
|
13
13
|
|
14
|
-
PRODUCTION = Environment.new('https://www.zohoapis.eu', EUDataCenter.new.get_iam_url, EUDataCenter.new.get_file_upload_url)
|
15
|
-
SANDBOX = Environment.new('https://sandbox.zohoapis.eu', EUDataCenter.new.get_iam_url, EUDataCenter.new.get_file_upload_url)
|
16
|
-
DEVELOPER = Environment.new('https://developer.zohoapis.eu', EUDataCenter.new.get_iam_url, EUDataCenter.new.get_file_upload_url)
|
14
|
+
PRODUCTION = Environment.new('https://www.zohoapis.eu', EUDataCenter.new.get_iam_url, EUDataCenter.new.get_file_upload_url,"eu_prd")
|
15
|
+
SANDBOX = Environment.new('https://sandbox.zohoapis.eu', EUDataCenter.new.get_iam_url, EUDataCenter.new.get_file_upload_url,"eu_sdb")
|
16
|
+
DEVELOPER = Environment.new('https://developer.zohoapis.eu', EUDataCenter.new.get_iam_url, EUDataCenter.new.get_file_upload_url,"eu_dev")
|
17
17
|
end
|
18
18
|
end
|
@@ -11,8 +11,8 @@ module DC
|
|
11
11
|
'https://content.zohoapis.in'
|
12
12
|
end
|
13
13
|
|
14
|
-
PRODUCTION = Environment.new('https://www.zohoapis.in', INDataCenter.new.get_iam_url, INDataCenter.new.get_file_upload_url)
|
15
|
-
SANDBOX = Environment.new('https://sandbox.zohoapis.in', INDataCenter.new.get_iam_url, INDataCenter.new.get_file_upload_url)
|
16
|
-
DEVELOPER = Environment.new('https://developer.zohoapis.in', INDataCenter.new.get_iam_url, INDataCenter.new.get_file_upload_url)
|
14
|
+
PRODUCTION = Environment.new('https://www.zohoapis.in', INDataCenter.new.get_iam_url, INDataCenter.new.get_file_upload_url,"in_prd")
|
15
|
+
SANDBOX = Environment.new('https://sandbox.zohoapis.in', INDataCenter.new.get_iam_url, INDataCenter.new.get_file_upload_url,"in_sdb")
|
16
|
+
DEVELOPER = Environment.new('https://developer.zohoapis.in', INDataCenter.new.get_iam_url, INDataCenter.new.get_file_upload_url,"in_dev")
|
17
17
|
end
|
18
18
|
end
|
@@ -11,8 +11,8 @@ module DC
|
|
11
11
|
'https://content.zohoapis.com'
|
12
12
|
end
|
13
13
|
|
14
|
-
PRODUCTION = Environment.new('https://www.zohoapis.com', USDataCenter.new.get_iam_url, USDataCenter.new.get_file_upload_url)
|
15
|
-
SANDBOX = Environment.new('https://sandbox.zohoapis.com', USDataCenter.new.get_iam_url, USDataCenter.new.get_file_upload_url)
|
16
|
-
DEVELOPER = Environment.new('https://developer.zohoapis.com', USDataCenter.new.get_iam_url, USDataCenter.new.get_file_upload_url)
|
14
|
+
PRODUCTION = Environment.new('https://www.zohoapis.com', USDataCenter.new.get_iam_url, USDataCenter.new.get_file_upload_url,"us_prd")
|
15
|
+
SANDBOX = Environment.new('https://sandbox.zohoapis.com', USDataCenter.new.get_iam_url, USDataCenter.new.get_file_upload_url,"us_sdb")
|
16
|
+
DEVELOPER = Environment.new('https://developer.zohoapis.com', USDataCenter.new.get_iam_url, USDataCenter.new.get_file_upload_url,"us_dev")
|
17
17
|
end
|
18
18
|
end
|
@@ -0,0 +1,121 @@
|
|
1
|
+
require_relative '../util/choice'
|
2
|
+
require_relative '../util/model'
|
3
|
+
|
4
|
+
module EmailTemplates
|
5
|
+
require_relative 'response_handler'
|
6
|
+
class APIException
|
7
|
+
include Util::Model
|
8
|
+
include ResponseHandler
|
9
|
+
|
10
|
+
# Creates an instance of APIException
|
11
|
+
def initialize
|
12
|
+
@code = nil
|
13
|
+
@status = nil
|
14
|
+
@message = nil
|
15
|
+
@details = nil
|
16
|
+
@key_modified = Hash.new
|
17
|
+
end
|
18
|
+
|
19
|
+
# The method to get the code
|
20
|
+
# @return An instance of Util::Choice
|
21
|
+
|
22
|
+
def code
|
23
|
+
@code
|
24
|
+
end
|
25
|
+
|
26
|
+
# The method to set the value to code
|
27
|
+
# @param code [Util::Choice] An instance of Util::Choice
|
28
|
+
|
29
|
+
def code=(code)
|
30
|
+
if code!=nil and !code.is_a? Util::Choice
|
31
|
+
raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: code EXPECTED TYPE: Util::Choice', nil, nil)
|
32
|
+
end
|
33
|
+
@code = code
|
34
|
+
@key_modified['code'] = 1
|
35
|
+
end
|
36
|
+
|
37
|
+
# The method to get the status
|
38
|
+
# @return An instance of Util::Choice
|
39
|
+
|
40
|
+
def status
|
41
|
+
@status
|
42
|
+
end
|
43
|
+
|
44
|
+
# The method to set the value to status
|
45
|
+
# @param status [Util::Choice] An instance of Util::Choice
|
46
|
+
|
47
|
+
def status=(status)
|
48
|
+
if status!=nil and !status.is_a? Util::Choice
|
49
|
+
raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: status EXPECTED TYPE: Util::Choice', nil, nil)
|
50
|
+
end
|
51
|
+
@status = status
|
52
|
+
@key_modified['status'] = 1
|
53
|
+
end
|
54
|
+
|
55
|
+
# The method to get the message
|
56
|
+
# @return An instance of Util::Choice
|
57
|
+
|
58
|
+
def message
|
59
|
+
@message
|
60
|
+
end
|
61
|
+
|
62
|
+
# The method to set the value to message
|
63
|
+
# @param message [Util::Choice] An instance of Util::Choice
|
64
|
+
|
65
|
+
def message=(message)
|
66
|
+
if message!=nil and !message.is_a? Util::Choice
|
67
|
+
raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: message EXPECTED TYPE: Util::Choice', nil, nil)
|
68
|
+
end
|
69
|
+
@message = message
|
70
|
+
@key_modified['message'] = 1
|
71
|
+
end
|
72
|
+
|
73
|
+
# The method to get the details
|
74
|
+
# @return An instance of Hash
|
75
|
+
|
76
|
+
def details
|
77
|
+
@details
|
78
|
+
end
|
79
|
+
|
80
|
+
# The method to set the value to details
|
81
|
+
# @param details [Hash] An instance of Hash
|
82
|
+
|
83
|
+
def details=(details)
|
84
|
+
if details!=nil and !details.is_a? Hash
|
85
|
+
raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: details EXPECTED TYPE: Hash', nil, nil)
|
86
|
+
end
|
87
|
+
@details = details
|
88
|
+
@key_modified['details'] = 1
|
89
|
+
end
|
90
|
+
|
91
|
+
# The method to check if the user has modified the given key
|
92
|
+
# @param key [String] A String
|
93
|
+
# @return A Integer value
|
94
|
+
|
95
|
+
def is_key_modified(key)
|
96
|
+
if key!=nil and !key.is_a? String
|
97
|
+
raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: String', nil, nil)
|
98
|
+
end
|
99
|
+
if @key_modified.key?(key)
|
100
|
+
return @key_modified[key]
|
101
|
+
end
|
102
|
+
|
103
|
+
nil
|
104
|
+
end
|
105
|
+
|
106
|
+
# The method to mark the given key as modified
|
107
|
+
# @param key [String] A String
|
108
|
+
# @param modification [Integer] A Integer
|
109
|
+
|
110
|
+
def set_key_modified(key, modification)
|
111
|
+
if key!=nil and !key.is_a? String
|
112
|
+
raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: String', nil, nil)
|
113
|
+
end
|
114
|
+
if modification!=nil and !modification.is_a? Integer
|
115
|
+
raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: Integer', nil, nil)
|
116
|
+
end
|
117
|
+
@key_modified[key] = modification
|
118
|
+
end
|
119
|
+
|
120
|
+
end
|
121
|
+
end
|