Skip to content

Commit c406bc2

Browse files
[checkout] Automated update from Adyen/adyen-openapi@3550ecd
1 parent 60ccdbd commit c406bc2

8 files changed

Lines changed: 36 additions & 84 deletions

File tree

lib/adyen/services/checkout/donations_api.rb

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,15 @@ def initialize(client, version = DEFAULT_VERSION)
1414

1515
# Get a list of donation campaigns.
1616
def donation_campaigns(request, headers: {})
17-
endpoint = '/donationCampaigns'.gsub(/{.+?}/, '%s')
18-
endpoint = endpoint.gsub(%r{^/}, '')
19-
endpoint = format(endpoint)
17+
endpoint = build_endpoint('/donationCampaigns')
2018

2119
action = { method: 'post', url: endpoint }
2220
@client.call_adyen_api(@service, action, request, headers, @version)
2321
end
2422

2523
# Make a donation
2624
def donations(request, headers: {})
27-
endpoint = '/donations'.gsub(/{.+?}/, '%s')
28-
endpoint = endpoint.gsub(%r{^/}, '')
29-
endpoint = format(endpoint)
25+
endpoint = build_endpoint('/donations')
3026

3127
action = { method: 'post', url: endpoint }
3228
@client.call_adyen_api(@service, action, request, headers, @version)

lib/adyen/services/checkout/modifications_api.rb

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -14,59 +14,47 @@ def initialize(client, version = DEFAULT_VERSION)
1414

1515
# Cancel an authorised payment
1616
def cancel_authorised_payment(request, headers: {})
17-
endpoint = '/cancels'.gsub(/{.+?}/, '%s')
18-
endpoint = endpoint.gsub(%r{^/}, '')
19-
endpoint = format(endpoint)
17+
endpoint = build_endpoint('/cancels')
2018

2119
action = { method: 'post', url: endpoint }
2220
@client.call_adyen_api(@service, action, request, headers, @version)
2321
end
2422

2523
# Cancel an authorised payment
2624
def cancel_authorised_payment_by_psp_reference(request, payment_psp_reference, headers: {})
27-
endpoint = '/payments/{paymentPspReference}/cancels'.gsub(/{.+?}/, '%s')
28-
endpoint = endpoint.gsub(%r{^/}, '')
29-
endpoint = format(endpoint, payment_psp_reference)
25+
endpoint = build_endpoint('/payments/{paymentPspReference}/cancels', payment_psp_reference)
3026

3127
action = { method: 'post', url: endpoint }
3228
@client.call_adyen_api(@service, action, request, headers, @version)
3329
end
3430

3531
# Capture an authorised payment
3632
def capture_authorised_payment(request, payment_psp_reference, headers: {})
37-
endpoint = '/payments/{paymentPspReference}/captures'.gsub(/{.+?}/, '%s')
38-
endpoint = endpoint.gsub(%r{^/}, '')
39-
endpoint = format(endpoint, payment_psp_reference)
33+
endpoint = build_endpoint('/payments/{paymentPspReference}/captures', payment_psp_reference)
4034

4135
action = { method: 'post', url: endpoint }
4236
@client.call_adyen_api(@service, action, request, headers, @version)
4337
end
4438

4539
# Refund a captured payment
4640
def refund_captured_payment(request, payment_psp_reference, headers: {})
47-
endpoint = '/payments/{paymentPspReference}/refunds'.gsub(/{.+?}/, '%s')
48-
endpoint = endpoint.gsub(%r{^/}, '')
49-
endpoint = format(endpoint, payment_psp_reference)
41+
endpoint = build_endpoint('/payments/{paymentPspReference}/refunds', payment_psp_reference)
5042

5143
action = { method: 'post', url: endpoint }
5244
@client.call_adyen_api(@service, action, request, headers, @version)
5345
end
5446

5547
# Refund or cancel a payment
5648
def refund_or_cancel_payment(request, payment_psp_reference, headers: {})
57-
endpoint = '/payments/{paymentPspReference}/reversals'.gsub(/{.+?}/, '%s')
58-
endpoint = endpoint.gsub(%r{^/}, '')
59-
endpoint = format(endpoint, payment_psp_reference)
49+
endpoint = build_endpoint('/payments/{paymentPspReference}/reversals', payment_psp_reference)
6050

