public HubSpotObject.CompanyContacts.RootObject GetContactIdsByCompany(string companyId) { var subPath = string.Format("companies/{0}/vids", companyId); JObject jsonString = Call(subpath: subPath, contentType: "application/json"); HubSpotObject.CompanyContacts.RootObject hubspotObject = JsonConvert.DeserializeObject <HubSpotObject.CompanyContacts.RootObject>(jsonString.ToString()); return(hubspotObject); }
public HubSpotObject.CompanyContacts.RootObject GetContactsOfCompany(string companyId, string count = "", string contactOffset = "") { var subPath = string.Format("companies/{0}/contacts", companyId); var optionalParams = new Dictionary <string, string>(); if (!string.IsNullOrEmpty(count) && count.Length > 0) { optionalParams["count"] = count; } if (!string.IsNullOrEmpty(contactOffset) && contactOffset.Length > 0) { optionalParams["vidOffset"] = contactOffset; } JObject jsonString = Call(subpath: subPath, optionalParams: optionalParams, contentType: "application/json"); HubSpotObject.CompanyContacts.RootObject hubspotObject = JsonConvert.DeserializeObject <HubSpotObject.CompanyContacts.RootObject>(jsonString.ToString()); return(hubspotObject); }