ZOHOCRMSDK2_0 1.0.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. checksums.yaml +4 -4
  2. data/src/ZOHOCRMSDK2_0.rb +6 -0
  3. data/src/com/zoho/api/authenticator/oauth_token.rb +86 -32
  4. data/src/com/zoho/api/authenticator/store/db_store.rb +71 -29
  5. data/src/com/zoho/api/authenticator/store/file_store.rb +95 -24
  6. data/src/com/zoho/api/authenticator/store/token_store.rb +7 -0
  7. data/src/com/zoho/api/logger/sdk_logger.rb +19 -9
  8. data/src/com/zoho/crm/api/contact_roles/api_exception.rb +4 -0
  9. data/src/com/zoho/crm/api/contact_roles/contact_role_wrapper.rb +61 -0
  10. data/src/com/zoho/crm/api/contact_roles/contact_roles_operations.rb +118 -0
  11. data/src/com/zoho/crm/api/contact_roles/record_action_handler.rb +10 -0
  12. data/src/com/zoho/crm/api/contact_roles/record_action_wrapper.rb +63 -0
  13. data/src/com/zoho/crm/api/contact_roles/record_body_wrapper.rb +61 -0
  14. data/src/com/zoho/crm/api/contact_roles/record_response_handler.rb +10 -0
  15. data/src/com/zoho/crm/api/contact_roles/record_response_wrapper.rb +84 -0
  16. data/src/com/zoho/crm/api/dc/au_datacenter.rb +3 -3
  17. data/src/com/zoho/crm/api/dc/cn_datacenter.rb +3 -3
  18. data/src/com/zoho/crm/api/dc/datacenter.rb +3 -2
  19. data/src/com/zoho/crm/api/dc/eu_datacenter.rb +3 -3
  20. data/src/com/zoho/crm/api/dc/in_datacenter.rb +3 -3
  21. data/src/com/zoho/crm/api/dc/us_datacenter.rb +3 -3
  22. data/src/com/zoho/crm/api/initializer.rb +44 -16
  23. data/src/com/zoho/crm/api/record/record_operations.rb +198 -1
  24. data/src/com/zoho/crm/api/related_records/related_records_operations.rb +299 -40
  25. data/src/com/zoho/crm/api/request_proxy.rb +3 -4
  26. data/src/com/zoho/crm/api/sdk_config.rb +2 -68
  27. data/src/com/zoho/crm/api/util/api_http_connector.rb +6 -6
  28. data/src/com/zoho/crm/api/util/constants.rb +113 -16
  29. data/src/com/zoho/crm/api/util/converter.rb +21 -4
  30. data/src/com/zoho/crm/api/util/data_type_converter.rb +8 -2
  31. data/src/com/zoho/crm/api/util/form_data_converter.rb +4 -16
  32. data/src/com/zoho/crm/api/util/json_converter.rb +7 -9
  33. data/src/com/zoho/crm/api/util/module_fields_handler.rb +1 -1
  34. data/src/com/zoho/crm/api/util/utility.rb +197 -82
  35. data/src/resources/JSONDetails.json +1 -1
  36. data/src/version.rb +2 -2
  37. metadata +8 -2
@@ -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
@@ -7,8 +7,7 @@ require_relative 'util/constants'
7
7
 
8
8
  # This class to initialize Zoho CRM SDK.
9
9
  class Initializer
10
- attr_accessor :json_details, :user, :environment, :store, :token, :initializer, :local, :sdk_config, :resources_path, :request_proxy
11
-
10
+ attr_accessor :json_details,:user, :environment, :store, :token, :initializer, :local, :sdk_config, :resources_path, :request_proxy
12
11
  @@json_details = nil
13
12
 
14
13
  Thread.current['initi'] = nil
@@ -17,7 +16,7 @@ class Initializer
17
16
  @@json_details
18
17
  end
19
18
 
20
- def self.initialize(user, environment, token, store, sdk_config, resources_path, log = nil, request_proxy = nil)
19
+ def self.initialize(user:, environment:, token:, store:, sdk_config:, resources_path:, log: nil, request_proxy: nil)
21
20
  error = {}
22
21
 
23
22
  require_relative 'user_signature'
@@ -27,7 +26,7 @@ class Initializer
27
26
 
28
27
  error[Constants::ERROR_HASH_EXPECTED_TYPE] = UserSignature
29
28
 
30
- raise SDKException.new(Constants::INITIALIZATION_ERROR, Constants::USERSIGNATURE_ERROR_MESSAGE, error, nil)
29
+ raise SDKException.new(Constants::INITIALIZATION_ERROR, Constants::USER_SIGNATURE_ERROR_MESSAGE, error, nil)
31
30
 
