Class: Experian::Configuration
- Inherits:
-
Object
- Object
- Experian::Configuration
- Defined in:
- lib/experian.rb
Constant Summary collapse
- DEFAULT_BASE_URI =
"https://informes.axesor.es".freeze
- DEFAULT_VERSION =
"9.0".freeze
- DEFAULT_REQUEST_TIMEOUT =
120
Instance Attribute Summary collapse
-
#base_uri ⇒ Object
Returns the value of attribute base_uri.
-
#extra_headers ⇒ Object
Returns the value of attribute extra_headers.
- #password ⇒ Object
-
#request_timeout ⇒ Object
Returns the value of attribute request_timeout.
- #user_code ⇒ Object
-
#version ⇒ Object
Returns the value of attribute version.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
21 22 23 24 25 26 27 28 |
# File 'lib/experian.rb', line 21 def initialize @user_code = nil @password = nil @version = DEFAULT_VERSION @request_timeout = DEFAULT_REQUEST_TIMEOUT @base_uri = DEFAULT_BASE_URI @extra_headers = {} end |
Instance Attribute Details
#base_uri ⇒ Object
Returns the value of attribute base_uri.
15 16 17 |
# File 'lib/experian.rb', line 15 def base_uri @base_uri end |
#extra_headers ⇒ Object
Returns the value of attribute extra_headers.
15 16 17 |
# File 'lib/experian.rb', line 15 def extra_headers @extra_headers end |
#password ⇒ Object
35 36 37 38 |
# File 'lib/experian.rb', line 35 def password return @password if @password raise ConfigurationError, "Experian password missing!" end |
#request_timeout ⇒ Object
Returns the value of attribute request_timeout.
15 16 17 |
# File 'lib/experian.rb', line 15 def request_timeout @request_timeout end |
#user_code ⇒ Object
30 31 32 33 |
# File 'lib/experian.rb', line 30 def user_code return @user_code if @user_code raise ConfigurationError, "Experian user_code missing!" end |
#version ⇒ Object
Returns the value of attribute version.
15 16 17 |
# File 'lib/experian.rb', line 15 def version @version end |