public HubSpotObject.Companies.RootObject GetAllPaged(string portalId = "", string count = "", string offset = "") { var subPath = "companies/paged"; Dictionary <string, string> optionalParameters = new Dictionary <string, string>(); optionalParameters.Add("properties", "name&properties=address&properties=address2&properties=city&properties=state&properties=zip&properties=country&properties=phone&properties=fax&properties=lifecyclestage&properties=hs_lastmodifieddate"); if (!string.IsNullOrEmpty(portalId)) { optionalParameters.Add("portalId", portalId); } if (!string.IsNullOrEmpty(count)) { optionalParameters.Add("limit", count); } if (!string.IsNullOrEmpty(offset)) { optionalParameters.Add("offset", offset); } if (!optionalParameters.Any() || optionalParameters.Count == 0) { optionalParameters = null; } JObject jsonString = Call(subpath: subPath, optionalParams: optionalParameters, contentType: "application/json"); HubSpotObject.Companies.RootObject hubspotObject = JsonConvert.DeserializeObject <HubSpotObject.Companies.RootObject>(jsonString.ToString()); return(hubspotObject); }
public HubSpotObject.Companies.RootObject GetAllRecentlyCreated(string count = "", string offset = "") { var subPath = "companies/recent/created"; Dictionary <string, string> optionalParameters = new Dictionary <string, string>(); if (!string.IsNullOrEmpty(count)) { optionalParameters.Add("count", count); } if (!string.IsNullOrEmpty(offset)) { optionalParameters.Add("offset", offset); } if (!optionalParameters.Any() || optionalParameters.Count == 0) { optionalParameters = null; } JObject jsonString = Call(subpath: subPath, optionalParams: optionalParameters); HubSpotObject.Companies.RootObject hubspotObject = JsonConvert.DeserializeObject <HubSpotObject.Companies.RootObject>(jsonString.ToString()); return(hubspotObject); }