Class: Ibancom::Resources::IBAN::Check
- Defined in:
- lib/ibancom/resources/iban/check.rb
Constant Summary collapse
- PASSED_MESSAGES =
{ "001" => "IBAN Check digit is correct", "002" => "Account Number check digit is correct", "003" => "IBAN Length is correct", "004" => "Account Number check digit is not performed for this bank or branch", "005" => "IBAN structure is correct", "006" => "IBAN does not contain illegal characters", "007" => "Country supports IBAN standard", }.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.
17 18 19 |
# File 'lib/ibancom/resources/iban/check.rb', line 17 def code @code end |
#message ⇒ Object
Returns the value of attribute message.
17 18 19 |
# File 'lib/ibancom/resources/iban/check.rb', line 17 def @message end |
#type ⇒ Object
Returns the value of attribute type.
17 18 19 |
# File 'lib/ibancom/resources/iban/check.rb', line 17 def type @type end |
Instance Method Details
#failed? ⇒ Boolean
25 26 27 |
# File 'lib/ibancom/resources/iban/check.rb', line 25 def failed? !passed? end |
#passed? ⇒ Boolean
21 22 23 |
# File 'lib/ibancom/resources/iban/check.rb', line 21 def passed? PASSED_MESSAGES[code] == end |