-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Create a new package cnpj-dv to calculate check digits (dígitos verificadores) for CNPJ. Although the logic of calculating these numbers are already implemented inside cnpj-gen, these should be removed from that in the next major version in favor of this package.
- Create a class
CnpjCheckDigitsto lazyly calculate first and second checkdigits. The base CNPJ for the calculation should be passed to the constructor and validated accordingly:- CNPJ provided should have between 12 and 14 digits after sanitization. Throw error if not met.
- CNPJ should be provided as string, list of strings or list of integers.
- The package should support the new alphanumeric format for CNPJ (Create
cnpj-dv(check digits) #25). - All errors thrown by the package should be custom, prefixed with
CnpjCheckDigits*TypeErrorfor type errors andCnpjCheckDigits*Exceptionfor other exceptions.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
Type
Projects
Status
Ready