Comments (7)
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.
from intercom-java.
Alright @dehora . Just tried below code:
HashMap<String, String> map = new HashMap<String, String>();
map.put("name", "Blue Sun");
Company company2 = Company.find(map);
Map<String, String> params = new HashMap<String, String>();
params.put("email", "[email protected]");
User user = User.find(params);
user.addCompany(company2);
User.update(user);
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:
Exception in thread "main" io.intercom.api.ClientException: bad 'updated_at' parameter
at io.intercom.api.HttpClient.throwException(HttpClient.java:198)
at io.intercom.api.HttpClient.handleError(HttpClient.java:154)
at io.intercom.api.HttpClient.runRequest(HttpClient.java:147)
at io.intercom.api.HttpClient.post(HttpClient.java:93)
at io.intercom.api.DataResource.update(DataResource.java:24)
at io.intercom.api.User.update(User.java:61)
from intercom-java.
@luposlip thanks! I can replicate what you're seeing, working on a fix.
from intercom-java.
Appreciate it @dehora! :-)
from intercom-java.
@luposlip There's a 0.0.3 version in jcenter now if you want to try it out.
from intercom-java.
It works now, thanks for the speedy response! :)
from intercom-java.
Hi I have some issues.
I was trying to create companies through Postman and it didn't work, then with curl code it worked! I can retrieve companies by id and understand the list of companies displays only those with user. Now users I see are contacts. I was able to associate a contact to a company (difficult because doc has error, mark it as a POST) but still nothing in list companies.
You can try to reproduce this or just pass me some working Postman collection and I figure out why
from intercom-java.
Related Issues (20)
- Please add possibility to update OWNER_ID field in contact and user HOT 1
- NotFoundException user not found when creating a user HOT 1
- Document what version of the Intercom API this SDK supports HOT 3
- Unable to fetch Admin objects using list(Map<String, String> params) method HOT 2
- Why doesn't conversation object contain a statistics object?
- Multiple CVE's exists on the jackson version used by the intercom library. HOT 2
- Missing "external_id" in the `Contact` model HOT 3
- Restore Company.delete method HOT 2
- Bintray deprecation - move artifacts elsewhere HOT 2
- InvalidDefinitionException: Joda date/time type `org.joda.time.DateTime` not supported by default HOT 1
- Finding Contacts or Users Returns Deserialization Error HOT 4
- Support for version 2.3
- Contact.update() doesn't work HOT 2
- joda_zoneinfomap FATAL EXCEPTION HOT 1
- List for tags and contacts returns empty response (no data)
- Monthly spend value doesn't update when the value is set to zero
- Is this library dead? HOT 3
- Tagging API seems odd, or maybe needs more documentation HOT 2
- conversationId not returned from Conversation.Create
- Intercom-java SDK is not compatible with recent versions of Jackson HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from intercom-java.