finapps 0.12.4.pre → 0.12.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: 073cb141be60cbb2a166117df7ed184136ff3ea4
4
- data.tar.gz: 9a9063b72dd41de8710d2864af143f2a1e496217
3
+ metadata.gz: b5fd4b0d6aa91c3abbeaff07e09d3a6f504435ac
4
+ data.tar.gz: a5ab9a3793e211a234c98cd625da117678fec610
5
5
  SHA512:
6
- metadata.gz: 2031a34e817c51519018c14e35306937a2f49fdd4ab3abca207d1889bd71e82d12bfbfea6e89fe122987629368be78a7f4a2966db3a6e99849ff4efda4d37ad8
7
- data.tar.gz: df953519bb8874d4f2de8074b8f473ffe9e7a7bd2e3d5fcb1d2e023d3111bc7d07fd99a3e6357c353bf2b5f0bf0685600eca8cf95a5d8853467f7401bf088ccf
6
+ metadata.gz: 16da377ece7f01c9a2d2c6f0b90afc017e5d4a5a128b8ba403314d0bc058391b36ee10746e1ebebdab361d270974d1b6d3acbfbeb48fb0c5c8a26b86adf76782
7
+ data.tar.gz: f8f41b490f5c53705b22ad15db360b4c8d36bbdc52e8d3c3f0a6ffa8e53344ab768531bec0827e9ae189714e5dbe5ae2d3797bb5fed63fe7bd47bb2539d6ded6
@@ -6,40 +6,21 @@ module FinApps
6
6
  class BudgetCalculation < FinApps::REST::Resources
7
7
  include FinApps::REST::Defaults
8
8
 
9
- # @param [Hash] params
10
- # @return [Array<Hash>, Array<String>]
11
- def create_old(params = {})
12
- logger.debug "##{__method__.to_s} => Started"
13
-
14
- raise MissingArgumentsError.new 'Missing argument: params.' if params.blank?
15
-
16
- end_point = Defaults::END_POINTS[:budget_calculation_create]
17
- logger.debug "##{__method__.to_s} => end_point: #{end_point}"
18
-
19
- path = end_point
20
- logger.debug "##{__method__.to_s} => path: #{path}"
21
-
22
- budget_calculation, error_messages = @client.send(path, :post)
23
- logger.debug "##{__method__.to_s} => Completed"
24
-
25
- return budget_calculation, error_messages
26
- end
27
-
28
- # @param [String] budget_model
9
+ # @param [String] budget_model_id
29
10
  # @param [Number] income
30
11
  # @return [Array<Hash>, Array<String>]
31
- def create(budget_model, income)
12
+ def create(budget_model_id, income)
32
13
  logger.debug "##{__method__.to_s} => Started"
33
14
 
34
- raise MissingArgumentsError.new 'Missing argument: budget_model.' if budget_model.blank?
35
- logger.debug "##{__method__.to_s} => budget_model: #{budget_model}"
15
+ raise MissingArgumentsError.new 'Missing argument: budget_model_id.' if budget_model_id.blank?
16
+ logger.debug "##{__method__.to_s} => budget_model: #{budget_model_id}"
36
17
  raise MissingArgumentsError.new 'Missing argument: income.' if income.blank?
37
18
  logger.debug "##{__method__.to_s} => income: #{income}"
38
19
 
39
20
  end_point = Defaults::END_POINTS[:budget_calculation_create]
40
21
  logger.debug "##{__method__.to_s} => end_point: #{end_point}"
41
22
 
42
- path = end_point.sub(':budget_model', ERB::Util.url_encode(budget_model)).sub(':income', ERB::Util.url_encode(income))
23
+ path = end_point.sub(':budget_model_id', ERB::Util.url_encode(budget_model_id)).sub(':income', ERB::Util.url_encode(income))
43
24
  logger.debug "##{__method__.to_s} => path: #{path}"
44
25
 
45
26
  budget_calculation, error_messages = @client.send(path, :get)
@@ -49,7 +49,7 @@ module FinApps
49
49
  :budget_models_list => 'budget/templates',
50
50
  :budget_models_show => 'budget/template/:budget_model_id',
51
51
 
52
- :budget_calculation_create => 'budget/template',
52
+ :budget_calculation_create => 'budget/template/:budget_model_id/:income',
53
53
  :budget_calculation_show => 'categories',
54
54
 
55
55
  :budget_update => 'budget',
@@ -1,3 +1,3 @@
1
1
  module FinApps
2
- VERSION = '0.12.4.pre'
2
+ VERSION = '0.12.5.pre'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: finapps
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.4.pre
4
+ version: 0.12.5.pre
5
5
  platform: ruby
6
6
  authors:
7
7
  - Erich Quintero