Skip to content

feat(payments): support list filters - #5

Draft
sarkissianraffi wants to merge 2 commits into
mainfrom
feat/payments-list-filters
Draft

sarkissianraffi wants to merge 2 commits into
mainfrom
feat/payments-list-filters

Conversation

@sarkissianraffi

@sarkissianraffi sarkissianraffi commented Sep 7, 2026

Copy link
Copy Markdown

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-filters at 1cb1dd67552d07279e74f005ac28d3e9684a76f7 (bundled SHA-256 edc85fddf229feb79974e65bb8c7a1a8e720926cb294d3749e6bd572edb72d7d).

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_type removed 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.

Regenerate payment list operations and document all filters. Preserve positional compatibility, serialize date bounds, and verify arrays and exact int64 amounts on both routes.
Removed from the Lago API for performance reasons; the client must not
send or document it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant