=begin This is an automatically generated file. DO NOT EDIT. Generated from version 2.1.81 of the OpenAPI specification at https://github.com/athenianco/api-spec/releases/tag/2.1.81. Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.4.0 =end require 'cgi' module Athenian class UserApi attr_accessor :api_client def initialize(api_client = ApiClient.default) @api_client = api_client end # 🛡️👤 Change the status of an account member: regular, admin, or banished (deleted). This endpoint is allowed only for account admins. # @param [Hash] opts the optional parameters # @option opts [AccountUserChangeRequest] :body # @return [Account] def change_user(opts = {}) data, _status_code, _headers = change_user_with_http_info(opts) data end # 🛡️👤 Change the status of an account member: regular, admin, or banished (deleted). This endpoint is allowed only for account admins. # @param [Hash] opts the optional parameters # @option opts [AccountUserChangeRequest] :body # @return [Array<(Account, Integer, Hash)>] Account data, response status code and response headers def change_user_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UserApi.change_user ...' end # resource path local_var_path = '/account/user' # 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' content_type = @api_client.select_header_content_type(['application/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(opts[:'body']) # return_type return_type = opts[:debug_return_type] || 'Account' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] new_options = opts.merge( :operation => :"UserApi.change_user", :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, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: UserApi#change_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # List the calling user's account members and installed GitHub and JIRA organizations. # @param id [Integer] Numeric identifier of the account. The user must belong to that account. To find out which accounts the user belongs to, see `/user`. # @param [Hash] opts the optional parameters # @return [Account] def get_account_details(id, opts = {}) data, _status_code, _headers = get_account_details_with_http_info(id, opts) data end # List the calling user's account members and installed GitHub and JIRA organizations. # @param id [Integer] Numeric identifier of the account. The user must belong to that account. To find out which accounts the user belongs to, see `/user`. # @param [Hash] opts the optional parameters # @return [Array<(Account, Integer, Hash)>] Account data, response status code and response headers def get_account_details_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UserApi.get_account_details ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling UserApi.get_account_details" end # resource path local_var_path = '/account/{id}/details'.sub('{' + 'id' + '}', CGI.escape(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[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Account' # auth_names auth_names = opts[:debug_auth_names] || ['apiKeyAuth', 'bearerAuth'] new_options = opts.merge( :operation => :"UserApi.get_account_details", :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, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: UserApi#get_account_details\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # List the product features enabled for the account. # @param id [Integer] Numeric identifier of the account. The user must belong to that account. To find out which accounts the user belongs to, see `/user`. # @param [Hash] opts the optional parameters # @return [Array] def get_account_features(id, opts = {}) data, _status_code, _headers = get_account_features_with_http_info(id, opts) data end # List the product features enabled for the account. # @param id [Integer] Numeric identifier of the account. The user must belong to that account. To find out which accounts the user belongs to, see `/user`. # @param [Hash] opts the optional parameters # @return [Array<(Array, Integer, Hash)>] Array data, response status code and response headers def get_account_features_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UserApi.get_account_features ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling UserApi.get_account_features" end # resource path local_var_path = '/account/{id}/features'.sub('{' + 'id' + '}', CGI.escape(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[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array' # auth_names auth_names = opts[:debug_auth_names] || ['apiKeyAuth', 'bearerAuth'] new_options = opts.merge( :operation => :"UserApi.get_account_features", :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, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: UserApi#get_account_features\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # 👤 Load the previously saved state of the UI views. # @param id [String] Reference to the share previously saved by `PUT /share`. # @param [Hash] opts the optional parameters # @return [Share] def get_share(id, opts = {}) data, _status_code, _headers = get_share_with_http_info(id, opts) data end # 👤 Load the previously saved state of the UI views. # @param id [String] Reference to the share previously saved by `PUT /share`. # @param [Hash] opts the optional parameters # @return [Array<(Share, Integer, Hash)>] Share data, response status code and response headers def get_share_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UserApi.get_share ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling UserApi.get_share" end # resource path local_var_path = '/share/{id}'.sub('{' + 'id' + '}', CGI.escape(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[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Share' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] new_options = opts.merge( :operation => :"UserApi.get_share", :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, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: UserApi#get_share\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Show details about the calling user. # @param [Hash] opts the optional parameters # @return [User] def get_user(opts = {}) data, _status_code, _headers = get_user_with_http_info(opts) data end # Show details about the calling user. # @param [Hash] opts the optional parameters # @return [Array<(User, Integer, Hash)>] User data, response status code and response headers def get_user_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UserApi.get_user ...' end # resource path local_var_path = '/user' # 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[:debug_body] # return_type return_type = opts[:debug_return_type] || 'User' # auth_names auth_names = opts[:debug_auth_names] || ['apiKeyAuth', 'bearerAuth'] new_options = opts.merge( :operation => :"UserApi.get_user", :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, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: UserApi#get_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # 👤 Save the state of UI views and return a reference. # @param [Hash] opts the optional parameters # @option opts [Object] :body # @return [String] def save_share(opts = {}) data, _status_code, _headers = save_share_with_http_info(opts) data end # 👤 Save the state of UI views and return a reference. # @param [Hash] opts the optional parameters # @option opts [Object] :body # @return [Array<(String, Integer, Hash)>] String data, response status code and response headers def save_share_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UserApi.save_share ...' end # resource path local_var_path = '/share' # 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' content_type = @api_client.select_header_content_type(['application/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(opts[:'body']) # return_type return_type = opts[:debug_return_type] || 'String' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] new_options = opts.merge( :operation => :"UserApi.save_share", :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, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: UserApi#save_share\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end end end