Class: stcloud::SubscriptionsApi

Inherits:
Object
  • Object
show all
Defined in:
lib/stcloud/api/subscriptions_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ SubscriptionsApi



16
17
18
# File 'lib/stcloud/api/subscriptions_api.rb', line 16

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



14
15
16
# File 'lib/stcloud/api/subscriptions_api.rb', line 14

def api_client
  @api_client
end

Instance Method Details

#create_for_app_using_post1(body, app_id, opts = {}) ⇒ SubscriptionResponse

Create App subscription



24
25
26
27
# File 'lib/stcloud/api/subscriptions_api.rb', line 24

def create_for_app_using_post1(body, app_id, opts = {})
  data, _status_code, _headers = create_for_app_using_post1_with_http_info(body, app_id, opts)
  data
end

#create_for_app_using_post1_with_http_info(body, app_id, opts = {}) ⇒ Array<(SubscriptionResponse, Integer, Hash)>

Create App subscription



34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# File 'lib/stcloud/api/subscriptions_api.rb', line 34

def create_for_app_using_post1_with_http_info(body, app_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: SubscriptionsApi.create_for_app_using_post1 ...'
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling SubscriptionsApi.create_for_app_using_post1"
  end
  # verify the required parameter 'app_id' is set
  if @api_client.config.client_side_validation && app_id.nil?
    fail ArgumentError, "Missing the required parameter 'app_id' when calling SubscriptionsApi.create_for_app_using_post1"
  end
  # resource path
  local_var_path = '/users-web/api/v3/apps/{appId}/subscription'.sub('{' + 'appId' + '}', app_id.to_s)

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(body) 

  return_type = opts[:return_type] || 'SubscriptionResponse' 

  auth_names = opts[:auth_names] || ['api_key']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SubscriptionsApi#create_for_app_using_post1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_for_dash_using_post1(body, dash_id, opts = {}) ⇒ SubscriptionResponse

Create dashboard subscription



86
87
88
89
# File 'lib/stcloud/api/subscriptions_api.rb', line 86

def create_for_dash_using_post1(body, dash_id, opts = {})
  data, _status_code, _headers = create_for_dash_using_post1_with_http_info(body, dash_id, opts)
  data
end

#create_for_dash_using_post1_with_http_info(body, dash_id, opts = {}) ⇒ Array<(SubscriptionResponse, Integer, Hash)>

Create dashboard subscription



96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
# File 'lib/stcloud/api/subscriptions_api.rb', line 96

def create_for_dash_using_post1_with_http_info(body, dash_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: SubscriptionsApi.create_for_dash_using_post1 ...'
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling SubscriptionsApi.create_for_dash_using_post1"
  end
  # verify the required parameter 'dash_id' is set
  if @api_client.config.client_side_validation && dash_id.nil?
    fail ArgumentError, "Missing the required parameter 'dash_id' when calling SubscriptionsApi.create_for_dash_using_post1"
  end
  # resource path
  local_var_path = '/users-web/api/v3/dashboards/{dashId}/subscription'.sub('{' + 'dashId' + '}', dash_id.to_s)

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(body) 

  return_type = opts[:return_type] || 'SubscriptionResponse' 

  auth_names = opts[:auth_names] || ['api_key']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SubscriptionsApi#create_for_dash_using_post1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_using_delete3(updateable_subscription_id, opts = {}) ⇒ GenericMapBasedApiResponse

Delete subscription



147
148
149
150
# File 'lib/stcloud/api/subscriptions_api.rb', line 147

def delete_using_delete3(updateable_subscription_id, opts = {})
  data, _status_code, _headers = delete_using_delete3_with_http_info(updateable_subscription_id, opts)
  data
end

#delete_using_delete3_with_http_info(updateable_subscription_id, opts = {}) ⇒ Array<(GenericMapBasedApiResponse, Integer, Hash)>

Delete subscription



156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
# File 'lib/stcloud/api/subscriptions_api.rb', line 156

def delete_using_delete3_with_http_info(updateable_subscription_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: SubscriptionsApi.delete_using_delete3 ...'
  end
  # verify the required parameter 'updateable_subscription_id' is set
  if @api_client.config.client_side_validation && updateable_subscription_id.nil?
    fail ArgumentError, "Missing the required parameter 'updateable_subscription_id' when calling SubscriptionsApi.delete_using_delete3"
  end
  # resource path
  local_var_path = '/users-web/api/v3/subscriptions/{updateableSubscriptionId}'.sub('{' + 'updateableSubscriptionId' + '}', updateable_subscription_id.to_s)

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  return_type = opts[:return_type] || 'GenericMapBasedApiResponse' 

  auth_names = opts[:auth_names] || ['api_key']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SubscriptionsApi#delete_using_delete3\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_using_get3(app_id, opts = {}) ⇒ SubscriptionsResponse

Get subscriptions for an App



201
202
203
204
# File 'lib/stcloud/api/subscriptions_api.rb', line 201

def list_using_get3(app_id, opts = {})
  data, _status_code, _headers = list_using_get3_with_http_info(app_id, opts)
  data
end

#list_using_get3_with_http_info(app_id, opts = {}) ⇒ Array<(SubscriptionsResponse, Integer, Hash)>

Get subscriptions for an App



210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
# File 'lib/stcloud/api/subscriptions_api.rb', line 210

def list_using_get3_with_http_info(app_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: SubscriptionsApi.list_using_get3 ...'
  end
  # verify the required parameter 'app_id' is set
  if @api_client.config.client_side_validation && app_id.nil?
    fail ArgumentError, "Missing the required parameter 'app_id' when calling SubscriptionsApi.list_using_get3"
  end
  # resource path
  local_var_path = '/users-web/api/v3/apps/{appId}/subscriptions'.sub('{' + 'appId' + '}', app_id.to_s)

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  return_type = opts[:return_type] || 'SubscriptionsResponse' 

  auth_names = opts[:auth_names] || ['api_key']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SubscriptionsApi#list_using_get3\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_using_get5(opts = {}) ⇒ SubscriptionsResponse

Get current account’s subscriptions



254
255
256
257
# File 'lib/stcloud/api/subscriptions_api.rb', line 254

def list_using_get5(opts = {})
  data, _status_code, _headers = list_using_get5_with_http_info(opts)
  data
end

#list_using_get5_with_http_info(opts = {}) ⇒ Array<(SubscriptionsResponse, Integer, Hash)>

Get current account&#x27;s subscriptions



262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
# File 'lib/stcloud/api/subscriptions_api.rb', line 262

def list_using_get5_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: SubscriptionsApi.list_using_get5 ...'
  end
  # resource path
  local_var_path = '/users-web/api/v3/subscriptions'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  return_type = opts[:return_type] || 'SubscriptionsResponse' 

  auth_names = opts[:auth_names] || ['api_key']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SubscriptionsApi#list_using_get5\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#send_app_report_using_post(body, app_id, opts = {}) ⇒ MailReportResponse

Email an App report



304
305
306
307
# File 'lib/stcloud/api/subscriptions_api.rb', line 304

def send_app_report_using_post(body, app_id, opts = {})
  data, _status_code, _headers = send_app_report_using_post_with_http_info(body, app_id, opts)
  data
end

#send_app_report_using_post_with_http_info(body, app_id, opts = {}) ⇒ Array<(MailReportResponse, Integer, Hash)>

Email an App report



314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
# File 'lib/stcloud/api/subscriptions_api.rb', line 314

def send_app_report_using_post_with_http_info(body, app_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: SubscriptionsApi.send_app_report_using_post ...'
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling SubscriptionsApi.send_app_report_using_post"
  end
  # verify the required parameter 'app_id' is set
  if @api_client.config.client_side_validation && app_id.nil?
    fail ArgumentError, "Missing the required parameter 'app_id' when calling SubscriptionsApi.send_app_report_using_post"
  end
  # resource path
  local_var_path = '/users-web/api/v3/apps/{appId}/report/send'.sub('{' + 'appId' + '}', app_id.to_s)

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(body) 

  return_type = opts[:return_type] || 'MailReportResponse' 

  auth_names = opts[:auth_names] || ['api_key']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SubscriptionsApi#send_app_report_using_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#send_dash_report_using_post(body, dash_id, opts = {}) ⇒ MailReportResponse

Email a dashboard report



366
367
368
369
# File 'lib/stcloud/api/subscriptions_api.rb', line 366

def send_dash_report_using_post(body, dash_id, opts = {})
  data, _status_code, _headers = send_dash_report_using_post_with_http_info(body, dash_id, opts)
  data
end

#send_dash_report_using_post_with_http_info(body, dash_id, opts = {}) ⇒ Array<(MailReportResponse, Integer, Hash)>

Email a dashboard report



376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
# File 'lib/stcloud/api/subscriptions_api.rb', line 376

def send_dash_report_using_post_with_http_info(body, dash_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: SubscriptionsApi.send_dash_report_using_post ...'
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling SubscriptionsApi.send_dash_report_using_post"
  end
  # verify the required parameter 'dash_id' is set
  if @api_client.config.client_side_validation && dash_id.nil?
    fail ArgumentError, "Missing the required parameter 'dash_id' when calling SubscriptionsApi.send_dash_report_using_post"
  end
  # resource path
  local_var_path = '/users-web/api/v3/dashboards/{dashId}/report/send'.sub('{' + 'dashId' + '}', dash_id.to_s)

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(body) 

  return_type = opts[:return_type] || 'MailReportResponse' 

  auth_names = opts[:auth_names] || ['api_key']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SubscriptionsApi#send_dash_report_using_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#toggle_enabled_using_put1(body, updateable_subscription_id, opts = {}) ⇒ SubscriptionResponse

Toggle subscription status



428
429
430
431
# File 'lib/stcloud/api/subscriptions_api.rb', line 428

def toggle_enabled_using_put1(body, updateable_subscription_id, opts = {})
  data, _status_code, _headers = toggle_enabled_using_put1_with_http_info(body, updateable_subscription_id, opts)
  data
end

#toggle_enabled_using_put1_with_http_info(body, updateable_subscription_id, opts = {}) ⇒ Array<(SubscriptionResponse, Integer, Hash)>

Toggle subscription status



438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
# File 'lib/stcloud/api/subscriptions_api.rb', line 438

def toggle_enabled_using_put1_with_http_info(body, updateable_subscription_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: SubscriptionsApi.toggle_enabled_using_put1 ...'
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling SubscriptionsApi.toggle_enabled_using_put1"
  end
  # verify the required parameter 'updateable_subscription_id' is set
  if @api_client.config.client_side_validation && updateable_subscription_id.nil?
    fail ArgumentError, "Missing the required parameter 'updateable_subscription_id' when calling SubscriptionsApi.toggle_enabled_using_put1"
  end
  # resource path
  local_var_path = '/users-web/api/v3/subscriptions/{updateableSubscriptionId}'.sub('{' + 'updateableSubscriptionId' + '}', updateable_subscription_id.to_s)

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(body) 

  return_type = opts[:return_type] || 'SubscriptionResponse' 

  auth_names = opts[:auth_names] || ['api_key']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SubscriptionsApi#toggle_enabled_using_put1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_for_app_using_put1(body, app_id, opts = {}) ⇒ SubscriptionResponse

Update App subscription



490
491
492
493
# File 'lib/stcloud/api/subscriptions_api.rb', line 490

def update_for_app_using_put1(body, app_id, opts = {})
  data, _status_code, _headers = update_for_app_using_put1_with_http_info(body, app_id, opts)
  data
end

#update_for_app_using_put1_with_http_info(body, app_id, opts = {}) ⇒ Array<(SubscriptionResponse, Integer, Hash)>

Update App subscription



500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
# File 'lib/stcloud/api/subscriptions_api.rb', line 500

def update_for_app_using_put1_with_http_info(body, app_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: SubscriptionsApi.update_for_app_using_put1 ...'
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling SubscriptionsApi.update_for_app_using_put1"
  end
  # verify the required parameter 'app_id' is set
  if @api_client.config.client_side_validation && app_id.nil?
    fail ArgumentError, "Missing the required parameter 'app_id' when calling SubscriptionsApi.update_for_app_using_put1"
  end
  # resource path
  local_var_path = '/users-web/api/v3/apps/{appId}/subscription'.sub('{' + 'appId' + '}', app_id.to_s)

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(body) 

  return_type = opts[:return_type] || 'SubscriptionResponse' 

  auth_names = opts[:auth_names] || ['api_key']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SubscriptionsApi#update_for_app_using_put1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_for_dash_using_put1(body, dash_id, opts = {}) ⇒ SubscriptionResponse

Update dashboard subscription



552
553
554
555
# File 'lib/stcloud/api/subscriptions_api.rb', line 552

def update_for_dash_using_put1(body, dash_id, opts = {})
  data, _status_code, _headers = update_for_dash_using_put1_with_http_info(body, dash_id, opts)
  data
end

#update_for_dash_using_put1_with_http_info(body, dash_id, opts = {}) ⇒ Array<(SubscriptionResponse, Integer, Hash)>

Update dashboard subscription



562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
# File 'lib/stcloud/api/subscriptions_api.rb', line 562

def update_for_dash_using_put1_with_http_info(body, dash_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: SubscriptionsApi.update_for_dash_using_put1 ...'
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling SubscriptionsApi.update_for_dash_using_put1"
  end
  # verify the required parameter 'dash_id' is set
  if @api_client.config.client_side_validation && dash_id.nil?
    fail ArgumentError, "Missing the required parameter 'dash_id' when calling SubscriptionsApi.update_for_dash_using_put1"
  end
  # resource path
  local_var_path = '/users-web/api/v3/dashboards/{dashId}/subscription'.sub('{' + 'dashId' + '}', dash_id.to_s)

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(body) 

  return_type = opts[:return_type] || 'SubscriptionResponse' 

  auth_names = opts[:auth_names] || ['api_key']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SubscriptionsApi#update_for_dash_using_put1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end