gotwilio
gotwilio copied to clipboard
update usage type in `UsageRecord` to match Twilio definition
Twilio returns usage
as a string, which can be parsed to an integer or decimal type depending on the usage_unit
. Using Twilio's Python client to fetch usage records, it was clear that the string value sometimes mapped to an int
and a double
in others for different corresponding usage_unit
values. It is safer to just return the string and let the caller convert it to the expected value.
Unfortunately this is a breaking change and I need to move to versioning before I can make breaking changes.