fractal_api 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/fractal_api.rb +0 -1
- data/lib/fractal_api/bank.rb +1 -1
- data/lib/fractal_api/consent.rb +5 -10
- data/lib/fractal_api/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: b3b469781bfb35472396e103bacbea07052e1faa93a7eddbfdc012f04ac51218
|
4
|
+
data.tar.gz: 7abe099a3711ce0fe7d04c0dcddffd0a060873f29200c04f4fa5db3beb3d5d51
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d561a124e6c0fd2fa97e7b7458a1329ebb90e2970f017d0d10e4dfa5e665293554115193beb36f14777e5847b402a5367da62417b1711d3983def0a146ad4d96
|
7
|
+
data.tar.gz: 8857741eba52e296fb31e11694f3b1c2e0cbb76a694f741ca0c36da58e31e0b87f6c493b5cd09494d5d6cafc2ede7eabf95a15222aab6180913d73a7dbe8aa6f
|
data/Gemfile.lock
CHANGED
data/lib/fractal_api.rb
CHANGED
data/lib/fractal_api/bank.rb
CHANGED
data/lib/fractal_api/consent.rb
CHANGED
@@ -8,15 +8,11 @@ require 'fractal_api/base_model'
|
|
8
8
|
module FractalApi
|
9
9
|
class Consent < BaseModel
|
10
10
|
attributes :consent_id, :company_id, :bank_id, :permission,
|
11
|
-
:date_created, :consent_type, :status, :
|
11
|
+
:date_created, :consent_type, :status, :sign_in_url
|
12
12
|
|
13
13
|
def self.create(bank_id, company_id, redirect_url)
|
14
|
-
params = { redirect: redirect_url,
|
15
|
-
|
16
|
-
'/banking/v2/banks/:bank_id/consents',
|
17
|
-
bank_id: bank_id.to_s
|
18
|
-
)
|
19
|
-
result = post(url, params: params, headers: { 'X-Company-Id' => company_id })
|
14
|
+
params = { bankId: bank_id.to_s, redirect: redirect_url, permissions: 'READALLBANKDATA' }
|
15
|
+
result = post('/banking/v2/consents', params: params, headers: { 'X-Company-Id' => company_id })
|
20
16
|
|
21
17
|
build(json: result.body)
|
22
18
|
end
|
@@ -41,14 +37,13 @@ module FractalApi
|
|
41
37
|
|
42
38
|
def update(code:, id_token:, state:)
|
43
39
|
url = format_url(
|
44
|
-
'/banking/v2/
|
45
|
-
bank_id: bank_id.to_s,
|
40
|
+
'/banking/v2/consents/:consent_id',
|
46
41
|
consent_id: consent_id
|
47
42
|
)
|
48
43
|
|
49
44
|
result = put(
|
50
45
|
url,
|
51
|
-
params: { code: code, id_token: id_token, state: state },
|
46
|
+
params: { bankId: bank_id, code: code, id_token: id_token, state: state },
|
52
47
|
headers: { 'X-Company-Id' => company_id }
|
53
48
|
)
|
54
49
|
|
data/lib/fractal_api/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fractal_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Finpoint
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-04-
|
11
|
+
date: 2021-04-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|