diff --git a/Source/StrongGrid.IntegrationTests/Tests/SenderAuthentication.cs b/Source/StrongGrid.IntegrationTests/Tests/SenderAuthentication.cs index e838ebbf..8ced0528 100644 --- a/Source/StrongGrid.IntegrationTests/Tests/SenderAuthentication.cs +++ b/Source/StrongGrid.IntegrationTests/Tests/SenderAuthentication.cs @@ -14,10 +14,10 @@ public async Task RunAsync(IBaseClient client, TextWriter log, CancellationToken await log.WriteLineAsync("\n***** SENDER AUTHENTICATION: DOMAINS *****\n").ConfigureAwait(false); var domains = await client.SenderAuthentication.GetAllDomainsAsync(50, 0, false, null, null, null, cancellationToken).ConfigureAwait(false); - await log.WriteLineAsync($"All AuthenticatedSender domains retrieved. There are {domains.Length} domains").ConfigureAwait(false); + await log.WriteLineAsync($"All AuthenticatedSender domains retrieved. There are {domains.Records.Length} domains").ConfigureAwait(false); var fictitiousDomain = "StrongGridIntegrationTesting.com"; - var cleanUpTasks = domains + var cleanUpTasks = domains.Records .Where(d => d.Domain == fictitiousDomain) .Select(async oldDomain => { diff --git a/Source/StrongGrid/Resources/ISenderAuthentication.cs b/Source/StrongGrid/Resources/ISenderAuthentication.cs index 17d3da25..28ef1a63 100644 --- a/Source/StrongGrid/Resources/ISenderAuthentication.cs +++ b/Source/StrongGrid/Resources/ISenderAuthentication.cs @@ -25,9 +25,9 @@ public interface ISenderAuthentication /// The user to impersonate. /// The cancellation token. /// - /// An array of . + /// The . /// - Task GetAllDomainsAsync(int limit = 50, int offset = 0, bool excludeSubusers = false, string username = null, string domain = null, string onBehalfOf = null, CancellationToken cancellationToken = default); + Task> GetAllDomainsAsync(int limit = 50, int offset = 0, bool excludeSubusers = false, string username = null, string domain = null, string onBehalfOf = null, CancellationToken cancellationToken = default); /// /// Get a specific authenticated domain. diff --git a/Source/StrongGrid/Resources/SenderAuthentication.cs b/Source/StrongGrid/Resources/SenderAuthentication.cs index 472e4d23..2425f6d5 100644 --- a/Source/StrongGrid/Resources/SenderAuthentication.cs +++ b/Source/StrongGrid/Resources/SenderAuthentication.cs @@ -41,9 +41,9 @@ internal SenderAuthentication(Pathoschild.Http.Client.IClient client) /// The user to impersonate. /// The cancellation token. /// - /// An array of . + /// The . /// - public Task GetAllDomainsAsync(int limit = 50, int offset = 0, bool excludeSubusers = false, string username = null, string domain = null, string onBehalfOf = null, CancellationToken cancellationToken = default) + public Task> GetAllDomainsAsync(int limit = 50, int offset = 0, bool excludeSubusers = false, string username = null, string domain = null, string onBehalfOf = null, CancellationToken cancellationToken = default) { return _client .GetAsync($"{_endpoint}/domains") @@ -54,7 +54,7 @@ public Task GetAllDomainsAsync(int limit = 50, int offset .WithArgument("username", username) .WithArgument("domain", domain) .WithCancellationToken(cancellationToken) - .AsObject(); + .AsPaginatedResponseWithLinks(); } ///