Class: PinterestSdkClient::IneligibleProductTagReason

Inherits:
Object
  • Object
show all
Defined in:
lib/pinterest_sdk/models/ineligible_product_tag_reason.rb

Constant Summary collapse

PIN_MISSING =
"PIN_MISSING".freeze
PIN_IS_PRIVATE =
"PIN_IS_PRIVATE".freeze
PRODUCT_METADATA_MISSING =
"PRODUCT_METADATA_MISSING".freeze
PIN_NOT_FROM_VERIFIED_DOMAIN =
"PIN_NOT_FROM_VERIFIED_DOMAIN".freeze
PIN_NOT_FROM_SAME_USER_AS_HERO_PIN =
"PIN_NOT_FROM_SAME_USER_AS_HERO_PIN".freeze

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.all_varsObject



24
25
26
# File 'lib/pinterest_sdk/models/ineligible_product_tag_reason.rb', line 24

def self.all_vars
  @all_vars ||= [PIN_MISSING, PIN_IS_PRIVATE, PRODUCT_METADATA_MISSING, PIN_NOT_FROM_VERIFIED_DOMAIN, PIN_NOT_FROM_SAME_USER_AS_HERO_PIN].freeze
end

.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



31
32
33
# File 'lib/pinterest_sdk/models/ineligible_product_tag_reason.rb', line 31

def self.build_from_hash(value)
  new.build_from_hash(value)
end

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
# File 'lib/pinterest_sdk/models/ineligible_product_tag_reason.rb', line 38

def build_from_hash(value)
  return value if IneligibleProductTagReason.all_vars.include?(value)
  raise "Invalid ENUM value #{value} for class #IneligibleProductTagReason"
end