fintecture 0.6.0 → 0.6.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4ae97489e9735993c571a53b99b3ec0851b2865ecebb9b081452e246112ec1ca
4
- data.tar.gz: ed06942a786d9d3c2fd59761981194cde08c1650161feba7000d54889fda23de
3
+ metadata.gz: 382d21d6fcbd51583a2b4f7f6b3e7660475694874d74e9abe45656357a73f785
4
+ data.tar.gz: e77d0419db9e098efa149e741f82eacdf613a4d4f7a4f0582b87edeedddc3e27
5
5
  SHA512:
6
- metadata.gz: 9f4cfc2b162e65eab469f1514aed495f960d3ab1ea5d8b7ff5226b1bb32d78701179595d84703e1a8f3af832aaabe07c35add8b14a572d1c50c861806a034555
7
- data.tar.gz: da59d4a82dcd61216ad3fa18dd507a837d3f6857101ded17eb7326cc64c70241976c1c3c657ee5c1e6e289980be7104846f52c2be87453fd3f5394cfc66ea8a9
6
+ metadata.gz: b4b8aee29ea4ef485f37435bba44c33b38f4940dbaf78985141e0314e4217e16ca2d8968c4b66027fb3571cc6e00c1f571fac889b759733397b41f3b4b9e87f3
7
+ data.tar.gz: 1d053965a350afb4bd1959a9f1c7d8eeda267f3aba5190c591baaa23efeb32ed140eb4c2376c09a9e02560d76b8d46bf245e1302931b93f24584a90bf2a5bf2a
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fintecture (0.6.0)
4
+ fintecture (0.6.2)
5
5
  faraday
6
6
 
7
7
  GEM
@@ -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, **options)
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, options
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, options)
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 options[:with_virtualbeneficiary]
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,24 +10,27 @@ module Fintecture
10
10
  class Payments
11
11
  class << self
12
12
  # ------------ PUBLIC METHOD ------------
13
- def get(client, session_id, options = {})
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, options
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, options)
23
+ def _request(session_id, with_virtualbeneficiary: false)
24
24
  url = _endpoint
25
25
 
26
26
  # Build uri params
27
- params = {}
28
- params['with_virtualbeneficiary'] = 'true' if options[:with_virtualbeneficiary]
29
-
30
- query_string = "?#{params.map { |key, value| "#{key}=#{value}" }.join('&')}"
27
+ query_string = ''
28
+ if with_virtualbeneficiary
29
+ params = {}
30
+ params['with_virtualbeneficiary'] = 'true' if with_virtualbeneficiary
31
+
32
+ query_string = "?#{params.map { |key, value| "#{key}=#{value}" }.join('&')}"
33
+ end
31
34
 
32
35
  Fintecture::Faraday::Authentication::Connection.get(
33
36
  url: "#{url}/#{session_id}" + query_string,
@@ -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, **options)
46
- res = Fintecture::Pis::Connect.generate self, Marshal.load(Marshal.dump(payload)), state, redirect_uri, origin_uri, options
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, **options)
65
- res = Fintecture::Pis::Payments.get self, session_id, options
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Fintecture
4
- VERSION = '0.6.0'
4
+ VERSION = '0.6.2'
5
5
  end
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.0
4
+ version: 0.6.2
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-01 00:00:00.000000000 Z
11
+ date: 2023-11-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler