v2.2.0
Release v2.2.0
🎉 Major Features
Static Query Methods on ARMObjectBase
New static All, GroupBy, and OrderBy methods on all ARM object types, enabling cleaner query patterns directly from the type.
-
All / AllAsync: Query all objects of a type
var customers = pl.Customer.All(); var payments = await pl.Payment.AllAsync();
-
GroupBy: Group query results by field
var results = pl.Payment.GroupBy("status").All();
-
OrderBy: Order query results by field
var results = pl.Payment.OrderBy("desc(created_at)").All();
Exceptions Namespace
Exception classes are now available under the Payload.Exceptions namespace for cleaner imports. Existing pl.* exception references remain supported for backward compatibility.
using Payload.Exceptions;
try { ... }
catch (InvalidAttributes e) { ... }
catch (NotFound e) { ... }✨ New Objects
InvoiceAttachment- Invoice file attachments
🐛 Bug Fixes
- Fixed
ARMRequest.GroupBywith string arguments: Passing a string like"status"would throw anInvalidCastExceptionbecausestringimplementsIEnumerableand was incorrectly handled as a collection - Fixed
GetRoutepluralization: Object names ending in "s" (e.g.processing_settings) no longer get a double "s" appended to their endpoint
🔧 Improvements
- Extracted shared
BuildRequest/ExtractArgshelpers inARMObjectBaseto eliminate duplicated session extraction and polymorphic filter logic - Moved
_httpMessageHandlerfromARMRequesttoPayload.Sessionfor cleaner test mocking and architecture - Renamed
Sessionconstructor parameters fromapi_key/api_versiontoapiKey/apiVersionto follow C# naming conventions
📚 Documentation
- Updated README to use
apiVersionparameter name
🔄 Breaking Changes
None - this release is fully backward compatible. The Session constructor parameter rename uses named arguments, which is source-compatible for positional callers.
Pull Requests
- #30 Release v2.2.0
Installation
Install via NuGet Package Manager:
dotnet add package payload-api --version 2.2.0Or via Package Manager Console:
Install-Package payload-api -Version 2.2.0Or add to your .csproj file:
<PackageReference Include="payload-api" Version="2.2.0" />