Skip to content

Commit 8d130c4

Browse files
committed
Add OpenBanking
1 parent 2ffe0a1 commit 8d130c4

File tree

7 files changed

+113
-1
lines changed

7 files changed

+113
-1
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ This library supports the following:
1414
| [Configuration API](https://docs.adyen.com/api-explorer/balanceplatform/2/overview) | v2 | The Configuration API enables you to create a platform where you can onboard your users as account holders and create balance accounts, cards, and business accounts. | [BalancePlatform](lib/adyen/services/balancePlatform.rb) |
1515
| [DataProtection API](https://docs.adyen.com/development-resources/data-protection-api) | v1 | Adyen Data Protection API provides a way for you to process [Subject Erasure Requests](https://gdpr-info.eu/art-17-gdpr/) as mandated in GDPR. Use our API to submit a request to delete shopper's data, including payment details and other related information (for example, delivery address or shopper email) | [DataProtection](lib/adyen/services/dataProtection.rb) |
1616
| [Legal Entity Management API](https://docs.adyen.com/api-explorer/legalentity/3/overview) | v3 | Manage legal entities that contain information required for verification. | [LegalEntityManagement](lib/adyen/services/legalEntityManagement.rb) |
17-
| [Management API](https://docs.adyen.com/api-explorer/Management/3/overview) | v3 | Configure and manage your Adyen company and merchant accounts, stores, and payment terminals. | [Management](lib/adyen/services/management.rb) |
17+
| [Management API](https://docs.adyen.com/api-explorer/Management/3/overview) | v3 | Configure and manage your Adyen company and merchant accounts, stores, and payment terminals. | [Management](lib/adyen/services/management.rb) |
18+
| [OpenBanking API](https://docs.adyen.com/api-explorer/open-banking/1/overview) | v1 | Securely share financial data and services with third parties. | [OpenBanking](lib/adyen/services/openBanking.rb) |
1819
| [Payments API](https://docs.adyen.com/api-explorer/Payment/68/overview) | v68 | Our classic integration for online payments. | [Classic Integration API](lib/adyen/services/payment.rb) |
1920
| [Payouts API](https://docs.adyen.com/api-explorer/Payout/68/overview) | v68 | Endpoints for sending funds to your customers. | [Payout](lib/adyen/services/payout.rb) |
2021
| [POS Terminal Management API](https://docs.adyen.com/api-explorer/postfmapi/1/overview) | ~~v1~~ | ~~Endpoints for managing your point-of-sale payment terminals.~~ ‼️ **Deprecated**: use instead the [Management API](https://docs.adyen.com/api-explorer/Management/latest/overview) for the management of your terminal fleet. | ~~[TerminalManagement](lib/adyen/services/posTerminalManagement.rb)~~ || [Recurring API](https://docs.adyen.com/api-explorer/Recurring/68/overview) | v68 | Endpoints for managing saved payment details. | [Recurring](lib/adyen/services/recurring.rb) |

lib/adyen/client.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,10 @@ def pos_mobile
304304
@pos_mobile ||= Adyen::PosMobile.new(self)
305305
end
306306

307+
def open_banking
308+
@open_banking ||= Adyen::OpenBanking.new(self)
309+
end
310+
307311
private
308312

309313
def auth_header(auth_type, faraday)

lib/adyen/services/openBanking.rb

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
require_relative 'openBanking/account_verification_api'
2+
3+
module Adyen
4+
5+
# NOTE: This class is auto generated by OpenAPI Generator
6+
# Ref: https://openapi-generator.tech
7+
#
8+
# Do not edit the class manually.
9+
class OpenBanking
10+
attr_accessor :service, :version
11+
12+
DEFAULT_VERSION = 1
13+
def initialize(client, version = DEFAULT_VERSION)
14+
@service = 'OpenBanking'
15+
@client = client
16+
@version = version
17+
end
18+
19+
def account_verification_api
20+
@account_verification_api ||= Adyen::AccountVerificationApi.new(@client, @version)
21+
end
22+
23+
end
24+
end
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
require_relative '../service'
2+
module Adyen
3+
4+
# NOTE: This class is auto generated by OpenAPI Generator
5+
# Ref: https://openapi-generator.tech
6+
#
7+
# Do not edit the class manually.
8+
class AccountVerificationApi < Service
9+
attr_accessor :service, :version
10+
11+
def initialize(client, version = DEFAULT_VERSION)
12+
super(client, version, 'OpenBanking')
13+
end
14+
15+
# Create routes for account verification
16+
def create_account_verification_routes(request, headers: {})
17+
endpoint = '/accountVerification/routes'.gsub(/{.+?}/, '%s')
18+
endpoint = endpoint.gsub(%r{^/}, '')
19+
endpoint = format(endpoint)
20+
21+
action = { method: 'post', url: endpoint }
22+
@client.call_adyen_api(@service, action, request, headers, @version)
23+
end
24+
25+
# Get account verification report
26+
def get_account_verification_report(code, headers: {})
27+
endpoint = '/accountVerification/reports/{code}'.gsub(/{.+?}/, '%s')
28+
endpoint = endpoint.gsub(%r{^/}, '')
29+
endpoint = format(endpoint, code)
30+
31+
action = { method: 'get', url: endpoint }
32+
@client.call_adyen_api(@service, action, {}, headers, @version)
33+
end
34+
35+
end
36+
end
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"country": "NL",
3+
"locale": "en-US",
4+
"state": "11a1e60a-18b0-4dda-9258-e0ae29e1e2a3",
5+
"redirectUrl": "https://merchanturl.example.org/redirect/url"
6+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"routes": [
3+
{
4+
"provider": {
5+
"name": "Tink",
6+
"logoURL": "https://obgateway.adyen.com/obgateway/static/provider/images/tink-logo.svg"
7+
},
8+
"link": "https://obgateway.adyen.com/obgateway/provider/outgoing/tink/redirect/13ec4802-c987-4f8c-8909-9a75ff567256"
9+
}
10+
]
11+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"id": "69ee9452ef824fe092f1417f37535755",
3+
"country": "ES",
4+
"accounts": [
5+
{
6+
"accountId": "ed5080e4f485430290475d246534c8fd",
7+
"accountType": "CURRENT",
8+
"accountName": "Checking Account 1",
9+
"accountNumber": "ES1376230223254275408743",
10+
"currency": "EUR",
11+
"identifiers": {
12+
"iban": {
13+
"iban": "ES1376230223254275408743",
14+
"bban": "76230223254275408743",
15+
"bic": "BIC001"
16+
}
17+
},
18+
"parties": [
19+
{
20+
"identity": {
21+
"fullLegalName": "Alberta Bobbeth Charleson",
22+
"name": "Alberta Bobbeth Charleson"
23+
},
24+
"role": "HOLDER"
25+
}
26+
],
27+
"bankName": "Tink Demo Bank"
28+
}
29+
]
30+
}

0 commit comments

Comments
 (0)