myfinance 1.2.0 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -1
- data/CHANGELOG.md +12 -12
- data/Gemfile.lock +1 -1
- data/lib/myfinance/resources/base.rb +1 -1
- data/lib/myfinance/resources/classification_center.rb +14 -0
- data/lib/myfinance/version.rb +1 -1
- data/spec/lib/myfinance/resources/classification_center_spec.rb +10 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e49d84feaf307f282f994b21f56cc226f43d8079
|
4
|
+
data.tar.gz: d2fcb49e144edf03733dfb3859b86e756d1534fa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9baa5c658a1a964658141f2f4fcdbb69c82c404134162aaca037e423ef52df92d5369663f5af385378cf2ca766941d5a05f810b8b989c81f883cb70c64306c2f
|
7
|
+
data.tar.gz: b470d45735a4139faa9f98839e023984d69b25b1434604153d85bead8a26db9e61cb0a47dbde84871160fd809c76c15984935f2080fb8850da3783c946e00aff
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
@@ -2,28 +2,28 @@
|
|
2
2
|
|
3
3
|
## v1.2.0
|
4
4
|
### Endpoints improvements
|
5
|
-
- The `#find_all` method of all endpoints that support filtering can now receive parameters to refine the results and paginate
|
5
|
+
- The `#find_all` method of all endpoints that support filtering can now receive parameters to refine the results and paginate.
|
6
6
|
### Deprecations
|
7
7
|
- No longer supports `#find_by`. Use `#find_all` instead, passing filters as a hash if needed.
|
8
8
|
### Fixes
|
9
|
-
- Params encoding set to Rack
|
9
|
+
- Params encoding set to Rack. This is necessary in order to fix an issue with Array parameters.
|
10
10
|
|
11
11
|
## v1.1.0
|
12
12
|
|
13
13
|
### New Endpoints
|
14
|
-
- Add endpoint Deposit Accounts filtering
|
15
|
-
- Add endpoint Entities filtering
|
14
|
+
- Add endpoint Deposit Accounts filtering.
|
15
|
+
- Add endpoint Entities filtering.
|
16
16
|
|
17
17
|
## v1.0.0
|
18
18
|
|
19
19
|
### New Endpoints
|
20
|
-
- Add Bank Statements endpoints
|
21
|
-
- Add Categories endpoints
|
22
|
-
- Add Credit Cards endpoints
|
23
|
-
- Add Credit Cards Transactions endpoints
|
24
|
-
- Add Reconciles endpoints
|
25
|
-
- More endpoints for Financial Accounts (`find_all`, `find`)
|
20
|
+
- Add Bank Statements endpoints.
|
21
|
+
- Add Categories endpoints.
|
22
|
+
- Add Credit Cards endpoints.
|
23
|
+
- Add Credit Cards Transactions endpoints.
|
24
|
+
- Add Reconciles endpoints.
|
25
|
+
- More endpoints for Financial Accounts (`find_all`, `find`).
|
26
26
|
### Improvements
|
27
|
-
- Implement search by attributes in Categories
|
27
|
+
- Implement search by attributes in Categories.
|
28
28
|
### Deprecations
|
29
|
-
- `FinancialAccount#destroy` and `#update` signatures are now `(entity_id, id, params)` instead of `(id, entity_id, params)
|
29
|
+
- `FinancialAccount#destroy` and `#update` signatures are now `(entity_id, id, params)` instead of `(id, entity_id, params)`.
|
data/Gemfile.lock
CHANGED
@@ -88,6 +88,20 @@ module Myfinance
|
|
88
88
|
def endpoint
|
89
89
|
"/classification_centers"
|
90
90
|
end
|
91
|
+
|
92
|
+
def build_search_endpoint(params)
|
93
|
+
query_string = query(params).join("&")
|
94
|
+
URI.encode("#{endpoint}?#{query_string}")
|
95
|
+
end
|
96
|
+
|
97
|
+
def query(params)
|
98
|
+
page = params.delete(:page)
|
99
|
+
per_page = params.delete(:per_page)
|
100
|
+
query = params.map { |key, value| "search[#{key}]=#{value}" }
|
101
|
+
query << "page=#{page}" if page
|
102
|
+
query << "per_page=#{per_page}" if per_page
|
103
|
+
query
|
104
|
+
end
|
91
105
|
end
|
92
106
|
end
|
93
107
|
end
|
data/lib/myfinance/version.rb
CHANGED
@@ -57,6 +57,16 @@ describe Myfinance::Resources::ClassificationCenter, vcr: true do
|
|
57
57
|
expect(url).to include("page=#{page}")
|
58
58
|
end
|
59
59
|
end
|
60
|
+
|
61
|
+
context "when per page" do
|
62
|
+
let(:search_params) { { per_page: 400, page: page, entity_id_equals: 3798, name_contains: "Centro" } }
|
63
|
+
subject { client.classification_centers.find_all(search_params) }
|
64
|
+
|
65
|
+
it "returns url" do
|
66
|
+
url = subject.response.request.base_url
|
67
|
+
expect(url).to include("per_page=#{400}")
|
68
|
+
end
|
69
|
+
end
|
60
70
|
end
|
61
71
|
|
62
72
|
context "when error" do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: myfinance
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eduardo Hertz
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2017-
|
14
|
+
date: 2017-04-12 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: typhoeus
|
@@ -376,7 +376,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
376
376
|
version: '0'
|
377
377
|
requirements: []
|
378
378
|
rubyforge_project:
|
379
|
-
rubygems_version: 2.6.
|
379
|
+
rubygems_version: 2.6.10
|
380
380
|
signing_key:
|
381
381
|
specification_version: 4
|
382
382
|
summary: A Ruby client for the Myfinance REST API
|