diff --git a/Source/StrongGrid.IntegrationTests/Tests/InvalidEmails.cs b/Source/StrongGrid.IntegrationTests/Tests/InvalidEmails.cs
index b59eb156..30bd6b15 100644
--- a/Source/StrongGrid.IntegrationTests/Tests/InvalidEmails.cs
+++ b/Source/StrongGrid.IntegrationTests/Tests/InvalidEmails.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 invalidEmails = await client.InvalidEmails.GetAllAsync(startDate, endDate, 25, 0, null, cancellationToken).ConfigureAwait(false);
- await log.WriteLineAsync($"All invalid emails retrieved. There are {invalidEmails.Length} invalid email addresses in {lastYear} and {thisYear}").ConfigureAwait(false);
+ await log.WriteLineAsync($"All invalid emails retrieved. There are {invalidEmails.Records.Length} invalid email addresses in {lastYear} and {thisYear}").ConfigureAwait(false);
}
}
}
diff --git a/Source/StrongGrid/Resources/IInvalidEmails.cs b/Source/StrongGrid/Resources/IInvalidEmails.cs
index ab370150..31735639 100644
--- a/Source/StrongGrid/Resources/IInvalidEmails.cs
+++ b/Source/StrongGrid/Resources/IInvalidEmails.cs
@@ -1,4 +1,4 @@
-using StrongGrid.Models;
+using StrongGrid.Models;
using System;
using System.Collections.Generic;
using System.Threading;
@@ -24,9 +24,9 @@ public interface IInvalidEmails
/// 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);
///
/// Retrieve invalid emails for a given email address.
diff --git a/Source/StrongGrid/Resources/InvalidEmails.cs b/Source/StrongGrid/Resources/InvalidEmails.cs
index 193c4d0f..d30c0be9 100644
--- a/Source/StrongGrid/Resources/InvalidEmails.cs
+++ b/Source/StrongGrid/Resources/InvalidEmails.cs
@@ -39,9 +39,9 @@ internal InvalidEmails(Pathoschild.Http.Client.IClient client)
/// 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)
@@ -51,7 +51,7 @@ public Task GetAllAsync(DateTime? startDate = null, DateTime? en
.WithArgument("limit", limit)
.WithArgument("offset", offset)
.WithCancellationToken(cancellationToken)
- .AsObject();
+ .AsPaginatedResponseWithLinks();
}
///