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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2c974edd649c3cb82aab1a4978589ee432942dcc
4
- data.tar.gz: 495439ef22c8d8eca4a1d8ae93cb683ae5e9bc3b
3
+ metadata.gz: d75829a5e7b74d4c64e6682b6a660853825d927a
4
+ data.tar.gz: 232f5a3649b9c4efc67ee68609703d55a5f7db02
5
5
  SHA512:
6
- metadata.gz: 22b3088cfef0fac0b2cebf3afc40bf25e262ed5337b6799470133f0ba09f84562e1485f9fe3dedb03ce911684aa20fd2075f8cc0e2a057309c3ff2de2d36ab29
7
- data.tar.gz: e61bf54a323d3ce1523ef9f696436a4240b3b656ef234e142bbe0f67d9f1d0e89fff47fb26b51695509d26907bb9beddceed14e9ea58c2f7ef8d460bb04693b2
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
@@ -1,3 +1,3 @@
1
1
  module BankScrap
2
- VERSION = '0.0.15'
2
+ VERSION = '0.0.16'
3
3
  end
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.15
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-17 00:00:00.000000000 Z
14
+ date: 2015-06-21 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: bundler