Class: IngramMicro::Configuration
- Inherits:
-
Object
- Object
- IngramMicro::Configuration
- Defined in:
- lib/ingram_micro/configuration.rb
Defined Under Namespace
Classes: Error
Instance Attribute Summary collapse
-
#api_root ⇒ Object
Returns the value of attribute api_root.
-
#customer_id ⇒ Object
Returns the value of attribute customer_id.
-
#debug ⇒ Object
Returns the value of attribute debug.
-
#log_request_body ⇒ Object
Returns the value of attribute log_request_body.
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#partner_name ⇒ Object
Returns the value of attribute partner_name.
-
#partner_password ⇒ Object
Returns the value of attribute partner_password.
-
#proxy ⇒ Object
Returns the value of attribute proxy.
Instance Method Summary collapse
Instance Attribute Details
#api_root ⇒ Object
Returns the value of attribute api_root.
5 6 7 |
# File 'lib/ingram_micro/configuration.rb', line 5 def api_root @api_root end |
#customer_id ⇒ Object
Returns the value of attribute customer_id.
5 6 7 |
# File 'lib/ingram_micro/configuration.rb', line 5 def customer_id @customer_id end |
#debug ⇒ Object
Returns the value of attribute debug.
5 6 7 |
# File 'lib/ingram_micro/configuration.rb', line 5 def debug @debug end |
#log_request_body ⇒ Object
Returns the value of attribute log_request_body.
5 6 7 |
# File 'lib/ingram_micro/configuration.rb', line 5 def log_request_body @log_request_body end |
#logger ⇒ Object
Returns the value of attribute logger.
5 6 7 |
# File 'lib/ingram_micro/configuration.rb', line 5 def logger @logger end |
#partner_name ⇒ Object
Returns the value of attribute partner_name.
5 6 7 |
# File 'lib/ingram_micro/configuration.rb', line 5 def partner_name @partner_name end |
#partner_password ⇒ Object
Returns the value of attribute partner_password.
5 6 7 |
# File 'lib/ingram_micro/configuration.rb', line 5 def partner_password @partner_password end |
#proxy ⇒ Object
Returns the value of attribute proxy.
5 6 7 |
# File 'lib/ingram_micro/configuration.rb', line 5 def proxy @proxy end |
Instance Method Details
#assert_valid ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'lib/ingram_micro/configuration.rb', line 9 def assert_valid assert_present :partner_name assert_present :api_root assert_present :customer_id fail Error.new('logger must be set if debug is set') unless logger_valid? fail Error.new('customer_id must be an integer') unless customer_id_valid? fail Error.new('proxy must have protocol http://') unless proxy_valid? end |