Module: Gerry::Api::Accounts

Included in:
Client
Defined in:
lib/gerry/api/accounts.rb

Instance Method Summary collapse

Instance Method Details

#account_capabilities(options = []) ⇒ Hash

Get the global capabilities that are enabled for the calling user.

Parameters:

  • options (Array) (defaults to: [])

    the query parameters.

Returns:

  • (Hash)

    the account capabilities.



17
18
19
20
21
22
23
24
25
26
# File 'lib/gerry/api/accounts.rb', line 17

def (options = [])
  url = '/accounts/self/capabilities'

  if options.empty?
    return get(url)
  end

  options = map_options(options)
  get("#{url}?#{options}")
end

#account_info(account_id) ⇒ Hash

Get the account info for the specified account ID.

Parameters:

  • account_id (String)

    the account.

Returns:

  • (Hash)

    the account info.



8
9
10
11
# File 'lib/gerry/api/accounts.rb', line 8

def ()
  url = "/accounts/#{}"
  get(url)
end

#groups_for_account(account_id) ⇒ Enumberable

Get all groups that contain the specified account as a member

Parameters:

  • account_id (String)

    the account

Returns:

  • (Enumberable)

    the groups



32
33
34
35
# File 'lib/gerry/api/accounts.rb', line 32

def ()
  url = "/accounts/#{}/groups/"
  get(url)
end