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: 2bca3313574c02b96b0f13bf03c99bea349b374c
4
- data.tar.gz: 8844c4843219e7b90dbd63e84d980dee3437f0f4
3
+ metadata.gz: f8948493f08c9ab96840eb93b3e1ec85cdf2661b
4
+ data.tar.gz: 425075f3a334e7347c6242e01c270212bb55851f
5
5
  SHA512:
6
- metadata.gz: 757abda5353f6d000dd7a2ce6c4b0f45a680d5475e0c6e45e84ac792a228734d255887daaa5d74d6b043aa6c27fbc36f375702b5ee18a1d6b6cbd01cb12a7c6c
7
- data.tar.gz: a077346e4a556b32d48f63a6d71dd4920817754e4109143ea59a527c6438e58e50618b10436e3f9476025c73b6c4ab065360d19bdbfb67f762ad46267cf47699
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 AlertSetting < FinApps::REST::Resources
6
+ class AlertSettings < FinApps::REST::Resources
7
7
  include FinApps::REST::Defaults
8
8
 
9
9
  # @return [Hash, Array<String>]
10
- def list
10
+ def show
11
11
  logger.debug "##{__method__.to_s} => Started"
12
12
 
13
- end_point = Defaults::END_POINTS[:alert_setting_list]
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[:alert_setting_update]
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
@@ -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 => date_range_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['expense'].to_f if transaction.present? && transaction.key?('expense')
94
+ amount = transaction['expense_amount'].to_f if transaction.present? && transaction.key?('expense_amount')
100
95
  end
101
96
  amount
102
97
  end
@@ -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, :alert_setting,
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
- @alert_setting ||= FinApps::REST::AlertSetting.new self
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
- :alert_setting_list => 'alerts/settings',
72
- :alert_setting_update => 'alerts/settings',
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'
@@ -1,3 +1,3 @@
1
1
  module FinApps
2
- VERSION = '0.16.4.pre'
2
+ VERSION = '0.16.5.pre'
3
3
  end
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/alert_setting'
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.pre
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-10 00:00:00.000000000 Z
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/alert_setting.rb
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