Beispiel #1
0
        /// <summary>
        /// deletes a company from hubspot
        /// </summary>
        /// <typeparam name="T">type of company to delete</typeparam>
        /// <param name="id">company id</param>
        /// <returns>deleted company</returns>
        public async Task <T> Delete <T>(long id)
            where T : HubSpotCompany
        {
            JObject response = await rest.Delete($"companies/v2/companies/{id}");

            return(ToCompany <T>(response, registry.Get(typeof(T))));
        }
Beispiel #2
0
        /// <summary>
        /// deletes a deal from hubspot
        /// </summary>
        /// <typeparam name="T">type of deal to delete</typeparam>
        /// <param name="id">deal id</param>
        /// <returns>deleted deal</returns>
        public async Task <T> Delete <T>(long id)
            where T : HubSpotDeal
        {
            JObject response = await rest.Delete <JObject>($"deals/v1/deal/{id}");

            return(ToDeal <T>(response, registry.Get(typeof(T))));
        }
Beispiel #3
0
 /// <summary>
 /// deletes a contact
 /// </summary>
 /// <param name="id">id of contact</param>
 public async Task Delete(long id)
 {
     await rest.Delete <JObject>($"contacts/v1/contact/vid/{id}");
 }
 public Task <JObject> DeleteEngagement(long id)
 {
     return(rest.Delete <JObject>($"/engagements/v1/engagements/{id}"));
 }