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

#initializeConfig

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

#loggerLogger

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

Returns:

  • (Logger)

    the current value of logger



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

def logger
  @logger
end

#raise_exceptionsBoolean

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

Returns:

  • (Boolean)

    the current value of raise_exceptions



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

def raise_exceptions
  @raise_exceptions
end

#sender_idString

Intacct Web Services sender ID

Returns:

  • (String)

    the current value of sender_id



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

def sender_id
  @sender_id
end

#sender_passwordString

Intacct Web Services sender password

Returns:

  • (String)

    the current value of sender_password



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

def sender_password
  @sender_password
end

#urlString

Custom API endpoint URL (optional)

Returns:

  • (String)

    the current value of url



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

def url
  @url
end