Class: SwaggerClient::CredentialsControllerApi
- Inherits:
-
Object
- Object
- SwaggerClient::CredentialsControllerApi
- Defined in:
- lib/swagger_client/api/credentials_controller_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#get_account_using_get(account, opts = {}) ⇒ AccountDetails
Retrieve an account’s details.
-
#get_account_using_get_with_http_info(account, opts = {}) ⇒ Array<(AccountDetails, Fixnum, Hash)>
Retrieve an account's details.
-
#get_accounts_using_get(opts = {}) ⇒ Array<Account>
Retrieve a list of accounts.
-
#get_accounts_using_get_with_http_info(opts = {}) ⇒ Array<(Array<Account>, Fixnum, Hash)>
Retrieve a list of accounts.
-
#initialize(api_client = ApiClient.default) ⇒ CredentialsControllerApi
constructor
A new instance of CredentialsControllerApi.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ CredentialsControllerApi
Returns a new instance of CredentialsControllerApi.
19 20 21 |
# File 'lib/swagger_client/api/credentials_controller_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/swagger_client/api/credentials_controller_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#get_account_using_get(account, opts = {}) ⇒ AccountDetails
Retrieve an account’s details
33 34 35 36 |
# 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 |
#get_account_using_get_with_http_info(account, opts = {}) ⇒ Array<(AccountDetails, Fixnum, Hash)>
Retrieve an account's details
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 93 94 |
# 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 |
#get_accounts_using_get(opts = {}) ⇒ Array<Account>
Retrieve a list of accounts
105 106 107 108 |
# 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 |
#get_accounts_using_get_with_http_info(opts = {}) ⇒ Array<(Array<Account>, Fixnum, Hash)>
Retrieve a list of accounts
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 |
# 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 |