adyen-ruby-api-library 8.0.0 → 9.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/codeql.yml +5 -5
- data/.github/workflows/rubygems_release.yml +1 -4
- data/CONTRIBUTING.md +1 -1
- data/README.md +1 -1
- data/VERSION +1 -1
- data/lib/adyen/services/balancePlatform/account_holders_api.rb +9 -9
- data/lib/adyen/services/balancePlatform/balance_accounts_api.rb +32 -32
- data/lib/adyen/services/balancePlatform/payment_instrument_groups_api.rb +10 -10
- data/lib/adyen/services/balancePlatform/payment_instruments_api.rb +17 -17
- data/lib/adyen/services/balancePlatform/platform_api.rb +6 -6
- data/lib/adyen/services/balancePlatform/transaction_rules_api.rb +9 -9
- data/lib/adyen/services/checkout/donations_api.rb +20 -0
- data/lib/adyen/services/checkout/modifications_api.rb +9 -9
- data/lib/adyen/services/checkout/orders_api.rb +6 -6
- data/lib/adyen/services/checkout/payment_links_api.rb +8 -8
- data/lib/adyen/services/checkout/payments_api.rb +6 -15
- data/lib/adyen/services/checkout.rb +5 -0
- data/lib/adyen/services/dataProtection.rb +1 -1
- data/lib/adyen/services/legalEntityManagement/business_lines_api.rb +9 -9
- data/lib/adyen/services/legalEntityManagement/hosted_onboarding_api.rb +10 -10
- data/lib/adyen/services/legalEntityManagement/legal_entities_api.rb +27 -18
- data/lib/adyen/services/legalEntityManagement/pci_questionnaires_api.rb +8 -8
- data/lib/adyen/services/legalEntityManagement/terms_of_service_api.rb +18 -18
- data/lib/adyen/services/legalEntityManagement/transfer_instruments_api.rb +9 -9
- data/lib/adyen/services/management/account_company_level_api.rb +8 -8
- data/lib/adyen/services/management/account_merchant_level_api.rb +8 -8
- data/lib/adyen/services/management/account_store_level_api.rb +26 -26
- data/lib/adyen/services/management/allowed_origins_company_level_api.rb +12 -12
- data/lib/adyen/services/management/allowed_origins_merchant_level_api.rb +12 -12
- data/lib/adyen/services/management/android_files_company_level_api.rb +8 -8
- data/lib/adyen/services/management/api_credentials_company_level_api.rb +13 -13
- data/lib/adyen/services/management/api_credentials_merchant_level_api.rb +13 -13
- data/lib/adyen/services/management/my_api_credential_api.rb +22 -22
- data/lib/adyen/services/management/payment_methods_merchant_level_api.rb +15 -15
- data/lib/adyen/services/management/payout_settings_merchant_level_api.rb +15 -15
- data/lib/adyen/services/management/split_configuration_merchant_level_api.rb +30 -30
- data/lib/adyen/services/management/terminal_actions_company_level_api.rb +8 -8
- data/lib/adyen/services/management/terminal_orders_company_level_api.rb +40 -40
- data/lib/adyen/services/management/terminal_orders_merchant_level_api.rb +40 -40
- data/lib/adyen/services/management/terminal_settings_store_level_api.rb +16 -16
- data/lib/adyen/services/management/users_company_level_api.rb +13 -13
- data/lib/adyen/services/management/users_merchant_level_api.rb +13 -13
- data/lib/adyen/services/management/webhooks_company_level_api.rb +19 -19
- data/lib/adyen/services/management/webhooks_merchant_level_api.rb +19 -19
- data/lib/adyen/services/transfers/transfers_api.rb +6 -6
- data/lib/adyen/utils/hmac_validator.rb +12 -20
- data/lib/adyen/version.rb +1 -1
- data/spec/utils/hmac_validator_spec.rb +15 -15
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e8b08de6a807cdb9b167fbcceda1c0faee1877a74019598143937c601fdb8761
|
4
|
+
data.tar.gz: 06b6bf8881d4f769691782f6bdae19ce6141b1f6d921178e0d0b10b332739e3a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c49ff13c0d95d1e2cc9a0efca40aad05a5ea1cfaca2b582069fdff3aab7d91c963e8ceeaa8162f1aa3fff3b2078b93ba59a3bac1fbbf8a74793544ac8e7ca622
|
7
|
+
data.tar.gz: ef19a8c76e01f6b34c8976c472ec336e3cc30e90a8decd480daea4f7517867b1307a4a0bf169e115ddd6ec483ebe6aff1d6e9449419042bbf9d9114d6e0a8b2b
|
@@ -2,9 +2,9 @@ name: "CodeQL"
|
|
2
2
|
|
3
3
|
on:
|
4
4
|
push:
|
5
|
-
branches: [ "
|
5
|
+
branches: [ "main" ]
|
6
6
|
pull_request:
|
7
|
-
branches: [ "
|
7
|
+
branches: [ "main" ]
|
8
8
|
schedule:
|
9
9
|
- cron: "40 12 * * 0"
|
10
10
|
|
@@ -27,15 +27,15 @@ jobs:
|
|
27
27
|
uses: actions/checkout@v4
|
28
28
|
|
29
29
|
- name: Initialize CodeQL
|
30
|
-
uses: github/codeql-action/init@
|
30
|
+
uses: github/codeql-action/init@v3
|
31
31
|
with:
|
32
32
|
languages: ${{ matrix.language }}
|
33
33
|
queries: +security-and-quality
|
34
34
|
|
35
35
|
- name: Autobuild
|
36
|
-
uses: github/codeql-action/autobuild@
|
36
|
+
uses: github/codeql-action/autobuild@v3
|
37
37
|
|
38
38
|
- name: Perform CodeQL Analysis
|
39
|
-
uses: github/codeql-action/analyze@
|
39
|
+
uses: github/codeql-action/analyze@v3
|
40
40
|
with:
|
41
41
|
category: "/language:${{ matrix.language }}"
|
@@ -10,12 +10,9 @@ jobs:
|
|
10
10
|
|
11
11
|
steps:
|
12
12
|
- uses: actions/checkout@v4
|
13
|
-
- run: |
|
14
|
-
git config user.name github-actions
|
15
|
-
git config user.email github-actions@github.com
|
16
13
|
- name: Release Gem on RubyGems
|
17
14
|
if: contains(github.ref, 'refs/tags/v')
|
18
|
-
uses: cadwallion/publish-rubygems-action@
|
15
|
+
uses: cadwallion/publish-rubygems-action@v1.1.0
|
19
16
|
env:
|
20
17
|
GITHUB_TOKEN: ${{secrets.TOKEN_RUBYGEMS_RELEASES_WITH_EXPIRATION}}
|
21
18
|
RUBYGEMS_API_KEY: ${{secrets.RUBYGEMS_API_KEY}}
|
data/CONTRIBUTING.md
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
## How to contribute step-by-step
|
4
4
|
|
5
5
|
1. Fork the `Adyen/adyen-ruby-api-library` repository.
|
6
|
-
2. Create a new branch from `
|
6
|
+
2. Create a new branch from `main` in your fork. This makes it easier for you to keep track of your changes.
|
7
7
|
3. Make the desired changes to the code.
|
8
8
|
* If you are adding new functionality or fixing a bug, we recommend you add unit tests that cover it.
|
9
9
|
4. Push the changes to your fork.
|
data/README.md
CHANGED
@@ -234,7 +234,7 @@ We value your input! Help us enhance our API Libraries and improve the integrati
|
|
234
234
|
## Contributing
|
235
235
|
|
236
236
|
We encourage you to contribute to this repository, so everyone can benefit from new features, bug fixes, and any other improvements.
|
237
|
-
Have a look at our [contributing guidelines](
|
237
|
+
Have a look at our [contributing guidelines](/CONTRIBUTING.md) to find out how to raise a pull request.
|
238
238
|
|
239
239
|
## Support
|
240
240
|
If you have a feature request, or spotted a bug or a technical problem, [create an issue here](https://github.com/Adyen/adyen-ruby-api-library/issues/new/choose).
|
data/VERSION
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
|
1
|
+
9.0.0
|
2
2
|
|
@@ -7,6 +7,15 @@ module Adyen
|
|
7
7
|
super(client, version, 'BalancePlatform')
|
8
8
|
end
|
9
9
|
|
10
|
+
def create_account_holder(request, headers: {})
|
11
|
+
endpoint = '/accountHolders'.gsub(/{.+?}/, '%s')
|
12
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
13
|
+
endpoint = format(endpoint)
|
14
|
+
|
15
|
+
action = { method: 'post', url: endpoint }
|
16
|
+
@client.call_adyen_api(@service, action, request, headers, @version)
|
17
|
+
end
|
18
|
+
|
10
19
|
def get_account_holder(id, headers: {})
|
11
20
|
endpoint = '/accountHolders/{id}'.gsub(/{.+?}/, '%s')
|
12
21
|
endpoint = endpoint.gsub(%r{^/}, '')
|
@@ -43,14 +52,5 @@ module Adyen
|
|
43
52
|
@client.call_adyen_api(@service, action, request, headers, @version)
|
44
53
|
end
|
45
54
|
|
46
|
-
def create_account_holder(request, headers: {})
|
47
|
-
endpoint = '/accountHolders'.gsub(/{.+?}/, '%s')
|
48
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
49
|
-
endpoint = format(endpoint)
|
50
|
-
|
51
|
-
action = { method: 'post', url: endpoint }
|
52
|
-
@client.call_adyen_api(@service, action, request, headers, @version)
|
53
|
-
end
|
54
|
-
|
55
55
|
end
|
56
56
|
end
|
@@ -7,6 +7,24 @@ module Adyen
|
|
7
7
|
super(client, version, 'BalancePlatform')
|
8
8
|
end
|
9
9
|
|
10
|
+
def create_balance_account(request, headers: {})
|
11
|
+
endpoint = '/balanceAccounts'.gsub(/{.+?}/, '%s')
|
12
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
13
|
+
endpoint = format(endpoint)
|
14
|
+
|
15
|
+
action = { method: 'post', url: endpoint }
|
16
|
+
@client.call_adyen_api(@service, action, request, headers, @version)
|
17
|
+
end
|
18
|
+
|
19
|
+
def create_sweep(request, balance_account_id, headers: {})
|
20
|
+
endpoint = '/balanceAccounts/{balanceAccountId}/sweeps'.gsub(/{.+?}/, '%s')
|
21
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
22
|
+
endpoint = format(endpoint, balance_account_id)
|
23
|
+
|
24
|
+
action = { method: 'post', url: endpoint }
|
25
|
+
@client.call_adyen_api(@service, action, request, headers, @version)
|
26
|
+
end
|
27
|
+
|
10
28
|
def delete_sweep(balance_account_id, sweep_id, headers: {})
|
11
29
|
endpoint = '/balanceAccounts/{balanceAccountId}/sweeps/{sweepId}'.gsub(/{.+?}/, '%s')
|
12
30
|
endpoint = endpoint.gsub(%r{^/}, '')
|
@@ -16,20 +34,20 @@ module Adyen
|
|
16
34
|
@client.call_adyen_api(@service, action, {}, headers, @version)
|
17
35
|
end
|
18
36
|
|
19
|
-
def
|
20
|
-
endpoint = '/balanceAccounts/{
|
37
|
+
def get_all_payment_instruments_for_balance_account(id, headers: {}, query_params: {})
|
38
|
+
endpoint = '/balanceAccounts/{id}/paymentInstruments'.gsub(/{.+?}/, '%s')
|
21
39
|
endpoint = endpoint.gsub(%r{^/}, '')
|
22
|
-
endpoint = format(endpoint,
|
40
|
+
endpoint = format(endpoint, id)
|
23
41
|
endpoint += create_query_string(query_params)
|
24
42
|
action = { method: 'get', url: endpoint }
|
25
43
|
@client.call_adyen_api(@service, action, {}, headers, @version)
|
26
44
|
end
|
27
45
|
|
28
|
-
def
|
29
|
-
endpoint = '/balanceAccounts/{balanceAccountId}/sweeps
|
46
|
+
def get_all_sweeps_for_balance_account(balance_account_id, headers: {}, query_params: {})
|
47
|
+
endpoint = '/balanceAccounts/{balanceAccountId}/sweeps'.gsub(/{.+?}/, '%s')
|
30
48
|
endpoint = endpoint.gsub(%r{^/}, '')
|
31
|
-
endpoint = format(endpoint, balance_account_id
|
32
|
-
|
49
|
+
endpoint = format(endpoint, balance_account_id)
|
50
|
+
endpoint += create_query_string(query_params)
|
33
51
|
action = { method: 'get', url: endpoint }
|
34
52
|
@client.call_adyen_api(@service, action, {}, headers, @version)
|
35
53
|
end
|
@@ -43,22 +61,13 @@ module Adyen
|
|
43
61
|
@client.call_adyen_api(@service, action, {}, headers, @version)
|
44
62
|
end
|
45
63
|
|
46
|
-
def
|
47
|
-
endpoint = '/balanceAccounts/{id}/paymentInstruments'.gsub(/{.+?}/, '%s')
|
48
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
49
|
-
endpoint = format(endpoint, id)
|
50
|
-
endpoint += create_query_string(query_params)
|
51
|
-
action = { method: 'get', url: endpoint }
|
52
|
-
@client.call_adyen_api(@service, action, {}, headers, @version)
|
53
|
-
end
|
54
|
-
|
55
|
-
def update_sweep(request, balance_account_id, sweep_id, headers: {})
|
64
|
+
def get_sweep(balance_account_id, sweep_id, headers: {})
|
56
65
|
endpoint = '/balanceAccounts/{balanceAccountId}/sweeps/{sweepId}'.gsub(/{.+?}/, '%s')
|
57
66
|
endpoint = endpoint.gsub(%r{^/}, '')
|
58
67
|
endpoint = format(endpoint, balance_account_id, sweep_id)
|
59
68
|
|
60
|
-
action = { method: '
|
61
|
-
@client.call_adyen_api(@service, action,
|
69
|
+
action = { method: 'get', url: endpoint }
|
70
|
+
@client.call_adyen_api(@service, action, {}, headers, @version)
|
62
71
|
end
|
63
72
|
|
64
73
|
def update_balance_account(request, id, headers: {})
|
@@ -70,21 +79,12 @@ module Adyen
|
|
70
79
|
@client.call_adyen_api(@service, action, request, headers, @version)
|
71
80
|
end
|
72
81
|
|
73
|
-
def
|
74
|
-
endpoint = '/balanceAccounts'.gsub(/{.+?}/, '%s')
|
75
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
76
|
-
endpoint = format(endpoint)
|
77
|
-
|
78
|
-
action = { method: 'post', url: endpoint }
|
79
|
-
@client.call_adyen_api(@service, action, request, headers, @version)
|
80
|
-
end
|
81
|
-
|
82
|
-
def create_sweep(request, balance_account_id, headers: {})
|
83
|
-
endpoint = '/balanceAccounts/{balanceAccountId}/sweeps'.gsub(/{.+?}/, '%s')
|
82
|
+
def update_sweep(request, balance_account_id, sweep_id, headers: {})
|
83
|
+
endpoint = '/balanceAccounts/{balanceAccountId}/sweeps/{sweepId}'.gsub(/{.+?}/, '%s')
|
84
84
|
endpoint = endpoint.gsub(%r{^/}, '')
|
85
|
-
endpoint = format(endpoint, balance_account_id)
|
85
|
+
endpoint = format(endpoint, balance_account_id, sweep_id)
|
86
86
|
|
87
|
-
action = { method: '
|
87
|
+
action = { method: 'patch', url: endpoint }
|
88
88
|
@client.call_adyen_api(@service, action, request, headers, @version)
|
89
89
|
end
|
90
90
|
|
@@ -7,13 +7,13 @@ module Adyen
|
|
7
7
|
super(client, version, 'BalancePlatform')
|
8
8
|
end
|
9
9
|
|
10
|
-
def
|
11
|
-
endpoint = '/paymentInstrumentGroups
|
10
|
+
def create_payment_instrument_group(request, headers: {})
|
11
|
+
endpoint = '/paymentInstrumentGroups'.gsub(/{.+?}/, '%s')
|
12
12
|
endpoint = endpoint.gsub(%r{^/}, '')
|
13
|
-
endpoint = format(endpoint
|
13
|
+
endpoint = format(endpoint)
|
14
14
|
|
15
|
-
action = { method: '
|
16
|
-
@client.call_adyen_api(@service, action,
|
15
|
+
action = { method: 'post', url: endpoint }
|
16
|
+
@client.call_adyen_api(@service, action, request, headers, @version)
|
17
17
|
end
|
18
18
|
|
19
19
|
def get_all_transaction_rules_for_payment_instrument_group(id, headers: {})
|
@@ -25,13 +25,13 @@ module Adyen
|
|
25
25
|
@client.call_adyen_api(@service, action, {}, headers, @version)
|
26
26
|
end
|
27
27
|
|
28
|
-
def
|
29
|
-
endpoint = '/paymentInstrumentGroups'.gsub(/{.+?}/, '%s')
|
28
|
+
def get_payment_instrument_group(id, headers: {})
|
29
|
+
endpoint = '/paymentInstrumentGroups/{id}'.gsub(/{.+?}/, '%s')
|
30
30
|
endpoint = endpoint.gsub(%r{^/}, '')
|
31
|
-
endpoint = format(endpoint)
|
31
|
+
endpoint = format(endpoint, id)
|
32
32
|
|
33
|
-
action = { method: '
|
34
|
-
@client.call_adyen_api(@service, action,
|
33
|
+
action = { method: 'get', url: endpoint }
|
34
|
+
@client.call_adyen_api(@service, action, {}, headers, @version)
|
35
35
|
end
|
36
36
|
|
37
37
|
end
|
@@ -7,17 +7,17 @@ module Adyen
|
|
7
7
|
super(client, version, 'BalancePlatform')
|
8
8
|
end
|
9
9
|
|
10
|
-
def
|
11
|
-
endpoint = '/paymentInstruments
|
10
|
+
def create_payment_instrument(request, headers: {})
|
11
|
+
endpoint = '/paymentInstruments'.gsub(/{.+?}/, '%s')
|
12
12
|
endpoint = endpoint.gsub(%r{^/}, '')
|
13
|
-
endpoint = format(endpoint
|
13
|
+
endpoint = format(endpoint)
|
14
14
|
|
15
|
-
action = { method: '
|
16
|
-
@client.call_adyen_api(@service, action,
|
15
|
+
action = { method: 'post', url: endpoint }
|
16
|
+
@client.call_adyen_api(@service, action, request, headers, @version)
|
17
17
|
end
|
18
18
|
|
19
|
-
def
|
20
|
-
endpoint = '/paymentInstruments/{id}/
|
19
|
+
def get_all_transaction_rules_for_payment_instrument(id, headers: {})
|
20
|
+
endpoint = '/paymentInstruments/{id}/transactionRules'.gsub(/{.+?}/, '%s')
|
21
21
|
endpoint = endpoint.gsub(%r{^/}, '')
|
22
22
|
endpoint = format(endpoint, id)
|
23
23
|
|
@@ -34,8 +34,8 @@ module Adyen
|
|
34
34
|
@client.call_adyen_api(@service, action, {}, headers, @version)
|
35
35
|
end
|
36
36
|
|
37
|
-
def
|
38
|
-
endpoint = '/paymentInstruments/{id}
|
37
|
+
def get_payment_instrument(id, headers: {})
|
38
|
+
endpoint = '/paymentInstruments/{id}'.gsub(/{.+?}/, '%s')
|
39
39
|
endpoint = endpoint.gsub(%r{^/}, '')
|
40
40
|
endpoint = format(endpoint, id)
|
41
41
|
|
@@ -43,21 +43,21 @@ module Adyen
|
|
43
43
|
@client.call_adyen_api(@service, action, {}, headers, @version)
|
44
44
|
end
|
45
45
|
|
46
|
-
def
|
47
|
-
endpoint = '/paymentInstruments/{id}'.gsub(/{.+?}/, '%s')
|
46
|
+
def list_network_tokens(id, headers: {})
|
47
|
+
endpoint = '/paymentInstruments/{id}/networkTokens'.gsub(/{.+?}/, '%s')
|
48
48
|
endpoint = endpoint.gsub(%r{^/}, '')
|
49
49
|
endpoint = format(endpoint, id)
|
50
50
|
|
51
|
-
action = { method: '
|
52
|
-
@client.call_adyen_api(@service, action,
|
51
|
+
action = { method: 'get', url: endpoint }
|
52
|
+
@client.call_adyen_api(@service, action, {}, headers, @version)
|
53
53
|
end
|
54
54
|
|
55
|
-
def
|
56
|
-
endpoint = '/paymentInstruments'.gsub(/{.+?}/, '%s')
|
55
|
+
def update_payment_instrument(request, id, headers: {})
|
56
|
+
endpoint = '/paymentInstruments/{id}'.gsub(/{.+?}/, '%s')
|
57
57
|
endpoint = endpoint.gsub(%r{^/}, '')
|
58
|
-
endpoint = format(endpoint)
|
58
|
+
endpoint = format(endpoint, id)
|
59
59
|
|
60
|
-
action = { method: '
|
60
|
+
action = { method: 'patch', url: endpoint }
|
61
61
|
@client.call_adyen_api(@service, action, request, headers, @version)
|
62
62
|
end
|
63
63
|
|
@@ -7,20 +7,20 @@ module Adyen
|
|
7
7
|
super(client, version, 'BalancePlatform')
|
8
8
|
end
|
9
9
|
|
10
|
-
def
|
11
|
-
endpoint = '/balancePlatforms/{id}'.gsub(/{.+?}/, '%s')
|
10
|
+
def get_all_account_holders_under_balance_platform(id, headers: {}, query_params: {})
|
11
|
+
endpoint = '/balancePlatforms/{id}/accountHolders'.gsub(/{.+?}/, '%s')
|
12
12
|
endpoint = endpoint.gsub(%r{^/}, '')
|
13
13
|
endpoint = format(endpoint, id)
|
14
|
-
|
14
|
+
endpoint += create_query_string(query_params)
|
15
15
|
action = { method: 'get', url: endpoint }
|
16
16
|
@client.call_adyen_api(@service, action, {}, headers, @version)
|
17
17
|
end
|
18
18
|
|
19
|
-
def
|
20
|
-
endpoint = '/balancePlatforms/{id}
|
19
|
+
def get_balance_platform(id, headers: {})
|
20
|
+
endpoint = '/balancePlatforms/{id}'.gsub(/{.+?}/, '%s')
|
21
21
|
endpoint = endpoint.gsub(%r{^/}, '')
|
22
22
|
endpoint = format(endpoint, id)
|
23
|
-
|
23
|
+
|
24
24
|
action = { method: 'get', url: endpoint }
|
25
25
|
@client.call_adyen_api(@service, action, {}, headers, @version)
|
26
26
|
end
|
@@ -7,6 +7,15 @@ module Adyen
|
|
7
7
|
super(client, version, 'BalancePlatform')
|
8
8
|
end
|
9
9
|
|
10
|
+
def create_transaction_rule(request, headers: {})
|
11
|
+
endpoint = '/transactionRules'.gsub(/{.+?}/, '%s')
|
12
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
13
|
+
endpoint = format(endpoint)
|
14
|
+
|
15
|
+
action = { method: 'post', url: endpoint }
|
16
|
+
@client.call_adyen_api(@service, action, request, headers, @version)
|
17
|
+
end
|
18
|
+
|
10
19
|
def delete_transaction_rule(transaction_rule_id, headers: {})
|
11
20
|
endpoint = '/transactionRules/{transactionRuleId}'.gsub(/{.+?}/, '%s')
|
12
21
|
endpoint = endpoint.gsub(%r{^/}, '')
|
@@ -34,14 +43,5 @@ module Adyen
|
|
34
43
|
@client.call_adyen_api(@service, action, request, headers, @version)
|
35
44
|
end
|
36
45
|
|
37
|
-
def create_transaction_rule(request, headers: {})
|
38
|
-
endpoint = '/transactionRules'.gsub(/{.+?}/, '%s')
|
39
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
40
|
-
endpoint = format(endpoint)
|
41
|
-
|
42
|
-
action = { method: 'post', url: endpoint }
|
43
|
-
@client.call_adyen_api(@service, action, request, headers, @version)
|
44
|
-
end
|
45
|
-
|
46
46
|
end
|
47
47
|
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
require_relative '../service'
|
2
|
+
module Adyen
|
3
|
+
class DonationsApi < Service
|
4
|
+
attr_accessor :service, :version
|
5
|
+
|
6
|
+
def initialize(client, version = DEFAULT_VERSION)
|
7
|
+
super(client, version, 'Checkout')
|
8
|
+
end
|
9
|
+
|
10
|
+
def donations(request, headers: {})
|
11
|
+
endpoint = '/donations'.gsub(/{.+?}/, '%s')
|
12
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
13
|
+
endpoint = format(endpoint)
|
14
|
+
|
15
|
+
action = { method: 'post', url: endpoint }
|
16
|
+
@client.call_adyen_api(@service, action, request, headers, @version)
|
17
|
+
end
|
18
|
+
|
19
|
+
end
|
20
|
+
end
|
@@ -16,15 +16,6 @@ module Adyen
|
|
16
16
|
@client.call_adyen_api(@service, action, request, headers, @version)
|
17
17
|
end
|
18
18
|
|
19
|
-
def update_authorised_amount(request, payment_psp_reference, headers: {})
|
20
|
-
endpoint = '/payments/{paymentPspReference}/amountUpdates'.gsub(/{.+?}/, '%s')
|
21
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
22
|
-
endpoint = format(endpoint, payment_psp_reference)
|
23
|
-
|
24
|
-
action = { method: 'post', url: endpoint }
|
25
|
-
@client.call_adyen_api(@service, action, request, headers, @version)
|
26
|
-
end
|
27
|
-
|
28
19
|
def cancel_authorised_payment_by_psp_reference(request, payment_psp_reference, headers: {})
|
29
20
|
endpoint = '/payments/{paymentPspReference}/cancels'.gsub(/{.+?}/, '%s')
|
30
21
|
endpoint = endpoint.gsub(%r{^/}, '')
|
@@ -61,5 +52,14 @@ module Adyen
|
|
61
52
|
@client.call_adyen_api(@service, action, request, headers, @version)
|
62
53
|
end
|
63
54
|
|
55
|
+
def update_authorised_amount(request, payment_psp_reference, headers: {})
|
56
|
+
endpoint = '/payments/{paymentPspReference}/amountUpdates'.gsub(/{.+?}/, '%s')
|
57
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
58
|
+
endpoint = format(endpoint, payment_psp_reference)
|
59
|
+
|
60
|
+
action = { method: 'post', url: endpoint }
|
61
|
+
@client.call_adyen_api(@service, action, request, headers, @version)
|
62
|
+
end
|
63
|
+
|
64
64
|
end
|
65
65
|
end
|
@@ -7,8 +7,8 @@ module Adyen
|
|
7
7
|
super(client, version, 'Checkout')
|
8
8
|
end
|
9
9
|
|
10
|
-
def
|
11
|
-
endpoint = '/orders'.gsub(/{.+?}/, '%s')
|
10
|
+
def cancel_order(request, headers: {})
|
11
|
+
endpoint = '/orders/cancel'.gsub(/{.+?}/, '%s')
|
12
12
|
endpoint = endpoint.gsub(%r{^/}, '')
|
13
13
|
endpoint = format(endpoint)
|
14
14
|
|
@@ -16,8 +16,8 @@ module Adyen
|
|
16
16
|
@client.call_adyen_api(@service, action, request, headers, @version)
|
17
17
|
end
|
18
18
|
|
19
|
-
def
|
20
|
-
endpoint = '/
|
19
|
+
def get_balance_of_gift_card(request, headers: {})
|
20
|
+
endpoint = '/paymentMethods/balance'.gsub(/{.+?}/, '%s')
|
21
21
|
endpoint = endpoint.gsub(%r{^/}, '')
|
22
22
|
endpoint = format(endpoint)
|
23
23
|
|
@@ -25,8 +25,8 @@ module Adyen
|
|
25
25
|
@client.call_adyen_api(@service, action, request, headers, @version)
|
26
26
|
end
|
27
27
|
|
28
|
-
def
|
29
|
-
endpoint = '/
|
28
|
+
def orders(request, headers: {})
|
29
|
+
endpoint = '/orders'.gsub(/{.+?}/, '%s')
|
30
30
|
endpoint = endpoint.gsub(%r{^/}, '')
|
31
31
|
endpoint = format(endpoint)
|
32
32
|
|
@@ -16,21 +16,21 @@ module Adyen
|
|
16
16
|
@client.call_adyen_api(@service, action, {}, headers, @version)
|
17
17
|
end
|
18
18
|
|
19
|
-
def
|
20
|
-
endpoint = '/paymentLinks
|
19
|
+
def payment_links(request, headers: {})
|
20
|
+
endpoint = '/paymentLinks'.gsub(/{.+?}/, '%s')
|
21
21
|
endpoint = endpoint.gsub(%r{^/}, '')
|
22
|
-
endpoint = format(endpoint
|
22
|
+
endpoint = format(endpoint)
|
23
23
|
|
24
|
-
action = { method: '
|
24
|
+
action = { method: 'post', url: endpoint }
|
25
25
|
@client.call_adyen_api(@service, action, request, headers, @version)
|
26
26
|
end
|
27
27
|
|
28
|
-
def
|
29
|
-
endpoint = '/paymentLinks'.gsub(/{.+?}/, '%s')
|
28
|
+
def update_payment_link(request, link_id, headers: {})
|
29
|
+
endpoint = '/paymentLinks/{linkId}'.gsub(/{.+?}/, '%s')
|
30
30
|
endpoint = endpoint.gsub(%r{^/}, '')
|
31
|
-
endpoint = format(endpoint)
|
31
|
+
endpoint = format(endpoint, link_id)
|
32
32
|
|
33
|
-
action = { method: '
|
33
|
+
action = { method: 'patch', url: endpoint }
|
34
34
|
@client.call_adyen_api(@service, action, request, headers, @version)
|
35
35
|
end
|
36
36
|
|
@@ -7,15 +7,6 @@ module Adyen
|
|
7
7
|
super(client, version, 'Checkout')
|
8
8
|
end
|
9
9
|
|
10
|
-
def get_result_of_payment_session(session_id, headers: {}, query_params: {})
|
11
|
-
endpoint = '/sessions/{sessionId}'.gsub(/{.+?}/, '%s')
|
12
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
13
|
-
endpoint = format(endpoint, session_id)
|
14
|
-
endpoint += create_query_string(query_params)
|
15
|
-
action = { method: 'get', url: endpoint }
|
16
|
-
@client.call_adyen_api(@service, action, {}, headers, @version)
|
17
|
-
end
|
18
|
-
|
19
10
|
def card_details(request, headers: {})
|
20
11
|
endpoint = '/cardDetails'.gsub(/{.+?}/, '%s')
|
21
12
|
endpoint = endpoint.gsub(%r{^/}, '')
|
@@ -25,13 +16,13 @@ module Adyen
|
|
25
16
|
@client.call_adyen_api(@service, action, request, headers, @version)
|
26
17
|
end
|
27
18
|
|
28
|
-
def
|
29
|
-
endpoint = '/
|
19
|
+
def get_result_of_payment_session(session_id, headers: {}, query_params: {})
|
20
|
+
endpoint = '/sessions/{sessionId}'.gsub(/{.+?}/, '%s')
|
30
21
|
endpoint = endpoint.gsub(%r{^/}, '')
|
31
|
-
endpoint = format(endpoint)
|
32
|
-
|
33
|
-
action = { method: '
|
34
|
-
@client.call_adyen_api(@service, action,
|
22
|
+
endpoint = format(endpoint, session_id)
|
23
|
+
endpoint += create_query_string(query_params)
|
24
|
+
action = { method: 'get', url: endpoint }
|
25
|
+
@client.call_adyen_api(@service, action, {}, headers, @version)
|
35
26
|
end
|
36
27
|
|
37
28
|
def payment_methods(request, headers: {})
|
@@ -1,4 +1,5 @@
|
|
1
1
|
require_relative 'checkout/classic_checkout_sdk_api'
|
2
|
+
require_relative 'checkout/donations_api'
|
2
3
|
require_relative 'checkout/modifications_api'
|
3
4
|
require_relative 'checkout/orders_api'
|
4
5
|
require_relative 'checkout/payment_links_api'
|
@@ -21,6 +22,10 @@ module Adyen
|
|
21
22
|
@classic_checkout_sdk_api ||= Adyen::ClassicCheckoutSDKApi.new(@client, @version)
|
22
23
|
end
|
23
24
|
|
25
|
+
def donations_api
|
26
|
+
@donations_api ||= Adyen::DonationsApi.new(@client, @version)
|
27
|
+
end
|
28
|
+
|
24
29
|
def modifications_api
|
25
30
|
@modifications_api ||= Adyen::ModificationsApi.new(@client, @version)
|
26
31
|
end
|
@@ -7,6 +7,15 @@ module Adyen
|
|
7
7
|
super(client, version, 'LegalEntityManagement')
|
8
8
|
end
|
9
9
|
|
10
|
+
def create_business_line(request, headers: {})
|
11
|
+
endpoint = '/businessLines'.gsub(/{.+?}/, '%s')
|
12
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
13
|
+
endpoint = format(endpoint)
|
14
|
+
|
15
|
+
action = { method: 'post', url: endpoint }
|
16
|
+
@client.call_adyen_api(@service, action, request, headers, @version)
|
17
|
+
end
|
18
|
+
|
10
19
|
def delete_business_line(id, headers: {})
|
11
20
|
endpoint = '/businessLines/{id}'.gsub(/{.+?}/, '%s')
|
12
21
|
endpoint = endpoint.gsub(%r{^/}, '')
|
@@ -34,14 +43,5 @@ module Adyen
|
|
34
43
|
@client.call_adyen_api(@service, action, request, headers, @version)
|
35
44
|
end
|
36
45
|
|
37
|
-
def create_business_line(request, headers: {})
|
38
|
-
endpoint = '/businessLines'.gsub(/{.+?}/, '%s')
|
39
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
40
|
-
endpoint = format(endpoint)
|
41
|
-
|
42
|
-
action = { method: 'post', url: endpoint }
|
43
|
-
@client.call_adyen_api(@service, action, request, headers, @version)
|
44
|
-
end
|
45
|
-
|
46
46
|
end
|
47
47
|
end
|
@@ -7,13 +7,13 @@ module Adyen
|
|
7
7
|
super(client, version, 'LegalEntityManagement')
|
8
8
|
end
|
9
9
|
|
10
|
-
def
|
11
|
-
endpoint = '/
|
10
|
+
def get_link_to_adyenhosted_onboarding_page(request, id, headers: {})
|
11
|
+
endpoint = '/legalEntities/{id}/onboardingLinks'.gsub(/{.+?}/, '%s')
|
12
12
|
endpoint = endpoint.gsub(%r{^/}, '')
|
13
|
-
endpoint = format(endpoint)
|
13
|
+
endpoint = format(endpoint, id)
|
14
14
|
|
15
|
-
action = { method: '
|
16
|
-
@client.call_adyen_api(@service, action,
|
15
|
+
action = { method: 'post', url: endpoint }
|
16
|
+
@client.call_adyen_api(@service, action, request, headers, @version)
|
17
17
|
end
|
18
18
|
|
19
19
|
def get_onboarding_link_theme(id, headers: {})
|
@@ -25,13 +25,13 @@ module Adyen
|
|
25
25
|
@client.call_adyen_api(@service, action, {}, headers, @version)
|
26
26
|
end
|
27
27
|
|
28
|
-
def
|
29
|
-
endpoint = '/
|
28
|
+
def list_hosted_onboarding_page_themes(headers: {})
|
29
|
+
endpoint = '/themes'.gsub(/{.+?}/, '%s')
|
30
30
|
endpoint = endpoint.gsub(%r{^/}, '')
|
31
|
-
endpoint = format(endpoint
|
31
|
+
endpoint = format(endpoint)
|
32
32
|
|
33
|
-
action = { method: '
|
34
|
-
@client.call_adyen_api(@service, action,
|
33
|
+
action = { method: 'get', url: endpoint }
|
34
|
+
@client.call_adyen_api(@service, action, {}, headers, @version)
|
35
35
|
end
|
36
36
|
|
37
37
|
end
|