afterbanks-psd2-api-ruby 0.1.0 → 0.1.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 +5 -9
- data/README.md +1 -0
- data/lib/afterbanks_psd2/base.rb +2 -0
- data/lib/afterbanks_psd2/resources/transaction.rb +9 -1
- data/lib/afterbanks_psd2/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: a5333c37b68c65f7b12b555ed75064978c88ee4d3380af54fedc13614e1f1bb7
|
4
|
+
data.tar.gz: 3998c922e7ee79e9d8703167af776937b9b9f234c643f068ada329b920a7108b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2b6742ee7c034247cc95bc180a5b4a3ef9efb7dfa307a6a5231bcb1e1f090b481ba8876465682d86911aca28e127cc69ecdb3ca97fe8df96d596d97783efdef0
|
7
|
+
data.tar.gz: 68e7f7711141f4e88be67a669cb0e8ab42790166d6e0572666932a659448e51c51423793ac077843606589060a42edd33342cde657e0aed690d673d661fcf7f5
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
afterbanks-psd2-api-ruby (0.1.
|
4
|
+
afterbanks-psd2-api-ruby (0.1.1)
|
5
5
|
rest-client (~> 2.0.2)
|
6
6
|
|
7
7
|
GEM
|
@@ -13,14 +13,13 @@ GEM
|
|
13
13
|
crack (0.4.3)
|
14
14
|
safe_yaml (~> 1.0.0)
|
15
15
|
diff-lcs (1.3)
|
16
|
-
domain_name (0.
|
17
|
-
unf (>= 0.0.5, < 1.0.0)
|
16
|
+
domain_name (0.6.20240107)
|
18
17
|
hashdiff (1.0.1)
|
19
|
-
http-cookie (1.0.
|
18
|
+
http-cookie (1.0.5)
|
20
19
|
domain_name (~> 0.5)
|
21
|
-
mime-types (3.
|
20
|
+
mime-types (3.5.2)
|
22
21
|
mime-types-data (~> 3.2015)
|
23
|
-
mime-types-data (3.
|
22
|
+
mime-types-data (3.2024.0305)
|
24
23
|
netrc (0.11.0)
|
25
24
|
parallel (1.19.1)
|
26
25
|
parser (3.0.0.0)
|
@@ -64,9 +63,6 @@ GEM
|
|
64
63
|
ruby-progressbar (1.10.1)
|
65
64
|
safe_yaml (1.0.5)
|
66
65
|
timecop (0.9.2)
|
67
|
-
unf (0.1.4)
|
68
|
-
unf_ext
|
69
|
-
unf_ext (0.0.7.7)
|
70
66
|
unicode-display_width (1.6.0)
|
71
67
|
webmock (3.8.3)
|
72
68
|
addressable (>= 2.3.6)
|
data/README.md
CHANGED
@@ -33,6 +33,7 @@ You can set a `logger` as well.
|
|
33
33
|
Changelog
|
34
34
|
---------
|
35
35
|
|
36
|
+
* 0.1.1 Fix options parameters to ensure not null and check other parameters on Transaction.list
|
36
37
|
* 0.1.0 First full version, including resource wrapping (banks, user, accounts, transactions), error coverage and support for logging
|
37
38
|
|
38
39
|
TODO
|
data/lib/afterbanks_psd2/base.rb
CHANGED
@@ -10,6 +10,12 @@ module AfterbanksPSD2
|
|
10
10
|
account: { type: :afterbankspsd2_account }
|
11
11
|
|
12
12
|
def self.list(token:, products:, start_date:)
|
13
|
+
raise ArgumentError, "Token is missing" if token.nil? || token.empty?
|
14
|
+
raise ArgumentError, "Products must be a string" unless products.is_a?(String)
|
15
|
+
raise ArgumentError, "Products is missing" if products.nil? || products.empty?
|
16
|
+
raise ArgumentError, "Start date is missing" if start_date.nil? || products.empty?
|
17
|
+
raise ArgumentError, "Start date must be a Date" unless start_date.is_a?(Date)
|
18
|
+
|
13
19
|
params = {
|
14
20
|
servicekey: AfterbanksPSD2.configuration.servicekey,
|
15
21
|
token: token,
|
@@ -17,6 +23,8 @@ module AfterbanksPSD2
|
|
17
23
|
startDate: start_date.strftime("%d-%m-%Y")
|
18
24
|
}
|
19
25
|
|
26
|
+
options = {}
|
27
|
+
|
20
28
|
# if the start_date is older than 90 days, we need to increase timeout to 2 hours
|
21
29
|
if start_date < Date.today << 3
|
22
30
|
options = {
|
@@ -46,7 +54,7 @@ module AfterbanksPSD2
|
|
46
54
|
|
47
55
|
def self.transactions_information_for(response:, products:)
|
48
56
|
transactions_information = []
|
49
|
-
products_array = products.split(",")
|
57
|
+
products_array = products.to_s.split(",").map(&:strip)
|
50
58
|
|
51
59
|
response.each do |account_information|
|
52
60
|
product = account_information['product']
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: afterbanks-psd2-api-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Florent Lemaitre
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-10-
|
11
|
+
date: 2024-10-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|