Class: VertexClient::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/vertex_client/configuration.rb

Constant Summary collapse

CIRCUIT_NAME =
'vertex_client'.freeze
CIRCUIT_CONFIG =
{
  sleep_window:     300,
  volume_threshold: 10,
  error_threshold:  50,
  time_window:      60,
  logger: Logger.new(STDOUT),
  exceptions: [
    Savon::Error
  ]
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



19
20
21
22
# File 'lib/vertex_client/configuration.rb', line 19

def initialize
  @trusted_id = ENV['VERTEX_TRUSTED_ID']
  @soap_api   = ENV['VERTEX_SOAP_API']
end

Instance Attribute Details

#circuit_configObject

Returns the value of attribute circuit_config.



16
17
18
# File 'lib/vertex_client/configuration.rb', line 16

def circuit_config
  @circuit_config
end

#open_timeoutObject

Returns the value of attribute open_timeout.



16
17
18
# File 'lib/vertex_client/configuration.rb', line 16

def open_timeout
  @open_timeout
end

#read_timeoutObject

Returns the value of attribute read_timeout.



16
17
18
# File 'lib/vertex_client/configuration.rb', line 16

def read_timeout
  @read_timeout
end

#resource_configObject

Returns the value of attribute resource_config.



16
17
18
# File 'lib/vertex_client/configuration.rb', line 16

def resource_config
  @resource_config
end

#soap_apiObject

Returns the value of attribute soap_api.



16
17
18
# File 'lib/vertex_client/configuration.rb', line 16

def soap_api
  @soap_api
end

#trusted_idObject

Returns the value of attribute trusted_id.



16
17
18
# File 'lib/vertex_client/configuration.rb', line 16

def trusted_id
  @trusted_id
end

Instance Method Details

#fallback_ratesObject



36
37
38
# File 'lib/vertex_client/configuration.rb', line 36

def fallback_rates
  RATES
end