oneaccess 1.2.0 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (109) hide show
  1. checksums.yaml +5 -5
  2. data/.circleci/config.yml +24 -0
  3. data/.rubocop.yml +11 -29
  4. data/.rubocop_todo.yml +50 -0
  5. data/Gemfile +1 -1
  6. data/Gemfile.lock +9 -5
  7. data/Rakefile +4 -4
  8. data/docker-compose.yml +0 -5
  9. data/lib/oneaccess.rb +25 -24
  10. data/lib/oneaccess/api/api_base.rb +9 -9
  11. data/lib/oneaccess/api/v1_1/base.rb +1 -1
  12. data/lib/oneaccess/api/v1_1/entitlement/model/user_requests.rb +62 -0
  13. data/lib/oneaccess/api/v1_1/entitlement/organization/product_group.rb +10 -8
  14. data/lib/oneaccess/api/v1_1/entitlement/research/user_requests.rb +17 -15
  15. data/lib/oneaccess/api/v1_1/entitlement/user/product_group.rb +10 -8
  16. data/lib/oneaccess/api/v1_1/entitlement/user_subscription.rb +5 -5
  17. data/lib/oneaccess/api/v1_1/organizations.rb +2 -2
  18. data/lib/oneaccess/api/v1_1/references.rb +9 -9
  19. data/lib/oneaccess/api/v1_1/research.rb +7 -5
  20. data/lib/oneaccess/api/v1_1/symbology.rb +10 -8
  21. data/lib/oneaccess/api/v1_1/user.rb +3 -3
  22. data/lib/oneaccess/api/v3_0/base.rb +1 -1
  23. data/lib/oneaccess/api/v3_0/interactions.rb +8 -8
  24. data/lib/oneaccess/api/v3_0/providers.rb +8 -10
  25. data/lib/oneaccess/api/v3_0/references.rb +11 -11
  26. data/lib/oneaccess/configuration.rb +6 -6
  27. data/lib/oneaccess/data_object/address.rb +1 -1
  28. data/lib/oneaccess/data_object/city.rb +1 -1
  29. data/lib/oneaccess/data_object/company.rb +1 -1
  30. data/lib/oneaccess/data_object/company_light.rb +1 -1
  31. data/lib/oneaccess/data_object/contributor.rb +1 -1
  32. data/lib/oneaccess/data_object/country.rb +1 -1
  33. data/lib/oneaccess/data_object/global_region.rb +1 -1
  34. data/lib/oneaccess/data_object/inducement.rb +1 -1
  35. data/lib/oneaccess/data_object/industry.rb +1 -1
  36. data/lib/oneaccess/data_object/investor.rb +1 -1
  37. data/lib/oneaccess/data_object/meta.rb +1 -1
  38. data/lib/oneaccess/data_object/organization.rb +1 -1
  39. data/lib/oneaccess/data_object/organization_light.rb +1 -1
  40. data/lib/oneaccess/data_object/product_group.rb +1 -1
  41. data/lib/oneaccess/data_object/providers_user_details.rb +1 -1
  42. data/lib/oneaccess/data_object/providers_user_details_vendor.rb +1 -1
  43. data/lib/oneaccess/data_object/providers_users_details.rb +1 -1
  44. data/lib/oneaccess/data_object/region.rb +1 -1
  45. data/lib/oneaccess/data_object/representer/address.rb +3 -3
  46. data/lib/oneaccess/data_object/representer/city.rb +2 -2
  47. data/lib/oneaccess/data_object/representer/company.rb +12 -6
  48. data/lib/oneaccess/data_object/representer/contributor.rb +2 -2
  49. data/lib/oneaccess/data_object/representer/country.rb +10 -6
  50. data/lib/oneaccess/data_object/representer/global_region.rb +2 -2
  51. data/lib/oneaccess/data_object/representer/inducement.rb +6 -2
  52. data/lib/oneaccess/data_object/representer/industry.rb +5 -3
  53. data/lib/oneaccess/data_object/representer/investor.rb +1 -1
  54. data/lib/oneaccess/data_object/representer/meta.rb +2 -2
  55. data/lib/oneaccess/data_object/representer/providers_user_details.rb +4 -3
  56. data/lib/oneaccess/data_object/representer/providers_users_details.rb +4 -3
  57. data/lib/oneaccess/data_object/representer/research_document_info.rb +5 -3
  58. data/lib/oneaccess/data_object/representer/user.rb +10 -6
  59. data/lib/oneaccess/data_object/representer/user_entitlement_request.rb +19 -11
  60. data/lib/oneaccess/data_object/research_document_info.rb +1 -1
  61. data/lib/oneaccess/data_object/saml_info.rb +1 -1
  62. data/lib/oneaccess/data_object/sell_side_user_group_entitlement.rb +1 -1
  63. data/lib/oneaccess/data_object/user.rb +1 -1
  64. data/lib/oneaccess/data_object/user_entitlement_request.rb +1 -1
  65. data/lib/oneaccess/data_object/user_light.rb +1 -1
  66. data/lib/oneaccess/error/api_error.rb +2 -2
  67. data/lib/oneaccess/http/http_client.rb +10 -12
  68. data/lib/oneaccess/request/contributors_request_handler.rb +2 -2
  69. data/lib/oneaccess/request/investors_request_handler.rb +2 -2
  70. data/lib/oneaccess/response/api_error.rb +1 -1
  71. data/lib/oneaccess/response/buy_side_interactions_response.rb +2 -2
  72. data/lib/oneaccess/response/changed_users_response.rb +2 -2
  73. data/lib/oneaccess/response/companies_response.rb +2 -2
  74. data/lib/oneaccess/response/company_response.rb +2 -2
  75. data/lib/oneaccess/response/contributors_response.rb +2 -2
  76. data/lib/oneaccess/response/countries_response.rb +2 -2
  77. data/lib/oneaccess/response/inducement_response.rb +2 -2
  78. data/lib/oneaccess/response/industries_response.rb +2 -2
  79. data/lib/oneaccess/response/investors_response.rb +2 -2
  80. data/lib/oneaccess/response/organization_response.rb +1 -1
  81. data/lib/oneaccess/response/paginated_response.rb +1 -1
  82. data/lib/oneaccess/response/product_groups_response.rb +2 -2
  83. data/lib/oneaccess/response/providers_users_details_response.rb +2 -2
  84. data/lib/oneaccess/response/representer/buy_side_interactions_response.rb +1 -1
  85. data/lib/oneaccess/response/representer/changed_users_response.rb +1 -1
  86. data/lib/oneaccess/response/representer/companies_response.rb +6 -5
  87. data/lib/oneaccess/response/representer/company_response.rb +7 -6
  88. data/lib/oneaccess/response/representer/contributors_response.rb +9 -7
  89. data/lib/oneaccess/response/representer/countries_response.rb +6 -5
  90. data/lib/oneaccess/response/representer/inducement_response.rb +7 -6
  91. data/lib/oneaccess/response/representer/industries_response.rb +6 -5
  92. data/lib/oneaccess/response/representer/investors_response.rb +8 -6
  93. data/lib/oneaccess/response/representer/organization_response.rb +2 -2
  94. data/lib/oneaccess/response/representer/paginated_response.rb +1 -1
  95. data/lib/oneaccess/response/representer/product_groups_response.rb +6 -5
  96. data/lib/oneaccess/response/representer/providers_users_details_response.rb +3 -3
  97. data/lib/oneaccess/response/representer/research_document_response.rb +6 -5
  98. data/lib/oneaccess/response/representer/subscribe_to_updates_response.rb +1 -1
  99. data/lib/oneaccess/response/representer/user_entitlement_requests_response.rb +6 -5
  100. data/lib/oneaccess/response/representer/user_requests_response.rb +1 -1
  101. data/lib/oneaccess/response/representer/user_response.rb +2 -2
  102. data/lib/oneaccess/response/research_document_response.rb +2 -2
  103. data/lib/oneaccess/response/subscribe_to_updates_response.rb +2 -2
  104. data/lib/oneaccess/response/user_entitlement_requests_response.rb +2 -2
  105. data/lib/oneaccess/response/user_requests_response.rb +2 -2
  106. data/lib/oneaccess/response/user_response.rb +2 -2
  107. data/oneaccess.gemspec +24 -24
  108. metadata +17 -15
  109. data/circle.yml +0 -9
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: c40d4f0b9e451ae7913454d558de37997bb6ee8e
4
- data.tar.gz: af37d616c60b5c93c709c7a2002d8c147a7de023
2
+ SHA256:
3
+ metadata.gz: 3ebe5e722b86a12e04a090edd457e91856909846b1b5e091a314b069714f4e93
4
+ data.tar.gz: 731c3ba2533b4cd9e32ff2112f0a8795767d140e32a335969de257927fb03c8f
5
5
  SHA512:
