carlqt/ezsplit

feat: Implement a `Price` type

Opened this issue · 0 comments

Description

Receipt and Item types both contains a price field which, currently, returns a string. This is not sufficient as currency is a complex object and needs more metadata to be represented properly.

This task includes brainstorming on where to store the currencies metadata to easily extend in the future

Acceptance Criteria

Create a new Price type that would contain the following fields:

  • code: String - The ISO 427 of the currency e.g. AUD, SGD, PHP etc...
  • displayPrice: String - The formatted currency e.g. AUD 44.44.
  • priceInCents: Int - The Int representation of price