Class: Bakong::Khqr::MerchantCode::AcquiringBank

Inherits:
TagLengthString show all
Defined in:
lib/bakong/khqr/merchant_code/global_unique_identifier.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) ⇒ AcquiringBank

Returns a new instance of AcquiringBank.



101
102
103
104
105
106
107
108
# File 'lib/bakong/khqr/merchant_code/global_unique_identifier.rb', line 101

def initialize(tag, value)
  raise Error.from(ERROR_CODES[:ACQUIRING_BANK_REQUIRED]) if value.nil? || value == ""
  if value.length > EMV[:INVALID_LENGTH][:ACQUIRING_BANK]
    raise Error.from(ERROR_CODES[:ACQUIRING_BANK_LENGTH_INVALID])
  end

  super
end