Class: Bakong::Khqr::MerchantCode::PayloadFormatIndicator
- Inherits:
-
TagLengthString
- Object
- TagLengthString
- Bakong::Khqr::MerchantCode::PayloadFormatIndicator
- Defined in:
- lib/bakong/khqr/merchant_code/payload_format_indicator.rb
Instance Attribute Summary
Attributes inherited from TagLengthString
Instance Method Summary collapse
-
#initialize(tag, value) ⇒ PayloadFormatIndicator
constructor
A new instance of PayloadFormatIndicator.
Methods inherited from TagLengthString
Constructor Details
#initialize(tag, value) ⇒ PayloadFormatIndicator
Returns a new instance of PayloadFormatIndicator.
11 12 13 14 15 16 |
# File 'lib/bakong/khqr/merchant_code/payload_format_indicator.rb', line 11 def initialize(tag, value) raise Error.from(ERROR_CODES[:PAYLOAD_FORMAT_INDICATOR_TAG_REQUIRED]) if value.nil? || value == "" raise Error.from(ERROR_CODES[:PAYLOAD_FORMAT_INDICATOR_LENGTH_INVALID]) if value.length > 2 super end |