Comments (6)
Thanks for that @LeoIannacone. There's a beta release, 1.3.0-b2, here https://bintray.com/intercom/intercom-maven/intercom-java/1.3.0-b2/view that has support for removing companies removeCompany(Company company)
on the User
if you want to give that a try.
from intercom-java.
Thanks for being so responsive.
I tried it, but seems nothing changed in the request. The debug log still show only this info for company in user:
...
companies: [{
"name" : "My Cmp",
"company_id" : "random ID"
}]
...
According with the doc, both the "id" and the "remove" field should be passed.
from intercom-java.
@LeoIannacone I'm only able to replicate non-removal so far if the user object is submitted to API with a company that is in the list twice, as both an add and remove. Can you put a gist together showing the sequence of calls you're making?
from intercom-java.
I'm exactly doing what you do:
- get the user via
User.find
- get the companies collection
- check the difference between that list and the one I have in my db
- remove companies if needed
- update user
from intercom-java.
I'm with the same problem here. Let's suppose I'm running the code below (Scala) for a company with only one user associated:
val user = User.find(Map("user_id" -> userId.toString).asJava)
val company = Company.find(Map("company_id" -> companyId.toString).asJava)
user.removeCompany(company)
User.update(user)
This code seems to work for the user, but if searched by the company again and and call the method getTotalCount it shows the user still associated and you'll be able to see the association in the app dashboard.
from intercom-java.
should be fixed with #124
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.