Class: Ibancom::Resources::SCAN::Check
- Defined in:
- lib/ibancom/resources/scan/check.rb
Constant Summary collapse
- PASSED_MESSAGES =
{ "001" => "Modulus Success: Check digit is valid", "002" => "Sort Code found in bank directory", "006" => "Sort Code does not contain illegal characters", "007" => "Account Number does not contain illegal characters", "008" => "Sort Code length is correct", "009" => "Account Number length is correct", }.freeze
Instance Attribute Summary collapse
-
#code ⇒ Object
Returns the value of attribute code.
-
#message ⇒ Object
Returns the value of attribute message.
-
#type ⇒ Object
Returns the value of attribute type.
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from Ibancom::Resources::Base
Instance Attribute Details
#code ⇒ Object
Returns the value of attribute code.
16 17 18 |
# File 'lib/ibancom/resources/scan/check.rb', line 16 def code @code end |
#message ⇒ Object
Returns the value of attribute message.
16 17 18 |
# File 'lib/ibancom/resources/scan/check.rb', line 16 def @message end |
#type ⇒ Object
Returns the value of attribute type.
16 17 18 |
# File 'lib/ibancom/resources/scan/check.rb', line 16 def type @type end |
Instance Method Details
#failed? ⇒ Boolean
24 25 26 |
# File 'lib/ibancom/resources/scan/check.rb', line 24 def failed? !passed? end |
#passed? ⇒ Boolean
20 21 22 |
# File 'lib/ibancom/resources/scan/check.rb', line 20 def passed? PASSED_MESSAGES[code] == end |