6
- metadata.gz: abc576b91ce4b23ad091b487e9894bb2f169c191d2cfe296710c71bd1aa1da45bbc92837ec7ae7cede6f203fe118f9993e29c29f55591f6c1156ed4f58a058b8
7
- data.tar.gz: 89b0ccd89e1996babc10fc10a650b533d1f169f979e47ffebf91245c9bfc7b4e0e08ecfa7f440c52db747c5ebe305240acc74d31dbb13a007643ba46ec151268
6
+ metadata.gz: e7c36727bebc3b7512837d14b37e835d1ca617e9da4d0fc2839dd242717d7bfd4a73b4e6824a99a3cf7a27f97c0e0aa073b144e7e3ccf2475abe4db4c312dccf
7
+ data.tar.gz: 840a71ffb4726dd71a7a33694a4f0d645c52c376cb9fe36ce0c2495149608fb4a2b1b197e749bdd85e66948b0309afa0b420e534878d1131ef085598c3fe1f3c
@@ -0,0 +1,24 @@
1
+ version: 2
2
+ jobs:
3
+ build:
4
+ docker:
5
+ - image: circleci/ruby:2.4.3-node
6
+
7
+ steps:
8
+ - checkout
9
+ - restore_cache:
10
+ keys:
11
+ - oneaccess-rb-bundle-v1-{{ checksum "Gemfile.lock" }}
12
+ - run:
13
+ name: Install Dependencies
14
+ command: bundle check --path=vendor/bundle || bundle install --path=vendor/bundle --jobs=4 --retry=3
15
+ - save_cache:
16
+ key: oneaccess-rb-bundle-v1-{{ checksum "Gemfile.lock" }}
17
+ paths:
18
+ - vendor/bundle
19
+ - run:
20
+ name: Linting
21
+ command: bundle exec rubocop
22
+ - run:
23
+ name: Test
24
+ command: bundle exec rspec
@@ -1,35 +1,17 @@
1
- Style/Documentation:
2
- Enabled: false
1
+ inherit_gem:
2
+ va-ruby-style:
3
+ - default.yml
3
4
 
