Sha256: dfdb907c831cf97389aff175b8d43c71e3cd310beb33171d0dc1e718e922759a
Contents?: true
Size: 1.5 KB
Versions: 8
Compression:
Stored size: 1.5 KB
Contents
require_relative '../service' module Adyen class BusinessLinesApi < Service attr_accessor :service, :version def initialize(client, version = DEFAULT_VERSION) super(client, version, 'LegalEntityManagement') end def delete_business_line(id, headers: {}) endpoint = '/businessLines/{id}'.gsub(/{.+?}/, '%s') endpoint = endpoint.gsub(%r{^/}, '') endpoint = format(endpoint, id) action = { method: 'delete', url: endpoint } @client.call_adyen_api(@service, action, {}, headers, @version) end def get_business_line(id, headers: {}) endpoint = '/businessLines/{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 update_business_line(request, id, headers: {}) endpoint = '/businessLines/{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_business_line(request, headers: {}) endpoint = '/businessLines'.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
8 entries across 8 versions & 1 rubygems