-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactoring GetPledges into GetIndex
- Loading branch information
Showing
15 changed files
with
83 additions
and
116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
src/SFA.DAS.EmployerFinance.Web/ViewModels/Transfers/IndexViewModel.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
namespace SFA.DAS.EmployerFinance.Web.ViewModels.Transfers | ||
{ | ||
public class IndexViewModel | ||
{ | ||
public bool IsTransferReceiver { get; set; } | ||
public bool RenderCreateTransfersPledgeButton { get; set; } | ||
public int PledgesCount { get; set; } | ||
} | ||
} |
9 changes: 0 additions & 9 deletions
9
src/SFA.DAS.EmployerFinance.Web/ViewModels/TransfersIndexViewModel.cs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
...ure/OuterApiRequests/GetPledgesRequest.cs → ...rApiRequests/Transfers/GetIndexRequest.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
using SFA.DAS.EmployerFinance.Interfaces.OuterApi; | ||
|
||
namespace SFA.DAS.EmployerFinance.Infrastructure.OuterApiRequests | ||
namespace SFA.DAS.EmployerFinance.Infrastructure.OuterApiRequests.Transfers | ||
{ | ||
public class GetPledgesRequest : IGetApiRequest | ||
public class GetIndexRequest : IGetApiRequest | ||
{ | ||
private readonly long _accountId; | ||
|
||
public GetPledgesRequest(long accountId) | ||
public GetIndexRequest(long accountId) | ||
{ | ||
_accountId = accountId; | ||
} | ||
|
||
public string GetUrl => $"Pledges?accountId={_accountId}"; | ||
public string GetUrl => $"Transfers/{_accountId}"; | ||
} | ||
} |
7 changes: 0 additions & 7 deletions
7
src/SFA.DAS.EmployerFinance/Infrastructure/OuterApiResponses/GetPledgesResponse.cs
This file was deleted.
Oops, something went wrong.
8 changes: 8 additions & 0 deletions
8
src/SFA.DAS.EmployerFinance/Infrastructure/OuterApiResponses/Transfers/GetIndexResponse.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
namespace SFA.DAS.EmployerFinance.Infrastructure.OuterApiResponses.Transfers | ||
{ | ||
public class GetIndexResponse | ||
{ | ||
public int PledgesCount { get; set; } | ||
public bool IsTransferReceiver { get; set; } | ||
} | ||
} |
9 changes: 0 additions & 9 deletions
9
src/SFA.DAS.EmployerFinance/Services/ILevyTransferMatchingService.cs
This file was deleted.
Oops, something went wrong.
10 changes: 10 additions & 0 deletions
10
src/SFA.DAS.EmployerFinance/Services/IManageApprenticeshipsService.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
using SFA.DAS.EmployerFinance.Infrastructure.OuterApiResponses.Transfers; | ||
using System.Threading.Tasks; | ||
|
||
namespace SFA.DAS.EmployerFinance.Services | ||
{ | ||
public interface IManageApprenticeshipsService | ||
{ | ||
Task<GetIndexResponse> GetIndex(long accountId); | ||
} | ||
} |
25 changes: 0 additions & 25 deletions
25
src/SFA.DAS.EmployerFinance/Services/LevyTransferMatchingService.cs
This file was deleted.
Oops, something went wrong.
23 changes: 23 additions & 0 deletions
23
src/SFA.DAS.EmployerFinance/Services/ManageApprenticeshipsService.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
using System.Threading.Tasks; | ||
using SFA.DAS.EmployerFinance.Infrastructure.OuterApiRequests.Transfers; | ||
using SFA.DAS.EmployerFinance.Infrastructure.OuterApiResponses.Transfers; | ||
using SFA.DAS.EmployerFinance.Interfaces.OuterApi; | ||
|
||
namespace SFA.DAS.EmployerFinance.Services | ||
{ | ||
public class ManageApprenticeshipsService : IManageApprenticeshipsService | ||
{ | ||
private readonly IApiClient _apiClient; | ||
|
||
public ManageApprenticeshipsService( | ||
IApiClient apiClient) | ||
{ | ||
_apiClient = apiClient; | ||
} | ||
|
||
public async Task<GetIndexResponse> GetIndex(long accountId) | ||
{ | ||
return await _apiClient.Get<GetIndexResponse>(new GetIndexRequest(accountId)); | ||
} | ||
} | ||
} |