4
- Naming/ClassAndModuleCamelCase:
5
- Enabled: false
6
-
7
- Style/StringLiterals:
8
- EnforcedStyle: double_quotes
9
-
10
- Layout/AlignHash:
11
- EnforcedHashRocketStyle: table
12
- EnforcedColonStyle: table
13
-
14
- Metrics/ClassLength:
15
- Max: 120
16
-
17
- Metrics/AbcSize:
18
- Max: 18
19
-
20
- Metrics/ParameterLists:
21
- Max: 7
22
- CountKeywordArgs: false
23
-
24
- Metrics/LineLength:
25
- Max: 120
5
+ inherit_from: .rubocop_todo.yml
26
6
 
27
7
  AllCops:
28
- TargetRubyVersion: 2.4
29
- DisplayCopNames: true
30
- DisplayStyleGuide: true
31
8
  Exclude:
32
9
  - 'spec/**/*'
33
- - 'test/**/*'
34
- - 'vendor/**/*'
35
10
  - 'bin/**/*'
11
+ - 'vendor/**/*'
12
+
13
+ Style/MethodCallWithArgsParentheses:
14
+ Exclude:
15
+ - Gemfile
16
+ - Rakefile
17
+ - '*.gemspec'
@@ -0,0 +1,50 @@
1
+ # This configuration was generated by
2
+ # `rubocop --auto-gen-config`
3
+ # on 2018-10-04 16:17:48 +0000 using RuboCop version 0.55.0.
4
+ # The point is for the user to remove these configuration records
5
+ # one by one as the offenses are removed from the code base.
6
+ # Note that changes in the inspected code, or installation of new
7
+ # versions of RuboCop, may require this file to be generated again.
8
+
9
+ # Offense count: 1
10
+ # Configuration parameters: CountComments.
11
+ Metrics/MethodLength:
12
+ Max: 11
13
+
14
+ # Offense count: 4
15
+ # Configuration parameters: CountKeywordArgs.
16
+ Metrics/ParameterLists:
17
+ Max: 9
18
+
19
+ # Offense count: 14
20
+ Naming/ClassAndModuleCamelCase:
21
+ Exclude:
22
+ - 'lib/oneaccess/api/v1_1/base.rb'
23
+ - 'lib/oneaccess/api/v1_1/entitlement/organization/product_group.rb'
24
+ - 'lib/oneaccess/api/v1_1/entitlement/research/user_requests.rb'
25
+ - 'lib/oneaccess/api/v1_1/entitlement/model/user_requests.rb'
26
+ - 'lib/oneaccess/api/v1_1/entitlement/user/product_group.rb'
27
+ - 'lib/oneaccess/api/v1_1/entitlement/user_subscription.rb'
28
+ - 'lib/oneaccess/api/v1_1/organizations.rb'
29
+ - 'lib/oneaccess/api/v1_1/references.rb'
30
+ - 'lib/oneaccess/api/v1_1/research.rb'
31
+ - 'lib/oneaccess/api/v1_1/symbology.rb'
32
+ - 'lib/oneaccess/api/v1_1/user.rb'
33
+ - 'lib/oneaccess/api/v3_0/base.rb'
34
+ - 'lib/oneaccess/api/v3_0/interactions.rb'
35
+ - 'lib/oneaccess/api/v3_0/providers.rb'
36
+ - 'lib/oneaccess/api/v3_0/references.rb'
37
+
38
+ # Offense count: 4
39
+ # Configuration parameters: EnforcedStyle.
40
+ # SupportedStyles: strict, flexible
41
+ Rails/TimeZone:
42
+ Exclude:
43
+ - 'lib/oneaccess/data_object/representer/inducement.rb'
44
+ - 'lib/oneaccess/data_object/representer/user_entitlement_request.rb'
45
+
46
+ # Offense count: 45
47
+ # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
48
+ # URISchemes: http, https
49
+ Metrics/LineLength:
50
+ Max: 117
data/Gemfile CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- source "https://rubygems.org"
3
+ source 'https://rubygems.org'
4
4
 
