TIN (U.S. Taxpayer Identification Number).
The Taxpayer Identification Number is used used for tax purposes in the United States. A TIN may be: * a Social Security Number (SSN) * an Individual Taxpayer Identification Number (ITIN) * an Employer Identification Number (EIN) * a Preparer Tax Identification Number (PTIN) * an Adoption Taxpayer Identification Number (ATIN)
>>> compact('123-45-6789')
'123456789'
>>> validate('123-45-6789')
'123456789'
>>> validate('07-3456789')
Traceback (most recent call last):
...
InvalidFormat: ...
>>> guess_type('536-90-4399')
['ssn', 'atin']
>>> guess_type('04-2103594')
['ein']
>>> guess_type('042103594')
['ssn', 'ein', 'atin']
>>> format('042103594')
'042-10-3594'
>>> format('123-456') # invalid numbers are not reformatted
'123-456'
Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.
Reformat the passed number to the standard format.
Return a list of possible TIN types for which this number is valid..
Checks to see if the number provided is a valid TIN. This searches for the proper sub-type and validates using that.
Checks to see if the number provided is a valid TIN. This searches for the proper sub-type and validates using that.