Skip to content

update usage type in UsageRecord to match Twilio definition#105

Open
sshapir wants to merge 1 commit intosfreiberg:masterfrom
sshapir:usage-type
Open

update usage type in UsageRecord to match Twilio definition#105
sshapir wants to merge 1 commit intosfreiberg:masterfrom
sshapir:usage-type

Conversation

@sshapir
Copy link
Contributor

@sshapir sshapir commented Jan 18, 2022

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.

@sfreiberg
Copy link
Owner

Unfortunately this is a breaking change and I need to move to versioning before I can make breaking changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants