belvo 0.20.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +6 -2
- data/lib/belvo/http.rb +2 -10
- data/lib/belvo/resources.rb +1 -5
- data/lib/belvo/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b8ddc3b560df375b13cdfba4173c362979192231a40cc3c248bd3436f6c19790
|
4
|
+
data.tar.gz: a8a03709a98a0b0a1d59f57255a45e14631684199b1ebf1c5844d56da66b3860
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 21f0eff9a499c6d7de8aa2b730224853eee43abdc91ac2e8a1cd3e700e3238f6c969f5fa75f3b129405d437123c65e2dd1ffac9bcabad01f6140790adbd67d58
|
7
|
+
data.tar.gz: 8aa63d37ed8b551b83483b0cd1ca08f9c72b477ee45781ad6a0baceb81c1be03adb689aa1fbc1105e299ead79f8b814e6d5676753fcf26deae2efc8563ed8299
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -53,7 +53,9 @@ begin
|
|
53
53
|
|
54
54
|
belvo.accounts.retrieve(link: link_id)
|
55
55
|
|
56
|
-
|
56
|
+
belvo.accounts.list.each do |item|
|
57
|
+
puts item
|
58
|
+
end
|
57
59
|
rescue Belvo::RequestError => e
|
58
60
|
puts e.status_code
|
59
61
|
puts e.detail
|
@@ -83,7 +85,9 @@ begin
|
|
83
85
|
|
84
86
|
belvo.accounts.retrieve(link: new_link['id'])
|
85
87
|
|
86
|
-
|
88
|
+
belvo.accounts.list.each do |item|
|
89
|
+
puts item
|
90
|
+
end
|
87
91
|
rescue Belvo::RequestError => e
|
88
92
|
puts e.status_code
|
89
93
|
puts e.detail
|
data/lib/belvo/http.rb
CHANGED
@@ -91,16 +91,8 @@ module Belvo
|
|
91
91
|
# @raise [RequestError] If response code is different than 2XX
|
92
92
|
def list(path, params: nil)
|
93
93
|
params = {} if params.nil?
|
94
|
-
|
95
|
-
|
96
|
-
response.body['results'].each do |item|
|
97
|
-
yield item if block_given?
|
98
|
-
end
|
99
|
-
|
100
|
-
break unless response.body['next']
|
101
|
-
|
102
|
-
params = Faraday::Utils.parse_query URI(response.body['next']).query
|
103
|
-
end
|
94
|
+
response = get(path, params: params)
|
95
|
+
response.body['results']
|
104
96
|
end
|
105
97
|
|
106
98
|
# Show specific resource details
|
data/lib/belvo/resources.rb
CHANGED
@@ -29,11 +29,7 @@ module Belvo
|
|
29
29
|
# @yield [Hash] Each result to be processed individually.
|
30
30
|
# @raise [RequestError] If response code is different than 2XX
|
31
31
|
def list(params: nil)
|
32
|
-
|
33
|
-
@session.list(@endpoint, params: params) do |item|
|
34
|
-
results.nil? ? yield(item) : results.push(item)
|
35
|
-
end
|
36
|
-
results
|
32
|
+
@session.list(@endpoint, params: params)
|
37
33
|
end
|
38
34
|
|
39
35
|
# Show specific resource details
|
data/lib/belvo/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: belvo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Belvo Finance S.L.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-05-
|
11
|
+
date: 2022-05-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|