ZOHOCRMSDK2_0 5.0.0 → 6.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/src/ZOHOCRMSDK2_0.rb +1 -0
  3. data/src/com/zoho/api/authenticator/oauth_token.rb +3 -3
  4. data/src/com/zoho/api/authenticator/store/db_store.rb +0 -0
  5. data/src/com/zoho/api/authenticator/store/file_store.rb +0 -0
  6. data/src/com/zoho/api/authenticator/store/token_store.rb +0 -0
  7. data/src/com/zoho/api/authenticator/token.rb +0 -0
  8. data/src/com/zoho/api/logger/sdk_logger.rb +0 -0
  9. data/src/com/zoho/crm/api/dc/au_datacenter.rb +0 -0
  10. data/src/com/zoho/crm/api/dc/cn_datacenter.rb +0 -0
  11. data/src/com/zoho/crm/api/dc/datacenter.rb +0 -0
  12. data/src/com/zoho/crm/api/dc/eu_datacenter.rb +0 -0
  13. data/src/com/zoho/crm/api/dc/in_datacenter.rb +0 -0
  14. data/src/com/zoho/crm/api/dc/jp_datacenter.rb +21 -0
  15. data/src/com/zoho/crm/api/dc/us_datacenter.rb +0 -0
  16. data/src/com/zoho/crm/api/exception/sdk_exception.rb +0 -0
  17. data/src/com/zoho/crm/api/header.rb +0 -0
  18. data/src/com/zoho/crm/api/header_map.rb +0 -0
  19. data/src/com/zoho/crm/api/initializer.rb +17 -0
  20. data/src/com/zoho/crm/api/param.rb +0 -0
  21. data/src/com/zoho/crm/api/parameter_map.rb +1 -1
  22. data/src/com/zoho/crm/api/request_proxy.rb +0 -0
  23. data/src/com/zoho/crm/api/sdk_config.rb +0 -0
  24. data/src/com/zoho/crm/api/user_signature.rb +0 -0
  25. data/src/com/zoho/crm/api/util/api_http_connector.rb +0 -0
  26. data/src/com/zoho/crm/api/util/api_response.rb +0 -0
  27. data/src/com/zoho/crm/api/util/choice.rb +0 -0
  28. data/src/com/zoho/crm/api/util/common_api_handler.rb +0 -0
  29. data/src/com/zoho/crm/api/util/constants.rb +3 -1
  30. data/src/com/zoho/crm/api/util/converter.rb +8 -2
  31. data/src/com/zoho/crm/api/util/data_type_converter.rb +0 -0
  32. data/src/com/zoho/crm/api/util/downloader.rb +0 -0
  33. data/src/com/zoho/crm/api/util/form_data_converter.rb +0 -0
  34. data/src/com/zoho/crm/api/util/header_param_validator.rb +0 -0
  35. data/src/com/zoho/crm/api/util/json_converter.rb +0 -0
  36. data/src/com/zoho/crm/api/util/model.rb +0 -0
  37. data/src/com/zoho/crm/api/util/module_fields_handler.rb +0 -0
  38. data/src/com/zoho/crm/api/util/stream_wrapper.rb +0 -0
  39. data/src/com/zoho/crm/api/util/utility.rb +3 -2
  40. data/src/resources/JSONDetails.json +0 -0
  41. data/src/version.rb +1 -1
  42. metadata +5 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6d849e9372013af6a6f78533714a2c066d78596043d8981911bb8892dafe27d0
4
- data.tar.gz: 2e3ac3e7c53e0b1cc0c5f8e1138988b29391e3813c111aa7e2a7fd1365647de1
3
+ metadata.gz: fbd73e065c84249f4ca89a7a65e1610df644254e238973950a182f45deb4a9aa
4
+ data.tar.gz: b8c868c5db1b793b6c1b8790cc66908a23be1b9f594ea59090cb26bf898f350e
5
5
  SHA512:
6
- metadata.gz: b9b9cc0099cfcd90557cb7efe522f37e2e95e1c01e06848612de7097608d07b7fa03387a32155e1b1d69c222758bae0cd6eb47bc9dd3c1f9dc6136a6bd9d20d4
7
- data.tar.gz: 9dbdc83281fd0b175a2b0bf3ed49e8beb3e4b3025558d0cbf9fc58bb9f2e3d2846c1d4f7c92699b9e6d7fcca8d3183409ca1c2eaf58ad850305cdedbd15ecd25
6
+ metadata.gz: 30afef4e1d99a19f48a6db2b509403213f96cc3bb507c2a2a92dc9ba526dcf4c1fb30642cc7e90789e962b919ad8f591674906a4870c3e94d0b8531421e1d2f9
7
+ data.tar.gz: d4d666d871ea1b63c478b833d039f2e696f28ccf7c5ec68cf5b1707b3c9dbb7e9e959f51ab35781d160a5ee710d20d4bf3a0d56217012e405d79d774a880f923
data/src/ZOHOCRMSDK2_0.rb CHANGED
@@ -265,6 +265,7 @@ require 'com/zoho/crm/api/dc/au_datacenter.rb'
265
265
  require 'com/zoho/crm/api/dc/cn_datacenter.rb'
