Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/OrderCloud.SDK/OrderCloud.SDK.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<!-- https://docs.microsoft.com/en-us/dotnet/core/tools/csproj -->
<TargetFrameworks>netstandard2.0;net461</TargetFrameworks>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<Version>0.18.12</Version>
<Version>0.18.13</Version>
<PackageId>OrderCloud.SDK</PackageId>
<Title>OrderCloud SDK</Title>
<Authors>Todd Menier</Authors>
Expand Down
18 changes: 11 additions & 7 deletions src/OrderCloud.SDK/OrderCloudClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
/// </summary>
Task<PublicKey> GetPublicKeyAsync(string ID, string accessToken = null);
}

/// <summary>
/// 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.
/// </summary>
IFlurlRequest Request(params object[] pathSegments);

}

public partial class OrderCloudClient : IDisposable
{
Expand Down Expand Up @@ -168,12 +176,8 @@ public async Task<PublicKey> GetPublicKeyAsync(string ID, string accessToken = n

internal bool EnableModelValidation { get; set; } = true;

/// <summary>
/// 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.
/// </summary>
public IFlurlRequest Request(params object[] pathSegments) => ApiClient
/// <inheritdoc/>
public IFlurlRequest Request(params object[] pathSegments) => ApiClient
.Request(pathSegments)
.ConfigureRequest(settings => {
settings.BeforeCallAsync = EnsureTokenAsync;
Expand Down