From 8191c7251a9168c701a8af8deaec22de4ab16452 Mon Sep 17 00:00:00 2001 From: Balaji Jambulingam Date: Tue, 24 Dec 2024 13:13:54 +0000 Subject: [PATCH] PR Comments addressed --- .../WhenGettingCandidatesByActivity.cs | 18 +++++++++--------- .../Controllers/CandidatesController.cs | 14 +++++++------- ...WhenHandlingGetCandidatesByActivityQuery.cs | 14 +++++++------- ...BuildingGetInactiveCandidatesApiRequest.cs} | 6 +++--- .../Candidates/UpdateCandidateStatusCommand.cs | 4 ++-- .../GetCandidateByActivityQuery.cs | 9 --------- .../GetInactiveCandidatesQuery.cs | 9 +++++++++ .../GetInactiveCandidatesQueryHandler.cs} | 18 +++++++++--------- .../GetInactiveCandidatesQueryResult.cs} | 12 ++++++------ .../GetCandidatesByActivityApiRequest.cs | 9 --------- .../GetInactiveCandidatesApiRequest.cs | 9 +++++++++ ....cs => GetInactiveCandidatesApiResponse.cs} | 2 +- 12 files changed, 62 insertions(+), 62 deletions(-) rename src/FindApprenticeshipJobs/SFA.DAS.FindApprenticeshipJobs.UnitTests/InnerApi/{WhenBuildingGetCandidatesByActivityApiRequest.cs => WhenBuildingGetInactiveCandidatesApiRequest.cs} (53%) delete mode 100644 src/FindApprenticeshipJobs/SFA.DAS.FindApprenticeshipJobs/Application/Queries/SavedSearch/GetCandidatesByActivity/GetCandidateByActivityQuery.cs create mode 100644 src/FindApprenticeshipJobs/SFA.DAS.FindApprenticeshipJobs/Application/Queries/SavedSearch/GetInactiveCandidates/GetInactiveCandidatesQuery.cs rename src/FindApprenticeshipJobs/SFA.DAS.FindApprenticeshipJobs/Application/Queries/SavedSearch/{GetCandidatesByActivity/GetCandidateByActivityQueryHandler.cs => GetInactiveCandidates/GetInactiveCandidatesQueryHandler.cs} (68%) rename src/FindApprenticeshipJobs/SFA.DAS.FindApprenticeshipJobs/Application/Queries/SavedSearch/{GetCandidatesByActivity/GetCandidateByActivityQueryResult.cs => GetInactiveCandidates/GetInactiveCandidatesQueryResult.cs} (87%) delete mode 100644 src/FindApprenticeshipJobs/SFA.DAS.FindApprenticeshipJobs/InnerApi/Requests/GetCandidatesByActivityApiRequest.cs create mode 100644 src/FindApprenticeshipJobs/SFA.DAS.FindApprenticeshipJobs/InnerApi/Requests/GetInactiveCandidatesApiRequest.cs rename src/FindApprenticeshipJobs/SFA.DAS.FindApprenticeshipJobs/InnerApi/Responses/{GetCandidatesByActivityApiResponse.cs => GetInactiveCandidatesApiResponse.cs} (98%) diff --git a/src/FindApprenticeshipJobs/SFA.DAS.FindApprenticeshipJobs.Api.UnitTests/Controllers/WhenGettingCandidatesByActivity.cs b/src/FindApprenticeshipJobs/SFA.DAS.FindApprenticeshipJobs.Api.UnitTests/Controllers/WhenGettingCandidatesByActivity.cs index dc2c84767..44c3e4a6e 100644 --- a/src/FindApprenticeshipJobs/SFA.DAS.FindApprenticeshipJobs.Api.UnitTests/Controllers/WhenGettingCandidatesByActivity.cs +++ b/src/FindApprenticeshipJobs/SFA.DAS.FindApprenticeshipJobs.Api.UnitTests/Controllers/WhenGettingCandidatesByActivity.cs @@ -6,9 +6,9 @@ using Moq; using NUnit.Framework; using SFA.DAS.FindApprenticeshipJobs.Api.Controllers; -using SFA.DAS.FindApprenticeshipJobs.Application.Queries.SavedSearch.GetCandidatesByActivity; using SFA.DAS.Testing.AutoFixture; using System.Net; +using SFA.DAS.FindApprenticeshipJobs.Application.Queries.SavedSearch.GetInactiveCandidates; namespace SFA.DAS.FindApprenticeshipJobs.Api.UnitTests.Controllers { @@ -20,19 +20,19 @@ public async Task Then_Candidates_Returned_From_Mediator( int pageNumber, int pageSize, DateTime cutOffDateTime, - GetCandidateByActivityQueryResult mockQueryResult, + GetInactiveCandidatesQueryResult mockQueryResult, [Frozen] Mock mockMediator, [Greedy] CandidatesController sut) { - mockMediator.Setup(x => x.Send(It.IsAny(), It.IsAny())).ReturnsAsync(mockQueryResult); + mockMediator.Setup(x => x.Send(It.IsAny(), It.IsAny())).ReturnsAsync(mockQueryResult); - var actual = await sut.GetCandidatesByActivity(cutOffDateTime, pageNumber, pageSize, It.IsAny()) as ObjectResult; - var actualValue = actual!.Value as GetCandidateByActivityQueryResult; + var actual = await sut.GetInactiveCandidates(cutOffDateTime, pageNumber, pageSize, It.IsAny()) as ObjectResult; + var actualValue = actual!.Value as GetInactiveCandidatesQueryResult; using (new AssertionScope()) { actual.StatusCode.Should().Be((int)HttpStatusCode.OK); - actual.Value.Should().BeOfType(); + actual.Value.Should().BeOfType(); actualValue!.Candidates.Should().BeEquivalentTo(mockQueryResult.Candidates); } } @@ -42,13 +42,13 @@ public async Task And_Exception_Returned_Then_Returns_Internal_Server_Error( int pageNumber, int pageSize, DateTime cutOffDateTime, - GetCandidateByActivityQueryResult mockQueryResult, + GetInactiveCandidatesQueryResult mockQueryResult, [Frozen] Mock mockMediator, [Greedy] CandidatesController sut) { - mockMediator.Setup(x => x.Send(It.IsAny(), It.IsAny())).ThrowsAsync(new InvalidOperationException()); + mockMediator.Setup(x => x.Send(It.IsAny(), It.IsAny())).ThrowsAsync(new InvalidOperationException()); - var actual = await sut.GetCandidatesByActivity(cutOffDateTime, pageNumber, pageSize, It.IsAny()) as StatusCodeResult; + var actual = await sut.GetInactiveCandidates(cutOffDateTime, pageNumber, pageSize, It.IsAny()) as StatusCodeResult; actual!.StatusCode.Should().Be((int)HttpStatusCode.InternalServerError); } diff --git a/src/FindApprenticeshipJobs/SFA.DAS.FindApprenticeshipJobs.Api/Controllers/CandidatesController.cs b/src/FindApprenticeshipJobs/SFA.DAS.FindApprenticeshipJobs.Api/Controllers/CandidatesController.cs index bb74721ad..14155df49 100644 --- a/src/FindApprenticeshipJobs/SFA.DAS.FindApprenticeshipJobs.Api/Controllers/CandidatesController.cs +++ b/src/FindApprenticeshipJobs/SFA.DAS.FindApprenticeshipJobs.Api/Controllers/CandidatesController.cs @@ -1,10 +1,10 @@ using MediatR; using Microsoft.AspNetCore.Mvc; -using SFA.DAS.FindApprenticeshipJobs.Application.Queries.SavedSearch.GetCandidatesByActivity; using System.Net; using SFA.DAS.FindApprenticeshipJobs.Application.Commands.Candidates; using SFA.DAS.FindApprenticeshipJobs.Domain.Models; using SFA.DAS.FindApprenticeshipJobs.Api.Models; +using SFA.DAS.FindApprenticeshipJobs.Application.Queries.SavedSearch.GetInactiveCandidates; namespace SFA.DAS.FindApprenticeshipJobs.Api.Controllers { @@ -15,10 +15,10 @@ public class CandidatesController( ILogger logger) : ControllerBase { [HttpGet] - [Route("GetCandidatesByActivity")] + [Route("GetInactiveCandidates")] [ProducesResponseType((int)HttpStatusCode.OK)] [ProducesResponseType((int)HttpStatusCode.InternalServerError)] - public async Task GetCandidatesByActivity( + public async Task GetInactiveCandidates( [FromQuery] DateTime cutOffDateTime, [FromQuery] int pageNumber = 1, [FromQuery] int pageSize = 10, @@ -28,13 +28,13 @@ public async Task GetCandidatesByActivity( try { - var result = await mediator.Send(new GetCandidateByActivityQuery(cutOffDateTime, pageNumber, pageSize), + var result = await mediator.Send(new GetInactiveCandidatesQuery(cutOffDateTime, pageNumber, pageSize), cancellationToken); return Ok(result); } catch (Exception ex) { - logger.LogError(ex, "Error invoking Get Candidates By Activity"); + logger.LogError(ex, "Error invoking Get Inactive Candidates"); return new StatusCodeResult((int)HttpStatusCode.InternalServerError); } } @@ -43,7 +43,7 @@ public async Task GetCandidatesByActivity( [Route("{govIdentifier}/status")] public async Task UpdateStatus( [FromRoute] string govIdentifier, - [FromBody] CandidateUpdateStatusRequest request) + [FromBody] CandidateUpdateStatusRequest request, CancellationToken cancellationToken = default) { try { @@ -52,7 +52,7 @@ await mediator.Send(new UpdateCandidateStatusCommand GovUkIdentifier = govIdentifier, Email = request.Email, Status = request.Status - }); + }, cancellationToken); return NoContent(); } diff --git a/src/FindApprenticeshipJobs/SFA.DAS.FindApprenticeshipJobs.UnitTests/Candidates/WhenHandlingGetCandidatesByActivityQuery.cs b/src/FindApprenticeshipJobs/SFA.DAS.FindApprenticeshipJobs.UnitTests/Candidates/WhenHandlingGetCandidatesByActivityQuery.cs index 55a7cb58b..9f5b18d1a 100644 --- a/src/FindApprenticeshipJobs/SFA.DAS.FindApprenticeshipJobs.UnitTests/Candidates/WhenHandlingGetCandidatesByActivityQuery.cs +++ b/src/FindApprenticeshipJobs/SFA.DAS.FindApprenticeshipJobs.UnitTests/Candidates/WhenHandlingGetCandidatesByActivityQuery.cs @@ -2,7 +2,7 @@ using FluentAssertions; using Moq; using NUnit.Framework; -using SFA.DAS.FindApprenticeshipJobs.Application.Queries.SavedSearch.GetCandidatesByActivity; +using SFA.DAS.FindApprenticeshipJobs.Application.Queries.SavedSearch.GetInactiveCandidates; using SFA.DAS.FindApprenticeshipJobs.InnerApi.Requests; using SFA.DAS.FindApprenticeshipJobs.InnerApi.Responses; using SFA.DAS.SharedOuterApi.Configuration; @@ -17,17 +17,17 @@ public class WhenHandlingGetCandidatesByActivityQuery [Test] [MoqAutoData] public async Task Then_The_Candidates_Are_Returned( - GetCandidateByActivityQuery query, - GetCandidatesByActivityApiResponse mockCandidatesByActivityApiResponse, + GetInactiveCandidatesQuery query, + GetInactiveCandidatesApiResponse mockCandidatesByActivityApiResponse, [Frozen] Mock> mockCandidateApiClient, - GetCandidateByActivityQueryHandler handler) + GetInactiveCandidatesQueryHandler handler) { var expectedGetCandidatesByActivityApiRequest = - new GetCandidatesByActivityApiRequest(query.CutOffDateTime.ToString("O"), query.PageNumber, query.PageSize); + new GetInactiveCandidatesApiRequest(query.CutOffDateTime.ToString("O"), query.PageNumber, query.PageSize); mockCandidateApiClient - .Setup(client => client.Get( - It.Is(c => + .Setup(client => client.Get( + It.Is(c => c.GetUrl == expectedGetCandidatesByActivityApiRequest.GetUrl))) .ReturnsAsync(mockCandidatesByActivityApiResponse); diff --git a/src/FindApprenticeshipJobs/SFA.DAS.FindApprenticeshipJobs.UnitTests/InnerApi/WhenBuildingGetCandidatesByActivityApiRequest.cs b/src/FindApprenticeshipJobs/SFA.DAS.FindApprenticeshipJobs.UnitTests/InnerApi/WhenBuildingGetInactiveCandidatesApiRequest.cs similarity index 53% rename from src/FindApprenticeshipJobs/SFA.DAS.FindApprenticeshipJobs.UnitTests/InnerApi/WhenBuildingGetCandidatesByActivityApiRequest.cs rename to src/FindApprenticeshipJobs/SFA.DAS.FindApprenticeshipJobs.UnitTests/InnerApi/WhenBuildingGetInactiveCandidatesApiRequest.cs index d12f45bc4..fdec1fef7 100644 --- a/src/FindApprenticeshipJobs/SFA.DAS.FindApprenticeshipJobs.UnitTests/InnerApi/WhenBuildingGetCandidatesByActivityApiRequest.cs +++ b/src/FindApprenticeshipJobs/SFA.DAS.FindApprenticeshipJobs.UnitTests/InnerApi/WhenBuildingGetInactiveCandidatesApiRequest.cs @@ -6,14 +6,14 @@ namespace SFA.DAS.FindApprenticeshipJobs.UnitTests.InnerApi { [TestFixture] - public class WhenBuildingGetCandidatesByActivityApiRequest + public class WhenBuildingGetInactiveCandidatesApiRequest { [Test, AutoData] public void Then_The_Url_Is_Correctly_Built(string cutOffDateTime, int pageNumber, int pageSize) { - var actual = new GetCandidatesByActivityApiRequest(cutOffDateTime, pageNumber, pageSize); + var actual = new GetInactiveCandidatesApiRequest(cutOffDateTime, pageNumber, pageSize); - actual.GetUrl.Should().Be($"api/candidates/GetCandidatesByActivity?cutOffDateTime={cutOffDateTime}&pageNumber={pageNumber}&pageSize={pageSize}"); + actual.GetUrl.Should().Be($"api/candidates/GetInactiveCandidates?cutOffDateTime={cutOffDateTime}&pageNumber={pageNumber}&pageSize={pageSize}"); } } } \ No newline at end of file diff --git a/src/FindApprenticeshipJobs/SFA.DAS.FindApprenticeshipJobs/Application/Commands/Candidates/UpdateCandidateStatusCommand.cs b/src/FindApprenticeshipJobs/SFA.DAS.FindApprenticeshipJobs/Application/Commands/Candidates/UpdateCandidateStatusCommand.cs index 8378e2346..45e8d73a4 100644 --- a/src/FindApprenticeshipJobs/SFA.DAS.FindApprenticeshipJobs/Application/Commands/Candidates/UpdateCandidateStatusCommand.cs +++ b/src/FindApprenticeshipJobs/SFA.DAS.FindApprenticeshipJobs/Application/Commands/Candidates/UpdateCandidateStatusCommand.cs @@ -5,8 +5,8 @@ namespace SFA.DAS.FindApprenticeshipJobs.Application.Commands.Candidates { public record UpdateCandidateStatusCommand : IRequest { - public string GovUkIdentifier { get; set; } - public string Email { get; set; } + public required string GovUkIdentifier { get; set; } + public required string Email { get; set; } public UserStatus Status { get; set; } } } \ No newline at end of file diff --git a/src/FindApprenticeshipJobs/SFA.DAS.FindApprenticeshipJobs/Application/Queries/SavedSearch/GetCandidatesByActivity/GetCandidateByActivityQuery.cs b/src/FindApprenticeshipJobs/SFA.DAS.FindApprenticeshipJobs/Application/Queries/SavedSearch/GetCandidatesByActivity/GetCandidateByActivityQuery.cs deleted file mode 100644 index 943d52b87..000000000 --- a/src/FindApprenticeshipJobs/SFA.DAS.FindApprenticeshipJobs/Application/Queries/SavedSearch/GetCandidatesByActivity/GetCandidateByActivityQuery.cs +++ /dev/null @@ -1,9 +0,0 @@ -using MediatR; - -namespace SFA.DAS.FindApprenticeshipJobs.Application.Queries.SavedSearch.GetCandidatesByActivity -{ - public record GetCandidateByActivityQuery( - DateTime CutOffDateTime, - int PageNumber = 1, - int PageSize = 10) : IRequest; -} \ No newline at end of file diff --git a/src/FindApprenticeshipJobs/SFA.DAS.FindApprenticeshipJobs/Application/Queries/SavedSearch/GetInactiveCandidates/GetInactiveCandidatesQuery.cs b/src/FindApprenticeshipJobs/SFA.DAS.FindApprenticeshipJobs/Application/Queries/SavedSearch/GetInactiveCandidates/GetInactiveCandidatesQuery.cs new file mode 100644 index 000000000..8ed049e5a --- /dev/null +++ b/src/FindApprenticeshipJobs/SFA.DAS.FindApprenticeshipJobs/Application/Queries/SavedSearch/GetInactiveCandidates/GetInactiveCandidatesQuery.cs @@ -0,0 +1,9 @@ +using MediatR; + +namespace SFA.DAS.FindApprenticeshipJobs.Application.Queries.SavedSearch.GetInactiveCandidates +{ + public record GetInactiveCandidatesQuery( + DateTime CutOffDateTime, + int PageNumber = 1, + int PageSize = 10) : IRequest; +} \ No newline at end of file diff --git a/src/FindApprenticeshipJobs/SFA.DAS.FindApprenticeshipJobs/Application/Queries/SavedSearch/GetCandidatesByActivity/GetCandidateByActivityQueryHandler.cs b/src/FindApprenticeshipJobs/SFA.DAS.FindApprenticeshipJobs/Application/Queries/SavedSearch/GetInactiveCandidates/GetInactiveCandidatesQueryHandler.cs similarity index 68% rename from src/FindApprenticeshipJobs/SFA.DAS.FindApprenticeshipJobs/Application/Queries/SavedSearch/GetCandidatesByActivity/GetCandidateByActivityQueryHandler.cs rename to src/FindApprenticeshipJobs/SFA.DAS.FindApprenticeshipJobs/Application/Queries/SavedSearch/GetInactiveCandidates/GetInactiveCandidatesQueryHandler.cs index daae3c9ae..898651665 100644 --- a/src/FindApprenticeshipJobs/SFA.DAS.FindApprenticeshipJobs/Application/Queries/SavedSearch/GetCandidatesByActivity/GetCandidateByActivityQueryHandler.cs +++ b/src/FindApprenticeshipJobs/SFA.DAS.FindApprenticeshipJobs/Application/Queries/SavedSearch/GetInactiveCandidates/GetInactiveCandidatesQueryHandler.cs @@ -4,22 +4,22 @@ using SFA.DAS.SharedOuterApi.Configuration; using SFA.DAS.SharedOuterApi.Interfaces; -namespace SFA.DAS.FindApprenticeshipJobs.Application.Queries.SavedSearch.GetCandidatesByActivity +namespace SFA.DAS.FindApprenticeshipJobs.Application.Queries.SavedSearch.GetInactiveCandidates { - public class GetCandidateByActivityQueryHandler( + public class GetInactiveCandidatesQueryHandler( ICandidateApiClient candidateApiClient) - : IRequestHandler + : IRequestHandler { - public async Task Handle(GetCandidateByActivityQuery request, CancellationToken cancellationToken) + public async Task Handle(GetInactiveCandidatesQuery request, CancellationToken cancellationToken) { - var candidatesResponse = await candidateApiClient.Get( - new GetCandidatesByActivityApiRequest( + var candidatesResponse = await candidateApiClient.Get( + new GetInactiveCandidatesApiRequest( request.CutOffDateTime.ToString("O"), request.PageNumber, request.PageSize)); if (candidatesResponse is not { Candidates.Count: > 0 }) - return new GetCandidateByActivityQueryResult + return new GetInactiveCandidatesQueryResult { PageSize = candidatesResponse.PageSize, PageIndex = candidatesResponse.PageIndex, @@ -28,9 +28,9 @@ public async Task Handle(GetCandidateByActivi Candidates = [] }; - return new GetCandidateByActivityQueryResult + return new GetInactiveCandidatesQueryResult { - Candidates = candidatesResponse.Candidates.Select(candidate => (GetCandidateByActivityQueryResult.Candidate)candidate).ToList(), + Candidates = candidatesResponse.Candidates.Select(candidate => (GetInactiveCandidatesQueryResult.Candidate)candidate).ToList(), PageSize = candidatesResponse.PageSize, PageIndex = candidatesResponse.PageIndex, TotalPages = candidatesResponse.TotalPages, diff --git a/src/FindApprenticeshipJobs/SFA.DAS.FindApprenticeshipJobs/Application/Queries/SavedSearch/GetCandidatesByActivity/GetCandidateByActivityQueryResult.cs b/src/FindApprenticeshipJobs/SFA.DAS.FindApprenticeshipJobs/Application/Queries/SavedSearch/GetInactiveCandidates/GetInactiveCandidatesQueryResult.cs similarity index 87% rename from src/FindApprenticeshipJobs/SFA.DAS.FindApprenticeshipJobs/Application/Queries/SavedSearch/GetCandidatesByActivity/GetCandidateByActivityQueryResult.cs rename to src/FindApprenticeshipJobs/SFA.DAS.FindApprenticeshipJobs/Application/Queries/SavedSearch/GetInactiveCandidates/GetInactiveCandidatesQueryResult.cs index 4f0cfd809..6f512fb50 100644 --- a/src/FindApprenticeshipJobs/SFA.DAS.FindApprenticeshipJobs/Application/Queries/SavedSearch/GetCandidatesByActivity/GetCandidateByActivityQueryResult.cs +++ b/src/FindApprenticeshipJobs/SFA.DAS.FindApprenticeshipJobs/Application/Queries/SavedSearch/GetInactiveCandidates/GetInactiveCandidatesQueryResult.cs @@ -1,9 +1,9 @@ using SFA.DAS.FindApprenticeshipJobs.Domain.Models; using SFA.DAS.FindApprenticeshipJobs.InnerApi.Responses; -namespace SFA.DAS.FindApprenticeshipJobs.Application.Queries.SavedSearch.GetCandidatesByActivity +namespace SFA.DAS.FindApprenticeshipJobs.Application.Queries.SavedSearch.GetInactiveCandidates { - public record GetCandidateByActivityQueryResult + public record GetInactiveCandidatesQueryResult { public List Candidates { get; set; } = []; public int TotalCount { get; set; } @@ -11,9 +11,9 @@ public record GetCandidateByActivityQueryResult public int PageSize { get; set; } public int TotalPages { get; set; } - public static implicit operator GetCandidateByActivityQueryResult(GetCandidatesByActivityApiResponse source) + public static implicit operator GetInactiveCandidatesQueryResult(GetInactiveCandidatesApiResponse source) { - return new GetCandidateByActivityQueryResult + return new GetInactiveCandidatesQueryResult { Candidates = source.Candidates.Select(candidate => (Candidate)candidate).ToList() }; @@ -37,7 +37,7 @@ public class Candidate public Guid Id { get; set; } public Guid? MigratedCandidateId { get; set; } - public static implicit operator Candidate(GetCandidatesByActivityApiResponse.Candidate source) + public static implicit operator Candidate(GetInactiveCandidatesApiResponse.Candidate source) { return new Candidate { @@ -73,7 +73,7 @@ public class Address public double Longitude { get; set; } public Guid CandidateId { get; set; } - public static implicit operator Address(GetCandidatesByActivityApiResponse.Address source) + public static implicit operator Address(GetInactiveCandidatesApiResponse.Address source) { return new Address { diff --git a/src/FindApprenticeshipJobs/SFA.DAS.FindApprenticeshipJobs/InnerApi/Requests/GetCandidatesByActivityApiRequest.cs b/src/FindApprenticeshipJobs/SFA.DAS.FindApprenticeshipJobs/InnerApi/Requests/GetCandidatesByActivityApiRequest.cs deleted file mode 100644 index 54568ea3b..000000000 --- a/src/FindApprenticeshipJobs/SFA.DAS.FindApprenticeshipJobs/InnerApi/Requests/GetCandidatesByActivityApiRequest.cs +++ /dev/null @@ -1,9 +0,0 @@ -using SFA.DAS.SharedOuterApi.Interfaces; - -namespace SFA.DAS.FindApprenticeshipJobs.InnerApi.Requests -{ - public class GetCandidatesByActivityApiRequest(string cutOffDateTime, int pageNumber, int pageSize) : IGetApiRequest - { - public string GetUrl => $"api/candidates/GetCandidatesByActivity?cutOffDateTime={cutOffDateTime}&pageNumber={pageNumber}&pageSize={pageSize}"; - } -} \ No newline at end of file diff --git a/src/FindApprenticeshipJobs/SFA.DAS.FindApprenticeshipJobs/InnerApi/Requests/GetInactiveCandidatesApiRequest.cs b/src/FindApprenticeshipJobs/SFA.DAS.FindApprenticeshipJobs/InnerApi/Requests/GetInactiveCandidatesApiRequest.cs new file mode 100644 index 000000000..dd023d915 --- /dev/null +++ b/src/FindApprenticeshipJobs/SFA.DAS.FindApprenticeshipJobs/InnerApi/Requests/GetInactiveCandidatesApiRequest.cs @@ -0,0 +1,9 @@ +using SFA.DAS.SharedOuterApi.Interfaces; + +namespace SFA.DAS.FindApprenticeshipJobs.InnerApi.Requests +{ + public class GetInactiveCandidatesApiRequest(string cutOffDateTime, int pageNumber, int pageSize) : IGetApiRequest + { + public string GetUrl => $"api/candidates/GetInactiveCandidates?cutOffDateTime={cutOffDateTime}&pageNumber={pageNumber}&pageSize={pageSize}"; + } +} \ No newline at end of file diff --git a/src/FindApprenticeshipJobs/SFA.DAS.FindApprenticeshipJobs/InnerApi/Responses/GetCandidatesByActivityApiResponse.cs b/src/FindApprenticeshipJobs/SFA.DAS.FindApprenticeshipJobs/InnerApi/Responses/GetInactiveCandidatesApiResponse.cs similarity index 98% rename from src/FindApprenticeshipJobs/SFA.DAS.FindApprenticeshipJobs/InnerApi/Responses/GetCandidatesByActivityApiResponse.cs rename to src/FindApprenticeshipJobs/SFA.DAS.FindApprenticeshipJobs/InnerApi/Responses/GetInactiveCandidatesApiResponse.cs index a042308ed..5a731e249 100644 --- a/src/FindApprenticeshipJobs/SFA.DAS.FindApprenticeshipJobs/InnerApi/Responses/GetCandidatesByActivityApiResponse.cs +++ b/src/FindApprenticeshipJobs/SFA.DAS.FindApprenticeshipJobs/InnerApi/Responses/GetInactiveCandidatesApiResponse.cs @@ -3,7 +3,7 @@ namespace SFA.DAS.FindApprenticeshipJobs.InnerApi.Responses { - public class GetCandidatesByActivityApiResponse + public class GetInactiveCandidatesApiResponse { [JsonProperty("candidates")] public List Candidates { get; set; } = [];