class stcloud::SubscriptionsApi
Attributes
Public Class Methods
# File lib/stcloud/api/subscriptions_api.rb, line 16 def initialize(api_client = ApiClient.default) @api_client = api_client end
Public Instance Methods
Create App
subscription @param body subscription @param app_id appId @param [Hash] opts the optional parameters @return [SubscriptionResponse]
# 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 App
subscription @param body subscription @param app_id appId @param [Hash] opts the optional parameters @return [Array<(SubscriptionResponse
, Integer, Hash)>] SubscriptionResponse
data, response status code and response headers
# 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 dashboard subscription @param body subscription @param dash_id dashId @param [Hash] opts the optional parameters @return [SubscriptionResponse]
# 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 dashboard subscription @param body subscription @param dash_id dashId @param [Hash] opts the optional parameters @return [Array<(SubscriptionResponse
, Integer, Hash)>] SubscriptionResponse
data, response status code and response headers
# 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 subscription @param updateable_subscription_id updateableSubscriptionId @param [Hash] opts the optional parameters @return [GenericMapBasedApiResponse]
# 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 subscription @param updateable_subscription_id updateableSubscriptionId @param [Hash] opts the optional parameters @return [Array<(GenericMapBasedApiResponse
, Integer, Hash)>] GenericMapBasedApiResponse
data, response status code and response headers
# 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
Get subscriptions for an App
@param app_id appId @param [Hash] opts the optional parameters @return [SubscriptionsResponse]
# 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
Get subscriptions for an App
@param app_id appId @param [Hash] opts the optional parameters @return [Array<(SubscriptionsResponse
, Integer, Hash)>] SubscriptionsResponse
data, response status code and response headers
# 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
Get current account's subscriptions @param [Hash] opts the optional parameters @return [SubscriptionsResponse]
# 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
Get current account's subscriptions @param [Hash] opts the optional parameters @return [Array<(SubscriptionsResponse
, Integer, Hash)>] SubscriptionsResponse
data, response status code and response headers
# 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
Email an App
report @param body emailDto @param app_id appId @param [Hash] opts the optional parameters @return [MailReportResponse]
# 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
Email an App
report @param body emailDto @param app_id appId @param [Hash] opts the optional parameters @return [Array<(MailReportResponse
, Integer, Hash)>] MailReportResponse
data, response status code and response headers
# 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
Email a dashboard report @param body emailDto @param dash_id dashId @param [Hash] opts the optional parameters @return [MailReportResponse]
# 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
Email a dashboard report @param body emailDto @param dash_id dashId @param [Hash] opts the optional parameters @return [Array<(MailReportResponse
, Integer, Hash)>] MailReportResponse
data, response status code and response headers
# 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 subscription status @param body dto @param updateable_subscription_id updateableSubscriptionId @param [Hash] opts the optional parameters @return [SubscriptionResponse]
# 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 subscription status @param body dto @param updateable_subscription_id updateableSubscriptionId @param [Hash] opts the optional parameters @return [Array<(SubscriptionResponse
, Integer, Hash)>] SubscriptionResponse
data, response status code and response headers
# 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 App
subscription @param body subscription @param app_id appId @param [Hash] opts the optional parameters @return [SubscriptionResponse]
# 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 App
subscription @param body subscription @param app_id appId @param [Hash] opts the optional parameters @return [Array<(SubscriptionResponse
, Integer, Hash)>] SubscriptionResponse
data, response status code and response headers
# 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 dashboard subscription @param body subscription @param dash_id dashId @param [Hash] opts the optional parameters @return [SubscriptionResponse]
# 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 dashboard subscription @param body subscription @param dash_id dashId @param [Hash] opts the optional parameters @return [Array<(SubscriptionResponse
, Integer, Hash)>] SubscriptionResponse
data, response status code and response headers
# 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