Module: Core::Helpers::Accounts

Included in:
Controllers::Base
Defined in:
lib/core/helpers/accounts.rb

Overview

These helpers provide methods used to get and check accounts.

Author:

Instance Method Summary collapse

Instance Method Details

#accountObject

Raises a bad request error if the account if not found.

Raises:

  • (Virtuatable::API::Errors::BadRequest)

    the error raised when the account is not found.



10
11
12
13
14
15
# File 'lib/core/helpers/accounts.rb', line 10

def 
  return @account unless @account.nil?

  @account = token.authorization.
  @account
end

#account_id_not_foundObject



17
18
19
# File 'lib/core/helpers/accounts.rb', line 17

def 
  api_bad_request('session_id.required')
end