Class: FulfilApi::Configuration
- Inherits:
-
Object
- Object
- FulfilApi::Configuration
- Defined in:
- lib/fulfil_api/configuration.rb
Overview
Configuration model for the Fulfil gem.
This model holds configuration settings and provides thread-safe access
to these settings.
Constant Summary collapse
- DEFAULT_API_VERSION =
"v2"
- DEFAULT_REQUEST_OPTIONS =
{ open_timeout: 1, read_timeout: 5, write_timeout: 5, timeout: 5 }.freeze
Instance Attribute Summary collapse
-
#access_token ⇒ Object
Returns the value of attribute access_token.
-
#api_version ⇒ Object
Returns the value of attribute api_version.
-
#merchant_id ⇒ Object
Returns the value of attribute merchant_id.
-
#request_options ⇒ Object
Returns the value of attribute request_options.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Configuration
constructor
Initializes the configuration with optional settings.
Constructor Details
#initialize(options = {}) ⇒ Configuration
Initializes the configuration with optional settings.
18 19 20 21 22 23 24 25 26 |
# File 'lib/fulfil_api/configuration.rb', line 18 def initialize( = {}) # Assigns the optional configuration options .each_pair do |key, value| send(:"#{key}=", value) if respond_to?(:"#{key}=") end # Sets the default options if not provided end |
Instance Attribute Details
#access_token ⇒ Object
Returns the value of attribute access_token.
9 10 11 |
# File 'lib/fulfil_api/configuration.rb', line 9 def access_token @access_token end |
#api_version ⇒ Object
Returns the value of attribute api_version.
9 10 11 |
# File 'lib/fulfil_api/configuration.rb', line 9 def api_version @api_version end |
#merchant_id ⇒ Object
Returns the value of attribute merchant_id.
9 10 11 |
# File 'lib/fulfil_api/configuration.rb', line 9 def merchant_id @merchant_id end |
#request_options ⇒ Object
Returns the value of attribute request_options.
9 10 11 |
# File 'lib/fulfil_api/configuration.rb', line 9 def @request_options end |