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