Skip to content

Commit 7952e8d

Browse files
author
Colin Rood
authored
Merge pull request #74 from Adyen/develop
Release 4.3.0
2 parents a7d58c0 + 2bdce44 commit 7952e8d

File tree

9 files changed

+29
-14
lines changed

9 files changed

+29
-14
lines changed

.github/dependabot.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: bundler
4+
directory: "/"
5+
schedule:
6+
interval: daily
7+
time: "04:00"
8+
open-pull-requests-limit: 10

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-ruby-api-library.rb

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,3 @@
1212
require_relative "adyen/services/data_protection"
1313
require_relative "adyen/hash_with_accessors"
1414
require_relative "adyen/utils/hmac_validator"
15-
16-
# add snake case to camel case converter to String
17-
# to convert rubinic method names to Adyen API methods
18-
#
19-
# i.e. snake_case -> snakeCase
20-
# note that the first letter is not capitalized as normal
21-
class String
22-
def to_camel_case
23-
split("_").collect.with_index{ |x, i| i > 0 ? x.capitalize : x }.join
24-
end
25-
end

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)

lib/adyen/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
module Adyen
22
NAME = "adyen-ruby-api-library"
3-
VERSION = "4.2.0".freeze
3+
VERSION = "4.3.0".freeze
44
end
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)