Skip to content

Conversation

@Criko0
Copy link

@Criko0 Criko0 commented Nov 9, 2025

Hi!

According to the docs, there are certain values for CdrDimensionType that are only applicable if the ChargingPeriod belongs to a Session.

https://github.com/ocpi/ocpi/blob/release-2.2-bugfixes/mod_cdrs.asciidoc#143-cdrdimensiontype-enum
https://github.com/ocpi/ocpi/blob/release-2.2.1-bugfixes/mod_cdrs.asciidoc#143-cdrdimensiontype-enum

This change removes the CdrDimensionType's values not applicable to a CDR.
I've removed the import of the class ChargingPeriod inside Sessions and duplicated the object inside to allow me to have two different representations of CdrDimensionType.
I'm sure there is a cleaner way to do this but I'm not that proficient with zod.

Suggestions or changes are more than welcome.

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