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(merchant_account): Add list multiple merchants in MerchantAccountInterface #3220

Merged
merged 10 commits into from
Jan 5, 2024

Conversation

ThisIsMani
Copy link
Contributor

@ThisIsMani ThisIsMani commented Dec 31, 2023

Type of Change

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

Description

Add ability to get multiple merchant accounts at once from db with a list of merchant_ids.

Additional Changes

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

Motivation and Context

This feature is needed for users module, where we need to fetch the details of all the merchants that a particular user is part of.

How did you test it?

Postman, by changing a api to use this feature.
Currently it is not testable with the deployed version as there is no API which currently uses this.

Checklist

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

@ThisIsMani ThisIsMani requested a review from a team as a code owner December 31, 2023 07:12
@ThisIsMani ThisIsMani self-assigned this Dec 31, 2023
@ThisIsMani ThisIsMani added A-framework Area: Framework C-feature Category: Feature request or enhancement labels Dec 31, 2023
@ThisIsMani ThisIsMani added this to the December 2023 Release milestone Dec 31, 2023
let merchant_accounts = futures::future::try_join_all(
encrypted_merchant_accounts
.into_iter()
.zip(merchant_key_stores.iter())
Copy link
Member

Choose a reason for hiding this comment

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

How is the order ensured here? what if one of the merchant account or key stores are missing and that disrupts the mapping?

Narayanbhat166
Narayanbhat166 previously approved these changes Jan 2, 2024
SanchithHegde
SanchithHegde previously approved these changes Jan 2, 2024
crates/router/src/db/merchant_key_store.rs Outdated Show resolved Hide resolved
@Gnanasundari24 Gnanasundari24 added this pull request to the merge queue Jan 5, 2024
Merged via the queue into main with commit c3172ef Jan 5, 2024
9 of 11 checks passed
@Gnanasundari24 Gnanasundari24 deleted the user-invite branch January 5, 2024 13:09
pixincreate added a commit that referenced this pull request Jan 8, 2024
* 'main' of github.com:juspay/hyperswitch:
  fix(connector): [Stripe] Deserialization Error while parsing Dispute Webhook Body (#3256)
  refactor(euclid_wasm): Update wasm config (#3222)
  fix(analytics): added response to the connector outgoing event (#3129)
  fix(analytics): fixed response code to 501 (#3119)
  fix(connector): [NMI] Populating `ErrorResponse` with required fields and Mapping `connector_response_reference_id` (#3214)
  feat(merchant_account): Add list multiple merchants in `MerchantAccountInterface` (#3220)
  feat: include version number in response headers and on application startup (#3045)
  chore: address Rust 1.75 clippy lints (#3231)
  feat: add deep health check (#3210)
  feat(analytics): adding outgoing webhooks kafka event (#3140)
  refactor: address panics due to indexing and slicing (#3233)
  fix(users): Fix wrong redirection url in magic link (#3217)
  fix(user): add integration_completed enum in metadata type (#3245)
  chore(version): v1.106.1
  fix(connector): [iatapay] change refund amount (#3244)
  chore(version): v1.106.0
  test(postman): update postman collection files
  fix(core): fix recurring mandates flow for cyber source (#3224)
  chore: fix channel handling for consumer workflow loop (#3223)
ThisIsMani added a commit that referenced this pull request Jan 9, 2024
…ntInterface` (#3220)

Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-framework Area: Framework C-feature Category: Feature request or enhancement
Projects
No open projects
Status: Candidate
Development

Successfully merging this pull request may close these issues.

4 participants