Class: Retailigence::Configuration
- Inherits:
-
Object
- Object
- Retailigence::Configuration
- Defined in:
- lib/retailigence/configuration.rb
Overview
Configure Retailigence with your credentials.
Example
Retailigence.configure do |config|
config.api_key = 'yourapikeyhere'
config.production = false # Use the test route
end
Instance Attribute Summary collapse
-
#api_key ⇒ Object
The API key issued to you by Retailigence.
-
#production ⇒ Object
writeonly
Wether or not to use the production Retailigence API.
Instance Method Summary collapse
-
#production? ⇒ Boolean
Returns true if using the production API.
-
#test? ⇒ Boolean
Returns true if using the test API.
Instance Attribute Details
#api_key ⇒ Object
The API key issued to you by Retailigence
11 12 13 |
# File 'lib/retailigence/configuration.rb', line 11 def api_key @api_key end |
#production=(value) ⇒ Object (writeonly)
Wether or not to use the production Retailigence API
14 15 16 |
# File 'lib/retailigence/configuration.rb', line 14 def production=(value) @production = value end |
Instance Method Details
#production? ⇒ Boolean
Returns true if using the production API
17 18 19 |
# File 'lib/retailigence/configuration.rb', line 17 def production? @production == true end |
#test? ⇒ Boolean
Returns true if using the test API
22 23 24 |
# File 'lib/retailigence/configuration.rb', line 22 def test? !production? end |