Closed kevinprince closed 8 years ago
@leggetter seems like a design choice? I take it the API returns the actual balance and the Dashboard returns a user friendly approximation?
This doesn't look like a CLI bug, but worth checking the API response.
Will do this on Tuesday📆
@leggetter don't think it's a bug in the API or the CLI really. As Nexmo charges in fractions of Euro cents it makes sense the balance is a fraction as well. The only problem really is that the API returns a more accurate value than the dashboard displays. The real question is: is this an issue. It might be worth documenting in the docs here or on the dashboard.
The dashboard is rounding off for the sake of UX, I think the CLI should show the accurate balance but this could confuse some users, However having a balance to fraction of a cent is useful if you are testing a single low price message and want to confirm the charge.
One solution would be to have the CLI round off the same way as dashboard but then show the 'raw' value with the --verbose
flag, thoughts?
Or have results flagged in some way so that it's clear why they're not the same as the dashboard?
maybe just get something like:
nexmo balance
21.27 EUR
nexmo -v balance
21.2682 EUR
Steps to reproduce
Called nexmo balance on cli
Expected behavior
cli balance should = dashboard balance
Actual behavior
cli balance is wrong
System configuration
N/A