Class: FinApps::REST::Screenings
- Inherits:
-
FinAppsCore::REST::Resources
- Object
- FinAppsCore::REST::Resources
- FinApps::REST::Screenings
- Includes:
- Utils::QueryBuilder
- Defined in:
- lib/finapps/rest/screenings.rb
Overview
:nodoc:
Instance Method Summary collapse
- #create(params) ⇒ Object
- #destroy(id) ⇒ Object
- #last(consumer_id) ⇒ Object
- #list(params = nil) ⇒ Object
- #show(id) ⇒ Object
- #tenant_schemas ⇒ Object
- #update(id, params) ⇒ Object
Methods included from Utils::QueryBuilder
Instance Method Details
#create(params) ⇒ Object
30 31 32 33 |
# File 'lib/finapps/rest/screenings.rb', line 30 def create(params) not_blank(params, :params) super params end |
#destroy(id) ⇒ Object
50 51 52 53 54 |
# File 'lib/finapps/rest/screenings.rb', line 50 def destroy(id) not_blank(id, :session_id) super end |
#last(consumer_id) ⇒ Object
23 24 25 26 27 28 |
# File 'lib/finapps/rest/screenings.rb', line 23 def last(consumer_id) not_blank(consumer_id, :consumer_id) path = "#{end_point}/#{ERB::Util.url_encode(consumer_id)}/consumer" send_request_for_id path, :get, nil end |
#list(params = nil) ⇒ Object
35 36 37 38 39 40 |
# File 'lib/finapps/rest/screenings.rb', line 35 def list(params = nil) return super 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
11 12 13 14 15 16 |
# File 'lib/finapps/rest/screenings.rb', line 11 def show(id) not_blank(id, :session_id) path = "#{end_point}/#{ERB::Util.url_encode(id)}/resume" super(nil, path) end |
#tenant_schemas ⇒ Object
18 19 20 21 |
# File 'lib/finapps/rest/screenings.rb', line 18 def tenant_schemas path = 'schemas' send_request path, :get end |
#update(id, params) ⇒ Object
42 43 44 45 46 47 48 |
# File 'lib/finapps/rest/screenings.rb', line 42 def update(id, params) not_blank(id, :session_id) not_blank(params, :params) path = "#{end_point}/#{ERB::Util.url_encode(id)}" super params, path end |