6151
action = { method: 'post', url: endpoint }
6252
@client.call_adyen_api(@service, action, request, headers, @version)
6353
end
6454

6555
# Update an authorised amount
6656
def update_authorised_amount(request, payment_psp_reference, headers: {})
67-
endpoint = '/payments/{paymentPspReference}/amountUpdates'.gsub(/{.+?}/, '%s')
68-
endpoint = endpoint.gsub(%r{^/}, '')
69-
endpoint = format(endpoint, payment_psp_reference)
57+
endpoint = build_endpoint('/payments/{paymentPspReference}/amountUpdates', payment_psp_reference)
7058

7159
action = { method: 'post', url: endpoint }
7260
@client.call_adyen_api(@service, action, request, headers, @version)

lib/adyen/services/checkout/orders_api.rb

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,29 +14,23 @@ def initialize(client, version = DEFAULT_VERSION)
1414

1515
# Cancel an order
1616
def cancel_order(request, headers: {})
17-
endpoint = '/orders/cancel'.gsub(/{.+?}/, '%s')
18-
endpoint = endpoint.gsub(%r{^/}, '')
19-
endpoint = format(endpoint)
17+
endpoint = build_endpoint('/orders/cancel')
2018

2119
action = { method: 'post', url: endpoint }
2220
@client.call_adyen_api(@service, action, request, headers, @version)
2321
end
2422

2523
# Get the balance of a gift card
2624
def get_balance_of_gift_card(request, headers: {})
27-
endpoint = '/paymentMethods/balance'.gsub(/{.+?}/, '%s')
28-
endpoint = endpoint.gsub(%r{^/}, '')
29-
endpoint = format(endpoint)
25+
endpoint = build_endpoint('/paymentMethods/balance')
3026

3127
action = { method: 'post', url: endpoint }
3228
@client.call_adyen_api(@service, action, request, headers, @version)
3329
end
3430

3531
# Create an order
3632
def orders(request, headers: {})
37-
endpoint = '/orders'.gsub(/{.+?}/, '%s')
38-
endpoint = endpoint.gsub(%r{^/}, '')
39-
endpoint = format(endpoint)
33+
endpoint = build_endpoint('/orders')
4034

4135
action = { method: 'post', url: endpoint }
4236
@client.call_adyen_api(@service, action, request, headers, @version)

lib/adyen/services/checkout/payment_links_api.rb

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,29 +14,23 @@ def initialize(client, version = DEFAULT_VERSION)
1414

1515
# Get a payment link
1616
def get_payment_link(link_id, headers: {})
17-
endpoint = '/paymentLinks/{linkId}'.gsub(/{.+?}/, '%s')
18-
endpoint = endpoint.gsub(%r{^/}, '')
19-
endpoint = format(endpoint, link_id)
17+
endpoint = build_endpoint('/paymentLinks/{linkId}', link_id)
2018

2119
action = { method: 'get', url: endpoint }
2220
@client.call_adyen_api(@service, action, {}, headers, @version)
2321
end
2422

2523
# Create a payment link
2624
def payment_links(request, headers: {})
27-
endpoint = '/paymentLinks'.gsub(/{.+?}/, '%s')
28-
endpoint = endpoint.gsub(%r{^/}, '')
29-
endpoint = format(endpoint)
25+
endpoint = build_endpoint('/paymentLinks')
3026

3127
action = { method: 'post', url: endpoint }
3228
@client.call_adyen_api(@service, action, request, headers, @version)
3329
end
3430

3531
# Update the status of a payment link
3632
def update_payment_link(request, link_id, headers: {})
37-
endpoint = '/paymentLinks/{linkId}'.gsub(/{.+?}/, '%s')
38-
endpoint = endpoint.gsub(%r{^/}, '')
39-
endpoint = format(endpoint, link_id)
33+
endpoint = build_endpoint('/paymentLinks/{linkId}', link_id)
4034

4135
action = { method: 'patch', url: endpoint }
4236
@client.call_adyen_api(@service, action, request, headers, @version)

lib/adyen/services/checkout/payments_api.rb

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -14,59 +14,47 @@ def initialize(client, version = DEFAULT_VERSION)
1414

1515
# Get the brands and other details of a card
1616
def card_details(request, headers: {})
17-
endpoint = '/cardDetails'.gsub(/{.+?}/, '%s')
18-
endpoint = endpoint.gsub(%r{^/}, '')
19-
endpoint = format(endpoint)
17+
endpoint = build_endpoint('/cardDetails')
2018

2119
action = { method: 'post', url: endpoint }
2220
@client.call_adyen_api(@service, action, request, headers, @version)
2321
end
2422

2523
# Get the result of a payment session
2624
def get_result_of_payment_session(session_id, headers: {}, query_params: {})
27-
endpoint = '/sessions/{sessionId}'.gsub(/{.+?}/, '%s')
28-
endpoint = endpoint.gsub(%r{^/}, '')
29-
endpoint = format(endpoint, session_id)
25+
endpoint = build_endpoint('/sessions/{sessionId}', session_id)
3026
endpoint += create_query_string(query_params)
3127
action = { method: 'get', url: endpoint }
3228
@client.call_adyen_api(@service, action, {}, headers, @version)
3329
end
3430

3531
# Get a list of available payment methods
3632
def payment_methods(request, headers: {})
37-
endpoint = '/paymentMethods'.gsub(/{.+?}/, '%s')
38-
endpoint = endpoint.gsub(%r{^/}, '')
39-
endpoint = format(endpoint)
33+
endpoint = build_endpoint('/paymentMethods')
4034

4135
action = { method: 'post', url: endpoint }
4236
@client.call_adyen_api(@service, action, request, headers, @version)
4337
end
4438

4539
# Start a transaction
4640
def payments(request, headers: {})
47-
endpoint = '/payments'.gsub(/{.+?}/, '%s')
48-
endpoint = endpoint.gsub(%r{^/}, '')
49-
endpoint = format(endpoint)
41+
endpoint = build_endpoint('/payments')
5042

5143
action = { method: 'post', url: endpoint }
5244
@client.call_adyen_api(@service, action, request, headers, @version)
5345
end
5446

5547
# Submit details for a payment
5648
def payments_details(request, headers: {})
57-
endpoint = '/payments/details'.gsub(/{.+?}/, '%s')
58-
endpoint = endpoint.gsub(%r{^/}, '')
59-
endpoint = format(endpoint)
49+
endpoint = build_endpoint('/payments/details')
6050

6151
action = { method: 'post', url: endpoint }
6252
@client.call_adyen_api(@service, action, request, headers, @version)
6353
end
6454

6555
# Create a payment session
6656
def sessions(request, headers: {})
67-
endpoint = '/sessions'.gsub(/{.+?}/, '%s')
68-
endpoint = endpoint.gsub(%r{^/}, '')
69-
endpoint = format(endpoint)
57+
endpoint = build_endpoint('/sessions')
7058

7159
action = { method: 'post', url: endpoint }
7260
@client.call_adyen_api(@service, action, request, headers, @version)

lib/adyen/services/checkout/recurring_api.rb

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,39 +14,31 @@ def initialize(client, version = DEFAULT_VERSION)
1414

1515
# Delete a token for stored payment details
1616
def delete_token_for_stored_payment_details(stored_payment_method_id, headers: {}, query_params: {})
17-
endpoint = '/storedPaymentMethods/{storedPaymentMethodId}'.gsub(/{.+?}/, '%s')
18-
endpoint = endpoint.gsub(%r{^/}, '')
19-
endpoint = format(endpoint, stored_payment_method_id)
17+
endpoint = build_endpoint('/storedPaymentMethods/{storedPaymentMethodId}', stored_payment_method_id)
2018
endpoint += create_query_string(query_params)
2119
action = { method: 'delete', url: endpoint }
2220
@client.call_adyen_api(@service, action, {}, headers, @version)
2321
end
2422

2523
# Forward stored payment details
2624
def forward(request, headers: {})
27-
endpoint = '/forward'.gsub(/{.+?}/, '%s')
28-
endpoint = endpoint.gsub(%r{^/}, '')
29-
endpoint = format(endpoint)
25+
endpoint = build_endpoint('/forward')
3026

3127
action = { method: 'post', url: endpoint }
3228
@client.call_adyen_api(@service, action, request, headers, @version)
3329
end
3430

3531
# Get tokens for stored payment details
3632
def get_tokens_for_stored_payment_details(headers: {}, query_params: {})
37-
endpoint = '/storedPaymentMethods'.gsub(/{.+?}/, '%s')
38-
endpoint = endpoint.gsub(%r{^/}, '')
39-
endpoint = format(endpoint)
33+
endpoint = build_endpoint('/storedPaymentMethods')
4034
endpoint += create_query_string(query_params)
4135
action = { method: 'get', url: endpoint }
4236
@client.call_adyen_api(@service, action, {}, headers, @version)
4337
end
4438

4539
# Create a token to store payment details
4640
def stored_payment_methods(request, headers: {})
47-
endpoint = '/storedPaymentMethods'.gsub(/{.+?}/, '%s')
48-
endpoint = endpoint.gsub(%r{^/}, '')
49-
endpoint = format(endpoint)
41+
endpoint = build_endpoint('/storedPaymentMethods')
5042

5143
action = { method: 'post', url: endpoint }
5244
@client.call_adyen_api(@service, action, request, headers, @version)

lib/adyen/services/checkout/utility_api.rb

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@ def initialize(client, version = DEFAULT_VERSION)
1414

1515
# Get an Apple Pay session
1616
def get_apple_pay_session(request, headers: {})
17-
endpoint = '/applePay/sessions'.gsub(/{.+?}/, '%s')
18-
endpoint = endpoint.gsub(%r{^/}, '')
19-
endpoint = format(endpoint)
17+
endpoint = build_endpoint('/applePay/sessions')
2018

2119
action = { method: 'post', url: endpoint }
2220
@client.call_adyen_api(@service, action, request, headers, @version)
@@ -26,29 +24,23 @@ def get_apple_pay_session(request, headers: {})
2624
#
2725
# Deprecated since Adyen Checkout API v67
2826
def origin_keys(request, headers: {})
29-
endpoint = '/originKeys'.gsub(/{.+?}/, '%s')
30-
endpoint = endpoint.gsub(%r{^/}, '')
31-
endpoint = format(endpoint)
27+
endpoint = build_endpoint('/originKeys')
3228

3329
action = { method: 'post', url: endpoint }
3430
@client.call_adyen_api(@service, action, request, headers, @version)
3531
end
3632

3733
# Updates the order for PayPal Express Checkout
3834
def updates_order_for_paypal_express_checkout(request, headers: {})
39-
endpoint = '/paypal/updateOrder'.gsub(/{.+?}/, '%s')
40-
endpoint = endpoint.gsub(%r{^/}, '')
41-
endpoint = format(endpoint)
35+
endpoint = build_endpoint('/paypal/updateOrder')
4236

4337
action = { method: 'post', url: endpoint }
4438
@client.call_adyen_api(@service, action, request, headers, @version)
4539
end
4640

4741
# Validates shopper Id
4842
def validate_shopper_id(request, headers: {})
49-
endpoint = '/validateShopperId'.gsub(/{.+?}/, '%s')
50-
endpoint = endpoint.gsub(%r{^/}, '')
51-
endpoint = format(endpoint)
43+
endpoint = build_endpoint('/validateShopperId')
5244

5345
action = { method: 'post', url: endpoint }
5446
@client.call_adyen_api(@service, action, request, headers, @version)

sdk-generation-log/checkout.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"service": "checkout",
3+
"project": "ruby",
4+
"generatedAt": "2026-04-20T13:39:49Z",
5+
"openapiCommitSha": "3550ecd3f320efaad6bee55ffed5122cb9ba09d5",
6+
"automationCommitSha": "4ad0c0c7e87bc0e5994a9a3350a991d0691350bb",
7+
"libraryCommitSha": "60ccdbdbbb7069d54600a8a8cd19eea245661134"
8+
}

0 commit comments

Comments
 (0)