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

feat: vies lookup #2

Merged
merged 6 commits into from
May 3, 2024
Merged

feat: vies lookup #2

merged 6 commits into from
May 3, 2024

Conversation

Mollemoll
Copy link
Owner

@Mollemoll Mollemoll commented May 3, 2024

Why?

As a user I want to verify EU VAT numbers against the VIES database to see if they are legit.

What changed?

Added a Verifier trait with a default verify(TaxId) function that calls the custom make_request and parse_response functions. It returns a Verification or a VerificationError.

Verification has a performed_at timestamp and a VerificationStatus.

VerificationStatuses are:

  • Verified. Verifier has confirmed that the TaxId is legit
  • Unverified. Verifier couldn't confirm that the TaxId is legit
  • Unavailable. It was not possible to perform the verification.

Added VerificationErrors: HtmlError and ParsingError
Added request(blocking), roxmltree and chrono crates.

@Mollemoll Mollemoll self-assigned this May 3, 2024
@Mollemoll Mollemoll marked this pull request as ready for review May 3, 2024 18:03
@Mollemoll Mollemoll merged commit 8e3210a into main May 3, 2024
1 check passed
@Mollemoll Mollemoll deleted the vies-lookup branch May 3, 2024 18:04
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