Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement support for company registration number #103

Closed
wants to merge 9 commits into from

Conversation

viktorvan
Copy link
Collaborator

This PR add support for company registration numbers.

TODO:

This uses the same approach as for SwedishPersonalIdentityNumber. Any
shared logic has been extracted to re-usable modules. And a new
discriminated union IdentityNumber that holds either a
SwedishPersonalIdentityNumber or a CoordinationNumber has been
introduced.

The relevant tests for CoordinationNumber has been copied from
SwedishPersonalIdentityNumber tests. To follow the same approach
the generators for the tests are using the test PersonalIdentity numbers from Skatteverket and are turning them into CoordinationNumbers by adding 60 to the Day, and recalculating the checksum.
Add C# extension methods for the IdentityNumber-type.
Update the C# and F# samples to use IdentityNumber and demonstrate uses of
SwedishPersonalIdentityNumber and SwedishCoordinationNumber.
Add some missing doc-comments.
Rename IdentityNumber -> IndividualIdentityNumber which is a better name
for the future when we will support company registration numbers as
well.
In the same spirit, remove the IdentityValues type that was tightly
coupled to the personal and coordination numbers. It is more generic to
use a tuple as input, which incidentally will make the F#- and C# apis
have the same signature.
@viktorvan
Copy link
Collaborator Author

Oh, this should have been a draft PR, but apparently you cannot change to a draft PR, only make it a draft when you create it.

@viktorvan viktorvan closed this Nov 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant