Configuration - Phiction/etapi GitHub Wiki

Create an initializer

/path/to/application/config/initializers/etapi.rb

Example configuration

ETAPI.configure do |config|
  config.username     = "[email protected]"
  config.password     = "password"
  config.api_method   = :soap
  config.use_s4       = true
  config.log          = false
  config.raise_errors = false
end

Available configuration options (all options can be overridden when creating a new ETAPI session)

  • username
  • password
  • api_method : available options :xml, :soap (defaults to :xml)
  • use_s4 : available options false, true (defaults to false)
  • log : available options false, true (defaults to true)
  • raise_errors : available options false, true (defaults to true)

Back