mix mishka_pay.stripe.clean_clocks (Mishka Pay v0.0.1)

Copy Markdown View Source

Deletes a tenant's Stripe test clocks older than a number of hours; Stripe deletes each clock's customers and subscriptions with it. Test keys only (MishkaPay.Providers.Stripe.TestClock refuses live ones). The keys come from the project's own keys plugin, so the project starts.

mix mishka_pay.stripe.clean_clocks --tenant site-42 --older-than 2
mix mishka_pay.stripe.clean_clocks --name "live renewal" --dry-run

Options:

  • --tenant: whose keys (none by default, for a single-site project).
  • --older-than: hours since the clock was made, 1 by default; 0 takes every clock.
  • --name: only clocks whose name starts with this.
  • --dry-run: lists what it would delete and deletes nothing.