Skip to content
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
5 changes: 5 additions & 0 deletions lib/adyen/services/balancePlatform.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
require_relative 'balancePlatform/account_holders_api'
require_relative 'balancePlatform/authorized_card_users_api'
require_relative 'balancePlatform/balance_accounts_api'
require_relative 'balancePlatform/balances_api'
require_relative 'balancePlatform/bank_account_validation_api'
Expand Down Expand Up @@ -34,6 +35,10 @@ def account_holders_api
@account_holders_api ||= Adyen::AccountHoldersApi.new(@client, @version)
end

def authorized_card_users_api
@authorized_card_users_api ||= Adyen::AuthorizedCardUsersApi.new(@client, @version)
end

def balance_accounts_api
@balance_accounts_api ||= Adyen::BalanceAccountsApi.new(@client, @version)
end
Expand Down
56 changes: 56 additions & 0 deletions lib/adyen/services/balancePlatform/authorized_card_users_api.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
require_relative '../service'
module Adyen

# NOTE: This class is auto generated by OpenAPI Generator
# Ref: https://openapi-generator.tech
#
# Do not edit the class manually.
class AuthorizedCardUsersApi < Service
attr_accessor :service, :version

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

# Create authorized users for a card.
def create_authorised_card_users(request, payment_instrument_id, authorised_card_users, headers: {})
endpoint = '/paymentInstruments/{paymentInstrumentId}/authorisedCardUsers'.gsub(/{.+?}/, '%s')
endpoint = endpoint.gsub(%r{^/}, '')
endpoint = format(endpoint, payment_instrument_id)

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

# Delete the authorized users for a card.
def delete_authorised_card_users(payment_instrument_id, headers: {})
endpoint = '/paymentInstruments/{paymentInstrumentId}/authorisedCardUsers'.gsub(/{.+?}/, '%s')
endpoint = endpoint.gsub(%r{^/}, '')
endpoint = format(endpoint, payment_instrument_id)

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

# Get authorized users for a card.
def get_all_authorised_card_users(payment_instrument_id, headers: {})
endpoint = '/paymentInstruments/{paymentInstrumentId}/authorisedCardUsers'.gsub(/{.+?}/, '%s')
endpoint = endpoint.gsub(%r{^/}, '')
endpoint = format(endpoint, payment_instrument_id)

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

# Update the authorized users for a card.
def update_authorised_card_users(request, payment_instrument_id, authorised_card_users, headers: {})
endpoint = '/paymentInstruments/{paymentInstrumentId}/authorisedCardUsers'.gsub(/{.+?}/, '%s')
endpoint = endpoint.gsub(%r{^/}, '')
endpoint = format(endpoint, payment_instrument_id)

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

end
end
20 changes: 20 additions & 0 deletions lib/adyen/services/balancePlatform/payment_instruments_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@ def initialize(client, version = DEFAULT_VERSION)
super(client, version, 'BalancePlatform')
end

# Create network token activation data
def create_network_token_activation_data(request, id, headers: {})
endpoint = '/paymentInstruments/{id}/networkTokenActivationData'.gsub(/{.+?}/, '%s')
endpoint = endpoint.gsub(%r{^/}, '')
endpoint = format(endpoint, id)

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

# Create a payment instrument
def create_payment_instrument(request, headers: {})
endpoint = '/paymentInstruments'.gsub(/{.+?}/, '%s')
Expand All @@ -32,6 +42,16 @@ def get_all_transaction_rules_for_payment_instrument(id, headers: {})
@client.call_adyen_api(@service, action, {}, headers, @version)
end

# Get network token activation data
def get_network_token_activation_data(id, headers: {})
endpoint = '/paymentInstruments/{id}/networkTokenActivationData'.gsub(/{.+?}/, '%s')
endpoint = endpoint.gsub(%r{^/}, '')
endpoint = format(endpoint, id)

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

# Get the PAN of a payment instrument
def get_pan_of_payment_instrument(id, headers: {})
endpoint = '/paymentInstruments/{id}/reveal'.gsub(/{.+?}/, '%s')
Expand Down