feat(stripe-report): add --email / --wallet account filters - #605
Open
GTC6244 wants to merge 1 commit into
Open
Conversation
Add optional `--email` and `--wallet` flags to the stripe_report binary so a run can be scoped to a single account instead of the whole Stripe customer set. Both match case-insensitively (wallet tolerates EIP-55 checksum casing) and are applied right after the customer list is fetched, so the per-customer balance-transaction calls only run for matches. Passing both narrows to customers matching both (AND); an empty match writes an empty report with a warning. Also corrects a stale usage doc comment (default window is 14 days, not 30). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds optional account-scoping filters to the lit-api-server stripe_report operator CLI so reports can be generated for a specific Stripe customer (by email and/or wallet) without doing expensive per-customer balance-transaction fetches across the entire customer set.
Changes:
- Add
--emailand--walletCLI flags, applying case-insensitive filtering immediately after fetching the Stripe customer list. - Improve operator output for filtered runs (including an explicit warning when zero customers match, yielding an intentionally empty report).
- Update the usage doc comment to reflect the actual default window (14 days) and add unit tests for the new filter behavior.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Adds optional
--emailand--walletflags to thestripe_reportbinary so a run can be scoped to a single account instead of scanning the entire Stripe customer set. Both match case-insensitively (wallet tolerates EIP-55 checksum casing), and the filter is applied right after the customer list is fetched so the expensive per-customer balance-transaction calls only run for matches. Passing both narrows to customers matching both (AND); a zero-match run writes an empty report and logs a warning so it's distinguishable from an account with no activity. Also fixes a stale usage doc comment (the default window is 14 days, not 30) and adds unit tests covering the new filter cases.🤖 Generated with Claude Code