5
5
  gemspec
@@ -28,9 +28,9 @@ GEM
28
28
  multi_json (1.12.2)
29
29
  multipart-post (2.0.0)
30
30
  parallel (1.12.1)
31
- parser (2.5.1.0)
31
+ parser (2.5.1.2)
32
32
  ast (~> 2.4.0)
33
- powerpack (0.1.1)
33
+ powerpack (0.1.2)
34
34
  public_suffix (2.0.5)
35
35
  rainbow (3.0.0)
36
36
  rake (11.3.0)
@@ -61,7 +61,7 @@ GEM
61
61
  rainbow (>= 2.2.2, < 4.0)
62
62
  ruby-progressbar (~> 1.7)
63
63
  unicode-display_width (~> 1.0, >= 1.0.1)
64
- ruby-progressbar (1.9.0)
64
+ ruby-progressbar (1.10.0)
65
65
  safe_yaml (1.0.4)
66
66
  simplecov (0.15.1)
67
67
  docile (~> 1.1.0)
@@ -72,8 +72,12 @@ GEM
72
72
  hirb
73
73
  simplecov
74
74
  simplecov-html (0.10.2)
75
+ thor (0.19.4)
75
76
  uber (0.1.0)
76
- unicode-display_width (1.3.2)
77
+ unicode-display_width (1.4.0)
78
+ va-ruby-style (0.0.1)
79
+ rubocop (= 0.55.0)
80
+ thor (= 0.19.4)
77
81
  webmock (3.0.1)
78
82
  addressable (>= 2.3.6)
79
83
  crack (>= 0.3.2)
