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.
- 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 +19 -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 +40 -15
- 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 +201 -111
- 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 +8 -36
- 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 -5
- data/src/com/zoho/crm/api/util/common_api_handler.rb +0 -1
- 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 -15
- data/src/com/zoho/crm/api/util/utility.rb +226 -86
- 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
@@ -0,0 +1,80 @@
|
|
1
|
+
require_relative '../util/model'
|
2
|
+
|
3
|
+
module Record
|
4
|
+
class Tax
|
5
|
+
include Util::Model
|
6
|
+
|
7
|
+
# Creates an instance of Tax
|
8
|
+
def initialize
|
9
|
+
@id = nil
|
10
|
+
@value = nil
|
11
|
+
@key_modified = Hash.new
|
12
|
+
end
|
13
|
+
|
14
|
+
# The method to get the id
|
15
|
+
# @return A Integer value
|
16
|
+
|
17
|
+
def id
|
18
|
+
@id
|
19
|
+
end
|
20
|
+
|
21
|
+
# The method to set the value to id
|
22
|
+
# @param id [Integer] A Integer
|
23
|
+
|
24
|
+
def id=(id)
|
25
|
+
if id!=nil and !id.is_a? Integer
|
26
|
+
raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: id EXPECTED TYPE: Integer', nil, nil)
|
27
|
+
end
|
28
|
+
@id = id
|
29
|
+
@key_modified['id'] = 1
|
30
|
+
end
|
31
|
+
|
32
|
+
# The method to get the value
|
33
|
+
# @return A String value
|
34
|
+
|
35
|
+
def value
|
36
|
+
@value
|
37
|
+
end
|
38
|
+
|
39
|
+
# The method to set the value to value
|
40
|
+
# @param value [String] A String
|
41
|
+
|
42
|
+
def value=(value)
|
43
|
+
if value!=nil and !value.is_a? String
|
44
|
+
raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: value EXPECTED TYPE: String', nil, nil)
|
45
|
+
end
|
46
|
+
@value = value
|
47
|
+
@key_modified['value'] = 1
|
48
|
+
end
|
49
|
+
|
50
|
+
# The method to check if the user has modified the given key
|
51
|
+
# @param key [String] A String
|
52
|
+
# @return A Integer value
|
53
|
+
|
54
|
+
def is_key_modified(key)
|
55
|
+
if key!=nil and !key.is_a? String
|
56
|
+
raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: String', nil, nil)
|
57
|
+
end
|
58
|
+
if @key_modified.key?(key)
|
59
|
+
return @key_modified[key]
|
60
|
+
end
|
61
|
+
|
62
|
+
nil
|
63
|
+
end
|
64
|
+
|
65
|
+
# The method to mark the given key as modified
|
66
|
+
# @param key [String] A String
|
67
|
+
# @param modification [Integer] A Integer
|
68
|
+
|
69
|
+
def set_key_modified(key, modification)
|
70
|
+
if key!=nil and !key.is_a? String
|
71
|
+
raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: String', nil, nil)
|
72
|
+
end
|
73
|
+
if modification!=nil and !modification.is_a? Integer
|
74
|
+
raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: Integer', nil, nil)
|
75
|
+
end
|
76
|
+
@key_modified[key] = modification
|
77
|
+
end
|
78
|
+
|
79
|
+
end
|
80
|
+
end
|
@@ -1,3 +1,4 @@
|
|
1
|
+
require_relative '../users/user'
|
1
2
|
require_relative '../util/model'
|
2
3
|
|
3
4
|
module Record
|
@@ -6,11 +7,50 @@ module Record
|
|
6
7
|
|
7
8
|
# Creates an instance of Territory
|
8
9
|
def initialize
|
10
|
+
@assigned = nil
|
11
|
+
@name = nil
|
9
12
|
@id = nil
|
10
|
-
@
|
13
|
+
@assigned_time = nil
|
14
|
+
@assigned_by = nil
|
11
15
|
@key_modified = Hash.new
|
12
16
|
end
|
13
17
|
|
18
|
+
# The method to get the assigned
|
19
|
+
# @return A String value
|
20
|
+
|
21
|
+
def assigned
|
22
|
+
@assigned
|
23
|
+
end
|
24
|
+
|
25
|
+
# The method to set the value to assigned
|
26
|
+
# @param assigned [String] A String
|
27
|
+
|
28
|
+
def assigned=(assigned)
|
29
|
+
if assigned!=nil and !assigned.is_a? String
|
30
|
+
raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: assigned EXPECTED TYPE: String', nil, nil)
|
31
|
+
end
|
32
|
+
@assigned = assigned
|
33
|
+
@key_modified['$assigned'] = 1
|
34
|
+
end
|
35
|
+
|
36
|
+
# The method to get the name
|
37
|
+
# @return A String value
|
38
|
+
|
39
|
+
def name
|
40
|
+
@name
|
41
|
+
end
|
42
|
+
|
43
|
+
# The method to set the value to name
|
44
|
+
# @param name [String] A String
|
45
|
+
|
46
|
+
def name=(name)
|
47
|
+
if name!=nil and !name.is_a? String
|
48
|
+
raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: name EXPECTED TYPE: String', nil, nil)
|
49
|
+
end
|
50
|
+
@name = name
|
51
|
+
@key_modified['Name'] = 1
|
52
|
+
end
|
53
|
+
|
14
54
|
# The method to get the id
|
15
55
|
# @return A Integer value
|
16
56
|
|
@@ -29,22 +69,40 @@ module Record
|
|
29
69
|
@key_modified['id'] = 1
|
30
70
|
end
|
31
71
|
|
32
|
-
# The method to get the
|
33
|
-
# @return
|
72
|
+
# The method to get the assigned_time
|
73
|
+
# @return An instance of DateTime
|
74
|
+
|
75
|
+
def assigned_time
|
76
|
+
@assigned_time
|
77
|
+
end
|
78
|
+
|
79
|
+
# The method to set the value to assigned_time
|
80
|
+
# @param assigned_time [DateTime] An instance of DateTime
|
81
|
+
|
82
|
+
def assigned_time=(assigned_time)
|
83
|
+
if assigned_time!=nil and !assigned_time.is_a? DateTime
|
84
|
+
raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: assigned_time EXPECTED TYPE: DateTime', nil, nil)
|
85
|
+
end
|
86
|
+
@assigned_time = assigned_time
|
87
|
+
@key_modified['$assigned_time'] = 1
|
88
|
+
end
|
89
|
+
|
90
|
+
# The method to get the assigned_by
|
91
|
+
# @return An instance of Users::User
|
34
92
|
|
35
|
-
def
|
36
|
-
@
|
93
|
+
def assigned_by
|
94
|
+
@assigned_by
|
37
95
|
end
|
38
96
|
|
39
|
-
# The method to set the value to
|
40
|
-
# @param
|
97
|
+
# The method to set the value to assigned_by
|
98
|
+
# @param assigned_by [Users::User] An instance of Users::User
|
41
99
|
|
42
|
-
def
|
43
|
-
if
|
44
|
-
raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY:
|
100
|
+
def assigned_by=(assigned_by)
|
101
|
+
if assigned_by!=nil and !assigned_by.is_a? Users::User
|
102
|
+
raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: assigned_by EXPECTED TYPE: User', nil, nil)
|
45
103
|
end
|
46
|
-
@
|
47
|
-
@key_modified['
|
104
|
+
@assigned_by = assigned_by
|
105
|
+
@key_modified['$assigned_by'] = 1
|
48
106
|
end
|
49
107
|
|
50
108
|
# The method to check if the user has modified the given key
|
@@ -0,0 +1,80 @@
|
|
1
|
+
require_relative '../util/model'
|
2
|
+
|
3
|
+
module Record
|
4
|
+
class Widget
|
5
|
+
include Util::Model
|
6
|
+
|
7
|
+
# Creates an instance of Widget
|
8
|
+
def initialize
|
9
|
+
@id = nil
|
10
|
+
@name = nil
|
11
|
+
@key_modified = Hash.new
|
12
|
+
end
|
13
|
+
|
14
|
+
# The method to get the id
|
15
|
+
# @return A Integer value
|
16
|
+
|
17
|
+
def id
|
18
|
+
@id
|
19
|
+
end
|
20
|
+
|
21
|
+
# The method to set the value to id
|
22
|
+
# @param id [Integer] A Integer
|
23
|
+
|
24
|
+
def id=(id)
|
25
|
+
if id!=nil and !id.is_a? Integer
|
26
|
+
raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: id EXPECTED TYPE: Integer', nil, nil)
|
27
|
+
end
|
28
|
+
@id = id
|
29
|
+
@key_modified['id'] = 1
|
30
|
+
end
|
31
|
+
|
32
|
+
# The method to get the name
|
33
|
+
# @return A String value
|
34
|
+
|
35
|
+
def name
|
36
|
+
@name
|
37
|
+
end
|
38
|
+
|
39
|
+
# The method to set the value to name
|
40
|
+
# @param name [String] A String
|
41
|
+
|
42
|
+
def name=(name)
|
43
|
+
if name!=nil and !name.is_a? String
|
44
|
+
raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: name EXPECTED TYPE: String', nil, nil)
|
45
|
+
end
|
46
|
+
@name = name
|
47
|
+
@key_modified['name'] = 1
|
48
|
+
end
|
49
|
+
|
50
|
+
# The method to check if the user has modified the given key
|
51
|
+
# @param key [String] A String
|
52
|
+
# @return A Integer value
|
53
|
+
|
54
|
+
def is_key_modified(key)
|
55
|
+
if key!=nil and !key.is_a? String
|
56
|
+
raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: String', nil, nil)
|
57
|
+
end
|
58
|
+
if @key_modified.key?(key)
|
59
|
+
return @key_modified[key]
|
60
|
+
end
|
61
|
+
|
62
|
+
nil
|
63
|
+
end
|
64
|
+
|
65
|
+
# The method to mark the given key as modified
|
66
|
+
# @param key [String] A String
|
67
|
+
# @param modification [Integer] A Integer
|
68
|
+
|
69
|
+
def set_key_modified(key, modification)
|
70
|
+
if key!=nil and !key.is_a? String
|
71
|
+
raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: String', nil, nil)
|
72
|
+
end
|
73
|
+
if modification!=nil and !modification.is_a? Integer
|
74
|
+
raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: Integer', nil, nil)
|
75
|
+
end
|
76
|
+
@key_modified[key] = modification
|
77
|
+
end
|
78
|
+
|
79
|
+
end
|
80
|
+
end
|
@@ -0,0 +1,80 @@
|
|
1
|
+
require_relative '../util/model'
|
2
|
+
|
3
|
+
module Record
|
4
|
+
class Wizard
|
5
|
+
include Util::Model
|
6
|
+
|
7
|
+
# Creates an instance of Wizard
|
8
|
+
def initialize
|
9
|
+
@id = nil
|
10
|
+
@name = nil
|
11
|
+
@key_modified = Hash.new
|
12
|
+
end
|
13
|
+
|
14
|
+
# The method to get the id
|
15
|
+
# @return A Integer value
|
16
|
+
|
17
|
+
def id
|
18
|
+
@id
|
19
|
+
end
|
20
|
+
|
21
|
+
# The method to set the value to id
|
22
|
+
# @param id [Integer] A Integer
|
23
|
+
|
24
|
+
def id=(id)
|
25
|
+
if id!=nil and !id.is_a? Integer
|
26
|
+
raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: id EXPECTED TYPE: Integer', nil, nil)
|
27
|
+
end
|
28
|
+
@id = id
|
29
|
+
@key_modified['id'] = 1
|
30
|
+
end
|
31
|
+
|
32
|
+
# The method to get the name
|
33
|
+
# @return A String value
|
34
|
+
|
35
|
+
def name
|
36
|
+
@name
|
37
|
+
end
|
38
|
+
|
39
|
+
# The method to set the value to name
|
40
|
+
# @param name [String] A String
|
41
|
+
|
42
|
+
def name=(name)
|
43
|
+
if name!=nil and !name.is_a? String
|
44
|
+
raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: name EXPECTED TYPE: String', nil, nil)
|
45
|
+
end
|
46
|
+
@name = name
|
47
|
+
@key_modified['name'] = 1
|
48
|
+
end
|
49
|
+
|
50
|
+
# The method to check if the user has modified the given key
|
51
|
+
# @param key [String] A String
|
52
|
+
# @return A Integer value
|
53
|
+
|
54
|
+
def is_key_modified(key)
|
55
|
+
if key!=nil and !key.is_a? String
|
56
|
+
raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: String', nil, nil)
|
57
|
+
end
|
58
|
+
if @key_modified.key?(key)
|
59
|
+
return @key_modified[key]
|
60
|
+
end
|
61
|
+
|
62
|
+
nil
|
63
|
+
end
|
64
|
+
|
65
|
+
# The method to mark the given key as modified
|
66
|
+
# @param key [String] A String
|
67
|
+
# @param modification [Integer] A Integer
|
68
|
+
|
69
|
+
def set_key_modified(key, modification)
|
70
|
+
if key!=nil and !key.is_a? String
|
71
|
+
raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: String', nil, nil)
|
72
|
+
end
|
73
|
+
if modification!=nil and !modification.is_a? Integer
|
74
|
+
raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: Integer', nil, nil)
|
75
|
+
end
|
76
|
+
@key_modified[key] = modification
|
77
|
+
end
|
78
|
+
|
79
|
+
end
|
80
|
+
end
|
@@ -22,7 +22,7 @@ module RelatedLists
|
|
22
22
|
def get_related_lists
|
23
23
|
handler_instance = Handler::CommonAPIHandler.new
|
24
24
|
api_path = ''
|
25
|
-
api_path = api_path + '/crm/v2/settings/related_lists'
|
25
|
+
api_path = api_path + '/crm/v2.1/settings/related_lists'
|
26
26
|
handler_instance.api_path = api_path
|
27
27
|
handler_instance.http_method = Constants::REQUEST_METHOD_GET
|
28
28
|
handler_instance.category_method = 'READ'
|
@@ -41,7 +41,7 @@ module RelatedLists
|
|
41
41
|
end
|
42
42
|
handler_instance = Handler::CommonAPIHandler.new
|
43
43
|
api_path = ''
|
44
|
-
api_path = api_path + '/crm/v2/settings/related_lists/'
|
44
|
+
api_path = api_path + '/crm/v2.1/settings/related_lists/'
|
45
45
|
api_path = api_path + id.to_s
|
46
46
|
handler_instance.api_path = api_path
|
47
47
|
handler_instance.http_method = Constants::REQUEST_METHOD_GET
|
@@ -44,7 +44,7 @@ module RelatedRecords
|
|
44
44
|
end
|
45
45
|
handler_instance = Handler::CommonAPIHandler.new
|
46
46
|
api_path = ''
|
47
|
-
api_path = api_path + '/crm/v2/'
|
47
|
+
api_path = api_path + '/crm/v2.1/'
|
48
48
|
api_path = api_path + @module_api_name.to_s
|
49
49
|
api_path = api_path + '/'
|
50
50
|
api_path = api_path + @record_id.to_s
|
@@ -70,7 +70,7 @@ module RelatedRecords
|
|
70
70
|
end
|
71
71
|
handler_instance = Handler::CommonAPIHandler.new
|
72
72
|
api_path = ''
|
73
|
-
api_path = api_path + '/crm/v2/'
|
73
|
+
api_path = api_path + '/crm/v2.1/'
|
74
74
|
api_path = api_path + @module_api_name.to_s
|
75
75
|
api_path = api_path + '/'
|
76
76
|
api_path = api_path + @record_id.to_s
|
@@ -97,7 +97,7 @@ module RelatedRecords
|
|
97
97
|
end
|
98
98
|
handler_instance = Handler::CommonAPIHandler.new
|
99
99
|
api_path = ''
|
100
|
-
api_path = api_path + '/crm/v2/'
|
100
|
+
api_path = api_path + '/crm/v2.1/'
|
101
101
|
api_path = api_path + @module_api_name.to_s
|
102
102
|
api_path = api_path + '/'
|
103
103
|
api_path = api_path + @record_id.to_s
|
@@ -125,7 +125,7 @@ module RelatedRecords
|
|
125
125
|
end
|
126
126
|
handler_instance = Handler::CommonAPIHandler.new
|
127
127
|
api_path = ''
|
128
|
-
api_path = api_path + '/crm/v2/'
|
128
|
+
api_path = api_path + '/crm/v2.1/'
|
129
129
|
api_path = api_path + @module_api_name.to_s
|
130
130
|
api_path = api_path + '/'
|
131
131
|
api_path = api_path + @record_id.to_s
|
@@ -145,22 +145,18 @@ module RelatedRecords
|
|
145
145
|
# The method to update related record
|
146
146
|
# @param related_record_id [Integer] A Integer
|
147
147
|
# @param request [BodyWrapper] An instance of BodyWrapper
|
148
|
-
# @param header_instance [HeaderMap] An instance of HeaderMap
|
149
148
|
# @return An instance of APIResponse
|
150
149
|
# @raise SDKException
|
151
|
-
def update_related_record(related_record_id, request
|
150
|
+
def update_related_record(related_record_id, request)
|
152
151
|
if !related_record_id.is_a? Integer
|
153
152
|
raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: related_record_id EXPECTED TYPE: Integer', nil, nil)
|
154
153
|
end
|
155
154
|
if request!=nil and !request.is_a? BodyWrapper
|
156
155
|
raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: request EXPECTED TYPE: BodyWrapper', nil, nil)
|
157
156
|
end
|
158
|
-
if header_instance!=nil and !header_instance.is_a? HeaderMap
|
159
|
-
raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: header_instance EXPECTED TYPE: HeaderMap', nil, nil)
|
160
|
-
end
|
161
157
|
handler_instance = Handler::CommonAPIHandler.new
|
162
158
|
api_path = ''
|
163
|
-
api_path = api_path + '/crm/v2/'
|
159
|
+
api_path = api_path + '/crm/v2.1/'
|
164
160
|
api_path = api_path + @module_api_name.to_s
|
165
161
|
api_path = api_path + '/'
|
166
162
|
api_path = api_path + @record_id.to_s
|
@@ -173,7 +169,6 @@ module RelatedRecords
|
|
173
169
|
handler_instance.category_method = 'UPDATE'
|
174
170
|
handler_instance.content_type = 'application/json'
|
175
171
|
handler_instance.request = request
|
176
|
-
handler_instance.header = header_instance
|
177
172
|
Util::Utility.get_related_lists(@related_list_api_name, @module_api_name, handler_instance)
|
178
173
|
require_relative 'action_handler'
|
179
174
|
handler_instance.api_call(ActionHandler.name, 'application/json')
|
@@ -181,19 +176,15 @@ module RelatedRecords
|
|
181
176
|
|
182
177
|
# The method to delink record
|
183
178
|
# @param related_record_id [Integer] A Integer
|
184
|
-
# @param header_instance [HeaderMap] An instance of HeaderMap
|
185
179
|
# @return An instance of APIResponse
|
186
180
|
# @raise SDKException
|
187
|
-
def delink_record(related_record_id
|
181
|
+
def delink_record(related_record_id)
|
188
182
|
if !related_record_id.is_a? Integer
|
189
183
|
raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: related_record_id EXPECTED TYPE: Integer', nil, nil)
|
190
184
|
end
|
191
|
-
if header_instance!=nil and !header_instance.is_a? HeaderMap
|
192
|
-
raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: header_instance EXPECTED TYPE: HeaderMap', nil, nil)
|
193
|
-
end
|
194
185
|
handler_instance = Handler::CommonAPIHandler.new
|
195
186
|
api_path = ''
|
196
|
-
api_path = api_path + '/crm/v2/'
|
187
|
+
api_path = api_path + '/crm/v2.1/'
|
197
188
|
api_path = api_path + @module_api_name.to_s
|
198
189
|
api_path = api_path + '/'
|
199
190
|
api_path = api_path + @record_id.to_s
|
@@ -204,7 +195,6 @@ module RelatedRecords
|
|
204
195
|
handler_instance.api_path = api_path
|
205
196
|
handler_instance.http_method = Constants::REQUEST_METHOD_DELETE
|
206
197
|
handler_instance.category_method = Constants::REQUEST_METHOD_DELETE
|
207
|
-
handler_instance.header = header_instance
|
208
198
|
require_relative 'action_handler'
|
209
199
|
handler_instance.api_call(ActionHandler.name, 'application/json')
|
210
200
|
end
|
@@ -225,10 +215,6 @@ module RelatedRecords
|
|
225
215
|
def self.If_modified_since
|
226
216
|
@@If_modified_since
|
227
217
|
end
|
228
|
-
@@X_external = Header.new('X-EXTERNAL', 'com.zoho.crm.api.RelatedRecords.GetRelatedRecordsHeader')
|
229
|
-
def self.X_external
|
230
|
-
@@X_external
|
231
|
-
end
|
232
218
|
end
|
233
219
|
|
234
220
|
class DelinkRecordsParam
|
@@ -245,19 +231,5 @@ module RelatedRecords
|
|
245
231
|
end
|
246
232
|
end
|
247
233
|
|
248
|
-
class UpdateRelatedRecordHeader
|
249
|
-
@@X_external = Header.new('X-EXTERNAL', 'com.zoho.crm.api.RelatedRecords.UpdateRelatedRecordHeader')
|
250
|
-
def self.X_external
|
251
|
-
@@X_external
|
252
|
-
end
|
253
|
-
end
|
254
|
-
|
255
|
-
class DelinkRecordHeader
|
256
|
-
@@X_external = Header.new('X-EXTERNAL', 'com.zoho.crm.api.RelatedRecords.DelinkRecordHeader')
|
257
|
-
def self.X_external
|
258
|
-
@@X_external
|
259
|
-
end
|
260
|
-
end
|
261
|
-
|
262
234
|
end
|
263
235
|
end
|