ZOHOCRMSDK5_0 1.0.0 → 2.0.0

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.
Files changed (26) hide show
  1. checksums.yaml +4 -4
  2. data/src/ZOHOCRMSDK5_0.rb +512 -510
  3. data/src/com/zoho/crm/api/bulk_write/field_mapping.rb +19 -0
  4. data/src/com/zoho/crm/api/bulk_write/resource.rb +19 -0
  5. data/src/com/zoho/crm/api/mail_merge/action_handler.rb +12 -0
  6. data/src/com/zoho/crm/api/mail_merge/action_wrapper.rb +2 -0
  7. data/src/com/zoho/crm/api/mail_merge/address.rb +31 -12
  8. data/src/com/zoho/crm/api/mail_merge/api_exception.rb +10 -0
  9. data/src/com/zoho/crm/api/mail_merge/download_response_handler.rb +12 -0
  10. data/src/com/zoho/crm/api/mail_merge/file_body_wrapper.rb +66 -0
  11. data/src/com/zoho/crm/api/mail_merge/mail_merge.rb +4 -5
  12. data/src/com/zoho/crm/api/mail_merge/mail_merge_operations.rb +101 -0
  13. data/src/com/zoho/crm/api/mail_merge/sign_action_handler.rb +12 -0
  14. data/src/com/zoho/crm/api/mail_merge/sign_action_wrapper.rb +2 -0
  15. data/src/com/zoho/crm/api/modules/modules.rb +0 -19
  16. data/src/com/zoho/crm/api/pipeline/transfer_pipeline_action_wrapper.rb +0 -2
  17. data/src/com/zoho/crm/api/record/lead_converter.rb +19 -0
  18. data/src/com/zoho/crm/api/record/move_attachments_to.rb +82 -0
  19. data/src/com/zoho/crm/api/record_locking/api_exception.rb +2 -6
  20. data/src/com/zoho/crm/api/record_locking/record_locking_operations.rb +37 -63
  21. data/src/com/zoho/crm/api/reschedule_history/reschedule_history_operations.rb +4 -0
  22. data/src/com/zoho/crm/api/users_transfer_delete/transfer_and_delete_by_id.rb +82 -0
  23. data/src/com/zoho/crm/api/util/constants.rb +1 -1
  24. data/src/resources/json_details.json +1 -1
  25. data/src/version.rb +1 -1
  26. metadata +27 -6
@@ -9,32 +9,34 @@ module ZOHOCRMSDK
9
9
  module RecordLocking
10
10
  class RecordLockingOperations
11
11
 
12
- # Creates an instance of RecordLockingOperations
13
- def initialize
14
- end
15
-
16
- # The method to get record lock information
12
+ # Creates an instance of RecordLockingOperations with the given parameters
17
13
  # @param record_id [Integer] A Integer
18
14
  # @param module_name [String] A String
19
- # @param param_instance [ParameterMap] An instance of ParameterMap
20
- # @return An instance of APIResponse
21
- # @raise SDKException
22
- def get_record_lock_information(record_id, module_name, param_instance=nil)
15
+ def initialize(record_id, module_name)
23
16
  if !record_id.is_a? Integer
24
17
  raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: record_id EXPECTED TYPE: Integer', nil, nil)
25
18
  end
26
19
  if !module_name.is_a? String
27
20
  raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: module_name EXPECTED TYPE: String', nil, nil)
28
21
  end
22
+ @record_id = record_id
23
+ @module_name = module_name
24
+ end
25
+
26
+ # The method to get record locking informations
27
+ # @param param_instance [ParameterMap] An instance of ParameterMap
28
+ # @return An instance of APIResponse
29
+ # @raise SDKException
30
+ def get_record_locking_informations(param_instance=nil)
29
31
  if param_instance!=nil and !param_instance.is_a? ParameterMap
30
32
  raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: param_instance EXPECTED TYPE: ParameterMap', nil, nil)
31
33
  end
32
34
  handler_instance = Handler::CommonAPIHandler.new
33
35
  api_path = ''
34
36
  api_path = api_path + '/crm/v5/'
