Class: BraspagRest::Configuration
- Inherits:
-
Object
- Object
- BraspagRest::Configuration
- Defined in:
- lib/braspag-rest/configuration.rb
Instance Attribute Summary collapse
-
#config_file_path ⇒ Object
Returns the value of attribute config_file_path.
-
#environment ⇒ Object
Returns the value of attribute environment.
-
#logger ⇒ Object
Returns the value of attribute logger.
Instance Method Summary collapse
- #log_enabled? ⇒ Boolean
- #merchant_id ⇒ Object
- #merchant_key ⇒ Object
- #query_url ⇒ Object
- #request_timeout ⇒ Object
- #url ⇒ Object
Instance Attribute Details
#config_file_path ⇒ Object
Returns the value of attribute config_file_path.
6 7 8 |
# File 'lib/braspag-rest/configuration.rb', line 6 def config_file_path @config_file_path end |
#environment ⇒ Object
Returns the value of attribute environment.
6 7 8 |
# File 'lib/braspag-rest/configuration.rb', line 6 def environment @environment end |
#logger ⇒ Object
Returns the value of attribute logger.
6 7 8 |
# File 'lib/braspag-rest/configuration.rb', line 6 def logger @logger end |
Instance Method Details
#log_enabled? ⇒ Boolean
16 17 18 |
# File 'lib/braspag-rest/configuration.rb', line 16 def log_enabled? config['log_enable'] && logger end |
#merchant_id ⇒ Object
28 29 30 |
# File 'lib/braspag-rest/configuration.rb', line 28 def merchant_id config['merchant_id'] end |
#merchant_key ⇒ Object
32 33 34 |
# File 'lib/braspag-rest/configuration.rb', line 32 def merchant_key config['merchant_key'] end |
#query_url ⇒ Object
24 25 26 |
# File 'lib/braspag-rest/configuration.rb', line 24 def query_url config['query_url'] end |
#request_timeout ⇒ Object
36 37 38 |
# File 'lib/braspag-rest/configuration.rb', line 36 def request_timeout config.fetch('request_timeout', 60) end |
#url ⇒ Object
20 21 22 |
# File 'lib/braspag-rest/configuration.rb', line 20 def url config['url'] end |