Class: Bigid::Bgcheck::ResultCode

Inherits:
Object
  • Object
show all
Defined in:
lib/bigid/bgcheck/result_code.rb

Constant Summary collapse

APPROVED =
90
ERROR =
-1101
NO_INFO =
-1102
NOT_APPROVED =
-1100
VALUES =
[APPROVED, NOT_APPROVED, ERROR, NO_INFO].freeze

Class Method Summary collapse

Class Method Details

.approved?(code) ⇒ Boolean

Returns:

  • (Boolean)


21
22
23
# File 'lib/bigid/bgcheck/result_code.rb', line 21

def self.approved?(code)
  code.to_i == APPROVED
end

.no_info?(code) ⇒ Boolean

Returns:

  • (Boolean)


25
26
27
# File 'lib/bigid/bgcheck/result_code.rb', line 25

def self.no_info?(code)
  code.to_i == NO_INFO
end

.valid?(code) ⇒ Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/bigid/bgcheck/result_code.rb', line 13

def self.valid?(code)
  VALUES.include?(code.to_i)
end

.valuesObject



17
18
19
# File 'lib/bigid/bgcheck/result_code.rb', line 17

def self.values
  VALUES
end