finapps 0.10.1.pre → 0.11.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/rest/cashflow.rb +34 -0
- data/lib/finapps/rest/client.rb +2 -1
- data/lib/finapps/rest/defaults.rb +2 -0
- data/lib/finapps/version.rb +1 -1
- data/lib/finapps.rb +1 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 60f381e8530bb34bc0ba5f61a70ad445191f3da5
|
4
|
+
data.tar.gz: a4a7b8e2e47bcd6e5dad044e7b3b7799b9553ce0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2ce9bd4ba149817f5aab8940745668edf3281b4b86404d8d66bf613a9e4f5725df450576c62a94336796300431ea28423849b4b44c42664d26c137aef0e20186
|
7
|
+
data.tar.gz: c5d66249bdc782f7a23ac5f5d60917108f79a4877ace1c357db27af20c0b4137552d9c4f8d71bd2be5ead8872ac82a6791d8eccf01d5be87cc784d3dd39d0197
|
@@ -0,0 +1,34 @@
|
|
1
|
+
module FinApps
|
2
|
+
module REST
|
3
|
+
|
4
|
+
require 'erb'
|
5
|
+
|
6
|
+
class Cashflow < FinApps::REST::Resources
|
7
|
+
include FinApps::REST::Defaults
|
8
|
+
|
9
|
+
# @param [Date] start_date
|
10
|
+
# @param [Date] end_date
|
11
|
+
# @return [Hash, Array<String>]
|
12
|
+
def show(start_date, end_date)
|
13
|
+
logger.debug "##{__method__.to_s} => Started"
|
14
|
+
|
15
|
+
raise MissingArgumentsError.new 'Missing argument: start_date.' if start_date.blank?
|
16
|
+
logger.debug "##{__method__.to_s} => start_date: #{start_date}"
|
17
|
+
raise MissingArgumentsError.new 'Missing argument: end_date.' if end_date.blank?
|
18
|
+
logger.debug "##{__method__.to_s} => end_date: #{end_date}"
|
19
|
+
|
20
|
+
end_point = Defaults::END_POINTS[:cashflow_show]
|
21
|
+
logger.debug "##{__method__.to_s} => end_point: #{end_point}"
|
22
|
+
|
23
|
+
path = end_point.sub(':start_date', ERB::Util.url_encode(start_date)).sub(':end_date', ERB::Util.url_encode(end_date))
|
24
|
+
logger.debug "##{__method__.to_s} => path: #{path}"
|
25
|
+
|
26
|
+
budget, error_messages = @client.send(path, :get)
|
27
|
+
|
28
|
+
logger.debug "##{__method__.to_s} => Completed"
|
29
|
+
return budget, error_messages
|
30
|
+
end
|
31
|
+
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
data/lib/finapps/rest/client.rb
CHANGED
@@ -5,7 +5,7 @@ module FinApps
|
|
5
5
|
include FinApps::Logging
|
6
6
|
include FinApps::REST::Connection
|
7
7
|
|
8
|
-
attr_reader :connection, :users, :institutions, :user_institutions, :transactions, :categories, :rule_sets, :budget_models, :budget
|
8
|
+
attr_reader :connection, :users, :institutions, :user_institutions, :transactions, :categories, :rule_sets, :budget_models, :budget, :cashflow
|
9
9
|
|
10
10
|
# @param [String] company_identifier
|
11
11
|
# @param [String] company_token
|
@@ -198,6 +198,7 @@ module FinApps
|
|
198
198
|
@rule_sets ||= FinApps::REST::Relevance::Rulesets.new self
|
199
199
|
@budget_models ||= FinApps::REST::BudgetModels.new self
|
200
200
|
@budget ||= FinApps::REST::Budget.new self
|
201
|
+
@cashflow ||= FinApps::REST::Cashflow.new self
|
201
202
|
end
|
202
203
|
|
203
204
|
end
|
@@ -52,6 +52,8 @@ module FinApps
|
|
52
52
|
:budget_create => 'budget/template',
|
53
53
|
:budget_show => 'budget/:start_date/:end_date',
|
54
54
|
|
55
|
+
:cashflow_show => 'cashflow/:start_date/:end_date',
|
56
|
+
|
55
57
|
:geo_record_by_ip_address => 'geo/maxmind/record/:ip_address',
|
56
58
|
:geo_record_by_region => 'geo/maxmind/record/:region/:city',
|
57
59
|
:geo_postal_record_by_region => 'geo/maxmind/postal/:region/:city',
|
data/lib/finapps/version.rb
CHANGED
data/lib/finapps.rb
CHANGED
@@ -29,6 +29,7 @@ require 'finapps/rest/inventory/feeds'
|
|
29
29
|
require 'finapps/rest/relevance/rulesets'
|
30
30
|
require 'finapps/rest/budget_models'
|
31
31
|
require 'finapps/rest/budget'
|
32
|
+
require 'finapps/rest/cashflow'
|
32
33
|
|
33
34
|
require 'finapps/rest/connection'
|
34
35
|
require 'finapps/rest/client'
|
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.11.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: 2015-01-
|
11
|
+
date: 2015-01-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -199,6 +199,7 @@ files:
|
|
199
199
|
- lib/finapps/middleware/response_logger.rb
|
200
200
|
- lib/finapps/rest/budget.rb
|
201
201
|
- lib/finapps/rest/budget_models.rb
|
202
|
+
- lib/finapps/rest/cashflow.rb
|
202
203
|
- lib/finapps/rest/categories.rb
|
203
204
|
- lib/finapps/rest/client.rb
|
204
205
|
- lib/finapps/rest/connection.rb
|