ibanity 1.11.0 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +11 -0
- data/lib/ibanity/api/isabel_connect/token.rb +19 -12
- data/lib/ibanity/client.rb +3 -3
- data/lib/ibanity/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: fc2cf04d1de0868831487eb4923e738c4484f536f3e4a2749d326e0a18cc3f23
|
4
|
+
data.tar.gz: 2e4706bc1712469f99ebfac2afd3a8a8c56f50d97544a31cb9356f50a91bb5f8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2cc32d999ac1ce54089ef7be839778017a204efa1e0fea3e900c6934f653c9646ab837c60b2105b0f67b552ad96742448c68d9b884f4ab888eb14fb580fe15ae
|
7
|
+
data.tar.gz: 47f4dd5ba11dafe5018a85404bf377dac5fc81ec666674f96c8d6e8f2acddb3fc9c653aef8954890108646fde1409ccef4459845ccc88069a11dfb7e58efcb91
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -4,6 +4,17 @@
|
|
4
4
|
|
5
5
|
The Ibanity Ruby Library provides convenient wrappers around the Ibanity API. The object attributes are dynamically defined based on the API response, supporting minor API changes seamlessly.
|
6
6
|
|
7
|
+
Supported API version per product:
|
8
|
+
|
9
|
+
Product | Version
|
10
|
+
-- | --
|
11
|
+
XS2A | 1
|
12
|
+
Ponto Connect | 1
|
13
|
+
Isabel Connect | 2
|
14
|
+
Consent | 1
|
15
|
+
|
16
|
+
In case you need to connect to an older version of an API, please consult `CHANGELOG.md` for more info on which version of the gem supports which version of the API.
|
17
|
+
|
7
18
|
## Documentation
|
8
19
|
|
9
20
|
Visit our [Ruby API docs](https://documentation.ibanity.com/api/ruby).
|
@@ -7,32 +7,39 @@ module Ibanity
|
|
7
7
|
if refresh_token
|
8
8
|
[
|
9
9
|
["grant_type", "refresh_token"],
|
10
|
-
["refresh_token", refresh_token]
|
11
|
-
["client_id", Ibanity.client.isabel_connect_client_id],
|
12
|
-
["client_secret", Ibanity.client.isabel_connect_client_secret]
|
10
|
+
["refresh_token", refresh_token]
|
13
11
|
]
|
14
12
|
elsif authorization_code
|
15
13
|
[
|
16
14
|
["grant_type", "authorization_code"],
|
17
15
|
["code", authorization_code],
|
18
|
-
["client_id", Ibanity.client.isabel_connect_client_id],
|
19
|
-
["client_secret", Ibanity.client.isabel_connect_client_secret],
|
20
16
|
["redirect_uri", redirect_uri]
|
21
17
|
]
|
22
18
|
end
|
23
|
-
|
24
|
-
|
19
|
+
create_by_uri(
|
20
|
+
uri: uri,
|
21
|
+
payload: URI.encode_www_form(arguments),
|
22
|
+
idempotency_key: idempotency_key,
|
23
|
+
headers: self.headers
|
24
|
+
)
|
25
25
|
end
|
26
26
|
|
27
|
-
def self.delete(
|
27
|
+
def self.delete(refresh_token:)
|
28
28
|
uri = Ibanity.isabel_connect_api_schema["oAuth2"]["revoke"]
|
29
29
|
arguments = [
|
30
|
-
["token",
|
31
|
-
["client_id", Ibanity.client.isabel_connect_client_id],
|
32
|
-
["client_secret", Ibanity.client.isabel_connect_client_secret]
|
30
|
+
["token", refresh_token]
|
33
31
|
]
|
34
32
|
payload = URI.encode_www_form(arguments)
|
35
|
-
create_by_uri(uri: uri, payload: payload)
|
33
|
+
create_by_uri(uri: uri, payload: payload, headers: self.headers)
|
34
|
+
end
|
35
|
+
|
36
|
+
private
|
37
|
+
|
38
|
+
def self.headers
|
39
|
+
{
|
40
|
+
"Authorization": "Basic " + Base64.strict_encode64("#{Ibanity.client.isabel_connect_client_id}:#{Ibanity.client.isabel_connect_client_secret}"),
|
41
|
+
"Content-Type": "application/x-www-form-urlencoded"
|
42
|
+
}
|
36
43
|
end
|
37
44
|
end
|
38
45
|
end
|
data/lib/ibanity/client.rb
CHANGED
@@ -14,8 +14,8 @@ module Ibanity
|
|
14
14
|
api_scheme: "https",
|
15
15
|
api_host: "api.ibanity.com",
|
16
16
|
ssl_ca_file: nil,
|
17
|
-
isabel_connect_client_id:
|
18
|
-
isabel_connect_client_secret:
|
17
|
+
isabel_connect_client_id: nil,
|
18
|
+
isabel_connect_client_secret: nil,
|
19
19
|
ponto_connect_client_id: nil,
|
20
20
|
ponto_connect_client_secret: nil,
|
21
21
|
application_id: nil,
|
@@ -124,7 +124,7 @@ module Ibanity
|
|
124
124
|
|
125
125
|
def build_headers(customer_access_token: nil, idempotency_key: nil, extra_headers: nil, json:, payload: nil)
|
126
126
|
headers = {
|
127
|
-
accept: :json
|
127
|
+
accept: :json
|
128
128
|
}
|
129
129
|
headers["Transfer-Encoding"] = "chunked" if payload.is_a?(Pathname)
|
130
130
|
headers[:content_type] = :json if json
|
data/lib/ibanity/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ibanity
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ibanity
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-02-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|