(self)
Attempt to retry collecting payment on the customer's unpaid invoices.
Attempt to retry collecting payment on the customer's unpaid invoices.
Attempt to retry collecting payment on the customer s unpaid invoices .
def retry_unpaid_invoices(self):
        """Attempt to retry collecting payment on the customer's unpaid invoices."""

        self._sync_invoices()
        for invoice in self.invoices.filter(auto_advance=True).exclude(status="paid"):
            try:
                invoice.retry()  # Always retry unpaid invoices
            except InvalidRequestError as exc:
                if str(exc) != "Invoice is already paid":
                    raise
def retry_unpaid_invoices ( self ) : self . _sync_invoices ( ) for invoice in self . invoices . filter ( auto_advance = True ) . exclude ( status = "paid" ) : try : invoice . retry ( ) # Always retry unpaid invoices except InvalidRequestError as exc : if str ( exc ) != "Invoice is already paid" : raise