Fix a bug: use starting_after if its defined

This commit is contained in:
PCoder 2019-04-03 06:27:54 +02:00
parent b1566c4c61
commit 6f1449836a

View file

@ -130,12 +130,12 @@ class StripeUtils(object):
while has_more_invoices: while has_more_invoices:
if starting_after: if starting_after:
invoices = stripe.Invoice.list( invoices = stripe.Invoice.list(
limit=10, customer=customer_id, created=created limit=10, customer=customer_id, created=created,
starting_after=starting_after
) )
else: else:
invoices = stripe.Invoice.list( invoices = stripe.Invoice.list(
limit=10, customer=customer_id, created=created, limit=10, customer=customer_id, created=created
starting_after=starting_after
) )
has_more_invoices = invoices.has_more has_more_invoices = invoices.has_more
for invoice in invoices.data: for invoice in invoices.data: