ibanity 1.8.0 → 1.9.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/.github/workflows/gem-push.yml +1 -1
- data/CHANGELOG.md +7 -1
- data/lib/ibanity/api/isabel_connect/access_token.rb +1 -0
- data/lib/ibanity/api/isabel_connect/refresh_token.rb +3 -1
- data/lib/ibanity/api/isabel_connect/token.rb +39 -0
- data/lib/ibanity/api/ponto_connect/reauthorization_request.rb +10 -0
- data/lib/ibanity/api/ponto_connect/sandbox/financial_institution_transaction.rb +8 -0
- data/lib/ibanity/version.rb +1 -1
- data/lib/ibanity.rb +2 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 69d8a3c866e929ec613b9b17c146269217889e0e498b7f5c9fe0a84c0db5b643
|
4
|
+
data.tar.gz: 68ccaee907f5082fa520acbaee93a4591fe888575f479a1b3c71e6432191cd48
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8825787922d34faf6745621d921377e1e187d542eb26b487a6071075db654399d5f3f7d5110c2028bcb9720f29f28f219a73374fc019a217ba3eb812eaead62c
|
7
|
+
data.tar.gz: a43e981bcc792e9541bd17ce01290921ca1ae9b9676221e234cc574214537dca60bccd15b66b349dd392eb8dd1d9f878109b27a708b0e7d6e2637d2685c06752
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 1.9
|
4
|
+
|
5
|
+
* [Ponto Connect] Add account reauthorization requests
|
6
|
+
|
7
|
+
* [Isabel Connect] Deprecate `Ibanity::IsabelConnect::AccessToken` and `Ibanity::IsabelConnect::RefreshToken`, please use `Ibanity::IsabelConnect::Token` instead
|
8
|
+
|
3
9
|
## 1.8
|
4
10
|
|
5
11
|
* [XS2A] Update sandbox transactions
|
@@ -40,7 +46,7 @@
|
|
40
46
|
|
41
47
|
### Enhancements
|
42
48
|
|
43
|
-
* Default signature algorithm is now ["hs2019"](https://tools.ietf.org/html/draft-cavage-http-signatures-12#appendix-E.2)
|
49
|
+
* Default signature algorithm is now ["hs2019"](https://tools.ietf.org/html/draft-cavage-http-signatures-12#appendix-E.2)
|
44
50
|
* Add support for periodic and bulk payments
|
45
51
|
* Add snake-case transformation for deeply nested data structures
|
46
52
|
|
@@ -2,6 +2,7 @@ module Ibanity
|
|
2
2
|
module IsabelConnect
|
3
3
|
class AccessToken < Ibanity::OAuthResource
|
4
4
|
def self.create(refresh_token:, idempotency_key: nil)
|
5
|
+
warn "WARNING: Ibanity::IsabelConnect::AccessToken.create is deprecated, please use Ibanity::IsabelConnect::Token.create instead"
|
5
6
|
uri = Ibanity.isabel_connect_api_schema["oAuth2"]["accessTokens"]
|
6
7
|
arguments = [
|
7
8
|
["grant_type", "refresh_token"],
|
@@ -2,6 +2,7 @@ module Ibanity
|
|
2
2
|
module IsabelConnect
|
3
3
|
class RefreshToken < Ibanity::OAuthResource
|
4
4
|
def self.create(authorization_code:, redirect_uri:, idempotency_key: nil)
|
5
|
+
warn "WARNING: Ibanity::IsabelConnect::RefreshToken.create is deprecated, please use Ibanity::IsabelConnect::Token.create instead"
|
5
6
|
uri = Ibanity.isabel_connect_api_schema["oAuth2"]["refreshTokens"]["create"]
|
6
7
|
arguments = [
|
7
8
|
["grant_type", "authorization_code"],
|
@@ -13,8 +14,9 @@ module Ibanity
|
|
13
14
|
payload = URI.encode_www_form(arguments)
|
14
15
|
create_by_uri(uri: uri, payload: payload, idempotency_key: idempotency_key)
|
15
16
|
end
|
16
|
-
|
17
|
+
|
17
18
|
def self.delete(token:)
|
19
|
+
warn "WARNING: Ibanity::IsabelConnect::RefreshToken.delete is deprecated, please use Ibanity::IsabelConnect::Token.delete instead"
|
18
20
|
uri = Ibanity.isabel_connect_api_schema["oAuth2"]["refreshTokens"]["revoke"]
|
19
21
|
arguments = [
|
20
22
|
["token", token],
|
@@ -0,0 +1,39 @@
|
|
1
|
+
module Ibanity
|
2
|
+
module IsabelConnect
|
3
|
+
class Token < Ibanity::OAuthResource
|
4
|
+
def self.create(refresh_token: nil, authorization_code: nil, redirect_uri: nil, idempotency_key: nil)
|
5
|
+
uri = Ibanity.isabel_connect_api_schema["oAuth2"]["token"]
|
6
|
+
arguments =
|
7
|
+
if refresh_token
|
8
|
+
[
|
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]
|
13
|
+
]
|
14
|
+
elsif authorization_code
|
15
|
+
[
|
16
|
+
["grant_type", "authorization_code"],
|
17
|
+
["code", authorization_code],
|
18
|
+
["client_id", Ibanity.client.isabel_connect_client_id],
|
19
|
+
["client_secret", Ibanity.client.isabel_connect_client_secret],
|
20
|
+
["redirect_uri", redirect_uri]
|
21
|
+
]
|
22
|
+
end
|
23
|
+
payload = URI.encode_www_form(arguments)
|
24
|
+
create_by_uri(uri: uri, payload: payload, idempotency_key: idempotency_key)
|
25
|
+
end
|
26
|
+
|
27
|
+
def self.delete(token:)
|
28
|
+
uri = Ibanity.isabel_connect_api_schema["oAuth2"]["revoke"]
|
29
|
+
arguments = [
|
30
|
+
["token", token],
|
31
|
+
["client_id", Ibanity.client.isabel_connect_client_id],
|
32
|
+
["client_secret", Ibanity.client.isabel_connect_client_secret]
|
33
|
+
]
|
34
|
+
payload = URI.encode_www_form(arguments)
|
35
|
+
create_by_uri(uri: uri, payload: payload)
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
module Ibanity
|
2
|
+
module PontoConnect
|
3
|
+
class ReauthorizationRequest < Ibanity::BaseResource
|
4
|
+
def self.create(account_id:, access_token:, **attributes)
|
5
|
+
uri = Ibanity.ponto_connect_api_schema["account"]["reauthorizationRequests"].gsub("{accountId}", account_id)
|
6
|
+
create_by_uri(uri: uri, resource_type: "reauthorizationRequest", attributes: attributes, customer_access_token: access_token)
|
7
|
+
end
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
@@ -25,6 +25,14 @@ module Ibanity
|
|
25
25
|
.sub("{financialInstitutionTransactionId}", "")
|
26
26
|
create_by_uri(uri: uri, resource_type: "financialInstitutionTransaction", attributes: attributes, customer_access_token: access_token)
|
27
27
|
end
|
28
|
+
|
29
|
+
def self.update(access_token:, id:, financial_institution_id:, financial_institution_account_id:, **attributes)
|
30
|
+
uri = Ibanity.ponto_connect_api_schema["sandbox"]["financialInstitution"]["financialInstitutionAccount"]["financialInstitutionTransactions"]
|
31
|
+
.sub("{financialInstitutionId}", financial_institution_id)
|
32
|
+
.sub("{financialInstitutionAccountId}", financial_institution_account_id)
|
33
|
+
.sub("{financialInstitutionTransactionId}", id)
|
34
|
+
update_by_uri(uri: uri, resource_type: "financialInstitutionTransaction", attributes: attributes, customer_access_token: access_token)
|
35
|
+
end
|
28
36
|
end
|
29
37
|
end
|
30
38
|
end
|
data/lib/ibanity/version.rb
CHANGED
data/lib/ibanity.rb
CHANGED
@@ -33,6 +33,7 @@ require_relative "ibanity/api/isabel_connect/intraday_transaction"
|
|
33
33
|
require_relative "ibanity/api/isabel_connect/account_report"
|
34
34
|
require_relative "ibanity/api/isabel_connect/access_token"
|
35
35
|
require_relative "ibanity/api/isabel_connect/refresh_token"
|
36
|
+
require_relative "ibanity/api/isabel_connect/token"
|
36
37
|
require_relative "ibanity/api/isabel_connect/bulk_payment_initiation_request"
|
37
38
|
require_relative "ibanity/api/sandbox/financial_institution_account"
|
38
39
|
require_relative "ibanity/api/sandbox/financial_institution_transaction"
|
@@ -53,6 +54,7 @@ require_relative "ibanity/api/ponto_connect/integration"
|
|
53
54
|
require_relative "ibanity/api/ponto_connect/sandbox/financial_institution_account"
|
54
55
|
require_relative "ibanity/api/ponto_connect/sandbox/financial_institution_transaction"
|
55
56
|
require_relative "ibanity/api/ponto_connect/onboarding_details"
|
57
|
+
require_relative "ibanity/api/ponto_connect/reauthorization_request"
|
56
58
|
|
57
59
|
module Ibanity
|
58
60
|
class << self
|
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: 1.
|
4
|
+
version: 1.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ibanity
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-11-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|
@@ -67,6 +67,7 @@ files:
|
|
67
67
|
- lib/ibanity/api/isabel_connect/bulk_payment_initiation_request.rb
|
68
68
|
- lib/ibanity/api/isabel_connect/intraday_transaction.rb
|
69
69
|
- lib/ibanity/api/isabel_connect/refresh_token.rb
|
70
|
+
- lib/ibanity/api/isabel_connect/token.rb
|
70
71
|
- lib/ibanity/api/isabel_connect/transaction.rb
|
71
72
|
- lib/ibanity/api/o_auth_resource.rb
|
72
73
|
- lib/ibanity/api/ponto_connect/account.rb
|
@@ -75,6 +76,7 @@ files:
|
|
75
76
|
- lib/ibanity/api/ponto_connect/integration.rb
|
76
77
|
- lib/ibanity/api/ponto_connect/onboarding_details.rb
|
77
78
|
- lib/ibanity/api/ponto_connect/payment.rb
|
79
|
+
- lib/ibanity/api/ponto_connect/reauthorization_request.rb
|
78
80
|
- lib/ibanity/api/ponto_connect/sandbox/financial_institution_account.rb
|
79
81
|
- lib/ibanity/api/ponto_connect/sandbox/financial_institution_transaction.rb
|
80
82
|
- lib/ibanity/api/ponto_connect/synchronization.rb
|