Class: Bfwd::UsagesessionsApi
- Inherits:
-
Object
- Object
- Bfwd::UsagesessionsApi
- Defined in:
- lib/bf_ruby2/api/usagesessions_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#get_active_sessions_for_subscription(subscription_id, opts = {}) ⇒ UsageSessionPagedMetadata
Get active by subscription active by subscription","response":"getActiveSessions.html".
-
#get_active_sessions_for_subscription_with_http_info(subscription_id, opts = {}) ⇒ Array<(UsageSessionPagedMetadata, Fixnum, Hash)>
Get active by subscription active by subscription","response":"getActiveSessions.html".
-
#get_usage_list_for_usage_session(subscription_id, opts = {}) ⇒ UsageSessionPagedMetadata
Retrieve by subscription by subscription","response":"getAllSessions.html".
-
#get_usage_list_for_usage_session_with_http_info(subscription_id, opts = {}) ⇒ Array<(UsageSessionPagedMetadata, Fixnum, Hash)>
Retrieve by subscription by subscription","response":"getAllSessions.html".
-
#initialize(api_client = ApiClient.default) ⇒ UsagesessionsApi
constructor
A new instance of UsagesessionsApi.
-
#start_usage_session(usage_sessions, opts = {}) ⇒ UsageSessionPagedMetadata
Start a new session a new session","request":"createStartUsageSessionRequest.html","response":"createStartUsageSessionResponse.html".
-
#start_usage_session_with_http_info(usage_sessions, opts = {}) ⇒ Array<(UsageSessionPagedMetadata, Fixnum, Hash)>
Start a new session a new session","request":"createStartUsageSessionRequest.html","response":"createStartUsageSessionResponse.html".
-
#stop_usage_session(usage_sessions, opts = {}) ⇒ UsageSessionPagedMetadata
Stop a specified session a specified session","request":"createStopUsageSessionRequest.html","response":"createStopUsageSessionResponse.html".
-
#stop_usage_session_with_http_info(usage_sessions, opts = {}) ⇒ Array<(UsageSessionPagedMetadata, Fixnum, Hash)>
Stop a specified session a specified session","request":"createStopUsageSessionRequest.html","response":"createStopUsageSessionResponse.html".
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ UsagesessionsApi
Returns a new instance of UsagesessionsApi.
19 20 21 |
# File 'lib/bf_ruby2/api/usagesessions_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/bf_ruby2/api/usagesessions_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#get_active_sessions_for_subscription(subscription_id, opts = {}) ⇒ UsageSessionPagedMetadata
Get active by subscription active by subscription","response":"getActiveSessions.html"
33 34 35 36 |
# File 'lib/bf_ruby2/api/usagesessions_api.rb', line 33 def get_active_sessions_for_subscription(subscription_id, opts = {}) data, _status_code, _headers = get_active_sessions_for_subscription_with_http_info(subscription_id, opts) return data end |
#get_active_sessions_for_subscription_with_http_info(subscription_id, opts = {}) ⇒ Array<(UsageSessionPagedMetadata, Fixnum, Hash)>
Get active by subscription active by subscription","response":"getActiveSessions.html"
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 81 82 83 84 85 86 87 88 89 90 91 92 |
# File 'lib/bf_ruby2/api/usagesessions_api.rb', line 48 def get_active_sessions_for_subscription_with_http_info(subscription_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsagesessionsApi.get_active_sessions_for_subscription ..." end # verify the required parameter 'subscription_id' is set if @api_client.config.client_side_validation && subscription_id.nil? fail ArgumentError, "Missing the required parameter 'subscription_id' when calling UsagesessionsApi.get_active_sessions_for_subscription" end if @api_client.config.client_side_validation && opts[:'order'] && !['ASC', 'DESC'].include?(opts[:'order']) fail ArgumentError, 'invalid value for "order", must be one of ASC, DESC' end # resource path local_var_path = "/usage-sessions/{subscription-id}/active".sub('{' + 'subscription-id' + '}', subscription_id.to_s) # query parameters query_params = {} query_params[:'organizations'] = @api_client.build_collection_param(opts[:'organizations'], :multi) if !opts[:'organizations'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'records'] = opts[:'records'] if !opts[:'records'].nil? query_params[:'order_by'] = opts[:'order_by'] if !opts[:'order_by'].nil? query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] 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 => 'UsageSessionPagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsagesessionsApi#get_active_sessions_for_subscription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_usage_list_for_usage_session(subscription_id, opts = {}) ⇒ UsageSessionPagedMetadata
Retrieve by subscription by subscription","response":"getAllSessions.html"
104 105 106 107 |
# File 'lib/bf_ruby2/api/usagesessions_api.rb', line 104 def get_usage_list_for_usage_session(subscription_id, opts = {}) data, _status_code, _headers = get_usage_list_for_usage_session_with_http_info(subscription_id, opts) return data end |
#get_usage_list_for_usage_session_with_http_info(subscription_id, opts = {}) ⇒ Array<(UsageSessionPagedMetadata, Fixnum, Hash)>
Retrieve by subscription by subscription","response":"getAllSessions.html"
119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 |
# File 'lib/bf_ruby2/api/usagesessions_api.rb', line 119 def get_usage_list_for_usage_session_with_http_info(subscription_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsagesessionsApi.get_usage_list_for_usage_session ..." end # verify the required parameter 'subscription_id' is set if @api_client.config.client_side_validation && subscription_id.nil? fail ArgumentError, "Missing the required parameter 'subscription_id' when calling UsagesessionsApi.get_usage_list_for_usage_session" end if @api_client.config.client_side_validation && opts[:'order'] && !['ASC', 'DESC'].include?(opts[:'order']) fail ArgumentError, 'invalid value for "order", must be one of ASC, DESC' end # resource path local_var_path = "/usage-sessions/{subscription-id}".sub('{' + 'subscription-id' + '}', subscription_id.to_s) # query parameters query_params = {} query_params[:'organizations'] = @api_client.build_collection_param(opts[:'organizations'], :multi) if !opts[:'organizations'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'records'] = opts[:'records'] if !opts[:'records'].nil? query_params[:'order_by'] = opts[:'order_by'] if !opts[:'order_by'].nil? query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] 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 => 'UsageSessionPagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsagesessionsApi#get_usage_list_for_usage_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#start_usage_session(usage_sessions, opts = {}) ⇒ UsageSessionPagedMetadata
Start a new session a new session","request":"createStartUsageSessionRequest.html","response":"createStartUsageSessionResponse.html"
170 171 172 173 |
# File 'lib/bf_ruby2/api/usagesessions_api.rb', line 170 def start_usage_session(usage_sessions, opts = {}) data, _status_code, _headers = start_usage_session_with_http_info(usage_sessions, opts) return data end |
#start_usage_session_with_http_info(usage_sessions, opts = {}) ⇒ Array<(UsageSessionPagedMetadata, Fixnum, Hash)>
Start a new session a new session","request":"createStartUsageSessionRequest.html","response":"createStartUsageSessionResponse.html"
180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 |
# File 'lib/bf_ruby2/api/usagesessions_api.rb', line 180 def start_usage_session_with_http_info(usage_sessions, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsagesessionsApi.start_usage_session ..." end # verify the required parameter 'usage_sessions' is set if @api_client.config.client_side_validation && usage_sessions.nil? fail ArgumentError, "Missing the required parameter 'usage_sessions' when calling UsagesessionsApi.start_usage_session" end # resource path local_var_path = "/usage-sessions/start" # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['text/xml', 'application/xml', 'application/json; charset=utf-8']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json; charset=utf-8']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(usage_sessions) auth_names = [] 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 => 'UsageSessionPagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsagesessionsApi#start_usage_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#stop_usage_session(usage_sessions, opts = {}) ⇒ UsageSessionPagedMetadata
Stop a specified session a specified session","request":"createStopUsageSessionRequest.html","response":"createStopUsageSessionResponse.html"
225 226 227 228 |
# File 'lib/bf_ruby2/api/usagesessions_api.rb', line 225 def stop_usage_session(usage_sessions, opts = {}) data, _status_code, _headers = stop_usage_session_with_http_info(usage_sessions, opts) return data end |
#stop_usage_session_with_http_info(usage_sessions, opts = {}) ⇒ Array<(UsageSessionPagedMetadata, Fixnum, Hash)>
Stop a specified session a specified session","request":"createStopUsageSessionRequest.html","response":"createStopUsageSessionResponse.html"
235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 |
# File 'lib/bf_ruby2/api/usagesessions_api.rb', line 235 def stop_usage_session_with_http_info(usage_sessions, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsagesessionsApi.stop_usage_session ..." end # verify the required parameter 'usage_sessions' is set if @api_client.config.client_side_validation && usage_sessions.nil? fail ArgumentError, "Missing the required parameter 'usage_sessions' when calling UsagesessionsApi.stop_usage_session" end # resource path local_var_path = "/usage-sessions/stop" # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['text/xml', 'application/xml', 'application/json; charset=utf-8']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json; charset=utf-8']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(usage_sessions) auth_names = [] 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 => 'UsageSessionPagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsagesessionsApi#stop_usage_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |