Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for adding Email CCs to ticket creation & update requests #332

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions src/ZendeskApi.Client/Models/TicketEmailCc.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
using Newtonsoft.Json;

namespace ZendeskApi.Client.Models;

public class TicketEmailCc
{
[JsonProperty("user_email")]
public string UserEmail { get; set; }

[JsonProperty("user_id")]
public string UserId { get; set; }

[JsonProperty("user_name")]
public string Username { get; set; }

[JsonProperty("action")]
public TicketEmailCcAction Action { get; set; }
}
11 changes: 11 additions & 0 deletions src/ZendeskApi.Client/Models/TicketEmailCcAction.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
using System.Runtime.Serialization;

namespace ZendeskApi.Client.Models;

public enum TicketEmailCcAction
{
[EnumMember(Value = "put")]
Put,
[EnumMember(Value = "delete")]
Delete,
}
6 changes: 6 additions & 0 deletions src/ZendeskApi.Client/Requests/Ticket/TicketCreateRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,5 +97,11 @@ public TicketCreateRequest(TicketComment comment)

[JsonProperty("brand_id")]
public long? BrandId { get; set; }

/// <summary>
/// Email cc to send notifications to on ticket creations or updates, based on trigger settings. See <see href="https://developer.zendesk.com/documentation/ticketing/managing-tickets/creating-and-updating-tickets/#setting-email-ccs">Email Ccs</see>.
/// </summary>
[JsonProperty("email_ccs")]
public IList<TicketEmailCc> EmailCcs { get; set; }
}
}
6 changes: 6 additions & 0 deletions src/ZendeskApi.Client/Requests/Ticket/TicketUpdateRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -155,5 +155,11 @@ public TicketUpdateRequest(long id)
/// </summary>
[JsonProperty("ticket_form_id")]
public long? FormId { get; set; }

/// <summary>
/// Email cc to send notifications to on ticket creations or updates, based on trigger settings. See <see href="https://developer.zendesk.com/documentation/ticketing/managing-tickets/creating-and-updating-tickets/#setting-email-ccs">Email Ccs</see>.
/// </summary>
[JsonProperty("email_ccs")]
public IList<TicketEmailCc> EmailCcs { get; set; }
}
}