ZCRMSDK 2.0.0 → 3.0.0.beta
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/src/ZCRMSDK.rb +84 -1
- data/src/com/zoho/api/authenticator/oauth_token.rb +87 -31
- data/src/com/zoho/api/authenticator/store/db_store.rb +48 -28
- data/src/com/zoho/api/authenticator/store/file_store.rb +69 -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 +4 -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 +1107 -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 +192 -38
- 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_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 +41 -16
- 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/notes_operations.rb +7 -7
- data/src/com/zoho/crm/api/notification/notification_operations.rb +6 -6
- 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/default_view.rb +99 -0
- data/src/com/zoho/crm/api/profiles/profile.rb +57 -0
- 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 +1 -0
- data/src/com/zoho/crm/api/record/image_upload.rb +213 -0
- data/src/com/zoho/crm/api/record/inventory_line_items.rb +56 -39
- 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/users_operations.rb +6 -6
- data/src/com/zoho/crm/api/util/api_http_connector.rb +5 -4
- data/src/com/zoho/crm/api/util/constants.rb +140 -13
- data/src/com/zoho/crm/api/util/converter.rb +21 -4
- data/src/com/zoho/crm/api/util/form_data_converter.rb +3 -14
- data/src/com/zoho/crm/api/util/utility.rb +226 -70
- 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 +214 -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/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 +88 -5
@@ -18,7 +18,7 @@ module Taxes
|
|
18
18
|
def get_taxes
|
19
19
|
handler_instance = Handler::CommonAPIHandler.new
|
20
20
|
api_path = ''
|
21
|
-
api_path = api_path + '/crm/v2/org/taxes'
|
21
|
+
api_path = api_path + '/crm/v2.1/org/taxes'
|
22
22
|
handler_instance.api_path = api_path
|
23
23
|
handler_instance.http_method = Constants::REQUEST_METHOD_GET
|
24
24
|
handler_instance.category_method = 'READ'
|
@@ -36,7 +36,7 @@ module Taxes
|
|
36
36
|
end
|
37
37
|
handler_instance = Handler::CommonAPIHandler.new
|
38
38
|
api_path = ''
|
39
|
-
api_path = api_path + '/crm/v2/org/taxes'
|
39
|
+
api_path = api_path + '/crm/v2.1/org/taxes'
|
40
40
|
handler_instance.api_path = api_path
|
41
41
|
handler_instance.http_method = Constants::REQUEST_METHOD_POST
|
42
42
|
handler_instance.category_method = 'CREATE'
|
@@ -57,7 +57,7 @@ module Taxes
|
|
57
57
|
end
|
58
58
|
handler_instance = Handler::CommonAPIHandler.new
|
59
59
|
api_path = ''
|
60
|
-
api_path = api_path + '/crm/v2/org/taxes'
|
60
|
+
api_path = api_path + '/crm/v2.1/org/taxes'
|
61
61
|
handler_instance.api_path = api_path
|
62
62
|
handler_instance.http_method = Constants::REQUEST_METHOD_PUT
|
63
63
|
handler_instance.category_method = 'UPDATE'
|
@@ -78,7 +78,7 @@ module Taxes
|
|
78
78
|
end
|
79
79
|
handler_instance = Handler::CommonAPIHandler.new
|
80
80
|
api_path = ''
|
81
|
-
api_path = api_path + '/crm/v2/org/taxes'
|
81
|
+
api_path = api_path + '/crm/v2.1/org/taxes'
|
82
82
|
handler_instance.api_path = api_path
|
83
83
|
handler_instance.http_method = Constants::REQUEST_METHOD_DELETE
|
84
84
|
handler_instance.category_method = Constants::REQUEST_METHOD_DELETE
|
@@ -97,7 +97,7 @@ module Taxes
|
|
97
97
|
end
|
98
98
|
handler_instance = Handler::CommonAPIHandler.new
|
99
99
|
api_path = ''
|
100
|
-
api_path = api_path + '/crm/v2/org/taxes/'
|
100
|
+
api_path = api_path + '/crm/v2.1/org/taxes/'
|
101
101
|
api_path = api_path + id.to_s
|
102
102
|
handler_instance.api_path = api_path
|
103
103
|
handler_instance.http_method = Constants::REQUEST_METHOD_GET
|
@@ -116,7 +116,7 @@ module Taxes
|
|
116
116
|
end
|
117
117
|
handler_instance = Handler::CommonAPIHandler.new
|
118
118
|
api_path = ''
|
119
|
-
api_path = api_path + '/crm/v2/org/taxes/'
|
119
|
+
api_path = api_path + '/crm/v2.1/org/taxes/'
|
120
120
|
api_path = api_path + id.to_s
|
121
121
|
handler_instance.api_path = api_path
|
122
122
|
handler_instance.http_method = Constants::REQUEST_METHOD_DELETE
|
@@ -1,3 +1,4 @@
|
|
1
|
+
require_relative '../record/info'
|
1
2
|
require_relative '../util/model'
|
2
3
|
|
3
4
|
module Territories
|
@@ -9,6 +10,7 @@ module Territories
|
|
9
10
|
# Creates an instance of ResponseWrapper
|
10
11
|
def initialize
|
11
12
|
@territories = nil
|
13
|
+
@info = nil
|
12
14
|
@key_modified = Hash.new
|
13
15
|
end
|
14
16
|
|
@@ -30,6 +32,24 @@ module Territories
|
|
30
32
|
@key_modified['territories'] = 1
|
31
33
|
end
|
32
34
|
|
35
|
+
# The method to get the info
|
36
|
+
# @return An instance of Record::Info
|
37
|
+
|
38
|
+
def info
|
39
|
+
@info
|
40
|
+
end
|
41
|
+
|
42
|
+
# The method to set the value to info
|
43
|
+
# @param info [Record::Info] An instance of Record::Info
|
44
|
+
|
45
|
+
def info=(info)
|
46
|
+
if info!=nil and !info.is_a? Record::Info
|
47
|
+
raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: info EXPECTED TYPE: Info', nil, nil)
|
48
|
+
end
|
49
|
+
@info = info
|
50
|
+
@key_modified['info'] = 1
|
51
|
+
end
|
52
|
+
|
33
53
|
# The method to check if the user has modified the given key
|
34
54
|
# @param key [String] A String
|
35
55
|
# @return A Integer value
|
@@ -16,7 +16,7 @@ module Territories
|
|
16
16
|
def get_territories
|
17
17
|
handler_instance = Handler::CommonAPIHandler.new
|
18
18
|
api_path = ''
|
19
|
-
api_path = api_path + '/crm/v2/settings/territories'
|
19
|
+
api_path = api_path + '/crm/v2.1/settings/territories'
|
20
20
|
handler_instance.api_path = api_path
|
21
21
|
handler_instance.http_method = Constants::REQUEST_METHOD_GET
|
22
22
|
handler_instance.category_method = 'READ'
|
@@ -34,7 +34,7 @@ module Territories
|
|
34
34
|
end
|
35
35
|
handler_instance = Handler::CommonAPIHandler.new
|
36
36
|
api_path = ''
|
37
|
-
api_path = api_path + '/crm/v2/settings/territories/'
|
37
|
+
api_path = api_path + '/crm/v2.1/settings/territories/'
|
38
38
|
api_path = api_path + id.to_s
|
39
39
|
handler_instance.api_path = api_path
|
40
40
|
handler_instance.http_method = Constants::REQUEST_METHOD_GET
|
@@ -11,13 +11,15 @@ module Territories
|
|
11
11
|
@created_time = nil
|
12
12
|
@modified_time = nil
|
13
13
|
@manager = nil
|
14
|
-
@
|
15
|
-
@
|
14
|
+
@account_rule_criteria = nil
|
15
|
+
@deal_rule_criteria = nil
|
16
16
|
@name = nil
|
17
17
|
@modified_by = nil
|
18
18
|
@description = nil
|
19
19
|
@id = nil
|
20
20
|
@created_by = nil
|
21
|
+
@reporting_to = nil
|
22
|
+
@permission_type = nil
|
21
23
|
@key_modified = Hash.new
|
22
24
|
end
|
23
25
|
|
@@ -75,40 +77,40 @@ module Territories
|
|
75
77
|
@key_modified['manager'] = 1
|
76
78
|
end
|
77
79
|
|
78
|
-
# The method to get the
|
79
|
-
# @return
|
80
|
+
# The method to get the account_rule_criteria
|
81
|
+
# @return An instance of CustomViews::Criteria
|
80
82
|
|
81
|
-
def
|
82
|
-
@
|
83
|
+
def account_rule_criteria
|
84
|
+
@account_rule_criteria
|
83
85
|
end
|
84
86
|
|
85
|
-
# The method to set the value to
|
86
|
-
# @param
|
87
|
+
# The method to set the value to account_rule_criteria
|
88
|
+
# @param account_rule_criteria [CustomViews::Criteria] An instance of CustomViews::Criteria
|
87
89
|
|
88
|
-
def
|
89
|
-
if
|
90
|
-
raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY:
|
90
|
+
def account_rule_criteria=(account_rule_criteria)
|
91
|
+
if account_rule_criteria!=nil and !account_rule_criteria.is_a? CustomViews::Criteria
|
92
|
+
raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: account_rule_criteria EXPECTED TYPE: Criteria', nil, nil)
|
91
93
|
end
|
92
|
-
@
|
93
|
-
@key_modified['
|
94
|
+
@account_rule_criteria = account_rule_criteria
|
95
|
+
@key_modified['account_rule_criteria'] = 1
|
94
96
|
end
|
95
97
|
|
96
|
-
# The method to get the
|
98
|
+
# The method to get the deal_rule_criteria
|
97
99
|
# @return An instance of CustomViews::Criteria
|
98
100
|
|
99
|
-
def
|
100
|
-
@
|
101
|
+
def deal_rule_criteria
|
102
|
+
@deal_rule_criteria
|
101
103
|
end
|
102
104
|
|
103
|
-
# The method to set the value to
|
104
|
-
# @param
|
105
|
+
# The method to set the value to deal_rule_criteria
|
106
|
+
# @param deal_rule_criteria [CustomViews::Criteria] An instance of CustomViews::Criteria
|
105
107
|
|
106
|
-
def
|
107
|
-
if
|
108
|
-
raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY:
|
108
|
+
def deal_rule_criteria=(deal_rule_criteria)
|
109
|
+
if deal_rule_criteria!=nil and !deal_rule_criteria.is_a? CustomViews::Criteria
|
110
|
+
raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: deal_rule_criteria EXPECTED TYPE: Criteria', nil, nil)
|
109
111
|
end
|
110
|
-
@
|
111
|
-
@key_modified['
|
112
|
+
@deal_rule_criteria = deal_rule_criteria
|
113
|
+
@key_modified['deal_rule_criteria'] = 1
|
112
114
|
end
|
113
115
|
|
114
116
|
# The method to get the name
|
@@ -201,6 +203,42 @@ module Territories
|
|
201
203
|
@key_modified['created_by'] = 1
|
202
204
|
end
|
203
205
|
|
206
|
+
# The method to get the reporting_to
|
207
|
+
# @return An instance of Territory
|
208
|
+
|
209
|
+
def reporting_to
|
210
|
+
@reporting_to
|
211
|
+
end
|
212
|
+
|
213
|
+
# The method to set the value to reporting_to
|
214
|
+
# @param reporting_to [Territory] An instance of Territory
|
215
|
+
|
216
|
+
def reporting_to=(reporting_to)
|
217
|
+
if reporting_to!=nil and !reporting_to.is_a? Territory
|
218
|
+
raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: reporting_to EXPECTED TYPE: Territory', nil, nil)
|
219
|
+
end
|
220
|
+
@reporting_to = reporting_to
|
221
|
+
@key_modified['reporting_to'] = 1
|
222
|
+
end
|
223
|
+
|
224
|
+
# The method to get the permission_type
|
225
|
+
# @return A String value
|
226
|
+
|
227
|
+
def permission_type
|
228
|
+
@permission_type
|
229
|
+
end
|
230
|
+
|
231
|
+
# The method to set the value to permission_type
|
232
|
+
# @param permission_type [String] A String
|
233
|
+
|
234
|
+
def permission_type=(permission_type)
|
235
|
+
if permission_type!=nil and !permission_type.is_a? String
|
236
|
+
raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: permission_type EXPECTED TYPE: String', nil, nil)
|
237
|
+
end
|
238
|
+
@permission_type = permission_type
|
239
|
+
@key_modified['permission_type'] = 1
|
240
|
+
end
|
241
|
+
|
204
242
|
# The method to check if the user has modified the given key
|
205
243
|
# @param key [String] A String
|
206
244
|
# @return A Integer value
|
@@ -28,7 +28,7 @@ module Users
|
|
28
28
|
end
|
29
29
|
handler_instance = Handler::CommonAPIHandler.new
|
30
30
|
api_path = ''
|
31
|
-
api_path = api_path + '/crm/v2/users'
|
31
|
+
api_path = api_path + '/crm/v2.1/users'
|
32
32
|
handler_instance.api_path = api_path
|
33
33
|
handler_instance.http_method = Constants::REQUEST_METHOD_GET
|
34
34
|
handler_instance.category_method = 'READ'
|
@@ -48,7 +48,7 @@ module Users
|
|
48
48
|
end
|
49
49
|
handler_instance = Handler::CommonAPIHandler.new
|
50
50
|
api_path = ''
|
51
|
-
api_path = api_path + '/crm/v2/users'
|
51
|
+
api_path = api_path + '/crm/v2.1/users'
|
52
52
|
handler_instance.api_path = api_path
|
53
53
|
handler_instance.http_method = Constants::REQUEST_METHOD_POST
|
54
54
|
handler_instance.category_method = 'CREATE'
|
@@ -69,7 +69,7 @@ module Users
|
|
69
69
|
end
|
70
70
|
handler_instance = Handler::CommonAPIHandler.new
|
71
71
|
api_path = ''
|
72
|
-
api_path = api_path + '/crm/v2/users'
|
72
|
+
api_path = api_path + '/crm/v2.1/users'
|
73
73
|
handler_instance.api_path = api_path
|
74
74
|
handler_instance.http_method = Constants::REQUEST_METHOD_PUT
|
75
75
|
handler_instance.category_method = 'UPDATE'
|
@@ -94,7 +94,7 @@ module Users
|
|
94
94
|
end
|
95
95
|
handler_instance = Handler::CommonAPIHandler.new
|
96
96
|
api_path = ''
|
97
|
-
api_path = api_path + '/crm/v2/users/'
|
97
|
+
api_path = api_path + '/crm/v2.1/users/'
|
98
98
|
api_path = api_path + id.to_s
|
99
99
|
handler_instance.api_path = api_path
|
100
100
|
handler_instance.http_method = Constants::REQUEST_METHOD_GET
|
@@ -118,7 +118,7 @@ module Users
|
|
118
118
|
end
|
119
119
|
handler_instance = Handler::CommonAPIHandler.new
|
120
120
|
api_path = ''
|
121
|
-
api_path = api_path + '/crm/v2/users/'
|
121
|
+
api_path = api_path + '/crm/v2.1/users/'
|
122
122
|
api_path = api_path + id.to_s
|
123
123
|
handler_instance.api_path = api_path
|
124
124
|
handler_instance.http_method = Constants::REQUEST_METHOD_PUT
|
@@ -139,7 +139,7 @@ module Users
|
|
139
139
|
end
|
140
140
|
handler_instance = Handler::CommonAPIHandler.new
|
141
141
|
api_path = ''
|
142
|
-
api_path = api_path + '/crm/v2/users/'
|
142
|
+
api_path = api_path + '/crm/v2.1/users/'
|
143
143
|
api_path = api_path + id.to_s
|
144
144
|
handler_instance.api_path = api_path
|
145
145
|
handler_instance.http_method = Constants::REQUEST_METHOD_DELETE
|
@@ -24,7 +24,7 @@ module Util
|
|
24
24
|
end
|
25
25
|
|
26
26
|
def set_content_type_header
|
27
|
-
Constants::
|
27
|
+
Constants::SET_CONTENT_TYPE_HEADER.each do |content_type|
|
28
28
|
if @url.include? content_type
|
29
29
|
@headers[Constants::CONTENT_TYPE] = @content_type
|
30
30
|
break
|
@@ -101,11 +101,12 @@ module Util
|
|
101
101
|
end
|
102
102
|
|
103
103
|
def proxy_log(request_proxy)
|
104
|
+
proxy_log = Constants::PROXY_SETTINGS + Constants::PROXY_HOST + request_proxy.host + " , "
|
105
|
+
proxy_log += Constants::PROXY_PORT + request_proxy.port.to_s
|
104
106
|
if request_proxy.user_name.nil?
|
105
|
-
|
106
|
-
else
|
107
|
-
'Proxy settings - Host : ' + request_proxy.host + ' , Port : ' + request_proxy.port.to_s + ' , Proxy User : ' + request_proxy.user_name
|
107
|
+
proxy_log += " , " + Constants::PROXY_USER + request_proxy.user_name
|
108
108
|
end
|
109
|
+
proxy_log
|
109
110
|
end
|
110
111
|
end
|
111
112
|
end
|
@@ -26,6 +26,8 @@ class Constants
|
|
26
26
|
|
27
27
|
RESPONSECODE_BAD_REQUEST = 400
|
28
28
|
|
29
|
+
JSON_DETAILS_ERROR = "ERROR IN READING JSONDETAILS FILE"
|
30
|
+
|
29
31
|
RESPONSECODE_AUTHORIZATION_ERROR = 401
|
30
32
|
|
31
33
|
RESPONSECODE_FORBIDDEN = 403
|
@@ -94,15 +96,81 @@ class Constants
|
|
94
96
|
|
95
97
|
HTTP = 'http'
|
96
98
|
|
99
|
+
KEY_VS_INVENTORY_MODULE = {
|
100
|
+
"Quoted_Items"=>"quotes",
|
101
|
+
|
102
|
+
"Invoiced_Items" => "invoices",
|
103
|
+
|
104
|
+
"Purchase_Items" => "purchase_orders",
|
105
|
+
|
106
|
+
"Ordered_Items" => "sales_orders"
|
107
|
+
|
108
|
+
}
|
109
|
+
DEFAULT_MODULENAME_VS_APINAME = {
|
110
|
+
|
111
|
+
"leads" => "Leads",
|
112
|
+
|
113
|
+
"contacts" => "Contacts",
|
114
|
+
|
115
|
+
"accounts" => "Accounts",
|
116
|
+
|
117
|
+
"deals" => "Deals",
|
118
|
+
|
119
|
+
"tasks" => "Tasks",
|
120
|
+
|
121
|
+
"events" => "Events",
|
122
|
+
|
123
|
+
"activities" => "Activities",
|
124
|
+
|
125
|
+
"calls" => "Calls",
|
126
|
+
|
127
|
+
"products" => "Products",
|
128
|
+
|
129
|
+
"quotes" => "Quotes",
|
130
|
+
|
131
|
+
"sales_orders" => "Sales_Orders",
|
132
|
+
|
133
|
+
"purchase_orders" => "Purchase_Orders",
|
134
|
+
|
135
|
+
"invoices" => "Invoices",
|
136
|
+
|
137
|
+
"campaigns" => "Campaigns",
|
138
|
+
|
139
|
+
"vendors" => "Vendors",
|
140
|
+
|
141
|
+
"price_books" => "Price_Books",
|
142
|
+
|
143
|
+
"cases" => "Cases",
|
144
|
+
|
145
|
+
"solutions" => "Solutions",
|
146
|
+
|
147
|
+
"visits" => "Visits",
|
148
|
+
|
149
|
+
"approvals" => "Approvals",
|
150
|
+
|
151
|
+
"notes" => "Notes",
|
152
|
+
|
153
|
+
"attachments" => "Attachments",
|
154
|
+
|
155
|
+
"actions_performed" => "Actions_Performed",
|
156
|
+
|
157
|
+
}
|
158
|
+
|
159
|
+
USER_AGENT = "Mozilla/5.0"
|
160
|
+
|
161
|
+
USER_AGENT_KEY = "user-agent"
|
162
|
+
|
97
163
|
CONTENT_API_URL = 'content.zohoapis.com'
|
98
164
|
|
99
165
|
INVALID_URL_ERROR = 'Invalid URI Error'
|
100
166
|
|
101
167
|
ZOHO_SDK = 'X-ZOHO-SDK'
|
102
168
|
|
103
|
-
SDK_VERSION = '
|
169
|
+
SDK_VERSION = '3.0.0-beta'
|
104
170
|
|
105
|
-
|
171
|
+
SET_CONTENT_TYPE_HEADER = ['/crm/bulk/v2.1/read', '/crm/bulk/v2.1/write']
|
172
|
+
|
173
|
+
RESOURCE_PATH_INVALID_ERROR_MESSAGE = "Resource Path MUST be a valid directory."
|
106
174
|
|
107
175
|
IS_GENERATE_REQUEST_BODY =[REQUEST_METHOD_POST,REQUEST_METHOD_PUT,REQUEST_METHOD_PATCH]
|
108
176
|
|
@@ -112,9 +180,9 @@ class Constants
|
|
112
180
|
|
113
181
|
CRM = "crm"
|
114
182
|
|
115
|
-
API_VERSION = "v2"
|
183
|
+
API_VERSION = "v2.1"
|
116
184
|
|
117
|
-
PHOTO_SUPPORTED_MODULES = ["
|
185
|
+
PHOTO_SUPPORTED_MODULES = ["Leads", "Contacts", "Accounts", "Products", "Vendors", "Deals", "Cases", "Solutions"]
|
118
186
|
|
119
187
|
PARAMETER_NULL_ERROR = 'NULL PARAMETER ERROR'
|
120
188
|
|
@@ -168,6 +236,16 @@ class Constants
|
|
168
236
|
|
169
237
|
EXPIRY_TIME = 'expiry_time'
|
170
238
|
|
239
|
+
PROXY_SETTINGS = "Proxy settings - "
|
240
|
+
|
241
|
+
PROXY_HOST = "Host: "
|
242
|
+
|
243
|
+
PROXY_PORT = "Port: "
|
244
|
+
|
245
|
+
PROXY_USER = "User: "
|
246
|
+
|
247
|
+
PROXY_DOMAIN = "Domain: "
|
248
|
+
|
171
249
|
USER_MAIL_NULL_ERROR = 'USER MAIL NULL ERROR'
|
172
250
|
|
173
251
|
USER_MAIL_NULL_ERROR_MESSAGE = 'User Mail MUST NOT be null. Use setUserMail() to set value.'
|
@@ -178,6 +256,10 @@ class Constants
|
|
178
256
|
|
179
257
|
GET_TOKEN_DB_ERROR = 'Exception in get_token - DBStore:'
|
180
258
|
|
259
|
+
GET_TOKEN_BY_ID_DB_ERROR = "Exception in getTokenById - DBStore : Given ID is invalid"
|
260
|
+
|
261
|
+
GET_TOKEN_BY_ID_FILE_ERROR = "Exception in getTokenById - FileStore : Given ID is invalid"
|
262
|
+
|
181
263
|
GET_TOKENS_DB_ERROR = 'Exception in get_tokens - DBStore:'
|
182
264
|
|
183
265
|
DELETE_TOKEN_DB_ERROR = 'Exception in delete_token - DBStore:'
|
@@ -188,6 +270,8 @@ class Constants
|
|
188
270
|
|
189
271
|
GET_TOKEN_FILE_ERROR = 'Exception in get_token - FileStore:'
|
190
272
|
|
273
|
+
LOGGER_INITIALIZATION_ERROR = "Exception in Logger Initialization : "
|
274
|
+
|
191
275
|
REFRESH_SINGLE_MODULE_FIELDS_ERROR = 'Exception in refreshing fields of module : '
|
192
276
|
|
193
277
|
REFRESH_ALL_MODULE_FIELDS_ERROR = 'Exception in refreshing fields of all modules : '
|
@@ -214,8 +298,6 @@ class Constants
|
|
214
298
|
|
215
299
|
DELETE_TOKENS_FILE_ERROR = 'Exception in delete_tokens - FileStore:'
|
216
300
|
|
217
|
-
SDK_LOGGER_INITIALIZE = 'Exception in Logger Initialization'
|
218
|
-
|
219
301
|
DELETE_MODULE_FROM_FIELDFILE_ERROR = 'Exception in deleting module from Fields file'
|
220
302
|
|
221
303
|
DELETE_FIELD_FILE_ERROR = 'Exception in deleting Current User Fields file'
|
@@ -230,7 +312,25 @@ class Constants
|
|
230
312
|
|
231
313
|
GIVEN_VALUE = "given-value"
|
232
314
|
|
233
|
-
|
315
|
+
MULTI_SELECT_LOOKUP = "multiselectlookup"
|
316
|
+
|
317
|
+
MULTI_USER_LOOKUP = "multiuserlookup"
|
318
|
+
|
319
|
+
TERRITORIES = "territories"
|
320
|
+
|
321
|
+
GENERATED_TYPE = "generated_type"
|
322
|
+
|
323
|
+
GENERATED_TYPE_CUSTOM = "custom"
|
324
|
+
|
325
|
+
UPLOAD_PHOTO_UNSUPPORTED_MESSAGE = "Photo Upload Operation is not supported by the module: "
|
326
|
+
|
327
|
+
SDK_MODULE_METADATA = "SDK-MODULE-METADATA"
|
328
|
+
|
329
|
+
INVALID_MODULE_API_NAME_ERROR = "INVALID MODULE API NAME ERROR"
|
330
|
+
|
331
|
+
PROVIDE_VALID_MODULE_API_NAME = "PROVIDE VALID MODULE API NAME: "
|
332
|
+
|
333
|
+
UPLOAD_PHOTO_UNSUPPORTED_ERROR = "UPLOAD PHOTO UNSUPPORTED MODULE"
|
234
334
|
|
235
335
|
INVALID_MODULE = "INVALID_MODULE"
|
236
336
|
|
@@ -261,6 +361,8 @@ class Constants
|
|
261
361
|
REQUEST_CATEGORY_UPDATE = 'UPDATE'
|
262
362
|
|
263
363
|
MODULEPACKAGENAME = 'modulePackageName'
|
364
|
+
|
365
|
+
MYSQL_TABLE_NAME = "oauthtoken"
|
264
366
|
|
265
367
|
INITIALIZATION_SUCCESSFUL = 'Initialization successful'
|
266
368
|
|
@@ -493,19 +595,23 @@ class Constants
|
|
493
595
|
HOST_ERROR_MESSAGE = 'Host MUST NOT be null.'
|
494
596
|
|
495
597
|
PORT_ERROR_MESSAGE = 'Port MUST NOT be null.'
|
598
|
+
|
599
|
+
REQUEST_PROXY_ERROR_MESSAGE = "request_proxy must be instance of Request Proxy"
|
600
|
+
|
601
|
+
USER_SIGNATURE_ERROR_MESSAGE = "user must be instance of UserSignature."
|
496
602
|
|
497
|
-
|
498
|
-
|
499
|
-
ENVIRONMENT_ERROR_MESSAGE = "Environment MUST NOT be null."
|
603
|
+
ENVIRONMENT_ERROR_MESSAGE = "environment must be instance of Environment."
|
500
604
|
|
501
|
-
|
605
|
+
SDK_CONFIG_ERROR_MESSAGE = "sdk_config must be instance of sdkConfig."
|
502
606
|
|
503
|
-
TOKEN_ERROR_MESSAGE = "
|
607
|
+
TOKEN_ERROR_MESSAGE = "token must be instance of Token."
|
504
608
|
|
505
|
-
|
609
|
+
STORE_ERROR_MESSAGE = "store must be instance of Store."
|
506
610
|
|
507
611
|
INITIALIZATION_EXCEPTION = 'Exception in initialization'
|
508
612
|
|
613
|
+
SWITCH_USER_EXCEPTION = 'Exception in Switch user'
|
614
|
+
|
509
615
|
SWITCH_USER_ERROR = "SWITCH USER ERROR"
|
510
616
|
|
511
617
|
EMAIL_REGEX = /\A[\w+\-.]+@[a-z\d\-.]+\.[a-z]+\z/i
|
@@ -528,9 +634,30 @@ class Constants
|
|
528
634
|
|
529
635
|
ATTACHMENTS = '$attachments'
|
530
636
|
|
637
|
+
TERRITORY_NAMESPACE = 'com.zoho.crm.api.record.Territory'
|
638
|
+
|
639
|
+
IMAGEUPLOAD_NAMESPACE = 'com.zoho.crm.api.record.ImageUpload'
|
640
|
+
|
531
641
|
ATTACHMENTS_NAMESPACE = 'com.zoho.crm.api.attachments.Attachment'
|
532
642
|
|
533
643
|
PICKLIST = 'picklist'
|
534
644
|
|
535
645
|
CONSENT_NAMESPACE = 'com.zoho.crm.api.record.Consent'
|
646
|
+
|
647
|
+
INVALID_TOKEN_ERROR = "INVALID TOKEN ERROR"
|
648
|
+
|
649
|
+
NO_ACCESS_TOKEN_ERROR = "ACCESS TOKEN IS NOT PRESENT IN RESPONSE"
|
650
|
+
|
651
|
+
CLIENT_ID_NULL_ERROR_MESSAGE = "ClientID MUST NOT be null"
|
652
|
+
|
653
|
+
CLIENT_SECRET_NULL_ERROR_MESSAGE = "ClientSecret MUST NOT be null"
|
654
|
+
|
655
|
+
TAX_NAMESPACE = "com.zoho.crm.api.record.Tax"
|
656
|
+
|
657
|
+
PRODUCTS = "Products"
|
658
|
+
|
659
|
+
TAX = "TAX"
|
660
|
+
|
661
|
+
TERRITORY = "Territory"
|
662
|
+
|
536
663
|
end
|