Class: Bakong::Khqr::MerchantCode::UnionpayMerchantAccount

Inherits:
TagLengthString
  • Object
show all
Defined in:
lib/bakong/khqr/merchant_code/unionpay_merchant_account.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) ⇒ UnionpayMerchantAccount

Returns a new instance of UnionpayMerchantAccount.



12
13
14
15
16
17
18
# File 'lib/bakong/khqr/merchant_code/unionpay_merchant_account.rb', line 12

def initialize(tag, value)
  if value.to_s.length > EMV[:INVALID_LENGTH][:UPI_MERCHANT]
    raise Error.from(ERROR_CODES[:UPI_ACCOUNT_INFORMATION_LENGTH_INVALID])
  end

  super
end