Class: Valvat::Checksum::AT

Inherits:
Base
  • Object
show all
Defined in:
lib/valvat/checksum/at.rb

Instance Attribute Summary

Attributes inherited from Base

#vat

Instance Method Summary collapse

Methods inherited from Base

check_digit_length, #initialize, #validate

Constructor Details

This class inherits a constructor from Valvat::Checksum::Base

Instance Method Details

#check_digitObject



6
7
8
9
# File 'lib/valvat/checksum/at.rb', line 6

def check_digit
  chk = 96 - sum_of_figures_for_at_es_it_se
  chk.to_s[-1].to_i
end

#str_wo_countryObject



11
12
13
# File 'lib/valvat/checksum/at.rb', line 11

def str_wo_country
  super[1..]
end