bank_scrap 0.0.15 → 0.0.16
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/bank_scrap/banks/bbva.rb +4 -4
- data/lib/bank_scrap/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d75829a5e7b74d4c64e6682b6a660853825d927a
|
4
|
+
data.tar.gz: 232f5a3649b9c4efc67ee68609703d55a5f7db02
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6d6448904b7c95e30dcb4face77e6b27f3eb9958ab1ea8d24eb09a40bf03566d14429325095aada510cd88553c7ef18c3002b95112ac4d127596c770429c9830
|
7
|
+
data.tar.gz: 643ccd7fee6abf98fbfe682723c4853fc93c03c9c10a239716f2c76436cbc5fbe52294cfaac24fb98ad537cbb3f4e0ce89f189eb42535e16e63900044af516e5
|
@@ -66,14 +66,14 @@ module BankScrap
|
|
66
66
|
|
67
67
|
# The API accepts a toDate param that we could pass the end_date argument,
|
68
68
|
# however when we pass the toDate param, the API stops returning the account balance.
|
69
|
-
# Therefore we need to take a workaround: only filter with fromDate and loop
|
69
|
+
# Therefore we need to take a workaround: only filter with fromDate and loop
|
70
70
|
# over all the available pages, filtering out the movements that doesn't match
|
71
71
|
# the end_date argument.
|
72
72
|
url = BASE_ENDPOINT +
|
73
73
|
ACCOUNT_ENDPOINT +
|
74
74
|
account.id +
|
75
75
|
"/movements/v1?fromDate=#{from_date}"
|
76
|
-
|
76
|
+
|
77
77
|
offset = nil
|
78
78
|
pagination_balance = nil
|
79
79
|
transactions = []
|
@@ -86,9 +86,9 @@ module BankScrap
|
|
86
86
|
json = JSON.parse(post(new_url, {}))
|
87
87
|
|
88
88
|
unless json['movements'].blank?
|
89
|
-
# As explained before, we have to discard records newer than end_date.
|
89
|
+
# As explained before, we have to discard records newer than end_date.
|
90
90
|
filtered_movements = json['movements'].select { |m| Date.parse(m['operationDate']) <= end_date }
|
91
|
-
|
91
|
+
|
92
92
|
transactions += filtered_movements.map do |data|
|
93
93
|
build_transaction(data, account)
|
94
94
|
end
|
data/lib/bank_scrap/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bank_scrap
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ismael Sánchez
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2015-06-
|
14
|
+
date: 2015-06-21 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: bundler
|