/// <summary> /// Updates an email template. /// </summary> /// <param name="templateName">The name of the email template to update.</param> /// <param name="request">The <see cref="EmailTemplatePatchRequest"/> containing details of the template to patch.</param> /// <returns>The newly updated <see cref="EmailTemplate"/>.</returns> public Task <EmailTemplate> PatchAsync(EmailTemplateName templateName, EmailTemplatePatchRequest request) { return(Connection.SendAsync <EmailTemplate>(new HttpMethod("PATCH"), BuildUri($"email-templates/{templateName.ToEnumString()}"), request, DefaultHeaders)); }
/// <summary> /// Updates an email template. /// </summary> /// <param name="templateName">The name of the email template to patch.</param> /// <param name="request">The <see cref="EmailTemplateUpdateRequest"/> containing details of the template to update.</param> /// <returns>The newly updated <see cref="EmailTemplate"/>.</returns> public Task <EmailTemplate> UpdateAsync(EmailTemplateName templateName, EmailTemplateUpdateRequest request) { return(Connection.SendAsync <EmailTemplate>(HttpMethod.Put, BuildUri($"email-templates/{templateName.ToEnumString()}"), request, DefaultHeaders)); }
/// <summary> /// Gets an email template. /// </summary> /// <param name="templateName">The name of email template you wish to retrieve.</param> /// <returns>The <see cref="EmailTemplate"/> that was requested.</returns> public Task <EmailTemplate> GetAsync(EmailTemplateName templateName) { return(Connection.GetAsync <EmailTemplate>(BuildUri($"email-templates/{templateName.ToEnumString()}"), DefaultHeaders)); }