intercom-go icon indicating copy to clipboard operation
intercom-go copied to clipboard

Can not remove user from company

Open dlq84 opened this issue 6 years ago • 2 comments

Version info

  • intercom-go version: v2.0.0-20190319111853-1dbafb072bcd
  • Go version: 1.12.5

Expected behavior

When saving a user with one or more companies which has Remove set to true, I expect the user to be removed from that company as per API documentation:

To remove a company from a user add the field remove with a value of true to the embedded company object and submit the user as a update request. You must also submit the id of the company. https://developers.intercom.com/intercom-api-reference/reference#companies-and-users

Actual behavior

The SDK doesn't even send that attribute: https://github.com/intercom/intercom-go/blob/v2/company.go#L35

Steps to reproduce

  1. Try to save a user which has a company with Remove set to true
  2. See how nothing happens

dlq84 avatar Jun 18 '19 14:06 dlq84

I'd be happy to make a PR if needed.

dlq84 avatar Jun 18 '19 14:06 dlq84

Version info - 1.2

When i send the request for detach a user from company in intercom api send us ok 200 along with some data but when i actually saw it on intercom user still persists in company . Could you please help me on this

I am using API Call with PHP Laravel as backend

ranjeet94 avatar Mar 27 '24 05:03 ranjeet94