Class: Bakong::Khqr::MerchantCode::LanguagePreference

Inherits:
TagLengthString show all
Defined in:
lib/bakong/khqr/merchant_code/merchant_information_language_template.rb

Instance Attribute Summary

Attributes inherited from TagLengthString

#length, #tag, #value

Instance Method Summary collapse

Methods inherited from TagLengthString

#to_s

Constructor Details

#initialize(tag, value) ⇒ LanguagePreference

Returns a new instance of LanguagePreference.



50
51
52
53
54
55
56
# File 'lib/bakong/khqr/merchant_code/merchant_information_language_template.rb', line 50

def initialize(tag, value)
  if value.length > EMV[:INVALID_LENGTH][:LANGUAGE_PREFERENCE] || value == ""
    raise Error.from(ERROR_CODES[:LANGUAGE_PREFERENCE_LENGTH_INVALID])
  end

  super
end