32
31
  end
33
32
 
@@ -75,12 +74,20 @@ class Initializer
75
74
 
76
75
  end
77
76
 
77
+ if !request_proxy.nil? && !sdk_config.is_a?(RequestProxy)
78
+
79
+ raise SDKException.new(Constants::INITIALIZATION_ERROR, Constants::REQUEST_PROXY_ERROR, nil, nil)
80
+ end
81
+
78
82
  if resources_path.nil? || resources_path.empty?
79
83
  raise SDKException.new(Constants::INITIALIZATION_ERROR, Constants::RESOURCE_PATH_ERROR_MESSAGE, nil, nil)
80
84
  end
81
85
 
82
- log = SDKLog::Log.initialize(Levels::INFO, File.join(Dir.pwd, Constants::LOGFILE_NAME)) if log.nil?
86
+ if !File.directory?(resources_path)
87
+ raise SDKException.new(Constants::INITIALIZATION_ERROR, Constants::RESOURCE_PATH_INVALID_ERROR_MESSAGE, nil, nil)
88
+ end
83
89
 
90
+ log = SDKLog::Log.initialize(level: Levels::INFO, path: File.join(Dir.pwd, Constants::LOGFILE_NAME)) if log.nil?
84
91
  SDKLog::SDKLogger.initialize(log)
85
92
 
86
93
  @@initializer = Initializer.new
@@ -109,7 +116,10 @@ class Initializer
109
116
  end
110
117
 
111
118
  def self.get_JSONDetails
112
- JSON.parse(File.open(File.join(File.dirname(File.expand_path(__FILE__)), '../../../../' + Constants::JSON_DETAILS_FILE_PATH)).read)
119
+ if @@json_details.nil? || @@json_details.length == 0
120
+ return JSON.parse(File.open(File.join(File.dirname(File.expand_path(__FILE__)), '../../../../' + Constants::JSON_DETAILS_FILE_PATH)).read)
121
+ end
122
+ @@json_details
113
123
  rescue StandardError => e
114
124
  raise SDKException.new(nil, Constants::EXCEPTION_JSONDETAILS, nil, e)
115
125
  end
@@ -120,21 +130,26 @@ class Initializer
120
130
  @@initializer
121
131
  end
122
132
 
123
- def self.switch_user(user, environment, token, sdk_config, request_proxy = nil)
133
+ def self.switch_user(user:nil, environment:nil, token:nil, sdk_config:nil, request_proxy: nil)
134
+
135
+ if @@initializer.nil?
136
+ raise SDKException.new(Constants::SDK_UNINITIALIZATION_ERROR, Constants::SDK_UNINITIALIZATION_MESSAGE)
137
+ end
138
+
124
139
  require_relative 'user_signature'
125
140
 
126
- unless user.is_a?(UserSignature)
141
+ if !user.nil? and !user.is_a?(UserSignature)
127
142
  error[Constants::ERROR_HASH_FIELD] = 'user'
128
143
 
129
144
  error[Constants::ERROR_HASH_EXPECTED_TYPE] = UserSignature
130
145
 
131
- raise SDKException.new(Constants::SWITCH_USER_ERROR, Constants::USERSIGNATURE_ERROR_MESSAGE, error, nil)
146
+ raise SDKException.new(Constants::SWITCH_USER_ERROR, Constants::USER_SIGNATURE_ERROR_MESSAGE, error, nil)
132
147
 
133
148
  end
134
149
 
135
150
  require_relative '../../crm/api/dc/datacenter'
136
151
 
137
- unless environment.is_a?(DC::DataCenter::Environment)
152
+ if !environment.nil? and !environment.is_a?(DC::DataCenter::Environment)
138
153
  error[Constants::ERROR_HASH_FIELD] = 'environment'
139
154
 
140
155
  error[Constants::ERROR_HASH_EXPECTED_TYPE] = DC::DataCenter::Environment
@@ -145,7 +160,7 @@ class Initializer
145
160
 
146
161
  require_relative '../../api/authenticator/token'
147
162
 
148
- unless token.is_a?(Authenticator::Token)
163
+ if !token.nil? and !token.is_a?(Authenticator::Token)
149
164
  error[Constants::ERROR_HASH_FIELD] = 'token'
150
165
 
151
166
  error[Constants::ERROR_HASH_EXPECTED_TYPE] = Authenticator::Token
@@ -154,9 +169,20 @@ class Initializer
154
169
 
155
170
  end
156
171
 
