Skip to content

Factory method for PosMobile service #268

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions lib/adyen/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,10 @@ def terminal_cloud_api
@terminal_cloud_api ||= Adyen::TerminalCloudAPI.new(self)
end

def pos_mobile
@pos_mobile ||= Adyen::PosMobile.new(self)
end

private

def auth_header(auth_type, faraday)
Expand Down
6 changes: 6 additions & 0 deletions spec/client_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -272,4 +272,10 @@
expect(client.service_url('TerminalCloudAPI', 'connectedTerminals', nil))
.to eq('https://terminal-api-test.adyen.com/connectedTerminals')
end

it 'checks the creation of PosMobile sessions url' do
client = Adyen::Client.new(api_key: 'api_key', env: :test)
expect(client.service_url('PosMobile', 'sessions', nil))
.to eq('https://checkout-test.adyen.com/checkout/possdk/sessions')
end
end
Loading