Class: FinAppsCore::REST::Resources
Overview
Constant Summary
Utils::ParameterFilter::PROTECTED_KEYS
Instance Attribute Summary collapse
Instance Method Summary
collapse
#skip_sensitive_data
#not_blank
Constructor Details
13
14
15
16
17
|
# File 'lib/finapps_core/rest/resources.rb', line 13
def initialize(client)
not_blank(client, :client)
@client = client
@logger = client.logger
end
|
Instance Attribute Details
#client ⇒ Object
Returns the value of attribute client.
9
10
11
|
# File 'lib/finapps_core/rest/resources.rb', line 9
def client
@client
end
|
#logger ⇒ Object
Returns the value of attribute logger.
9
10
11
|
# File 'lib/finapps_core/rest/resources.rb', line 9
def logger
@logger
end
|
Instance Method Details
#create(params = {}, path = nil) ⇒ Object
24
25
26
|
# File 'lib/finapps_core/rest/resources.rb', line 24
def create(params={}, path=nil)
request_with_body(path, :post, params)
end
|
#destroy(id = nil, path = nil) ⇒ Object
36
37
38
|
# File 'lib/finapps_core/rest/resources.rb', line 36
def destroy(id=nil, path=nil)
request_without_body(path, :delete, id)
end
|
#list(path = nil) ⇒ Object
19
20
21
22
|
# File 'lib/finapps_core/rest/resources.rb', line 19
def list(path=nil)
path = end_point.to_s if path.nil?
request_with_body(path, :get, {})
end
|
#show(id = nil, path = nil) ⇒ Object
32
33
34
|
# File 'lib/finapps_core/rest/resources.rb', line 32
def show(id=nil, path=nil)
request_without_body(path, :get, id)
end
|
#update(params = {}, path = nil) ⇒ Object
28
29
30
|
# File 'lib/finapps_core/rest/resources.rb', line 28
def update(params={}, path=nil)
request_with_body(path, :put, params)
end
|