172
+ require_relative 'request_proxy'
173
+
174
+ if !request_proxy.nil? and !request_proxy.is_a?(RequestProxy)
175
+ error[Constants::ERROR_HASH_FIELD] = 'request_proxy'
176
+
177
+ error[Constants::ERROR_HASH_EXPECTED_TYPE] = RequestProxy
178
+
179
+ raise SDKException.new(Constants::SWITCH_USER_ERROR, Constants::REQUEST_PROXY_ERROR_MESSAGE, error, nil)
180
+
181
+ end
182
+
157
183
  require_relative 'sdk_config'
158
184
 
159
- unless sdk_config.is_a?(SDKConfig)
185
+ if !sdk_config.nil? and !sdk_config.is_a?(SDKConfig)
160
186
  error[Constants::ERROR_HASH_FIELD] = 'sdk_config'
161
187
 
162
188
  error[Constants::ERROR_HASH_EXPECTED_TYPE] = SDKConfig
@@ -167,13 +193,15 @@ class Initializer
167
193
 
168
194
  initializer = Initializer.new
169
195
 
170
- initializer.user = user
196
+ previous_initializer = Initializer.get_initializer
197
+
198
+ initializer.user = user.nil? ? previous_initializer.user : user
171
199
 
172
- initializer.environment = environment
200
+ initializer.environment = environment.nil? ? previous_initializer.environment : environment
173
201
 
174
- initializer.sdk_config = sdk_config
202
+ initializer.sdk_config = sdk_config.nil? ? previous_initializer.sdk_config : sdk_config
175
203
 
176
- initializer.token = token
204
+ initializer.token = token.nil? ? previous_initializer.token : token
177
205
 
178
206
  initializer.store = @@initializer.store
179
207
 
@@ -159,15 +159,19 @@ module Record
159
159
  # The method to create records
160
160
  # @param module_api_name [String] A String
161
161
  # @param request [BodyWrapper] An instance of BodyWrapper
162
+ # @param header_instance [HeaderMap] An instance of HeaderMap
162
163
  # @return An instance of APIResponse
163
164
  # @raise SDKException
164
- def create_records(module_api_name, request)
165
+ def create_records(module_api_name, request, header_instance=nil)
165
166
  if !module_api_name.is_a? String
166
167
  raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: module_api_name EXPECTED TYPE: String', nil, nil)
167
168
  end
168
169
  if request!=nil and !request.is_a? BodyWrapper
169
170
  raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: request EXPECTED TYPE: BodyWrapper', nil, nil)
170
171
  end
172
+ if header_instance!=nil and !header_instance.is_a? HeaderMap
173
+ raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: header_instance EXPECTED TYPE: HeaderMap', nil, nil)
174
+ end
171
175
  handler_instance = Handler::CommonAPIHandler.new
172
176
  api_path = ''
173
177
  api_path = api_path + '/crm/v2/'
@@ -178,6 +182,7 @@ module Record
178
182
  handler_instance.content_type = 'application/json'
179
183
  handler_instance.request = request
180
184
  handler_instance.mandatory_checker = true
185
+ handler_instance.header = header_instance
181
186
  Util::Utility.get_fields(module_api_name)
182
187
  handler_instance.module_api_name = module_api_name
183
188
  require_relative 'action_handler'
@@ -509,6 +514,116 @@ module Record
509
514
  handler_instance.api_call(MassUpdateResponseHandler.name, 'application/json')
510
515
  end
511
516
 
