Sha256: 922507d0cc2b9387755c90855e529580ee0c3e44c1b6e4268b4fd54442aded76
Contents?: true
Size: 1.6 KB
Versions: 6
Compression:
Stored size: 1.6 KB
Contents
require_relative '../service' module Adyen class AccountHoldersApi < Service attr_accessor :service, :version def initialize(client, version = DEFAULT_VERSION) super(client, version, 'BalancePlatform') end def get_account_holder(id, headers: {}) endpoint = '/accountHolders/{id}'.gsub(/{.+?}/, '%s') endpoint = endpoint.gsub(%r{^/}, '') endpoint = format(endpoint, id) action = { method: 'get', url: endpoint } @client.call_adyen_api(@service, action, {}, headers, @version) end def get_all_balance_accounts_of_account_holder(id, headers: {}, query_params: {}) endpoint = '/accountHolders/{id}/balanceAccounts'.gsub(/{.+?}/, '%s') endpoint = endpoint.gsub(%r{^/}, '') endpoint = format(endpoint, id) endpoint += create_query_string(query_params) action = { method: 'get', url: endpoint } @client.call_adyen_api(@service, action, {}, headers, @version) end def update_account_holder(request, id, headers: {}) endpoint = '/accountHolders/{id}'.gsub(/{.+?}/, '%s') endpoint = endpoint.gsub(%r{^/}, '') endpoint = format(endpoint, id) action = { method: 'patch', url: endpoint } @client.call_adyen_api(@service, action, request, headers, @version) end def create_account_holder(request, headers: {}) endpoint = '/accountHolders'.gsub(/{.+?}/, '%s') endpoint = endpoint.gsub(%r{^/}, '') endpoint = format(endpoint) action = { method: 'post', url: endpoint } @client.call_adyen_api(@service, action, request, headers, @version) end end end
Version data entries
6 entries across 6 versions & 1 rubygems