-
Notifications
You must be signed in to change notification settings - Fork 3
Description
Summary
The Accounting API's Company Info list endpoint supports a name query parameter according to the official documentation, but this parameter is missing from the C# SDK's CompanyInfoListRequest class.
Expected Behavior
The CompanyInfoListRequest class should include a Name property to allow filtering CompanyInfo objects by name, as documented in the API reference:
name (string): If provided, will only return CompanyInfo objects with this name.
Current Behavior
The SDK's CompanyInfoListRequest class only supports the following query parameters:
File: src/Merge.Client/Accounting/CompanyInfo/Requests/CompanyInfoListRequest.cs
Current properties:
CreatedAfter(DateTime?)CreatedBefore(DateTime?)Cursor(string?)Expand(IEnumerable)IncludeDeletedData(bool?)IncludeRemoteData(bool?)IncludeShellData(bool?)ModifiedAfter(DateTime?)ModifiedBefore(DateTime?)PageSize(int?)RemoteId(string?)
The Name property is notably absent from this list.
API Documentation Reference
- Endpoint: GET
/accounting/v1/company-info - Documentation: https://docs.merge.dev/accounting/company-info/#company_info_list
- Parameter:
name(string) - Filter to return only CompanyInfo objects with this name
Proposed Solution
Add a Name property to the CompanyInfoListRequest class:
/// <summary>
/// If provided, will only return CompanyInfo objects with this name.
/// </summary>
[JsonIgnore]
public string? Name { get; set; }And ensure it's included in the query string construction in the CompanyInfoClient.ListAsync method (in src/Merge.Client/Accounting/CompanyInfo/CompanyInfoClient.cs).
Impact
Without this parameter, SDK users cannot filter company info by name and must retrieve all company info records and filter client-side, which is inefficient for large datasets.
Environment
- SDK Version: Latest (as of the main branch)
- Category: Accounting API