class AuthressSdk::AccountsApi
Attributes
Public Class Methods
# File lib/authress_sdk/api/accounts_api.rb, line 9 def initialize(authress_client = AuthressClient.default) @authress_client = authress_client end
Public Instance Methods
Get account information. Includes the original configuration information.
<span class="badge badge-outline-secondary">READ: Authress:Configuration</span> @param account_id The unique identifier for the account @param [Hash] opts the optional parameters @return [InlineResponse2009]
# File lib/authress_sdk/api/accounts_api.rb, line 17 def get_account(account_id, opts = {}) data, _status_code, _headers = get_account_with_http_info(account_id, opts) data end
Get all linked identities for this account. Returns a list of identities linked for this account.
<span class="badge badge-outline-secondary">READ: Authress:Configuration</span> @param [Hash] opts the optional parameters @return [InlineResponse20012]
# File lib/authress_sdk/api/accounts_api.rb, line 72 def get_account_identities(opts = {}) data, _status_code, _headers = get_account_identities_with_http_info(opts) data end
Get all linked identities for this account. Returns a list of identities linked for this account. <br><span class="badge badge-outline-secondary">READ: Authress:Configuration</span> @param [Hash] opts the optional parameters @return [Array<(InlineResponse20012
, Integer, Hash)>] InlineResponse20012
data, response status code and response headers
# File lib/authress_sdk/api/accounts_api.rb, line 81 def get_account_identities_with_http_info(opts = {}) if @authress_client.config.debugging @authress_client.config.logger.debug 'Calling API: AccountsApi.get_account_identities ...' end # resource path local_var_path = '/v1/identities' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @authress_client.select_header_accept(['application/links+json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] return_type = opts[:return_type] || 'InlineResponse20012' auth_names = opts[:auth_names] || ['oauth2'] data, status_code, headers = @authress_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 => return_type) if @authress_client.config.debugging @authress_client.config.logger.debug "API called: AccountsApi#get_account_identities\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Get account information. Includes the original configuration information. <br><span class="badge badge-outline-secondary">READ: Authress:Configuration</span> @param account_id The unique identifier for the account @param [Hash] opts the optional parameters @return [Array<(InlineResponse2009
, Integer, Hash)>] InlineResponse2009
data, response status code and response headers
# File lib/authress_sdk/api/accounts_api.rb, line 27 def get_account_with_http_info(account_id, opts = {}) if @authress_client.config.debugging @authress_client.config.logger.debug 'Calling API: AccountsApi.get_account ...' end # verify the required parameter 'account_id' is set if @authress_client.config.client_side_validation && account_id.nil? fail ArgumentError, "Missing the required parameter 'account_id' when calling AccountsApi.get_account" end # resource path local_var_path = '/v1/accounts/{accountId}'.sub('{' + 'accountId' + '}', account_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'] = @authress_client.select_header_accept(['application/links+json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] return_type = opts[:return_type] || 'InlineResponse2009' auth_names = opts[:auth_names] || ['oauth2'] data, status_code, headers = @authress_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 => return_type) if @authress_client.config.debugging @authress_client.config.logger.debug "API called: AccountsApi#get_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Get all accounts user has access to Returns a list of accounts that the user has access to.
<span class="badge badge-outline-secondary">READ: Authress:Configuration</span> @param [Hash] opts the optional parameters @return [InlineResponse20011]
# File lib/authress_sdk/api/accounts_api.rb, line 122 def get_accounts(opts = {}) data, _status_code, _headers = get_accounts_with_http_info(opts) data end
Get all accounts user has access to Returns a list of accounts that the user has access to. <br><span class="badge badge-outline-secondary">READ: Authress:Configuration</span> @param [Hash] opts the optional parameters @return [Array<(InlineResponse20011
, Integer, Hash)>] InlineResponse20011
data, response status code and response headers
# File lib/authress_sdk/api/accounts_api.rb, line 131 def get_accounts_with_http_info(opts = {}) if @authress_client.config.debugging @authress_client.config.logger.debug 'Calling API: AccountsApi.get_accounts ...' end # resource path local_var_path = '/v1/accounts' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @authress_client.select_header_accept(['application/links+json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] return_type = opts[:return_type] || 'InlineResponse20011' auth_names = opts[:auth_names] || ['oauth2'] data, status_code, headers = @authress_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 => return_type) if @authress_client.config.debugging @authress_client.config.logger.debug "API called: AccountsApi#get_accounts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Link
a new account identity. An identity is a JWT subscriber sub and issuer iss. Only one account my be linked to a particular JWT combination. Allows calling the API with a federated token directly instead of using a client access key.
<span class="badge badge-outline-secondary">UPDATE: Authress:Configuration</span> @param body @param [Hash] opts the optional parameters @return [nil]
# File lib/authress_sdk/api/accounts_api.rb, line 173 def link_identity(body, opts = {}) link_identity_with_http_info(body, opts) nil end
Link
a new account identity. An identity is a JWT subscriber sub and issuer iss. Only one account my be linked to a particular JWT combination. Allows calling the API with a federated token directly instead of using a client access key. <br><span class="badge badge-outline-secondary">UPDATE: Authress:Configuration</span> @param body @param [Hash] opts the optional parameters @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
# File lib/authress_sdk/api/accounts_api.rb, line 183 def link_identity_with_http_info(body, opts = {}) if @authress_client.config.debugging @authress_client.config.logger.debug 'Calling API: AccountsApi.link_identity ...' end # verify the required parameter 'body' is set if @authress_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling AccountsApi.link_identity" end # resource path local_var_path = '/v1/identities' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Content-Type' header_params['Content-Type'] = @authress_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @authress_client.object_to_http_body(body) return_type = opts[:return_type] auth_names = opts[:auth_names] || ['oauth2'] data, status_code, headers = @authress_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 => return_type) if @authress_client.config.debugging @authress_client.config.logger.debug "API called: AccountsApi#link_identity\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end