Skip to content

Conversation

sai-harsha-vardhan
Copy link
Contributor

@sai-harsha-vardhan sai-harsha-vardhan commented Jul 28, 2024

Type of Change

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

Description

domain and diesel model changes for merchant_connector_account create v2 flow

Additional Changes

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

Motivation and Context

How did you test it?

Tested manually
Sanity MCA Create and subsequent flows like payment / capture / refund with v1 version
Sanity Sessions flow
Sanity Incoming webhooks flow
Sanity MCA create / update / retrieve flows

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

@sai-harsha-vardhan sai-harsha-vardhan added A-core Area: Core flows C-refactor Category: Refactor labels Jul 28, 2024
@sai-harsha-vardhan sai-harsha-vardhan added this to the July 2024 Release milestone Jul 28, 2024
@sai-harsha-vardhan sai-harsha-vardhan self-assigned this Jul 28, 2024
@sai-harsha-vardhan sai-harsha-vardhan requested review from a team as code owners July 28, 2024 08:57
@hyperswitch-bot hyperswitch-bot bot added the M-api-contract-changes Metadata: This PR involves API contract changes label Jul 28, 2024
@hyperswitch-bot hyperswitch-bot bot removed the M-api-contract-changes Metadata: This PR involves API contract changes label Jul 28, 2024
@sai-harsha-vardhan sai-harsha-vardhan added the S-waiting-on-review Status: This PR has been implemented and needs to be reviewed label Jul 28, 2024
@sai-harsha-vardhan sai-harsha-vardhan changed the title refactor(router): domain and diesel model changes for merchant_connector_account v2 flow refactor(router): domain and diesel model changes for merchant_connector_account create v2 flow Jul 28, 2024
pub connector_account_details: Encryption,
pub disabled: Option<bool>,
#[diesel(deserialize_as = super::OptionalDieselArray<serde_json::Value>)]
pub payment_methods_enabled: Option<Vec<serde_json::Value>>,
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
pub payment_methods_enabled: Option<Vec<serde_json::Value>>,
pub payment_methods_enabled: Option<Vec<pii::SecretSerdeValue>>,

pub connector_type: storage_enums::ConnectorType,
pub metadata: Option<pii::SecretSerdeValue>,
pub connector_label: Option<String>,
pub frm_configs: Option<Secret<serde_json::Value>>,
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
pub frm_configs: Option<Secret<serde_json::Value>>,
pub frm_configs: Option<Secret<pii::SecretSerdeValue>>,

pub modified_at: time::PrimitiveDateTime,
pub connector_webhook_details: Option<pii::SecretSerdeValue>,
#[diesel(deserialize_as = super::OptionalDieselArray<pii::SecretSerdeValue>)]
pub frm_config: Option<Vec<Secret<serde_json::Value>>>,
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
pub frm_config: Option<Vec<Secret<serde_json::Value>>>,
pub frm_config: Option<Vec<Secret<pii::SecretSerdeValue>>>,

Copy link
Member

Choose a reason for hiding this comment

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

There are two frm configs we should remove one which is deprecated.

Copy link
Member

Choose a reason for hiding this comment

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

Address all these in other related types too (like MerchantConnectorAccountNew, update types, update internal types)

jarnura
jarnura previously approved these changes Aug 1, 2024
prajjwalkumar17
prajjwalkumar17 previously approved these changes Aug 1, 2024
ThisIsMani
ThisIsMani previously approved these changes Aug 1, 2024
Copy link
Contributor

@ThisIsMani ThisIsMani left a comment

Choose a reason for hiding this comment

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

Dashboard specific changes looks fine.

apoorvdixit88
apoorvdixit88 previously approved these changes Aug 1, 2024
@likhinbopanna likhinbopanna added this pull request to the merge queue Aug 1, 2024
@likhinbopanna likhinbopanna removed this pull request from the merge queue due to a manual request Aug 1, 2024
@likhinbopanna likhinbopanna added this pull request to the merge queue Aug 1, 2024
@sai-harsha-vardhan sai-harsha-vardhan removed this pull request from the merge queue due to a manual request Aug 1, 2024
@likhinbopanna likhinbopanna added this pull request to the merge queue Aug 1, 2024
@SanchithHegde SanchithHegde removed the S-waiting-on-review Status: This PR has been implemented and needs to be reviewed label Aug 1, 2024
Merged via the queue into main with commit 85209d1 Aug 1, 2024
14 checks passed
@likhinbopanna likhinbopanna deleted the refactor-domain-diesel-models-mca-create-v2 branch August 1, 2024 12:22
pixincreate added a commit that referenced this pull request Aug 5, 2024
…ypress-x2

* 'main' of github.com:juspay/hyperswitch:
  refactor(cypress): pass `connector_type` externally (#5522)
  refactor(router): refactor merchant_connector update v2 flow (#5484)
  feat(router): add accept language header middleware  (#5500)
  chore(version): 2024.08.05.0
  chore(postman): update Postman collection files
  fix(pm_auth): Added mca status check in pml (#5421)
  refactor(payment_methods): List the Payment Methods for Merchant , based on the connector  type (#4909)
  fix(router): [Iatapay] make error status and error message optional (#5382)
  chore(version): 2024.08.02.0
  feat(business_profile): introduce domain models for business profile v1 and v2 APIs (#5497)
  feat(auth): Add `profile_id` in `AuthenticationData` (#5492)
  feat(core): accept business profile in core functions for payments, refund, payout and disputes (#5498)
  refactor(router): domain and diesel model changes for merchant_connector_account create v2 flow (#5462)
  fix(open_payment_links): send displaySavedPaymentMethods as false explicitly for open payment links (#5501)
  refactor(role): determine level of role entity (#5488)
pixincreate added a commit that referenced this pull request Aug 5, 2024
* 'main' of github.com:juspay/hyperswitch: (37 commits)
  fix(connector): Fixed status mapping for Plaid (#5525)
  feat(core): accept profile_id in merchant_account, connectors and customers core functions (#5505)
  refactor(auth): Pass `profile_id` from the auth to core functions (#5520)
  refactor(routing): Refactor api v2 routes for deactivating and retrieving the routing config (#5478)
  refactor(cypress): pass `connector_type` externally (#5522)
  refactor(router): refactor merchant_connector update v2 flow (#5484)
  feat(router): add accept language header middleware  (#5500)
  chore(version): 2024.08.05.0
  chore(postman): update Postman collection files
  fix(pm_auth): Added mca status check in pml (#5421)
  refactor(payment_methods): List the Payment Methods for Merchant , based on the connector  type (#4909)
  fix(router): [Iatapay] make error status and error message optional (#5382)
  chore(version): 2024.08.02.0
  feat(business_profile): introduce domain models for business profile v1 and v2 APIs (#5497)
  feat(auth): Add `profile_id` in `AuthenticationData` (#5492)
  feat(core): accept business profile in core functions for payments, refund, payout and disputes (#5498)
  refactor(router): domain and diesel model changes for merchant_connector_account create v2 flow (#5462)
  fix(open_payment_links): send displaySavedPaymentMethods as false explicitly for open payment links (#5501)
  refactor(role): determine level of role entity (#5488)
  feat(cypress): add corner cases (#5481)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-core Area: Core flows api-v2 C-refactor Category: Refactor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants