Class: PinterestSdkClient::QueryvideopinmetrictypesItems

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

Constant Summary collapse

IMPRESSION =
"IMPRESSION".freeze
SAVE =
"SAVE".freeze
VIDEO_MRC_VIEW =
"VIDEO_MRC_VIEW".freeze
VIDEO_AVG_WATCH_TIME =
"VIDEO_AVG_WATCH_TIME".freeze
VIDEO_V50_WATCH_TIME =
"VIDEO_V50_WATCH_TIME".freeze
QUARTILE_95_PERCENT_VIEW =
"QUARTILE_95_PERCENT_VIEW".freeze
VIDEO_10_S_VIEW =
"VIDEO_10S_VIEW".freeze
VIDEO_START =
"VIDEO_START".freeze
OUTBOUND_CLICK =
"OUTBOUND_CLICK".freeze

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.all_varsObject



28
29
30
# File 'lib/pinterest_sdk/models/queryvideopinmetrictypes_items.rb', line 28

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



35
36
37
# File 'lib/pinterest_sdk/models/queryvideopinmetrictypes_items.rb', line 35

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



42
43
44
45
# File 'lib/pinterest_sdk/models/queryvideopinmetrictypes_items.rb', line 42

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