intercom / intercom-go

Go Bindings For Intercom
https://developers.intercom.io/reference
Other
70 stars 78 forks source link

FindByCompanyID: json: cannot unmarshal number -62169984561 into Go value of type int32 #19

Closed bfontaine closed 8 years ago

bfontaine commented 8 years ago

Hello,

When I request the company using the API the JSON field remote_created_at is negative:

{
  "type": "company",
  "remote_created_at": -62169984561
}

(I removed the other fields)

This causes ic.Companies.FindByCompanyID to fail with the following message: json: cannot unmarshal number -62169984561 into Go value of type int32.

josler commented 8 years ago

Fixed this in a general case in v2 as it stands, thanks.