The OrganisationState should track the TaxRateCreatedForOrganisationEvent events and add to state.
Below is an example of a taxRateCreatedForOrganisationEvent:
{
"code": 1,
"name": "Zero VAT",
"organisationId": "066e0734-4ea2-480a-ac82-a5adb9e160fe",
"taxRateId": "3b32533f-a001-42e4-834b-a51f8d82fa4c"
}
I think we should look to persist code, name and taxRateId.
Each taxRateId is unique, and if we encounter the same rate, we should simply update to the latest value in the event.
The OrganisationState should track the TaxRateCreatedForOrganisationEvent events and add to state.
Below is an example of a taxRateCreatedForOrganisationEvent:
I think we should look to persist code, name and taxRateId.
Each taxRateId is unique, and if we encounter the same rate, we should simply update to the latest value in the event.