Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(db): implement MerchantAccountInteraface for Mockdb #6283

Merged
merged 13 commits into from
Nov 5, 2024

Conversation

akhildevelops
Copy link
Contributor

@akhildevelops akhildevelops commented Oct 10, 2024

Type of Change

  • [] Bugfix
  • New feature
  • Enhancement
  • Refactoring
  • Dependency updates
  • Documentation
  • CI/CD

Description

Mockdb is a stub to avoid costly interactions with db during testing. This PR powers mockdb to have MerchantAccountInterface for adding, deleting, searching merchant accounts.

Additional Changes

  • This PR modifies the API contract
  • This PR modifies the database schema
  • This PR modifies application configuration/environment variables

Motivation and Context

Fixes #2438

How did you test it?

Checklist

  • I formatted the code cargo +nightly fmt --all
  • addressed lints thrown by cargo clippy
  • I reviewed the submitted code
  • I added unit tests for my changes where possible

@akhildevelops akhildevelops requested review from a team as code owners October 10, 2024 01:07
Copy link

semanticdiff-com bot commented Oct 10, 2024

Review changes with  SemanticDiff

Changed Files
File Status
  crates/router/src/db/merchant_account.rs  9% smaller
  crates/diesel_models/src/merchant_account.rs  0% smaller
  crates/hyperswitch_domain_models/src/merchant_account.rs  0% smaller
  docker-compose-development.yml Unsupported file format

@akhildevelops
Copy link
Contributor Author

@gorakhnathy7 I'm done in implementing the interface. Please review and provide if there are any comments.

@akhildevelops
Copy link
Contributor Author

It's been quite some time since this pr is reviewed.

@gorakhnathy7 gorakhnathy7 added the hacktoberfest Issues that are up for grabs for Hacktoberfest participants label Oct 15, 2024
crates/router/src/db/merchant_account.rs Outdated Show resolved Hide resolved
crates/router/src/db/merchant_account.rs Outdated Show resolved Hide resolved
crates/diesel_models/src/merchant_account.rs Outdated Show resolved Hide resolved
crates/router/src/db/merchant_account.rs Outdated Show resolved Hide resolved
crates/router/src/db/merchant_account.rs Outdated Show resolved Hide resolved
@akhildevelops
Copy link
Contributor Author

@SanchithHegde Can you check now, I've found an innovative way without cloning and skipping lot of boilerplate to update merchant account by implementing a special trait to Option

@akhildevelops
Copy link
Contributor Author

@SanchithHegde, can you review now re-designed merchantaccount updates for mockdb

Copy link
Member

@SanchithHegde SanchithHegde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than that, looks good to me!

.gitignore Outdated Show resolved Hide resolved
@akhildevelops
Copy link
Contributor Author

Done

SanchithHegde
SanchithHegde previously approved these changes Oct 30, 2024
@SanchithHegde SanchithHegde changed the title Implements MerchantAccountInteraface to Mockdb feat(db): implement MerchantAccountInteraface for Mockdb Oct 30, 2024
@SanchithHegde
Copy link
Member

SanchithHegde commented Oct 30, 2024

@akhildevelops Could you please address the failing clippy / compilation checks?

@akhildevelops
Copy link
Contributor Author

@SanchithHegde Can you please check now by running workflows.

@gorakhnathy7 gorakhnathy7 added the hacktoberfest-accepted Pull requests accepted as Hacktoberfest contributions label Oct 31, 2024
@Gnanasundari24 Gnanasundari24 added this pull request to the merge queue Nov 5, 2024
Merged via the queue into juspay:main with commit 5f493a5 Nov 5, 2024
17 checks passed
@akhildevelops akhildevelops deleted the mockdb branch November 5, 2024 09:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest Issues that are up for grabs for Hacktoberfest participants hacktoberfest-accepted Pull requests accepted as Hacktoberfest contributions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE] Implement MerchantAccountInterface for MockDb
5 participants