class AuthressSdk::AccountsApi

Attributes

authress_client[RW]

Public Class Methods

new(authress_client = AuthressClient.default) click to toggle source
# 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(account_id, opts = {}) click to toggle source

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_account_identities(opts = {}) click to toggle source

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_account_identities_with_http_info(opts = {}) click to toggle source

Get all linked identities for this account. Returns a list of identities linked for this account. &lt;br&gt;&lt;span class&#x3D;&quot;badge badge-outline-secondary&quot;&gt;READ: Authress:Configuration&lt;/span&gt; @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_with_http_info(account_id, opts = {}) click to toggle source

Get account information. Includes the original configuration information. &lt;br&gt;&lt;span class&#x3D;&quot;badge badge-outline-secondary&quot;&gt;READ: Authress:Configuration&lt;/span&gt; @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_accounts(opts = {}) click to toggle source

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_accounts_with_http_info(opts = {}) click to toggle source

Get all accounts user has access to Returns a list of accounts that the user has access to. &lt;br&gt;&lt;span class&#x3D;&quot;badge badge-outline-secondary&quot;&gt;READ: Authress:Configuration&lt;/span&gt; @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