@@ -89,9 +93,9 @@ DEPENDENCIES
89
93
  rake (~> 11.3)
90
94
  rspec (~> 3.6)
91
95
  rspec-its (~> 1.2)
92
- rubocop (~> 0.55.0)
93
96
  simplecov
94
97
  simplecov-console
98
+ va-ruby-style (= 0.0.1)
95
99
  webmock (~> 3.0.1)
96
100
 
97
101
  BUNDLED WITH
data/Rakefile CHANGED
@@ -1,11 +1,11 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "bundler/gem_tasks"
4
- require "rake/testtask"
3
+ require 'bundler/gem_tasks'
4
+ require 'rake/testtask'
5
5
 
6
6
  Rake::TestTask.new do |t|
7
- t.test_files = FileList["test/**/*_test.rb"]
7
+ t.test_files = FileList['test/**/*_test.rb']
8
8
  end
9
- desc "Run tests"
9
+ desc 'Run tests'
10
10
 
11
11
  task default: :test
@@ -8,10 +8,5 @@ services:
8
8
  - .:/oneaccess-rb
9
9
  - bundler-cache:/bundle
10
10
 
11
- bundle:
12
- image: tianon/true
13
- volumes:
14
- - bundler-cache:/bundle
15
-
16
11
  volumes:
17
12
  bundler-cache:
@@ -1,38 +1,39 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "representable"
3
+ require 'representable'
4
4
 
5
- require_relative "./oneaccess/http/http_client"
5
+ require_relative './oneaccess/http/http_client'
6
6
 
7
- require_relative "./oneaccess/configuration"
8
- require_relative "./oneaccess/serializable"
7
+ require_relative './oneaccess/configuration'
8
+ require_relative './oneaccess/serializable'
9
9
 
10
- require_relative "./oneaccess/enum/api_status_code"
11
- require_relative "./oneaccess/enum/product_type"
12
- require_relative "./oneaccess/enum/product_group_status"
13
- require_relative "./oneaccess/enum/entitlement_status"
10
+ require_relative './oneaccess/enum/api_status_code'
11
+ require_relative './oneaccess/enum/product_type'
12
+ require_relative './oneaccess/enum/product_group_status'
13
+ require_relative './oneaccess/enum/entitlement_status'
14
14
 
15
- require_relative "./oneaccess/api/api_base"
15
+ require_relative './oneaccess/api/api_base'
16
16
 
17
- require_relative "./oneaccess/api/v1_1/base"
18
- require_relative "./oneaccess/api/v1_1/user"
19
- require_relative "./oneaccess/api/v1_1/research"
20
- require_relative "./oneaccess/api/v1_1/organizations"
21
- require_relative "./oneaccess/api/v1_1/symbology"
22
- require_relative "./oneaccess/api/v1_1/references"
23
- require_relative "./oneaccess/api/v1_1/entitlement/user_subscription"
24
- require_relative "./oneaccess/api/v1_1/entitlement/organization/product_group"
25
- require_relative "./oneaccess/api/v1_1/entitlement/user/product_group"
26
- require_relative "./oneaccess/api/v1_1/entitlement/research/user_requests"
17
+ require_relative './oneaccess/api/v1_1/base'
18
+ require_relative './oneaccess/api/v1_1/user'
19
+ require_relative './oneaccess/api/v1_1/research'
20
+ require_relative './oneaccess/api/v1_1/organizations'
21
+ require_relative './oneaccess/api/v1_1/symbology'
22
+ require_relative './oneaccess/api/v1_1/references'
23
+ require_relative './oneaccess/api/v1_1/entitlement/user_subscription'
24
+ require_relative './oneaccess/api/v1_1/entitlement/organization/product_group'
25
+ require_relative './oneaccess/api/v1_1/entitlement/user/product_group'
26
+ require_relative './oneaccess/api/v1_1/entitlement/research/user_requests'
27
+ require_relative './oneaccess/api/v1_1/entitlement/model/user_requests'
27
28
 
