diff --git a/Source/StrongGrid.IntegrationTests/Tests/SpamReports.cs b/Source/StrongGrid.IntegrationTests/Tests/SpamReports.cs
index 7c6dfb22..3cbb277b 100644
--- a/Source/StrongGrid.IntegrationTests/Tests/SpamReports.cs
+++ b/Source/StrongGrid.IntegrationTests/Tests/SpamReports.cs
@@ -19,7 +19,7 @@ public async Task RunAsync(IBaseClient client, TextWriter log, CancellationToken
var endDate = new DateTime(thisYear, 12, 31, 23, 59, 59);
var spamReports = await client.SpamReports.GetAllAsync(startDate, endDate, 25, 0, null, cancellationToken).ConfigureAwait(false);
- await log.WriteLineAsync($"All spam reports retrieved. There are {spamReports.Length} reports in {lastYear} and {thisYear}").ConfigureAwait(false);
+ await log.WriteLineAsync($"All spam reports retrieved. There are {spamReports.Records.Length} reports in {lastYear} and {thisYear}").ConfigureAwait(false);
}
}
}
diff --git a/Source/StrongGrid/Resources/ISpamReports.cs b/Source/StrongGrid/Resources/ISpamReports.cs
index 9d2b11cd..7caa6295 100644
--- a/Source/StrongGrid/Resources/ISpamReports.cs
+++ b/Source/StrongGrid/Resources/ISpamReports.cs
@@ -1,4 +1,4 @@
-using StrongGrid.Models;
+using StrongGrid.Models;
using System;
using System.Collections.Generic;
using System.Threading;
@@ -35,9 +35,9 @@ public interface ISpamReports
/// The user to impersonate.
/// Cancellation token.
///
- /// An array of .
+ /// The .
///
- Task GetAllAsync(DateTime? startDate = null, DateTime? endDate = null, int limit = 25, int offset = 0, string onBehalfOf = null, CancellationToken cancellationToken = default);
+ Task> GetAllAsync(DateTime? startDate = null, DateTime? endDate = null, int limit = 25, int offset = 0, string onBehalfOf = null, CancellationToken cancellationToken = default);
///
/// Delete all spam reports.
diff --git a/Source/StrongGrid/Resources/SpamReports.cs b/Source/StrongGrid/Resources/SpamReports.cs
index f5853da0..83c884d0 100644
--- a/Source/StrongGrid/Resources/SpamReports.cs
+++ b/Source/StrongGrid/Resources/SpamReports.cs
@@ -60,9 +60,9 @@ public Task GetAsync(string emailAddress, string onBehalfOf = null
/// The user to impersonate.
/// Cancellation token.
///
- /// An array of .
+ /// The .
///
- public Task GetAllAsync(DateTime? startDate = null, DateTime? endDate = null, int limit = 25, int offset = 0, string onBehalfOf = null, CancellationToken cancellationToken = default)
+ public Task> GetAllAsync(DateTime? startDate = null, DateTime? endDate = null, int limit = 25, int offset = 0, string onBehalfOf = null, CancellationToken cancellationToken = default)
{
return _client
.GetAsync(_endpoint)
@@ -72,7 +72,7 @@ public Task GetAllAsync(DateTime? startDate = null, DateTime? endD
.WithArgument("limit", limit)
.WithArgument("offset", offset)
.WithCancellationToken(cancellationToken)
- .AsObject();
+ .AsPaginatedResponseWithLinks();
}
///