public List <ContactLookupRow> ContactLookup(int accountId, ContactLookupOptions options, out int count) { var request = TDClient.BuildRequest(Method.POST, CONTACT_LOOKUP, new { accountId }, options); var response = TDClient.InnerExecute(request); if (response.StatusCode == HttpStatusCode.NoContent) { count = 0; return(new List <ContactLookupRow>()); } var rval = response.Deserialize <List <ContactLookupRow> >(); var countHeader = response.Headers.FirstOrDefault(p => p.Name == "X-TrueDialog-Count"); count = countHeader != null?int.Parse(countHeader.Value.ToString()) : rval.Count; return(rval); }
public List <ContactLookupRow> ContactLookup(ContactLookupOptions options, out int count) { return(ContactLookup(CurrentAccount, options, out count)); }
public List <ContactLookupRow> ContactLookup(int accountId, ContactLookupOptions options, out int count) { /* TODO: review option to return enveloped response */ count = options.Take + 1; return(Api.Post <List <ContactLookupRow> >($"/account/{accountId}/contactLookup", options)); }