bankscrap-ing 2.0.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/bankscrap/ing/bank.rb +7 -5
- data/lib/bankscrap/ing/version.rb +1 -1
- 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: 0d5fccc82101d67a0d768f91ecb55f7eb529efda
|
4
|
+
data.tar.gz: d09de3829079e1f0a19cace24c988e9100b806f4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: acde7258ac38668248a587cf1eb710414998d975b686ea48da8af444e474a8fa08eac95930e56b194851794c77a7ffec1ac3d3974c1025925bef8e1527ef0371
|
7
|
+
data.tar.gz: 9b58b605e7283d547b8e8dd91a9b9f3f26b39b6be5bab347985a335f4af64d028ba9b44f841fe7d2a06b9faa8633ce717c20f61a70c42a3ff44c18170045485a
|
data/lib/bankscrap/ing/bank.rb
CHANGED
@@ -20,6 +20,8 @@ module Bankscrap
|
|
20
20
|
|
21
21
|
REQUIRED_CREDENTIALS = [:dni, :password, :birthday]
|
22
22
|
|
23
|
+
CURRENCY = Money::Currency.new("EUR")
|
24
|
+
|
23
25
|
def initialize(credentials = {})
|
24
26
|
super do
|
25
27
|
@password = @password.to_s
|
@@ -201,8 +203,8 @@ module Bankscrap
|
|
201
203
|
bank: self,
|
202
204
|
id: data['uuid'],
|
203
205
|
name: data['name'],
|
204
|
-
balance: Money.new(data['balance'] * 100,
|
205
|
-
available_balance: Money.new(data['availableBalance'] * 100,
|
206
|
+
balance: Money.new(data['balance'] * 100, CURRENCY),
|
207
|
+
available_balance: Money.new(data['availableBalance'] * 100, CURRENCY),
|
206
208
|
description: (data['alias'] || data['name']),
|
207
209
|
iban: data['iban'],
|
208
210
|
bic: data['bic']
|
@@ -215,21 +217,21 @@ module Bankscrap
|
|
215
217
|
id: data['uuid'],
|
216
218
|
name: data['name'],
|
217
219
|
balance: data['balance'],
|
218
|
-
currency:
|
220
|
+
currency: CURRENCY.iso_code,
|
219
221
|
investment: data['investment']
|
220
222
|
)
|
221
223
|
end
|
222
224
|
|
223
225
|
# Build a transaction object from API data
|
224
226
|
def build_transaction(data, account)
|
225
|
-
amount = Money.new(data['amount'] * 100,
|
227
|
+
amount = Money.new(data['amount'] * 100, CURRENCY)
|
226
228
|
Transaction.new(
|
227
229
|
account: account,
|
228
230
|
id: data['uuid'],
|
229
231
|
amount: amount,
|
230
232
|
effective_date: Date.strptime(data['effectiveDate'], '%d/%m/%Y'),
|
231
233
|
description: data['description'],
|
232
|
-
balance: Money.new(data['balance'] * 100,
|
234
|
+
balance: Money.new(data['balance'] * 100, CURRENCY)
|
233
235
|
)
|
234
236
|
end
|
235
237
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bankscrap-ing
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Raúl
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-10-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bankscrap
|
@@ -153,7 +153,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
153
153
|
version: '0'
|
154
154
|
requirements: []
|
155
155
|
rubyforge_project:
|
156
|
-
rubygems_version: 2.
|
156
|
+
rubygems_version: 2.5.1
|
157
157
|
signing_key:
|
158
158
|
specification_version: 4
|
159
159
|
summary: ING adapter for Bankscrap
|