From 152efb35fe2c90bf2bc58891bc3278a6f59473d6 Mon Sep 17 00:00:00 2001 From: Gregory Bosquier Date: Thu, 22 Aug 2024 15:30:41 +0200 Subject: [PATCH 1/2] Add RateLimitingCallsMade --- MangoPay.SDK/Core/LastRequestInfo.cs | 1 + MangoPay.SDK/Core/RestTool.cs | 1 + 2 files changed, 2 insertions(+) diff --git a/MangoPay.SDK/Core/LastRequestInfo.cs b/MangoPay.SDK/Core/LastRequestInfo.cs index d4494c6..c3f4428 100644 --- a/MangoPay.SDK/Core/LastRequestInfo.cs +++ b/MangoPay.SDK/Core/LastRequestInfo.cs @@ -9,6 +9,7 @@ public class LastRequestInfo public RestResponse Response { get; set; } public string RateLimitingCallsAllowed { get; set; } + public string RateLimitingCallsMade { get; set; } public string RateLimitingCallsRemaining { get; set; } diff --git a/MangoPay.SDK/Core/RestTool.cs b/MangoPay.SDK/Core/RestTool.cs index 975016e..2040329 100644 --- a/MangoPay.SDK/Core/RestTool.cs +++ b/MangoPay.SDK/Core/RestTool.cs @@ -298,6 +298,7 @@ string GetHeaderValue(string key) _root.LastRequestInfo.RateLimitingCallsAllowed = GetHeaderValue("X-RateLimit-Limit"); _root.LastRequestInfo.RateLimitingCallsRemaining = GetHeaderValue("X-RateLimit-Remaining"); _root.LastRequestInfo.RateLimitingTimeTillReset = GetHeaderValue("X-RateLimit-Reset"); + _root.LastRequestInfo.RateLimitingCallsMade = GetHeaderValue("X-RateLimit"); } private async Task> DoRequestListAsync(string urlMethod, Dictionary additionalUrlParams = null, From 12090f617912def82adcafd864a8aac1fdab74c8 Mon Sep 17 00:00:00 2001 From: Gregory Bosquier Date: Thu, 22 Aug 2024 15:32:18 +0200 Subject: [PATCH 2/2] lint --- MangoPay.SDK/Core/LastRequestInfo.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/MangoPay.SDK/Core/LastRequestInfo.cs b/MangoPay.SDK/Core/LastRequestInfo.cs index c3f4428..9ea60ee 100644 --- a/MangoPay.SDK/Core/LastRequestInfo.cs +++ b/MangoPay.SDK/Core/LastRequestInfo.cs @@ -9,6 +9,7 @@ public class LastRequestInfo public RestResponse Response { get; set; } public string RateLimitingCallsAllowed { get; set; } + public string RateLimitingCallsMade { get; set; } public string RateLimitingCallsRemaining { get; set; }