28
- require_relative "./oneaccess/api/v3_0/base"
29
- require_relative "./oneaccess/api/v3_0/references"
30
- require_relative "./oneaccess/api/v3_0/providers"
31
- require_relative "./oneaccess/api/v3_0/interactions"
29
+ require_relative './oneaccess/api/v3_0/base'
30
+ require_relative './oneaccess/api/v3_0/references'
31
+ require_relative './oneaccess/api/v3_0/providers'
32
+ require_relative './oneaccess/api/v3_0/interactions'
32
33
 
33
34
  module ONEAccess
34
35
  def self.configure
35
- raise "expected block for configuration" unless block_given?
36
+ raise 'expected block for configuration' unless block_given?
36
37
  yield Configuration
37
38
  end
38
39
  end
@@ -1,9 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "faraday"
4
- require "json"
5
- require_relative "../response/api_error"
6
- require_relative "../error/api_error"
3
+ require 'faraday'
4
+ require 'json'
5
+ require_relative '../response/api_error'
6
+ require_relative '../error/api_error'
7
7
 
8
8
  module ONEAccess
9
9
  module API
@@ -14,11 +14,11 @@ module ONEAccess
14
14
  end
15
15
 
16
16
  def send_post(method, body)
17
- Http::HttpClient.post(api_url(method), body, "Content-Type" => "application/json")
17
+ Http::HttpClient.post(api_url(method), body, 'Content-Type' => 'application/json')
18
18
  end
19
19
 
20
20
  def resource_api_path
21
- const_get("RESOURCE_API_PATH")
21
+ const_get('RESOURCE_API_PATH')
22
22
  rescue StandardError
23
23
  nil
24
24
  end
@@ -32,18 +32,18 @@ module ONEAccess
32
32
  protected
33
33
 
34
34
  def api_path(path)
35
- raise "API path has already been set" if resource_api_path
35
+ raise 'API path has already been set' if resource_api_path
36
36
  self.resource_api_path = path
37
37
  end
38
38
 
39
39
  private
40
40
 
41
41
  def base_url
42
- raise "base_url must be implemented"
42
+ raise 'base_url must be implemented'
43
43
  end
44
44
 
45
45
  def resource_api_path=(path)
46
- const_set("RESOURCE_API_PATH", path)
46
+ const_set('RESOURCE_API_PATH', path)
47
47
  end
48
48
  end
49
49
  end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "../api_base"
3
+ require_relative '../api_base'
4
4
 
5
5
  module ONEAccess
6
6
  module API
@@ -0,0 +1,62 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative '../../../../response/user_requests_response'
4
+ require_relative '../../../../response/user_entitlement_requests_response'
5
+
6
+ module ONEAccess
7
+ module API
8
+ module V1_1
9
+ module Entitlement
10
+ module Model
11
+ class UserRequests < Base
12
+ api_path '/entitlement/model/userRequests'
13
+
14
+ def self.create(user_id:, sell_side_org_id:, sales_contact_first_name: nil, sales_contact_last_name: nil,
15
+ sales_contact_email: nil)
16
+ response = send_post(
17
+ 'create',
18
+ UserId: user_id,
19
+ SellSideOrgId: sell_side_org_id,
20
+ SalesContact: {
21
+ FirstName: sales_contact_first_name,
22
+ LastName: sales_contact_last_name,
23
+ Email: sales_contact_email,
24
+ }.reject { |_, value| value.nil? },
25
+ )
26
+
27
+ Response::UserRequestsResponse.from_json(response.body)
28
+ end
29
+
30
+ def self.get_list( # rubocop:disable Metrics/MethodLength
31
+ user_ids: [],
32
+ page_number: 0,
33
+ page_size: 20,
34
+ sort_by: 'UserEntitlementRequestId',
35
+ is_ascending: false,
36
+ create_date_from: nil,
37
+ create_date_to: nil,
38
+ sell_side_org_ids: nil,
39
+ entitlement_status: nil
40
+ )
41
+ query = {
42
+ UserIds: user_ids,
43
+ PageNumber: page_number,
44
+ PageSize: page_size,
45
+ SortBy: sort_by,
46
+ IsAscending: is_ascending,
47
+ CreateDateFrom: create_date_from,
48
+ CreateDateTo: create_date_to,
49
+ SellSideOrgIds: sell_side_org_ids,
50
+ EntitlementStatus: entitlement_status,
51
+ }.reject { |_, value| value.nil? }
52
+
53
+ response = send_get('getListWithEntitlementsStatus', Query: query.to_json)
54
+
55
+ Response::UserEntitlementRequestsResponse.from_json(response.body)
56
+ end
57
+ end
58
+ end
59
+ end
60
+ end
61
+ end
62
+ end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "../../../../response/product_groups_response"
3
+ require_relative '../../../../response/product_groups_response'
4
4
 
