Class: WalmartApIs::Environment

Inherits:
Object
  • Object
show all
Defined in:
lib/walmart_ap_is/configuration.rb

Overview

An enum for SDK environments.

Constant Summary collapse

ENVIRONMENT =
[
  PRODUCTION = 'production'.freeze
].freeze

Class Method Summary collapse

Class Method Details

.from_value(value, default_value = PRODUCTION) ⇒ Object

Converts a string or symbol into a valid Environment constant.



14
15
16
17
18
# File 'lib/walmart_ap_is/configuration.rb', line 14

def self.from_value(value, default_value = PRODUCTION)
  return default_value if value.nil?

  default_value
end