Class: Intacct::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/intacct/config.rb

Overview

Configuration object for Intacct API credentials and settings.

Examples:

Basic configuration

config = Intacct::Config.new
config.sender_id = "my-sender-id"
config.sender_password = "my-sender-password"
config.raise_exceptions = false

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize ⇒ Config

Initialize a new configuration with default logger and exception handling



25
26
27
28
# File 'lib/intacct/config.rb', line 25

def initialize
  @logger = Logger.new($stdout, level: Logger::Severity::ERROR)
  @raise_exceptions = true
end

Instance Attribute Details

#logger ⇒ Logger

Logger instance for debugging (default: ERROR level stdout logger)



19
20
21
# File 'lib/intacct/config.rb', line 19

def logger
  @logger
end

#raise_exceptions ⇒ Boolean

Whether to raise exceptions on API errors (default: true)



19
20
21
# File 'lib/intacct/config.rb', line 19

def raise_exceptions
  @raise_exceptions
end

#sender_id ⇒ String

Intacct Web Services sender ID



19
20
21
# File 'lib/intacct/config.rb', line 19

def sender_id
  @sender_id
end

#sender_password ⇒ String

Intacct Web Services sender password



19
20
21
# File 'lib/intacct/config.rb', line 19

def sender_password
  @sender_password
end

#url ⇒ String

Custom API endpoint URL (optional)



19
20
21
# File 'lib/intacct/config.rb', line 19

def url
  @url
end