Package net.datafaker.providers.base
Class CNPJ
The Brazil National Registry of Legal Entities number (CNPJ) is a company identification number that must be obtained from the Department of Federal Revenue prior to the start of any business activities.
- Since:
- 1.1.0
- See Also:
-
Field Summary
Fields inherited from class net.datafaker.providers.base.AbstractProvider
faker
-
Constructor Summary
-
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:
-