Skip to content

client.companies.update does not update anything #483

Closed
intercom/Intercom-OpenAPI
#322

Description

@JulienZD

Affected versions: 6.0+

Problem

When I try to update a company using client.companies.update, nothing gets changed in Intercom.

As previously noted in #465, the typing only accepts a company_id. I figured this would just be an incorrect type definition, but it seems like the entire payload is just not being sent to the API.

Looking at the code for client.companies.update, the company_id is destructured from request, after which the request object isn't used further. Looking at other client implementations, most other update or createOrUpdate methods in the SDK seem to use (a part of) the request object as the body for the request.

I think the underlying issue is that the Intercom documentation itself is incorrect, since the "Update a company" doesn't list a request body at all. My assumption is that Fern uses this incorrect specification to create a broken SDK.

For reference, the "Update a contact" documentation does list a request body:


We decided to stay on v5.0.0 for the time being, since we can't know for certain that all endpoints are properly functioning/documented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions