Class: ApimaticCalculator::Environment

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

Overview

An enum for SDK environments.

Constant Summary collapse

ENVIRONMENT =

PRODUCTION: This environment connect to the LIVE calculator API

[
  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.



15
16
17
18
19
# File 'lib/apimatic_calculator/configuration.rb', line 15

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

  default_value
end