517
+ # The method to get record using external id
518
+ # @param external_field_value [String] A String
519
+ # @param module_api_name [String] A String
520
+ # @param param_instance [ParameterMap] An instance of ParameterMap
521
+ # @param header_instance [HeaderMap] An instance of HeaderMap
522
+ # @return An instance of APIResponse
523
+ # @raise SDKException
524
+ def get_record_using_external_id(external_field_value, module_api_name, param_instance=nil, header_instance=nil)
525
+ if !external_field_value.is_a? String
526
+ raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: external_field_value EXPECTED TYPE: String', nil, nil)
527
+ end
528
+ if !module_api_name.is_a? String
529
+ raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: module_api_name EXPECTED TYPE: String', nil, nil)
530
+ end
531
+ if param_instance!=nil and !param_instance.is_a? ParameterMap
532
+ raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: param_instance EXPECTED TYPE: ParameterMap', nil, nil)
533
+ end
534
+ if header_instance!=nil and !header_instance.is_a? HeaderMap
535
+ raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: header_instance EXPECTED TYPE: HeaderMap', nil, nil)
536
+ end
537
+ handler_instance = Handler::CommonAPIHandler.new
538
+ api_path = ''
539
+ api_path = api_path + '/crm/v2/'
540
+ api_path = api_path + module_api_name.to_s
541
+ api_path = api_path + '/'
542
+ api_path = api_path + external_field_value.to_s
543
+ handler_instance.api_path = api_path
544
+ handler_instance.http_method = Constants::REQUEST_METHOD_GET
545
+ handler_instance.category_method = 'READ'
546
+ handler_instance.param = param_instance
547
+ handler_instance.header = header_instance
548
+ Util::Utility.get_fields(module_api_name)
549
+ handler_instance.module_api_name = module_api_name
550
+ require_relative 'response_handler'
551
+ handler_instance.api_call(ResponseHandler.name, 'application/json')
552
+ end
553
+
554
+ # The method to update record using external id
555
+ # @param external_field_value [String] A String
556
+ # @param module_api_name [String] A String
557
+ # @param request [BodyWrapper] An instance of BodyWrapper
558
+ # @param header_instance [HeaderMap] An instance of HeaderMap
559
+ # @return An instance of APIResponse
560
+ # @raise SDKException
561
+ def update_record_using_external_id(external_field_value, module_api_name, request, header_instance=nil)
562
+ if !external_field_value.is_a? String
563
+ raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: external_field_value EXPECTED TYPE: String', nil, nil)
564
+ end
565
+ if !module_api_name.is_a? String
566
+ raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: module_api_name EXPECTED TYPE: String', nil, nil)
567
+ end
568
+ if request!=nil and !request.is_a? BodyWrapper
569
+ raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: request EXPECTED TYPE: BodyWrapper', nil, nil)
570
+ end
571
+ if header_instance!=nil and !header_instance.is_a? HeaderMap
572
+ raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: header_instance EXPECTED TYPE: HeaderMap', nil, nil)
573
+ end
574
+ handler_instance = Handler::CommonAPIHandler.new
575
+ api_path = ''
576
+ api_path = api_path + '/crm/v2/'
577
+ api_path = api_path + module_api_name.to_s
578
+ api_path = api_path + '/'
579
+ api_path = api_path + external_field_value.to_s
580
+ handler_instance.api_path = api_path
581
+ handler_instance.http_method = Constants::REQUEST_METHOD_PUT
582
+ handler_instance.category_method = 'UPDATE'
583
+ handler_instance.content_type = 'application/json'
584
+ handler_instance.request = request
585
+ handler_instance.header = header_instance
586
+ Util::Utility.get_fields(module_api_name)
587
+ handler_instance.module_api_name = module_api_name
588
+ require_relative 'action_handler'
589
+ handler_instance.api_call(ActionHandler.name, 'application/json')
590
+ end
591
+
592
+ # The method to delete record using external id
593
+ # @param external_field_value [String] A String
594
+ # @param module_api_name [String] A String
595
+ # @param param_instance [ParameterMap] An instance of ParameterMap
596
+ # @param header_instance [HeaderMap] An instance of HeaderMap
597
+ # @return An instance of APIResponse
598
+ # @raise SDKException
599
+ def delete_record_using_external_id(external_field_value, module_api_name, param_instance=nil, header_instance=nil)
600
+ if !external_field_value.is_a? String
601
+ raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: external_field_value EXPECTED TYPE: String', nil, nil)
602
+ end
603
+ if !module_api_name.is_a? String
604
+ raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: module_api_name EXPECTED TYPE: String', nil, nil)
605
+ end
606
+ if param_instance!=nil and !param_instance.is_a? ParameterMap
607
+ raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: param_instance EXPECTED TYPE: ParameterMap', nil, nil)
608
+ end
609
+ if header_instance!=nil and !header_instance.is_a? HeaderMap
610
+ raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: header_instance EXPECTED TYPE: HeaderMap', nil, nil)
611
+ end
612
+ handler_instance = Handler::CommonAPIHandler.new
613
+ api_path = ''
614
+ api_path = api_path + '/crm/v2/'
615
+ api_path = api_path + module_api_name.to_s
616
+ api_path = api_path + '/'
617
+ api_path = api_path + external_field_value.to_s
618
+ handler_instance.api_path = api_path
619
+ handler_instance.http_method = Constants::REQUEST_METHOD_DELETE
620
+ handler_instance.category_method = Constants::REQUEST_METHOD_DELETE
621
+ handler_instance.param = param_instance
622
+ handler_instance.header = header_instance
623
+ require_relative 'action_handler'
624
+ handler_instance.api_call(ActionHandler.name, 'application/json')
625
+ end
626
+
512
627
  class GetRecordParam
