diff --git a/src/ZendeskApi.Build/ZendeskApi.Commons.props b/src/ZendeskApi.Build/ZendeskApi.Commons.props index 3c42d06f..3b52fe62 100644 --- a/src/ZendeskApi.Build/ZendeskApi.Commons.props +++ b/src/ZendeskApi.Build/ZendeskApi.Commons.props @@ -23,7 +23,7 @@ 7 0 - 4 + 5 $(Major).$(Minor).$(Revision) diff --git a/src/ZendeskApi.Client/Models/Status/Included/Attributes.cs b/src/ZendeskApi.Client/Models/Status/Included/Attributes.cs new file mode 100644 index 00000000..abf2f032 --- /dev/null +++ b/src/ZendeskApi.Client/Models/Status/Included/Attributes.cs @@ -0,0 +1,37 @@ +using System; +using Newtonsoft.Json; + +namespace ZendeskApi.Client.Models.Status.Included; + +public class Attributes +{ + [JsonProperty("created_at")] + public DateTime? CreatedAt { get; set; } + + [JsonProperty("description")] + public string Description { get; set; } + + [JsonProperty("name")] + public string Name { get; set; } + + [JsonProperty("slug")] + public string Slug { get; set; } + + [JsonProperty("degradation")] + public bool? Degradation { get; set; } + + [JsonProperty("incident_id")] + public string IncidentId { get; set; } + + [JsonProperty("outage")] + public bool? Outage { get; set; } + + [JsonProperty("resolved_at")] + public DateTime? ResolvedAt { get; set; } + + [JsonProperty("service_id")] + public string ServiceId { get; set; } + + [JsonProperty("started_at")] + public DateTime? StartedAt { get; set; } +} \ No newline at end of file diff --git a/src/ZendeskApi.Client/Models/Status/Included/Included.cs b/src/ZendeskApi.Client/Models/Status/Included/Included.cs new file mode 100644 index 00000000..960edd2a --- /dev/null +++ b/src/ZendeskApi.Client/Models/Status/Included/Included.cs @@ -0,0 +1,18 @@ +using Newtonsoft.Json; + +namespace ZendeskApi.Client.Models.Status.Included; + +public class Included +{ + [JsonProperty("attributes")] + public Attributes Attributes { get; set; } + + [JsonProperty("id")] + public string Id { get; set; } + + [JsonProperty("type")] + public Type Type { get; set; } + + [JsonProperty("relationships")] + public Relationships Relationships { get; set; } +} \ No newline at end of file diff --git a/src/ZendeskApi.Client/Models/Status/Included/IncludedReference.cs b/src/ZendeskApi.Client/Models/Status/Included/IncludedReference.cs new file mode 100644 index 00000000..f7bec77f --- /dev/null +++ b/src/ZendeskApi.Client/Models/Status/Included/IncludedReference.cs @@ -0,0 +1,13 @@ +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; + +namespace ZendeskApi.Client.Models.Status.Included; + +public class IncludedReference +{ + [JsonProperty("id")] + public string Id { get; set; } + + [JsonProperty("type")] + public Type Type { get; set; } +} \ No newline at end of file diff --git a/src/ZendeskApi.Client/Models/Status/Included/Relationships.cs b/src/ZendeskApi.Client/Models/Status/Included/Relationships.cs new file mode 100644 index 00000000..a4a29e4d --- /dev/null +++ b/src/ZendeskApi.Client/Models/Status/Included/Relationships.cs @@ -0,0 +1,9 @@ +using Newtonsoft.Json; + +namespace ZendeskApi.Client.Models.Status.Included; + +public class Relationships +{ + [JsonProperty("service")] + public Service Service { get; set; } +} \ No newline at end of file diff --git a/src/ZendeskApi.Client/Models/Status/Included/Service.cs b/src/ZendeskApi.Client/Models/Status/Included/Service.cs new file mode 100644 index 00000000..086fdd1e --- /dev/null +++ b/src/ZendeskApi.Client/Models/Status/Included/Service.cs @@ -0,0 +1,5 @@ +namespace ZendeskApi.Client.Models.Status.Included; + +public class Service : DataContainer +{ +} \ No newline at end of file diff --git a/src/ZendeskApi.Client/Models/Status/Included/Type.cs b/src/ZendeskApi.Client/Models/Status/Included/Type.cs new file mode 100644 index 00000000..a3b46ab7 --- /dev/null +++ b/src/ZendeskApi.Client/Models/Status/Included/Type.cs @@ -0,0 +1,15 @@ +using System.Runtime.Serialization; + +namespace ZendeskApi.Client.Models.Status.Included; + +public enum Type +{ + [EnumMember(Value = "service")] + Service, + [EnumMember(Value = "incident_service")] + IncidentService, + [EnumMember(Value = "incident_update")] + IncidentUpdate, + [EnumMember(Value = "incident")] + Incident +} \ No newline at end of file diff --git a/src/ZendeskApi.Client/Models/Status/Response/ListIncidentsResponse.cs b/src/ZendeskApi.Client/Models/Status/Response/ListIncidentsResponse.cs index a58125b2..06329758 100644 --- a/src/ZendeskApi.Client/Models/Status/Response/ListIncidentsResponse.cs +++ b/src/ZendeskApi.Client/Models/Status/Response/ListIncidentsResponse.cs @@ -1,7 +1,10 @@ using System.Collections.Generic; +using Newtonsoft.Json; namespace ZendeskApi.Client.Models.Status.Response; public class ListIncidentsResponse : DataContainer> { + [JsonProperty("included")] + public IReadOnlyList Included { get; set; } } \ No newline at end of file diff --git a/src/ZendeskApi.Client/Requests/Ticket/TicketUpdateRequest.cs b/src/ZendeskApi.Client/Requests/Ticket/TicketUpdateRequest.cs index 97f5f955..73e4ce0d 100644 --- a/src/ZendeskApi.Client/Requests/Ticket/TicketUpdateRequest.cs +++ b/src/ZendeskApi.Client/Requests/Ticket/TicketUpdateRequest.cs @@ -149,5 +149,11 @@ public TicketUpdateRequest(long id) [JsonProperty("brand_id")] public long? BrandId { get; set; } + + /// + /// The id of the ticket form to use. Only applicable for enterprise accounts + /// + [JsonProperty("ticket_form_id")] + public long? FormId { get; set; } } } \ No newline at end of file