Class: FinApps::REST::AlertDefinitions

Inherits:
FinAppsCore::REST::Resources
  • Object
show all
Includes:
Utils::QueryBuilder
Defined in:
lib/finapps/rest/alert_definitions.rb

Constant Summary collapse

END_POINT =
'portfolio/alerts/definitions'

Instance Method Summary collapse

Methods included from Utils::QueryBuilder

#build_query_path

Instance Method Details

#list(params = nil) ⇒ Object



9
10
11
12
13
14
# File 'lib/finapps/rest/alert_definitions.rb', line 9

def list(params = nil)
  return super END_POINT if params.nil?
  fail FinAppsCore::InvalidArgumentsError, 'Invalid argument: params' unless params.is_a? Hash

  super build_query_path(END_POINT, params)
end

#show(id) ⇒ Object



16
17
18
19
20
21
# File 'lib/finapps/rest/alert_definitions.rb', line 16

def show(id)
  not_blank(id, :id)
  path = "#{END_POINT}/#{ERB::Util.url_encode(id)}"

  super nil, path
end