513
628
  @@approved = Param.new('approved', 'com.zoho.crm.api.Record.GetRecordParam')
514
629
  def self.approved
@@ -650,6 +765,13 @@ module Record
650
765
  end
651
766
  end
652
767
 
768
+ class CreateRecordsHeader
769
+ @@X_external = Header.new('X-EXTERNAL', 'com.zoho.crm.api.Record.CreateRecordsHeader')
770
+ def self.X_external
771
+ @@X_external
772
+ end
773
+ end
774
+
653
775
  class UpdateRecordsHeader
654
776
  @@X_external = Header.new('X-EXTERNAL', 'com.zoho.crm.api.Record.UpdateRecordsHeader')
655
777
  def self.X_external
@@ -737,6 +859,10 @@ module Record
737
859
  def self.per_page
738
860
  @@per_page
739
861
  end
862
+ @@fields = Param.new('fields', 'com.zoho.crm.api.Record.SearchRecordsParam')
863
+ def self.fields
864
+ @@fields
865
+ end
740
866
  end
741
867
 
742
868
  class SearchRecordsHeader
@@ -753,5 +879,76 @@ module Record
753
879
  end
754
880
  end
755
881
 
882
+ class GetRecordUsingExternalIDParam
883
+ @@approved = Param.new('approved', 'com.zoho.crm.api.Record.GetRecordUsingExternalIDParam')
884
+ def self.approved
885
+ @@approved
886
+ end
887
+ @@converted = Param.new('converted', 'com.zoho.crm.api.Record.GetRecordUsingExternalIDParam')
888
+ def self.converted
889
+ @@converted
890
+ end
891
+ @@cvid = Param.new('cvid', 'com.zoho.crm.api.Record.GetRecordUsingExternalIDParam')
892
+ def self.cvid
893
+ @@cvid
894
+ end
895
+ @@uid = Param.new('uid', 'com.zoho.crm.api.Record.GetRecordUsingExternalIDParam')
896
+ def self.uid
897
+ @@uid
898
+ end
899
+ @@fields = Param.new('fields', 'com.zoho.crm.api.Record.GetRecordUsingExternalIDParam')
900
+ def self.fields
901
+ @@fields
902
+ end
903
+ @@startDateTime = Param.new('startDateTime', 'com.zoho.crm.api.Record.GetRecordUsingExternalIDParam')
904
+ def self.startDateTime
905
+ @@startDateTime
906
+ end
907
+ @@endDateTime = Param.new('endDateTime', 'com.zoho.crm.api.Record.GetRecordUsingExternalIDParam')
908
+ def self.endDateTime
909
+ @@endDateTime
910
+ end
911
+ @@territory_id = Param.new('territory_id', 'com.zoho.crm.api.Record.GetRecordUsingExternalIDParam')
912
+ def self.territory_id
913
+ @@territory_id
914
+ end
915
+ @@include_child = Param.new('include_child', 'com.zoho.crm.api.Record.GetRecordUsingExternalIDParam')
916
+ def self.include_child
917
+ @@include_child
918
+ end
919
+ end
920
+
921
+ class GetRecordUsingExternalIDHeader
922
+ @@If_modified_since = Header.new('If-Modified-Since', 'com.zoho.crm.api.Record.GetRecordUsingExternalIDHeader')
923
+ def self.If_modified_since
924
+ @@If_modified_since
925
+ end
926
+ @@X_external = Header.new('X-EXTERNAL', 'com.zoho.crm.api.Record.GetRecordUsingExternalIDHeader')
927
+ def self.X_external
928
+ @@X_external
929
+ end
930
+ end
931
+
932
+ class UpdateRecordUsingExternalIDHeader
933
+ @@X_external = Header.new('X-EXTERNAL', 'com.zoho.crm.api.Record.UpdateRecordUsingExternalIDHeader')
934
+ def self.X_external
935
+ @@X_external
936
+ end
937
+ end
938
+
939
+ class DeleteRecordUsingExternalIDParam
940
+ @@wf_trigger = Param.new('wf_trigger', 'com.zoho.crm.api.Record.DeleteRecordUsingExternalIDParam')
941
+ def self.wf_trigger
942
+ @@wf_trigger
943
+ end
944
+ end
945
+
946
+ class DeleteRecordUsingExternalIDHeader
947
+ @@X_external = Header.new('X-EXTERNAL', 'com.zoho.crm.api.Record.DeleteRecordUsingExternalIDHeader')
948
+ def self.X_external
949
+ @@X_external
950
+ end
951
+ end
952
+
756
953
  end
757
954
  end