Class: AmzSpApi::AplusContentApiModel::ContentModuleType

Inherits:
Object
  • Object
show all
Defined in:
lib/aplus-content-api-model/models/content_module_type.rb

Constant Summary collapse

COMPANY_LOGO =
'STANDARD_COMPANY_LOGO'.freeze
COMPARISON_TABLE =
'STANDARD_COMPARISON_TABLE'.freeze
FOUR_IMAGE_TEXT =
'STANDARD_FOUR_IMAGE_TEXT'.freeze
FOUR_IMAGE_TEXT_QUADRANT =
'STANDARD_FOUR_IMAGE_TEXT_QUADRANT'.freeze
HEADER_IMAGE_TEXT =
'STANDARD_HEADER_IMAGE_TEXT'.freeze
IMAGE_SIDEBAR =
'STANDARD_IMAGE_SIDEBAR'.freeze
IMAGE_TEXT_OVERLAY =
'STANDARD_IMAGE_TEXT_OVERLAY'.freeze
MULTIPLE_IMAGE_TEXT =
'STANDARD_MULTIPLE_IMAGE_TEXT'.freeze
PRODUCT_DESCRIPTION =
'STANDARD_PRODUCT_DESCRIPTION'.freeze
SINGLE_IMAGE_HIGHLIGHTS =
'STANDARD_SINGLE_IMAGE_HIGHLIGHTS'.freeze
SINGLE_IMAGE_SPECS_DETAIL =
'STANDARD_SINGLE_IMAGE_SPECS_DETAIL'.freeze
SINGLE_SIDE_IMAGE =
'STANDARD_SINGLE_SIDE_IMAGE'.freeze
TECH_SPECS =
'STANDARD_TECH_SPECS'.freeze
TEXT =
'STANDARD_TEXT'.freeze
THREE_IMAGE_TEXT =
'STANDARD_THREE_IMAGE_TEXT'.freeze

Instance Method Summary collapse

Instance Method Details

#build_from_hash(value) ⇒ String

Builds the enum from string

Parameters:

  • The (String)

    enum value in the form of the string

Returns:

  • (String)

    The enum value



35
36
37
38
39
# File 'lib/aplus-content-api-model/models/content_module_type.rb', line 35

def build_from_hash(value)
  constantValues = ContentModuleType.constants.select { |c| ContentModuleType::const_get(c) == value }
  raise "Invalid ENUM value #{value} for class #ContentModuleType" if constantValues.empty?
  value
end