Class: FinAppsCore::REST::Configuration
- Inherits:
-
Object
- Object
- FinAppsCore::REST::Configuration
- Defined in:
- lib/finapps_core/rest/configuration.rb
Overview
Represents the client configuration options
Instance Attribute Summary collapse
-
#consumer_id ⇒ Object
Returns the value of attribute consumer_id.
-
#host ⇒ Object
Returns the value of attribute host.
-
#log_level ⇒ Object
Returns the value of attribute log_level.
-
#proxy ⇒ Object
Returns the value of attribute proxy.
-
#rashify ⇒ Object
Returns the value of attribute rashify.
-
#request_id ⇒ Object
Returns the value of attribute request_id.
-
#retry_limit ⇒ Object
Returns the value of attribute retry_limit.
-
#tenant_id ⇒ Object
Returns the value of attribute tenant_id.
-
#tenant_token ⇒ Object
Returns the value of attribute tenant_token.
-
#timeout ⇒ Object
Returns the value of attribute timeout.
-
#user_identifier ⇒ Object
Returns the value of attribute user_identifier.
-
#user_token ⇒ Object
Returns the value of attribute user_token.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Configuration
constructor
A new instance of Configuration.
- #valid_user_credentials? ⇒ Boolean
Constructor Details
#initialize(options = {}) ⇒ Configuration
Returns a new instance of Configuration.
13 14 15 16 17 18 19 |
# File 'lib/finapps_core/rest/configuration.rb', line 13 def initialize( = {}) assign_attributes FinAppsCore::REST::Defaults::DEFAULTS .merge(.compact) fail_invalid_timeout fail_invalid_host @host = @host.chomp('/') end |
Instance Attribute Details
#consumer_id ⇒ Object
Returns the value of attribute consumer_id.
9 10 11 |
# File 'lib/finapps_core/rest/configuration.rb', line 9 def consumer_id @consumer_id end |
#host ⇒ Object
Returns the value of attribute host.
9 10 11 |
# File 'lib/finapps_core/rest/configuration.rb', line 9 def host @host end |
#log_level ⇒ Object
Returns the value of attribute log_level.
9 10 11 |
# File 'lib/finapps_core/rest/configuration.rb', line 9 def log_level @log_level end |
#proxy ⇒ Object
Returns the value of attribute proxy.
9 10 11 |
# File 'lib/finapps_core/rest/configuration.rb', line 9 def proxy @proxy end |
#rashify ⇒ Object
Returns the value of attribute rashify.
9 10 11 |
# File 'lib/finapps_core/rest/configuration.rb', line 9 def rashify @rashify end |
#request_id ⇒ Object
Returns the value of attribute request_id.
9 10 11 |
# File 'lib/finapps_core/rest/configuration.rb', line 9 def request_id @request_id end |
#retry_limit ⇒ Object
Returns the value of attribute retry_limit.
9 10 11 |
# File 'lib/finapps_core/rest/configuration.rb', line 9 def retry_limit @retry_limit end |
#tenant_id ⇒ Object
Returns the value of attribute tenant_id.
9 10 11 |
# File 'lib/finapps_core/rest/configuration.rb', line 9 def tenant_id @tenant_id end |
#tenant_token ⇒ Object
Returns the value of attribute tenant_token.
9 10 11 |
# File 'lib/finapps_core/rest/configuration.rb', line 9 def tenant_token @tenant_token end |
#timeout ⇒ Object
Returns the value of attribute timeout.
9 10 11 |
# File 'lib/finapps_core/rest/configuration.rb', line 9 def timeout @timeout end |
#user_identifier ⇒ Object
Returns the value of attribute user_identifier.
9 10 11 |
# File 'lib/finapps_core/rest/configuration.rb', line 9 def user_identifier @user_identifier end |
#user_token ⇒ Object
Returns the value of attribute user_token.
9 10 11 |
# File 'lib/finapps_core/rest/configuration.rb', line 9 def user_token @user_token end |
Instance Method Details
#valid_user_credentials? ⇒ Boolean
21 22 23 |
# File 'lib/finapps_core/rest/configuration.rb', line 21 def valid_user_credentials? FinAppsCore::REST::Credentials.new(user_identifier, user_token).valid? end |