Class: AmzSpApi::FulfillmentInboundApiModel::Condition

Inherits:
Object
  • Object
show all
Defined in:
lib/fulfillment-inbound-api-model/models/condition.rb

Constant Summary collapse

NEW_ITEM =
'NewItem'.freeze
NEW_WITH_WARRANTY =
'NewWithWarranty'.freeze
NEW_OEM =
'NewOEM'.freeze
NEW_OPEN_BOX =
'NewOpenBox'.freeze
USED_LIKE_NEW =
'UsedLikeNew'.freeze
USED_VERY_GOOD =
'UsedVeryGood'.freeze
USED_GOOD =
'UsedGood'.freeze
USED_ACCEPTABLE =
'UsedAcceptable'.freeze
USED_POOR =
'UsedPoor'.freeze
USED_REFURBISHED =
'UsedRefurbished'.freeze
COLLECTIBLE_LIKE_NEW =
'CollectibleLikeNew'.freeze
COLLECTIBLE_VERY_GOOD =
'CollectibleVeryGood'.freeze
COLLECTIBLE_GOOD =
'CollectibleGood'.freeze
COLLECTIBLE_ACCEPTABLE =
'CollectibleAcceptable'.freeze
COLLECTIBLE_POOR =
'CollectiblePoor'.freeze
REFURBISHED_WITH_WARRANTY =
'RefurbishedWithWarranty'.freeze
REFURBISHED =
'Refurbished'.freeze
CLUB =
'Club'.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



38
39
40
41
42
# File 'lib/fulfillment-inbound-api-model/models/condition.rb', line 38

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