Nexmo / nexmo-cli

Nexmo CLI (Command Line Interface)
https://nexmo.com
MIT License
78 stars 52 forks source link

CLI balance does not reflect Dashboard balance #47

Closed kevinprince closed 8 years ago

kevinprince commented 8 years ago

Steps to reproduce

Called nexmo balance on cli

screen shot 2016-05-28 at 8 00 16 pm screen shot 2016-05-28 at 8 00 25 pm

Expected behavior

cli balance should = dashboard balance

Actual behavior

cli balance is wrong

System configuration

N/A

cbetta commented 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?

leggetter commented 8 years ago

This doesn't look like a CLI bug, but worth checking the API response.

Will do this on Tuesday📆

cbetta commented 8 years ago

@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.

sammachin commented 8 years ago

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?

leggetter commented 8 years ago

Or have results flagged in some way so that it's clear why they're not the same as the dashboard?

kevinprince commented 8 years ago

maybe just get something like:

nexmo balance
21.27 EUR 
nexmo -v balance 
21.2682 EUR