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
4 changes: 2 additions & 2 deletions .github/workflows/Nuget-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
run: dotnet build -c Release

- name: Run Nuget pack
run: dotnet pack -c Release --output artifacts
run: dotnet pack -c Release -p:Nuspecfile=../LockstepApi.nuspec --output artifacts

- name: Upload Nuget package as artifact
uses: actions/upload-artifact@v4
Expand All @@ -38,4 +38,4 @@ jobs:

- name: Push generated package to GitHub registry
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
run: nuget push *.nupkg -Source 'https://api.nuget.org/v3/index.json' -ApiKey ${{secrets.NUGET_API_KEY}}
run: dotnet nuget push artifacts/*.nupkg --source 'https://api.nuget.org/v3/index.json' --api-key ${{secrets.NUGET_API_KEY}}
4 changes: 2 additions & 2 deletions LockstepApi.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package >
<metadata>
<id>LockstepSdk</id>
<version>2025.8.6</version>
<version>2025.8.7</version>
<title>LockstepSdk</title>
<authors>Lockstep Network</authors>
<owners>Lockstep, Inc.</owners>
Expand All @@ -14,7 +14,7 @@
<readme>docs/README.md</readme>
<summary>Lockstep Platform SDK for CSharp</summary>
<releaseNotes>
# 2025.8.6
# 2025.8.7

For full patch notes see [Patch Notes](https://medium.com/lockstep-developer/tagged/patch-notes) on the [Lockstep Developer website](https://developer.lockstep.io)
</releaseNotes>
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ We use the [Query Invoices API](https://developer.lockstep.io/reference/v1_invoi

### Step 1: Install Lockstep SDK for C#

Before you start, make sure you [generated a valid API key](https://developer.lockstep.io/docs/api-keys) and saved it as an environment variable in your system (referred to as `LOCKSTEPAPI_SBX` in this example). That way, you'll have access to the server.
Before you start, make sure you [generated a valid API key](https://developer.lockstep.io/docs/api-keys) and saved it as an environment variable in your system (referred to as `LOCKSTEPAPI_SANDBOX` in this example). That way, you'll have access to the server.

Create a new project folder with an empty `Program.cs` file inside it and add the SDK to your project:

Expand Down Expand Up @@ -42,15 +42,15 @@ namespace LockstepExamples
{
public static async Task Main(string[] args)
{
var client = LockstepApi.WithEnvironment(LockstepEnv.SBX)
.WithApiKey(Environment.GetEnvironmentVariable("LOCKSTEPAPI_SBX"));
var client = LockstepApi.WithEnvironment(LockstepEnv.Sandbox)
.WithApiKey(Environment.GetEnvironmentVariable("LOCKSTEPAPI_SANDBOX"));

// Test first API call
var result = await client.Status.Ping();
if (!result.Success || !result.Value.LoggedIn)
{
Console.WriteLine("Your API key is not valid.");
Console.WriteLine("Please set the environment variable LOCKSTEPAPI_SBX and try again.");
Console.WriteLine("Please set the environment variable LOCKSTEPAPI_SANDBOX and try again.");
return;
}

Expand Down
136 changes: 136 additions & 0 deletions src/Clients/AttachmentLinksClient.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
/***
* Lockstep Platform SDK for C#
*
* (c) 2021-2025 Lockstep, Inc.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @author Lockstep Network <support@lockstep.io>
* @copyright 2021-2025 Lockstep, Inc.
* @link https://github.com/Lockstep-Network/lockstep-sdk-csharp
*/



using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Threading.Tasks;
using LockstepSDK.Models;


