diff --git a/src/ZendeskApi_v2/Requests/Tickets.cs b/src/ZendeskApi_v2/Requests/Tickets.cs index e9b13914..adaff8de 100644 --- a/src/ZendeskApi_v2/Requests/Tickets.cs +++ b/src/ZendeskApi_v2/Requests/Tickets.cs @@ -141,7 +141,7 @@ public interface ITickets : ICore bool DeleteManySuspendedTickets(IEnumerable ids); - GroupTicketMetricResponse GetAllTicketMetrics(); + GroupTicketMetricResponse GetAllTicketMetrics(int? perPage = null, int? page = null, TicketSideLoadOptionsEnum sideLoadOptions = TicketSideLoadOptionsEnum.None); IndividualTicketMetricResponse GetTicketMetricsForTicket(long ticket_id); @@ -262,7 +262,7 @@ public interface ITickets : ICore Task DeleteTicketFormAsync(long id); - Task GetAllTicketMetricsAsync(); + Task GetAllTicketMetricsAsync(int? perPage = null, int? page = null, TicketSideLoadOptionsEnum sideLoadOptions = TicketSideLoadOptionsEnum.None); Task GetTicketMetricsForTicketAsync(long ticket_id); @@ -681,9 +681,10 @@ public bool DeleteManySuspendedTickets(IEnumerable ids) #region TicketMetrics - public GroupTicketMetricResponse GetAllTicketMetrics() + public GroupTicketMetricResponse GetAllTicketMetrics(int? perPage = null, int? page = null, TicketSideLoadOptionsEnum sideLoadOptions = TicketSideLoadOptionsEnum.None) { - return GenericGet($"{_ticket_metrics}.json"); + var resource = GetResourceStringWithSideLoadOptionsParam($"{_ticket_metrics}.json", sideLoadOptions); + return GenericPagedGet(resource, perPage, page); } public IndividualTicketMetricResponse GetTicketMetricsForTicket(long ticket_id) @@ -1053,9 +1054,10 @@ public async Task MergeTicketsAsync(long targetTicketId, IEnu #region TicketMetrics - public Task GetAllTicketMetricsAsync() + public async Task GetAllTicketMetricsAsync(int? perPage = null, int? page = null, TicketSideLoadOptionsEnum sideLoadOptions = TicketSideLoadOptionsEnum.None) { - return GenericGetAsync($"{_ticket_metrics}.json"); + var resource = GetResourceStringWithSideLoadOptionsParam($"{_ticket_metrics}.json", sideLoadOptions); + return await GenericPagedGetAsync(resource, perPage, page); } public Task GetTicketMetricsForTicketAsync(long ticket_id)