32 lines
590 B
Ruby
32 lines
590 B
Ruby
# frozen_string_literal: true
|
|
|
|
module BtcPay
|
|
module Client
|
|
module Api
|
|
class Base
|
|
def initialize(client:, logger:)
|
|
@client = client
|
|
@logger = logger
|
|
end
|
|
|
|
protected
|
|
|
|
def base_path
|
|
raise NotImplementedError.new
|
|
end
|
|
|
|
def path(*args)
|
|
request_path = args.prepend(base_path.presence).compact.join('/')
|
|
request_path[0].eql?('/') ? request_path : '/' + request_path
|
|
end
|
|
|
|
private
|
|
|
|
attr_reader :client, :logger
|
|
end
|
|
end
|
|
end
|
|
end
|
|
|
|
require_relative './users'
|