Skip to content

feat(stripe-report): add --email / --wallet account filters - #605

Open
GTC6244 wants to merge 1 commit into
mainfrom
stripe-call-volume-by-day
Open

feat(stripe-report): add --email / --wallet account filters#605
GTC6244 wants to merge 1 commit into
mainfrom
stripe-call-volume-by-day

Conversation

@GTC6244

@GTC6244 GTC6244 commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Adds optional --email and --wallet flags to the stripe_report binary 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

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>
@GTC6244
GTC6244 requested review from a team and Copilot July 29, 2026 14:26

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 --email and --wallet CLI 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.

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.

2 participants