hyperswitch icon indicating copy to clipboard operation
hyperswitch copied to clipboard

[FEATURE] Implement `PayoutsInterface` for `MockDb`

Open kashif-m opened this issue 11 months ago • 3 comments

Feature Description

MockDb allows consumers to run hyperswitch without psql. This needs to be added for payout tables - payouts and payout_attempt

Possible Implementation

Similar to how it's being done for other tables.

See #172 for more information.

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?

Yes, I am willing to submit a PR!

kashif-m avatar Mar 20 '24 10:03 kashif-m

Hi @SanchithHegde, I would like to work on this issue.

But, I already see a existing implementation here. Is there anything more specific I need to target or am I completely wrong.

I am newbie here glad to get assisted further to kickstart my first contribution.

srini047 avatar Apr 09 '24 17:04 srini047

Hey @srini047, you've correctly identified the PayoutsInterface implementaion on MockDb, but if you notice, all of the methods in the implementation return an error, because the Rust type system enforces us to provide a placeholder implementation.

As part of this issue, you are required to update the MockDb implementation to behave similar to the implementation which uses the database (you can find the implementation here). The database implementation is simple, for say, inserts or updates, while being slightly more complex for queries that involve filtering. You'd have to write the MockDb implementation accordingly.

I would like to work on this issue.

Sure, I'll assign it to you.

SanchithHegde avatar Apr 09 '24 19:04 SanchithHegde

@SanchithHegde Sorry for the delay. I was new to rust and it took time for me to understand the codebase and traits especially. With time I learnt a lot and now I feel ready to implement. Will make a PR real soon.

srini047 avatar Apr 21 '24 16:04 srini047