5
5
  module ONEAccess
6
6
  module API
@@ -8,15 +8,17 @@ module ONEAccess
8
8
  module Entitlement
9
9
  module Organization
10
10
  class ProductGroup < Base
11
- api_path "/entitlement/organization/productgroup"
11
+ api_path '/entitlement/organization/productgroup'
12
12
 
13
13
  def self.get_list(contributor_org_id:, page_number: 0, page_size: 20, type: nil)
14
- resp = send_get("getList", Query: {
15
- PageNumber: page_number,
16
- PageSize: page_size,
17
- ContributorOrgId: contributor_org_id,
18
- Type: type
19
- }.to_json)
14
+ resp = send_get(
15
+ 'getList', Query: {
16
+ PageNumber: page_number,
17
+ PageSize: page_size,
18
+ ContributorOrgId: contributor_org_id,
19
+ Type: type,
20
+ }.to_json
21
+ )
20
22
  Response::ProductGroupsResponse.from_json(resp.body)
21
23
  end
22
24
  end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "../../../../response/user_requests_response"
4
- require_relative "../../../../response/user_entitlement_requests_response"
3
+ require_relative '../../../../response/user_requests_response'
4
+ require_relative '../../../../response/user_entitlement_requests_response'
5
5
 
6
6
  module ONEAccess
7
7
  module API
@@ -9,18 +9,20 @@ module ONEAccess
9
9
  module Entitlement
10
10
  module Research
11
11
  class UserRequests < Base
12
- api_path "/entitlement/research/userRequests"
12
+ api_path '/entitlement/research/userRequests'
13
13
 
14
14
  def self.create(user_id:, sell_side_org_id:, sales_contact_first_name: nil, sales_contact_last_name: nil,
15
- sales_contact_email: nil)
16
- response = send_post("create",
17
- UserId: user_id,
18
- SellSideOrgId: sell_side_org_id,
19
- SalesContact: {
20
- FirstName: sales_contact_first_name,
21
- LastName: sales_contact_last_name,
22
- Email: sales_contact_email
23
- }.reject { |_, value| value.nil? })
15
+ sales_contact_email: nil)
16
+ response = send_post(
17
+ 'create',
18
+ UserId: user_id,
19
+ SellSideOrgId: sell_side_org_id,
20
+ SalesContact: {
21
+ FirstName: sales_contact_first_name,
22
+ LastName: sales_contact_last_name,
23
+ Email: sales_contact_email,
24
+ }.reject { |_, value| value.nil? },
25
+ )
24
26
 
25
27
  Response::UserRequestsResponse.from_json(response.body)
26
28
  end
@@ -29,7 +31,7 @@ module ONEAccess
29
31
  user_ids: [],
30
32
  page_number: 0,
31
33
  page_size: 20,
32
- sort_by: "UserEntitlementRequestId",
34
+ sort_by: 'UserEntitlementRequestId',
33
35
  is_ascending: false,
34
36
  create_date_from: nil,
35
37
  create_date_to: nil,
@@ -45,10 +47,10 @@ module ONEAccess
45
47
  CreateDateFrom: create_date_from,
46
48
  CreateDateTo: create_date_to,
47
49
  SellSideOrgIds: sell_side_org_ids,
48
- EntitlementStatus: entitlement_status
50
+ EntitlementStatus: entitlement_status,
49
51
  }.reject { |_, value| value.nil? }
50
52
 
51
- response = send_get("getListWithEntitlementsStatus", Query: query.to_json)
53
+ response = send_get('getListWithEntitlementsStatus', Query: query.to_json)
52
54
 
53
55
  Response::UserEntitlementRequestsResponse.from_json(response.body)
54
56
  end