-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prepare ability to check rate limits (#18)
- Loading branch information
Showing
7 changed files
with
105 additions
and
16 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
60 changes: 60 additions & 0 deletions
60
src/RobinTTY.NordigenApiClient/Models/Responses/ApiRateLimits.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,60 @@ | ||
using RobinTTY.NordigenApiClient.Endpoints; | ||
|
||
namespace RobinTTY.NordigenApiClient.Models.Responses; | ||
|
||
/// <summary> | ||
/// The rate limits of the GoCardless API. | ||
/// </summary> | ||
public class ApiRateLimits | ||
{ | ||
/// <summary> | ||
/// Indicates the maximum number of allowed requests within the defined time window. | ||
/// </summary> | ||
public int RequestLimit { get; set; } | ||
/// <summary> | ||
/// Indicates the number of remaining requests you can make in the current time window. | ||
/// </summary> | ||
public int RemainingRequests { get; set; } | ||
/// <summary> | ||
/// Indicates the time remaining in the current time window (in seconds). | ||
/// </summary> | ||
public int RemainingSecondsInTimeWindow { get; set; } | ||
/// <summary> | ||
/// Indicates the maximum number of allowed requests to the <see cref="AccountsEndpoint"/> | ||
/// within the defined time window. | ||
/// </summary> | ||
public int MaxAccountRequests { get; set; } | ||
/// <summary> | ||
/// Indicates the number of remaining requests to the <see cref="AccountsEndpoint"/> | ||
/// you can make in the current time window. | ||
/// </summary> | ||
public int RemainingAccountRequests { get; set; } | ||
/// <summary> | ||
/// Indicates the time remaining in the current time window (in seconds) for requests | ||
/// to the <see cref="AccountsEndpoint"/>. | ||
/// </summary> | ||
public int RemainingSecondsInAccountTimeWindow { get; set; } | ||
|
||
/// <summary> | ||
/// Creates a new instance of <see cref="ApiRateLimits" />. | ||
/// </summary> | ||
/// <param name="requestLimit">Indicates the maximum number of allowed requests within the defined time window.</param> | ||
/// <param name="remainingRequests">Indicates the number of remaining requests you can make in the current time window.</param> | ||
/// <param name="remainingTimeInTimeWindow">Indicates the time remaining in the current time window (in seconds).</param> | ||
/// <param name="maxAccountRequests">Indicates the maximum number of allowed requests to the <see cref="AccountsEndpoint"/> | ||
/// within the defined time window.</param> | ||
/// <param name="remainingAccountRequests">Indicates the number of remaining requests to the <see cref="AccountsEndpoint"/> | ||
/// you can make in the current time window.</param> | ||
/// <param name="remainingTimeInAccountTimeWindow">Indicates the time remaining in the current time window (in seconds) for requests | ||
/// to the <see cref="AccountsEndpoint"/>.</param> | ||
public ApiRateLimits(int requestLimit, int remainingRequests, int remainingTimeInTimeWindow, int maxAccountRequests, | ||
int remainingAccountRequests, int remainingTimeInAccountTimeWindow) | ||
{ | ||
RequestLimit = requestLimit; | ||
RemainingRequests = remainingRequests; | ||
RemainingSecondsInTimeWindow = remainingTimeInTimeWindow; | ||
MaxAccountRequests = maxAccountRequests; | ||
RemainingAccountRequests = remainingAccountRequests; | ||
RemainingSecondsInAccountTimeWindow = remainingTimeInAccountTimeWindow; | ||
} | ||
} |
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,2 @@ | ||
This version improves many aspects of the library. Since this version contains breaking changes please check the release notes before updating. | ||
For the full release notes please see: https://github.com/RobinTTY/NordigenApiClient/releases/tag/v9.0.0 | ||
For the full release notes please see: https://github.com/RobinTTY/NordigenApiClient/releases/tag/v10.0.0 |