From bfda7ccfa04ebe87aa7e07482b9b08cb46cb4d1c Mon Sep 17 00:00:00 2001 From: Crhistian Ramirez Date: Thu, 5 Feb 2026 09:49:30 -0600 Subject: [PATCH] Expose Request method for easily calling undocumented endpoints --- src/OrderCloud.SDK/OrderCloud.SDK.csproj | 2 +- src/OrderCloud.SDK/OrderCloudClient.cs | 18 +++++++++++------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/OrderCloud.SDK/OrderCloud.SDK.csproj b/src/OrderCloud.SDK/OrderCloud.SDK.csproj index c958abd..8546df5 100644 --- a/src/OrderCloud.SDK/OrderCloud.SDK.csproj +++ b/src/OrderCloud.SDK/OrderCloud.SDK.csproj @@ -4,7 +4,7 @@ netstandard2.0;net461 True - 0.18.12 + 0.18.13 OrderCloud.SDK OrderCloud SDK Todd Menier diff --git a/src/OrderCloud.SDK/OrderCloudClient.cs b/src/OrderCloud.SDK/OrderCloudClient.cs index 1611331..6f90e00 100644 --- a/src/OrderCloud.SDK/OrderCloudClient.cs +++ b/src/OrderCloud.SDK/OrderCloudClient.cs @@ -64,7 +64,15 @@ public partial interface IOrderCloudClient /// Get a single cert public key. Returns a JSON Web Key (JWK). Can be used for validating the token was signed by OrderCloud. /// Task GetPublicKeyAsync(string ID, string accessToken = null); - } + + /// + /// Creates an authenticated request that can be sent using Flurl semantics. Normally not needed since the SDK + /// provides higher-level strongly-typed methods for all public endpoints, but if there's ever a need to call + /// an undocumented endpoint, or the SDK version is behind the API version, this provides lower-level access. + /// + IFlurlRequest Request(params object[] pathSegments); + + } public partial class OrderCloudClient : IDisposable { @@ -168,12 +176,8 @@ public async Task GetPublicKeyAsync(string ID, string accessToken = n internal bool EnableModelValidation { get; set; } = true; - /// - /// Creates an authenticated request that can be sent using Flurl semantics. Normally not needed since the SDK - /// provides higher-level strongly-typed methods for all public endpoints, but if there's ever a need to call - /// an undocumented endpoint, or the SDK version is behind the API version, this provides lower-level access. - /// - public IFlurlRequest Request(params object[] pathSegments) => ApiClient + /// + public IFlurlRequest Request(params object[] pathSegments) => ApiClient .Request(pathSegments) .ConfigureRequest(settings => { settings.BeforeCallAsync = EnsureTokenAsync;