djaodjin / djaodjin-saas

Django application for software-as-service and subscription businesses
Other
564 stars 124 forks source link

returns 3-letter unit code in metrics APIs #123

Closed smirolo closed 5 years ago

smirolo commented 6 years ago

In balance API and revenue API, the unit is hardcoded to '$'.

  1. The unit should be the 3-letter unit code (ex: usd)
  2. The unit should be derived from the Transaction aggregated.
knivets commented 6 years ago

Should I modify monthly_balances to return unit code besides amount and period?

smirolo commented 6 years ago

Yes. It seems like the obvious choice. sum_dest_amount and sum_orig_amount already have a similar prototype.