Class: Zernio::GoogleLocationTargetingType

Inherits:
Object
  • Object
show all
Defined in:
lib/zernio-sdk/models/google_location_targeting_type.rb

Constant Summary collapse

PRESENCE =
"presence".freeze
PRESENCE_OR_INTEREST =
"presence_or_interest".freeze

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.all_vars ⇒ Object



21
22
23
# File 'lib/zernio-sdk/models/google_location_targeting_type.rb', line 21

def self.all_vars
  @all_vars ||= [PRESENCE, PRESENCE_OR_INTEREST].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



28
29
30
# File 'lib/zernio-sdk/models/google_location_targeting_type.rb', line 28

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



35
36
37
38
# File 'lib/zernio-sdk/models/google_location_targeting_type.rb', line 35

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