Skip to content

Commit 10c7267

Browse files
author
Colin Rood
authored
Merge pull request #72 from Adyen/add-donate
add /donate endpoint
2 parents 35041a5 + 73b4fae commit 10c7267

File tree

6 files changed

+20
-2
lines changed

6 files changed

+20
-2
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ adyen.checkout.version = 50
9494
- refund
9595
- cancel_or_refund
9696
- adjust_authorisation
97+
- donate
9798

9899
**payouts:**
99100
- confirm_third_party

lib/adyen/services/payments.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ def initialize(client, version = DEFAULT_VERSION)
1515
:cancel,
1616
:refund,
1717
:cancel_or_refund,
18-
:adjust_authorisation
18+
:adjust_authorisation,
19+
:donate
1920
]
2021

2122
super(client, version, service, method_names)
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"originalReference": "882594077439995E",
3+
"modificationAmount": {
4+
"value": 100,
5+
"currency": "USD"
6+
},
7+
"reference": "Donation",
8+
"donationAccount": "TestMerchantDonations",
9+
"merchantAccount": "TestMerchant"
10+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"pspReference": "882594132885209C",
3+
"response": "[donation-received]"
4+
}

spec/payments_spec.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
["cancel", "response", "[cancel-received]"],
1515
["cancel_or_refund", "response", "[cancelOrRefund-received]"],
1616
["capture", "response", "[capture-received]"],
17-
["refund", "response", "[refund-received]"]
17+
["refund", "response", "[refund-received]"],
18+
["donate", "response", "[donation-received]"]
1819
]
1920

2021
generate_tests(client, "Payment", test_sets, client.payments)

spec/service_spec.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
expect(described_class.action_for_method_name(:delete_bank_accounts)).to eq 'deleteBankAccounts'
2020
expect(described_class.action_for_method_name(:delete_shareholders)).to eq 'deleteShareholders'
2121
expect(described_class.action_for_method_name(:disable)).to eq 'disable'
22+
expect(described_class.action_for_method_name(:donate)).to eq 'donate'
2223
expect(described_class.action_for_method_name(:get_account_holder)).to eq 'getAccountHolder'
2324
expect(described_class.action_for_method_name(:get_tier_configuration)).to eq 'getTierConfiguration'
2425
expect(described_class.action_for_method_name(:get_uploaded_documents)).to eq 'getUploadedDocuments'

0 commit comments

Comments
 (0)