Class: PinterestSdkClient::CampaignPlanningEstimationType

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

Constant Summary collapse

IMPRESSION =
"IMPRESSION".freeze
CLICK =
"CLICK".freeze
CONVERSION =
"CONVERSION".freeze
WEEKLY_FREQUENCY =
"WEEKLY_FREQUENCY".freeze
WEEKLY_REACH =
"WEEKLY_REACH".freeze
LIFETIME_FREQUENCY =
"LIFETIME_FREQUENCY".freeze
LIFETIME_REACH =
"LIFETIME_REACH".freeze
CPM =
"CPM".freeze
CPC =
"CPC".freeze
CPA =
"CPA".freeze

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.all_varsObject



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

def self.all_vars
  @all_vars ||= [IMPRESSION, CLICK, CONVERSION, WEEKLY_FREQUENCY, WEEKLY_REACH, LIFETIME_FREQUENCY, LIFETIME_REACH, CPM, CPC, CPA].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/campaign_planning_estimation_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/campaign_planning_estimation_type.rb', line 43

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