-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
false[adyen-sdk-automation] automated change
- Loading branch information
1 parent
138b818
commit fe9109c
Showing
2 changed files
with
75 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
require_relative 'paymentsApp/payments_app_api' | ||
|
||
module Adyen | ||
class PaymentsApp | ||
attr_accessor :service, :version | ||
|
||
DEFAULT_VERSION = 1 | ||
def initialize(client, version = DEFAULT_VERSION) | ||
@service = 'PaymentsApp' | ||
@client = client | ||
@version = version | ||
end | ||
|
||
def payments_app_api | ||
@payments_app_api ||= Adyen::PaymentsAppApi.new(@client, @version) | ||
end | ||
|
||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
require_relative '../service' | ||
module Adyen | ||
class PaymentsAppApi < Service | ||
attr_accessor :service, :version | ||
|
||
def initialize(client, version = DEFAULT_VERSION) | ||
super(client, version, 'PaymentsApp') | ||
end | ||
|
||
def merchants_merchant_id_generate_payments_app_boarding_token_post(request, merchant_id, boarding_token_request, headers: {}) | ||
endpoint = '/merchants/{merchantId}/generatePaymentsAppBoardingToken'.gsub(/{.+?}/, '%s') | ||
endpoint = endpoint.gsub(%r{^/}, '') | ||
endpoint = format(endpoint, merchant_id) | ||
|
||
action = { method: 'post', url: endpoint } | ||
@client.call_adyen_api(@service, action, request, headers, @version) | ||
end | ||
|
||
def merchants_merchant_id_payments_apps_get(merchant_id, headers: {}, query_params: {}) | ||
endpoint = '/merchants/{merchantId}/paymentsApps'.gsub(/{.+?}/, '%s') | ||
endpoint = endpoint.gsub(%r{^/}, '') | ||
endpoint = format(endpoint, merchant_id) | ||
endpoint += create_query_string(query_params) | ||
action = { method: 'get', url: endpoint } | ||
@client.call_adyen_api(@service, action, {}, headers, @version) | ||
end | ||
|
||
def merchants_merchant_id_payments_apps_installation_id_revoke_post(merchant_id, installation_id, headers: {}) | ||
endpoint = '/merchants/{merchantId}/paymentsApps/{installationId}/revoke'.gsub(/{.+?}/, '%s') | ||
endpoint = endpoint.gsub(%r{^/}, '') | ||
endpoint = format(endpoint, merchant_id, installation_id) | ||
|
||
action = { method: 'post', url: endpoint } | ||
@client.call_adyen_api(@service, action, {}, headers, @version) | ||
end | ||
|
||
def merchants_merchant_id_stores_store_id_generate_payments_app_boarding_token_post(request, merchant_id, store_id, boarding_token_request, headers: {}) | ||
endpoint = '/merchants/{merchantId}/stores/{storeId}/generatePaymentsAppBoardingToken'.gsub(/{.+?}/, '%s') | ||
endpoint = endpoint.gsub(%r{^/}, '') | ||
endpoint = format(endpoint, merchant_id, store_id) | ||
|
||
action = { method: 'post', url: endpoint } | ||
@client.call_adyen_api(@service, action, request, headers, @version) | ||
end | ||
|
||
def merchants_merchant_id_stores_store_id_payments_apps_get(merchant_id, store_id, headers: {}, query_params: {}) | ||
endpoint = '/merchants/{merchantId}/stores/{storeId}/paymentsApps'.gsub(/{.+?}/, '%s') | ||
endpoint = endpoint.gsub(%r{^/}, '') | ||
endpoint = format(endpoint, merchant_id, store_id) | ||
endpoint += create_query_string(query_params) | ||
action = { method: 'get', url: endpoint } | ||
@client.call_adyen_api(@service, action, {}, headers, @version) | ||
end | ||
|
||
end | ||
end |