nordigen-ruby 2.1.0 → 2.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 17eb0e953a7008d324ff2cb96bf8eda218e2850820cf0c3bdb26c447af241475
4
- data.tar.gz: e00b83c675d89256540bdaa4871415583f7a92db420047ae3dccb90aff8706a9
3
+ metadata.gz: bdad3a2c238fe265d411385287ac6b43be13db699330bf348e36bb4ad8563073
4
+ data.tar.gz: e1ac77775d3652715a5d553cc27415b7ef33aaed5880298a29cc397500f7e3e8
5
5
  SHA512:
6
- metadata.gz: 3dc4521ffefdc1d2f927db335345a647737b19339c5b26d42fccaee7d52ccddd467abf9f6db4ff5cea3068ce843e1f3e9e688ef1cf9c11807dc81f916ff6d17c
7
- data.tar.gz: '09ce3ce0cf5dca4d3457ab1d2b2dfde3b6fd508ea383a7dfb3c0a8408bd7903cb1a28480532e5b564094cb39388240c6fa131ac5df66774928b00f307a5ad40a'
6
+ metadata.gz: 3e64587923d992c8e9593856019b5ceb736e7a122a486fdaa3e82e60e997016109596c4ba6ecf2d575c7514e83b70f495be53ac812435a2d5f1c0ff1e945dccd
7
+ data.tar.gz: 1769761d3f1b2d2909cab88bb33c9a872e1bf5a3c7a232fd49c2f309bade086ac5e042c29917bfba6f578a84c5246c472ed3f9060995c0580de0d76b7bd0d89b
data/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
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
+
9
+ ## [2.1.1] - 2022-12-19
10
+
11
+ - [add redirect_immediate param #20](https://github.com/nordigen/nordigen-ruby/pull/20)
12
+
13
+
3
14
  ## [2.1.0] - 2022-12-15
4
15
 
5
16
  - [Add user_language and account_selection params for requisition #18](https://github.com/nordigen/nordigen-ruby/pull/18)
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(redirect_url:, institution_id:, reference_id:, max_historical_days: 90, user_language: "en", account_selection: false)
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
- agreement: new_agreement["id"]
110
+ redirect_immediate: redirect_immediate,
111
+ agreement: new_agreement["id"],
112
+ ssn: ssn
99
113
  )
100
114
 
101
115
  return new_requsition
@@ -9,20 +9,36 @@ module Nordigen
9
9
  @client = client
10
10
  end
11
11
 
12
- def create_requisition(redirect_url:, reference:, institution_id:, user_language: "en", agreement: nil, account_selection: false)
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,
31
+ "redirect_immediate": redirect_immediate,
20
32
  }
21
33
 
22
34
  if agreement
23
35
  payload["agreement"] = agreement
24
36
  end
25
-
37
+
38
+ if ssn
39
+ payload["ssn"] = ssn
40
+ end
41
+
26
42
  return client.request.post(ENDPOINT, payload).body
27
43
  end
28
44
 
@@ -39,7 +55,7 @@ module Nordigen
39
55
  end
40
56
 
41
57
  def delete_requisition(requisition_id)
42
- # Delete requisition by id
58
+ # Delete requisition by id
43
59
  return client.request.delete("#{ENDPOINT}#{requisition_id}/").body
44
60
  end
45
61
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Nordigen
4
- VERSION = "2.1.0"
4
+ VERSION = "2.1.2"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nordigen-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nordigen Solutions
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-12-15 00:00:00.000000000 Z
11
+ date: 2022-12-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday