Skip to content

Commit 9ec3eee

Browse files
committed
added fix for disputeService
1 parent 7f0ecd0 commit 9ec3eee

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

lib/adyen/client.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ def live_url_prefix=(value)
5353

5454
# base URL for API given service and @env
5555
def service_url_base(service)
56+
service = 'DisputesService' if service == 'Disputes'
5657
if @env == :mock
5758
@mock_service_url_base
5859
else

spec/client_spec.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,4 +278,10 @@
278278
expect(client.service_url('PosMobile', 'sessions', nil))
279279
.to eq('https://checkout-test.adyen.com/checkout/possdk/sessions')
280280
end
281+
282+
it 'correctly maps Disputes to DisputesService and generates valid URL' do
283+
client = Adyen::Client.new(env: :test)
284+
expect(client.service_url_base('Disputes'))
285+
.to eq('https://ca-test.adyen.com/ca/services/DisputesService')
286+
end
281287
end

0 commit comments

Comments
 (0)