trophy_api_client 1.8.0 → 1.9.1
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.
- checksums.yaml +4 -4
- data/lib/gemconfig.rb +1 -1
- data/lib/requests.rb +34 -8
- data/lib/trophy_api_client/achievements/client.rb +4 -0
- data/lib/trophy_api_client/admin/attributes/client.rb +10 -0
- data/lib/trophy_api_client/admin/client.rb +7 -0
- data/lib/trophy_api_client/admin/leaderboards/client.rb +10 -0
- data/lib/trophy_api_client/admin/metrics/client.rb +10 -0
- data/lib/trophy_api_client/admin/points/boosts/client.rb +10 -0
- data/lib/trophy_api_client/admin/points/levels/client.rb +10 -0
- data/lib/trophy_api_client/admin/points/systems/client.rb +10 -0
- data/lib/trophy_api_client/admin/points/triggers/client.rb +10 -0
- data/lib/trophy_api_client/admin/streaks/client.rb +2 -0
- data/lib/trophy_api_client/admin/streaks/freezes/client.rb +2 -0
- data/lib/trophy_api_client/admin/tenants/client.rb +376 -0
- data/lib/trophy_api_client/leaderboards/client.rb +4 -0
- data/lib/trophy_api_client/metrics/client.rb +2 -0
- data/lib/trophy_api_client/points/client.rb +10 -0
- data/lib/trophy_api_client/streaks/client.rb +4 -0
- data/lib/trophy_api_client/types/admin_points_boost.rb +2 -2
- data/lib/trophy_api_client/types/admin_tenant.rb +103 -0
- data/lib/trophy_api_client/types/admin_tenant_status.rb +9 -0
- data/lib/trophy_api_client/types/create_tenant_request_item.rb +66 -0
- data/lib/trophy_api_client/types/create_tenants_request.rb +7 -0
- data/lib/trophy_api_client/types/create_tenants_response.rb +74 -0
- data/lib/trophy_api_client/types/delete_tenants_response.rb +74 -0
- data/lib/trophy_api_client/types/list_tenants_response.rb +7 -0
- data/lib/trophy_api_client/types/update_tenant_request_item.rb +75 -0
- data/lib/trophy_api_client/types/update_tenants_request.rb +7 -0
- data/lib/trophy_api_client/types/update_tenants_response.rb +74 -0
- data/lib/trophy_api_client/users/client.rb +32 -0
- data/lib/trophy_api_client/version.rb +1 -1
- data/lib/trophy_api_client.rb +12 -4
- data/lib/types_export.rb +10 -0
- metadata +13 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 47cc87798ef4a44528e28b7b12da849367e30237f717552a056535bcbf91392b
|
|
4
|
+
data.tar.gz: 68803b1980e19b5e3919205bd1bd350fb879f066028ec183431d2c3b72a37d5f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0e5876b7c92ba8f450ce00563d140e93fe1875f601f848ecb03b97610ac4d0a19dda56efe3cb2c06cbb4b252478e3e2e6dbc415c5e493f502c32ad8f12161acd
|
|
7
|
+
data.tar.gz: 3867fdebbf8e94c652246060549466269fb36256f8f8ad42e1c42722a9d010187a421882a6ebb2221a873f0763a7b9a0502c9ab077e6cdd994385626a954711d
|
data/lib/gemconfig.rb
CHANGED
data/lib/requests.rb
CHANGED
|
@@ -21,12 +21,17 @@ module TrophyApiClient
|
|
|
21
21
|
# @param max_retries [Long] The number of times to retry a failed request, defaults to 2.
|
|
22
22
|
# @param timeout_in_seconds [Long]
|
|
23
23
|
# @param api_key [String]
|
|
24
|
+
# @param tenant_id [String] The tenant identifier for multi-tenant organisations. Required when the
|
|
25
|
+
# organisation has multi-tenancy enabled. The value should be your internal ID for
|
|
26
|
+
# the tenant. Ignored for single-tenant organisations.
|
|
24
27
|
# @return [TrophyApiClient::RequestClient]
|
|
25
28
|
def initialize(api_key:, base_url: nil, environment: TrophyApiClient::Environment::PRODUCTION, max_retries: nil,
|
|
26
|
-
timeout_in_seconds: nil)
|
|
29
|
+
timeout_in_seconds: nil, tenant_id: nil)
|
|
27
30
|
@default_environment = environment
|
|
28
31
|
@api_key = api_key
|
|
29
|
-
@
|
|
32
|
+
@headers = {}
|
|
33
|
+
@headers["Tenant-ID"] = tenant_id unless tenant_id.nil?
|
|
34
|
+
@conn = Faraday.new(headers: @headers) do |faraday|
|
|
30
35
|
faraday.request :json
|
|
31
36
|
faraday.response :raise_error, include_request: true
|
|
32
37
|
faraday.request :retry, { max: max_retries } unless max_retries.nil?
|
|
@@ -64,12 +69,17 @@ module TrophyApiClient
|
|
|
64
69
|
# @param max_retries [Long] The number of times to retry a failed request, defaults to 2.
|
|
65
70
|
# @param timeout_in_seconds [Long]
|
|
66
71
|
# @param api_key [String]
|
|
72
|
+
# @param tenant_id [String] The tenant identifier for multi-tenant organisations. Required when the
|
|
73
|
+
# organisation has multi-tenancy enabled. The value should be your internal ID for
|
|
74
|
+
# the tenant. Ignored for single-tenant organisations.
|
|
67
75
|
# @return [TrophyApiClient::AsyncRequestClient]
|
|
68
76
|
def initialize(api_key:, base_url: nil, environment: TrophyApiClient::Environment::PRODUCTION, max_retries: nil,
|
|
69
|
-
timeout_in_seconds: nil)
|
|
77
|
+
timeout_in_seconds: nil, tenant_id: nil)
|
|
70
78
|
@default_environment = environment
|
|
71
79
|
@api_key = api_key
|
|
72
|
-
@
|
|
80
|
+
@headers = {}
|
|
81
|
+
@headers["Tenant-ID"] = tenant_id unless tenant_id.nil?
|
|
82
|
+
@conn = Faraday.new(headers: @headers) do |faraday|
|
|
73
83
|
faraday.request :json
|
|
74
84
|
faraday.response :raise_error, include_request: true
|
|
75
85
|
faraday.adapter :async_http
|
|
@@ -100,6 +110,10 @@ module TrophyApiClient
|
|
|
100
110
|
attr_reader :base_url
|
|
101
111
|
# @return [String]
|
|
102
112
|
attr_reader :api_key
|
|
113
|
+
# @return [String] The tenant identifier for multi-tenant organisations. Required when the
|
|
114
|
+
# organisation has multi-tenancy enabled. The value should be your internal ID for
|
|
115
|
+
# the tenant. Ignored for single-tenant organisations.
|
|
116
|
+
attr_reader :tenant_id
|
|
103
117
|
# @return [Hash{String => Object}]
|
|
104
118
|
attr_reader :additional_headers
|
|
105
119
|
# @return [Hash{String => Object}]
|
|
@@ -111,15 +125,19 @@ module TrophyApiClient
|
|
|
111
125
|
|
|
112
126
|
# @param base_url [String]
|
|
113
127
|
# @param api_key [String]
|
|
128
|
+
# @param tenant_id [String] The tenant identifier for multi-tenant organisations. Required when the
|
|
129
|
+
# organisation has multi-tenancy enabled. The value should be your internal ID for
|
|
130
|
+
# the tenant. Ignored for single-tenant organisations.
|
|
114
131
|
# @param additional_headers [Hash{String => Object}]
|
|
115
132
|
# @param additional_query_parameters [Hash{String => Object}]
|
|
116
133
|
# @param additional_body_parameters [Hash{String => Object}]
|
|
117
134
|
# @param timeout_in_seconds [Long]
|
|
118
135
|
# @return [TrophyApiClient::RequestOptions]
|
|
119
|
-
def initialize(base_url: nil, api_key: nil,
|
|
120
|
-
additional_body_parameters: nil, timeout_in_seconds: nil)
|
|
136
|
+
def initialize(base_url: nil, api_key: nil, tenant_id: nil, additional_headers: nil,
|
|
137
|
+
additional_query_parameters: nil, additional_body_parameters: nil, timeout_in_seconds: nil)
|
|
121
138
|
@base_url = base_url
|
|
122
139
|
@api_key = api_key
|
|
140
|
+
@tenant_id = tenant_id
|
|
123
141
|
@additional_headers = additional_headers
|
|
124
142
|
@additional_query_parameters = additional_query_parameters
|
|
125
143
|
@additional_body_parameters = additional_body_parameters
|
|
@@ -134,6 +152,10 @@ module TrophyApiClient
|
|
|
134
152
|
attr_reader :base_url
|
|
135
153
|
# @return [String]
|
|
136
154
|
attr_reader :api_key
|
|
155
|
+
# @return [String] The tenant identifier for multi-tenant organisations. Required when the
|
|
156
|
+
# organisation has multi-tenancy enabled. The value should be your internal ID for
|
|
157
|
+
# the tenant. Ignored for single-tenant organisations.
|
|
158
|
+
attr_reader :tenant_id
|
|
137
159
|
# @return [Hash{String => Object}]
|
|
138
160
|
attr_reader :additional_headers
|
|
139
161
|
# @return [Hash{String => Object}]
|
|
@@ -145,15 +167,19 @@ module TrophyApiClient
|
|
|
145
167
|
|
|
146
168
|
# @param base_url [String]
|
|
147
169
|
# @param api_key [String]
|
|
170
|
+
# @param tenant_id [String] The tenant identifier for multi-tenant organisations. Required when the
|
|
171
|
+
# organisation has multi-tenancy enabled. The value should be your internal ID for
|
|
172
|
+
# the tenant. Ignored for single-tenant organisations.
|
|
148
173
|
# @param additional_headers [Hash{String => Object}]
|
|
149
174
|
# @param additional_query_parameters [Hash{String => Object}]
|
|
150
175
|
# @param additional_body_parameters [Hash{String => Object}]
|
|
151
176
|
# @param timeout_in_seconds [Long]
|
|
152
177
|
# @return [TrophyApiClient::IdempotencyRequestOptions]
|
|
153
|
-
def initialize(base_url: nil, api_key: nil,
|
|
154
|
-
additional_body_parameters: nil, timeout_in_seconds: nil)
|
|
178
|
+
def initialize(base_url: nil, api_key: nil, tenant_id: nil, additional_headers: nil,
|
|
179
|
+
additional_query_parameters: nil, additional_body_parameters: nil, timeout_in_seconds: nil)
|
|
155
180
|
@base_url = base_url
|
|
156
181
|
@api_key = api_key
|
|
182
|
+
@tenant_id = tenant_id
|
|
157
183
|
@additional_headers = additional_headers
|
|
158
184
|
@additional_query_parameters = additional_query_parameters
|
|
159
185
|
@additional_body_parameters = additional_body_parameters
|
|
@@ -36,6 +36,7 @@ module TrophyApiClient
|
|
|
36
36
|
response = @request_client.conn.get do |req|
|
|
37
37
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
|
38
38
|
req.headers["X-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
|
|
39
|
+
req.headers["Tenant-ID"] = request_options.tenant_id unless request_options&.tenant_id.nil?
|
|
39
40
|
req.headers = {
|
|
40
41
|
**(req.headers || {}),
|
|
41
42
|
**@request_client.get_headers,
|
|
@@ -81,6 +82,7 @@ module TrophyApiClient
|
|
|
81
82
|
response = @request_client.conn.post do |req|
|
|
82
83
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
|
83
84
|
req.headers["X-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
|
|
85
|
+
req.headers["Tenant-ID"] = request_options.tenant_id unless request_options&.tenant_id.nil?
|
|
84
86
|
req.headers = {
|
|
85
87
|
**(req.headers || {}),
|
|
86
88
|
**@request_client.get_headers,
|
|
@@ -126,6 +128,7 @@ module TrophyApiClient
|
|
|
126
128
|
response = @request_client.conn.get do |req|
|
|
127
129
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
|
128
130
|
req.headers["X-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
|
|
131
|
+
req.headers["Tenant-ID"] = request_options.tenant_id unless request_options&.tenant_id.nil?
|
|
129
132
|
req.headers = {
|
|
130
133
|
**(req.headers || {}),
|
|
131
134
|
**@request_client.get_headers,
|
|
@@ -173,6 +176,7 @@ module TrophyApiClient
|
|
|
173
176
|
response = @request_client.conn.post do |req|
|
|
174
177
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
|
175
178
|
req.headers["X-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
|
|
179
|
+
req.headers["Tenant-ID"] = request_options.tenant_id unless request_options&.tenant_id.nil?
|
|
176
180
|
req.headers = {
|
|
177
181
|
**(req.headers || {}),
|
|
178
182
|
**@request_client.get_headers,
|
|
@@ -40,6 +40,7 @@ module TrophyApiClient
|
|
|
40
40
|
response = @request_client.conn.get do |req|
|
|
41
41
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
|
42
42
|
req.headers["X-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
|
|
43
|
+
req.headers["Tenant-ID"] = request_options.tenant_id unless request_options&.tenant_id.nil?
|
|
43
44
|
req.headers = {
|
|
44
45
|
**(req.headers || {}),
|
|
45
46
|
**@request_client.get_headers,
|
|
@@ -74,6 +75,7 @@ module TrophyApiClient
|
|
|
74
75
|
response = @request_client.conn.post do |req|
|
|
75
76
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
|
76
77
|
req.headers["X-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
|
|
78
|
+
req.headers["Tenant-ID"] = request_options.tenant_id unless request_options&.tenant_id.nil?
|
|
77
79
|
req.headers = {
|
|
78
80
|
**(req.headers || {}),
|
|
79
81
|
**@request_client.get_headers,
|
|
@@ -105,6 +107,7 @@ module TrophyApiClient
|
|
|
105
107
|
response = @request_client.conn.delete do |req|
|
|
106
108
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
|
107
109
|
req.headers["X-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
|
|
110
|
+
req.headers["Tenant-ID"] = request_options.tenant_id unless request_options&.tenant_id.nil?
|
|
108
111
|
req.headers = {
|
|
109
112
|
**(req.headers || {}),
|
|
110
113
|
**@request_client.get_headers,
|
|
@@ -135,6 +138,7 @@ module TrophyApiClient
|
|
|
135
138
|
response = @request_client.conn.patch do |req|
|
|
136
139
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
|
137
140
|
req.headers["X-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
|
|
141
|
+
req.headers["Tenant-ID"] = request_options.tenant_id unless request_options&.tenant_id.nil?
|
|
138
142
|
req.headers = {
|
|
139
143
|
**(req.headers || {}),
|
|
140
144
|
**@request_client.get_headers,
|
|
@@ -165,6 +169,7 @@ module TrophyApiClient
|
|
|
165
169
|
response = @request_client.conn.get do |req|
|
|
166
170
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
|
167
171
|
req.headers["X-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
|
|
172
|
+
req.headers["Tenant-ID"] = request_options.tenant_id unless request_options&.tenant_id.nil?
|
|
168
173
|
req.headers = {
|
|
169
174
|
**(req.headers || {}),
|
|
170
175
|
**@request_client.get_headers,
|
|
@@ -210,6 +215,7 @@ module TrophyApiClient
|
|
|
210
215
|
response = @request_client.conn.get do |req|
|
|
211
216
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
|
212
217
|
req.headers["X-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
|
|
218
|
+
req.headers["Tenant-ID"] = request_options.tenant_id unless request_options&.tenant_id.nil?
|
|
213
219
|
req.headers = {
|
|
214
220
|
**(req.headers || {}),
|
|
215
221
|
**@request_client.get_headers,
|
|
@@ -250,6 +256,7 @@ module TrophyApiClient
|
|
|
250
256
|
response = @request_client.conn.post do |req|
|
|
251
257
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
|
252
258
|
req.headers["X-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
|
|
259
|
+
req.headers["Tenant-ID"] = request_options.tenant_id unless request_options&.tenant_id.nil?
|
|
253
260
|
req.headers = {
|
|
254
261
|
**(req.headers || {}),
|
|
255
262
|
**@request_client.get_headers,
|
|
@@ -283,6 +290,7 @@ module TrophyApiClient
|
|
|
283
290
|
response = @request_client.conn.delete do |req|
|
|
284
291
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
|
285
292
|
req.headers["X-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
|
|
293
|
+
req.headers["Tenant-ID"] = request_options.tenant_id unless request_options&.tenant_id.nil?
|
|
286
294
|
req.headers = {
|
|
287
295
|
**(req.headers || {}),
|
|
288
296
|
**@request_client.get_headers,
|
|
@@ -315,6 +323,7 @@ module TrophyApiClient
|
|
|
315
323
|
response = @request_client.conn.patch do |req|
|
|
316
324
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
|
317
325
|
req.headers["X-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
|
|
326
|
+
req.headers["Tenant-ID"] = request_options.tenant_id unless request_options&.tenant_id.nil?
|
|
318
327
|
req.headers = {
|
|
319
328
|
**(req.headers || {}),
|
|
320
329
|
**@request_client.get_headers,
|
|
@@ -347,6 +356,7 @@ module TrophyApiClient
|
|
|
347
356
|
response = @request_client.conn.get do |req|
|
|
348
357
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
|
349
358
|
req.headers["X-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
|
|
359
|
+
req.headers["Tenant-ID"] = request_options.tenant_id unless request_options&.tenant_id.nil?
|
|
350
360
|
req.headers = {
|
|
351
361
|
**(req.headers || {}),
|
|
352
362
|
**@request_client.get_headers,
|
|
@@ -5,6 +5,7 @@ require_relative "attributes/client"
|
|
|
5
5
|
require_relative "metrics/client"
|
|
6
6
|
require_relative "leaderboards/client"
|
|
7
7
|
require_relative "streaks/client"
|
|
8
|
+
require_relative "tenants/client"
|
|
8
9
|
require_relative "points/client"
|
|
9
10
|
|
|
10
11
|
module TrophyApiClient
|
|
@@ -18,6 +19,8 @@ module TrophyApiClient
|
|
|
18
19
|
attr_reader :leaderboards
|
|
19
20
|
# @return [TrophyApiClient::Admin::StreaksClient]
|
|
20
21
|
attr_reader :streaks
|
|
22
|
+
# @return [TrophyApiClient::Admin::TenantsClient]
|
|
23
|
+
attr_reader :tenants
|
|
21
24
|
# @return [TrophyApiClient::Admin::Points::Client]
|
|
22
25
|
attr_reader :admin
|
|
23
26
|
|
|
@@ -28,6 +31,7 @@ module TrophyApiClient
|
|
|
28
31
|
@metrics = TrophyApiClient::Admin::MetricsClient.new(request_client: request_client)
|
|
29
32
|
@leaderboards = TrophyApiClient::Admin::LeaderboardsClient.new(request_client: request_client)
|
|
30
33
|
@streaks = TrophyApiClient::Admin::StreaksClient.new(request_client: request_client)
|
|
34
|
+
@tenants = TrophyApiClient::Admin::TenantsClient.new(request_client: request_client)
|
|
31
35
|
@admin = TrophyApiClient::Admin::Points::Client.new(request_client: request_client)
|
|
32
36
|
end
|
|
33
37
|
end
|
|
@@ -41,6 +45,8 @@ module TrophyApiClient
|
|
|
41
45
|
attr_reader :leaderboards
|
|
42
46
|
# @return [TrophyApiClient::Admin::AsyncStreaksClient]
|
|
43
47
|
attr_reader :streaks
|
|
48
|
+
# @return [TrophyApiClient::Admin::AsyncTenantsClient]
|
|
49
|
+
attr_reader :tenants
|
|
44
50
|
# @return [TrophyApiClient::Admin::Points::AsyncClient]
|
|
45
51
|
attr_reader :admin
|
|
46
52
|
|
|
@@ -51,6 +57,7 @@ module TrophyApiClient
|
|
|
51
57
|
@metrics = TrophyApiClient::Admin::AsyncMetricsClient.new(request_client: request_client)
|
|
52
58
|
@leaderboards = TrophyApiClient::Admin::AsyncLeaderboardsClient.new(request_client: request_client)
|
|
53
59
|
@streaks = TrophyApiClient::Admin::AsyncStreaksClient.new(request_client: request_client)
|
|
60
|
+
@tenants = TrophyApiClient::Admin::AsyncTenantsClient.new(request_client: request_client)
|
|
54
61
|
@admin = TrophyApiClient::Admin::Points::AsyncClient.new(request_client: request_client)
|
|
55
62
|
end
|
|
56
63
|
end
|
|
@@ -40,6 +40,7 @@ module TrophyApiClient
|
|
|
40
40
|
response = @request_client.conn.get do |req|
|
|
41
41
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
|
42
42
|
req.headers["X-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
|
|
43
|
+
req.headers["Tenant-ID"] = request_options.tenant_id unless request_options&.tenant_id.nil?
|
|
43
44
|
req.headers = {
|
|
44
45
|
**(req.headers || {}),
|
|
45
46
|
**@request_client.get_headers,
|
|
@@ -74,6 +75,7 @@ module TrophyApiClient
|
|
|
74
75
|
response = @request_client.conn.post do |req|
|
|
75
76
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
|
76
77
|
req.headers["X-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
|
|
78
|
+
req.headers["Tenant-ID"] = request_options.tenant_id unless request_options&.tenant_id.nil?
|
|
77
79
|
req.headers = {
|
|
78
80
|
**(req.headers || {}),
|
|
79
81
|
**@request_client.get_headers,
|
|
@@ -105,6 +107,7 @@ module TrophyApiClient
|
|
|
105
107
|
response = @request_client.conn.delete do |req|
|
|
106
108
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
|
107
109
|
req.headers["X-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
|
|
110
|
+
req.headers["Tenant-ID"] = request_options.tenant_id unless request_options&.tenant_id.nil?
|
|
108
111
|
req.headers = {
|
|
109
112
|
**(req.headers || {}),
|
|
110
113
|
**@request_client.get_headers,
|
|
@@ -136,6 +139,7 @@ module TrophyApiClient
|
|
|
136
139
|
response = @request_client.conn.patch do |req|
|
|
137
140
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
|
138
141
|
req.headers["X-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
|
|
142
|
+
req.headers["Tenant-ID"] = request_options.tenant_id unless request_options&.tenant_id.nil?
|
|
139
143
|
req.headers = {
|
|
140
144
|
**(req.headers || {}),
|
|
141
145
|
**@request_client.get_headers,
|
|
@@ -166,6 +170,7 @@ module TrophyApiClient
|
|
|
166
170
|
response = @request_client.conn.get do |req|
|
|
167
171
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
|
168
172
|
req.headers["X-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
|
|
173
|
+
req.headers["Tenant-ID"] = request_options.tenant_id unless request_options&.tenant_id.nil?
|
|
169
174
|
req.headers = {
|
|
170
175
|
**(req.headers || {}),
|
|
171
176
|
**@request_client.get_headers,
|
|
@@ -211,6 +216,7 @@ module TrophyApiClient
|
|
|
211
216
|
response = @request_client.conn.get do |req|
|
|
212
217
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
|
213
218
|
req.headers["X-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
|
|
219
|
+
req.headers["Tenant-ID"] = request_options.tenant_id unless request_options&.tenant_id.nil?
|
|
214
220
|
req.headers = {
|
|
215
221
|
**(req.headers || {}),
|
|
216
222
|
**@request_client.get_headers,
|
|
@@ -251,6 +257,7 @@ module TrophyApiClient
|
|
|
251
257
|
response = @request_client.conn.post do |req|
|
|
252
258
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
|
253
259
|
req.headers["X-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
|
|
260
|
+
req.headers["Tenant-ID"] = request_options.tenant_id unless request_options&.tenant_id.nil?
|
|
254
261
|
req.headers = {
|
|
255
262
|
**(req.headers || {}),
|
|
256
263
|
**@request_client.get_headers,
|
|
@@ -284,6 +291,7 @@ module TrophyApiClient
|
|
|
284
291
|
response = @request_client.conn.delete do |req|
|
|
285
292
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
|
286
293
|
req.headers["X-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
|
|
294
|
+
req.headers["Tenant-ID"] = request_options.tenant_id unless request_options&.tenant_id.nil?
|
|
287
295
|
req.headers = {
|
|
288
296
|
**(req.headers || {}),
|
|
289
297
|
**@request_client.get_headers,
|
|
@@ -317,6 +325,7 @@ module TrophyApiClient
|
|
|
317
325
|
response = @request_client.conn.patch do |req|
|
|
318
326
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
|
319
327
|
req.headers["X-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
|
|
328
|
+
req.headers["Tenant-ID"] = request_options.tenant_id unless request_options&.tenant_id.nil?
|
|
320
329
|
req.headers = {
|
|
321
330
|
**(req.headers || {}),
|
|
322
331
|
**@request_client.get_headers,
|
|
@@ -349,6 +358,7 @@ module TrophyApiClient
|
|
|
349
358
|
response = @request_client.conn.get do |req|
|
|
350
359
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
|
351
360
|
req.headers["X-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
|
|
361
|
+
req.headers["Tenant-ID"] = request_options.tenant_id unless request_options&.tenant_id.nil?
|
|
352
362
|
req.headers = {
|
|
353
363
|
**(req.headers || {}),
|
|
354
364
|
**@request_client.get_headers,
|
|
@@ -40,6 +40,7 @@ module TrophyApiClient
|
|
|
40
40
|
response = @request_client.conn.get do |req|
|
|
41
41
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
|
42
42
|
req.headers["X-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
|
|
43
|
+
req.headers["Tenant-ID"] = request_options.tenant_id unless request_options&.tenant_id.nil?
|
|
43
44
|
req.headers = {
|
|
44
45
|
**(req.headers || {}),
|
|
45
46
|
**@request_client.get_headers,
|
|
@@ -74,6 +75,7 @@ module TrophyApiClient
|
|
|
74
75
|
response = @request_client.conn.post do |req|
|
|
75
76
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
|
76
77
|
req.headers["X-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
|
|
78
|
+
req.headers["Tenant-ID"] = request_options.tenant_id unless request_options&.tenant_id.nil?
|
|
77
79
|
req.headers = {
|
|
78
80
|
**(req.headers || {}),
|
|
79
81
|
**@request_client.get_headers,
|
|
@@ -104,6 +106,7 @@ module TrophyApiClient
|
|
|
104
106
|
response = @request_client.conn.delete do |req|
|
|
105
107
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
|
106
108
|
req.headers["X-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
|
|
109
|
+
req.headers["Tenant-ID"] = request_options.tenant_id unless request_options&.tenant_id.nil?
|
|
107
110
|
req.headers = {
|
|
108
111
|
**(req.headers || {}),
|
|
109
112
|
**@request_client.get_headers,
|
|
@@ -134,6 +137,7 @@ module TrophyApiClient
|
|
|
134
137
|
response = @request_client.conn.patch do |req|
|
|
135
138
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
|
136
139
|
req.headers["X-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
|
|
140
|
+
req.headers["Tenant-ID"] = request_options.tenant_id unless request_options&.tenant_id.nil?
|
|
137
141
|
req.headers = {
|
|
138
142
|
**(req.headers || {}),
|
|
139
143
|
**@request_client.get_headers,
|
|
@@ -164,6 +168,7 @@ module TrophyApiClient
|
|
|
164
168
|
response = @request_client.conn.get do |req|
|
|
165
169
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
|
166
170
|
req.headers["X-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
|
|
171
|
+
req.headers["Tenant-ID"] = request_options.tenant_id unless request_options&.tenant_id.nil?
|
|
167
172
|
req.headers = {
|
|
168
173
|
**(req.headers || {}),
|
|
169
174
|
**@request_client.get_headers,
|
|
@@ -209,6 +214,7 @@ module TrophyApiClient
|
|
|
209
214
|
response = @request_client.conn.get do |req|
|
|
210
215
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
|
211
216
|
req.headers["X-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
|
|
217
|
+
req.headers["Tenant-ID"] = request_options.tenant_id unless request_options&.tenant_id.nil?
|
|
212
218
|
req.headers = {
|
|
213
219
|
**(req.headers || {}),
|
|
214
220
|
**@request_client.get_headers,
|
|
@@ -249,6 +255,7 @@ module TrophyApiClient
|
|
|
249
255
|
response = @request_client.conn.post do |req|
|
|
250
256
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
|
251
257
|
req.headers["X-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
|
|
258
|
+
req.headers["Tenant-ID"] = request_options.tenant_id unless request_options&.tenant_id.nil?
|
|
252
259
|
req.headers = {
|
|
253
260
|
**(req.headers || {}),
|
|
254
261
|
**@request_client.get_headers,
|
|
@@ -281,6 +288,7 @@ module TrophyApiClient
|
|
|
281
288
|
response = @request_client.conn.delete do |req|
|
|
282
289
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
|
283
290
|
req.headers["X-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
|
|
291
|
+
req.headers["Tenant-ID"] = request_options.tenant_id unless request_options&.tenant_id.nil?
|
|
284
292
|
req.headers = {
|
|
285
293
|
**(req.headers || {}),
|
|
286
294
|
**@request_client.get_headers,
|
|
@@ -313,6 +321,7 @@ module TrophyApiClient
|
|
|
313
321
|
response = @request_client.conn.patch do |req|
|
|
314
322
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
|
315
323
|
req.headers["X-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
|
|
324
|
+
req.headers["Tenant-ID"] = request_options.tenant_id unless request_options&.tenant_id.nil?
|
|
316
325
|
req.headers = {
|
|
317
326
|
**(req.headers || {}),
|
|
318
327
|
**@request_client.get_headers,
|
|
@@ -345,6 +354,7 @@ module TrophyApiClient
|
|
|
345
354
|
response = @request_client.conn.get do |req|
|
|
346
355
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
|
347
356
|
req.headers["X-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
|
|
357
|
+
req.headers["Tenant-ID"] = request_options.tenant_id unless request_options&.tenant_id.nil?
|
|
348
358
|
req.headers = {
|
|
349
359
|
**(req.headers || {}),
|
|
350
360
|
**@request_client.get_headers,
|
|
@@ -46,6 +46,7 @@ module TrophyApiClient
|
|
|
46
46
|
response = @request_client.conn.get do |req|
|
|
47
47
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
|
48
48
|
req.headers["X-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
|
|
49
|
+
req.headers["Tenant-ID"] = request_options.tenant_id unless request_options&.tenant_id.nil?
|
|
49
50
|
req.headers = {
|
|
50
51
|
**(req.headers || {}),
|
|
51
52
|
**@request_client.get_headers,
|
|
@@ -86,6 +87,7 @@ module TrophyApiClient
|
|
|
86
87
|
response = @request_client.conn.post do |req|
|
|
87
88
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
|
88
89
|
req.headers["X-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
|
|
90
|
+
req.headers["Tenant-ID"] = request_options.tenant_id unless request_options&.tenant_id.nil?
|
|
89
91
|
req.headers = {
|
|
90
92
|
**(req.headers || {}),
|
|
91
93
|
**@request_client.get_headers,
|
|
@@ -118,6 +120,7 @@ module TrophyApiClient
|
|
|
118
120
|
response = @request_client.conn.delete do |req|
|
|
119
121
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
|
120
122
|
req.headers["X-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
|
|
123
|
+
req.headers["Tenant-ID"] = request_options.tenant_id unless request_options&.tenant_id.nil?
|
|
121
124
|
req.headers = {
|
|
122
125
|
**(req.headers || {}),
|
|
123
126
|
**@request_client.get_headers,
|
|
@@ -150,6 +153,7 @@ module TrophyApiClient
|
|
|
150
153
|
response = @request_client.conn.patch do |req|
|
|
151
154
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
|
152
155
|
req.headers["X-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
|
|
156
|
+
req.headers["Tenant-ID"] = request_options.tenant_id unless request_options&.tenant_id.nil?
|
|
153
157
|
req.headers = {
|
|
154
158
|
**(req.headers || {}),
|
|
155
159
|
**@request_client.get_headers,
|
|
@@ -182,6 +186,7 @@ module TrophyApiClient
|
|
|
182
186
|
response = @request_client.conn.get do |req|
|
|
183
187
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
|
184
188
|
req.headers["X-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
|
|
189
|
+
req.headers["Tenant-ID"] = request_options.tenant_id unless request_options&.tenant_id.nil?
|
|
185
190
|
req.headers = {
|
|
186
191
|
**(req.headers || {}),
|
|
187
192
|
**@request_client.get_headers,
|
|
@@ -233,6 +238,7 @@ module TrophyApiClient
|
|
|
233
238
|
response = @request_client.conn.get do |req|
|
|
234
239
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
|
235
240
|
req.headers["X-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
|
|
241
|
+
req.headers["Tenant-ID"] = request_options.tenant_id unless request_options&.tenant_id.nil?
|
|
236
242
|
req.headers = {
|
|
237
243
|
**(req.headers || {}),
|
|
238
244
|
**@request_client.get_headers,
|
|
@@ -275,6 +281,7 @@ module TrophyApiClient
|
|
|
275
281
|
response = @request_client.conn.post do |req|
|
|
276
282
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
|
277
283
|
req.headers["X-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
|
|
284
|
+
req.headers["Tenant-ID"] = request_options.tenant_id unless request_options&.tenant_id.nil?
|
|
278
285
|
req.headers = {
|
|
279
286
|
**(req.headers || {}),
|
|
280
287
|
**@request_client.get_headers,
|
|
@@ -309,6 +316,7 @@ module TrophyApiClient
|
|
|
309
316
|
response = @request_client.conn.delete do |req|
|
|
310
317
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
|
311
318
|
req.headers["X-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
|
|
319
|
+
req.headers["Tenant-ID"] = request_options.tenant_id unless request_options&.tenant_id.nil?
|
|
312
320
|
req.headers = {
|
|
313
321
|
**(req.headers || {}),
|
|
314
322
|
**@request_client.get_headers,
|
|
@@ -343,6 +351,7 @@ module TrophyApiClient
|
|
|
343
351
|
response = @request_client.conn.patch do |req|
|
|
344
352
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
|
345
353
|
req.headers["X-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
|
|
354
|
+
req.headers["Tenant-ID"] = request_options.tenant_id unless request_options&.tenant_id.nil?
|
|
346
355
|
req.headers = {
|
|
347
356
|
**(req.headers || {}),
|
|
348
357
|
**@request_client.get_headers,
|
|
@@ -377,6 +386,7 @@ module TrophyApiClient
|
|
|
377
386
|
response = @request_client.conn.get do |req|
|
|
378
387
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
|
379
388
|
req.headers["X-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
|
|
389
|
+
req.headers["Tenant-ID"] = request_options.tenant_id unless request_options&.tenant_id.nil?
|
|
380
390
|
req.headers = {
|
|
381
391
|
**(req.headers || {}),
|
|
382
392
|
**@request_client.get_headers,
|
|
@@ -46,6 +46,7 @@ module TrophyApiClient
|
|
|
46
46
|
response = @request_client.conn.get do |req|
|
|
47
47
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
|
48
48
|
req.headers["X-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
|
|
49
|
+
req.headers["Tenant-ID"] = request_options.tenant_id unless request_options&.tenant_id.nil?
|
|
49
50
|
req.headers = {
|
|
50
51
|
**(req.headers || {}),
|
|
51
52
|
**@request_client.get_headers,
|
|
@@ -86,6 +87,7 @@ module TrophyApiClient
|
|
|
86
87
|
response = @request_client.conn.post do |req|
|
|
87
88
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
|
88
89
|
req.headers["X-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
|
|
90
|
+
req.headers["Tenant-ID"] = request_options.tenant_id unless request_options&.tenant_id.nil?
|
|
89
91
|
req.headers = {
|
|
90
92
|
**(req.headers || {}),
|
|
91
93
|
**@request_client.get_headers,
|
|
@@ -118,6 +120,7 @@ module TrophyApiClient
|
|
|
118
120
|
response = @request_client.conn.delete do |req|
|
|
119
121
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
|
120
122
|
req.headers["X-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
|
|
123
|
+
req.headers["Tenant-ID"] = request_options.tenant_id unless request_options&.tenant_id.nil?
|
|
121
124
|
req.headers = {
|
|
122
125
|
**(req.headers || {}),
|
|
123
126
|
**@request_client.get_headers,
|
|
@@ -151,6 +154,7 @@ module TrophyApiClient
|
|
|
151
154
|
response = @request_client.conn.patch do |req|
|
|
152
155
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
|
153
156
|
req.headers["X-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
|
|
157
|
+
req.headers["Tenant-ID"] = request_options.tenant_id unless request_options&.tenant_id.nil?
|
|
154
158
|
req.headers = {
|
|
155
159
|
**(req.headers || {}),
|
|
156
160
|
**@request_client.get_headers,
|
|
@@ -183,6 +187,7 @@ module TrophyApiClient
|
|
|
183
187
|
response = @request_client.conn.get do |req|
|
|
184
188
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
|
185
189
|
req.headers["X-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
|
|
190
|
+
req.headers["Tenant-ID"] = request_options.tenant_id unless request_options&.tenant_id.nil?
|
|
186
191
|
req.headers = {
|
|
187
192
|
**(req.headers || {}),
|
|
188
193
|
**@request_client.get_headers,
|
|
@@ -234,6 +239,7 @@ module TrophyApiClient
|
|
|
234
239
|
response = @request_client.conn.get do |req|
|
|
235
240
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
|
236
241
|
req.headers["X-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
|
|
242
|
+
req.headers["Tenant-ID"] = request_options.tenant_id unless request_options&.tenant_id.nil?
|
|
237
243
|
req.headers = {
|
|
238
244
|
**(req.headers || {}),
|
|
239
245
|
**@request_client.get_headers,
|
|
@@ -276,6 +282,7 @@ module TrophyApiClient
|
|
|
276
282
|
response = @request_client.conn.post do |req|
|
|
277
283
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
|
278
284
|
req.headers["X-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
|
|
285
|
+
req.headers["Tenant-ID"] = request_options.tenant_id unless request_options&.tenant_id.nil?
|
|
279
286
|
req.headers = {
|
|
280
287
|
**(req.headers || {}),
|
|
281
288
|
**@request_client.get_headers,
|
|
@@ -310,6 +317,7 @@ module TrophyApiClient
|
|
|
310
317
|
response = @request_client.conn.delete do |req|
|
|
311
318
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
|
312
319
|
req.headers["X-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
|
|
320
|
+
req.headers["Tenant-ID"] = request_options.tenant_id unless request_options&.tenant_id.nil?
|
|
313
321
|
req.headers = {
|
|
314
322
|
**(req.headers || {}),
|
|
315
323
|
**@request_client.get_headers,
|
|
@@ -345,6 +353,7 @@ module TrophyApiClient
|
|
|
345
353
|
response = @request_client.conn.patch do |req|
|
|
346
354
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
|
347
355
|
req.headers["X-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
|
|
356
|
+
req.headers["Tenant-ID"] = request_options.tenant_id unless request_options&.tenant_id.nil?
|
|
348
357
|
req.headers = {
|
|
349
358
|
**(req.headers || {}),
|
|
350
359
|
**@request_client.get_headers,
|
|
@@ -379,6 +388,7 @@ module TrophyApiClient
|
|
|
379
388
|
response = @request_client.conn.get do |req|
|
|
380
389
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
|
381
390
|
req.headers["X-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
|
|
391
|
+
req.headers["Tenant-ID"] = request_options.tenant_id unless request_options&.tenant_id.nil?
|
|
382
392
|
req.headers = {
|
|
383
393
|
**(req.headers || {}),
|
|
384
394
|
**@request_client.get_headers,
|