Class: PinterestSdkClient::ConversionAttributionWindowDays

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

Constant Summary collapse

N0 =
0.freeze
N1 =
1.freeze
N7 =
7.freeze
N14 =
14.freeze
N30 =
30.freeze
N60 =
60.freeze

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.all_varsObject



25
26
27
# File 'lib/pinterest_sdk/models/conversion_attribution_window_days.rb', line 25

def self.all_vars
  @all_vars ||= [N0, N1, N7, N14, N30, N60].freeze
end

.build_from_hash(value) ⇒ String

Builds the enum from string



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

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



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

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