Class: Shipeasy::Admin::Generated::ErrorCode

Inherits:
Object
  • Object
show all
Defined in:
lib/shipeasy_admin/models/error_code.rb

Constant Summary collapse

BAD_REQUEST =
"BAD_REQUEST".freeze
UNAUTHORIZED =
"UNAUTHORIZED".freeze
FORBIDDEN =
"FORBIDDEN".freeze
PLAN_REQUIRED =
"PLAN_REQUIRED".freeze
NOT_FOUND =
"NOT_FOUND".freeze
ALREADY_EXISTS =
"ALREADY_EXISTS".freeze
INVALID_TRANSITION =
"INVALID_TRANSITION".freeze
IMMUTABLE_FIELD =
"IMMUTABLE_FIELD".freeze
READ_ONLY =
"READ_ONLY".freeze
REFERENCED_IN_USE =
"REFERENCED_IN_USE".freeze
VALIDATION =
"VALIDATION".freeze
REFERENCED_NOT_FOUND =
"REFERENCED_NOT_FOUND".freeze
GROUPS_WEIGHT_SUM =
"GROUPS_WEIGHT_SUM".freeze
EVENT_PENDING =
"EVENT_PENDING".freeze
INTERNAL =
"INTERNAL".freeze
PLAN_LIMIT =
"PLAN_LIMIT".freeze
EXPERIMENT_NO_GOAL_METRIC =
"EXPERIMENT_NO_GOAL_METRIC".freeze
EXPERIMENT_ARCHIVED_RESTART =
"EXPERIMENT_ARCHIVED_RESTART".freeze
EXPERIMENT_RESTORE_INVALID =
"EXPERIMENT_RESTORE_INVALID".freeze
EXPERIMENT_NOT_RUNNING =
"EXPERIMENT_NOT_RUNNING".freeze
EXPERIMENT_RUNNING_ARCHIVE =
"EXPERIMENT_RUNNING_ARCHIVE".freeze
EXPERIMENT_IMMUTABLE_FIELD =
"EXPERIMENT_IMMUTABLE_FIELD".freeze
METRIC_NOT_FOUND =
"METRIC_NOT_FOUND".freeze
METRIC_UNKNOWN_ID =
"METRIC_UNKNOWN_ID".freeze
AGENT_NOT_CONNECTED =
"AGENT_NOT_CONNECTED".freeze

Class Method Summary collapse

Instance Method Summary collapse

Class 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



51
52
53
# File 'lib/shipeasy_admin/models/error_code.rb', line 51

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



58
59
60
61
# File 'lib/shipeasy_admin/models/error_code.rb', line 58

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