hyperswitch
hyperswitch copied to clipboard
[FEATURE] : add pagination support for customers list
Feature Description
The customers list endpoint currently has no pagination support. It returns the list of all the customers in the database. There would be thousands of customers for a merchant. A pagination support for the api would be necessary.
Possible Implementation
accept two fields, limit
and offset
-
limit
specifies the number of objects returned in the response. -
offset
specifies the number of items to skip from the start, this is open to discussion whether to use offset or some other field.
This would be similar to the payments_list
pagination. Refer here
Have you spent some time checking if this feature request has been raised before?
- [X] I checked and didn't find a similar issue
Have you read the Contributing Guidelines?
- [X] I have read the Contributing Guidelines
Are you willing to submit a PR?
None
I am interested to take this issue, I will like to know little bit more, from what I saw both product list and customer list look same to me.
Hey @tanbirali, thanks for showing interest. Payment list accepts limit
and other parameters, which are used for pagination. These parameters are not available in customers list endpoint.
Okay, correct me if I am wrong, I have to create a CustomerListConstraints where I need to add limit and offset
Yes, you would have to create the struct and add limit and offset to it.
Hi there @Narayanbhat166 ,
I'd like to take a look at this issue and see if I can help fix it. Please let me know if it's already assigned to someone or if there's anything specific I should keep in mind while working on it.
Thanks, Adithya Hegde Kota