Class: PinterestSdkClient::PublicTargetingType

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

Constant Summary collapse

APPTYPE =
"APPTYPE".freeze
GENDER =
"GENDER".freeze
LOCALE =
"LOCALE".freeze
AGE_BUCKET =
"AGE_BUCKET".freeze
LOCATION =
"LOCATION".freeze
GEO =
"GEO".freeze
INTEREST =
"INTEREST".freeze
KEYWORD =
"KEYWORD".freeze
AUDIENCE_INCLUDE =
"AUDIENCE_INCLUDE".freeze
AUDIENCE_EXCLUDE =
"AUDIENCE_EXCLUDE".freeze

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.all_varsObject



29
30
31
# File 'lib/pinterest_sdk/models/public_targeting_type.rb', line 29

def self.all_vars
  @all_vars ||= [APPTYPE, GENDER, LOCALE, AGE_BUCKET, LOCATION, GEO, INTEREST, KEYWORD, AUDIENCE_INCLUDE, AUDIENCE_EXCLUDE].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



36
37
38
# File 'lib/pinterest_sdk/models/public_targeting_type.rb', line 36

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



43
44
45
46
# File 'lib/pinterest_sdk/models/public_targeting_type.rb', line 43

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