class Fakturoid::Config

Constants

ENDPOINT

Attributes

account[RW]
api_key[RW]
email[RW]
user_agent[W]

Public Class Methods

new() { |self| ... } click to toggle source
# File lib/fakturoid/config.rb, line 8
def initialize(&_block)
  yield self
end

Public Instance Methods

endpoint() click to toggle source
# File lib/fakturoid/config.rb, line 20
def endpoint
  "#{ENDPOINT}/accounts/#{account}"
end
endpoint_without_account() click to toggle source
# File lib/fakturoid/config.rb, line 24
def endpoint_without_account
  ENDPOINT
end
user_agent() click to toggle source
# File lib/fakturoid/config.rb, line 12
def user_agent
  if @user_agent.nil? || @user_agent.empty?
    "Fakturoid ruby gem (#{email})"
  else
    @user_agent
  end
end