fintecture 0.6.0 → 0.6.1
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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/fintecture/api/pis/connect.rb +4 -9
- data/lib/fintecture/api/pis/payments.rb +4 -4
- data/lib/fintecture/pis_client.rb +4 -4
- data/lib/fintecture/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: 8e887488d505992322278fde239b0b54cbd21862463e1298b3f20f4b9df71996
|
4
|
+
data.tar.gz: 2ce5624fac95164513530b62b08b0cb03f2deedf4603fcb513ece06c9db45c85
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9a2d39f9529e36c02fe0a753536ada67e378ba115785310f2887095717e57aeca033b24dd7a770f9cfa6c5b6d32b4214682f04168ffbbb5c7b9efd5ba0b9a81b
|
7
|
+
data.tar.gz: ba1a58574b16ab10fb60774580edb7948180d7d2c47ec1081735dc4cec4880d87704eb00f9e8ea46c4f4620efe77df0dc5906f4d7647999ea5678d69f1e858f1
|
data/Gemfile.lock
CHANGED
@@ -13,7 +13,7 @@ module Fintecture
|
|
13
13
|
class Connect
|
14
14
|
class << self
|
15
15
|
# ------------ PUBLIC METHOD ------------
|
16
|
-
def generate(client, payload, state, redirect_uri, origin_uri,
|
16
|
+
def generate(client, payload, state, redirect_uri, origin_uri, with_virtualbeneficiary: false)
|
17
17
|
|
18
18
|
@client = client
|
19
19
|
|
@@ -21,18 +21,13 @@ module Fintecture
|
|
21
21
|
payload = _build_payload(payload)
|
22
22
|
|
23
23
|
# Do the request
|
24
|
-
_request payload, state, redirect_uri, origin_uri,
|
24
|
+
_request payload, state, redirect_uri, origin_uri, with_virtualbeneficiary: with_virtualbeneficiary
|
25
25
|
end
|
26
26
|
|
27
27
|
private
|
28
28
|
|
29
29
|
# ------------ REQUEST ------------
|
30
|
-
def _request(payload, state, redirect_uri, origin_uri,
|
31
|
-
defaults = {
|
32
|
-
:with_virtualbeneficiary => false
|
33
|
-
}
|
34
|
-
options = defaults.merge(options)
|
35
|
-
|
30
|
+
def _request(payload, state, redirect_uri, origin_uri, with_virtualbeneficiary: false)
|
36
31
|
# Get the url request
|
37
32
|
url = _endpoint
|
38
33
|
|
@@ -40,7 +35,7 @@ module Fintecture
|
|
40
35
|
params = {}
|
41
36
|
params['redirect_uri'] = redirect_uri if redirect_uri
|
42
37
|
params['origin_uri'] = origin_uri if origin_uri
|
43
|
-
params['with_virtualbeneficiary'] = 'true' if
|
38
|
+
params['with_virtualbeneficiary'] = 'true' if with_virtualbeneficiary
|
44
39
|
params['state'] = state
|
45
40
|
|
46
41
|
query_string = "?#{params.map { |key, value| "#{key}=#{value}" }.join('&')}"
|
@@ -10,22 +10,22 @@ module Fintecture
|
|
10
10
|
class Payments
|
11
11
|
class << self
|
12
12
|
# ------------ PUBLIC METHOD ------------
|
13
|
-
def get(client, session_id,
|
13
|
+
def get(client, session_id, with_virtualbeneficiary: false)
|
14
14
|
@client = client
|
15
15
|
|
16
16
|
# Do the get_payments request
|
17
|
-
_request session_id,
|
17
|
+
_request session_id, with_virtualbeneficiary: with_virtualbeneficiary
|
18
18
|
end
|
19
19
|
|
20
20
|
private
|
21
21
|
|
22
22
|
# ------------ REQUEST ------------
|
23
|
-
def _request(session_id,
|
23
|
+
def _request(session_id, with_virtualbeneficiary: false)
|
24
24
|
url = _endpoint
|
25
25
|
|
26
26
|
# Build uri params
|
27
27
|
params = {}
|
28
|
-
params['with_virtualbeneficiary'] = 'true' if
|
28
|
+
params['with_virtualbeneficiary'] = 'true' if with_virtualbeneficiary
|
29
29
|
|
30
30
|
query_string = "?#{params.map { |key, value| "#{key}=#{value}" }.join('&')}"
|
31
31
|
|
@@ -42,8 +42,8 @@ module Fintecture
|
|
42
42
|
body
|
43
43
|
end
|
44
44
|
|
45
|
-
def connect(payload, state, redirect_uri = nil, origin_uri = nil,
|
46
|
-
res = Fintecture::Pis::Connect.generate self, Marshal.load(Marshal.dump(payload)), state, redirect_uri, origin_uri,
|
45
|
+
def connect(payload, state, redirect_uri = nil, origin_uri = nil, with_virtualbeneficiary: false)
|
46
|
+
res = Fintecture::Pis::Connect.generate self, Marshal.load(Marshal.dump(payload)), state, redirect_uri, origin_uri, with_virtualbeneficiary: with_virtualbeneficiary
|
47
47
|
|
48
48
|
JSON.parse res.body
|
49
49
|
end
|
@@ -61,8 +61,8 @@ module Fintecture
|
|
61
61
|
JSON.parse res.body
|
62
62
|
end
|
63
63
|
|
64
|
-
def payments(session_id = nil,
|
65
|
-
res = Fintecture::Pis::Payments.get self, session_id,
|
64
|
+
def payments(session_id = nil, with_virtualbeneficiary: false)
|
65
|
+
res = Fintecture::Pis::Payments.get self, session_id, with_virtualbeneficiary: with_virtualbeneficiary
|
66
66
|
|
67
67
|
JSON.parse res.body
|
68
68
|
end
|
data/lib/fintecture/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fintecture
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fintecture
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-06-
|
11
|
+
date: 2023-06-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|