class SwaggerClient::CredentialsControllerApi
Attributes
Public Class Methods
# File lib/swagger_client/api/credentials_controller_api.rb, line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end
Public Instance Methods
Retrieve an account's details @param account account @param [Hash] opts the optional parameters @option opts [Array<String>] :roles @option opts [Array<String>] :allowed_accounts @option opts [String] :email @option opts [String] :username @option opts [String] :first_name @option opts [String] :last_name @option opts [String] :x_rate_limit_app X-RateLimit-App @return [AccountDetails]
# File lib/swagger_client/api/credentials_controller_api.rb, line 33 def get_account_using_get(account, opts = {}) data, _status_code, _headers = get_account_using_get_with_http_info(account, opts) data end
Retrieve an account's details @param account account @param [Hash] opts the optional parameters @option opts [Array<String>] :roles @option opts [Array<String>] :allowed_accounts @option opts [String] :email @option opts [String] :username @option opts [String] :first_name @option opts [String] :last_name @option opts [String] :x_rate_limit_app X-RateLimit-App @return [Array<(AccountDetails
, Fixnum, Hash)>] AccountDetails
data, response status code and response headers
# File lib/swagger_client/api/credentials_controller_api.rb, line 49 def get_account_using_get_with_http_info(account, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CredentialsControllerApi.get_account_using_get ...' end # verify the required parameter 'account' is set if @api_client.config.client_side_validation && account.nil? fail ArgumentError, "Missing the required parameter 'account' when calling CredentialsControllerApi.get_account_using_get" end # resource path local_var_path = '/credentials/{account}'.sub('{' + 'account' + '}', account.to_s) # query parameters query_params = {} query_params[:'roles'] = @api_client.build_collection_param(opts[:'roles'], :multi) if !opts[:'roles'].nil? query_params[:'allowedAccounts'] = @api_client.build_collection_param(opts[:'allowed_accounts'], :multi) if !opts[:'allowed_accounts'].nil? query_params[:'email'] = opts[:'email'] if !opts[:'email'].nil? query_params[:'username'] = opts[:'username'] if !opts[:'username'].nil? query_params[:'firstName'] = opts[:'first_name'] if !opts[:'first_name'].nil? query_params[:'lastName'] = opts[:'last_name'] if !opts[:'last_name'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'X-RateLimit-App'] = opts[:'x_rate_limit_app'] if !opts[:'x_rate_limit_app'].nil? # 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 => 'AccountDetails') if @api_client.config.debugging @api_client.config.logger.debug "API called: CredentialsControllerApi#get_account_using_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieve a list of accounts @param [Hash] opts the optional parameters @option opts [Array<String>] :roles @option opts [Array<String>] :allowed_accounts @option opts [String] :email @option opts [String] :username @option opts [String] :first_name @option opts [String] :last_name @option opts [BOOLEAN] :expand expand @return [Array<Account>]
# File lib/swagger_client/api/credentials_controller_api.rb, line 105 def get_accounts_using_get(opts = {}) data, _status_code, _headers = get_accounts_using_get_with_http_info(opts) data end
Retrieve a list of accounts @param [Hash] opts the optional parameters @option opts [Array<String>] :roles @option opts [Array<String>] :allowed_accounts @option opts [String] :email @option opts [String] :username @option opts [String] :first_name @option opts [String] :last_name @option opts [BOOLEAN] :expand expand @return [Array<(Array<Account>, Fixnum, Hash)>] Array<Account> data, response status code and response headers
# File lib/swagger_client/api/credentials_controller_api.rb, line 120 def get_accounts_using_get_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CredentialsControllerApi.get_accounts_using_get ...' end # resource path local_var_path = '/credentials' # query parameters query_params = {} query_params[:'roles'] = @api_client.build_collection_param(opts[:'roles'], :multi) if !opts[:'roles'].nil? query_params[:'allowedAccounts'] = @api_client.build_collection_param(opts[:'allowed_accounts'], :multi) if !opts[:'allowed_accounts'].nil? query_params[:'email'] = opts[:'email'] if !opts[:'email'].nil? query_params[:'username'] = opts[:'username'] if !opts[:'username'].nil? query_params[:'firstName'] = opts[:'first_name'] if !opts[:'first_name'].nil? query_params[:'lastName'] = opts[:'last_name'] if !opts[:'last_name'].nil? query_params[:'expand'] = opts[:'expand'] if !opts[:'expand'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # 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 => 'Array<Account>') if @api_client.config.debugging @api_client.config.logger.debug "API called: CredentialsControllerApi#get_accounts_using_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end