#dida-java-list
1 messages · Page 1 of 1 (latest)
dida-java-list
Is there a way I can get the count of the records found ?
=> You get a list, you loop over the list, you count elements as you loop
Is there a way I can get a dump of the records in JSON?
=> Seems like the same question as this morning which I already answered
Thanks for the earlier response. That worked.
#1. Let's say there are 350 records in total.
How can I retrieve the next 101 - 200 ?
#2 . I was wondering if there can be a dump of all 350 records
you can't retrieve all, this is unscalable. Like what if you had 10 millions payments last month
you paginate through and you build your list in memory or in a file or something and you count as you go
not via a list API no. Otherwise we'd have to count through millions of objects too just to return the first 100.
You can use the Search API for that though https://stripe.com/docs/api/payment_intents/search that one lets you count
did you read the docs for what parameters are allowed?
you don't pass created, you pass query as a search query you write in test
Maybe read through https://stripe.com/docs/search end to end first
This resource is lot more helpful,
not sure what you mean, that just links to Postman doing a PI retrieve
Well, this is good example on how to send the requests.
Hi @digital mortar I'm taking over this thread
I was able to get this to work. However, I have to send requests using the 'next_page' value.
Am I on the right track, or is there an alternate ?
Thanks Jack!!!!
Let me know if you want me to refresh my questions...
(Just to summarize )
Use Case :
Let's say there are 350 records in total.
Question :
#1 How can I retrieve the count of ALL the records before retrieving the data?
#2. Can I get the result set without passing the 'next_page' as suggested by Koopajah. (We expect no more than 1000 records)
Any suggestions would be great.
- You can read the
total_countproperty in the response - You can use the auto-pagination (https://stripe.com/docs/api/pagination/auto#auto_pagination) helper provided by the Stripe libraries to traverse all pages.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Exactly what I needed. Thank you!!!!!
Is there a way I can test the "autoPageIterable" via the Postman or it can be done only via JAVA ?
'Since curl simply emits raw HTTP requests' found this...
auto pagination is feature we provides in Stripe libraries, so you need to use one of the libraries
Thank you Jack Tan. Appreciate your patience and the guidance.