Skip to content

Conversation

apoorvdixit88
Copy link
Contributor

@apoorvdixit88 apoorvdixit88 commented Jul 22, 2024

Type of Change

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

Description

Alter query in find_merchant_scoped_dashboard_metadata
For merchant scoped metadata it need not to be considered whether user_id column is null or not

Additional Changes

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

Motivation and Context

Closes #5396

How did you test it?

To get the metadata use curl:

curl --location 'http://localhost:8080/user/data?keys=ProductionAgreement%2CSetupProcessor%2CConfigureEndpoint%2CSetupComplete%2CFirstProcessorConnected%2CSecondProcessorConnected%2CConfiguredRouting%2CTestPayment%2CIntegrationMethod%2CConfigurationType%2CIntegrationCompleted%2CStripeConnected%2CPaypalConnected%2CSPRoutingConfigured%2CFeedback%2CProdIntent%2CSPTestPayment%2CDownloadWoocom%2CConfigureWoocom%2CSetupWoocomWebhook%2CIsMultipleConfiguration%2CIsChangePasswordRequired' \
--header 'Authorization: Bearer JWT'

In response we will get the metadata both that set or unset:

[
    {
        "ProductionAgreement": false
    },
    {
        "SetupProcessor": null
    },
    {
        "ConfigureEndpoint": false
    },
    {
        "SetupComplete": false
    },
    {
        "FirstProcessorConnected": null
    },
    {
        "SecondProcessorConnected": null
    },
    {
        "ConfiguredRouting": null
    },
    {
        "TestPayment": null
    },
    {
        "IntegrationMethod": {
            "integration_type": "test_type"
        }
    },
    {
        "ConfigurationType": null
    },
    {
        "IntegrationCompleted": true
    },
    {
        "StripeConnected": null
    },
    {
        "PaypalConnected": null
    },
    {
        "SPRoutingConfigured": null
    },
    {
        "Feedback": {
            "email": "[email protected]",
            "description": "Test Feedback",
            "rating": 5,
            "category": "test"
        }
    },
    {
        "ProdIntent": null
    },
    {
        "SPTestPayment": false
    },
    {
        "DownloadWoocom": false
    },
    {
        "ConfigureWoocom": false
    },
    {
        "SetupWoocomWebhook": false
    },
    {
        "IsMultipleConfiguration": false
    },
    {
        "IsChangePasswordRequired": false
    }
]

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

@apoorvdixit88 apoorvdixit88 added S-waiting-on-review Status: This PR has been implemented and needs to be reviewed C-refactor Category: Refactor A-users Area: Users labels Jul 22, 2024
@apoorvdixit88 apoorvdixit88 self-assigned this Jul 22, 2024
@apoorvdixit88 apoorvdixit88 requested a review from a team as a code owner July 22, 2024 10:06
@apoorvdixit88 apoorvdixit88 requested a review from lsampras July 22, 2024 10:18
@likhinbopanna likhinbopanna added this pull request to the merge queue Jul 22, 2024
Merged via the queue into main with commit eaa391a Jul 22, 2024
@likhinbopanna likhinbopanna deleted the alter-query-for-merchant-scoped-metadata branch July 22, 2024 13:56
pixincreate added a commit that referenced this pull request Jul 24, 2024
* 'main' of github.com:juspay/hyperswitch: (27 commits)
  refactor(connector): added amount conversion framework for billwerk (#4972)
  feat(connector): [Itaubank] Add refund and rsync flow  (#5420)
  feat: create additional columns in organization table (#5380)
  refactor(merchant_id): create domain type for `merchant_id` (#5408)
  fix(euclid): remove business_profile routing feature flag (#5430)
  feat: add create retrieve and update api endpoints for organization resource (#5361)
  chore(version): 2024.07.24.0
  refactor(connector): [Itaubank] add dynamic fields for pix (#5419)
  Feat(connector): [WELLSFARGO] Add template code (#5333)
  fix(connector): [Datatrans] Handling for 4-Digit YYYY input and Correct 3DS Routing to no_3ds (#5410)
  refactor(connector):  add amount conversion framework to volt (#4985)
  chore(users): email templates footer icon style enhance (#5375)
  feat(customer): customer v2 refactor for customer create end point (#5350)
  chore(version): 2024.07.23.0
  fix(router): store `network_transaction_id` in stripe `authorize` flow (#5399)
  ci: handle packages to run are being empty (#5403)
  chore: add customer, shipping and billing details to payment_response for payment list api (#5401)
  refactor(dashboard_metadata): alter query for merchant scoped metadata (#5397)
  refactor(connector): Add billing_country in klarna dynamic fields (#5373)
  feat(connector): [Itau Bank] Add payment and sync flow for Pix (#5342)
  ...
@SanchithHegde SanchithHegde removed the S-waiting-on-review Status: This PR has been implemented and needs to be reviewed label Jul 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-users Area: Users C-refactor Category: Refactor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

refactor: alter query for merchant scoped metadata
5 participants