hyperswitch icon indicating copy to clipboard operation
hyperswitch copied to clipboard

[FEATURE] : add `offset` field to disputes list

Open Narayanbhat166 opened this issue 1 year ago • 13 comments

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?

Are you willing to submit a PR?

None

Narayanbhat166 avatar Feb 21 '24 07:02 Narayanbhat166

Can I work on this?

Riahiamirreza avatar Mar 01 '24 18:03 Riahiamirreza

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 avatar Mar 01 '24 18:03 SanchithHegde

@SanchithHegde Thanks, I'll start work on it

Riahiamirreza avatar Mar 01 '24 19:03 Riahiamirreza

@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.

Workflow link

Riahiamirreza avatar Mar 03 '24 12:03 Riahiamirreza

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

SanchithHegde avatar Mar 03 '24 12:03 SanchithHegde

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.

Riahiamirreza avatar Mar 03 '24 13:03 Riahiamirreza

@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?

Riahiamirreza avatar Mar 07 '24 15:03 Riahiamirreza

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 avatar Mar 11 '24 07:03 sai-harsha-vardhan

@sai-harsha-vardhan Thanks for your helpful comment. Is there any documentation regarding how to deploy the project for testing purpose?

Riahiamirreza avatar Mar 11 '24 16:03 Riahiamirreza

@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.io or webhook.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.

SanchithHegde avatar Mar 11 '24 18:03 SanchithHegde

Hey @Riahiamirreza are you still working on this issue??

yashrajbothra avatar Mar 30 '24 22:03 yashrajbothra

@yashrajbothra Hi, yes! Sorry for latency, in last couple of weeks I couldn't make time for it.

Riahiamirreza avatar Mar 31 '24 21:03 Riahiamirreza

No Problem @Riahiamirreza !! Let me know if you need any help😊

yashrajbothra avatar Apr 01 '24 07:04 yashrajbothra