Fix issues and also include subscription_id

This commit is contained in:
PCoder 2019-04-03 09:03:58 +02:00
commit 12b8a77862
4 changed files with 86 additions and 14 deletions

View file

@ -43,9 +43,8 @@ class Command(BaseCommand):
all_invoices = all_invoices_response['response_object']
self.stdout.write(self.style.SUCCESS("Obtained {} invoices".format(len(all_invoices) if all_invoices is not None else 0)))
for invoice in all_invoices:
MonthlyHostingBill.create(
invoice, stripe_customer=user.stripecustomer
)
invoice['customer'] = user.stripecustomer
MonthlyHostingBill.create(invoice)
else:
self.stdout.write(self.style.SUCCESS(
'Customer email %s does not have a stripe customer.' % email))