intercom / intercom-node

Node.js bindings for the Intercom API
https://developers.intercom.com
Other
362 stars 116 forks source link

Creating and Updating a Company - only companyId should be required #379

Open akherr opened 11 months ago

akherr commented 11 months ago

Version info

Expected behavior

Using the create and update methods for the Company model should only require companyId.

Actual behavior

All of the parameters in the create and update methods for the Company are required.

interface CreateCompanyData {
    createdAt: Timestamp;
    companyId: string;
    name: string;
    monthlySpend: number;
    plan: string;
    size: number;
    website: string;
    industry: string;
    customAttributes: JavascriptObject;
}
declare type UpdateCompanyData = CreateCompanyData;

This interface should reflect what is defined in the API docs, with having all but companyId optional.