finapps 0.16.4.pre → 0.16.5.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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f8948493f08c9ab96840eb93b3e1ec85cdf2661b
|
4
|
+
data.tar.gz: 425075f3a334e7347c6242e01c270212bb55851f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 886edd4051a1e39d2884cf9bcc3652af458da46c1a8f89b630f2f2965c563e01e063e69f7f66ef906f047e3c198880eb34f13eda6c88fe79ecfdfb4e434a5ea2
|
7
|
+
data.tar.gz: da0a1c3633fd852d3ac6f4bfe823983ff551a623af609d3e08dc07fd693f974ed47278e72c346cd6eabd41035183198f63754d9837f1ef79e0b7bc7e7875d70d
|
@@ -3,14 +3,14 @@ module FinApps
|
|
3
3
|
|
4
4
|
require 'erb'
|
5
5
|
|
6
|
-
class
|
6
|
+
class AlertSettings < FinApps::REST::Resources
|
7
7
|
include FinApps::REST::Defaults
|
8
8
|
|
9
9
|
# @return [Hash, Array<String>]
|
10
|
-
def
|
10
|
+
def show
|
11
11
|
logger.debug "##{__method__.to_s} => Started"
|
12
12
|
|
13
|
-
end_point = Defaults::END_POINTS[:
|
13
|
+
end_point = Defaults::END_POINTS[:alert_settings_list]
|
14
14
|
logger.debug "##{__method__.to_s} => end_point: #{end_point}"
|
15
15
|
|
16
16
|
path = end_point
|
@@ -29,7 +29,7 @@ module FinApps
|
|
29
29
|
raise MissingArgumentsError.new 'Missing argument: params.' if params.blank?
|
30
30
|
logger.debug "##{__method__.to_s} => params: #{params.inspect}"
|
31
31
|
|
32
|
-
end_point = Defaults::END_POINTS[:
|
32
|
+
end_point = Defaults::END_POINTS[:alert_settings_update]
|
33
33
|
logger.debug "##{__method__.to_s} => end_point: #{end_point}"
|
34
34
|
|
35
35
|
path = end_point
|
data/lib/finapps/rest/budgets.rb
CHANGED
@@ -72,14 +72,9 @@ module FinApps
|
|
72
72
|
raise 'Unable to locate budget_amount for current category record.' unless category.key?('budget_amount')
|
73
73
|
budget_amount = category['budget_amount']
|
74
74
|
|
75
|
-
raise 'Unable to locate number of days for current category record.' unless category.key?('days')
|
76
|
-
days = category['days']
|
77
|
-
|
78
|
-
date_range_budget_amount = budget_amount.to_f * days.to_i
|
79
|
-
|
80
75
|
BudgetDetail.new({:category_id => category_id,
|
81
76
|
:category_name => category_name,
|
82
|
-
:budget_amount =>
|
77
|
+
:budget_amount => budget_amount,
|
83
78
|
:expense_amount => expense_amount(category_id, transactions)})
|
84
79
|
end
|
85
80
|
|
@@ -96,7 +91,7 @@ module FinApps
|
|
96
91
|
amount = 0
|
97
92
|
if category_id.present? && transactions.respond_to?(:find)
|
98
93
|
transaction = transactions.find { |t| t['category_id'] == category_id }
|
99
|
-
amount = transaction['
|
94
|
+
amount = transaction['expense_amount'].to_f if transaction.present? && transaction.key?('expense_amount')
|
100
95
|
end
|
101
96
|
amount
|
102
97
|
end
|
data/lib/finapps/rest/client.rb
CHANGED
@@ -8,7 +8,7 @@ module FinApps
|
|
8
8
|
attr_reader :connection, :users, :institutions, :user_institutions,
|
9
9
|
:transactions, :categories,
|
10
10
|
:budget_models, :budget_calculation, :budgets, :cashflows,
|
11
|
-
:alert, :alert_definition, :
|
11
|
+
:alert, :alert_definition, :alert_settings,
|
12
12
|
:rule_sets
|
13
13
|
|
14
14
|
# @param [String] company_identifier
|
@@ -205,7 +205,7 @@ module FinApps
|
|
205
205
|
@cashflows ||= FinApps::REST::Cashflows.new self
|
206
206
|
@alert ||= FinApps::REST::Alert.new self
|
207
207
|
@alert_definition ||= FinApps::REST::AlertDefinition.new self
|
208
|
-
@
|
208
|
+
@alert_settings ||= FinApps::REST::AlertSettings.new self
|
209
209
|
|
210
210
|
@rule_sets ||= FinApps::REST::Relevance::Rulesets.new self
|
211
211
|
end
|
@@ -68,8 +68,8 @@ module FinApps
|
|
68
68
|
:alert_definition_list => 'alerts/definitions',
|
69
69
|
:alert_definition_show => 'alerts/definitions/:alert_name',
|
70
70
|
|
71
|
-
:
|
72
|
-
:
|
71
|
+
:alert_settings_show => 'alerts/settings',
|
72
|
+
:alert_settings_update => 'alerts/settings',
|
73
73
|
|
74
74
|
:alert_preference_list => 'alerts/preferences',
|
75
75
|
:alert_preference_update => 'alerts/preferences'
|
data/lib/finapps/version.rb
CHANGED
data/lib/finapps.rb
CHANGED
@@ -30,7 +30,7 @@ require 'finapps/rest/budgets'
|
|
30
30
|
require 'finapps/rest/cashflows'
|
31
31
|
require 'finapps/rest/alert'
|
32
32
|
require 'finapps/rest/alert_definition'
|
33
|
-
require 'finapps/rest/
|
33
|
+
require 'finapps/rest/alert_settings'
|
34
34
|
|
35
35
|
require 'finapps/rest/relevance/rulesets'
|
36
36
|
|
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.16.
|
4
|
+
version: 0.16.5.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-02-
|
11
|
+
date: 2015-02-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -201,7 +201,7 @@ files:
|
|
201
201
|
- lib/finapps/middleware/response_logger.rb
|
202
202
|
- lib/finapps/rest/alert.rb
|
203
203
|
- lib/finapps/rest/alert_definition.rb
|
204
|
-
- lib/finapps/rest/
|
204
|
+
- lib/finapps/rest/alert_settings.rb
|
205
205
|
- lib/finapps/rest/budget_calculation.rb
|
206
206
|
- lib/finapps/rest/budget_models.rb
|
207
207
|
- lib/finapps/rest/budgets.rb
|