juspay / hyperswitch

An open source payments switch written in Rust to make payments fast, reliable and affordable
https://hyperswitch.io/
Apache License 2.0
11.01k stars 1.19k forks source link

[FEATURE] : add pagination support for customers list #3746

Open Narayanbhat166 opened 4 months ago

Narayanbhat166 commented 4 months ago

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

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?

Have you read the Contributing Guidelines?

Are you willing to submit a PR?

None

tanbirali commented 4 months ago

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.

Narayanbhat166 commented 4 months ago

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.

tanbirali commented 4 months ago

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

Narayanbhat166 commented 3 months ago

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

hegdeadithyak commented 3 months ago

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