-
Notifications
You must be signed in to change notification settings - Fork 68
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
Create Company doesn't work #7
Comments
Hi @luposlip,I think you're seeing this because of a particular behavior in Intercom which is reflected in the API - when the company has no users the company doesn't appear in API data or the product. It's mentioned http://doc.intercom.io/api/#list-companies (Note that the API does not include companies who have no associated users in list responses.) but that's easy to miss. I'm hoping this will get addressed but it'll be a change in Intercom rather than a client library change. If you see this with a company that has users (eg a company that's visible in the product), please let me know. |
Alright @dehora . Just tried below code:
Both company2 and user seems fine in the debugger, so data seem to be read correctly from the API. But The last line of code - User.update(user) - throws the following:
|
@luposlip thanks! I can replicate what you're seeing, working on a fix. |
Appreciate it @dehora! :-) |
@luposlip There's a 0.0.3 version in jcenter now if you want to try it out. |
It works now, thanks for the speedy response! :) |
Hi I have some issues. You can try to reproduce this or just pass me some working Postman collection and I figure out why |
I call the API using these lines:
Company company = new Company();
company.setName("Blue Sun");
company.setCompanyID("1");
company.setPlan(new Company.Plan("premium"));
company.addCustomAttribute(CustomAttribute.newIntegerAttribute("foddstuff-items", 246));
company.addCustomAttribute(CustomAttribute.newStringAttribute("bestseller", "fruity oaty bar"));
Company.create(company);
I get the company back with this:
HashMap<String, String> map = new HashMap<String, String>();
map.put("name", "Blue Sun");
Company company2 = Company.find(map);
And it seems fine. But no company is created in my intercom account.
And no exception is thrown.
Please advice?
The text was updated successfully, but these errors were encountered: