Class: SmplkitGeneratedClient::App::AccountApi
- Inherits:
-
Object
- Object
- SmplkitGeneratedClient::App::AccountApi
- Defined in:
- lib/smplkit/_generated/app/lib/smplkit_app_client/api/account_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#delete_account(opts = {}) ⇒ nil
Delete Current Account Permanently delete the current account and all associated data.
-
#delete_account_with_http_info(opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete Current Account Permanently delete the current account and all associated data.
-
#get_account(opts = {}) ⇒ AccountResponse
Get Current Account Return the account for the currently authenticated user.
-
#get_account_settings(opts = {}) ⇒ Hash<String, Object>
Get Account Settings Return the current account’s settings as plain JSON.
-
#get_account_settings_with_http_info(opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Get Account Settings Return the current account's settings as plain JSON.
-
#get_account_with_http_info(opts = {}) ⇒ Array<(AccountResponse, Integer, Hash)>
Get Current Account Return the account for the currently authenticated user.
-
#initialize(api_client = ApiClient.default) ⇒ AccountApi
constructor
A new instance of AccountApi.
-
#put_account_settings(opts = {}) ⇒ Hash<String, Object>
Update Account Settings Replace the current account’s settings with the provided JSON object.
-
#put_account_settings_with_http_info(opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Update Account Settings Replace the current account's settings with the provided JSON object.
-
#update_account(account_response, opts = {}) ⇒ AccountResponse
Update Current Account Update the current account’s settings.
-
#update_account_with_http_info(account_response, opts = {}) ⇒ Array<(AccountResponse, Integer, Hash)>
Update Current Account Update the current account's settings.
-
#wipe_account_data(account_wipe_request, opts = {}) ⇒ nil
Wipe Account Data Delete every config, flag, logger, log group, context, context type, environment, and customer API key (except the caller’s current key) on the account.
-
#wipe_account_data_with_http_info(account_wipe_request, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Wipe Account Data Delete every config, flag, logger, log group, context, context type, environment, and customer API key (except the caller's current key) on the account.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ AccountApi
Returns a new instance of AccountApi.
19 20 21 |
# File 'lib/smplkit/_generated/app/lib/smplkit_app_client/api/account_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/smplkit/_generated/app/lib/smplkit_app_client/api/account_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#delete_account(opts = {}) ⇒ nil
Delete Current Account Permanently delete the current account and all associated data.
26 27 28 29 |
# File 'lib/smplkit/_generated/app/lib/smplkit_app_client/api/account_api.rb', line 26 def delete_account(opts = {}) delete_account_with_http_info(opts) nil end |
#delete_account_with_http_info(opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete Current Account Permanently delete the current account and all associated data.
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 |
# File 'lib/smplkit/_generated/app/lib/smplkit_app_client/api/account_api.rb', line 35 def delete_account_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountApi.delete_account ...' end # resource path local_var_path = '/api/v1/accounts/current' # 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/vnd.api+json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['HTTPBearer'] = opts.merge( :operation => :"AccountApi.delete_account", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountApi#delete_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_account(opts = {}) ⇒ AccountResponse
Get Current Account Return the account for the currently authenticated user.
83 84 85 86 |
# File 'lib/smplkit/_generated/app/lib/smplkit_app_client/api/account_api.rb', line 83 def get_account(opts = {}) data, _status_code, _headers = get_account_with_http_info(opts) data end |
#get_account_settings(opts = {}) ⇒ Hash<String, Object>
Get Account Settings Return the current account’s settings as plain JSON.
140 141 142 143 |
# File 'lib/smplkit/_generated/app/lib/smplkit_app_client/api/account_api.rb', line 140 def get_account_settings(opts = {}) data, _status_code, _headers = get_account_settings_with_http_info(opts) data end |
#get_account_settings_with_http_info(opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Get Account Settings Return the current account's settings as plain JSON.
149 150 151 152 153 154 155 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 |
# File 'lib/smplkit/_generated/app/lib/smplkit_app_client/api/account_api.rb', line 149 def get_account_settings_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountApi.get_account_settings ...' end # resource path local_var_path = '/api/v1/accounts/current/settings' # 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/vnd.api+json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Hash<String, Object>' # auth_names auth_names = opts[:debug_auth_names] || ['HTTPBearer'] = opts.merge( :operation => :"AccountApi.get_account_settings", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountApi#get_account_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_account_with_http_info(opts = {}) ⇒ Array<(AccountResponse, Integer, Hash)>
Get Current Account Return the account for the currently authenticated user.
92 93 94 95 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 |
# File 'lib/smplkit/_generated/app/lib/smplkit_app_client/api/account_api.rb', line 92 def get_account_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountApi.get_account ...' end # resource path local_var_path = '/api/v1/accounts/current' # 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/vnd.api+json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'AccountResponse' # auth_names auth_names = opts[:debug_auth_names] || ['HTTPBearer'] = opts.merge( :operation => :"AccountApi.get_account", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountApi#get_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#put_account_settings(opts = {}) ⇒ Hash<String, Object>
Update Account Settings Replace the current account’s settings with the provided JSON object. Requires admin role.
197 198 199 200 |
# File 'lib/smplkit/_generated/app/lib/smplkit_app_client/api/account_api.rb', line 197 def put_account_settings(opts = {}) data, _status_code, _headers = put_account_settings_with_http_info(opts) data end |
#put_account_settings_with_http_info(opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Update Account Settings Replace the current account's settings with the provided JSON object. Requires admin role.
206 207 208 209 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 |
# File 'lib/smplkit/_generated/app/lib/smplkit_app_client/api/account_api.rb', line 206 def put_account_settings_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountApi.put_account_settings ...' end # resource path local_var_path = '/api/v1/accounts/current/settings' # 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/vnd.api+json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Hash<String, Object>' # auth_names auth_names = opts[:debug_auth_names] || ['HTTPBearer'] = opts.merge( :operation => :"AccountApi.put_account_settings", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountApi#put_account_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_account(account_response, opts = {}) ⇒ AccountResponse
Update Current Account Update the current account’s settings.
255 256 257 258 |
# File 'lib/smplkit/_generated/app/lib/smplkit_app_client/api/account_api.rb', line 255 def update_account(account_response, opts = {}) data, _status_code, _headers = update_account_with_http_info(account_response, opts) data end |
#update_account_with_http_info(account_response, opts = {}) ⇒ Array<(AccountResponse, Integer, Hash)>
Update Current Account Update the current account's settings.
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 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 |
# File 'lib/smplkit/_generated/app/lib/smplkit_app_client/api/account_api.rb', line 265 def update_account_with_http_info(account_response, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountApi.update_account ...' end # verify the required parameter 'account_response' is set if @api_client.config.client_side_validation && account_response.nil? fail ArgumentError, "Missing the required parameter 'account_response' when calling AccountApi.update_account" end # resource path local_var_path = '/api/v1/accounts/current' # 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/vnd.api+json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/vnd.api+json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(account_response) # return_type return_type = opts[:debug_return_type] || 'AccountResponse' # auth_names auth_names = opts[:debug_auth_names] || ['HTTPBearer'] = opts.merge( :operation => :"AccountApi.update_account", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountApi#update_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#wipe_account_data(account_wipe_request, opts = {}) ⇒ nil
Wipe Account Data Delete every config, flag, logger, log group, context, context type, environment, and customer API key (except the caller’s current key) on the account. The “common“ config is preserved as a structural anchor but its items are reset. Requires “OWNER“ role and a “true“ body — anything else returns 400. Pass “"generate_sample_data": true“ to re-seed the account with the standard sample dataset after the wipe completes (best-effort; seed failures are logged but do not fail the wipe). Returns 204 on success; if any sub-delete fails the response is 500.
323 324 325 326 |
# File 'lib/smplkit/_generated/app/lib/smplkit_app_client/api/account_api.rb', line 323 def wipe_account_data(account_wipe_request, opts = {}) wipe_account_data_with_http_info(account_wipe_request, opts) nil end |
#wipe_account_data_with_http_info(account_wipe_request, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Wipe Account Data Delete every config, flag, logger, log group, context, context type, environment, and customer API key (except the caller's current key) on the account. The ``common`` config is preserved as a structural anchor but its items are reset. Requires ``OWNER`` role and a ``true`` body — anything else returns 400. Pass ``"generate_sample_data": true`` to re-seed the account with the standard sample dataset after the wipe completes (best-effort; seed failures are logged but do not fail the wipe). Returns 204 on success; if any sub-delete fails the response is 500.
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 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 |
# File 'lib/smplkit/_generated/app/lib/smplkit_app_client/api/account_api.rb', line 333 def wipe_account_data_with_http_info(account_wipe_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountApi.wipe_account_data ...' end # verify the required parameter 'account_wipe_request' is set if @api_client.config.client_side_validation && account_wipe_request.nil? fail ArgumentError, "Missing the required parameter 'account_wipe_request' when calling AccountApi.wipe_account_data" end # resource path local_var_path = '/api/v1/accounts/current/actions/wipe' # 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/vnd.api+json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/vnd.api+json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(account_wipe_request) # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['HTTPBearer'] = opts.merge( :operation => :"AccountApi.wipe_account_data", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountApi#wipe_account_data\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |