Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Company monthly_spend is an int instead of decimal #117

Closed
xdansmith opened this issue Apr 27, 2018 · 5 comments
Closed

Company monthly_spend is an int instead of decimal #117

xdansmith opened this issue Apr 27, 2018 · 5 comments

Comments

@xdansmith
Copy link

Can monthly_spend be changed back to a decimal so accurate monthly fees can be stored, like 1.95?

@DotJoshJohnson
Copy link
Contributor

The Intercom API only supports integer values in monthly_spend.

@xdansmith
Copy link
Author

What is the correct way to map an amount with cents like 1.95 in that case, or is it not possible?

@DotJoshJohnson
Copy link
Contributor

As far as I know, that would have to be stored in a custom attribute:

decimal monthlyFees = 1.95;
company.custom_attributes["monthly_fees"] = monthlyFees;

In the Intercom app, you can then leverage that attribute in pretty much the same way in terms of filtering, qualification, etc.

@kmossco
Copy link
Contributor

kmossco commented May 10, 2018

Hey @xdansmith, thank you for bringing this up. Not quite sure which is the expected behaviour and this week I am away from any work on the API, but early next week I'll do some testing and ensure we match the type that the API accepts from curl for full feature parity. 👍

@kmossco
Copy link
Contributor

kmossco commented Jun 15, 2018

I checked with the team and it seems that we accept Floats:

image

However they will be truncated. I made this change already, would it be possible to get a review? #129

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

No branches or pull requests

3 participants