266
266
  require 'com/zoho/crm/api/dc/us_datacenter.rb'
267
267
  require 'com/zoho/crm/api/dc/datacenter.rb'
268
+ require 'com/zoho/crm/api/dc/jp_datacenter.rb'
268
269
  require 'com/zoho/crm/api/files/file_operations.rb'
269
270
  require 'com/zoho/crm/api/files/body_wrapper.rb'
270
271
  require 'com/zoho/crm/api/files/action_handler.rb'
@@ -12,7 +12,7 @@ module ZOHOCRMSDK
12
12
  module Authenticator
13
13
  # This class gets and refreshes the tokens based on the expiry time.
14
14
  class OAuthToken < Token
15
- attr_accessor :client_id , :client_secret ,:redirect_url ,:grant_token,:refresh_token, :access_token ,:user_mail ,:id ,:expires_in
15
+ attr_accessor :client_id, :client_secret, :redirect_url, :grant_token, :refresh_token, :access_token, :user_mail, :id, :expires_in
16
16
  @@sync_lock = Monitor.new
17
17
 
18
18
  # Creates an OAuthToken class instance with the specified parameters.
@@ -27,7 +27,7 @@ module ZOHOCRMSDK
27
27
  error = {}
28
28
 
29
29
  if grant_token.nil? && refresh_token.nil? && id.nil? && access_token.nil?
30
- raise SDKException.new(code:Constants::MANDATORY_VALUE_ERROR, message:Constants::MANDATORY_KEY_ERROR, details:Constants::OAUTH_MANDATORY_KEYS)
30
+ raise SDKException.new(Constants::MANDATORY_VALUE_ERROR, Constants::MANDATORY_KEY_ERROR, Constants::OAUTH_MANDATORY_KEYS)
31
31
  end
32
32
 
33
33
  if id.nil? and access_token.nil?
@@ -185,7 +185,7 @@ module ZOHOCRMSDK
185
185
 
186
186
  generate_id()
187
187
 
188
- store.save_token(user,self)
188
+ store.save_token(user, self)
189
189
  rescue SDKException => e
190
190
  raise e
191
191
  rescue StandardError => e
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -0,0 +1,21 @@
1
+ require_relative 'datacenter'
2
+
3
+ module ZOHOCRMSDK
4
+ module DC
5
+ class JPDataCenter < DataCenter
6
+ def initialize; end
7
+
8
+ def get_iam_url
9
+ 'https://accounts.zoho.jp/oauth/v2/token'
10
+ end
11
+
12
+ def get_file_upload_url
13
+ 'https://content.zohoapis.jp'
14
+ end
15
+
16
+ PRODUCTION = Environment.new('https://www.zohoapis.jp', JPDataCenter.new.get_iam_url, JPDataCenter.new.get_file_upload_url,"jp_prd")
17
+ SANDBOX = Environment.new('https://sandbox.zohoapis.jp', JPDataCenter.new.get_iam_url, JPDataCenter.new.get_file_upload_url,"jp_sdb")
18
+ DEVELOPER = Environment.new('https://developer.zohoapis.jp', JPDataCenter.new.get_iam_url, JPDataCenter.new.get_file_upload_url,"jp_dev")
19
+ end
20
+ end
21
+ end
File without changes
File without changes
File without changes
File without changes
@@ -1,3 +1,20 @@
1
+ =begin
2
+ Copyright (c) 2021, ZOHO CORPORATION PRIVATE LIMITED
3
+ All rights reserved.
4
+
5
+ Licensed under the Apache License, Version 2.0 (the "License");
6
+ you may not use this file except in compliance with the License.
7
+ You may obtain a copy of the License at
8
+
9
+ http://www.apache.org/licenses/LICENSE-2.0
10
+
11
+ Unless required by applicable law or agreed to in writing, software
12
+ distributed under the License is distributed on an "AS IS" BASIS,
13
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ See the License for the specific language governing permissions and
15
+ limitations under the License.
16
+ =end
17
+
1
18
  require 'uri'
2
19
  require 'net/http'
3
20
  require 'cgi'
File without changes
@@ -25,7 +25,7 @@ module ZOHOCRMSDK
25
25
  end
26
26
 
27
27
  if value.nil?
28
- raise SDKException.new(Constants::PARAMETER_NULL_ERROR, header_name + Constants::NULL_VALUE_ERROR_MESSAGE)
28
+ raise SDKException.new(Constants::PARAMETER_NULL_ERROR, param_name + Constants::NULL_VALUE_ERROR_MESSAGE)
29
29
  end
30
30
 
31
31
  param_value = nil
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -157,7 +157,7 @@ module ZOHOCRMSDK
157
157
 
158
158
  ZOHO_SDK = 'X-ZOHO-SDK'
159
159
 
160
- SDK_VERSION = '5.0.0'
160
+ SDK_VERSION = '6.0.0'
161
161
 
162
162
  ZOHO_API_VERSION = '2.0'
163
163
 
@@ -640,5 +640,7 @@ module ZOHOCRMSDK
640
640
  RUBY = "ruby_"
641
641
 
642
642
  OAUTH_MANDATORY_KEYS = ["grant_token", "refresh_token", "id", "access_token"]
643
+
644
+ OWNER_LOOKUP = "ownerlookup"
643
645
  end
644
646
  end
@@ -56,9 +56,10 @@ module ZOHOCRMSDK
56
56
  var_type = nil
57
57
  check = true
58
58
 
59
- unless value.nil?
59
+ unless value.nil?
60
+ var_type = value.class.name
60
61
  if key_details.key? Constants::INTERFACE and key_details[Constants::INTERFACE] == true
61
- json_details = Initializer.get_initializer.json_details
62
+ json_details = Initializer.json_details
62
63
  interface_details = json_details[key_details[Constants::STRUCTURE_NAME]]
63
64
  classes = interface_details[Constants::CLASSES]
64
65
  check = false
@@ -101,6 +102,11 @@ module ZOHOCRMSDK
101
102
  if type.downcase != Util::Utility.path_to_package(var_type).downcase
102
103
  check = false
103
104
  end
105
+ if !check
106
+ if Object.const_get(var_type).new.is_a? Object.const_get(Util::Utility.class_to_load(type))
107
+ check = true
108
+ end
109
+ end
104
110
  end
105
111
  if !check
106
112
  error[Constants::ERROR_HASH_CLASS] = class_name
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -591,8 +591,9 @@ module ZOHOCRMSDK
591
591
  return
592
592
  end
593
593
  field_detail[Constants::LOOKUP] = true if data_type.downcase.include? Constants::LOOKUP
594
- field_detail[Constants::SKIP_MANDATORY] = true if data_type.downcase.include? Constants::CONSENT_LOOKUP
595
-
594
+ if (data_type.downcase.include? Constants::CONSENT_LOOKUP) || (data_type.downcase.include? Constants::OWNER_LOOKUP)
595
+ field_detail[Constants::SKIP_MANDATORY] = true
596
+ end
596
597
  if @@apitype_vs_structurename.include? data_type
597
598
  field_detail[Constants::STRUCTURE_NAME] = @@apitype_vs_structurename[data_type]
598
599
  end
File without changes
data/src/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module ZOHOCRMSDK
2
- VERSION = '5.0.0'
2
+ VERSION = '6.0.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ZOHOCRMSDK2_0
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.0
4
+ version: 6.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ZOHO CRM API TEAM
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-12-02 00:00:00.000000000 Z
11
+ date: 2022-03-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cgi
@@ -219,6 +219,7 @@ files:
219
219
  - src/com/zoho/crm/api/dc/datacenter.rb
220
220
  - src/com/zoho/crm/api/dc/eu_datacenter.rb
221
221
  - src/com/zoho/crm/api/dc/in_datacenter.rb
222
+ - src/com/zoho/crm/api/dc/jp_datacenter.rb
222
223
  - src/com/zoho/crm/api/dc/us_datacenter.rb
223
224
  - src/com/zoho/crm/api/exception/sdk_exception.rb
224
225
  - src/com/zoho/crm/api/fields/api_exception.rb
@@ -487,7 +488,8 @@ files:
487
488
  - src/resources/JSONDetails.json
488
489
  - src/version.rb
489
490
  homepage: https://www.zoho.com/crm/
490
- licenses: []
491
+ licenses:
492
+ - Apache-2.0
491
493
  metadata:
492
494
  source_code_uri: https://github.com/zoho/zohocrm-ruby-sdk-2.0
493
495
  post_install_message: