2019-04-26 13:15:11 +02:00
|
|
|
from typing import Any
|
|
|
|
|
|
|
|
from django.conf import settings
|
|
|
|
|
|
|
|
from zerver.lib.management import ZulipBaseCommand
|
2020-01-14 21:59:46 +01:00
|
|
|
|
2019-04-26 13:15:11 +02:00
|
|
|
if settings.BILLING_ENABLED:
|
|
|
|
from corporate.lib.stripe import invoice_plans_as_needed
|
|
|
|
|
2021-02-12 08:19:30 +01:00
|
|
|
|
2019-04-26 13:15:11 +02:00
|
|
|
class Command(ZulipBaseCommand):
|
|
|
|
help = """Generates invoices for customers if needed."""
|
|
|
|
|
|
|
|
def handle(self, *args: Any, **options: Any) -> None:
|
|
|
|
if settings.BILLING_ENABLED:
|
|
|
|
invoice_plans_as_needed()
|