Class: TurnkeyClient::Outcome

Inherits:
Object
  • Object
show all
Defined in:
lib/turnkey_client/models/outcome.rb

Constant Summary collapse

ALLOW =
'OUTCOME_ALLOW'.freeze
DENY_EXPLICIT =
'OUTCOME_DENY_EXPLICIT'.freeze
DENY_IMPLICIT =
'OUTCOME_DENY_IMPLICIT'.freeze
REQUIRES_CONSENSUS =
'OUTCOME_REQUIRES_CONSENSUS'.freeze
REJECTED =
'OUTCOME_REJECTED'.freeze
ERROR =
'OUTCOME_ERROR'.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



25
26
27
28
29
# File 'lib/turnkey_client/models/outcome.rb', line 25

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