Module: CodesWholesale::Default
- Defined in:
- lib/codes_wholesale/default.rb
Constant Summary collapse
- ENVIRONMENT =
'production'.freeze
- API_VERSION =
'v1'.freeze
- USER_AGENT =
"CodesWholesale Ruby Gem #{CodesWholesale::VERSION}".freeze
Class Method Summary collapse
- .api_version ⇒ Object
- .client_id ⇒ Object
- .client_secret ⇒ Object
- .environment ⇒ Object
- .options ⇒ Object
- .user_agent ⇒ Object
Class Method Details
.api_version ⇒ Object
14 15 16 |
# File 'lib/codes_wholesale/default.rb', line 14 def api_version ENV['CODES_WHOLESALE_API_VERSION'] ||= API_VERSION end |
.client_id ⇒ Object
22 23 24 |
# File 'lib/codes_wholesale/default.rb', line 22 def client_id ENV['CODES_WHOLESALE_CLIENT_ID'] end |
.client_secret ⇒ Object
26 27 28 |
# File 'lib/codes_wholesale/default.rb', line 26 def client_secret ENV['CODES_WHOLESALE_CLIENT_SECRET'] end |
.environment ⇒ Object
18 19 20 |
# File 'lib/codes_wholesale/default.rb', line 18 def environment ENV['CODES_WHOLESALE_ENVIRONMENT'] ||= ENVIRONMENT end |
.options ⇒ Object
10 11 12 |
# File 'lib/codes_wholesale/default.rb', line 10 def Hash[CodesWholesale::Configurable.keys.map { |key| [key, send(key)] }] end |
.user_agent ⇒ Object
30 31 32 |
# File 'lib/codes_wholesale/default.rb', line 30 def user_agent ENV['CODES_WHOLESALE_USER_AGENT'] || USER_AGENT end |