Class: PinterestSdkClient::VideoPinMetricTypes

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

Constant Summary collapse

IMPRESSION =
"IMPRESSION".freeze
OUTBOUND_CLICK =
"OUTBOUND_CLICK".freeze
PIN_CLICK =
"PIN_CLICK".freeze
SAVE =
"SAVE".freeze
SAVE_RATE =
"SAVE_RATE".freeze
VIDEO_MRC_VIEW =
"VIDEO_MRC_VIEW".freeze
VIDEO_10_S_VIEW =
"VIDEO_10S_VIEW".freeze
QUARTILE_95_PERCENT_VIEW =
"QUARTILE_95_PERCENT_VIEW".freeze
VIDEO_V50_WATCH_TIME =
"VIDEO_V50_WATCH_TIME".freeze
VIDEO_START =
"VIDEO_START".freeze
VIDEO_AVG_WATCH_TIME =
"VIDEO_AVG_WATCH_TIME".freeze
TOTAL_COMMENTS =
"TOTAL_COMMENTS".freeze
TOTAL_REACTIONS =
"TOTAL_REACTIONS".freeze

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.all_varsObject



32
33
34
# File 'lib/pinterest_sdk/models/video_pin_metric_types.rb', line 32

def self.all_vars
  @all_vars ||= [IMPRESSION, OUTBOUND_CLICK, PIN_CLICK, SAVE, SAVE_RATE, VIDEO_MRC_VIEW, VIDEO_10_S_VIEW, QUARTILE_95_PERCENT_VIEW, VIDEO_V50_WATCH_TIME, VIDEO_START, VIDEO_AVG_WATCH_TIME, TOTAL_COMMENTS, TOTAL_REACTIONS].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



39
40
41
# File 'lib/pinterest_sdk/models/video_pin_metric_types.rb', line 39

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



46
47
48
49
# File 'lib/pinterest_sdk/models/video_pin_metric_types.rb', line 46

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