nordigen-ruby 2.1.1 → 2.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/nordigen-ruby.rb +17 -3
- data/lib/nordigen_ruby/api/requisitions.rb +19 -4
- data/lib/nordigen_ruby/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bdad3a2c238fe265d411385287ac6b43be13db699330bf348e36bb4ad8563073
|
4
|
+
data.tar.gz: e1ac77775d3652715a5d553cc27415b7ef33aaed5880298a29cc397500f7e3e8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3e64587923d992c8e9593856019b5ceb736e7a122a486fdaa3e82e60e997016109596c4ba6ecf2d575c7514e83b70f495be53ac812435a2d5f1c0ff1e945dccd
|
7
|
+
data.tar.gz: 1769761d3f1b2d2909cab88bb33c9a872e1bf5a3c7a232fd49c2f309bade086ac5e042c29917bfba6f578a84c5246c472ed3f9060995c0580de0d76b7bd0d89b
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [2.2.0] - 2022-12-19
|
4
|
+
|
5
|
+
- Fix redirect_immediate parameter
|
6
|
+
- Add SSN parameter
|
7
|
+
- Add access_valid_for_days for init method
|
8
|
+
|
3
9
|
## [2.1.1] - 2022-12-19
|
4
10
|
|
5
11
|
- [add redirect_immediate param #20](https://github.com/nordigen/nordigen-ruby/pull/20)
|
data/lib/nordigen-ruby.rb
CHANGED
@@ -77,7 +77,17 @@ module Nordigen
|
|
77
77
|
return AccountApi.new(client: self, account_id: account_id)
|
78
78
|
end
|
79
79
|
|
80
|
-
def init_session(
|
80
|
+
def init_session(
|
81
|
+
redirect_url:,
|
82
|
+
institution_id:,
|
83
|
+
reference_id:,
|
84
|
+
max_historical_days: 90,
|
85
|
+
access_valid_for_days: 90,
|
86
|
+
user_language: "en",
|
87
|
+
account_selection: false,
|
88
|
+
redirect_immediate: false,
|
89
|
+
ssn: nil
|
90
|
+
)
|
81
91
|
# Factory method that creates authorization in a specific institution
|
82
92
|
# and are responsible for the following steps:
|
83
93
|
# * Creates agreement
|
@@ -86,8 +96,10 @@ module Nordigen
|
|
86
96
|
# Create agreement
|
87
97
|
new_agreement = @agreement.create_agreement(
|
88
98
|
institution_id: institution_id,
|
89
|
-
max_historical_days: max_historical_days
|
99
|
+
max_historical_days: max_historical_days,
|
100
|
+
access_valid_for_days: access_valid_for_days
|
90
101
|
)
|
102
|
+
|
91
103
|
# Create requisition
|
92
104
|
new_requsition = @requisition.create_requisition(
|
93
105
|
redirect_url: redirect_url,
|
@@ -95,7 +107,9 @@ module Nordigen
|
|
95
107
|
institution_id: institution_id,
|
96
108
|
user_language: user_language,
|
97
109
|
account_selection: account_selection,
|
98
|
-
|
110
|
+
redirect_immediate: redirect_immediate,
|
111
|
+
agreement: new_agreement["id"],
|
112
|
+
ssn: ssn
|
99
113
|
)
|
100
114
|
|
101
115
|
return new_requsition
|
@@ -9,21 +9,36 @@ module Nordigen
|
|
9
9
|
@client = client
|
10
10
|
end
|
11
11
|
|
12
|
-
def create_requisition(
|
12
|
+
def create_requisition(
|
13
|
+
redirect_url:,
|
14
|
+
reference:,
|
15
|
+
institution_id:,
|
16
|
+
user_language: "en",
|
17
|
+
agreement: nil,
|
18
|
+
account_selection: false,
|
19
|
+
redirect_immediate: false,
|
20
|
+
ssn: nil
|
21
|
+
)
|
13
22
|
# Create requisition. For creating links and retrieving accounts.
|
23
|
+
# puts account_selection
|
24
|
+
# puts redirect_immediate
|
14
25
|
payload = {
|
15
26
|
"redirect": redirect_url,
|
16
27
|
"reference": reference,
|
17
28
|
"institution_id": institution_id,
|
18
29
|
"user_language": user_language,
|
19
30
|
"account_selection": account_selection,
|
20
|
-
"redirect_immediate" redirect_immediate
|
31
|
+
"redirect_immediate": redirect_immediate,
|
21
32
|
}
|
22
33
|
|
23
34
|
if agreement
|
24
35
|
payload["agreement"] = agreement
|
25
36
|
end
|
26
|
-
|
37
|
+
|
38
|
+
if ssn
|
39
|
+
payload["ssn"] = ssn
|
40
|
+
end
|
41
|
+
|
27
42
|
return client.request.post(ENDPOINT, payload).body
|
28
43
|
end
|
29
44
|
|
@@ -40,7 +55,7 @@ module Nordigen
|
|
40
55
|
end
|
41
56
|
|
42
57
|
def delete_requisition(requisition_id)
|
43
|
-
# Delete requisition by id
|
58
|
+
# Delete requisition by id
|
44
59
|
return client.request.delete("#{ENDPOINT}#{requisition_id}/").body
|
45
60
|
end
|
46
61
|
|