Add scheduled payout creation to admin payouts CLI#113
Conversation
Greptile SummaryAdds
Confidence Score: 5/5The change is self-contained: new command, additive struct field, no mutations to existing command logic. The confirmation/dry-run safety guards are correctly wired and tested. All validation, confirmation, dry-run short-circuit, and output-rendering paths are covered by dedicated tests. The implementation is consistent with existing admin mutation commands and introduces no regressions to shared types. No files require special attention. Important Files Changed
Sequence DiagramsequenceDiagram
participant Admin
participant CLI as gumroad CLI
participant Confirm as ConfirmAction
participant API as POST /internal/admin/scheduled_payouts
Admin->>CLI: scheduled create --user-id X --processor stripe
CLI->>CLI: resolveMutationTarget
CLI->>CLI: validate --processor
CLI->>CLI: RequireDateFlag
alt dry-run
CLI-->>Admin: PrintDryRunRequest
else confirmed
CLI->>API: POST JSON
API-->>CLI: scheduled_payout response
CLI-->>Admin: output
end
Reviews (2): Last reviewed commit: "Use response success in plain output" | Re-trigger Greptile |
Ref antiwork/gumroad/issues/5153
What
gumroad admin payouts scheduled createfor the new internal scheduled payout endpoint.--user-id, required--processor, optional--expected-email,--payout-date, and--note, with confirmation and dry-run support.Why
This PR was implemented with AI assistance using gpt-5.5 xhigh.
Note
High Risk
Schedules real money movement via a new admin mutation; mistakes or misuse could queue incorrect payouts, though mitigated by confirmation, dry-run, and API-side checks.
Overview
Adds
gumroad admin payouts scheduled create, wiring the admin CLI to the internalPOST /scheduled_payoutsendpoint for delayed payouts (e.g. after suspension).The command accepts
--user-id, required--processor(stripe/paypal), and optional--expected-email,--payout-date(YYYY-MM-DD), and--note. It follows the same safety model as other admin payout mutations: validation,--yesconfirmation,--dry-run, and human-readable, plain, or JSON output including.scheduled_payout(list decoding now includesprocessor).README, cobra examples, the embedded gumroad skill, and broad tests cover the new subcommand.
Reviewed by Cursor Bugbot for commit 6d55234. Bugbot is set up for automated code reviews on this repo. Configure here.