Class: Bakong::Khqr::MerchantCode::PointOfInitiationMethod
- Inherits:
-
TagLengthString
- Object
- TagLengthString
- Bakong::Khqr::MerchantCode::PointOfInitiationMethod
- Defined in:
- lib/bakong/khqr/merchant_code/point_of_initiation_method.rb
Instance Attribute Summary
Attributes inherited from TagLengthString
Instance Method Summary collapse
-
#initialize(tag, value) ⇒ PointOfInitiationMethod
constructor
A new instance of PointOfInitiationMethod.
Methods inherited from TagLengthString
Constructor Details
#initialize(tag, value) ⇒ PointOfInitiationMethod
Returns a new instance of PointOfInitiationMethod.
12 13 14 15 16 17 18 19 |
# File 'lib/bakong/khqr/merchant_code/point_of_initiation_method.rb', line 12 def initialize(tag, value) raise Error.from(ERROR_CODES[:POINT_INITIATION_LENGTH_INVALID]) if value.to_s.length > 2 unless [EMV[:STATIC_QR], EMV[:DYNAMIC_QR]].include?(value) raise Error.from(ERROR_CODES[:POINT_OF_INITIATION_METHOD_INVALID]) end super end |