Class: OpsgenieSdk::NotifyTime

Inherits:
Object
  • Object
show all
Defined in:
lib/opsgenie_sdk/models/notify_time.rb

Constant Summary collapse

JUST_BEFORE =
'just-before'.freeze
N15_MINUTES_AGO =
'15-minutes-ago'.freeze
N1_HOUR_AGO =
'1-hour-ago'.freeze
N1_DAY_AGO =
'1-day-ago'.freeze

Instance Method Summary collapse

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



26
27
28
29
30
# File 'lib/opsgenie_sdk/models/notify_time.rb', line 26

def build_from_hash(value)
  constantValues = NotifyTime.constants.select { |c| NotifyTime::const_get(c) == value }
  raise "Invalid ENUM value #{value} for class #NotifyTime" if constantValues.empty?
  value
end