Module: Profitwell::Configuration
- Included in:
- Profitwell
- Defined in:
- lib/profitwell/configuration.rb
Constant Summary collapse
- VALID_OPTIONS_KEYS =
[ :access_token, :version, :base_endpoint, :content_type, ].freeze
- DEFAULT_ACCESS_TOKEN =
nil
- DEFAULT_VERSION =
"v2".freeze
- DEFAULT_BASE_ENDPOINT =
"https://api.profitwell.com/v2".freeze
- DEFAULT_CONTENT_TYPE =
"application/json".freeze
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.extended(base) ⇒ Object
17 18 19 |
# File 'lib/profitwell/configuration.rb', line 17 def self.extended(base) base.reset end |
Instance Method Details
#config {|_self| ... } ⇒ Object
21 22 23 |
# File 'lib/profitwell/configuration.rb', line 21 def config yield self if block_given? end |
#reset ⇒ Object
25 26 27 28 29 30 |
# File 'lib/profitwell/configuration.rb', line 25 def reset self.access_token = DEFAULT_ACCESS_TOKEN self.version = DEFAULT_VERSION self.base_endpoint = DEFAULT_BASE_ENDPOINT self.content_type = DEFAULT_CONTENT_TYPE end |