namespace LockstepSDK.Clients
{
/// <summary>
/// API methods related to AttachmentLinks
/// </summary>
public class AttachmentLinksClient
{
private readonly LockstepApi _client;

/// <summary>
/// Constructor
/// </summary>
public AttachmentLinksClient(LockstepApi client)
{
_client = client;
}

/// <summary>
/// Retrieves the Attachment Link with the provided Attachment Link identifier.
///
/// An Attachment Link is a link that associates one Attachment with one object within ADS Platform.
///
/// This route has been deprecated, use /Attachments
///
/// See [Extensibility](https://developer.lockstep.io/docs/extensibility) for more information.
///
/// </summary>
/// <param name="attachmentId"></param>
/// <param name="objectKey"></param>
/// <param name="tableName"></param>
[Obsolete("This endpoint is deprecated.")]
public async Task<LockstepResponse<AttachmentLinkModel>> RetrieveAttachmentLink(Guid attachmentId, Guid objectKey, string tableName)
{
var url = $"/api/v1/AttachmentLinks";
var options = new Dictionary<string, object>();
options["attachmentId"] = attachmentId;
options["objectKey"] = objectKey;
options["tableName"] = tableName;
return await _client.Request<AttachmentLinkModel>(HttpMethod.Get, url, options, null, null);
}

/// <summary>
/// Creates one Attachment Link from the provided arguments.
///
/// An Attachment Link is a link that associates one Attachment with one object within ADS Platform.
///
/// This route has been deprecated, use /Attachments
///
/// See [Extensibility](https://developer.lockstep.io/docs/extensibility) for more information.
///
/// </summary>
/// <param name="body"></param>
[Obsolete("This endpoint is deprecated.")]
public async Task<LockstepResponse<AttachmentLinkModel[]>> UploadAttachment(AttachmentLinkModel[] body)
{
var url = $"/api/v1/AttachmentLinks";
return await _client.Request<AttachmentLinkModel[]>(HttpMethod.Post, url, null, body, null);
}

/// <summary>
/// Delete the specified link between an object and its attachment.
///
/// An Attachment Link is a link that associates one Attachment with one object within ADS Platform.
///
/// This route has been deprecated, use /Attachments
///
/// See [Extensibility](https://developer.lockstep.io/docs/extensibility) for more information.
///
/// </summary>
/// <param name="attachmentId"></param>
/// <param name="objectKey"></param>
/// <param name="tableName"></param>
[Obsolete("This endpoint is deprecated.")]
public async Task<LockstepResponse<DeleteResult>> DeleteAttachmentLink(Guid? attachmentId = null, Guid? objectKey = null, string tableName = null)
{
var url = $"/api/v1/AttachmentLinks";
var options = new Dictionary<string, object>();
if (attachmentId != null) { options["attachmentId"] = attachmentId; }
if (objectKey != null) { options["objectKey"] = objectKey; }
if (tableName != null) { options["tableName"] = tableName; }
return await _client.Request<DeleteResult>(HttpMethod.Delete, url, options, null, null);
}

/// <summary>
/// Queries Attachment Links for this account using the specified filtering, sorting, nested fetch, and pagination rules requested.
///
/// More information on querying can be found on the [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight) page on the ADS Platform Developer website.
///
/// An Attachment Link is a link that associates one Attachment with one object within ADS Platform.
///
/// This route has been deprecated, use /Attachments
///
/// See [Extensibility](https://developer.lockstep.io/docs/extensibility) for more information.
///
/// </summary>
/// <param name="filter">The filter to use to select from the list of available Attachments, in the [Searchlight query syntax](https://github.com/tspence/csharp-searchlight).</param>
/// <param name="include">To fetch additional data on this object, specify the list of elements to retrieve. No collections are currently available for querying but may be available in the future.</param>
/// <param name="order">The sort order for the results, in the [Searchlight order syntax](https://github.com/tspence/csharp-searchlight).</param>
/// <param name="pageSize">The page size for results (default 250, maximum of 500)</param>
/// <param name="pageNumber">The page number for results (default 0)</param>
[Obsolete("This endpoint is deprecated.")]
public async Task<LockstepResponse<FetchResult<AttachmentLinkModel>>> QueryAttachmentLinks(string filter = null, string include = null, string order = null, int? pageSize = null, int? pageNumber = null)
{
var url = $"/api/v1/AttachmentLinks/query";
var options = new Dictionary<string, object>();
if (filter != null) { options["filter"] = filter; }
if (include != null) { options["include"] = include; }
if (order != null) { options["order"] = order; }
if (pageSize != null) { options["pageSize"] = pageSize; }
if (pageNumber != null) { options["pageNumber"] = pageNumber; }
return await _client.Request<FetchResult<AttachmentLinkModel>>(HttpMethod.Get, url, options, null, null);
}
}
}
52 changes: 52 additions & 0 deletions src/Clients/FeatureFlagsClient.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
/***
* Lockstep Platform SDK for C#
*
* (c) 2021-2025 Lockstep, Inc.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @author Lockstep Network <support@lockstep.io>
* @copyright 2021-2025 Lockstep, Inc.
* @link https://github.com/Lockstep-Network/lockstep-sdk-csharp
*/



using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Threading.Tasks;
using LockstepSDK.Models;


namespace LockstepSDK.Clients
{
/// <summary>
/// API methods related to FeatureFlags
/// </summary>
public class FeatureFlagsClient
{
private readonly LockstepApi _client;

/// <summary>
/// Constructor
/// </summary>
public FeatureFlagsClient(LockstepApi client)
{
_client = client;
}

/// <summary>
/// Retrieves the specified feature flags. True if they are enabled, false otherwise.
///
/// </summary>
/// <param name="body"></param>
[Obsolete("This endpoint is deprecated.")]
public async Task<LockstepResponse<FeatureFlagsResponseModel>> RetrieveFeatureFlags(FeatureFlagsRequestModel body)
{
var url = $"/api/v1/feature-flags";
return await _client.Request<FeatureFlagsResponseModel>(HttpMethod.Post, url, null, body, null);
}
}
}
74 changes: 74 additions & 0 deletions src/Clients/FinancialInstitutionAccountsClient.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
/***
* Lockstep Platform SDK for C#
*
* (c) 2021-2025 Lockstep, Inc.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @author Lockstep Network <support@lockstep.io>
* @copyright 2021-2025 Lockstep, Inc.
* @link https://github.com/Lockstep-Network/lockstep-sdk-csharp
*/



using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Threading.Tasks;
using LockstepSDK.Models;


namespace LockstepSDK.Clients
{
/// <summary>
/// API methods related to FinancialInstitutionAccounts
/// </summary>
public class FinancialInstitutionAccountsClient
{
private readonly LockstepApi _client;

/// <summary>
/// Constructor
/// </summary>
public FinancialInstitutionAccountsClient(LockstepApi client)
{
_client = client;
}

/// <summary>
/// Retrieves the financial institution account specified by this unique identifier.
///
/// </summary>
/// <param name="id">The unique ADS Platform ID number of this institution account; NOT the customer's ERP key</param>
[Obsolete("This endpoint is deprecated.")]
public async Task<LockstepResponse<FinancialInstitutionAccountModel>> RetrieveFinancialInstitutionAccounts(Guid id)
{
var url = $"/api/v1/financial-institution-accounts/{id}";
return await _client.Request<FinancialInstitutionAccountModel>(HttpMethod.Get, url, null, null, null);
}

/// <summary>
///
///
/// </summary>
/// <param name="filter">The filter for this query. See [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight)</param>
/// <param name="include">To fetch additional data on this object, specify the list of elements to retrieve. No collections are currently available but may be offered in the future.</param>
/// <param name="order">The sort order for this query. See See [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight)</param>
/// <param name="pageSize">The page size for results (default 250, maximum of 500). See [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight)</param>
/// <param name="pageNumber">The page number for results (default 0). See [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight)</param>
[Obsolete("This endpoint is deprecated.")]
public async Task<LockstepResponse<FetchResult<FinancialInstitutionAccountModel>>> QueryFinancialInstitutionAccounts(string filter = null, string include = null, string order = null, int? pageSize = null, int? pageNumber = null)
{
var url = $"/api/v1/financial-institution-accounts/query";
var options = new Dictionary<string, object>();
if (filter != null) { options["filter"] = filter; }
if (include != null) { options["include"] = include; }
if (order != null) { options["order"] = order; }
if (pageSize != null) { options["pageSize"] = pageSize; }
if (pageNumber != null) { options["pageNumber"] = pageNumber; }
return await _client.Request<FetchResult<FinancialInstitutionAccountModel>>(HttpMethod.Get, url, options, null, null);
}
}
}
66 changes: 66 additions & 0 deletions src/Clients/GroupAccountsClient.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
/***
* Lockstep Platform SDK for C#
*
* (c) 2021-2025 Lockstep, Inc.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @author Lockstep Network <support@lockstep.io>
* @copyright 2021-2025 Lockstep, Inc.
* @link https://github.com/Lockstep-Network/lockstep-sdk-csharp
*/



using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Threading.Tasks;
using LockstepSDK.Models;


namespace LockstepSDK.Clients
{
/// <summary>
/// API methods related to GroupAccounts
/// </summary>
public class GroupAccountsClient
{
private readonly LockstepApi _client;

/// <summary>
/// Constructor
/// </summary>
public GroupAccountsClient(LockstepApi client)
{
_client = client;
}

/// <summary>
/// Retrieves group account data for the current user.
///
/// </summary>
[Obsolete("This endpoint is deprecated.")]
public async Task<LockstepResponse<GroupAccountModel>> RetrieveGroupAccountData()
{
var url = $"/api/v1/GroupAccounts/me";
return await _client.Request<GroupAccountModel>(HttpMethod.Get, url, null, null, null);
}

/// <summary>
/// Updates a group account that matches the specified id with the requested information.
///
/// The PATCH method allows you to change specific values on the object while leaving other values alone. As input you should supply a list of field names and new values. If you do not provide the name of a field, that field will remain unchanged. This allows you to ensure that you are only updating the specific fields desired.
///
/// </summary>
/// <param name="id">The unique ID number of the Group Account to retrieve</param>
/// <param name="body">A list of changes to apply to this Group Account</param>
[Obsolete("This endpoint is deprecated.")]
public async Task<LockstepResponse<GroupAccountModel>> UpdateGroupAccount(Guid id, object body)
{
var url = $"/api/v1/GroupAccounts/{id}";
return await _client.Request<GroupAccountModel>(new HttpMethod("PATCH"), url, null, body, null);
}
}
}
Loading