-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create an interface for NordigenClient
- Loading branch information
Showing
4 changed files
with
73 additions
and
45 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
using RobinTTY.NordigenApiClient.Endpoints; | ||
using RobinTTY.NordigenApiClient.Models.Jwt; | ||
|
||
namespace RobinTTY.NordigenApiClient; | ||
|
||
/// <summary> | ||
/// Client used to access the Nordigen API endpoints. | ||
/// </summary> | ||
public interface INordigenClient | ||
{ | ||
/// <summary> | ||
/// A pair consisting of access/refresh token used to authenticate with the Nordigen API. | ||
/// </summary> | ||
JsonWebTokenPair? JsonWebTokenPair { get; set; } | ||
|
||
/// <summary> | ||
/// Provides support for the API operations of the tokens endpoint. | ||
/// <para> | ||
/// Reference: <a href="https://developer.gocardless.com/bank-account-data/endpoints">GoCardless Documentation</a> | ||
/// </para> | ||
/// </summary> | ||
TokenEndpoint TokenEndpoint { get; } | ||
|
||
/// <summary> | ||
/// Provides support for the API operations of the institutions endpoint. | ||
/// <para> | ||
/// Reference: <a href="https://developer.gocardless.com/bank-account-data/endpoints">GoCardless Documentation</a> | ||
/// </para> | ||
/// </summary> | ||
InstitutionsEndpoint InstitutionsEndpoint { get; } | ||
|
||
/// <summary> | ||
/// Provides support for the API operations of the agreements endpoint. | ||
/// <para> | ||
/// Reference: <a href="https://developer.gocardless.com/bank-account-data/endpoints">GoCardless Documentation</a> | ||
/// </para> | ||
/// </summary> | ||
AgreementsEndpoint AgreementsEndpoint { get; } | ||
|
||
/// <summary> | ||
/// Provides support for the API operations of the requisitions endpoint. | ||
/// <para> | ||
/// Reference: <a href="https://developer.gocardless.com/bank-account-data/endpoints">GoCardless Documentation</a> | ||
/// </para> | ||
/// </summary> | ||
RequisitionsEndpoint RequisitionsEndpoint { get; } | ||
|
||
/// <summary> | ||
/// Provides support for the API operations of the accounts endpoint. | ||
/// <para> | ||
/// Reference: <a href="https://developer.gocardless.com/bank-account-data/endpoints">GoCardless Documentation</a> | ||
/// </para> | ||
/// </summary> | ||
AccountsEndpoint AccountsEndpoint { get; } | ||
|
||
/// <summary> | ||
/// Occurs whenever the <see cref="NordigenClient.JsonWebTokenPair" /> is updated. | ||
/// </summary> | ||
event EventHandler<TokenPairUpdatedEventArgs>? TokenPairUpdated; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
- Fixed CurrencyExchange deserialization caused by inconsistent API behavior | ||
- Allow mocking of NordigenApiResponse | ||
- Add an interface for NordigenClient to allow easier DI and mocking |