feat(payments): support list filters - #5
Draft
sarkissianraffi wants to merge 2 commits into
Draft
sarkissianraffi wants to merge 2 commits into
sarkissianraffi wants to merge 2 commits into
Conversation
Regenerate payment list operations and document all filters. Preserve positional compatibility, serialize date bounds, and verify arrays and exact int64 amounts on both routes.
This was referenced Sep 7, 2026
Removed from the Lago API for performance reasons; the client must not send or document it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Regenerate findAllPayments and add the previously absent findAllCustomerPayments resource method from the feature spec. The scoped generation script uses OpenAPI Generator 7.14.0 and preserves unrelated generated operations/models. All five method variants retain the existing fifth positional contentType argument; new filters also work with named arguments. DateTimeInterface values serialize as date-only bounds.
Both top-level and customer-scoped payment lists accept status/status alias, inclusive int64 amount bounds, receipt number, created date bounds, provider, method, currency, invoice number, payment type, payable type and search. Existing pagination, customer ID and invoice ID options remain supported. Array values serialize as repeated bracketed keys; exact text is URL-encoded.
Source: lago-openapi
feat/payments-list-filtersat1cb1dd67552d07279e74f005ac28d3e9684a76f7(bundled SHA-256edc85fddf229feb79974e65bb8c7a1a8e720926cb294d3749e6bd572edb72d7d).Live QA: succeeded + EUR returns the same seven IDs as UI/REST; cust_1 returns two; amount_from=9223372036854775807 returns two. API and client QA, 79 HTTP assertions, cross-client IDs, UI QA and recording.
Verification: full PHPUnit exits successfully; the three new payment tests make 53 assertions covering both routes, every parameter, auth, arrays, punctuation, date objects/strings, zero/max-int64 and existing positional calls. The baseline's 2,390 generated tests remain incomplete placeholders. They originally could not parse because DefaultApiTest repeated test() 49 times; a reproducible post-generation repair derives unique method names from existing operation docblocks. No tests hidden or disabled.
Generation rerun produces identical files; changed PHP files pass syntax lint. Composer install and live API checks pass on 64-bit PHP. README and generated method docs include examples. Existing payment response models are unchanged; no version bump. This repo has no composer test script, so verification uses vendor/bin/phpunit directly.
Related PRs
Merge order: API, then front; OpenAPI before client/CLI releases. JavaScript CI uses the pinned feature spec during that rollout.
Performance follow-up (2026-09-09)
payment_method_typeremoved from the payments list filters: the Lago API dropped it for performance reasons (getlago/lago-api#6325, "Not shipped for performance reasons"). This client no longer sends or documents it; every other filter is unchanged. Indexes for the remaining filters ship first in getlago/lago-api#6341.