Class: RakutenWebService::Configuration
- Inherits:
-
Object
- Object
- RakutenWebService::Configuration
- Defined in:
- lib/rakuten_web_service/configuration.rb
Instance Attribute Summary collapse
-
#affiliate_id ⇒ Object
Returns the value of attribute affiliate_id.
-
#application_id ⇒ Object
Returns the value of attribute application_id.
-
#debug ⇒ Object
Returns the value of attribute debug.
-
#max_retries ⇒ Object
Returns the value of attribute max_retries.
Instance Method Summary collapse
- #debug_mode? ⇒ Boolean
- #default_parameters ⇒ Object
- #generate_parameters(params) ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
7 8 9 |
# File 'lib/rakuten_web_service/configuration.rb', line 7 def initialize @max_retries = 5 end |
Instance Attribute Details
#affiliate_id ⇒ Object
Returns the value of attribute affiliate_id.
5 6 7 |
# File 'lib/rakuten_web_service/configuration.rb', line 5 def affiliate_id @affiliate_id end |
#application_id ⇒ Object
Returns the value of attribute application_id.
5 6 7 |
# File 'lib/rakuten_web_service/configuration.rb', line 5 def application_id @application_id end |
#debug ⇒ Object
Returns the value of attribute debug.
5 6 7 |
# File 'lib/rakuten_web_service/configuration.rb', line 5 def debug @debug end |
#max_retries ⇒ Object
Returns the value of attribute max_retries.
5 6 7 |
# File 'lib/rakuten_web_service/configuration.rb', line 5 def max_retries @max_retries end |
Instance Method Details
#debug_mode? ⇒ Boolean
19 20 21 |
# File 'lib/rakuten_web_service/configuration.rb', line 19 def debug_mode? ENV.has_key?('RWS_SDK_DEBUG') || debug end |
#default_parameters ⇒ Object
15 16 17 |
# File 'lib/rakuten_web_service/configuration.rb', line 15 def default_parameters { :application_id => application_id, :affiliate_id => affiliate_id } end |
#generate_parameters(params) ⇒ Object
11 12 13 |
# File 'lib/rakuten_web_service/configuration.rb', line 11 def generate_parameters(params) convert_snake_key_to_camel_key(default_parameters.merge(params)) end |