Skip to content

auto_paging_iter() does not persist params #221

@mattt-b

Description

@mattt-b

From the documentation at https://stripe.com/docs/api/python#auto_pagination:

To use the auto-pagination feature in Python, simply issue an initial "list" call with the parameters you need, then call auto_paging_iter() on the returned list object to iterate over all objects matching your initial parameters.

With this code example:

customers = stripe.Customer.all(limit=3)
for customer in customers.auto_paging_iter():
  # Do something with customer

However using this code the params that are passed in initially do not get saved here:

def list(cls, api_key=None, idempotency_key=None,

so the next trip through the params will be empty:
params = dict(self._retrieve_params)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions