From 731a8271ea0bad5b94fbed38609ab2bb0a2f40d9 Mon Sep 17 00:00:00 2001 From: Adyen Automation Date: Mon, 5 Aug 2024 08:23:14 +0000 Subject: [PATCH] false[adyen-sdk-automation] automated change --- lib/adyen/services/checkout/donations_api.rb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/adyen/services/checkout/donations_api.rb b/lib/adyen/services/checkout/donations_api.rb index c0d0cfc..8c88847 100644 --- a/lib/adyen/services/checkout/donations_api.rb +++ b/lib/adyen/services/checkout/donations_api.rb @@ -7,6 +7,15 @@ def initialize(client, version = DEFAULT_VERSION) super(client, version, 'Checkout') end + def donation_campaigns(request, headers: {}) + endpoint = '/donationCampaigns'.gsub(/{.+?}/, '%s') + endpoint = endpoint.gsub(%r{^/}, '') + endpoint = format(endpoint) + + action = { method: 'post', url: endpoint } + @client.call_adyen_api(@service, action, request, headers, @version) + end + def donations(request, headers: {}) endpoint = '/donations'.gsub(/{.+?}/, '%s') endpoint = endpoint.gsub(%r{^/}, '')