adyen-ruby-api-library 11.0.0 → 11.2.0
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/codeql.yml +4 -4
- data/.github/workflows/label_new_issues.yml +1 -1
- data/.github/workflows/release.yml +2 -2
- data/.github/workflows/ruby.yml +11 -3
- data/.github/workflows/rubygems_release.yml +2 -2
- data/.github/workflows/stale.yml +1 -1
- data/AGENTS.md +73 -0
- data/README.md +5 -0
- data/VERSION +1 -1
- data/lib/adyen/client.rb +30 -9
- data/lib/adyen/errors.rb +6 -0
- data/lib/adyen/services/balancePlatform/sca_association_management_api.rb +46 -0
- data/lib/adyen/services/balancePlatform/sca_device_management_api.rb +46 -0
- data/lib/adyen/services/balancePlatform.rb +10 -0
- data/lib/adyen/services/capital/grant_accounts_api.rb +26 -0
- data/lib/adyen/services/capital/grant_offers_api.rb +36 -0
- data/lib/adyen/services/capital/grants_api.rb +76 -0
- data/lib/adyen/services/capital.rb +34 -0
- data/lib/adyen/services/checkout/recurring_api.rb +10 -0
- data/lib/adyen/services/legalEntityManagement/legal_entities_api.rb +10 -0
- data/lib/adyen/services/payment/modifications_api.rb +1 -1
- data/lib/adyen/services/payment/payments_api.rb +1 -1
- data/lib/adyen/services/payment.rb +2 -2
- data/lib/adyen/services/recurring/recurring_api.rb +1 -1
- data/lib/adyen/services/recurring.rb +1 -1
- data/lib/adyen/version.rb +1 -1
- data/lib/adyen-ruby-api-library.rb +1 -0
- data/renovate.json +3 -1
- data/spec/capital_spec.rb +186 -0
- data/spec/checkout_spec.rb +13 -0
- data/spec/client_spec.rb +235 -64
- data/spec/data_protection_spec.rb +2 -2
- data/spec/disputes_spec.rb +3 -3
- data/spec/lem_spec.rb +75 -0
- data/spec/mocks/responses/Capital/get-grant-account-success.json +20 -0
- data/spec/mocks/responses/Capital/get-grant-disbursement-success.json +26 -0
- data/spec/mocks/responses/Capital/get-grant-disbursements-success.json +30 -0
- data/spec/mocks/responses/Capital/get-grant-offer-success.json +31 -0
- data/spec/mocks/responses/Capital/get-grant-success.json +22 -0
- data/spec/mocks/responses/Capital/grant-offers-success.json +19 -0
- data/spec/mocks/responses/Capital/grants-success.json +26 -0
- data/spec/mocks/responses/Capital/request-grant.json +31 -0
- data/spec/mocks/responses/Capital/update-grant-disbursement-success.json +26 -0
- data/spec/mocks/responses/LegalEntityManagement/get_legal_entity.json +14 -0
- data/templates/api-single.mustache +1 -1
- data/templates/api.mustache +1 -1
- metadata +23 -6
- data/Makefile +0 -79
- /data/spec/mocks/requests/{DataProtectionService → DataProtection}/request_subject_erasure.json +0 -0
- /data/spec/mocks/requests/{DisputesService → Disputes}/retrieve_applicable_defense_reasons.json +0 -0
- /data/spec/mocks/responses/{DataProtectionService → DataProtection}/request_subject_erasure.json +0 -0
- /data/spec/mocks/responses/{DisputesService → Disputes}/retrieve_applicable_defense_reasons.json +0 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"grantOffers": [
|
|
3
|
+
{
|
|
4
|
+
"id": "GO00000000000000000000001",
|
|
5
|
+
"amount": {
|
|
6
|
+
"currency": "EUR",
|
|
7
|
+
"value": 10000
|
|
8
|
+
},
|
|
9
|
+
"fee": {
|
|
10
|
+
"currency": "EUR",
|
|
11
|
+
"value": 100
|
|
12
|
+
},
|
|
13
|
+
"repayment": {
|
|
14
|
+
"currency": "EUR",
|
|
15
|
+
"value": 10100
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
]
|
|
19
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"grants": [
|
|
3
|
+
{
|
|
4
|
+
"id": "GR00000000000000000000001",
|
|
5
|
+
"grantAccountId": "CG00000000000000000000001",
|
|
6
|
+
"grantOfferId": "GO00000000000000000000001",
|
|
7
|
+
"counterparty": {
|
|
8
|
+
"accountHolderId": "AH00000000000000000000001",
|
|
9
|
+
"balanceAccountId": "BA00000000000000000000001"
|
|
10
|
+
},
|
|
11
|
+
"amount": {
|
|
12
|
+
"currency": "EUR",
|
|
13
|
+
"value": 10000
|
|
14
|
+
},
|
|
15
|
+
"balances": {
|
|
16
|
+
"currency": "EUR",
|
|
17
|
+
"principal": 10000,
|
|
18
|
+
"fee": 1000,
|
|
19
|
+
"total": 11000
|
|
20
|
+
},
|
|
21
|
+
"status": {
|
|
22
|
+
"code": "Active"
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
]
|
|
26
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "GR00000000000000000000001",
|
|
3
|
+
"grantAccountId": "CG00000000000000000000001",
|
|
4
|
+
"grantOfferId": "0000000000000001",
|
|
5
|
+
"counterparty": {
|
|
6
|
+
"accountHolderId": "AH00000000000000000000001",
|
|
7
|
+
"balanceAccountId": "BA00000000000000000000001"
|
|
8
|
+
},
|
|
9
|
+
"amount": {
|
|
10
|
+
"currency": "EUR",
|
|
11
|
+
"value": 1000000
|
|
12
|
+
},
|
|
13
|
+
"fee": {
|
|
14
|
+
"amount": {
|
|
15
|
+
"value": 120000,
|
|
16
|
+
"currency": "EUR"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"balances": {
|
|
20
|
+
"currency": "EUR",
|
|
21
|
+
"fee": 120000,
|
|
22
|
+
"principal": 1000000,
|
|
23
|
+
"total": 1120000
|
|
24
|
+
},
|
|
25
|
+
"repayment": {
|
|
26
|
+
"basisPoints": 1400
|
|
27
|
+
},
|
|
28
|
+
"status": {
|
|
29
|
+
"code": "Pending"
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "DI00000000000000000000001",
|
|
3
|
+
"grantId": "GR00000000000000000000001",
|
|
4
|
+
"accountHolderId": "AH00000000000000000000001",
|
|
5
|
+
"balanceAccountId": "BA00000000000000000000001",
|
|
6
|
+
"amount": {
|
|
7
|
+
"currency": "EUR",
|
|
8
|
+
"value": 10000
|
|
9
|
+
},
|
|
10
|
+
"fee": {
|
|
11
|
+
"amount": {
|
|
12
|
+
"currency": "EUR",
|
|
13
|
+
"value": 1000
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"balances": {
|
|
17
|
+
"currency": "EUR",
|
|
18
|
+
"principal": 10000,
|
|
19
|
+
"fee": 1000,
|
|
20
|
+
"total": 11000
|
|
21
|
+
},
|
|
22
|
+
"repayment": {
|
|
23
|
+
"basisPoints": 1500,
|
|
24
|
+
"updateDescription": "string"
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "LE322JV223222D5F4K62J7465",
|
|
3
|
+
"type": "Organization",
|
|
4
|
+
"status": "Active",
|
|
5
|
+
"legalEntityCode": "LE322JV223222D5F4K62J7465",
|
|
6
|
+
"reference": "MyCompany",
|
|
7
|
+
"capabilities": [
|
|
8
|
+
{
|
|
9
|
+
"id": "capability_1",
|
|
10
|
+
"requested": true,
|
|
11
|
+
"allowed": true
|
|
12
|
+
}
|
|
13
|
+
]
|
|
14
|
+
}
|
data/templates/api.mustache
CHANGED
|
@@ -6,7 +6,7 @@ module Adyen
|
|
|
6
6
|
# Ref: https://openapi-generator.tech
|
|
7
7
|
#
|
|
8
8
|
# Do not edit the class manually.
|
|
9
|
-
class {{classname}} < Service
|
|
9
|
+
class {{classicPrefix}}{{classname}} < Service
|
|
10
10
|
attr_accessor :service, :version
|
|
11
11
|
|
|
12
12
|
def initialize(client, version = DEFAULT_VERSION)
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: adyen-ruby-api-library
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 11.
|
|
4
|
+
version: 11.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Adyen
|
|
@@ -90,11 +90,11 @@ files:
|
|
|
90
90
|
- ".github/workflows/stale.yml"
|
|
91
91
|
- ".gitignore"
|
|
92
92
|
- ".rubocop.yml"
|
|
93
|
+
- AGENTS.md
|
|
93
94
|
- CODE_OF_CONDUCT.md
|
|
94
95
|
- CONTRIBUTING.md
|
|
95
96
|
- Gemfile
|
|
96
97
|
- LICENSE
|
|
97
|
-
- Makefile
|
|
98
98
|
- README.md
|
|
99
99
|
- Rakefile
|
|
100
100
|
- VERSION
|
|
@@ -123,12 +123,18 @@ files:
|
|
|
123
123
|
- lib/adyen/services/balancePlatform/payment_instrument_groups_api.rb
|
|
124
124
|
- lib/adyen/services/balancePlatform/payment_instruments_api.rb
|
|
125
125
|
- lib/adyen/services/balancePlatform/platform_api.rb
|
|
126
|
+
- lib/adyen/services/balancePlatform/sca_association_management_api.rb
|
|
127
|
+
- lib/adyen/services/balancePlatform/sca_device_management_api.rb
|
|
126
128
|
- lib/adyen/services/balancePlatform/transaction_rules_api.rb
|
|
127
129
|
- lib/adyen/services/balancePlatform/transfer_limits_balance_account_level_api.rb
|
|
128
130
|
- lib/adyen/services/balancePlatform/transfer_limits_balance_platform_level_api.rb
|
|
129
131
|
- lib/adyen/services/balancePlatform/transfer_routes_api.rb
|
|
130
132
|
- lib/adyen/services/binLookup.rb
|
|
131
133
|
- lib/adyen/services/binLookup/bin_lookup_api.rb
|
|
134
|
+
- lib/adyen/services/capital.rb
|
|
135
|
+
- lib/adyen/services/capital/grant_accounts_api.rb
|
|
136
|
+
- lib/adyen/services/capital/grant_offers_api.rb
|
|
137
|
+
- lib/adyen/services/capital/grants_api.rb
|
|
132
138
|
- lib/adyen/services/checkout.rb
|
|
133
139
|
- lib/adyen/services/checkout/donations_api.rb
|
|
134
140
|
- lib/adyen/services/checkout/modifications_api.rb
|
|
@@ -214,6 +220,7 @@ files:
|
|
|
214
220
|
- spec/balance_control_spec.rb
|
|
215
221
|
- spec/balance_platform_spec.rb
|
|
216
222
|
- spec/bin_lookup_spec.rb
|
|
223
|
+
- spec/capital_spec.rb
|
|
217
224
|
- spec/checkout-oauth_spec.rb
|
|
218
225
|
- spec/checkout_spec.rb
|
|
219
226
|
- spec/client_spec.rb
|
|
@@ -269,8 +276,8 @@ files:
|
|
|
269
276
|
- spec/mocks/requests/Checkout/refund.json
|
|
270
277
|
- spec/mocks/requests/Checkout/sessions.json
|
|
271
278
|
- spec/mocks/requests/Checkout/verify.json
|
|
272
|
-
- spec/mocks/requests/
|
|
273
|
-
- spec/mocks/requests/
|
|
279
|
+
- spec/mocks/requests/DataProtection/request_subject_erasure.json
|
|
280
|
+
- spec/mocks/requests/Disputes/retrieve_applicable_defense_reasons.json
|
|
274
281
|
- spec/mocks/requests/Fund/account_holder_balance.json
|
|
275
282
|
- spec/mocks/requests/Fund/account_holder_transaction_list.json
|
|
276
283
|
- spec/mocks/requests/Fund/payout_account_holder.json
|
|
@@ -349,6 +356,15 @@ files:
|
|
|
349
356
|
- spec/mocks/responses/BalancePlatform/update_account_holder.json
|
|
350
357
|
- spec/mocks/responses/BinLookup/get_3ds_availability.json
|
|
351
358
|
- spec/mocks/responses/BinLookup/get_cost_estimate.json
|
|
359
|
+
- spec/mocks/responses/Capital/get-grant-account-success.json
|
|
360
|
+
- spec/mocks/responses/Capital/get-grant-disbursement-success.json
|
|
361
|
+
- spec/mocks/responses/Capital/get-grant-disbursements-success.json
|
|
362
|
+
- spec/mocks/responses/Capital/get-grant-offer-success.json
|
|
363
|
+
- spec/mocks/responses/Capital/get-grant-success.json
|
|
364
|
+
- spec/mocks/responses/Capital/grant-offers-success.json
|
|
365
|
+
- spec/mocks/responses/Capital/grants-success.json
|
|
366
|
+
- spec/mocks/responses/Capital/request-grant.json
|
|
367
|
+
- spec/mocks/responses/Capital/update-grant-disbursement-success.json
|
|
352
368
|
- spec/mocks/responses/Checkout/amount_updates.json
|
|
353
369
|
- spec/mocks/responses/Checkout/apple_pay_sessions.json
|
|
354
370
|
- spec/mocks/responses/Checkout/capture.json
|
|
@@ -371,8 +387,8 @@ files:
|
|
|
371
387
|
- spec/mocks/responses/Checkout/stored_payment_methods.json
|
|
372
388
|
- spec/mocks/responses/Checkout/update-payment-link.json
|
|
373
389
|
- spec/mocks/responses/Checkout/verify.json
|
|
374
|
-
- spec/mocks/responses/
|
|
375
|
-
- spec/mocks/responses/
|
|
390
|
+
- spec/mocks/responses/DataProtection/request_subject_erasure.json
|
|
391
|
+
- spec/mocks/responses/Disputes/retrieve_applicable_defense_reasons.json
|
|
376
392
|
- spec/mocks/responses/Fund/account_holder_balance.json
|
|
377
393
|
- spec/mocks/responses/Fund/account_holder_transaction_list.json
|
|
378
394
|
- spec/mocks/responses/Fund/payout_account_holder.json
|
|
@@ -382,6 +398,7 @@ files:
|
|
|
382
398
|
- spec/mocks/responses/Fund/transfer_funds.json
|
|
383
399
|
- spec/mocks/responses/Hop/get_onboarding_url.json
|
|
384
400
|
- spec/mocks/responses/LegalEntityManagement/create_business_line.json
|
|
401
|
+
- spec/mocks/responses/LegalEntityManagement/get_legal_entity.json
|
|
385
402
|
- spec/mocks/responses/Management/create_store.json
|
|
386
403
|
- spec/mocks/responses/Management/get_companies.json
|
|
387
404
|
- spec/mocks/responses/Notification/create_notification_configuration.json
|
data/Makefile
DELETED
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
generator:=ruby
|
|
2
|
-
openapi-generator-version:=6.4.0
|
|
3
|
-
openapi-generator-url:=https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/$(openapi-generator-version)/openapi-generator-cli-$(openapi-generator-version).jar
|
|
4
|
-
openapi-generator-jar:=build/openapi-generator-cli.jar
|
|
5
|
-
openapi-generator-cli:=java -jar build/openapi-generator-cli.jar
|
|
6
|
-
output:=build/out
|
|
7
|
-
|
|
8
|
-
services:=balancePlatform checkout legalEntityManagement management payout transfers
|
|
9
|
-
singleFileServices:=balanceControlService binLookup dataProtection recurring storedValue payment posTerminalManagement disputes
|
|
10
|
-
|
|
11
|
-
binLookup: spec=BinLookupService-v54
|
|
12
|
-
checkout: spec=CheckoutService-v71
|
|
13
|
-
dataProtection: spec=DataProtectionService-v1
|
|
14
|
-
storedValue: spec=StoredValueService-v46
|
|
15
|
-
posTerminalManagement: spec=TfmAPIService-v1
|
|
16
|
-
payment: spec=PaymentService-v68
|
|
17
|
-
recurring: spec=RecurringService-v68
|
|
18
|
-
payout: spec=PayoutService-v68
|
|
19
|
-
management: spec=ManagementService-v3
|
|
20
|
-
legalEntityManagement: spec=LegalEntityService-v3
|
|
21
|
-
balancePlatform: spec=BalancePlatformService-v2
|
|
22
|
-
balanceControlService: spec=BalanceControlService-v1
|
|
23
|
-
transfers: spec=TransferService-v4
|
|
24
|
-
disputes: spec=DisputeService-v30
|
|
25
|
-
|
|
26
|
-
allServices: $(services) $(singleFileServices)
|
|
27
|
-
|
|
28
|
-
$(services): build/spec $(openapi-generator-jar)
|
|
29
|
-
wget $(openapi-generator-url) -O build/openapi-generator-cli.jar
|
|
30
|
-
rm -rf $(output)
|
|
31
|
-
$(openapi-generator-cli) generate \
|
|
32
|
-
-i build/spec/json/$(spec).json \
|
|
33
|
-
-g $(generator) \
|
|
34
|
-
-c ./templates/config.yaml \
|
|
35
|
-
-o $(output) \
|
|
36
|
-
--global-property apis,apiTests=false,apiDocs=false,supportingFiles=api-single.rb\
|
|
37
|
-
--additional-properties serviceName=$@\
|
|
38
|
-
--skip-validate-spec
|
|
39
|
-
rm -f $(output)/lib/openapi_client/api/*-small.rb
|
|
40
|
-
mkdir -p lib/adyen/services/$@
|
|
41
|
-
mv $(output)/lib/openapi_client/api/*.rb lib/adyen/services/$@
|
|
42
|
-
mv $(output)/api/api-single.rb lib/adyen/services/$@.rb
|
|
43
|
-
rm -rf $(output)
|
|
44
|
-
|
|
45
|
-
$(singleFileServices): build/spec
|
|
46
|
-
wget $(openapi-generator-url) -O build/openapi-generator-cli.jar
|
|
47
|
-
jq -e 'del(.paths[][].tags)' build/spec/json/$(spec).json > build/spec/json/$(spec).tmp
|
|
48
|
-
mv build/spec/json/$(spec).tmp build/spec/json/$(spec).json
|
|
49
|
-
rm -rf $(output)
|
|
50
|
-
$(openapi-generator-cli) generate \
|
|
51
|
-
-i build/spec/json/$(spec).json \
|
|
52
|
-
-g $(generator) \
|
|
53
|
-
-c ./templates/config.yaml \
|
|
54
|
-
-o $(output) \
|
|
55
|
-
--global-property apis,apiTests=false,apiDocs=false\
|
|
56
|
-
--additional-properties serviceName=$@\
|
|
57
|
-
--skip-validate-spec
|
|
58
|
-
mv $(output)/lib/openapi_client/api/*-small.rb lib/adyen/services/$@.rb
|
|
59
|
-
rm -rf $(output)
|
|
60
|
-
|
|
61
|
-
templates: $(openapi-generator-jar)
|
|
62
|
-
$(openapi-generator-cli) author template -g $(generator) -o build/templates
|
|
63
|
-
|
|
64
|
-
# Download the generator
|
|
65
|
-
$(openapi-generator-jar):
|
|
66
|
-
wget --quiet -o /dev/null $(openapi-generator-url) -O $(openapi-generator-jar)
|
|
67
|
-
|
|
68
|
-
build/spec:
|
|
69
|
-
git clone https://github.com/Adyen/adyen-openapi.git build/spec
|
|
70
|
-
perl -i -pe's/"openapi" : "3.[0-9].[0-9]"/"openapi" : "3.0.0"/' build/spec/json/*.json
|
|
71
|
-
|
|
72
|
-
# Releases
|
|
73
|
-
|
|
74
|
-
version:
|
|
75
|
-
perl -lne 'print "currentVersion=$$1" if /(\d+\.\d+\.\d+)/' < lib/adyen/version.rb >> "$$GITHUB_OUTPUT"
|
|
76
|
-
|
|
77
|
-
version_files:=lib/adyen/version.rb
|
|
78
|
-
bump:
|
|
79
|
-
perl -i -pe 's/$$ENV{"CURRENT_VERSION"}/$$ENV{"NEXT_VERSION"}/' $(version_files)
|
/data/spec/mocks/requests/{DataProtectionService → DataProtection}/request_subject_erasure.json
RENAMED
|
File without changes
|
/data/spec/mocks/requests/{DisputesService → Disputes}/retrieve_applicable_defense_reasons.json
RENAMED
|
File without changes
|
/data/spec/mocks/responses/{DataProtectionService → DataProtection}/request_subject_erasure.json
RENAMED
|
File without changes
|
/data/spec/mocks/responses/{DisputesService → Disputes}/retrieve_applicable_defense_reasons.json
RENAMED
|
File without changes
|