billing: Downgrade small realms that are behind on payments.

An organization with at most 5 users that is behind on payments isn't
worth spending time on investigating the situation.

For larger organizations, we likely want somewhat different logic that
at least does not void invoices.
This commit is contained in:
Vishnu KS
2021-06-11 16:23:45 +05:30
committed by Tim Abbott
parent cb64a19edf
commit e0f5fadb79
45 changed files with 3723 additions and 3 deletions

View File

@@ -0,0 +1,11 @@
from typing import Any
from corporate.lib.stripe import downgrade_small_realms_behind_on_payments_as_needed
from zerver.lib.management import ZulipBaseCommand
class Command(ZulipBaseCommand):
help = "Downgrade small realms that are running behind on payments"
def handle(self, *args: Any, **options: Any) -> None:
downgrade_small_realms_behind_on_payments_as_needed()