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.
38 39 40 41 42 43 44 45 |
# File 'lib/experian.rb', line 38 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.
32 33 34 |
# File 'lib/experian.rb', line 32 def base_uri @base_uri end |
#extra_headers ⇒ Object
Returns the value of attribute extra_headers.
32 33 34 |
# File 'lib/experian.rb', line 32 def extra_headers @extra_headers end |
#password ⇒ Object
52 53 54 55 |
# File 'lib/experian.rb', line 52 def password return @password if @password raise ConfigurationError, "Experian password missing!" end |
#request_timeout ⇒ Object
Returns the value of attribute request_timeout.
32 33 34 |
# File 'lib/experian.rb', line 32 def request_timeout @request_timeout end |
#user_code ⇒ Object
47 48 49 50 |
# File 'lib/experian.rb', line 47 def user_code return @user_code if @user_code raise ConfigurationError, "Experian user_code missing!" end |
#version ⇒ Object
Returns the value of attribute version.
32 33 34 |
# File 'lib/experian.rb', line 32 def version @version end |