/// <summary> /// Update or create a set of contacts, this is the preferred method when creating/updating in bulk. /// Best performance is with a maximum of 250 contacts. /// </summary> /// <typeparam name="T">Implementation of ContactHubSpotModel</typeparam> /// <param name="contacts">The set of contacts to update/create</param> public void Batch <T>(List <T> contacts) where T : ContactHubSpotModel, new() { var path = $"{new T().RouteBasePath}/contact/batch"; _client.ExecuteBatch(path, contacts.Select(c => (object)c).ToList(), Method.POST); }
/// <summary> /// Update or create a set of contacts, this is the preferred method when creating/updating in bulk. /// Best performance is with a maximum of 250 contacts. /// </summary> /// <typeparam name="T">Implementation of ContactHubSpotModel</typeparam> /// <param name="contacts">The set of contacts to update/create</param> public void Batch(List <ContactHubSpotModel> contacts) => _client.ExecuteBatch(GetRoute <ContactHubSpotModel>("contact", "batch"), contacts.Select(c => (object)c).ToList(), Method.POST);