hyperswitch icon indicating copy to clipboard operation
hyperswitch copied to clipboard

[FEATURE] : add pagination support for customers list

Open Narayanbhat166 opened this issue 1 year ago • 5 comments

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?

Are you willing to submit a PR?

None

Narayanbhat166 avatar Feb 21 '24 07:02 Narayanbhat166

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.

tanbirali avatar Feb 22 '24 12:02 tanbirali

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.

Narayanbhat166 avatar Feb 25 '24 10:02 Narayanbhat166

Okay, correct me if I am wrong, I have to create a CustomerListConstraints where I need to add limit and offset

tanbirali avatar Mar 01 '24 05:03 tanbirali

Yes, you would have to create the struct and add limit and offset to it.

Narayanbhat166 avatar Mar 20 '24 12:03 Narayanbhat166

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

hegdeadithyak avatar Mar 30 '24 06:03 hegdeadithyak