C# SDK
Install and start using the C# SDK.
Intro
The Spinwheel API SDK provides access to the Spinwheel API REST APIs.
Embedded debt and credit data: connect a consumer, pull their debt profile, refresh liabilities in real time and pay creditors directly.
Installation
Add the SDK as a project reference into your solution:
dotnet add reference <path-to-sdk>/src/SpinwheelApi/SpinwheelApi.csprojThe project takes its build settings from the files around it, so reference it in place.
Quick Start
Dependency Injection
Register the client with IServiceCollection and resolve it from the container. The HttpClient is managed by IHttpClientFactory. Configure the client's behavior through SpinwheelApiClientOptions.
services.AddSpinwheelApiClient(options =>
{
options.BearerAuth = "YOUR_BEARER_TOKEN";
options.Environment = ServerEnvironment.Sandbox;
// TODO: configure more client options here
});Direct Instantiation
Create the client by passing an HttpClient you manage yourself. Configure the client's behavior through SpinwheelApiClientOptions.
var httpClient = new HttpClient();
// TODO: configure more client options here
var options = new SpinwheelApiClientOptions
{
BearerAuth = "YOUR_BEARER_TOKEN",
Environment = ServerEnvironment.Sandbox,
};
var client = new SpinwheelApiClient(httpClient, options);
