Class: PinterestSdkClient::CampaignObjectiveType

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

Constant Summary collapse

AWARENESS =
"AWARENESS".freeze
CONSIDERATION =
"CONSIDERATION".freeze
VIDEO_VIEW =
"VIDEO_VIEW".freeze
WEB_CONVERSION =
"WEB_CONVERSION".freeze
CATALOG_SALES =
"CATALOG_SALES".freeze
WEB_SESSIONS =
"WEB_SESSIONS".freeze
VIDEO_COMPLETION =
"VIDEO_COMPLETION".freeze
APP_INSTALL =
"APP_INSTALL".freeze
SALES =
"SALES".freeze
LEADS =
"LEADS".freeze
CTV_CONSIDERATION =
"CTV_CONSIDERATION".freeze

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.all_varsObject



30
31
32
# File 'lib/pinterest_sdk/models/campaign_objective_type.rb', line 30

def self.all_vars
  @all_vars ||= [AWARENESS, CONSIDERATION, VIDEO_VIEW, WEB_CONVERSION, CATALOG_SALES, WEB_SESSIONS, VIDEO_COMPLETION, APP_INSTALL, SALES, LEADS, CTV_CONSIDERATION].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



37
38
39
# File 'lib/pinterest_sdk/models/campaign_objective_type.rb', line 37

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



44
45
46
47
# File 'lib/pinterest_sdk/models/campaign_objective_type.rb', line 44

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