Class: ShipEngine::Configuration
- Inherits:
-
Object
- Object
- ShipEngine::Configuration
- Defined in:
- lib/shipengine/configuration.rb
Instance Attribute Summary collapse
-
#api_key ⇒ Object
Returns the value of attribute api_key.
-
#base_url ⇒ Object
Returns the value of attribute base_url.
-
#page_size ⇒ Object
Returns the value of attribute page_size.
-
#retries ⇒ Object
Returns the value of attribute retries.
-
#timeout ⇒ Object
Returns the value of attribute timeout.
Instance Method Summary collapse
-
#initialize(api_key: nil, retries: nil, timeout: nil, page_size: nil, base_url: nil) ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize(api_key: nil, retries: nil, timeout: nil, page_size: nil, base_url: nil) ⇒ Configuration
Returns a new instance of Configuration.
7 8 9 10 11 12 13 14 |
# File 'lib/shipengine/configuration.rb', line 7 def initialize(api_key: nil, retries: nil, timeout: nil, page_size: nil, base_url: nil) @api_key = api_key || ShipEngine::Constants::API_KEY @base_url = base_url || ShipEngine::Constants::PROD_URL @retries = retries || ShipEngine::Constants::RETRIES @timeout = timeout || ShipEngine::Constants::TIMEOUT @page_size = page_size || ShipEngine::Constants::PAGE_SIZE validate end |
Instance Attribute Details
#api_key ⇒ Object
Returns the value of attribute api_key.
5 6 7 |
# File 'lib/shipengine/configuration.rb', line 5 def api_key @api_key end |
#base_url ⇒ Object
Returns the value of attribute base_url.
5 6 7 |
# File 'lib/shipengine/configuration.rb', line 5 def base_url @base_url end |
#page_size ⇒ Object
Returns the value of attribute page_size.
5 6 7 |
# File 'lib/shipengine/configuration.rb', line 5 def page_size @page_size end |
#retries ⇒ Object
Returns the value of attribute retries.
5 6 7 |
# File 'lib/shipengine/configuration.rb', line 5 def retries @retries end |
#timeout ⇒ Object
Returns the value of attribute timeout.
5 6 7 |
# File 'lib/shipengine/configuration.rb', line 5 def timeout @timeout end |