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

Factur-X Version updated #10

Merged
merged 1 commit into from
Dec 4, 2024
Merged

Conversation

zealot128
Copy link
Contributor

  • Refac: also changed factur-x folder for future updates

Process for updating

Another refac idea:
Adding of a Version class that encapsulates the various validation file would be helpful? Maybe even use a version symbol, like to_xml(version: :factur_1) or to_xml(version: :zugferd1)? Could try to add it, if you also feel that would be an improvement.

- Refac: also changed factur-x folder for future updates

Process for updating

- download ZUGFeRD zip here https://www.ferd-net.de/standards/paket-downloads/index.html
- unzip, copy folder factur-x content into schemas
@halfbyte
Copy link
Owner

halfbyte commented Dec 4, 2024

Another refac idea:
Adding of a Version class that encapsulates the various validation file would be helpful? Maybe even use a version symbol, like to_xml(version: :factur_1) or to_xml(version: :zugferd1)? Could try to add it, if you also feel that would be an improvement.

To be honest, I think I'd be leaning more towards separate classes for the various formats to get rid of the if/else constructs entirely. Means a lot of duplication but I think it might be worth it for its explicitness and would make the builder constructs more readable. What do you think?

(Would also make it much easier to integrate things like XRechnung with potentially very different XML structures)

@halfbyte halfbyte merged commit 9b01938 into halfbyte:main Dec 4, 2024
4 checks passed
@halfbyte
Copy link
Owner

halfbyte commented Dec 4, 2024

@zealot128 Quick note for next time (I didn't catch it as well in your PR) - The filename of the ReusableAggregateBusinessInformationEntity is too long for gem build which is why I renamed the file (And then you have to change the file reference in the root xsd as well - See 45ba1cf)

Bit of a bummer but it is what it is - I would like to keep the schema in the gem to be able to use the validators.

@zealot128
Copy link
Contributor Author

zealot128 commented Dec 4, 2024 via email

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.

2 participants