Class: Batches::ErrorCode4

Inherits:
Object
  • Object
show all
Defined in:
lib/batches/models/error_code4.rb

Overview

This is an error not yet handled or mapped properly.

Constant Summary collapse

ERROR_CODE4 =
[
  # TODO: Write general description for UNKNOWN_RESPONSE
  UNKNOWN_RESPONSE = 'UNKNOWN_RESPONSE'.freeze
].freeze

Class Method Summary collapse

Class Method Details

.from_value(value, default_value = UNKNOWN_RESPONSE) ⇒ Object



20
21
22
23
24
# File 'lib/batches/models/error_code4.rb', line 20

def self.from_value(value, default_value = UNKNOWN_RESPONSE)
  return default_value if value.nil?

  default_value
end

.validate(value) ⇒ Object



14
15
16
17
18
# File 'lib/batches/models/error_code4.rb', line 14

def self.validate(value)
  return false if value.nil?

  ERROR_CODE4.include?(value)
end