Skip to content

Commit 671519a

Browse files
authored
factory method for PosMobile service (#268)
1 parent 41cd88f commit 671519a

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

lib/adyen/client.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,10 @@ def terminal_cloud_api
287287
@terminal_cloud_api ||= Adyen::TerminalCloudAPI.new(self)
288288
end
289289

290+
def pos_mobile
291+
@pos_mobile ||= Adyen::PosMobile.new(self)
292+
end
293+
290294
private
291295

292296
def auth_header(auth_type, faraday)

spec/client_spec.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,4 +272,10 @@
272272
expect(client.service_url('TerminalCloudAPI', 'connectedTerminals', nil))
273273
.to eq('https://terminal-api-test.adyen.com/connectedTerminals')
274274
end
275+
276+
it 'checks the creation of PosMobile sessions url' do
277+
client = Adyen::Client.new(api_key: 'api_key', env: :test)
278+
expect(client.service_url('PosMobile', 'sessions', nil))
279+
.to eq('https://checkout-test.adyen.com/checkout/possdk/sessions')
280+
end
275281
end

0 commit comments

Comments
 (0)