[FEATURE] : add `offset` field to disputes list
Feature Description
The disputes list endpoint currently has no field to specify offset, which would skip certain number of entries from the start. This is necessary in order to provide pagination support.
Possible Implementation
accept a field called offset which specifies the number of items to skip from the start.
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
Can I work on this?
Sure @Riahiamirreza, I'll assign it to you. In case of any queries, you can post them on this issue thread or on our Discord server, whichever you're comfortable with.
@SanchithHegde Thanks, I'll start work on it
@SanchithHegde I'm getting Error: PR does not contain any linked issues error in the ci. Would you give me a hint to solve it? Because the PR description contains this issue's link.
Hey @Riahiamirreza, I've solved that for you by updating the PR description to include Closes #3749. For more information on why that "links" an issue to a PR, you can refer to the GitHub docs:
https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword
Hey @Riahiamirreza, I've solved that for you by updating the PR description to include
Closes #3749. For more information on why that "links" an issue to a PR, you can refer to the GitHub docs: https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword
Thanks a lot! I wasn't aware of it.
@SanchithHegde Is there any test case that might be affected by this change? I tried to explore tests, but couldn't find any. Would you please give me a small hint about it?
Hey @Riahiamirreza To test this out, one way is to create dispute records in the system. To achieve this, you can follow our webhook configurations guide at https://api-reference.hyperswitch.io/essentials/webhooks. To simulate dispute webhooks through the checkout connector is by referring to https://www.checkout.com/docs/developer-resources/testing/disputes-testing. Alternatively, you can manually create dispute records in the database to test this out. :)
@sai-harsha-vardhan Thanks for your helpful comment. Is there any documentation regarding how to deploy the project for testing purpose?
@Riahiamirreza Since you'll be making modifications to the code, you can run the server locally either using cargo run (if you have a Rust development environment set up), or using Docker Compose for setting up the development environment. More information on setting up the server locally can be found here: https://github.com/juspay/hyperswitch/blob/main/docs/try_local_system.md
Once the server is running locally, to receive webhooks from connectors like Stripe, Checkout, etc., you'd need to have webhooks reach your locally running server. This can be done in one of two ways:
- Use a webhook forwarding service like
smee.ioorwebhook.site(along with their CLI client) - Expose your machine to the Internet temporarily using tools like Tailscale Funnel,
ngrok, etc.
Once you obtain the URL where the connectors can send you webhooks, you can configure the same as the webhook URL in the connector's dashboard.
Hey @Riahiamirreza are you still working on this issue??
@yashrajbothra Hi, yes! Sorry for latency, in last couple of weeks I couldn't make time for it.
No Problem @Riahiamirreza !! Let me know if you need any help😊