finapps 0.3.6.pre → 0.5.0.pre
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/finapps.rb +7 -2
- data/lib/finapps/rest/defaults.rb +21 -5
- data/lib/finapps/rest/errors.rb +3 -3
- data/lib/finapps/rest/geo.rb +110 -0
- data/lib/finapps/rest/institutions.rb +1 -1
- data/lib/finapps/rest/inventory/feed_categories.rb +43 -0
- data/lib/finapps/rest/inventory/feeds.rb +46 -0
- data/lib/finapps/rest/relevance.rb +98 -0
- data/lib/finapps/rest/relevance/rulesets.rb +69 -0
- data/lib/finapps/rest/transactions.rb +1 -1
- data/lib/finapps/version.rb +1 -1
- metadata +7 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f5bd908a13377be582f60b68db7602501cc43f30
|
4
|
+
data.tar.gz: 424168e5f112fa63bb917884751c8a1583c28049
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4fba1683ac434febb6533577132c4fdef578427009f359f3504e0795bef753819b22d10a03cb9539fcce5fa1227ee723ce3a528f8e5d4e10d71cbf3139aacc9c
|
7
|
+
data.tar.gz: 81403ff882d9d8c085565a889129361bbc570b84c7136c47eb5f1938dc42e19ec79b4cbecfc45671087f8b2dba151464ff9b94cf395baab4a4ca1b970318b724
|
data/lib/finapps.rb
CHANGED
@@ -7,14 +7,15 @@ require 'faraday_middleware'
|
|
7
7
|
require 'typhoeus'
|
8
8
|
require 'typhoeus/adapters/faraday'
|
9
9
|
|
10
|
-
require 'finapps/rest/defaults'
|
11
|
-
require 'finapps/rest/errors'
|
12
10
|
require 'finapps/utils/logging'
|
13
11
|
require 'finapps/utils/utils'
|
14
12
|
require 'finapps/middleware/api_token'
|
15
13
|
require 'finapps/middleware/raise_http_exceptions'
|
16
14
|
require 'finapps/middleware/response_logger'
|
17
15
|
|
16
|
+
require 'finapps/rest/defaults'
|
17
|
+
require 'finapps/rest/errors'
|
18
|
+
|
18
19
|
require 'finapps/rest/resource'
|
19
20
|
require 'finapps/rest/resources'
|
20
21
|
require 'finapps/rest/users'
|
@@ -22,6 +23,10 @@ require 'finapps/rest/institutions'
|
|
22
23
|
require 'finapps/rest/user_institutions'
|
23
24
|
require 'finapps/rest/transactions'
|
24
25
|
require 'finapps/rest/categories'
|
26
|
+
require 'finapps/rest/geo'
|
27
|
+
require 'finapps/rest/inventory/feed_categories'
|
28
|
+
require 'finapps/rest/inventory/feeds'
|
29
|
+
require 'finapps/rest/relevance/rulesets'
|
25
30
|
|
26
31
|
require 'finapps/rest/connection'
|
27
32
|
require 'finapps/rest/client'
|
@@ -24,10 +24,11 @@ module FinApps
|
|
24
24
|
|
25
25
|
END_POINTS = {
|
26
26
|
:users_create => 'users/new',
|
27
|
-
:users_login => 'users/login',
|
28
27
|
:users_delete => 'users/:public_id/delete',
|
28
|
+
:users_login => 'users/login',
|
29
29
|
|
30
|
-
|
30
|
+
|
31
|
+
:institutions_list => 'institutions/:search_term/search',
|
31
32
|
:institutions_form => 'institutions/:site_id/form',
|
32
33
|
|
33
34
|
:user_institutions_list => 'institutions/user',
|
@@ -36,11 +37,26 @@ module FinApps
|
|
36
37
|
:user_institutions_status => 'institutions/user/:user_institution_id/status',
|
37
38
|
:user_institutions_refresh => 'institutions/user/refresh',
|
38
39
|
|
39
|
-
:
|
40
|
+
:transactions_list => 'transactions/search',
|
41
|
+
|
42
|
+
:categories_list => 'categories',
|
43
|
+
|
44
|
+
:geo_record_by_ip_address => 'geo/maxmind/record/:ip_address',
|
45
|
+
:geo_record_by_region => 'geo/maxmind/record/:region/:city',
|
46
|
+
:geo_postal_record_by_region => 'geo/maxmind/postal/:region/:city',
|
47
|
+
:geo_postal_record_by_postal_code => 'geo/maxmind/postal/:postal',
|
48
|
+
:geo_us_record_by_region => 'geo/us/region/:region/:city',
|
49
|
+
|
50
|
+
:relevance_rulesets_list => 'relevance/ruleset/names',
|
51
|
+
:relevance_rulesets_show => 'relevance/ruleset/:ruleset_name',
|
52
|
+
:relevance_rulesets_run => 'relevance/run',
|
53
|
+
|
54
|
+
:inventory_feeds_list => 'inventory/feed/names',
|
55
|
+
:inventory_feed_show => 'inventory/feed/:feed_name',
|
40
56
|
|
41
|
-
:
|
57
|
+
:inventory_feed_categories_list => 'inventory/feed/categories/unique/:feed_name',
|
58
|
+
:inventory_feed_categories_list_by_region => 'inventory/feed/categories/unique/:feed_name/:region/:city'
|
42
59
|
|
43
|
-
:categories_list => 'categories'
|
44
60
|
|
45
61
|
}.freeze
|
46
62
|
|
data/lib/finapps/rest/errors.rb
CHANGED
@@ -38,10 +38,10 @@ module FinApps
|
|
38
38
|
|
39
39
|
body = response_body
|
40
40
|
if body.present?
|
41
|
-
if body.
|
41
|
+
if body.key?(:error_messages)
|
42
42
|
message_array = body[:error_messages]
|
43
43
|
else
|
44
|
-
message_array = body[:messages] if body.
|
44
|
+
message_array = body[:messages] if body.key?(:messages)
|
45
45
|
end
|
46
46
|
end
|
47
47
|
|
@@ -52,7 +52,7 @@ module FinApps
|
|
52
52
|
def response_body
|
53
53
|
body = nil
|
54
54
|
if @response.present?
|
55
|
-
@response.
|
55
|
+
@response.key?(:body) ? body = @response[:body] : body = @response
|
56
56
|
end
|
57
57
|
|
58
58
|
body
|
@@ -0,0 +1,110 @@
|
|
1
|
+
module FinApps
|
2
|
+
module REST
|
3
|
+
|
4
|
+
require 'erb'
|
5
|
+
|
6
|
+
class Geo < FinApps::REST::Resources
|
7
|
+
|
8
|
+
def record_by_ip_address(ip_address)
|
9
|
+
logger.debug "##{__method__.to_s} => Started"
|
10
|
+
|
11
|
+
raise MissingArgumentsError.new 'Missing argument: ip_address.' if ip_address.blank?
|
12
|
+
logger.debug "##{__method__.to_s} => ip_address: #{ip_address}"
|
13
|
+
|
14
|
+
end_point = Defaults::END_POINTS[:geo_record_by_ip_address]
|
15
|
+
logger.debug "##{__method__.to_s} => end_point: #{end_point}"
|
16
|
+
|
17
|
+
path = end_point.sub ':ip_address', ERB::Util.url_encode(ip_address)
|
18
|
+
logger.debug "##{__method__.to_s} => path: #{path}"
|
19
|
+
|
20
|
+
results, error_messages = @client.send(path, :get)
|
21
|
+
|
22
|
+
logger.debug "##{__method__.to_s} => Completed"
|
23
|
+
return results, error_messages
|
24
|
+
end
|
25
|
+
|
26
|
+
def record_by_region(region, city)
|
27
|
+
logger.debug "##{__method__.to_s} => Started"
|
28
|
+
|
29
|
+
raise MissingArgumentsError.new 'Missing argument: region.' if region.blank?
|
30
|
+
logger.debug "##{__method__.to_s} => region: #{region}"
|
31
|
+
raise MissingArgumentsError.new 'Missing argument: city.' if city.blank?
|
32
|
+
logger.debug "##{__method__.to_s} => city: #{city}"
|
33
|
+
|
34
|
+
end_point = Defaults::END_POINTS[:geo_record_by_region]
|
35
|
+
logger.debug "##{__method__.to_s} => end_point: #{end_point}"
|
36
|
+
|
37
|
+
path = end_point.sub ':region', ERB::Util.url_encode(region)
|
38
|
+
path = path.sub ':city', ERB::Util.url_encode(city)
|
39
|
+
logger.debug "##{__method__.to_s} => path: #{path}"
|
40
|
+
|
41
|
+
results, error_messages = @client.send(path, :get)
|
42
|
+
|
43
|
+
logger.debug "##{__method__.to_s} => Completed"
|
44
|
+
return results, error_messages
|
45
|
+
end
|
46
|
+
|
47
|
+
def postal_record_by_region(region, city)
|
48
|
+
logger.debug "##{__method__.to_s} => Started"
|
49
|
+
|
50
|
+
raise MissingArgumentsError.new 'Missing argument: region.' if region.blank?
|
51
|
+
logger.debug "##{__method__.to_s} => region: #{region}"
|
52
|
+
raise MissingArgumentsError.new 'Missing argument: city.' if city.blank?
|
53
|
+
logger.debug "##{__method__.to_s} => city: #{city}"
|
54
|
+
|
55
|
+
end_point = Defaults::END_POINTS[:geo_postal_record_by_region]
|
56
|
+
logger.debug "##{__method__.to_s} => end_point: #{end_point}"
|
57
|
+
|
58
|
+
path = end_point.sub ':region', ERB::Util.url_encode(region)
|
59
|
+
path = path.sub ':city', ERB::Util.url_encode(city)
|
60
|
+
logger.debug "##{__method__.to_s} => path: #{path}"
|
61
|
+
|
62
|
+
results, error_messages = @client.send(path, :get)
|
63
|
+
|
64
|
+
logger.debug "##{__method__.to_s} => Completed"
|
65
|
+
return results, error_messages
|
66
|
+
end
|
67
|
+
|
68
|
+
def postal_record_by_postal_code(postal)
|
69
|
+
logger.debug "##{__method__.to_s} => Started"
|
70
|
+
|
71
|
+
raise MissingArgumentsError.new 'Missing argument: postal.' if postal.blank?
|
72
|
+
logger.debug "##{__method__.to_s} => postal: #{postal}"
|
73
|
+
|
74
|
+
end_point = Defaults::END_POINTS[:geo_postal_record_by_postal_code]
|
75
|
+
logger.debug "##{__method__.to_s} => end_point: #{end_point}"
|
76
|
+
|
77
|
+
path = end_point.sub ':postal', ERB::Util.url_encode(postal)
|
78
|
+
logger.debug "##{__method__.to_s} => path: #{path}"
|
79
|
+
|
80
|
+
results, error_messages = @client.send(path, :get)
|
81
|
+
|
82
|
+
logger.debug "##{__method__.to_s} => Completed"
|
83
|
+
return results, error_messages
|
84
|
+
end
|
85
|
+
|
86
|
+
def us_record_by_region(region, city)
|
87
|
+
logger.debug "##{__method__.to_s} => Started"
|
88
|
+
|
89
|
+
raise MissingArgumentsError.new 'Missing argument: region.' if region.blank?
|
90
|
+
logger.debug "##{__method__.to_s} => region: #{region}"
|
91
|
+
raise MissingArgumentsError.new 'Missing argument: city.' if city.blank?
|
92
|
+
logger.debug "##{__method__.to_s} => city: #{city}"
|
93
|
+
|
94
|
+
end_point = Defaults::END_POINTS[:geo_us_record_by_region]
|
95
|
+
logger.debug "##{__method__.to_s} => end_point: #{end_point}"
|
96
|
+
|
97
|
+
path = end_point.sub ':region', ERB::Util.url_encode(region)
|
98
|
+
path = path.sub ':city', ERB::Util.url_encode(city)
|
99
|
+
logger.debug "##{__method__.to_s} => path: #{path}"
|
100
|
+
|
101
|
+
results, error_messages = @client.send(path, :get)
|
102
|
+
|
103
|
+
logger.debug "##{__method__.to_s} => Completed"
|
104
|
+
return results, error_messages
|
105
|
+
end
|
106
|
+
|
107
|
+
end
|
108
|
+
|
109
|
+
end
|
110
|
+
end
|
@@ -14,7 +14,7 @@ module FinApps
|
|
14
14
|
raise MissingArgumentsError.new 'Missing argument: term.' if term.blank?
|
15
15
|
logger.debug "##{__method__.to_s} => term: #{term}"
|
16
16
|
|
17
|
-
end_point = Defaults::END_POINTS[:
|
17
|
+
end_point = Defaults::END_POINTS[:institutions_list]
|
18
18
|
logger.debug "##{__method__.to_s} => end_point: #{end_point}"
|
19
19
|
|
20
20
|
path = end_point.sub ':search_term', ERB::Util.url_encode(term)
|
@@ -0,0 +1,43 @@
|
|
1
|
+
module FinApps
|
2
|
+
module REST
|
3
|
+
module Inventory
|
4
|
+
|
5
|
+
require 'erb'
|
6
|
+
|
7
|
+
class FeedCategories < FinApps::REST::Resources
|
8
|
+
|
9
|
+
def list(feed_name, region = nil, city = nil)
|
10
|
+
logger.debug "##{__method__.to_s} => Started"
|
11
|
+
|
12
|
+
raise MissingArgumentsError.new 'Missing argument: feed_name.' if feed_name.blank?
|
13
|
+
logger.debug "##{__method__.to_s} => feed_name: #{feed_name}"
|
14
|
+
|
15
|
+
raise MissingArgumentsError.new 'Missing argument: region.' if region.blank? && city.present?
|
16
|
+
logger.debug "##{__method__.to_s} => region: #{region}"
|
17
|
+
|
18
|
+
raise MissingArgumentsError.new 'Missing argument: city.' if region.present? && city.blank?
|
19
|
+
logger.debug "##{__method__.to_s} => city: #{city}"
|
20
|
+
|
21
|
+
if region.present? && city.present?
|
22
|
+
end_point = Defaults::END_POINTS[:inventory_feed_categories_list_by_region]
|
23
|
+
path = end_point.sub ':feed_name', ERB::Util.url_encode(feed_name)
|
24
|
+
path = path.sub ':region', ERB::Util.url_encode(region)
|
25
|
+
path = path.sub ':city', ERB::Util.url_encode(city)
|
26
|
+
else
|
27
|
+
end_point = Defaults::END_POINTS[:inventory_feed_categories_list]
|
28
|
+
path = end_point.sub ':feed_name', ERB::Util.url_encode(feed_name)
|
29
|
+
end
|
30
|
+
logger.debug "##{__method__.to_s} => end_point: #{end_point}"
|
31
|
+
logger.debug "##{__method__.to_s} => path: #{path}"
|
32
|
+
|
33
|
+
results, error_messages = @client.send(path, :get)
|
34
|
+
|
35
|
+
logger.debug "##{__method__.to_s} => Completed"
|
36
|
+
return results, error_messages
|
37
|
+
end
|
38
|
+
|
39
|
+
end
|
40
|
+
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
module FinApps
|
2
|
+
module REST
|
3
|
+
module Inventory
|
4
|
+
|
5
|
+
require 'erb'
|
6
|
+
|
7
|
+
class Feeds < FinApps::REST::Resources
|
8
|
+
|
9
|
+
def list
|
10
|
+
logger.debug "##{__method__.to_s} => Started"
|
11
|
+
|
12
|
+
end_point = Defaults::END_POINTS[:inventory_feeds_list]
|
13
|
+
logger.debug "##{__method__.to_s} => end_point: #{end_point}"
|
14
|
+
|
15
|
+
path = end_point
|
16
|
+
logger.debug "##{__method__.to_s} => path: #{path}"
|
17
|
+
|
18
|
+
results, error_messages = @client.send(path, :get)
|
19
|
+
|
20
|
+
logger.debug "##{__method__.to_s} => Completed"
|
21
|
+
return results, error_messages
|
22
|
+
end
|
23
|
+
|
24
|
+
def show(feed_name)
|
25
|
+
logger.debug "##{__method__.to_s} => Started"
|
26
|
+
|
27
|
+
raise MissingArgumentsError.new 'Missing argument: feed_name.' if feed_name.blank?
|
28
|
+
logger.debug "##{__method__.to_s} => feed_name: #{feed_name}"
|
29
|
+
|
30
|
+
end_point = Defaults::END_POINTS[:inventory_feed_show]
|
31
|
+
logger.debug "##{__method__.to_s} => end_point: #{end_point}"
|
32
|
+
|
33
|
+
path = end_point.sub ':feed_name', ERB::Util.url_encode(feed_name)
|
34
|
+
logger.debug "##{__method__.to_s} => path: #{path}"
|
35
|
+
|
36
|
+
results, error_messages = @client.send(path, :get)
|
37
|
+
|
38
|
+
logger.debug "##{__method__.to_s} => Completed"
|
39
|
+
return results, error_messages
|
40
|
+
end
|
41
|
+
|
42
|
+
end
|
43
|
+
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
@@ -0,0 +1,98 @@
|
|
1
|
+
module FinApps
|
2
|
+
module REST
|
3
|
+
|
4
|
+
require 'erb'
|
5
|
+
|
6
|
+
class Relevance < FinApps::REST::Resources
|
7
|
+
|
8
|
+
def rulesets
|
9
|
+
logger.debug "##{__method__.to_s} => Started"
|
10
|
+
|
11
|
+
end_point = Defaults::END_POINTS[:relevance_rulesets]
|
12
|
+
logger.debug "##{__method__.to_s} => end_point: #{end_point}"
|
13
|
+
|
14
|
+
path = end_point
|
15
|
+
logger.debug "##{__method__.to_s} => path: #{path}"
|
16
|
+
|
17
|
+
results, error_messages = @client.send(path, :get)
|
18
|
+
|
19
|
+
logger.debug "##{__method__.to_s} => Completed"
|
20
|
+
return results, error_messages
|
21
|
+
end
|
22
|
+
|
23
|
+
def ruleset_by_name(ruleset_name)
|
24
|
+
logger.debug "##{__method__.to_s} => Started"
|
25
|
+
|
26
|
+
raise MissingArgumentsError.new 'Missing argument: ruleset_name.' if ruleset_name.blank?
|
27
|
+
logger.debug "##{__method__.to_s} => ruleset_name: #{ruleset_name}"
|
28
|
+
|
29
|
+
end_point = Defaults::END_POINTS[:relevance_ruleset_by_name]
|
30
|
+
logger.debug "##{__method__.to_s} => end_point: #{end_point}"
|
31
|
+
|
32
|
+
path = end_point.sub ':ruleset_name', ERB::Util.url_encode(ruleset_name)
|
33
|
+
logger.debug "##{__method__.to_s} => path: #{path}"
|
34
|
+
|
35
|
+
results, error_messages = @client.send(path, :get)
|
36
|
+
|
37
|
+
logger.debug "##{__method__.to_s} => Completed"
|
38
|
+
return results, error_messages
|
39
|
+
end
|
40
|
+
|
41
|
+
def update_ruleset(params = {})
|
42
|
+
logger.debug "##{__method__.to_s} => Started"
|
43
|
+
|
44
|
+
raise MissingArgumentsError.new 'Missing argument: params.' if params.blank?
|
45
|
+
logger.debug "##{__method__.to_s} => params: #{params.inspect}"
|
46
|
+
|
47
|
+
end_point = Defaults::END_POINTS[:relevance_update_ruleset]
|
48
|
+
logger.debug "##{__method__.to_s} => end_point: #{end_point}"
|
49
|
+
|
50
|
+
path = end_point
|
51
|
+
logger.debug "##{__method__.to_s} => path: #{path}"
|
52
|
+
|
53
|
+
results, error_messages = @client.send(path, :post, params)
|
54
|
+
|
55
|
+
logger.debug "##{__method__.to_s} => Completed"
|
56
|
+
return results, error_messages
|
57
|
+
end
|
58
|
+
|
59
|
+
def run_ruleset_by_name(params = {})
|
60
|
+
logger.debug "##{__method__.to_s} => Started"
|
61
|
+
|
62
|
+
raise MissingArgumentsError.new 'Missing argument: params.' if params.blank?
|
63
|
+
logger.debug "##{__method__.to_s} => params: #{params.inspect}"
|
64
|
+
|
65
|
+
end_point = Defaults::END_POINTS[:relevance_run_ruleset_by_name]
|
66
|
+
logger.debug "##{__method__.to_s} => end_point: #{end_point}"
|
67
|
+
|
68
|
+
path = end_point
|
69
|
+
logger.debug "##{__method__.to_s} => path: #{path}"
|
70
|
+
|
71
|
+
results, error_messages = @client.send(path, :post, params)
|
72
|
+
|
73
|
+
logger.debug "##{__method__.to_s} => Completed"
|
74
|
+
return results, error_messages
|
75
|
+
end
|
76
|
+
|
77
|
+
def run_ruleset_custom(params = {})
|
78
|
+
logger.debug "##{__method__.to_s} => Started"
|
79
|
+
|
80
|
+
raise MissingArgumentsError.new 'Missing argument: params.' if params.blank?
|
81
|
+
logger.debug "##{__method__.to_s} => params: #{params.inspect}"
|
82
|
+
|
83
|
+
end_point = Defaults::END_POINTS[:relevance_run_ruleset_custom]
|
84
|
+
logger.debug "##{__method__.to_s} => end_point: #{end_point}"
|
85
|
+
|
86
|
+
path = end_point
|
87
|
+
logger.debug "##{__method__.to_s} => path: #{path}"
|
88
|
+
|
89
|
+
results, error_messages = @client.send(path, :post, params)
|
90
|
+
|
91
|
+
logger.debug "##{__method__.to_s} => Completed"
|
92
|
+
return results, error_messages
|
93
|
+
end
|
94
|
+
|
95
|
+
end
|
96
|
+
|
97
|
+
end
|
98
|
+
end
|
@@ -0,0 +1,69 @@
|
|
1
|
+
module FinApps
|
2
|
+
module REST
|
3
|
+
module Relevance
|
4
|
+
|
5
|
+
require 'erb'
|
6
|
+
|
7
|
+
class Rulesets < FinApps::REST::Resources
|
8
|
+
|
9
|
+
def list
|
10
|
+
logger.debug "##{__method__.to_s} => Started"
|
11
|
+
|
12
|
+
end_point = Defaults::END_POINTS[:relevance_rulesets_list]
|
13
|
+
logger.debug "##{__method__.to_s} => end_point: #{end_point}"
|
14
|
+
|
15
|
+
path = end_point
|
16
|
+
logger.debug "##{__method__.to_s} => path: #{path}"
|
17
|
+
|
18
|
+
results, error_messages = @client.send(path, :get)
|
19
|
+
|
20
|
+
logger.debug "##{__method__.to_s} => Completed"
|
21
|
+
return results, error_messages
|
22
|
+
end
|
23
|
+
|
24
|
+
def show(ruleset_name)
|
25
|
+
logger.debug "##{__method__.to_s} => Started"
|
26
|
+
|
27
|
+
raise MissingArgumentsError.new 'Missing argument: ruleset_name.' if ruleset_name.blank?
|
28
|
+
logger.debug "##{__method__.to_s} => ruleset_name: #{ruleset_name}"
|
29
|
+
|
30
|
+
end_point = Defaults::END_POINTS[:relevance_rulesets_show]
|
31
|
+
logger.debug "##{__method__.to_s} => end_point: #{end_point}"
|
32
|
+
|
33
|
+
path = end_point.sub ':ruleset_name', ERB::Util.url_encode(ruleset_name)
|
34
|
+
logger.debug "##{__method__.to_s} => path: #{path}"
|
35
|
+
|
36
|
+
results, error_messages = @client.send(path, :get)
|
37
|
+
|
38
|
+
logger.debug "##{__method__.to_s} => Completed"
|
39
|
+
return results, error_messages
|
40
|
+
end
|
41
|
+
|
42
|
+
def run(params = {})
|
43
|
+
logger.debug "##{__method__.to_s} => Started"
|
44
|
+
|
45
|
+
raise MissingArgumentsError.new 'Missing argument: params.' if params.blank?
|
46
|
+
logger.debug "##{__method__.to_s} => params: #{params.inspect}"
|
47
|
+
|
48
|
+
end_point = Defaults::END_POINTS[:relevance_rulesets_run]
|
49
|
+
logger.debug "##{__method__.to_s} => end_point: #{end_point}"
|
50
|
+
|
51
|
+
path = end_point
|
52
|
+
logger.debug "##{__method__.to_s} => path: #{path}"
|
53
|
+
|
54
|
+
# ToDo: API is expecting a valid variable_script json value
|
55
|
+
unless params.key?(:variable_script)
|
56
|
+
params.merge!(:variable_script => "{\"a\": \"a\"}")
|
57
|
+
end
|
58
|
+
|
59
|
+
results, error_messages = @client.send(path, :post, params)
|
60
|
+
|
61
|
+
logger.debug "##{__method__.to_s} => Completed"
|
62
|
+
return results, error_messages
|
63
|
+
end
|
64
|
+
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
68
|
+
end
|
69
|
+
end
|
data/lib/finapps/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: finapps
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0.pre
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Erich Quintero
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-09-
|
11
|
+
date: 2014-09-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -202,7 +202,12 @@ files:
|
|
202
202
|
- lib/finapps/rest/connection.rb
|
203
203
|
- lib/finapps/rest/defaults.rb
|
204
204
|
- lib/finapps/rest/errors.rb
|
205
|
+
- lib/finapps/rest/geo.rb
|
205
206
|
- lib/finapps/rest/institutions.rb
|
207
|
+
- lib/finapps/rest/inventory/feed_categories.rb
|
208
|
+
- lib/finapps/rest/inventory/feeds.rb
|
209
|
+
- lib/finapps/rest/relevance.rb
|
210
|
+
- lib/finapps/rest/relevance/rulesets.rb
|
206
211
|
- lib/finapps/rest/resource.rb
|
207
212
|
- lib/finapps/rest/resources.rb
|
208
213
|
- lib/finapps/rest/transactions.rb
|