diff --git a/.github/workflows/Nuget-publish.yml b/.github/workflows/Nuget-publish.yml index a181de6..4acf51d 100644 --- a/.github/workflows/Nuget-publish.yml +++ b/.github/workflows/Nuget-publish.yml @@ -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 @@ -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}} diff --git a/LockstepApi.nuspec b/LockstepApi.nuspec index b7758fc..cd15f57 100644 --- a/LockstepApi.nuspec +++ b/LockstepApi.nuspec @@ -2,7 +2,7 @@ LockstepSdk - 2025.8.6 + 2025.8.7 LockstepSdk Lockstep Network Lockstep, Inc. @@ -14,7 +14,7 @@ docs/README.md Lockstep Platform SDK for CSharp - # 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) diff --git a/README.md b/README.md index 7482196..8e2769c 100644 --- a/README.md +++ b/README.md @@ -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: @@ -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; } diff --git a/src/Clients/AttachmentLinksClient.cs b/src/Clients/AttachmentLinksClient.cs new file mode 100644 index 0000000..ba208ce --- /dev/null +++ b/src/Clients/AttachmentLinksClient.cs @@ -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 + * @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 +{ + /// + /// API methods related to AttachmentLinks + /// + public class AttachmentLinksClient + { + private readonly LockstepApi _client; + + /// + /// Constructor + /// + public AttachmentLinksClient(LockstepApi client) + { + _client = client; + } + + /// + /// 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. + /// + /// + /// + /// + /// + [Obsolete("This endpoint is deprecated.")] + public async Task> RetrieveAttachmentLink(Guid attachmentId, Guid objectKey, string tableName) + { + var url = $"/api/v1/AttachmentLinks"; + var options = new Dictionary(); + options["attachmentId"] = attachmentId; + options["objectKey"] = objectKey; + options["tableName"] = tableName; + return await _client.Request(HttpMethod.Get, url, options, null, null); + } + + /// + /// 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. + /// + /// + /// + [Obsolete("This endpoint is deprecated.")] + public async Task> UploadAttachment(AttachmentLinkModel[] body) + { + var url = $"/api/v1/AttachmentLinks"; + return await _client.Request(HttpMethod.Post, url, null, body, null); + } + + /// + /// 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. + /// + /// + /// + /// + /// + [Obsolete("This endpoint is deprecated.")] + public async Task> DeleteAttachmentLink(Guid? attachmentId = null, Guid? objectKey = null, string tableName = null) + { + var url = $"/api/v1/AttachmentLinks"; + var options = new Dictionary(); + if (attachmentId != null) { options["attachmentId"] = attachmentId; } + if (objectKey != null) { options["objectKey"] = objectKey; } + if (tableName != null) { options["tableName"] = tableName; } + return await _client.Request(HttpMethod.Delete, url, options, null, null); + } + + /// + /// 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. + /// + /// + /// The filter to use to select from the list of available Attachments, in the [Searchlight query syntax](https://github.com/tspence/csharp-searchlight). + /// 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. + /// The sort order for the results, in the [Searchlight order syntax](https://github.com/tspence/csharp-searchlight). + /// The page size for results (default 250, maximum of 500) + /// The page number for results (default 0) + [Obsolete("This endpoint is deprecated.")] + public async Task>> 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(); + 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>(HttpMethod.Get, url, options, null, null); + } + } +} diff --git a/src/Clients/FeatureFlagsClient.cs b/src/Clients/FeatureFlagsClient.cs new file mode 100644 index 0000000..15d3e18 --- /dev/null +++ b/src/Clients/FeatureFlagsClient.cs @@ -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 + * @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 +{ + /// + /// API methods related to FeatureFlags + /// + public class FeatureFlagsClient + { + private readonly LockstepApi _client; + + /// + /// Constructor + /// + public FeatureFlagsClient(LockstepApi client) + { + _client = client; + } + + /// + /// Retrieves the specified feature flags. True if they are enabled, false otherwise. + /// + /// + /// + [Obsolete("This endpoint is deprecated.")] + public async Task> RetrieveFeatureFlags(FeatureFlagsRequestModel body) + { + var url = $"/api/v1/feature-flags"; + return await _client.Request(HttpMethod.Post, url, null, body, null); + } + } +} diff --git a/src/Clients/FinancialInstitutionAccountsClient.cs b/src/Clients/FinancialInstitutionAccountsClient.cs new file mode 100644 index 0000000..92a0c60 --- /dev/null +++ b/src/Clients/FinancialInstitutionAccountsClient.cs @@ -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 + * @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 +{ + /// + /// API methods related to FinancialInstitutionAccounts + /// + public class FinancialInstitutionAccountsClient + { + private readonly LockstepApi _client; + + /// + /// Constructor + /// + public FinancialInstitutionAccountsClient(LockstepApi client) + { + _client = client; + } + + /// + /// Retrieves the financial institution account specified by this unique identifier. + /// + /// + /// The unique ADS Platform ID number of this institution account; NOT the customer's ERP key + [Obsolete("This endpoint is deprecated.")] + public async Task> RetrieveFinancialInstitutionAccounts(Guid id) + { + var url = $"/api/v1/financial-institution-accounts/{id}"; + return await _client.Request(HttpMethod.Get, url, null, null, null); + } + + /// + /// + /// + /// + /// The filter for this query. See [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight) + /// 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. + /// The sort order for this query. See See [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight) + /// The page size for results (default 250, maximum of 500). See [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight) + /// The page number for results (default 0). See [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight) + [Obsolete("This endpoint is deprecated.")] + public async Task>> 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(); + 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>(HttpMethod.Get, url, options, null, null); + } + } +} diff --git a/src/Clients/GroupAccountsClient.cs b/src/Clients/GroupAccountsClient.cs new file mode 100644 index 0000000..db57856 --- /dev/null +++ b/src/Clients/GroupAccountsClient.cs @@ -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 + * @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 +{ + /// + /// API methods related to GroupAccounts + /// + public class GroupAccountsClient + { + private readonly LockstepApi _client; + + /// + /// Constructor + /// + public GroupAccountsClient(LockstepApi client) + { + _client = client; + } + + /// + /// Retrieves group account data for the current user. + /// + /// + [Obsolete("This endpoint is deprecated.")] + public async Task> RetrieveGroupAccountData() + { + var url = $"/api/v1/GroupAccounts/me"; + return await _client.Request(HttpMethod.Get, url, null, null, null); + } + + /// + /// 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. + /// + /// + /// The unique ID number of the Group Account to retrieve + /// A list of changes to apply to this Group Account + [Obsolete("This endpoint is deprecated.")] + public async Task> UpdateGroupAccount(Guid id, object body) + { + var url = $"/api/v1/GroupAccounts/{id}"; + return await _client.Request(new HttpMethod("PATCH"), url, null, body, null); + } + } +} diff --git a/src/Clients/ProvisioningClient.cs b/src/Clients/ProvisioningClient.cs new file mode 100644 index 0000000..b0a3a02 --- /dev/null +++ b/src/Clients/ProvisioningClient.cs @@ -0,0 +1,51 @@ +/*** + * 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 + * @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 +{ + /// + /// API methods related to Provisioning + /// + public class ProvisioningClient + { + private readonly LockstepApi _client; + + /// + /// Constructor + /// + public ProvisioningClient(LockstepApi client) + { + _client = client; + } + + /// + /// Creates a new account for a developer, sending an email with information on how to access the API. + /// + /// + [Obsolete("This endpoint is deprecated.")] + public async Task> ProvisionFreeDeveloperAccount(DeveloperAccountSubmitModel body) + { + var url = $"/api/v1/Provisioning/free-account"; + return await _client.Request(HttpMethod.Post, url, null, body, null); + } + } +} diff --git a/src/Clients/UserAccountsClient.cs b/src/Clients/UserAccountsClient.cs new file mode 100644 index 0000000..9fcca66 --- /dev/null +++ b/src/Clients/UserAccountsClient.cs @@ -0,0 +1,222 @@ +/*** + * 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 + * @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 +{ + /// + /// API methods related to UserAccounts + /// + public class UserAccountsClient + { + private readonly LockstepApi _client; + + /// + /// Constructor + /// + public UserAccountsClient(LockstepApi client) + { + _client = client; + } + + /// + /// Retrieves the User with this identifier. + /// + /// A User represents a person who has the ability to authenticate against the ADS Platform and use services such as ADS Inbox. A User is uniquely identified by an Azure identity, and each user must have an email address defined within their account. All Users must validate their email to make use of ADS Platform services. Users may have different privileges and access control rights within the ADS Platform. + /// + /// + /// The unique ID number of the User to retrieve + /// To fetch additional data on this object, specify the list of elements to retrieve. Available collections: Notes, Attachments, CustomFields, AccountingRole + [Obsolete("This endpoint is deprecated.")] + public async Task> RetrieveUser(Guid id, string include = null) + { + var url = $"/api/v1/UserAccounts/{id}"; + var options = new Dictionary(); + if (include != null) { options["include"] = include; } + return await _client.Request(HttpMethod.Get, url, options, null, null); + } + + /// + /// Updates a User that matches the specified id with the requested information. The following limitations are applied when updating a user: + /// + /// <list type="bullet"><item>Only Group Owners and Admins can change other users.</item><item>When updating another user, only the role and status can be updated.</item><item>A user can only change their own status when their current status is Onboarding.</item><item>A user can never change their own role.</item><item>Nobody can change the owner's role or status. See the "/transfer-owner" route for changing the owner.</item><item>A user can change their own personal information.</item></list> + /// + /// 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. + /// + /// A User represents a person who has the ability to authenticate against the ADS Platform and use services such as ADS Inbox. A User is uniquely identified by an Azure identity, and each user must have an email address defined within their account. All Users must validate their email to make use of ADS Platform services. Users may have different privileges and access control rights within the ADS Platform. + /// + /// + /// The unique ID number of the User to retrieve + /// A list of changes to apply to this User + [Obsolete("This endpoint is deprecated.")] + public async Task> UpdateUser(Guid id, object body) + { + var url = $"/api/v1/UserAccounts/{id}"; + return await _client.Request(new HttpMethod("PATCH"), url, null, body, null); + } + + /// + /// Disable the user referred to by this unique identifier. + /// + /// A User represents a person who has the ability to authenticate against the ADS Platform and use services such as ADS Inbox. A User is uniquely identified by an Azure identity, and each user must have an email address defined within their account. All Users must validate their email to make use of ADS Platform services. Users may have different privileges and access control rights within the ADS Platform. + /// + /// + /// The unique ADS Platform ID number of this User + [Obsolete("This endpoint is deprecated.")] + public async Task> DisableUser(Guid id) + { + var url = $"/api/v1/UserAccounts/{id}"; + return await _client.Request(HttpMethod.Delete, url, null, null, null); + } + + /// + /// This route is obsolete, please use the /UserAccounts/invite to reenable a disabled user. + /// + /// Reenable the user referred to by this unique identifier. + /// + /// A User represents a person who has the ability to authenticate against the ADS Platform and use services such as ADS Inbox. A User is uniquely identified by an Azure identity, and each user must have an email address defined within their account. All Users must validate their email to make use of ADS Platform services. Users may have different privileges and access control rights within the ADS Platform. + /// + /// + /// The unique ADS Platform ID number of this User + [Obsolete("This endpoint is deprecated.")] + public async Task> ReenableUser(Guid? id = null) + { + var url = $"/api/v1/UserAccounts/reenable"; + var options = new Dictionary(); + if (id != null) { options["id"] = id; } + return await _client.Request(HttpMethod.Post, url, options, null, null); + } + + /// + /// Invite a user with the specified email to join your accounting group. The user will receive an email to set up their account. + /// + /// A User represents a person who has the ability to authenticate against the ADS Platform and use services such as ADS Inbox. A User is uniquely identified by an Azure identity, and each user must have an email address defined within their account. All Users must validate their email to make use of ADS Platform services. Users may have different privileges and access control rights within the ADS Platform. + /// + /// + /// The user to invite + [Obsolete("This endpoint is deprecated.")] + public async Task> InviteUser(InviteSubmitModel[] body) + { + var url = $"/api/v1/UserAccounts/invite"; + return await _client.Request(HttpMethod.Post, url, null, body, null); + } + + /// + /// Retrieves invite information for the specified invite token. + /// + /// A User represents a person who has the ability to authenticate against the ADS Platform and use services such as ADS Inbox. A User is uniquely identified by an Azure identity, and each user must have an email address defined within their account. All Users must validate their email to make use of ADS Platform services. Users may have different privileges and access control rights within the ADS Platform. + /// + /// + /// The code of the invite + [Obsolete("This endpoint is deprecated.")] + public async Task> RetrieveInviteData(Guid? code = null) + { + var url = $"/api/v1/UserAccounts/invite"; + var options = new Dictionary(); + if (code != null) { options["code"] = code; } + return await _client.Request(HttpMethod.Get, url, options, null, null); + } + + /// + /// Transfer the ownership of a group to another user. This API must be called by the current owner of the group. + /// + /// A User represents a person who has the ability to authenticate against the ADS Platform and use services such as ADS Inbox. A User is uniquely identified by an Azure identity, and each user must have an email address defined within their account. All Users must validate their email to make use of ADS Platform services. Users may have different privileges and access control rights within the ADS Platform. + /// + /// + /// + [Obsolete("This endpoint is deprecated.")] + public async Task> TransferOwner(TransferOwnerSubmitModel body) + { + var url = $"/api/v1/UserAccounts/transfer-owner"; + return await _client.Request(HttpMethod.Post, url, null, body, null); + } + + /// + /// Queries Users for this account using the specified filtering, sorting, nested fetch, and pagination rules requested. A User represents a person who has the ability to authenticate against the ADS Platform and use services such as ADS Inbox. A User is uniquely identified by an Azure identity, and each user must have an email address defined within their account. All Users must validate their email to make use of ADS Platform services. Users may have different privileges and access control rights within the ADS Platform. + /// + /// + /// The filter for this query. See [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight) + /// To fetch additional data on this object, specify the list of elements to retrieve. Available collections: Notes, Attachments, CustomFields, AccountingRole + /// The sort order for this query. See See [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight) + /// The page size for results (default 250, maximum of 500). See [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight) + /// The page number for results (default 0). See [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight) + [Obsolete("This endpoint is deprecated.")] + public async Task>> QueryUsers(string filter = null, string include = null, string order = null, int? pageSize = null, int? pageNumber = null) + { + var url = $"/api/v1/UserAccounts/query"; + var options = new Dictionary(); + 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>(HttpMethod.Get, url, options, null, null); + } + + /// + /// Change the active GroupKey of the calling user. + /// + /// A User represents a person who has the ability to authenticate against the ADS Platform and use services such as ADS Inbox. A User is uniquely identified by an Azure identity, and each user must have an email address defined within their account. All Users must validate their email to make use of ADS Platform services. Users may have different privileges and access control rights within the ADS Platform. + /// + /// + /// + [Obsolete("This endpoint is deprecated.")] + public async Task> ChangeUserGroup(Guid groupKey) + { + var url = $"/api/v1/UserAccounts/change-group"; + var options = new Dictionary(); + options["groupKey"] = groupKey; + return await _client.Request(HttpMethod.Post, url, options, null, null); + } + + /// + /// Retrieves the user data for the current user. This allows for retrieving extended user data such as UTM parameters. + /// + /// + /// The set of data to retrieve. To avoid any casing confusion, these values are converted to upper case. Possible values are: UTM + [Obsolete("This endpoint is deprecated.")] + public async Task> GetUserData(string[] include) + { + var url = $"/api/v1/UserAccounts/user-data"; + var options = new Dictionary(); + options["include"] = include; + return await _client.Request(HttpMethod.Get, url, options, null, null); + } + + /// + /// Set support access for the calling user. + /// + /// Support access allows ADS Platform to access the user's account to troubleshoot issues. Access is granted for a limited time, can be revoked at any time, and requires a code to verify the access. + /// + /// Providing a `null` value for the `expiresAt` parameter will revoke support access. + /// + /// Every call to this API will regenerate the support access code. + /// + /// + /// + [Obsolete("This endpoint is deprecated.")] + public async Task> SetSupportAccess(SupportAccessRequest body) + { + var url = $"/api/v1/UserAccounts/support-access"; + return await _client.Request(HttpMethod.Post, url, null, body, null); + } + } +} diff --git a/src/Clients/WorkflowStatusesClient.cs b/src/Clients/WorkflowStatusesClient.cs index 01519ec..e26c287 100644 --- a/src/Clients/WorkflowStatusesClient.cs +++ b/src/Clients/WorkflowStatusesClient.cs @@ -53,6 +53,22 @@ public async Task> RetrieveWorkflowStatus( return await _client.Request(HttpMethod.Get, url, options, null, null); } + /// + /// Creates one or more Workflow Statuses from a given model. + /// + /// Custom WorkflowStatuses will not be supported in the future. Please use predefined WorkflowStatuses. + /// + /// A Workflow Status represents the state for a specific workflow for an entity. A Workflow Status may be generic for common use cases or specific to a set of predefined statuses. + /// + /// + /// The Workflow Statuses to create + [Obsolete("This endpoint is deprecated.")] + public async Task> CreateWorkflowStatuses(WorkflowStatusModel[] body) + { + var url = $"/api/v1/workflow-statuses"; + return await _client.Request(HttpMethod.Post, url, null, body, null); + } + /// /// Queries Workflow Statuses using the specified filtering, sorting, nested fetch, and pagination rules requested. /// diff --git a/src/LockstepApi.cs b/src/LockstepApi.cs index f86cd8e..e4f7f7e 100644 --- a/src/LockstepApi.cs +++ b/src/LockstepApi.cs @@ -64,6 +64,11 @@ public class LockstepApi /// public ApplicationsClient Applications { get; } + /// + /// API methods related to AttachmentLinks + /// + public AttachmentLinksClient AttachmentLinks { get; } + /// /// API methods related to Attachments /// @@ -104,6 +109,11 @@ public class LockstepApi /// public DefinitionsClient Definitions { get; } + /// + /// API methods related to FeatureFlags + /// + public FeatureFlagsClient FeatureFlags { get; } + /// /// API methods related to FinancialAccount /// @@ -114,11 +124,21 @@ public class LockstepApi /// public FinancialAccountBalanceHistoryClient FinancialAccountBalanceHistory { get; } + /// + /// API methods related to FinancialInstitutionAccounts + /// + public FinancialInstitutionAccountsClient FinancialInstitutionAccounts { get; } + /// /// API methods related to FinancialYearSettings /// public FinancialYearSettingsClient FinancialYearSettings { get; } + /// + /// API methods related to GroupAccounts + /// + public GroupAccountsClient GroupAccounts { get; } + /// /// API methods related to InvoiceAddresses /// @@ -154,6 +174,11 @@ public class LockstepApi /// public PaymentsAppliedClient PaymentsApplied { get; } + /// + /// API methods related to Provisioning + /// + public ProvisioningClient Provisioning { get; } + /// /// API methods related to Reports /// @@ -174,6 +199,11 @@ public class LockstepApi /// public TransactionsClient Transactions { get; } + /// + /// API methods related to UserAccounts + /// + public UserAccountsClient UserAccounts { get; } + /// /// API methods related to UserRoles /// @@ -214,6 +244,7 @@ private LockstepApi(string url, HttpClientHandler clientHandler) ApiKeys = new ApiKeysClient(this); AppEnrollments = new AppEnrollmentsClient(this); Applications = new ApplicationsClient(this); + AttachmentLinks = new AttachmentLinksClient(this); Attachments = new AttachmentsClient(this); CodeDefinitions = new CodeDefinitionsClient(this); Companies = new CompaniesClient(this); @@ -222,9 +253,12 @@ private LockstepApi(string url, HttpClientHandler clientHandler) CustomFieldDefinitions = new CustomFieldDefinitionsClient(this); CustomFieldValues = new CustomFieldValuesClient(this); Definitions = new DefinitionsClient(this); + FeatureFlags = new FeatureFlagsClient(this); FinancialAccount = new FinancialAccountClient(this); FinancialAccountBalanceHistory = new FinancialAccountBalanceHistoryClient(this); + FinancialInstitutionAccounts = new FinancialInstitutionAccountsClient(this); FinancialYearSettings = new FinancialYearSettingsClient(this); + GroupAccounts = new GroupAccountsClient(this); InvoiceAddresses = new InvoiceAddressesClient(this); InvoiceLines = new InvoiceLinesClient(this); Invoices = new InvoicesClient(this); @@ -232,10 +266,12 @@ private LockstepApi(string url, HttpClientHandler clientHandler) Notes = new NotesClient(this); Payments = new PaymentsClient(this); PaymentsApplied = new PaymentsAppliedClient(this); + Provisioning = new ProvisioningClient(this); Reports = new ReportsClient(this); Status = new StatusClient(this); Sync = new SyncClient(this); Transactions = new TransactionsClient(this); + UserAccounts = new UserAccountsClient(this); UserRoles = new UserRolesClient(this); WebhookRules = new WebhookRulesClient(this); Webhooks = new WebhooksClient(this); diff --git a/src/Models/AttachmentLinkModel.cs b/src/Models/AttachmentLinkModel.cs new file mode 100644 index 0000000..88722cb --- /dev/null +++ b/src/Models/AttachmentLinkModel.cs @@ -0,0 +1,78 @@ +/*** + * 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 + * @copyright 2021-2025 Lockstep, Inc. + * @link https://github.com/Lockstep-Network/lockstep-sdk-csharp + */ + + + +#pragma warning disable CS8618 + +using System; + +namespace LockstepSDK.Models +{ + + /// + /// An Attachment Link represents a single link between any nestable object and an attachment + /// + public class AttachmentLinkModel + { + + /// + /// The GroupKey uniquely identifies a single ADS Platform account. All records for this + /// account will share the same GroupKey value. GroupKey values cannot be changed once created. + /// + /// For more information, see [Accounts and GroupKeys](https://developer.lockstep.io/docs/accounts-and-groupkeys). + /// + public Guid? GroupKey { get; set; } + + /// + /// The unique ID of an attachment record, automatically assigned by ADS when this record is + /// added to the ADS Platform. + /// + public Guid? AttachmentId { get; set; } + + /// + /// An Attachment is connected to an existing item within the ADS Platform by the fields `TableKey` and + /// `ObjectKey`. For example, an Attachment connected to Invoice 12345 would have a `TableKey` value of + /// `Invoice` and an `ObjectKey` value of `12345`. + /// + /// The `ObjectKey` value contains the primary key of the record within the ADS Platform to which this + /// Attachment is connected. + /// + /// For more information, see [linking metadata to an object](https://developer.lockstep.io/docs/custom-fields#linking-metadata-to-an-object). + /// + public Guid? ObjectKey { get; set; } + + /// + /// An Attachment is connected to an existing item within the ADS Platform by the fields `TableKey` and + /// `ObjectKey`. For example, an Attachment connected to Invoice 12345 would have a `TableKey` value of + /// `Invoice` and an `ObjectKey` value of `12345`. + /// + /// The `TableKey` value contains the name of the table within the ADS Platform to which this Attachment + /// is connected. + /// + /// For more information, see [linking metadata to an object](https://developer.lockstep.io/docs/custom-fields#linking-metadata-to-an-object). + /// + public string TableKey { get; set; } + + /// + /// The date the Attachment Link was created. + /// + public DateTime? Created { get; set; } + + /// + /// The unique ID of the [UserAccount](https://developer.lockstep.io/docs/useraccountmodel) of the user + /// who created this Attachment Link. + /// + public Guid? CreatedUserId { get; set; } + } +} diff --git a/src/Models/CompanyDetailsModel.cs b/src/Models/CompanyDetailsModel.cs new file mode 100644 index 0000000..db7e466 --- /dev/null +++ b/src/Models/CompanyDetailsModel.cs @@ -0,0 +1,142 @@ +/*** + * 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 + * @copyright 2021-2025 Lockstep, Inc. + * @link https://github.com/Lockstep-Network/lockstep-sdk-csharp + */ + + + +#pragma warning disable CS8618 + +using System; + +namespace LockstepSDK.Models +{ + + /// + /// Contains company details data + /// + public class CompanyDetailsModel + { + + /// + /// The GroupKey uniquely identifies a single ADS Platform account. All records for this + /// account will share the same GroupKey value. GroupKey values cannot be changed once created. + /// + /// For more information, see [Accounts and GroupKeys](https://developer.lockstep.io/docs/accounts-and-groupkeys). + /// + public Guid? GroupKey { get; set; } + + /// + /// The unique ID of this company + /// + public Guid? CustomerId { get; set; } + + /// + /// The unique ID of this company + /// + public string Name { get; set; } + + /// + /// Company address info + /// + public string Address1 { get; set; } + + /// + /// Company address info + /// + public string Address2 { get; set; } + + /// + /// Company address info + /// + public string Address3 { get; set; } + + /// + /// Company address info + /// + public string City { get; set; } + + /// + /// Company address info + /// + public string State { get; set; } + + /// + /// Company address info + /// + public string PostalCode { get; set; } + + /// + /// Company address country + /// + public string Country { get; set; } + + /// + /// Company phone number + /// + public string PhoneNumber { get; set; } + + /// + /// Company fax number + /// + public string FaxNumber { get; set; } + + /// + /// Company email address + /// + public string Email { get; set; } + + /// + /// Company primary contact id + /// + public Guid? ContactId { get; set; } + + /// + /// Company primary contact name + /// + public string ContactName { get; set; } + + /// + /// Company primary contact email address + /// + public string ContactEmail { get; set; } + + /// + /// Company number of outstanding invoices + /// + [Obsolete("This field is deprecated.")] + public int? OutstandingInvoices { get; set; } + + /// + /// The group's base currency code. + /// + [Obsolete("This field is deprecated.")] + public string GroupBaseCurrencyCode { get; set; } + + /// + /// Company total outstanding invoice amount in the group's base currency. + /// + [Obsolete("This field is deprecated.")] + public decimal? OutstandingAmount { get; set; } + + /// + /// Company total past due amount in the group's base currency. + /// + [Obsolete("This field is deprecated.")] + public decimal? AmountPastDue { get; set; } + + /// + /// Company payments collected + /// + [Obsolete("This field is deprecated.")] + public CompanyDetailsPaymentModel[] Payments { get; set; } + } +} diff --git a/src/Models/CompanyDetailsPaymentModel.cs b/src/Models/CompanyDetailsPaymentModel.cs new file mode 100644 index 0000000..6276e79 --- /dev/null +++ b/src/Models/CompanyDetailsPaymentModel.cs @@ -0,0 +1,92 @@ +/*** + * 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 + * @copyright 2021-2025 Lockstep, Inc. + * @link https://github.com/Lockstep-Network/lockstep-sdk-csharp + */ + + + +#pragma warning disable CS8618 + +using System; + +namespace LockstepSDK.Models +{ + + /// + /// Company payment collected information + /// + public class CompanyDetailsPaymentModel + { + + /// + /// The GroupKey uniquely identifies a single ADS Platform account. All records for this + /// account will share the same GroupKey value. GroupKey values cannot be changed once created. + /// + /// For more information, see [Accounts and GroupKeys](https://developer.lockstep.io/docs/accounts-and-groupkeys). + /// + public Guid? GroupKey { get; set; } + + /// + /// Unique identifier for payment + /// + public Guid? PaymentId { get; set; } + + /// + /// Unique identifier for payment applied + /// + public Guid? PaymentAppliedId { get; set; } + + /// + /// Payment type + /// + public string PaymentType { get; set; } + + /// + /// Unique identifier for invoice payment is associated with + /// + public Guid? InvoiceId { get; set; } + + /// + /// Invoice type payment is associated with + /// + public string InvoiceTypeCode { get; set; } + + /// + /// Invoice reference code payment is associated with + /// + public string InvoiceReferenceCode { get; set; } + + /// + /// The currency code of the invoice the payment is associated with. + /// + public string InvoiceCurrencyCode { get; set; } + + /// + /// Invoice total amount payment is associated with + /// + public decimal? InvoiceTotalAmount { get; set; } + + /// + /// Date payment placed + /// + public DateTime? PaymentDate { get; set; } + + /// + /// The currency code of the payment. + /// + public string PaymentCurrencyCode { get; set; } + + /// + /// Amount payment was made for + /// + public decimal? PaymentAmount { get; set; } + } +} diff --git a/src/Models/CompanyIdentifierModel.cs b/src/Models/CompanyIdentifierModel.cs new file mode 100644 index 0000000..4395628 --- /dev/null +++ b/src/Models/CompanyIdentifierModel.cs @@ -0,0 +1,49 @@ +/*** + * 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 + * @copyright 2021-2025 Lockstep, Inc. + * @link https://github.com/Lockstep-Network/lockstep-sdk-csharp + */ + + + +#pragma warning disable CS8618 + +using System; + +namespace LockstepSDK.Models +{ + + /// + /// A model representing a company identifier. + /// + public class CompanyIdentifierModel + { + + /// + /// The type of identifier. + /// + public string Type { get; set; } + + /// + /// The value of the identifier. + /// + public string Value { get; set; } + + /// + /// The jurisdiction of the identifier. + /// + public string Jurisdiction { get; set; } + + /// + /// The sub-jurisdiction of the identifier, ISO3166-1 or ISO3166-2 code. + /// + public string Subjurisdiction { get; set; } + } +} diff --git a/src/Models/CustomerSummaryModel.cs b/src/Models/CustomerSummaryModel.cs new file mode 100644 index 0000000..db54d35 --- /dev/null +++ b/src/Models/CustomerSummaryModel.cs @@ -0,0 +1,163 @@ +/*** + * 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 + * @copyright 2021-2025 Lockstep, Inc. + * @link https://github.com/Lockstep-Network/lockstep-sdk-csharp + */ + + + +#pragma warning disable CS8618 + +using System; + +namespace LockstepSDK.Models +{ + + /// + /// Contains summarized data for a customer + /// + public class CustomerSummaryModel + { + + /// + /// The GroupKey uniquely identifies a single ADS Platform account. All records for this + /// account will share the same GroupKey value. GroupKey values cannot be changed once created. + /// + /// For more information, see [Accounts and GroupKeys](https://developer.lockstep.io/docs/accounts-and-groupkeys). + /// + public Guid? GroupKey { get; set; } + + /// + /// The unique ID of this company. + /// + public Guid? CompanyId { get; set; } + + /// + /// The name of the company. + /// + public string CompanyName { get; set; } + + /// + /// The name of the primary contact. + /// + public string PrimaryContact { get; set; } + + /// + /// The app enrollment ID this Customer is associated with + /// + public Guid? AppEnrollmentId { get; set; } + + /// + /// The number of outstanding invoices for this customer. + /// + public int? OutstandingInvoices { get; set; } + + /// + /// The number of open invoices. + /// + [Obsolete("This field is deprecated.")] + public int? TotalInvoicesOpen { get; set; } + + /// + /// The number of past due invoices. + /// + [Obsolete("This field is deprecated.")] + public int? TotalInvoicesPastDue { get; set; } + + /// + /// The number of closed invoices for this customer. + /// + [Obsolete("This field is deprecated.")] + public int? ClosedInvoices { get; set; } + + /// + /// The number of closed invoices for this customer in the past thirty days. + /// + [Obsolete("This field is deprecated.")] + public int? ClosedInvoicesPastThirtyDays { get; set; } + + /// + /// The total from collected payments. + /// + [Obsolete("This field is deprecated.")] + public decimal? AmountCollected { get; set; } + + /// + /// The total from collected payments in the past thirty days. + /// + [Obsolete("This field is deprecated.")] + public decimal? AmountCollectedPastThirtyDays { get; set; } + + /// + /// The total balance of outstanding invoices. + /// + public decimal? OutstandingAmount { get; set; } + + /// + /// The total amount invoiced in the past thirty days. + /// + [Obsolete("This field is deprecated.")] + public decimal? InvoicedAmountPastThirtyDays { get; set; } + + /// + /// The total amount outstanding from the invoices invoiced in the past thirty days. + /// + [Obsolete("This field is deprecated.")] + public decimal? OutstandingAmountPastThirtyDays { get; set; } + + /// + /// The number of invoices invoiced in the past thirty days. + /// + [Obsolete("This field is deprecated.")] + public int? InvoicesPastThirtyDays { get; set; } + + /// + /// The total amount past due for this customer. + /// + public decimal? AmountPastDue { get; set; } + + /// + /// The total value of unapplied Payments for this Customer. + /// + [Obsolete("This field is deprecated.")] + public decimal? UnappliedPayments { get; set; } + + /// + /// The total value of unapplied Payments for this Customer in the past thirty days. + /// + [Obsolete("This field is deprecated.")] + public decimal? UnappliedAmountPastThirtyDays { get; set; } + + /// + /// Portion of Total AR for this Customer that is Past due. (TotalPastDue / Total AR). + /// + [Obsolete("This field is deprecated.")] + public decimal? PercentOfTotalAr { get; set; } + + /// + /// Daily sales outstanding value for this Customer. + /// + [Obsolete("This field is deprecated.")] + public decimal? Dso { get; set; } + + /// + /// The date stamp for the newest Activity on this Customer. + /// + /// This is a date-only field stored as a string in ISO 8601 (YYYY-MM-DD) format. + /// + [Obsolete("This field is deprecated.")] + public string NewestActivity { get; set; } + + /// + /// The modified date of the customer. + /// + public DateTime? Modified { get; set; } + } +} diff --git a/src/Models/DeveloperAccountSubmitModel.cs b/src/Models/DeveloperAccountSubmitModel.cs new file mode 100644 index 0000000..e67d9b3 --- /dev/null +++ b/src/Models/DeveloperAccountSubmitModel.cs @@ -0,0 +1,49 @@ +/*** + * 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 + * @copyright 2021-2025 Lockstep, Inc. + * @link https://github.com/Lockstep-Network/lockstep-sdk-csharp + */ + + + +#pragma warning disable CS8618 + +using System; + +namespace LockstepSDK.Models +{ + + /// + /// Model containing information to create a new developer account. + /// + public class DeveloperAccountSubmitModel + { + + /// + /// The first name of the person requesting the developer account. + /// + public string FirstName { get; set; } + + /// + /// The last name of the person requesting the developer account. + /// + public string LastName { get; set; } + + /// + /// The email address of the developer. + /// + public string Email { get; set; } + + /// + /// The company name of the developer. + /// + public string CompanyName { get; set; } + } +} diff --git a/src/Models/FeatureFlagsRequestModel.cs b/src/Models/FeatureFlagsRequestModel.cs new file mode 100644 index 0000000..64f97eb --- /dev/null +++ b/src/Models/FeatureFlagsRequestModel.cs @@ -0,0 +1,34 @@ +/*** + * 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 + * @copyright 2021-2025 Lockstep, Inc. + * @link https://github.com/Lockstep-Network/lockstep-sdk-csharp + */ + + + +#pragma warning disable CS8618 + +using System; + +namespace LockstepSDK.Models +{ + + /// + /// Request information for Feature Flags + /// + public class FeatureFlagsRequestModel + { + + /// + /// The names of Feature Flags + /// + public string[] Names { get; set; } + } +} diff --git a/src/Models/FeatureFlagsResponseModel.cs b/src/Models/FeatureFlagsResponseModel.cs new file mode 100644 index 0000000..b0d455b --- /dev/null +++ b/src/Models/FeatureFlagsResponseModel.cs @@ -0,0 +1,34 @@ +/*** + * 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 + * @copyright 2021-2025 Lockstep, Inc. + * @link https://github.com/Lockstep-Network/lockstep-sdk-csharp + */ + + + +#pragma warning disable CS8618 + +using System; + +namespace LockstepSDK.Models +{ + + /// + /// Response information for Feature Flags + /// + public class FeatureFlagsResponseModel + { + + /// + /// State of the requested Feature Flags + /// + public object Values { get; set; } + } +} diff --git a/src/Models/FinancialInstitutionAccountModel.cs b/src/Models/FinancialInstitutionAccountModel.cs new file mode 100644 index 0000000..488d0f8 --- /dev/null +++ b/src/Models/FinancialInstitutionAccountModel.cs @@ -0,0 +1,99 @@ +/*** + * 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 + * @copyright 2021-2025 Lockstep, Inc. + * @link https://github.com/Lockstep-Network/lockstep-sdk-csharp + */ + + + +#pragma warning disable CS8618 + +using System; + +namespace LockstepSDK.Models +{ + + /// + /// An Financial Institution Account represents an account used for monetary transactions. E.g. - checking, savings, or credit card accounts. + /// + public class FinancialInstitutionAccountModel + { + + /// + /// The unique identifier for the Financial Institution Account. + /// + public Guid? FinancialInstitutionAccountId { get; set; } + + /// + /// The GroupKey uniquely identifies a single ADS Platform account. All records for this + /// account will share the same GroupKey value. GroupKey values cannot be changed once created. + /// + /// For more information, see [Accounts and GroupKeys](https://developer.lockstep.io/docs/accounts-and-groupkeys). + /// + public Guid? GroupKey { get; set; } + + /// + /// An alternate account id for the Financial Institution Account. + /// + public string BankAccountId { get; set; } + + /// + /// The External Id for the Financial Institution Account. + /// + public string ErpKey { get; set; } + + /// + /// The App Enrollment Id this Financial Institution is associated with. + /// + public Guid? AppEnrollmentId { get; set; } + + /// + /// The name of the Financial Institution Account. + /// + public string Name { get; set; } + + /// + /// The status of the Financial Institution Account. Possible values are active, + /// inactive, deleted or archived. + /// + public string Status { get; set; } + + /// + /// The description for the Financial Institution Account. + /// + public string Description { get; set; } + + /// + /// The classification for the Financial Institution Account. Possible values are Asset, Equity, + /// Expense, Liability or Income. + /// + public string AccountType { get; set; } + + /// + /// The date the Financial Institution Account was created. + /// + public DateTime? Created { get; set; } + + /// + /// The user that has created the Financial Institution Account. + /// + public Guid? CreatedUserId { get; set; } + + /// + /// The date the Financial Institution Account was modified. + /// + public DateTime? Modified { get; set; } + + /// + /// The user that has modified the Financial Institution Account. + /// + public Guid? ModifiedUserId { get; set; } + } +} diff --git a/src/Models/GroupAccountModel.cs b/src/Models/GroupAccountModel.cs new file mode 100644 index 0000000..910bbee --- /dev/null +++ b/src/Models/GroupAccountModel.cs @@ -0,0 +1,92 @@ +/*** + * 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 + * @copyright 2021-2025 Lockstep, Inc. + * @link https://github.com/Lockstep-Network/lockstep-sdk-csharp + */ + + + +#pragma warning disable CS8618 + +using System; + +namespace LockstepSDK.Models +{ + + /// + /// Represents an account for an entire group + /// + public class GroupAccountModel + { + + /// + /// The GroupKey uniquely identifies a single ADS Platform account. All records for this + /// account will share the same GroupKey value. GroupKey values cannot be changed once created. + /// + /// For more information, see [Accounts and GroupKeys](https://developer.lockstep.io/docs/accounts-and-groupkeys). + /// + public Guid? GroupKey { get; set; } + + /// + /// The name of the group + /// + public string GroupName { get; set; } + + /// + /// The primary user for the group + /// + public Guid? PrimaryUserId { get; set; } + + /// + /// The CompanyId of the Company the group is associated with + /// + public Guid? GroupCompanyId { get; set; } + + /// + /// Base Currency of the group + /// + public string BaseCurrencyCode { get; set; } + + /// + /// The active status of the group + /// + public bool? IsActive { get; set; } + + /// + /// The onboarding session status of the group + /// + public bool? OnboardingScheduled { get; set; } + + /// + /// The date this group account was created + /// + public DateTime? Created { get; set; } + + /// + /// The ID of the user who created this group account + /// + public Guid? CreatedUserId { get; set; } + + /// + /// The date this group account was last modified + /// + public DateTime? Modified { get; set; } + + /// + /// The ID of the user who last modified this group account + /// + public Guid? ModifiedUserId { get; set; } + + /// + /// The 2-letter ISO country code for the group + /// + public string CountryCode { get; set; } + } +} diff --git a/src/Models/InviteDataModel.cs b/src/Models/InviteDataModel.cs new file mode 100644 index 0000000..85d9d74 --- /dev/null +++ b/src/Models/InviteDataModel.cs @@ -0,0 +1,39 @@ +/*** + * 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 + * @copyright 2021-2025 Lockstep, Inc. + * @link https://github.com/Lockstep-Network/lockstep-sdk-csharp + */ + + + +#pragma warning disable CS8618 + +using System; + +namespace LockstepSDK.Models +{ + + /// + /// Model containing information about a user for the invite/onboarding process. + /// + public class InviteDataModel + { + + /// + /// The email address of the invited user. + /// + public string Email { get; set; } + + /// + /// The status of the user. + /// + public string UserStatus { get; set; } + } +} diff --git a/src/Models/InviteModel.cs b/src/Models/InviteModel.cs new file mode 100644 index 0000000..783a8aa --- /dev/null +++ b/src/Models/InviteModel.cs @@ -0,0 +1,49 @@ +/*** + * 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 + * @copyright 2021-2025 Lockstep, Inc. + * @link https://github.com/Lockstep-Network/lockstep-sdk-csharp + */ + + + +#pragma warning disable CS8618 + +using System; + +namespace LockstepSDK.Models +{ + + /// + /// Model from the User invite process + /// + public class InviteModel + { + + /// + /// The invited email address + /// + public string Email { get; set; } + + /// + /// True if the invite was sent successfully + /// + public bool? Success { get; set; } + + /// + /// The invited user, may be null if the user could not be invited + /// + public UserAccountModel InvitedUser { get; set; } + + /// + /// The error message if the invite was not successful + /// + public string ErrorMessage { get; set; } + } +} diff --git a/src/Models/InviteSubmitModel.cs b/src/Models/InviteSubmitModel.cs new file mode 100644 index 0000000..58104b8 --- /dev/null +++ b/src/Models/InviteSubmitModel.cs @@ -0,0 +1,34 @@ +/*** + * 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 + * @copyright 2021-2025 Lockstep, Inc. + * @link https://github.com/Lockstep-Network/lockstep-sdk-csharp + */ + + + +#pragma warning disable CS8618 + +using System; + +namespace LockstepSDK.Models +{ + + /// + /// Model to invite a new user to your accounting group + /// + public class InviteSubmitModel + { + + /// + /// The email address of the user to invite + /// + public string Email { get; set; } + } +} diff --git a/src/Models/InvoiceSummaryModelInvoiceSummaryTotalsModelSummaryFetchResult.cs b/src/Models/InvoiceSummaryModelInvoiceSummaryTotalsModelSummaryFetchResult.cs new file mode 100644 index 0000000..24b5682 --- /dev/null +++ b/src/Models/InvoiceSummaryModelInvoiceSummaryTotalsModelSummaryFetchResult.cs @@ -0,0 +1,43 @@ +/*** + * 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 + * @copyright 2021-2025 Lockstep, Inc. + * @link https://github.com/Lockstep-Network/lockstep-sdk-csharp + */ + + + +#pragma warning disable CS8618 + +using System; + +namespace LockstepSDK.Models +{ + + public class InvoiceSummaryModelInvoiceSummaryTotalsModelSummaryFetchResult + { + + public int? TotalCount { get; set; } + + public int? PageSize { get; set; } + + public int? PageNumber { get; set; } + + public InvoiceSummaryModel[] Records { get; set; } + + /// + /// The totals for an Invoice Summary + /// + public InvoiceSummaryTotalsModel Summary { get; set; } + + public SummaryAgingTotalsModel[] AgingSummary { get; set; } + + public TransactionCurrencySummaryModel[] CurrencySummaries { get; set; } + } +} diff --git a/src/Models/InvoiceSummaryTotalsModel.cs b/src/Models/InvoiceSummaryTotalsModel.cs new file mode 100644 index 0000000..62c61d0 --- /dev/null +++ b/src/Models/InvoiceSummaryTotalsModel.cs @@ -0,0 +1,39 @@ +/*** + * 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 + * @copyright 2021-2025 Lockstep, Inc. + * @link https://github.com/Lockstep-Network/lockstep-sdk-csharp + */ + + + +#pragma warning disable CS8618 + +using System; + +namespace LockstepSDK.Models +{ + + /// + /// The totals for an Invoice Summary + /// + public class InvoiceSummaryTotalsModel + { + + /// + /// The total amount invoiced. + /// + public decimal? TotalInvoiceAmount { get; set; } + + /// + /// The total outstanding balance + /// + public decimal? TotalInvoiceBalance { get; set; } + } +} diff --git a/src/Models/MagicLinkModel.cs b/src/Models/MagicLinkModel.cs index 7e3ccde..7b20bcc 100644 --- a/src/Models/MagicLinkModel.cs +++ b/src/Models/MagicLinkModel.cs @@ -88,6 +88,12 @@ public class MagicLinkModel /// public Guid? CompanyId { get; set; } + /// + /// The ID of the accounting profile associated to this magic link + /// + [Obsolete("This field is deprecated.")] + public Guid? AccountingProfileId { get; set; } + /// /// The created magic link URL. This will only be returned upon creation of the magic link. /// All other times, this value will be `null`. diff --git a/src/Models/MagicLinkStatusModel.cs b/src/Models/MagicLinkStatusModel.cs index 9559659..792aac7 100644 --- a/src/Models/MagicLinkStatusModel.cs +++ b/src/Models/MagicLinkStatusModel.cs @@ -41,6 +41,12 @@ public class MagicLinkStatusModel /// public Guid? CompanyId { get; set; } + /// + /// The id of the accounting profile for the Magic Link + /// + [Obsolete("This field is deprecated.")] + public Guid? AccountingProfileId { get; set; } + /// /// The UTC date and time when this magic link expires. /// diff --git a/src/Models/PaymentDetailModel.cs b/src/Models/PaymentDetailModel.cs new file mode 100644 index 0000000..ce52716 --- /dev/null +++ b/src/Models/PaymentDetailModel.cs @@ -0,0 +1,205 @@ +/*** + * 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 + * @copyright 2021-2025 Lockstep, Inc. + * @link https://github.com/Lockstep-Network/lockstep-sdk-csharp + */ + + + +#pragma warning disable CS8618 + +using System; + +namespace LockstepSDK.Models +{ + + /// + /// Contains detailed information about a Payment. + /// + public class PaymentDetailModel + { + + /// + /// The GroupKey uniquely identifies a single ADS Platform account. All records for this + /// account will share the same GroupKey value. GroupKey values cannot be changed once created. + /// + /// For more information, see [Accounts and GroupKeys](https://developer.lockstep.io/docs/accounts-and-groupkeys). + /// + public Guid? GroupKey { get; set; } + + /// + /// The unique ID of this Payment. + /// + public Guid? PaymentId { get; set; } + + /// + /// The ID of the customer to which this Payment belongs. + /// + public Guid? CustomerId { get; set; } + + /// + /// The name of the customer to which this Payment belongs. + /// + public string CustomerName { get; set; } + + /// + /// Memo or reference text (ex. memo field on a check). + /// + [Obsolete("This field is deprecated.")] + public string MemoText { get; set; } + + /// + /// Reference code for the payment for the given Erp system. + /// + public string ReferenceCode { get; set; } + + /// + /// The name of the Primary Contact for the Customer. + /// + public string PrimaryContact { get; set; } + + /// + /// The Email address of the Customer. + /// + public string Email { get; set; } + + /// + /// Possible statuses for a record that supports ERP write. + /// + public int? ErpWriteStatus { get; set; } + + /// + /// The name of the ErpWriteStatus for this payment + /// + public string ErpWriteStatusName { get; set; } + + /// + /// The currency code of the payment. + /// + public string CurrencyCode { get; set; } + + /// + /// Total amount of this Payment. + /// + public decimal? PaymentAmount { get; set; } + + /// + /// Unapplied balance of this Payment. + /// + public decimal? UnappliedAmount { get; set; } + + /// + /// The base currency code of the group. + /// + [Obsolete("This field is deprecated.")] + public string BaseCurrencyCode { get; set; } + + /// + /// The payment amount in the group's base currency. + /// + [Obsolete("This field is deprecated.")] + public decimal? BaseCurrencyPaymentAmount { get; set; } + + /// + /// The payment amount in the group's base currency. + /// + [Obsolete("This field is deprecated.")] + public decimal? BaseCurrencyUnappliedAmount { get; set; } + + /// + /// The type of payment, AR Payment or AP Payment. + /// + /// Recognized PaymentType values are: + /// * `AR Payment` - A payment made by a Customer to the Company + /// * `AP Payment` - A payment made by the Company to a Vendor + /// + [Obsolete("This field is deprecated.")] + public string PaymentType { get; set; } + + /// + /// Cash, check, credit card, wire transfer. + /// + /// Recognized TenderType values are: + /// * `Cash` - A cash payment or other direct transfer. + /// * `Check` - A check payment. + /// * `Credit Card` - A payment made via a credit card. + /// * `Wire Transfer` - A payment made via wire transfer from another financial institution. + /// * `Other` - A payment made via another method not listed above. + /// + public string TenderType { get; set; } + + /// + /// The date of this Payment. + /// + /// This is a date-only field stored as a string in ISO 8601 (YYYY-MM-DD) format. + /// + public string PaymentDate { get; set; } + + /// + /// Payment post date. + /// + /// This is a date-only field stored as a string in ISO 8601 (YYYY-MM-DD) format. + /// + public string PostDate { get; set; } + + /// + /// The phone number of the Customer's Primary Contact. + /// + public string Phone { get; set; } + + /// + /// The fax number of the Customer's Primary Contact. + /// + [Obsolete("This field is deprecated.")] + public string Fax { get; set; } + + /// + /// The first line of the address for the Customer's Primary Contact. + /// + [Obsolete("This field is deprecated.")] + public string Address1 { get; set; } + + /// + /// The second line of the address for the Customer's Primary Contact. + /// + [Obsolete("This field is deprecated.")] + public string Address2 { get; set; } + + /// + /// The third line of the address for the Customer's Primary Contact. + /// + [Obsolete("This field is deprecated.")] + public string Address3 { get; set; } + + /// + /// The city of the address for the Customer's Primary Contact. + /// + [Obsolete("This field is deprecated.")] + public string City { get; set; } + + /// + /// The state/region of the address for the Customer's Primary Contact. + /// + [Obsolete("This field is deprecated.")] + public string StateRegion { get; set; } + + /// + /// The postal/zip code of the address for the Customer's Primary Contact. + /// + [Obsolete("This field is deprecated.")] + public string PostalCode { get; set; } + + /// + /// The 2 character country code of the address for the Customer's Primary Contact. + /// + [Obsolete("This field is deprecated.")] + public string CountryCode { get; set; } + } +} diff --git a/src/Models/PaymentSummaryModelPaymentSummaryTotalsModelSummaryFetchResult.cs b/src/Models/PaymentSummaryModelPaymentSummaryTotalsModelSummaryFetchResult.cs new file mode 100644 index 0000000..e9ef834 --- /dev/null +++ b/src/Models/PaymentSummaryModelPaymentSummaryTotalsModelSummaryFetchResult.cs @@ -0,0 +1,43 @@ +/*** + * 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 + * @copyright 2021-2025 Lockstep, Inc. + * @link https://github.com/Lockstep-Network/lockstep-sdk-csharp + */ + + + +#pragma warning disable CS8618 + +using System; + +namespace LockstepSDK.Models +{ + + public class PaymentSummaryModelPaymentSummaryTotalsModelSummaryFetchResult + { + + public int? TotalCount { get; set; } + + public int? PageSize { get; set; } + + public int? PageNumber { get; set; } + + public PaymentSummaryModel[] Records { get; set; } + + /// + /// The totals for a Payment Summary + /// + public PaymentSummaryTotalsModel Summary { get; set; } + + public SummaryAgingTotalsModel[] AgingSummary { get; set; } + + public TransactionCurrencySummaryModel[] CurrencySummaries { get; set; } + } +} diff --git a/src/Models/PaymentSummaryTotalsModel.cs b/src/Models/PaymentSummaryTotalsModel.cs new file mode 100644 index 0000000..11326e9 --- /dev/null +++ b/src/Models/PaymentSummaryTotalsModel.cs @@ -0,0 +1,39 @@ +/*** + * 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 + * @copyright 2021-2025 Lockstep, Inc. + * @link https://github.com/Lockstep-Network/lockstep-sdk-csharp + */ + + + +#pragma warning disable CS8618 + +using System; + +namespace LockstepSDK.Models +{ + + /// + /// The totals for a Payment Summary + /// + public class PaymentSummaryTotalsModel + { + + /// + /// The total amount paid. + /// + public decimal? TotalPaidAmount { get; set; } + + /// + /// The total amount unapplied. + /// + public decimal? TotalUnappliedBalance { get; set; } + } +} diff --git a/src/Models/SupportAccessRequest.cs b/src/Models/SupportAccessRequest.cs new file mode 100644 index 0000000..d0ffb50 --- /dev/null +++ b/src/Models/SupportAccessRequest.cs @@ -0,0 +1,34 @@ +/*** + * 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 + * @copyright 2021-2025 Lockstep, Inc. + * @link https://github.com/Lockstep-Network/lockstep-sdk-csharp + */ + + + +#pragma warning disable CS8618 + +using System; + +namespace LockstepSDK.Models +{ + + /// + /// Sets support access data for a user. + /// + public class SupportAccessRequest + { + + /// + /// The UTC date and time when support access should expire. + /// + public DateTime? ExpiresAt { get; set; } + } +} diff --git a/src/Models/SyncEntityResultModel.cs b/src/Models/SyncEntityResultModel.cs new file mode 100644 index 0000000..a3b79a7 --- /dev/null +++ b/src/Models/SyncEntityResultModel.cs @@ -0,0 +1,64 @@ +/*** + * 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 + * @copyright 2021-2025 Lockstep, Inc. + * @link https://github.com/Lockstep-Network/lockstep-sdk-csharp + */ + + + +#pragma warning disable CS8618 + +using System; + +namespace LockstepSDK.Models +{ + + /// + /// Contains information about a sync process for an entity. + /// + public class SyncEntityResultModel + { + + /// + /// The number of entities inserted + /// + public int? InsertCount { get; set; } + + /// + /// The number of entities updated + /// + public int? UpdateCount { get; set; } + + /// + /// The number of entities deleted + /// + public int? DeleteCount { get; set; } + + /// + /// The number of entities skipped + /// + public int? SkipCount { get; set; } + + /// + /// The number of errors encountered during sync + /// + public int? ErrorCount { get; set; } + + /// + /// The errors encountered during sync keyed by ERP key + /// + public object Errors { get; set; } + + /// + /// The records that were skipped during sync keyed by ERP key + /// + public object Skips { get; set; } + } +} diff --git a/src/Models/TransferOwnerModel.cs b/src/Models/TransferOwnerModel.cs new file mode 100644 index 0000000..278a085 --- /dev/null +++ b/src/Models/TransferOwnerModel.cs @@ -0,0 +1,39 @@ +/*** + * 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 + * @copyright 2021-2025 Lockstep, Inc. + * @link https://github.com/Lockstep-Network/lockstep-sdk-csharp + */ + + + +#pragma warning disable CS8618 + +using System; + +namespace LockstepSDK.Models +{ + + /// + /// Model from the transfer ownership process. + /// + public class TransferOwnerModel + { + + /// + /// The previous owner of the account. + /// + public UserAccountModel PreviousOwner { get; set; } + + /// + /// The new owner of the account. + /// + public UserAccountModel NewOwner { get; set; } + } +} diff --git a/src/Models/TransferOwnerSubmitModel.cs b/src/Models/TransferOwnerSubmitModel.cs new file mode 100644 index 0000000..cb9d812 --- /dev/null +++ b/src/Models/TransferOwnerSubmitModel.cs @@ -0,0 +1,34 @@ +/*** + * 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 + * @copyright 2021-2025 Lockstep, Inc. + * @link https://github.com/Lockstep-Network/lockstep-sdk-csharp + */ + + + +#pragma warning disable CS8618 + +using System; + +namespace LockstepSDK.Models +{ + + /// + /// Model used to submit a transfer ownership request + /// + public class TransferOwnerSubmitModel + { + + /// + /// The ID of the user to transfer ownership to. + /// + public Guid? TargetUserId { get; set; } + } +} diff --git a/src/Models/UserDataResponseModel.cs b/src/Models/UserDataResponseModel.cs new file mode 100644 index 0000000..a9372fd --- /dev/null +++ b/src/Models/UserDataResponseModel.cs @@ -0,0 +1,39 @@ +/*** + * 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 + * @copyright 2021-2025 Lockstep, Inc. + * @link https://github.com/Lockstep-Network/lockstep-sdk-csharp + */ + + + +#pragma warning disable CS8618 + +using System; + +namespace LockstepSDK.Models +{ + + /// + /// Contains data about the current user. + /// + public class UserDataResponseModel + { + + /// + /// Data about the user, the properties returned will depend on the requested information. + /// + public object Data { get; set; } + + /// + /// The ADS Platform ID of the user + /// + public Guid? UserId { get; set; } + } +} diff --git a/src/Models/VendorSummaryModel.cs b/src/Models/VendorSummaryModel.cs new file mode 100644 index 0000000..d0b1b24 --- /dev/null +++ b/src/Models/VendorSummaryModel.cs @@ -0,0 +1,172 @@ +/*** + * 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 + * @copyright 2021-2025 Lockstep, Inc. + * @link https://github.com/Lockstep-Network/lockstep-sdk-csharp + */ + + + +#pragma warning disable CS8618 + +using System; + +namespace LockstepSDK.Models +{ + + /// + /// Contains summarized data for a vendor + /// + public class VendorSummaryModel + { + + /// + /// The GroupKey uniquely identifies a single ADS Platform account. All records for this + /// account will share the same GroupKey value. GroupKey values cannot be changed once created. + /// + /// For more information, see [Accounts and GroupKeys](https://developer.lockstep.io/docs/accounts-and-groupkeys). + /// + public Guid? GroupKey { get; set; } + + /// + /// The unique ID of this Vendor + /// + public Guid? VendorId { get; set; } + + /// + /// The name of this Vendor + /// + public string VendorName { get; set; } + + /// + /// The app enrollment ID this Vendor is associated with + /// + public Guid? AppEnrollmentId { get; set; } + + /// + /// The name of this Vendor's primary contact + /// + public string PrimaryContactName { get; set; } + + /// + /// This Vendor's primary contact id + /// + public Guid? PrimaryContactId { get; set; } + + /// + /// The amount paid to this Vendor in the last 30 days + /// + [Obsolete("This field is deprecated.")] + public decimal? AmountPaidLast30 { get; set; } + + /// + /// The amount paid to this Vendor in the last 30 days + /// + [Obsolete("This field is deprecated.")] + public decimal? AmountPaidPastThirtyDays { get; set; } + + /// + /// The outstanding advance pay balance on payments in the last 30 days + /// + [Obsolete("This field is deprecated.")] + public decimal? AdvancePayLast30 { get; set; } + + /// + /// The outstanding advance pay balance on payments in the last 30 days + /// + [Obsolete("This field is deprecated.")] + public decimal? AdvancePayPastThirtyDays { get; set; } + + /// + /// The outstanding advance pay balance with this Vendor + /// + [Obsolete("This field is deprecated.")] + public decimal? AdvancePayOutstanding { get; set; } + + /// + /// The amount billed from this Vendor in the last 30 days + /// + [Obsolete("This field is deprecated.")] + public decimal? AmountBilledLast30 { get; set; } + + /// + /// The amount billed from this Vendor in the last 30 days + /// + public decimal? AmountBilledPastThirtyDays { get; set; } + + /// + /// The outstanding balance with this Vendor for bills in the last 30 days + /// + [Obsolete("This field is deprecated.")] + public decimal? AmountBilledOutstandingLast30 { get; set; } + + /// + /// The outstanding balance with this Vendor for bills in the last 30 days + /// + [Obsolete("This field is deprecated.")] + public decimal? AmountBilledOutstandingPastThirtyDays { get; set; } + + /// + /// The outstanding balance with this Vendor + /// + public decimal? AmountBilledOutstanding { get; set; } + + /// + /// The number of bills received from this Vendor in the last 30 days + /// + [Obsolete("This field is deprecated.")] + public int? BillCountLast30 { get; set; } + + /// + /// The number of bills received from this Vendor in the last 30 days + /// + [Obsolete("This field is deprecated.")] + public int? BillCountPastThirtyDays { get; set; } + + /// + /// The number of bills from this Vendor that were paid in full in the last 30 days + /// + [Obsolete("This field is deprecated.")] + public int? PaidBillCountLast30 { get; set; } + + /// + /// The number of bills from this Vendor that were paid in full in the last 30 days + /// + [Obsolete("This field is deprecated.")] + public int? PaidBillCountPastThirtyDays { get; set; } + + /// + /// The number of open bills with this Vendor + /// + public int? OpenBillCount { get; set; } + + /// + /// The number of bills paid to this Vendor + /// + [Obsolete("This field is deprecated.")] + public int? PaidBillCount { get; set; } + + /// + /// The total count of open and closed bills. + /// + [Obsolete("This field is deprecated.")] + public int? TotalBillCount { get; set; } + + /// + /// The days payabale outstanding. + /// + [Obsolete("This field is deprecated.")] + public decimal? Dpo { get; set; } + + /// + /// The modified date of the Vendor + /// + public DateTime? Modified { get; set; } + } +} diff --git a/src/Models/ViewBoxSettingsModel.cs b/src/Models/ViewBoxSettingsModel.cs new file mode 100644 index 0000000..d5e26c1 --- /dev/null +++ b/src/Models/ViewBoxSettingsModel.cs @@ -0,0 +1,49 @@ +/*** + * 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 + * @copyright 2021-2025 Lockstep, Inc. + * @link https://github.com/Lockstep-Network/lockstep-sdk-csharp + */ + + + +#pragma warning disable CS8618 + +using System; + +namespace LockstepSDK.Models +{ + + /// + /// Optional meta data for image view box settings. + /// + public class ViewBoxSettingsModel + { + + /// + /// ViewBox minX setting for this Company's logo. + /// + public decimal? LogoViewBoxMinX { get; set; } + + /// + /// ViewBox minY setting for this Company's logo. + /// + public decimal? LogoViewBoxMinY { get; set; } + + /// + /// ViewBox width setting for this Company's logo. + /// + public decimal? LogoViewBoxWidth { get; set; } + + /// + /// ViewBox height setting for this Company's logo. + /// + public decimal? LogoViewBoxHeight { get; set; } + } +} diff --git a/src/Models/WorkflowStatusModel.cs b/src/Models/WorkflowStatusModel.cs index 163960c..fab42c9 100644 --- a/src/Models/WorkflowStatusModel.cs +++ b/src/Models/WorkflowStatusModel.cs @@ -42,6 +42,12 @@ public class WorkflowStatusModel /// public string Description { get; set; } + /// + /// The prior workflow status ID. + /// + [Obsolete("This field is deprecated.")] + public Guid? ParentWorkflowStatusId { get; set; } + /// /// The category of the workflow status. /// diff --git a/src/clients/ApplicationsClient.cs b/src/clients/ApplicationsClient.cs index d10d152..5cf0943 100644 --- a/src/clients/ApplicationsClient.cs +++ b/src/clients/ApplicationsClient.cs @@ -55,6 +55,57 @@ public async Task> RetrieveApplication(Guid i return await _client.Request(HttpMethod.Get, url, options, null, null); } + /// + /// Updates an existing Application with the information supplied to this PATCH call. + /// + /// 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. For example, you can provide the field name "IsActive" and specify the new value "False"; this API will then change the value of IsActive to false. + /// + /// An Application represents a feature available to customers within the ADS Platform. You can create Applications by working with your ADS Platform business development manager and publish them on the platform so that customers can browse and find your Application on the ADS Platform Marketplace. When a customer adds an Application to their account, they obtain an AppEnrollment which represents that customer's instance of this Application. The customer-specific AppEnrollment contains a customer's configuration data for the Application, which is not customer-specific. + /// + /// See [Applications and Enrollments](https://developer.lockstep.io/docs/applications-and-enrollments) for more information. + /// + /// + /// The unique ID number of the Application to update + /// A list of changes to apply to this Application + [Obsolete("This endpoint is deprecated.")] + public async Task> UpdateApplication(Guid id, object body) + { + var url = $"/api/v1/Applications/{id}"; + return await _client.Request(new HttpMethod("PATCH"), url, null, body, null); + } + + /// + /// Deletes the Application referred to by this unique identifier. Information about this Application is retained but after the DELETE call, this Application is no longer available for use on the ADS Platform. + /// + /// An Application represents a feature available to customers within the ADS Platform. You can create Applications by working with your ADS Platform business development manager and publish them on the platform so that customers can browse and find your Application on the ADS Platform Marketplace. When a customer adds an Application to their account, they obtain an AppEnrollment which represents that customer's instance of this Application. The customer-specific AppEnrollment contains a customer's configuration data for the Application, which is not customer-specific. + /// + /// See [Applications and Enrollments](https://developer.lockstep.io/docs/applications-and-enrollments) for more information. + /// + /// + /// The unique ID number of the Application to delete + [Obsolete("This endpoint is deprecated.")] + public async Task> DeleteApplication(Guid id) + { + var url = $"/api/v1/Applications/{id}"; + return await _client.Request(HttpMethod.Delete, url, null, null, null); + } + + /// + /// Creates one or more Applications and returns the records as created. Applications are universal and available across all accounts. + /// + /// An Application represents a feature available to customers within the ADS Platform. You can create Applications by working with your ADS Platform business development manager and publish them on the platform so that customers can browse and find your Application on the ADS Platform Marketplace. When a customer adds an Application to their account, they obtain an AppEnrollment which represents that customer's instance of this Application. The customer-specific AppEnrollment contains a customer's configuration data for the Application, which is not customer-specific. + /// + /// See [Applications and Enrollments](https://developer.lockstep.io/docs/applications-and-enrollments) for more information. + /// + /// + /// The Applications to create + [Obsolete("This endpoint is deprecated.")] + public async Task> CreateApplications(ApplicationModel[] body) + { + var url = $"/api/v1/Applications"; + return await _client.Request(HttpMethod.Post, url, null, body, null); + } + /// /// Queries Applications on the ADS Platform using the specified filtering, sorting, nested fetch, and pagination rules requested. /// diff --git a/src/clients/AttachmentsClient.cs b/src/clients/AttachmentsClient.cs index bbd3b49..d365abb 100644 --- a/src/clients/AttachmentsClient.cs +++ b/src/clients/AttachmentsClient.cs @@ -103,6 +103,24 @@ public async Task> DownloadAttachmentURL(Guid id) return await _client.Request(HttpMethod.Get, url, null, null, null); } + /// + /// This API is deprecated. Use the download-url API. + /// + /// Returns the Attachment file to be downloaded, based on the ID provided. + /// + /// An Attachment is a file that can be attached to various account attributes within ADS Platform. Attachments can be used for invoices, bills, or any other external files that you wish to track and have access to. Attachments represents an Attachment and a number of different metadata attributes related to the creation, storage, and ownership of the Attachment. + /// + /// See [Extensibility](https://developer.lockstep.io/docs/extensibility) for more information. + /// + /// + /// The unique ID number of the Attachment whose URI will be returned + [Obsolete("This endpoint is deprecated.")] + public async Task> DownloadAttachmentFile(Guid id) + { + var url = $"/api/v1/Attachments/{id}/download-file"; + return await _client.Request(HttpMethod.Get, url, null, null, null); + } + /// /// Uploads and creates one or more Attachments from the provided arguments. /// diff --git a/src/clients/CompaniesClient.cs b/src/clients/CompaniesClient.cs index b201e16..ab7c119 100644 --- a/src/clients/CompaniesClient.cs +++ b/src/clients/CompaniesClient.cs @@ -55,6 +55,73 @@ public async Task> RetrieveCompany(Guid id, strin return await _client.Request(HttpMethod.Get, url, options, null, null); } + /// + /// Updates a Company 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. + /// + /// A Company represents a customer, a vendor, or a company within the organization of the account holder. Companies can have parents and children, representing an organizational hierarchy of corporate entities. You can use Companies to track projects and financial data under this Company label. + /// + /// See [Vendors, Customers, and Companies](https://developer.lockstep.io/docs/companies-customers-and-vendors) for more information. + /// + /// + /// The unique ADS Platform ID number of this Company; NOT the customer's ERP key + /// A list of changes to apply to this Company + [Obsolete("This endpoint is deprecated.")] + public async Task> UpdateCompany(Guid id, object body) + { + var url = $"/api/v1/Companies/{id}"; + return await _client.Request(new HttpMethod("PATCH"), url, null, body, null); + } + + /// + /// Delete the Company referred to by this unique identifier. + /// + /// A Company represents a customer, a vendor, or a company within the organization of the account holder. Companies can have parents and children, representing an organizational hierarchy of corporate entities. You can use Companies to track projects and financial data under this Company label. + /// + /// See [Vendors, Customers, and Companies](https://developer.lockstep.io/docs/companies-customers-and-vendors) for more information. + /// + /// + /// The unique ADS Platform ID number of this Company; NOT the customer's ERP key + [Obsolete("This endpoint is deprecated.")] + public async Task> DeleteCompany(Guid id) + { + var url = $"/api/v1/Companies/{id}"; + return await _client.Request(HttpMethod.Delete, url, null, null, null); + } + + /// + /// Creates one or more Companies from a given model. + /// + /// A Company represents a customer, a vendor, or a company within the organization of the account holder. Companies can have parents and children, representing an organizational hierarchy of corporate entities. You can use Companies to track projects and financial data under this Company label. + /// + /// See [Vendors, Customers, and Companies](https://developer.lockstep.io/docs/companies-customers-and-vendors) for more information. + /// + /// + /// The Companies to create + [Obsolete("This endpoint is deprecated.")] + public async Task> CreateCompanies(CompanyModel[] body) + { + var url = $"/api/v1/Companies"; + return await _client.Request(HttpMethod.Post, url, null, body, null); + } + + /// + /// Delete the Companies referred to by these unique identifiers. + /// + /// A Company represents a customer, a vendor, or a company within the organization of the account holder. Companies can have parents and children, representing an organizational hierarchy of corporate entities. You can use Companies to track projects and financial data under this Company label. + /// + /// See [Vendors, Customers, and Companies](https://developer.lockstep.io/docs/companies-customers-and-vendors) for more information. + /// + /// + /// The unique ADS Platform ID numbers of the Companies to delete; NOT the customer's ERP key + [Obsolete("This endpoint is deprecated.")] + public async Task> DeleteCompanies(BulkDeleteRequestModel body) + { + var url = $"/api/v1/Companies"; + return await _client.Request(HttpMethod.Delete, url, null, body, null); + } + /// /// Queries Companies for this account using the specified filtering, sorting, nested fetch, and pagination rules requested. /// @@ -82,6 +149,66 @@ public async Task>> QueryCompanies(st return await _client.Request>(HttpMethod.Get, url, options, null, null); } + /// + /// Queries Customer Summaries 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. + /// + /// The Customer Summary View represents a slightly different view of the data and includes some extra fields that might be useful. For more information, see the data format of the Customer Summary Model. + /// + /// See [Vendors, Customers, and Companies](https://developer.lockstep.io/docs/companies-customers-and-vendors) for more information. + /// + /// + /// The filter for this query. See [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight) + /// 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 + /// The sort order for the results, in the [Searchlight order syntax](https://github.com/tspence/csharp-searchlight). + /// The page size for results (default 250, maximum of 500) + /// The page number for results (default 0) + /// The date to calculate the fields on. If no date is entered the current UTC date will be used. + [Obsolete("This endpoint is deprecated.")] + public async Task>> QueryCustomerSummary(string filter = null, string include = null, string order = null, int? pageSize = null, int? pageNumber = null, DateTime? reportDate = null) + { + var url = $"/api/v1/Companies/views/customer-summary"; + var options = new Dictionary(); + 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; } + if (reportDate != null) { options["reportDate"] = reportDate; } + return await _client.Request>(HttpMethod.Get, url, options, null, null); + } + + /// + /// Queries Vendor Summaries 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. + /// + /// The Vendor Summary View represents a slightly different view of the data and includes some extra fields that might be useful. For more information, see the data format of the Vendor Summary Model. + /// + /// See [Vendors, Customers, and Companies](https://developer.lockstep.io/docs/companies-customers-and-vendors) for more information. + /// + /// + /// The filter for this query. See [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight) + /// 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 + /// The sort order for the results, in the [Searchlight order syntax](https://github.com/tspence/csharp-searchlight). + /// The page size for results (default 250, maximum of 500) + /// The page number for results (default 0) + /// The date to calculate the fields on. If no date is entered the current UTC date will be used. + [Obsolete("This endpoint is deprecated.")] + public async Task>> QueryVendorSummary(string filter = null, string include = null, string order = null, int? pageSize = null, int? pageNumber = null, DateTime? reportDate = null) + { + var url = $"/api/v1/Companies/views/vendor-summary"; + var options = new Dictionary(); + 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; } + if (reportDate != null) { options["reportDate"] = reportDate; } + return await _client.Request>(HttpMethod.Get, url, options, null, null); + } + /// /// See [Vendors, Customers, and Companies](https://developer.lockstep.io/docs/companies-customers-and-vendors) for more information. /// @@ -104,5 +231,64 @@ public async Task>> Q if (legacy != null) { options["legacy"] = legacy; } return await _client.Request>(HttpMethod.Get, url, options, null, null); } + + /// + /// Retrieves the Company Details specified by this unique identifier, optionally including nested data sets. + /// + /// The Company Detail View represents a slightly different view of the data and includes some extra fields that might be useful. For more information, see the data format of the Company Detail Model. + /// + /// See [Vendors, Customers, and Companies](https://developer.lockstep.io/docs/companies-customers-and-vendors) for more information. + /// + /// + /// The unique ADS Platform ID number of this Company; NOT the company's ERP key + [Obsolete("This endpoint is deprecated.")] + public async Task> RetrieveCompanyDetail(Guid id) + { + var url = $"/api/v1/Companies/views/details/{id}"; + return await _client.Request(HttpMethod.Get, url, null, null, null); + } + + /// + /// Sets the logo for specified company. The logo will be stored in the ADS Platform and will be **publicly accessible**. + /// + /// .jpg, .jpeg, .png, and .webp are supported. 2MB maximum. If no logo is uploaded, the existing logo will be deleted. JFIF and EXIF are not supported. If you upload a JPEG and get an error, verify the file is not one of these formats. + /// + /// A Company represents a customer, a vendor, or a company within the organization of the account holder. Companies can have parents and children, representing an organizational hierarchy of corporate entities. You can use Companies to track projects and financial data under this Company label. + /// + /// Optional view box meta data for the provided logo may be supplied using the following query parameters. Please note that you must supply either all of the values or none of the values. <ul><li>min_x</li><li>min_y</li><li>width</li><li>height</li></ul> + /// + /// See [Vendors, Customers, and Companies](https://developer.lockstep.io/docs/companies-customers-and-vendors) for more information. + /// + /// + /// The unique ADS Platform ID number of this Company; NOT the customer's ERP key + /// ViewBox minX setting for this Company's logo. + /// ViewBox minY setting for this Company's logo. + /// ViewBox width setting for this Company's logo. + /// ViewBox height setting for this Company's logo. + /// The full path of a file to upload to the API + [Obsolete("This endpoint is deprecated.")] + public async Task> SetCompanyLogo(Guid id, string filename, decimal? min_x = null, decimal? min_y = null, decimal? width = null, decimal? height = null) + { + var url = $"/api/v1/Companies/{id}/logo"; + var options = new Dictionary(); + if (min_x != null) { options["min_x"] = min_x; } + if (min_y != null) { options["min_y"] = min_y; } + if (width != null) { options["width"] = width; } + if (height != null) { options["height"] = height; } + return await _client.Request(HttpMethod.Post, url, options, null, filename); + } + + /// + /// Update view box meta data for the given Company id. + /// + /// + /// The unique ADS Platform ID number of this Company; NOT the customer's ERP key + /// The `ViewBoxSettingsModel` containing meta data value updates + [Obsolete("This endpoint is deprecated.")] + public async Task> Updatelogoviewboxsettings(Guid id, ViewBoxSettingsModel body) + { + var url = $"/api/v1/Companies/{id}/logo-settings"; + return await _client.Request(new HttpMethod("PATCH"), url, null, body, null); + } } } diff --git a/src/clients/ContactsClient.cs b/src/clients/ContactsClient.cs index 8e10260..8b0d86f 100644 --- a/src/clients/ContactsClient.cs +++ b/src/clients/ContactsClient.cs @@ -53,6 +53,65 @@ public async Task> RetrieveContact(Guid id, strin return await _client.Request(HttpMethod.Get, url, options, null, null); } + /// + /// Updates a contact 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. + /// + /// A Contact contains information about a person or role within a Company. You can use Contacts to track information about who is responsible for a specific project, who handles invoices, or information about which role at a particular customer or vendor you should speak with about invoices. + /// + /// + /// The unique ADS Platform ID number of the Contact to update; NOT the customer's ERP key + /// A list of changes to apply to this Contact + [Obsolete("This endpoint is deprecated.")] + public async Task> UpdateContact(Guid id, object body) + { + var url = $"/api/v1/Contacts/{id}"; + return await _client.Request(new HttpMethod("PATCH"), url, null, body, null); + } + + /// + /// Delete the Contact referred to by this unique identifier. + /// + /// A Contact contains information about a person or role within a Company. You can use Contacts to track information about who is responsible for a specific project, who handles invoices, or information about which role at a particular customer or vendor you should speak with about invoices. + /// + /// + /// The unique ADS Platform ID number of the Contact to delete; NOT the customer's ERP key + [Obsolete("This endpoint is deprecated.")] + public async Task> DeleteContact(Guid id) + { + var url = $"/api/v1/Contacts/{id}"; + return await _client.Request(HttpMethod.Delete, url, null, null, null); + } + + /// + /// Creates one or more contacts from a given model. + /// + /// A Contact contains information about a person or role within a Company. You can use Contacts to track information about who is responsible for a specific project, who handles invoices, or information about which role at a particular customer or vendor you should speak with about invoices. + /// + /// + /// The Contacts to create + [Obsolete("This endpoint is deprecated.")] + public async Task> CreateContacts(ContactModel[] body) + { + var url = $"/api/v1/Contacts"; + return await _client.Request(HttpMethod.Post, url, null, body, null); + } + + /// + /// Delete the Contacts referred to by these unique identifiers. + /// + /// A Contact contains information about a person or role within a Company. You can use Contacts to track information about who is responsible for a specific project, who handles invoices, or information about which role at a particular customer or vendor you should speak with about invoices. + /// + /// + /// The unique ADS Platform ID numbers of the Contacts to delete; NOT the customer's ERP keys + [Obsolete("This endpoint is deprecated.")] + public async Task> DeleteContacts(BulkDeleteRequestModel body) + { + var url = $"/api/v1/Contacts"; + return await _client.Request(HttpMethod.Delete, url, null, body, null); + } + /// /// Queries Contacts for this account using the specified filtering, sorting, nested fetch, and pagination rules requested. /// diff --git a/src/clients/InvoicesClient.cs b/src/clients/InvoicesClient.cs index fd83b68..5d9c95b 100644 --- a/src/clients/InvoicesClient.cs +++ b/src/clients/InvoicesClient.cs @@ -188,6 +188,32 @@ public async Task> CheckinvoicePDF(Guid id) return await _client.Request(HttpMethod.Head, url, null, null, null); } + /// + /// Queries Invoices for this account using the specified filtering, sorting, nested fetch, and pagination rules requested. Display the results using the Invoice Summary View format. + /// + /// 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. + /// + /// The Invoice Summary View represents a slightly different view of the data and includes some extra fields that might be useful. For more information, see the data format of the Invoice Summary Model. + /// + /// + /// The filter for this query. See [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight) + /// To fetch additional data on this object, specify the list of elements to retrieve. Available collections: Summary, Aging + /// The sort order for this query. See See [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight) + /// The page size for results (default 250, maximum of 500). See [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight) + /// The page number for results (default 0). See [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight) + [Obsolete("This endpoint is deprecated.")] + public async Task> QueryInvoiceSummaryView(string filter = null, string include = null, string order = null, int? pageSize = null, int? pageNumber = null) + { + var url = $"/api/v1/Invoices/views/summary"; + var options = new Dictionary(); + 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(HttpMethod.Get, url, options, null, null); + } + /// /// Posts a notification to Document Flow Service to send the specified e-invoice. /// diff --git a/src/clients/PaymentsClient.cs b/src/clients/PaymentsClient.cs index 90aae7d..0affa02 100644 --- a/src/clients/PaymentsClient.cs +++ b/src/clients/PaymentsClient.cs @@ -149,5 +149,55 @@ public async Task> CheckpaymentPDF(Guid id) var url = $"/api/v1/Payments/{id}/pdf"; return await _client.Request(HttpMethod.Head, url, null, null, null); } + + /// + /// Queries Payments for this account using the specified filtering, sorting, nested fetch, and pagination rules requested. This query endpoint provides extra data about the summary of payment information. + /// + /// 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. + /// + /// A Payment represents money sent from one company to another. A single payment may contain payments for one or more invoices; it is also possible for payments to be made in advance of an invoice, for example, as a deposit. The creator of the Payment is identified by the `CustomerId` field, and the recipient of the Payment is identified by the `CompanyId` field. Most Payments are uniquely identified both by a ADS Platform ID number and a customer ERP "key" that was generated by the system that originated the Payment. Payments that have not been fully applied have a nonzero `UnappliedAmount` value, which represents a deposit that has been paid and not yet applied to an Invoice. + /// + /// + /// The filter for this query. See [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight) + /// To fetch additional data on this object, specify the list of elements to retrieve. Available collections: Summary, Aging + /// The sort order for this query. See See [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight) + /// The page size for results (default 250, maximum of 500). See [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight) + /// The page number for results (default 0). See [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight) + [Obsolete("This endpoint is deprecated.")] + public async Task> QueryPaymentSummaryView(string filter = null, string include = null, string order = null, int? pageSize = null, int? pageNumber = null) + { + var url = $"/api/v1/Payments/views/summary"; + var options = new Dictionary(); + 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(HttpMethod.Get, url, options, null, null); + } + + /// + /// Queries Payments within the ADS Platform 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. A Payment represents money sent from one company to another. A single payment may contain payments for one or more invoices; it is also possible for payments to be made in advance of an invoice, for example, as a deposit. The creator of the Payment is identified by the CustomerId field, and the recipient of the Payment is identified by the CompanyId field. Most Payments are uniquely identified both by a ADS Platform ID number and a customer ERP "key" that was generated by the system that originated the Payment. Payments that have not been fully applied have a nonzero UnappliedAmount value, which represents a deposit that has been paid and not yet applied to an Invoice. + /// + /// + /// The filter for this query. See [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight) + /// 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 + /// The sort order for this query. See See [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight) + /// The page size for results (default 250, maximum of 500). See [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight) + /// The page number for results (default 0). See [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight) + [Obsolete("This endpoint is deprecated.")] + public async Task>> QueryPaymentDetailView(string filter = null, string include = null, string order = null, int? pageSize = null, int? pageNumber = null) + { + var url = $"/api/v1/Payments/views/detail"; + var options = new Dictionary(); + 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>(HttpMethod.Get, url, options, null, null); + } } } diff --git a/src/models/AppEnrollmentCustomFieldModel.cs b/src/models/AppEnrollmentCustomFieldModel.cs index 1a8c4e1..1bbf3ed 100644 --- a/src/models/AppEnrollmentCustomFieldModel.cs +++ b/src/models/AppEnrollmentCustomFieldModel.cs @@ -74,6 +74,18 @@ public class AppEnrollmentCustomFieldModel /// public int? SortOrder { get; set; } + /// + /// String of data for field + /// + [Obsolete("This field is deprecated.")] + public string StringValue { get; set; } + + /// + /// Number data for field + /// + [Obsolete("This field is deprecated.")] + public decimal? NumericValue { get; set; } + /// /// Value for the field /// diff --git a/src/models/AttachmentModel.cs b/src/models/AttachmentModel.cs index 377e526..7598567 100644 --- a/src/models/AttachmentModel.cs +++ b/src/models/AttachmentModel.cs @@ -141,4 +141,4 @@ public class AttachmentModel /// public string UploadStatus { get; set; } } -} \ No newline at end of file +} diff --git a/src/models/CompanyModel.cs b/src/models/CompanyModel.cs index 6fd8faa..a6ca35e 100644 --- a/src/models/CompanyModel.cs +++ b/src/models/CompanyModel.cs @@ -69,6 +69,22 @@ public class CompanyModel /// public string CompanyType { get; set; } + /// + /// If this business entity is part of an organization, this value is non-null and it is set + /// to the `CompanyId` value of the parent company of this business entity. + /// + /// If this value is null, this business entity is a standalone. + /// + [Obsolete("This field is deprecated.")] + public Guid? ParentCompanyId { get; set; } + + /// + /// For convenience, this field indicates the top-level parent company. This can be used + /// to jump directly to the top parent in complex organizational hierarchies. + /// + [Obsolete("This field is deprecated.")] + public Guid? EnterpriseId { get; set; } + /// /// The GroupKey uniquely identifies a single ADS Platform account. All records for this /// account will share the same GroupKey value. GroupKey values cannot be changed once created. @@ -91,11 +107,89 @@ public class CompanyModel /// public string DefaultCurrencyCode { get; set; } + /// + /// The URL of this company's logo, if known. + /// + [Obsolete("This field is deprecated.")] + public string CompanyLogoUrl { get; set; } + + /// + /// The scan status of the company's logo, if it exists + /// + [Obsolete("This field is deprecated.")] + public string CompanyLogoStatus { get; set; } + /// /// The ADS Platform `ContactId` of the primary contact for this company. /// public Guid? PrimaryContactId { get; set; } + /// + /// Address info + /// + [Obsolete("This field is deprecated.")] + public string Address1 { get; set; } + + /// + /// Address info + /// + [Obsolete("This field is deprecated.")] + public string Address2 { get; set; } + + /// + /// Address info + /// + [Obsolete("This field is deprecated.")] + public string Address3 { get; set; } + + /// + /// Address info + /// + [Obsolete("This field is deprecated.")] + public string Address4 { get; set; } + + /// + /// Address info + /// + [Obsolete("This field is deprecated.")] + public string City { get; set; } + + /// + /// Address info + /// + [Obsolete("This field is deprecated.")] + public string StateRegion { get; set; } + + /// + /// Address info + /// + [Obsolete("This field is deprecated.")] + public string PostalCode { get; set; } + + /// + /// Address info + /// + [Obsolete("This field is deprecated.")] + public string Country { get; set; } + + /// + /// Time zone + /// + [Obsolete("This field is deprecated.")] + public string TimeZone { get; set; } + + /// + /// Phone number + /// + [Obsolete("This field is deprecated.")] + public string PhoneNumber { get; set; } + + /// + /// Fax number + /// + [Obsolete("This field is deprecated.")] + public string FaxNumber { get; set; } + /// /// The date this company was created /// @@ -116,6 +210,50 @@ public class CompanyModel /// public Guid? ModifiedUserId { get; set; } + /// + /// Federal Tax ID + /// + [Obsolete("This field is deprecated.")] + public string TaxId { get; set; } + + /// + /// Dun & Bradstreet Number + /// + [Obsolete("This field is deprecated.")] + public string DunsNumber { get; set; } + + /// + /// Indicates the preferred invoice delivery method. Examples include Print, Email, Fax + /// + [Obsolete("This field is deprecated.")] + public string PreferredDeliveryMethod { get; set; } + + /// + /// For companies that use a custom domain name for their email system, this is + /// the domain name used by this company. If this value is known, new emails that + /// come in from this domain will be connected to this company. + /// + [Obsolete("This field is deprecated.")] + public string DomainName { get; set; } + + /// + /// Identifier for classification of this company. + /// + [Obsolete("This field is deprecated.")] + public Guid? CompanyClassificationCodeDefId { get; set; } + + /// + /// Description of the company. + /// + [Obsolete("This field is deprecated.")] + public string Description { get; set; } + + /// + /// Website URL for this company. + /// + [Obsolete("This field is deprecated.")] + public string Website { get; set; } + /// /// The AppEnrollmentId of the application that imported this record. For accounts /// with more than one financial system connected, this field identifies the originating @@ -129,6 +267,54 @@ public class CompanyModel /// public string EmailAddress { get; set; } + /// + /// The public url slug for the Company. + /// + [Obsolete("This field is deprecated.")] + public string PublicUrlSlug { get; set; } + + /// + /// Indicates if the primary contact has been set by the user. + /// + [Obsolete("This field is deprecated.")] + public bool? PrimaryContactSet { get; set; } + + /// + /// State Tax ID + /// + [Obsolete("This field is deprecated.")] + public string StateTaxId { get; set; } + + /// + /// The state where the company was registered. + /// + [Obsolete("This field is deprecated.")] + public string StateOfIncorporation { get; set; } + + /// + /// Linkedin Url + /// + [Obsolete("This field is deprecated.")] + public string LinkedInUrlSlug { get; set; } + + /// + /// This flag indicates whether the company is verified. + /// + [Obsolete("This field is deprecated.")] + public bool? IsVerified { get; set; } + + /// + /// The date this company was last verified. + /// + [Obsolete("This field is deprecated.")] + public DateTime? LastVerifiedDate { get; set; } + + /// + /// View box settings for the company logo. + /// + [Obsolete("This field is deprecated.")] + public ViewBoxSettingsModel ViewBoxSettings { get; set; } + /// /// The unique ID of the Service Fabric organisation to which this record belongs. /// @@ -139,6 +325,24 @@ public class CompanyModel /// public Guid? ServiceFabricCompanyId { get; set; } + /// + /// A unique identification number assigned to the company by the national registration office. + /// + [Obsolete("This field is deprecated.")] + public string CompanyRegistrationNumber { get; set; } + + /// + /// An optional reference to a real company, making this a profile. + /// + [Obsolete("This field is deprecated.")] + public Guid? ProfileReferenceId { get; set; } + + /// + /// Company identifiers for this company. + /// + [Obsolete("This field is deprecated.")] + public CompanyIdentifierModel[] CompanyIdentifiers { get; set; } + /// /// A collection of notes linked to this record. To retrieve this collection, specify `Notes` in the /// `include` parameter when retrieving data. diff --git a/src/models/ContactModel.cs b/src/models/ContactModel.cs index a60d596..3d9377a 100644 --- a/src/models/ContactModel.cs +++ b/src/models/ContactModel.cs @@ -66,16 +66,112 @@ public class ContactModel /// public string ContactName { get; set; } + /// + /// A friendly human-readable code that describes this Contact. + /// + [Obsolete("This field is deprecated.")] + public string ContactCode { get; set; } + + /// + /// The title of the contact. + /// + [Obsolete("This field is deprecated.")] + public string Title { get; set; } + + /// + /// The role code for the contact. + /// + [Obsolete("This field is deprecated.")] + public string RoleCode { get; set; } + /// /// The email address of the contact. /// public string EmailAddress { get; set; } + /// + /// The phone number of the contact. + /// + [Obsolete("This field is deprecated.")] + public string Phone { get; set; } + + /// + /// The fax number of the contact. + /// + [Obsolete("This field is deprecated.")] + public string Fax { get; set; } + + /// + /// The IETF language tag for the contact's locale. + /// + [Obsolete("This field is deprecated.")] + public string Locale { get; set; } + + /// + /// The first line of the address. + /// + [Obsolete("This field is deprecated.")] + public string Address1 { get; set; } + + /// + /// The second line of the address. + /// + [Obsolete("This field is deprecated.")] + public string Address2 { get; set; } + + /// + /// The third line of the address. + /// + [Obsolete("This field is deprecated.")] + public string Address3 { get; set; } + + /// + /// The fourth line of the address. + /// + [Obsolete("This field is deprecated.")] + public string Address4 { get; set; } + + /// + /// The city of the address. + /// + [Obsolete("This field is deprecated.")] + public string City { get; set; } + + /// + /// The state/region of the address. + /// + [Obsolete("This field is deprecated.")] + public string StateRegion { get; set; } + + /// + /// The postal/zip code of the address. + /// + [Obsolete("This field is deprecated.")] + public string PostalCode { get; set; } + + /// + /// The two character country code of the address. This will be validated by the /api/v1/definitions/countries data set + /// + [Obsolete("This field is deprecated.")] + public string CountryCode { get; set; } + /// /// Flag indicating if the contact is active. /// public bool? IsActive { get; set; } + /// + /// The webpage url of the contact. + /// + [Obsolete("This field is deprecated.")] + public string WebpageUrl { get; set; } + + /// + /// The picture/avatar url of the contact. + /// + [Obsolete("This field is deprecated.")] + public string PictureUrl { get; set; } + /// /// The date on which this record was created. /// diff --git a/src/models/CreditMemoAppliedModel.cs b/src/models/CreditMemoAppliedModel.cs index d174a4d..1b71027 100644 --- a/src/models/CreditMemoAppliedModel.cs +++ b/src/models/CreditMemoAppliedModel.cs @@ -134,6 +134,12 @@ public class CreditMemoAppliedModel /// public DateTime? SourceModifiedDate { get; set; } + /// + /// Additional attributes that may be required by the source system. + /// + [Obsolete("This field is deprecated.")] + public object ErpSystemAttributes { get; set; } + /// /// A collection of attachments linked to this record. To retrieve this collection, specify `Attachments` in /// the `include` parameter when retrieving data. diff --git a/src/models/CustomFieldSyncModel.cs b/src/models/CustomFieldSyncModel.cs index 94cc3c5..df8faa9 100644 --- a/src/models/CustomFieldSyncModel.cs +++ b/src/models/CustomFieldSyncModel.cs @@ -80,6 +80,18 @@ public class CustomFieldSyncModel /// public string CustomFieldLabel { get; set; } + /// + /// The value of this custom field, if it is stored in string format. + /// + [Obsolete("This field is deprecated.")] + public string StringValue { get; set; } + + /// + /// The value of this custom field, if it is stored in numeric format. + /// + [Obsolete("This field is deprecated.")] + public decimal? NumericValue { get; set; } + /// /// The value of this custom field. /// diff --git a/src/models/CustomFieldValueModel.cs b/src/models/CustomFieldValueModel.cs index 9364b4a..e7c4319 100644 --- a/src/models/CustomFieldValueModel.cs +++ b/src/models/CustomFieldValueModel.cs @@ -39,6 +39,13 @@ public class CustomFieldValueModel /// public Guid? GroupKey { get; set; } + /// + /// The unique ID of this record, automatically assigned by ADS when this record is + /// added to the ADS Platform. + /// + [Obsolete("This field is deprecated.")] + public Guid? CustomFieldDefinitionId { get; set; } + /// /// Additional key if source table doesn't have a unique id /// @@ -59,6 +66,18 @@ public class CustomFieldValueModel /// public string DataType { get; set; } + /// + /// String of data for field + /// + [Obsolete("This field is deprecated.")] + public string StringValue { get; set; } + + /// + /// Number data for field + /// + [Obsolete("This field is deprecated.")] + public decimal? NumericValue { get; set; } + /// /// Date created /// diff --git a/src/models/InvoiceLineModel.cs b/src/models/InvoiceLineModel.cs index a53253a..675b5ee 100644 --- a/src/models/InvoiceLineModel.cs +++ b/src/models/InvoiceLineModel.cs @@ -207,6 +207,12 @@ public class InvoiceLineModel /// public DateTime? SourceModifiedDate { get; set; } + /// + /// Additional attributes that may be required by the source system. + /// + [Obsolete("This field is deprecated.")] + public object ErpSystemAttributes { get; set; } + /// /// A collection of notes linked to this record. To retrieve this collection, specify `Notes` in the /// `include` parameter when retrieving data. diff --git a/src/models/InvoiceModel.cs b/src/models/InvoiceModel.cs index fa108e6..650c795 100644 --- a/src/models/InvoiceModel.cs +++ b/src/models/InvoiceModel.cs @@ -455,6 +455,12 @@ public class InvoiceModel /// public bool? IsEInvoice { get; set; } + /// + /// Additional attributes that may be required by the source system. + /// + [Obsolete("This field is deprecated.")] + public object ErpSystemAttributes { get; set; } + /// /// The tax information related to the invoice /// diff --git a/src/models/InvoiceSummaryModel.cs b/src/models/InvoiceSummaryModel.cs index 2bcb4e8..66f1efa 100644 --- a/src/models/InvoiceSummaryModel.cs +++ b/src/models/InvoiceSummaryModel.cs @@ -117,6 +117,26 @@ public class InvoiceSummaryModel /// public string InvoiceTypeCode { get; set; } + /// + /// The date stamp for the newest Activity on this Invoice. + /// + /// This is a date-only field stored as a string in ISO 8601 (YYYY-MM-DD) format. + /// + [Obsolete("This field is deprecated.")] + public string NewestActivity { get; set; } + + /// + /// The number of days this Invoice is past due. + /// + [Obsolete("This field is deprecated.")] + public int? DaysPastDue { get; set; } + + /// + /// The number of payments associated to this invoice. + /// + [Obsolete("This field is deprecated.")] + public int? PaymentCount { get; set; } + /// /// Specific invoices have support for pdf retrieval from their respective erp. When this flag is true, an additional /// call to Invoices/{id}/pdf can be made to retrieve a pdf directly from the erp. diff --git a/src/models/PaymentAppliedModel.cs b/src/models/PaymentAppliedModel.cs index d786e23..034520e 100644 --- a/src/models/PaymentAppliedModel.cs +++ b/src/models/PaymentAppliedModel.cs @@ -144,5 +144,11 @@ public class PaymentAppliedModel /// The refund payment associated with this applied payment /// public PaymentModel Refund { get; set; } + + /// + /// Additional attributes that may be required by the source system. + /// + [Obsolete("This field is deprecated.")] + public object ErpSystemAttributes { get; set; } } } diff --git a/src/models/PaymentModel.cs b/src/models/PaymentModel.cs index 9c7dcf1..2fa1758 100644 --- a/src/models/PaymentModel.cs +++ b/src/models/PaymentModel.cs @@ -230,6 +230,12 @@ public class PaymentModel /// public string FinancialAccountCode { get; set; } + /// + /// Additional attributes that may be required by the source system. + /// + [Obsolete("This field is deprecated.")] + public object ErpSystemAttributes { get; set; } + /// /// All applications this payment is associated with. /// To retrieve this collection, specify `Applications` in the "Include" parameter for your query. diff --git a/src/models/PaymentSummaryModel.cs b/src/models/PaymentSummaryModel.cs index 969f50b..e32c8df 100644 --- a/src/models/PaymentSummaryModel.cs +++ b/src/models/PaymentSummaryModel.cs @@ -96,6 +96,13 @@ public class PaymentSummaryModel /// public decimal? BaseCurrencyUnappliedAmount { get; set; } + /// + /// True if this payment includes some unassigned amount that has not yet been applied to an invoice. If this + /// value is true, the field `UnappliedAmount` will be nonzero. + /// + [Obsolete("This field is deprecated.")] + public bool? IsOpen { get; set; } + /// /// The number of invoices associated to this payment. /// @@ -132,6 +139,30 @@ public class PaymentSummaryModel /// public bool? SupportsErpPdfRetrieval { get; set; } + /// + /// The ids of the customer for the associated invoices. + /// + [Obsolete("This field is deprecated.")] + public Guid[] CustomerIds { get; set; } + + /// + /// The names of the customer for the associated invoices. + /// + [Obsolete("This field is deprecated.")] + public string[] CustomerNames { get; set; } + + /// + /// The ids of the company for the associated invoices. + /// + [Obsolete("This field is deprecated.")] + public Guid[] CompanyIds { get; set; } + + /// + /// The names of the company for the associated invoices. + /// + [Obsolete("This field is deprecated.")] + public string[] CompanyNames { get; set; } + /// /// The modified date of the payment /// diff --git a/src/models/StatusModel.cs b/src/models/StatusModel.cs index 40a8357..4ea2d6a 100644 --- a/src/models/StatusModel.cs +++ b/src/models/StatusModel.cs @@ -36,6 +36,18 @@ public class StatusModel /// public string EmailAddress { get; set; } + /// + /// If authentication is successful, contains subscription account name of logged-in user. + /// + [Obsolete("This field is deprecated.")] + public string AccountName { get; set; } + + /// + /// If authentication is successful, contains subscription account company id of logged-in user. + /// + [Obsolete("This field is deprecated.")] + public Guid? AccountCompanyId { get; set; } + /// /// If authentication is successful, contains the unique identifier of the logged-in user. /// @@ -86,6 +98,36 @@ public class StatusModel /// public string Version { get; set; } + /// + /// If authentication is successful, contains the onboarding session status of the logged-in user's group account. + /// + [Obsolete("This field is deprecated.")] + public bool? OnboardingScheduled { get; set; } + + /// + /// Base Currency of the group + /// + [Obsolete("This field is deprecated.")] + public string BaseCurrencyCode { get; set; } + + /// + /// Country code of the group + /// + [Obsolete("This field is deprecated.")] + public string CountryCode { get; set; } + + /// + /// The id of the Magic link used to authenticate. + /// + [Obsolete("This field is deprecated.")] + public Guid? MagicLinkId { get; set; } + + /// + /// The id of the target company for the Magic Link + /// + [Obsolete("This field is deprecated.")] + public Guid? MagicLinkCompanyId { get; set; } + /// /// Magic link information about the user ///