Skip to content

Commit

Permalink
false[adyen-sdk-automation] automated change (#229)
Browse files Browse the repository at this point in the history
  • Loading branch information
AdyenAutomationBot committed Feb 29, 2024
1 parent f8dd33e commit 3d4f8a5
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 10 deletions.
10 changes: 5 additions & 5 deletions lib/adyen/services/balancePlatform.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
require_relative 'balancePlatform/card_orders_api'
require_relative 'balancePlatform/grant_accounts_api'
require_relative 'balancePlatform/grant_offers_api'
require_relative 'balancePlatform/manage_card_pin_api'
require_relative 'balancePlatform/network_tokens_api'
require_relative 'balancePlatform/pin_functionality_api'
require_relative 'balancePlatform/payment_instrument_groups_api'
require_relative 'balancePlatform/payment_instruments_api'
require_relative 'balancePlatform/platform_api'
Expand Down Expand Up @@ -47,12 +47,12 @@ def grant_offers_api
@grant_offers_api ||= Adyen::GrantOffersApi.new(@client, @version)
end

def network_tokens_api
@network_tokens_api ||= Adyen::NetworkTokensApi.new(@client, @version)
def manage_card_pin_api
@manage_card_pin_api ||= Adyen::ManageCardPINApi.new(@client, @version)
end

def pin_functionality_api
@pin_functionality_api ||= Adyen::PINFunctionalityApi.new(@client, @version)
def network_tokens_api
@network_tokens_api ||= Adyen::NetworkTokensApi.new(@client, @version)
end

def payment_instrument_groups_api
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
require_relative '../service'
module Adyen
class PINFunctionalityApi < Service
class ManageCardPINApi < Service
attr_accessor :service, :version

def initialize(client, version = DEFAULT_VERSION)
super(client, version, 'BalancePlatform')
end

def change_pin(request, headers: {})
def change_card_pin(request, headers: {})
endpoint = '/pins/change'.gsub(/{.+?}/, '%s')
endpoint = endpoint.gsub(%r{^/}, '')
endpoint = format(endpoint)
Expand All @@ -16,16 +16,16 @@ def change_pin(request, headers: {})
@client.call_adyen_api(@service, action, request, headers, @version)
end

def get_rsa_publickey(headers: {}, query_params: {})
endpoint = '/pins/publicKey'.gsub(/{.+?}/, '%s')
def public_key(headers: {}, query_params: {})
endpoint = '/publicKey'.gsub(/{.+?}/, '%s')
endpoint = endpoint.gsub(%r{^/}, '')
endpoint = format(endpoint)
endpoint += create_query_string(query_params)
action = { method: 'get', url: endpoint }
@client.call_adyen_api(@service, action, {}, headers, @version)
end

def reveal_pin(request, headers: {})
def reveal_card_pin(request, headers: {})
endpoint = '/pins/reveal'.gsub(/{.+?}/, '%s')
endpoint = endpoint.gsub(%r{^/}, '')
endpoint = format(endpoint)
Expand Down
9 changes: 9 additions & 0 deletions lib/adyen/services/balancePlatform/payment_instruments_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,15 @@ def list_network_tokens(id, headers: {})
@client.call_adyen_api(@service, action, {}, headers, @version)
end

def reveal_data_of_payment_instrument(request, headers: {})
endpoint = '/paymentInstruments/reveal'.gsub(/{.+?}/, '%s')
endpoint = endpoint.gsub(%r{^/}, '')
endpoint = format(endpoint)

action = { method: 'post', url: endpoint }
@client.call_adyen_api(@service, action, request, headers, @version)
end

def update_payment_instrument(request, id, headers: {})
endpoint = '/paymentInstruments/{id}'.gsub(/{.+?}/, '%s')
endpoint = endpoint.gsub(%r{^/}, '')
Expand Down

0 comments on commit 3d4f8a5

Please sign in to comment.