SematextCloud 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +87 -65
- data/docs/AlertNotificationRequest.md +6 -6
- data/docs/AlertNotificationsApi.md +11 -11
- data/docs/AlertRule.md +50 -50
- data/docs/AlertRuleScheduleTimeRangeDto.md +4 -4
- data/docs/AlertRuleScheduleWeekdayDto.md +7 -7
- data/docs/AlertsApi.md +22 -22
- data/docs/App.md +33 -29
- data/docs/AppDescription.md +3 -3
- data/docs/AppMetadata.md +7 -7
- data/docs/AppsApi.md +23 -23
- data/docs/AwsSettingsControllerApi.md +7 -7
- data/docs/BasicAuthMethodDto.md +4 -4
- data/docs/BasicOrganizationDto.md +6 -6
- data/docs/BillingApi.md +18 -18
- data/docs/BillingInfo.md +5 -5
- data/docs/CloudWatchSettings.md +6 -6
- data/docs/CreateAppInfo.md +7 -7
- data/docs/CreateTokenDto.md +7 -0
- data/docs/DataSeriesFilter.md +5 -5
- data/docs/DataSeriesRequest.md +9 -9
- data/docs/Error.md +4 -4
- data/docs/FilterValue.md +8 -8
- data/docs/GenericApiResponse.md +6 -6
- data/docs/Invitation.md +12 -12
- data/docs/LogsAppApi.md +6 -6
- data/docs/MetricsApi.md +20 -20
- data/docs/MonitoringAppApi.md +6 -6
- data/docs/NotificationIntegration.md +12 -12
- data/docs/Plan.md +15 -15
- data/docs/ReportInfo.md +10 -10
- data/docs/ResetPasswordApi.md +6 -6
- data/docs/SavedQueriesApi.md +19 -19
- data/docs/SavedQuery.md +15 -15
- data/docs/ServiceIntegration.md +14 -14
- data/docs/SubscriptionDashboardDto.md +16 -0
- data/docs/SubscriptionDto.md +17 -0
- data/docs/SubscriptionsApi.md +468 -32
- data/docs/TagApiControllerApi.md +34 -34
- data/docs/TokensApiControllerApi.md +285 -0
- data/docs/UpdateAppInfo.md +11 -11
- data/docs/UpdateSubscriptionDto.md +6 -0
- data/docs/UpdateTokenDto.md +6 -0
- data/docs/UserInfo.md +3 -3
- data/docs/UserPermissions.md +5 -5
- data/docs/UserRole.md +5 -5
- data/lib/SematextCloud/api/subscriptions_api.rb +463 -17
- data/lib/SematextCloud/api/tokens_api_controller_api.rb +313 -0
- data/lib/SematextCloud/models/create_token_dto.rb +192 -0
- data/lib/SematextCloud/models/subscription_dashboard_dto.rb +319 -0
- data/lib/SematextCloud/models/subscription_dto.rb +328 -0
- data/lib/SematextCloud/models/update_subscription_dto.rb +183 -0
- data/lib/SematextCloud/models/update_token_dto.rb +183 -0
- data/lib/SematextCloud/version.rb +1 -1
- data/spec/api/tokens_api_controller_api_spec.rb +95 -0
- data/spec/models/create_token_dto_spec.rb +47 -0
- data/spec/models/subscription_dashboard_dto_spec.rb +109 -0
- data/spec/models/subscription_dto_spec.rb +115 -0
- data/spec/models/update_subscription_dto_spec.rb +41 -0
- data/spec/models/update_token_dto_spec.rb +41 -0
- metadata +53 -29
@@ -19,26 +19,194 @@ module SematextCloud
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
20
20
|
@api_client = api_client
|
21
21
|
end
|
22
|
-
#
|
22
|
+
# Create App subscription
|
23
23
|
# @param app_id appId
|
24
|
+
# @param subscription subscription
|
24
25
|
# @param [Hash] opts the optional parameters
|
25
26
|
# @return [GenericApiResponse]
|
26
|
-
def
|
27
|
-
data, _status_code, _headers =
|
27
|
+
def create_for_app_using_post(app_id, subscription, opts = {})
|
28
|
+
data, _status_code, _headers = create_for_app_using_post_with_http_info(app_id, subscription, opts)
|
28
29
|
data
|
29
30
|
end
|
30
31
|
|
31
|
-
#
|
32
|
+
# Create App subscription
|
32
33
|
# @param app_id appId
|
34
|
+
# @param subscription subscription
|
33
35
|
# @param [Hash] opts the optional parameters
|
34
36
|
# @return [Array<(GenericApiResponse, Fixnum, Hash)>] GenericApiResponse data, response status code and response headers
|
35
|
-
def
|
37
|
+
def create_for_app_using_post_with_http_info(app_id, subscription, opts = {})
|
36
38
|
if @api_client.config.debugging
|
37
|
-
@api_client.config.logger.debug 'Calling API: SubscriptionsApi.
|
39
|
+
@api_client.config.logger.debug 'Calling API: SubscriptionsApi.create_for_app_using_post ...'
|
38
40
|
end
|
39
41
|
# verify the required parameter 'app_id' is set
|
40
42
|
if @api_client.config.client_side_validation && app_id.nil?
|
41
|
-
fail ArgumentError, "Missing the required parameter 'app_id' when calling SubscriptionsApi.
|
43
|
+
fail ArgumentError, "Missing the required parameter 'app_id' when calling SubscriptionsApi.create_for_app_using_post"
|
44
|
+
end
|
45
|
+
# verify the required parameter 'subscription' is set
|
46
|
+
if @api_client.config.client_side_validation && subscription.nil?
|
47
|
+
fail ArgumentError, "Missing the required parameter 'subscription' when calling SubscriptionsApi.create_for_app_using_post"
|
48
|
+
end
|
49
|
+
# resource path
|
50
|
+
local_var_path = '/users-web/api/v3/apps/{appId}/subscription'.sub('{' + 'appId' + '}', app_id.to_s)
|
51
|
+
|
52
|
+
# query parameters
|
53
|
+
query_params = {}
|
54
|
+
|
55
|
+
# header parameters
|
56
|
+
header_params = {}
|
57
|
+
# HTTP header 'Accept' (if needed)
|
58
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
59
|
+
# HTTP header 'Content-Type'
|
60
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
61
|
+
|
62
|
+
# form parameters
|
63
|
+
form_params = {}
|
64
|
+
|
65
|
+
# http body (model)
|
66
|
+
post_body = @api_client.object_to_http_body(subscription)
|
67
|
+
auth_names = ['api_key']
|
68
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
69
|
+
:header_params => header_params,
|
70
|
+
:query_params => query_params,
|
71
|
+
:form_params => form_params,
|
72
|
+
:body => post_body,
|
73
|
+
:auth_names => auth_names,
|
74
|
+
:return_type => 'GenericApiResponse')
|
75
|
+
if @api_client.config.debugging
|
76
|
+
@api_client.config.logger.debug "API called: SubscriptionsApi#create_for_app_using_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
77
|
+
end
|
78
|
+
return data, status_code, headers
|
79
|
+
end
|
80
|
+
# Create dashboard subscription
|
81
|
+
# @param dash_id dashId
|
82
|
+
# @param subscription subscription
|
83
|
+
# @param [Hash] opts the optional parameters
|
84
|
+
# @return [GenericApiResponse]
|
85
|
+
def create_for_dash_using_post1(dash_id, subscription, opts = {})
|
86
|
+
data, _status_code, _headers = create_for_dash_using_post1_with_http_info(dash_id, subscription, opts)
|
87
|
+
data
|
88
|
+
end
|
89
|
+
|
90
|
+
# Create dashboard subscription
|
91
|
+
# @param dash_id dashId
|
92
|
+
# @param subscription subscription
|
93
|
+
# @param [Hash] opts the optional parameters
|
94
|
+
# @return [Array<(GenericApiResponse, Fixnum, Hash)>] GenericApiResponse data, response status code and response headers
|
95
|
+
def create_for_dash_using_post1_with_http_info(dash_id, subscription, opts = {})
|
96
|
+
if @api_client.config.debugging
|
97
|
+
@api_client.config.logger.debug 'Calling API: SubscriptionsApi.create_for_dash_using_post1 ...'
|
98
|
+
end
|
99
|
+
# verify the required parameter 'dash_id' is set
|
100
|
+
if @api_client.config.client_side_validation && dash_id.nil?
|
101
|
+
fail ArgumentError, "Missing the required parameter 'dash_id' when calling SubscriptionsApi.create_for_dash_using_post1"
|
102
|
+
end
|
103
|
+
# verify the required parameter 'subscription' is set
|
104
|
+
if @api_client.config.client_side_validation && subscription.nil?
|
105
|
+
fail ArgumentError, "Missing the required parameter 'subscription' when calling SubscriptionsApi.create_for_dash_using_post1"
|
106
|
+
end
|
107
|
+
# resource path
|
108
|
+
local_var_path = '/users-web/api/v3/dashboards/{dashId}/subscription'.sub('{' + 'dashId' + '}', dash_id.to_s)
|
109
|
+
|
110
|
+
# query parameters
|
111
|
+
query_params = {}
|
112
|
+
|
113
|
+
# header parameters
|
114
|
+
header_params = {}
|
115
|
+
# HTTP header 'Accept' (if needed)
|
116
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
117
|
+
# HTTP header 'Content-Type'
|
118
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
119
|
+
|
120
|
+
# form parameters
|
121
|
+
form_params = {}
|
122
|
+
|
123
|
+
# http body (model)
|
124
|
+
post_body = @api_client.object_to_http_body(subscription)
|
125
|
+
auth_names = ['api_key']
|
126
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
127
|
+
:header_params => header_params,
|
128
|
+
:query_params => query_params,
|
129
|
+
:form_params => form_params,
|
130
|
+
:body => post_body,
|
131
|
+
:auth_names => auth_names,
|
132
|
+
:return_type => 'GenericApiResponse')
|
133
|
+
if @api_client.config.debugging
|
134
|
+
@api_client.config.logger.debug "API called: SubscriptionsApi#create_for_dash_using_post1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
135
|
+
end
|
136
|
+
return data, status_code, headers
|
137
|
+
end
|
138
|
+
# Delete subscription
|
139
|
+
# @param updateable_subscription_id updateableSubscriptionId
|
140
|
+
# @param [Hash] opts the optional parameters
|
141
|
+
# @return [GenericApiResponse]
|
142
|
+
def delete_using_delete2(updateable_subscription_id, opts = {})
|
143
|
+
data, _status_code, _headers = delete_using_delete2_with_http_info(updateable_subscription_id, opts)
|
144
|
+
data
|
145
|
+
end
|
146
|
+
|
147
|
+
# Delete subscription
|
148
|
+
# @param updateable_subscription_id updateableSubscriptionId
|
149
|
+
# @param [Hash] opts the optional parameters
|
150
|
+
# @return [Array<(GenericApiResponse, Fixnum, Hash)>] GenericApiResponse data, response status code and response headers
|
151
|
+
def delete_using_delete2_with_http_info(updateable_subscription_id, opts = {})
|
152
|
+
if @api_client.config.debugging
|
153
|
+
@api_client.config.logger.debug 'Calling API: SubscriptionsApi.delete_using_delete2 ...'
|
154
|
+
end
|
155
|
+
# verify the required parameter 'updateable_subscription_id' is set
|
156
|
+
if @api_client.config.client_side_validation && updateable_subscription_id.nil?
|
157
|
+
fail ArgumentError, "Missing the required parameter 'updateable_subscription_id' when calling SubscriptionsApi.delete_using_delete2"
|
158
|
+
end
|
159
|
+
# resource path
|
160
|
+
local_var_path = '/users-web/api/v3/subscriptions/{updateableSubscriptionId}'.sub('{' + 'updateableSubscriptionId' + '}', updateable_subscription_id.to_s)
|
161
|
+
|
162
|
+
# query parameters
|
163
|
+
query_params = {}
|
164
|
+
|
165
|
+
# header parameters
|
166
|
+
header_params = {}
|
167
|
+
# HTTP header 'Accept' (if needed)
|
168
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
169
|
+
# HTTP header 'Content-Type'
|
170
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
171
|
+
|
172
|
+
# form parameters
|
173
|
+
form_params = {}
|
174
|
+
|
175
|
+
# http body (model)
|
176
|
+
post_body = nil
|
177
|
+
auth_names = ['api_key']
|
178
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
179
|
+
:header_params => header_params,
|
180
|
+
:query_params => query_params,
|
181
|
+
:form_params => form_params,
|
182
|
+
:body => post_body,
|
183
|
+
:auth_names => auth_names,
|
184
|
+
:return_type => 'GenericApiResponse')
|
185
|
+
if @api_client.config.debugging
|
186
|
+
@api_client.config.logger.debug "API called: SubscriptionsApi#delete_using_delete2\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
187
|
+
end
|
188
|
+
return data, status_code, headers
|
189
|
+
end
|
190
|
+
# Get subscriptions for an App
|
191
|
+
# @param app_id appId
|
192
|
+
# @param [Hash] opts the optional parameters
|
193
|
+
# @return [GenericApiResponse]
|
194
|
+
def list_using_get2(app_id, opts = {})
|
195
|
+
data, _status_code, _headers = list_using_get2_with_http_info(app_id, opts)
|
196
|
+
data
|
197
|
+
end
|
198
|
+
|
199
|
+
# Get subscriptions for an App
|
200
|
+
# @param app_id appId
|
201
|
+
# @param [Hash] opts the optional parameters
|
202
|
+
# @return [Array<(GenericApiResponse, Fixnum, Hash)>] GenericApiResponse data, response status code and response headers
|
203
|
+
def list_using_get2_with_http_info(app_id, opts = {})
|
204
|
+
if @api_client.config.debugging
|
205
|
+
@api_client.config.logger.debug 'Calling API: SubscriptionsApi.list_using_get2 ...'
|
206
|
+
end
|
207
|
+
# verify the required parameter 'app_id' is set
|
208
|
+
if @api_client.config.client_side_validation && app_id.nil?
|
209
|
+
fail ArgumentError, "Missing the required parameter 'app_id' when calling SubscriptionsApi.list_using_get2"
|
42
210
|
end
|
43
211
|
# resource path
|
44
212
|
local_var_path = '/users-web/api/v3/apps/{appId}/subscriptions'.sub('{' + 'appId' + '}', app_id.to_s)
|
@@ -67,36 +235,82 @@ module SematextCloud
|
|
67
235
|
:auth_names => auth_names,
|
68
236
|
:return_type => 'GenericApiResponse')
|
69
237
|
if @api_client.config.debugging
|
70
|
-
@api_client.config.logger.debug "API called: SubscriptionsApi#
|
238
|
+
@api_client.config.logger.debug "API called: SubscriptionsApi#list_using_get2\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
71
239
|
end
|
72
240
|
return data, status_code, headers
|
73
241
|
end
|
74
|
-
#
|
242
|
+
# Get current account's subscriptions
|
243
|
+
# @param [Hash] opts the optional parameters
|
244
|
+
# @return [GenericApiResponse]
|
245
|
+
def list_using_get5(opts = {})
|
246
|
+
data, _status_code, _headers = list_using_get5_with_http_info(opts)
|
247
|
+
data
|
248
|
+
end
|
249
|
+
|
250
|
+
# Get current account's subscriptions
|
251
|
+
# @param [Hash] opts the optional parameters
|
252
|
+
# @return [Array<(GenericApiResponse, Fixnum, Hash)>] GenericApiResponse data, response status code and response headers
|
253
|
+
def list_using_get5_with_http_info(opts = {})
|
254
|
+
if @api_client.config.debugging
|
255
|
+
@api_client.config.logger.debug 'Calling API: SubscriptionsApi.list_using_get5 ...'
|
256
|
+
end
|
257
|
+
# resource path
|
258
|
+
local_var_path = '/users-web/api/v3/subscriptions'
|
259
|
+
|
260
|
+
# query parameters
|
261
|
+
query_params = {}
|
262
|
+
|
263
|
+
# header parameters
|
264
|
+
header_params = {}
|
265
|
+
# HTTP header 'Accept' (if needed)
|
266
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
267
|
+
# HTTP header 'Content-Type'
|
268
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
269
|
+
|
270
|
+
# form parameters
|
271
|
+
form_params = {}
|
272
|
+
|
273
|
+
# http body (model)
|
274
|
+
post_body = nil
|
275
|
+
auth_names = ['api_key']
|
276
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
277
|
+
:header_params => header_params,
|
278
|
+
:query_params => query_params,
|
279
|
+
:form_params => form_params,
|
280
|
+
:body => post_body,
|
281
|
+
:auth_names => auth_names,
|
282
|
+
:return_type => 'GenericApiResponse')
|
283
|
+
if @api_client.config.debugging
|
284
|
+
@api_client.config.logger.debug "API called: SubscriptionsApi#list_using_get5\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
285
|
+
end
|
286
|
+
return data, status_code, headers
|
287
|
+
end
|
288
|
+
# Email an App report
|
75
289
|
# @param app_id appId
|
76
290
|
# @param email_dto emailDto
|
77
291
|
# @param [Hash] opts the optional parameters
|
78
292
|
# @return [GenericApiResponse]
|
79
|
-
def
|
80
|
-
data, _status_code, _headers =
|
293
|
+
def send_app_report_using_post1(app_id, email_dto, opts = {})
|
294
|
+
data, _status_code, _headers = send_app_report_using_post1_with_http_info(app_id, email_dto, opts)
|
81
295
|
data
|
82
296
|
end
|
83
297
|
|
84
|
-
#
|
298
|
+
# Email an App report
|
85
299
|
# @param app_id appId
|
86
300
|
# @param email_dto emailDto
|
87
301
|
# @param [Hash] opts the optional parameters
|
88
302
|
# @return [Array<(GenericApiResponse, Fixnum, Hash)>] GenericApiResponse data, response status code and response headers
|
89
|
-
def
|
303
|
+
def send_app_report_using_post1_with_http_info(app_id, email_dto, opts = {})
|
90
304
|
if @api_client.config.debugging
|
91
|
-
@api_client.config.logger.debug 'Calling API: SubscriptionsApi.
|
305
|
+
@api_client.config.logger.debug 'Calling API: SubscriptionsApi.send_app_report_using_post1 ...'
|
92
306
|
end
|
93
307
|
# verify the required parameter 'app_id' is set
|
94
308
|
if @api_client.config.client_side_validation && app_id.nil?
|
95
|
-
fail ArgumentError, "Missing the required parameter 'app_id' when calling SubscriptionsApi.
|
309
|
+
fail ArgumentError, "Missing the required parameter 'app_id' when calling SubscriptionsApi.send_app_report_using_post1"
|
96
310
|
end
|
97
311
|
# verify the required parameter 'email_dto' is set
|
98
312
|
if @api_client.config.client_side_validation && email_dto.nil?
|
99
|
-
fail ArgumentError, "Missing the required parameter 'email_dto' when calling SubscriptionsApi.
|
313
|
+
fail ArgumentError, "Missing the required parameter 'email_dto' when calling SubscriptionsApi.send_app_report_using_post1"
|
100
314
|
end
|
101
315
|
# resource path
|
102
316
|
local_var_path = '/users-web/api/v3/apps/{appId}/report/send'.sub('{' + 'appId' + '}', app_id.to_s)
|
@@ -125,7 +339,239 @@ module SematextCloud
|
|
125
339
|
:auth_names => auth_names,
|
126
340
|
:return_type => 'GenericApiResponse')
|
127
341
|
if @api_client.config.debugging
|
128
|
-
@api_client.config.logger.debug "API called: SubscriptionsApi#
|
342
|
+
@api_client.config.logger.debug "API called: SubscriptionsApi#send_app_report_using_post1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
343
|
+
end
|
344
|
+
return data, status_code, headers
|
345
|
+
end
|
346
|
+
# Email a dashboard report
|
347
|
+
# @param dash_id dashId
|
348
|
+
# @param email_dto emailDto
|
349
|
+
# @param [Hash] opts the optional parameters
|
350
|
+
# @return [GenericApiResponse]
|
351
|
+
def send_dash_report_using_post1(dash_id, email_dto, opts = {})
|
352
|
+
data, _status_code, _headers = send_dash_report_using_post1_with_http_info(dash_id, email_dto, opts)
|
353
|
+
data
|
354
|
+
end
|
355
|
+
|
356
|
+
# Email a dashboard report
|
357
|
+
# @param dash_id dashId
|
358
|
+
# @param email_dto emailDto
|
359
|
+
# @param [Hash] opts the optional parameters
|
360
|
+
# @return [Array<(GenericApiResponse, Fixnum, Hash)>] GenericApiResponse data, response status code and response headers
|
361
|
+
def send_dash_report_using_post1_with_http_info(dash_id, email_dto, opts = {})
|
362
|
+
if @api_client.config.debugging
|
363
|
+
@api_client.config.logger.debug 'Calling API: SubscriptionsApi.send_dash_report_using_post1 ...'
|
364
|
+
end
|
365
|
+
# verify the required parameter 'dash_id' is set
|
366
|
+
if @api_client.config.client_side_validation && dash_id.nil?
|
367
|
+
fail ArgumentError, "Missing the required parameter 'dash_id' when calling SubscriptionsApi.send_dash_report_using_post1"
|
368
|
+
end
|
369
|
+
# verify the required parameter 'email_dto' is set
|
370
|
+
if @api_client.config.client_side_validation && email_dto.nil?
|
371
|
+
fail ArgumentError, "Missing the required parameter 'email_dto' when calling SubscriptionsApi.send_dash_report_using_post1"
|
372
|
+
end
|
373
|
+
# resource path
|
374
|
+
local_var_path = '/users-web/api/v3/dashboards/{dashId}/report/send'.sub('{' + 'dashId' + '}', dash_id.to_s)
|
375
|
+
|
376
|
+
# query parameters
|
377
|
+
query_params = {}
|
378
|
+
|
379
|
+
# header parameters
|
380
|
+
header_params = {}
|
381
|
+
# HTTP header 'Accept' (if needed)
|
382
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
383
|
+
# HTTP header 'Content-Type'
|
384
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
385
|
+
|
386
|
+
# form parameters
|
387
|
+
form_params = {}
|
388
|
+
|
389
|
+
# http body (model)
|
390
|
+
post_body = @api_client.object_to_http_body(email_dto)
|
391
|
+
auth_names = ['api_key']
|
392
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
393
|
+
:header_params => header_params,
|
394
|
+
:query_params => query_params,
|
395
|
+
:form_params => form_params,
|
396
|
+
:body => post_body,
|
397
|
+
:auth_names => auth_names,
|
398
|
+
:return_type => 'GenericApiResponse')
|
399
|
+
if @api_client.config.debugging
|
400
|
+
@api_client.config.logger.debug "API called: SubscriptionsApi#send_dash_report_using_post1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
401
|
+
end
|
402
|
+
return data, status_code, headers
|
403
|
+
end
|
404
|
+
# Toggle subscription status
|
405
|
+
# @param updateable_subscription_id updateableSubscriptionId
|
406
|
+
# @param dto dto
|
407
|
+
# @param [Hash] opts the optional parameters
|
408
|
+
# @return [GenericApiResponse]
|
409
|
+
def toggle_enabled_using_put1(updateable_subscription_id, dto, opts = {})
|
410
|
+
data, _status_code, _headers = toggle_enabled_using_put1_with_http_info(updateable_subscription_id, dto, opts)
|
411
|
+
data
|
412
|
+
end
|
413
|
+
|
414
|
+
# Toggle subscription status
|
415
|
+
# @param updateable_subscription_id updateableSubscriptionId
|
416
|
+
# @param dto dto
|
417
|
+
# @param [Hash] opts the optional parameters
|
418
|
+
# @return [Array<(GenericApiResponse, Fixnum, Hash)>] GenericApiResponse data, response status code and response headers
|
419
|
+
def toggle_enabled_using_put1_with_http_info(updateable_subscription_id, dto, opts = {})
|
420
|
+
if @api_client.config.debugging
|
421
|
+
@api_client.config.logger.debug 'Calling API: SubscriptionsApi.toggle_enabled_using_put1 ...'
|
422
|
+
end
|
423
|
+
# verify the required parameter 'updateable_subscription_id' is set
|
424
|
+
if @api_client.config.client_side_validation && updateable_subscription_id.nil?
|
425
|
+
fail ArgumentError, "Missing the required parameter 'updateable_subscription_id' when calling SubscriptionsApi.toggle_enabled_using_put1"
|
426
|
+
end
|
427
|
+
# verify the required parameter 'dto' is set
|
428
|
+
if @api_client.config.client_side_validation && dto.nil?
|
429
|
+
fail ArgumentError, "Missing the required parameter 'dto' when calling SubscriptionsApi.toggle_enabled_using_put1"
|
430
|
+
end
|
431
|
+
# resource path
|
432
|
+
local_var_path = '/users-web/api/v3/subscriptions/{updateableSubscriptionId}'.sub('{' + 'updateableSubscriptionId' + '}', updateable_subscription_id.to_s)
|
433
|
+
|
434
|
+
# query parameters
|
435
|
+
query_params = {}
|
436
|
+
|
437
|
+
# header parameters
|
438
|
+
header_params = {}
|
439
|
+
# HTTP header 'Accept' (if needed)
|
440
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
441
|
+
# HTTP header 'Content-Type'
|
442
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
443
|
+
|
444
|
+
# form parameters
|
445
|
+
form_params = {}
|
446
|
+
|
447
|
+
# http body (model)
|
448
|
+
post_body = @api_client.object_to_http_body(dto)
|
449
|
+
auth_names = ['api_key']
|
450
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
451
|
+
:header_params => header_params,
|
452
|
+
:query_params => query_params,
|
453
|
+
:form_params => form_params,
|
454
|
+
:body => post_body,
|
455
|
+
:auth_names => auth_names,
|
456
|
+
:return_type => 'GenericApiResponse')
|
457
|
+
if @api_client.config.debugging
|
458
|
+
@api_client.config.logger.debug "API called: SubscriptionsApi#toggle_enabled_using_put1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
459
|
+
end
|
460
|
+
return data, status_code, headers
|
461
|
+
end
|
462
|
+
# Update App subscription
|
463
|
+
# @param app_id appId
|
464
|
+
# @param subscription subscription
|
465
|
+
# @param [Hash] opts the optional parameters
|
466
|
+
# @return [GenericApiResponse]
|
467
|
+
def update_for_app_using_put1(app_id, subscription, opts = {})
|
468
|
+
data, _status_code, _headers = update_for_app_using_put1_with_http_info(app_id, subscription, opts)
|
469
|
+
data
|
470
|
+
end
|
471
|
+
|
472
|
+
# Update App subscription
|
473
|
+
# @param app_id appId
|
474
|
+
# @param subscription subscription
|
475
|
+
# @param [Hash] opts the optional parameters
|
476
|
+
# @return [Array<(GenericApiResponse, Fixnum, Hash)>] GenericApiResponse data, response status code and response headers
|
477
|
+
def update_for_app_using_put1_with_http_info(app_id, subscription, opts = {})
|
478
|
+
if @api_client.config.debugging
|
479
|
+
@api_client.config.logger.debug 'Calling API: SubscriptionsApi.update_for_app_using_put1 ...'
|
480
|
+
end
|
481
|
+
# verify the required parameter 'app_id' is set
|
482
|
+
if @api_client.config.client_side_validation && app_id.nil?
|
483
|
+
fail ArgumentError, "Missing the required parameter 'app_id' when calling SubscriptionsApi.update_for_app_using_put1"
|
484
|
+
end
|
485
|
+
# verify the required parameter 'subscription' is set
|
486
|
+
if @api_client.config.client_side_validation && subscription.nil?
|
487
|
+
fail ArgumentError, "Missing the required parameter 'subscription' when calling SubscriptionsApi.update_for_app_using_put1"
|
488
|
+
end
|
489
|
+
# resource path
|
490
|
+
local_var_path = '/users-web/api/v3/apps/{appId}/subscription'.sub('{' + 'appId' + '}', app_id.to_s)
|
491
|
+
|
492
|
+
# query parameters
|
493
|
+
query_params = {}
|
494
|
+
|
495
|
+
# header parameters
|
496
|
+
header_params = {}
|
497
|
+
# HTTP header 'Accept' (if needed)
|
498
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
499
|
+
# HTTP header 'Content-Type'
|
500
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
501
|
+
|
502
|
+
# form parameters
|
503
|
+
form_params = {}
|
504
|
+
|
505
|
+
# http body (model)
|
506
|
+
post_body = @api_client.object_to_http_body(subscription)
|
507
|
+
auth_names = ['api_key']
|
508
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
509
|
+
:header_params => header_params,
|
510
|
+
:query_params => query_params,
|
511
|
+
:form_params => form_params,
|
512
|
+
:body => post_body,
|
513
|
+
:auth_names => auth_names,
|
514
|
+
:return_type => 'GenericApiResponse')
|
515
|
+
if @api_client.config.debugging
|
516
|
+
@api_client.config.logger.debug "API called: SubscriptionsApi#update_for_app_using_put1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
517
|
+
end
|
518
|
+
return data, status_code, headers
|
519
|
+
end
|
520
|
+
# Update dashboard subscription
|
521
|
+
# @param dash_id dashId
|
522
|
+
# @param subscription subscription
|
523
|
+
# @param [Hash] opts the optional parameters
|
524
|
+
# @return [GenericApiResponse]
|
525
|
+
def update_for_dash_using_put(dash_id, subscription, opts = {})
|
526
|
+
data, _status_code, _headers = update_for_dash_using_put_with_http_info(dash_id, subscription, opts)
|
527
|
+
data
|
528
|
+
end
|
529
|
+
|
530
|
+
# Update dashboard subscription
|
531
|
+
# @param dash_id dashId
|
532
|
+
# @param subscription subscription
|
533
|
+
# @param [Hash] opts the optional parameters
|
534
|
+
# @return [Array<(GenericApiResponse, Fixnum, Hash)>] GenericApiResponse data, response status code and response headers
|
535
|
+
def update_for_dash_using_put_with_http_info(dash_id, subscription, opts = {})
|
536
|
+
if @api_client.config.debugging
|
537
|
+
@api_client.config.logger.debug 'Calling API: SubscriptionsApi.update_for_dash_using_put ...'
|
538
|
+
end
|
539
|
+
# verify the required parameter 'dash_id' is set
|
540
|
+
if @api_client.config.client_side_validation && dash_id.nil?
|
541
|
+
fail ArgumentError, "Missing the required parameter 'dash_id' when calling SubscriptionsApi.update_for_dash_using_put"
|
542
|
+
end
|
543
|
+
# verify the required parameter 'subscription' is set
|
544
|
+
if @api_client.config.client_side_validation && subscription.nil?
|
545
|
+
fail ArgumentError, "Missing the required parameter 'subscription' when calling SubscriptionsApi.update_for_dash_using_put"
|
546
|
+
end
|
547
|
+
# resource path
|
548
|
+
local_var_path = '/users-web/api/v3/dashboards/{dashId}/subscription'.sub('{' + 'dashId' + '}', dash_id.to_s)
|
549
|
+
|
550
|
+
# query parameters
|
551
|
+
query_params = {}
|
552
|
+
|
553
|
+
# header parameters
|
554
|
+
header_params = {}
|
555
|
+
# HTTP header 'Accept' (if needed)
|
556
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
557
|
+
# HTTP header 'Content-Type'
|
558
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
559
|
+
|
560
|
+
# form parameters
|
561
|
+
form_params = {}
|
562
|
+
|
563
|
+
# http body (model)
|
564
|
+
post_body = @api_client.object_to_http_body(subscription)
|
565
|
+
auth_names = ['api_key']
|
566
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
567
|
+
:header_params => header_params,
|
568
|
+
:query_params => query_params,
|
569
|
+
:form_params => form_params,
|
570
|
+
:body => post_body,
|
571
|
+
:auth_names => auth_names,
|
572
|
+
:return_type => 'GenericApiResponse')
|
573
|
+
if @api_client.config.debugging
|
574
|
+
@api_client.config.logger.debug "API called: SubscriptionsApi#update_for_dash_using_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
129
575
|
end
|
130
576
|
return data, status_code, headers
|
131
577
|
end
|