Class: NewStoreApi::CustomConfigAuthenticationMethodEnum

Inherits:
Object
  • Object
show all
Defined in:
lib/new_store_api/models/custom_config_authentication_method_enum.rb

Overview

Custom provider authentication method.

Constant Summary collapse

CUSTOM_CONFIG_AUTHENTICATION_METHOD_ENUM =
[
  # TODO: Write general description for BASIC
  BASIC = 'Basic'.freeze
].freeze

Class Method Summary collapse

Class Method Details

.from_value(value, default_value = BASIC) ⇒ Object



20
21
22
23
24
# File 'lib/new_store_api/models/custom_config_authentication_method_enum.rb', line 20

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

  default_value
end

.validate(value) ⇒ Object



14
15
16
17
18
# File 'lib/new_store_api/models/custom_config_authentication_method_enum.rb', line 14

def self.validate(value)
  return false if value.nil?

  CUSTOM_CONFIG_AUTHENTICATION_METHOD_ENUM.include?(value)
end