Package net.datafaker
Class CNPJ
java.lang.Object
net.datafaker.CNPJ
CNPJ: The Federal Government interest in simplifying its registration procedures on companies appears in the mid-90's,
but it was only in 1998, through the SRF Normative Instruction No. 27, that the CNPJ (short for Cadastro Nacional da
Pessoa JurÃdica in Portuguese, or 'National Registry of Legal Entities') was created, replacing the former system,
CGC (short for Cadastro Geral de Contribuintes in Portuguese, or 'General Taxpayers Registry').
At the end of 2003 it gained a new impulse by sharing and integrating registration data and fiscal information between States and the Union.
In 2009 the MEI (Microempreendedor Individual in Portuguese, or 'Individual Microentrepreneur') was created to supply market demand.
- Since:
- 1.1.0
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioninvalid()
Return invalid and formattedinvalid
(boolean formatted) Return invalid and (un)formattedinvalid
(boolean formatted, boolean multiBranch) Return invalid and (un)formatted.valid()
Return valid and formattedvalid
(boolean formatted) Return valid and formattedvalid
(boolean formatted, boolean multiBranch) Return valid and formatted.
-
Constructor Details
-
CNPJ
-
-
Method Details
-
valid
Return valid and formatted- Returns:
- a valid CNPJ
- See Also:
-
valid
Return valid and formatted- Parameters:
formatted
- a CNPJ (un)formatted- Returns:
- a valid CNPJ
- See Also:
-
valid
Return valid and formatted. Also, it generates a multi-branch CNPJ. CNPJ numbers follow this format:AA.AAA.AAA/BBBB-CC
Where A is the number of the company, B is the branch number and C are verification digits. If the parametermultiBranch
is false, B will always be 0001. Otherwise, this number will vary between 0001 and 9999 .- Parameters:
formatted
- a CNPJ (un)formattedmultiBranch
- CPNJ from a random company branch- Returns:
- a valid CNPJ
- See Also:
-
invalid
Return invalid and formatted- Returns:
- an invalid CNPJ
- See Also:
-
invalid
Return invalid and (un)formatted- Returns:
- an invalid CNPJ
- See Also:
-
invalid
Return invalid and (un)formatted. Also, it generates a multi-branch CNPJ. CNPJ numbers follow this format:AA.AAA.AAA/BBBB-CC
Where A is the number of the company, B is the branch number and C are verification digits. If the parametermultiBranch
is false, B will always be 0001. Otherwise, this number will vary between 0001 and 9999 .- Returns:
- an invalid CNPJ
- See Also:
-