(self)
Cancel the Account's subscription in Stripe and remove the
        StripeCustomerInformation object.
Cancel the Account's subscription in Stripe and remove the
        StripeCustomerInformation object.
Cancel the Account s subscription in Stripe and remove the StripeCustomerInformation object .
def cancel_subscription(self) -> None:
        """
        Cancel the Account's subscription in Stripe and remove the
        StripeCustomerInformation object.
        """
        # Calling delete on a subscription cancels it. If a user wants to
        # resubscribe they must create a new subscription.
        # https://stripe.com/docs/billing/subscriptions/canceling
        stripe.Subscription.delete(self.subscription_id)
        # we delete all the associated subscription info because the
        # subscription is no longer valid. We leave the Stripe Customer and keep
        # Account.customer_id alone. If a user resubscribes we can use their
        # existing Stripe Customer to improve their Stripe Checkout flow with a
        # prefilled email.
        account = self.get_account()
        self.delete()
        account.update_bot()
def cancel_subscription ( self ) -> None : # Calling delete on a subscription cancels it. If a user wants to # resubscribe they must create a new subscription. # https://stripe.com/docs/billing/subscriptions/canceling stripe . Subscription . delete ( self . subscription_id ) # we delete all the associated subscription info because the # subscription is no longer valid. We leave the Stripe Customer and keep # Account.customer_id alone. If a user resubscribes we can use their # existing Stripe Customer to improve their Stripe Checkout flow with a # prefilled email. account = self . get_account ( ) self . delete ( ) account . update_bot ( )