Skip to content

Commit

Permalink
Merge branch 'master' into latest-codegen-master
Browse files Browse the repository at this point in the history
  • Loading branch information
prathmesh-stripe committed May 2, 2024
2 parents 2335a3c + 6ceac11 commit 736f775
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions README.md
Expand Up @@ -467,14 +467,15 @@ stripe.customers

This is a convenience for cases where you expect the number of items
to be relatively small; accordingly, you must pass a `limit` option
to prevent runaway list growth from consuming too much memory.
to prevent runaway list growth from consuming too much memory. Once the
`limit` number of items have been fetched, auto-pagination will stop.

Returns a promise of an array of all items across pages for a list request.

```js
const allNewCustomers = await stripe.customers
.list({created: {gt: lastMonth}})
.autoPagingToArray({limit: 10000});
.list({created: {gt: lastMonth}, limit: 100}) // 100 items per page
.autoPagingToArray({limit: 10000}); // Stop after 10000 items total
```

### Telemetry
Expand Down

0 comments on commit 736f775

Please sign in to comment.