Class: RmsWebService::Configuration
- Inherits:
-
Object
- Object
- RmsWebService::Configuration
- Defined in:
- lib/rms_web_service/configuration.rb
Instance Attribute Summary collapse
-
#license_key ⇒ Object
Returns the value of attribute license_key.
-
#service_secret ⇒ Object
Returns the value of attribute service_secret.
Instance Method Summary collapse
- #encoded_keys ⇒ Object
-
#initialize(args = {}) ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize(args = {}) ⇒ Configuration
Returns a new instance of Configuration.
7 8 9 10 |
# File 'lib/rms_web_service/configuration.rb', line 7 def initialize(args={}) @service_secret = args[:service_secret] @license_key = args[:license_key] end |
Instance Attribute Details
#license_key ⇒ Object
Returns the value of attribute license_key.
5 6 7 |
# File 'lib/rms_web_service/configuration.rb', line 5 def license_key @license_key end |
#service_secret ⇒ Object
Returns the value of attribute service_secret.
5 6 7 |
# File 'lib/rms_web_service/configuration.rb', line 5 def service_secret @service_secret end |
Instance Method Details
#encoded_keys ⇒ Object
12 13 14 15 16 17 |
# File 'lib/rms_web_service/configuration.rb', line 12 def encoded_keys raise RmsWebService::ParameterError, 'service_secret is required' unless service_secret.present? raise RmsWebService::ParameterError, 'license_key is required' unless license_key.present? "ESA " + Base64.strict_encode64(service_secret + ":" + license_key) end |