bankscrap-arquia 1.0.0 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/bankscrap-arquia.gemspec +1 -1
- data/lib/bankscrap/arquia/bank.rb +17 -24
- data/lib/bankscrap/arquia/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c1196d9bac3e2cce43fac1f4d722912aa2937ee7
|
4
|
+
data.tar.gz: 23ff8e899293b131ed1294ed642a58fa45ada972
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f0242bc58143912db763ec1eb93084ac66e1635f30c938fbef787253f1cf565745de6eab29c1f3ed74a085a70feb972134a2bc9b4ee840d4a281403559f932f4
|
7
|
+
data.tar.gz: 7659cff520d528517e34771eaf9f8f2596e67417d0961f6ff6d3243d5df2e84b383ba6ff98624814716e55caa7a6fc47050df39c54fa031779db1fc200b0c625
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Bankscrap::Arquia
|
2
2
|
|
3
|
-
Bankscrap adapter for [Arquia Banca](https://www.arquia.es/) (only tested with personal accounts).
|
3
|
+
[Bankscrap](https://github.com/bankscrap/bankscrap) adapter for [Arquia Banca](https://www.arquia.es/) (only tested with personal accounts).
|
4
4
|
|
5
5
|
|
6
6
|
## Installation
|
data/bankscrap-arquia.gemspec
CHANGED
@@ -17,7 +17,7 @@ Gem::Specification.new do |spec|
|
|
17
17
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
18
18
|
spec.require_paths = ['lib']
|
19
19
|
|
20
|
-
spec.add_runtime_dependency 'bankscrap', '~>
|
20
|
+
spec.add_runtime_dependency 'bankscrap', '~> 2.0.0'
|
21
21
|
spec.add_development_dependency 'bundler', '~> 1.7'
|
22
22
|
spec.add_development_dependency 'rake', '~> 10.0'
|
23
23
|
end
|
@@ -13,25 +13,20 @@ module Bankscrap
|
|
13
13
|
PRODUCTS_ENDPOINT = '/api/products'.freeze
|
14
14
|
ACCOUNTS_ENDPOINT = '/api/accounts'.freeze
|
15
15
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
'User-Agent' => ''
|
31
|
-
)
|
32
|
-
|
33
|
-
login
|
34
|
-
super
|
16
|
+
REQUIRED_CREDENTIALS = [:user, :password, :nif]
|
17
|
+
|
18
|
+
def initialize(credentials = {})
|
19
|
+
super do
|
20
|
+
@nif = @nif.dup.upcase
|
21
|
+
|
22
|
+
add_headers(
|
23
|
+
'Authorization' => 'Bearer',
|
24
|
+
'api-version' => '2',
|
25
|
+
'Content-Type' => 'application/json; charset=utf-8',
|
26
|
+
'Host' => 'api.arquia.es',
|
27
|
+
'User-Agent' => ''
|
28
|
+
)
|
29
|
+
end
|
35
30
|
end
|
36
31
|
|
37
32
|
# Fetch all the accounts for the given user
|
@@ -120,11 +115,10 @@ module Bankscrap
|
|
120
115
|
bank: self,
|
121
116
|
id: data['numProd'],
|
122
117
|
name: data['description'],
|
123
|
-
available_balance: data['availableBalance'],
|
124
|
-
balance: data['balance'],
|
125
|
-
currency: 'EUR',
|
118
|
+
available_balance: Money.new(data['availableBalance'] * 100, 'EUR'),
|
119
|
+
balance: Money.new(data['balance'] * 100, 'EUR'),
|
126
120
|
iban: data['iban']['ibanCode'],
|
127
|
-
description: data['description']
|
121
|
+
description: "ARQUIA: #{data['description']}"
|
128
122
|
)
|
129
123
|
end
|
130
124
|
|
@@ -136,7 +130,6 @@ module Bankscrap
|
|
136
130
|
amount: Money.new(data['amount'].to_f * 100, 'EUR'),
|
137
131
|
description: data['description'],
|
138
132
|
effective_date: data['valueDate'].to_date, # Format is 2016-05-02T00:00:00
|
139
|
-
currency: 'EUR', # We only know the API returns data['currency'] == 0 for EUR
|
140
133
|
balance: Money.new(data['balance'].to_f * 100, 'EUR')
|
141
134
|
)
|
142
135
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bankscrap-arquia
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Javier Cuevas
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-06-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bankscrap
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 2.0.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 2.0.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -89,7 +89,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
89
89
|
version: '0'
|
90
90
|
requirements: []
|
91
91
|
rubyforge_project:
|
92
|
-
rubygems_version: 2.
|
92
|
+
rubygems_version: 2.5.1
|
93
93
|
signing_key:
|
94
94
|
specification_version: 4
|
95
95
|
summary: Arquia adapter for Bankscrap
|