hyperswitch icon indicating copy to clipboard operation
hyperswitch copied to clipboard

fix(user): add onboarding_survey enum in dashboard metadata type

Open Riddhiagrawal001 opened this issue 10 months ago • 0 comments

Type of Change

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

Description

Bug Fix: Add support for onboarding_survey enum

Additional Changes

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

Motivation and Context

How did you test it?

  1. Get OnboardingSurvey enum details request
curl --location 'http://localhost:8080/user/data?keys=OnboardingSurvey' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer JWT of org_admin user' \
--data '
'

Response
a. If data not present for the user [{"OnboardingSurvey":null}] b. If data already present for the user

[
  {
    "OnboardingSurvey": {
      "designation": "some_designation",
      "about_business": "about_business_text",
      "business_website": "business_website_url",
      "hyperswitch_req": "one of the mentioned options",
      "major_markets":array<major_markets>,
      "business_size":  "one of the mentioned options",
      "required_features": array<required_features>,
      "required_processors":array<required_processor>,
      "planned_live_date": "some planned date",
      "miscellaneous": "some extra text"
    }
  }
]
  1. Post OnboardingSurvey enum details
    Request
curl --location 'http://localhost:8080/user/data?keys=OnboardingSurvey' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer JWT of org_admin user' \
--data-raw $'{
  "OnboardingSurvey":
     {
            "designation":"some_designation",
            "business_website":"business_website",
            "major_markets":array<major_markets>,
            "about_business":"some_business_Details",
            "business_size":"one of the option",
            "required_features":array<required_features>,
            "hyperswitch_req":"one of the option",
            "required_processors":array<required_processor>,
            "planned_live_date":"planned_live_date",
            "miscellaneous":"some_other_text"
      }
}'

Checklist

  • [X] I formatted the code cargo +nightly fmt --all
  • [X] 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

Riddhiagrawal001 avatar Apr 12 '24 12:04 Riddhiagrawal001