intercom/intercom-java

Contact.update() doesn't work

aonurozcan opened this issue · 2 comments

Please use the following template to submit your issue. Following this template will allow us to quickly investigate and help you with your issue. Please be aware that issues which do not conform to this template may be closed.

For feature requests please contact us at team@intercom.io

Version info

  • intercom-java version: 2.8.2
  • Java version: 11

Expected behavior

Contact.update() should update the contact

Actual behavior

It gives error with the following message
A contact matching those details already exists with id=XXXXXXXXXX

Steps to reproduce

  1. Find a contact with Contact.find()
  2. Change some of it's fields
  3. Update contact with Contact.update()

Logs

this could be related to this long-pending fix
#287 (comment)

It looks to me that Contact.update() is using a POST request while the api expects a PUT for updates and POST for creations, hence error.