35
- api_path = api_path + module_name.to_s
37
+ api_path = api_path + @module_name.to_s
36
38
  api_path = api_path + '/'
37
- api_path = api_path + record_id.to_s
39
+ api_path = api_path + @record_id.to_s
38
40
  api_path = api_path + '/Locking_Information__s'
39
41
  handler_instance.api_path = api_path
40
42
  handler_instance.http_method = Constants::REQUEST_METHOD_GET
@@ -44,28 +46,20 @@ module ZOHOCRMSDK
44
46
  handler_instance.api_call(ResponseHandler.name, 'application/json')
45
47
  end
46
48
 
47
- # The method to lock a record
48
- # @param record_id [Integer] A Integer
49
- # @param module_name [String] A String
49
+ # The method to lock records
50
50
  # @param request [BodyWrapper] An instance of BodyWrapper
51
51
  # @return An instance of APIResponse
52
52
  # @raise SDKException
53
- def lock_a_record(record_id, module_name, request)
54
- if !record_id.is_a? Integer
55
- raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: record_id EXPECTED TYPE: Integer', nil, nil)
56
- end
57
- if !module_name.is_a? String
58
- raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: module_name EXPECTED TYPE: String', nil, nil)
59
- end
53
+ def lock_records(request)
60
54
  if request!=nil and !request.is_a? BodyWrapper
61
55
  raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: request EXPECTED TYPE: BodyWrapper', nil, nil)
62
56
  end
63
57
  handler_instance = Handler::CommonAPIHandler.new
64
58
  api_path = ''
65
59
  api_path = api_path + '/crm/v5/'
66
- api_path = api_path + module_name.to_s
60
+ api_path = api_path + @module_name.to_s
67
61
  api_path = api_path + '/'
68
- api_path = api_path + record_id.to_s
62
+ api_path = api_path + @record_id.to_s
69
63
  api_path = api_path + '/Locking_Information__s'
70
64
  handler_instance.api_path = api_path
71
65
  handler_instance.http_method = Constants::REQUEST_METHOD_POST
@@ -77,32 +71,24 @@ module ZOHOCRMSDK
77
71
  handler_instance.api_call(ActionHandler.name, 'application/json')
78
72
  end
79
73
 
80
- # The method to get record lock information by id
74
+ # The method to get record locking information
81
75
  # @param lock_id [Integer] A Integer
82
- # @param record_id [Integer] A Integer
83
- # @param module_name [String] A String
84
76
  # @param param_instance [ParameterMap] An instance of ParameterMap
85
77
  # @return An instance of APIResponse
86
78
  # @raise SDKException
87
- def get_record_lock_information_by_id(lock_id, record_id, module_name, param_instance=nil)
79
+ def get_record_locking_information(lock_id, param_instance=nil)
88
80
  if !lock_id.is_a? Integer
89
81
  raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: lock_id EXPECTED TYPE: Integer', nil, nil)
90
82
  end
91
- if !record_id.is_a? Integer
92
- raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: record_id EXPECTED TYPE: Integer', nil, nil)
93
- end
94
- if !module_name.is_a? String
95
- raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: module_name EXPECTED TYPE: String', nil, nil)
96
- end
97
83
  if param_instance!=nil and !param_instance.is_a? ParameterMap
98
84
  raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: param_instance EXPECTED TYPE: ParameterMap', nil, nil)
99
85
  end
100
86
  handler_instance = Handler::CommonAPIHandler.new
101
87
  api_path = ''
102
88
  api_path = api_path + '/crm/v5/'
103
- api_path = api_path + module_name.to_s
89
+ api_path = api_path + @module_name.to_s
104
90
  api_path = api_path + '/'
105
- api_path = api_path + record_id.to_s
91
+ api_path = api_path + @record_id.to_s
106
92
  api_path = api_path + '/Locking_Information__s/'
107
93
  api_path = api_path + lock_id.to_s
108
94
  handler_instance.api_path = api_path
@@ -113,32 +99,24 @@ module ZOHOCRMSDK
113
99
  handler_instance.api_call(ResponseHandler.name, 'application/json')
114
100
  end
115
101
 
116
- # The method to update lock reason of a record
102
+ # The method to update record locking information
117
103
  # @param lock_id [Integer] A Integer
118
- # @param record_id [Integer] A Integer
119
- # @param module_name [String] A String
120
104
  # @param request [BodyWrapper] An instance of BodyWrapper
121
105
  # @return An instance of APIResponse
122
106
  # @raise SDKException
123
- def update_lock_reason_of_a_record(lock_id, record_id, module_name, request)
107
+ def update_record_locking_information(lock_id, request)
124
108
  if !lock_id.is_a? Integer
125
109
  raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: lock_id EXPECTED TYPE: Integer', nil, nil)
126
110
  end
127
- if !record_id.is_a? Integer
128
- raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: record_id EXPECTED TYPE: Integer', nil, nil)
129
- end
130
- if !module_name.is_a? String
131
- raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: module_name EXPECTED TYPE: String', nil, nil)
132
- end
133
111
  if request!=nil and !request.is_a? BodyWrapper
134
112
  raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: request EXPECTED TYPE: BodyWrapper', nil, nil)
135
113
  end
136
114
  handler_instance = Handler::CommonAPIHandler.new
137
115
  api_path = ''
138
116
  api_path = api_path + '/crm/v5/'
139
- api_path = api_path + module_name.to_s
117
+ api_path = api_path + @module_name.to_s
140
118
  api_path = api_path + '/'
141
- api_path = api_path + record_id.to_s
119
+ api_path = api_path + @record_id.to_s
142
120
  api_path = api_path + '/Locking_Information__s/'
143
121
  api_path = api_path + lock_id.to_s
144
122
  handler_instance.api_path = api_path
@@ -151,28 +129,20 @@ module ZOHOCRMSDK
151
129
  handler_instance.api_call(ActionHandler.name, 'application/json')
152
130
  end
153
131
 
154
- # The method to remove lock for a record
132
+ # The method to unlock record
155
133
  # @param lock_id [Integer] A Integer
156
- # @param record_id [Integer] A Integer
157
- # @param module_name [String] A String
158
134
  # @return An instance of APIResponse
159
135
  # @raise SDKException
160
- def remove_lock_for_a_record(lock_id, record_id, module_name)
136
+ def unlock_record(lock_id)
161
137
  if !lock_id.is_a? Integer
162
138
  raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: lock_id EXPECTED TYPE: Integer', nil, nil)
163
139
  end
164
- if !record_id.is_a? Integer
165
- raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: record_id EXPECTED TYPE: Integer', nil, nil)
166
- end
167
- if !module_name.is_a? String
168
- raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: module_name EXPECTED TYPE: String', nil, nil)
169
- end
170
140
  handler_instance = Handler::CommonAPIHandler.new
171
141
  api_path = ''
172
142
  api_path = api_path + '/crm/v5/'
173
- api_path = api_path + module_name.to_s
143
+ api_path = api_path + @module_name.to_s
174
144
  api_path = api_path + '/'
175
- api_path = api_path + record_id.to_s
145
+ api_path = api_path + @record_id.to_s
176
146
  api_path = api_path + '/Locking_Information__s/'
177
147
  api_path = api_path + lock_id.to_s
178
148
  handler_instance.api_path = api_path
@@ -182,15 +152,19 @@ module ZOHOCRMSDK
182
152
  handler_instance.api_call(ActionHandler.name, 'application/json')
183
153
  end
184
154
 
185
- class GetrecordlockinformationParam
186
- @@fields = Param.new('fields', 'com.zoho.crm.api.RecordLocking.GetrecordlockinformationParam')
155
+ class GetRecordLockingInformationsParam
156
+ @@fields = Param.new('fields', 'com.zoho.crm.api.RecordLocking.GetRecordLockingInformationsParam')
187
157
  def self.fields
188
158
  @@fields
189
159
  end
160
+ @@ids = Param.new('ids', 'com.zoho.crm.api.RecordLocking.GetRecordLockingInformationsParam')
161
+ def self.ids
162
+ @@ids
163
+ end
190
164
  end
191
165
 
192
- class GetrecordlockinformationbyidParam
193
- @@fields = Param.new('fields', 'com.zoho.crm.api.RecordLocking.GetrecordlockinformationbyidParam')
166
+ class GetRecordLockingInformationParam
167
+ @@fields = Param.new('fields', 'com.zoho.crm.api.RecordLocking.GetRecordLockingInformationParam')
194
168
  def self.fields
195
169
  @@fields
196
170
  end
@@ -163,6 +163,10 @@ module ZOHOCRMSDK
163
163
  def self.sort_by
164
164
  @@sort_by
165
165
  end
166
+ @@ids = Param.new('ids', 'com.zoho.crm.api.RescheduleHistory.GetAppointmentsRescheduledHistoryParam')
167
+ def self.ids
168
+ @@ids
169
+ end
166
170
  end
167
171
 
168
172
  class GetAppointmentRescheduledHistoryParam
@@ -0,0 +1,82 @@
1
+ require_relative '../util/model'
2
+
3
+ module ZOHOCRMSDK
4
+ module UsersTransferDelete
5
+ class TransferAndDeleteByID
6
+ include Util::Model
7
+
8
+ # Creates an instance of TransferAndDeleteByID
9
+ def initialize
10
+ @transfer = nil
11
+ @move_subordinate = nil
12
+ @key_modified = Hash.new
13
+ end
14
+
15
+ # The method to get the transfer
16
+ # @return An instance of Transfer
17
+
18
+ def transfer
19
+ @transfer
20
+ end
21
+
22
+ # The method to set the value to transfer
23
+ # @param transfer [Transfer] An instance of Transfer
24
+
25
+ def transfer=(transfer)
26
+ if transfer!=nil and !transfer.is_a? Transfer
27
+ raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: transfer EXPECTED TYPE: Transfer', nil, nil)
28
+ end
29
+ @transfer = transfer
30
+ @key_modified['transfer'] = 1
31
+ end
32
+
33
+ # The method to get the move_subordinate
34
+ # @return An instance of MoveSubordinate
35
+
36
+ def move_subordinate
37
+ @move_subordinate
38
+ end
39
+
40
+ # The method to set the value to move_subordinate
41
+ # @param move_subordinate [MoveSubordinate] An instance of MoveSubordinate
42
+
43
+ def move_subordinate=(move_subordinate)
44
+ if move_subordinate!=nil and !move_subordinate.is_a? MoveSubordinate
45
+ raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: move_subordinate EXPECTED TYPE: MoveSubordinate', nil, nil)
46
+ end
47
+ @move_subordinate = move_subordinate
48
+ @key_modified['move_subordinate'] = 1
49
+ end
50
+
51
+ # The method to check if the user has modified the given key
52
+ # @param key [String] A String
53
+ # @return A Integer value
54
+
55
+ def is_key_modified(key)
56
+ if key!=nil and !key.is_a? String
57
+ raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: String', nil, nil)
58
+ end
59
+ if @key_modified.key?(key)
60
+ return @key_modified[key]
61
+ end
62
+
63
+ nil
64
+ end
65
+
66
+ # The method to mark the given key as modified
67
+ # @param key [String] A String
68
+ # @param modification [Integer] A Integer
69
+
70
+ def set_key_modified(key, modification)
71
+ if key!=nil and !key.is_a? String
72
+ raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: String', nil, nil)
73
+ end
74
+ if modification!=nil and !modification.is_a? Integer
75
+ raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: Integer', nil, nil)
76
+ end
77
+ @key_modified[key] = modification
78
+ end
79
+
80
+ end
81
+ end
82
+ end
@@ -175,7 +175,7 @@ module ZOHOCRMSDK
175
175
 
176
176
  ZOHO_SDK = 'X-ZOHO-SDK'
177
177
 
178
- SDK_VERSION = '1.0.0'
178
+ SDK_VERSION = '2.0.0'
179
179
 
180
180
  SET_CONTENT_TYPE_HEADER = ['/crm/bulk/v5/read', '/crm/bulk/v5/write']
181
181