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(analytics): added dispute as uri param to analytics info api #3693

Merged
merged 4 commits into from
Feb 19, 2024

Conversation

harsh-sharma-juspay
Copy link
Contributor

Type of Change

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

Description

added dispute as URI PARAM to info api of analytics

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?

Hit the curl mentioned below and expected response has posted below

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

@harsh-sharma-juspay harsh-sharma-juspay requested a review from a team as a code owner February 19, 2024 07:15
@harsh-sharma-juspay
Copy link
Contributor Author

Curl:

curl --location 'http://localhost:8080/analytics/v1/dispute/info' \
--header 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:121.0) Gecko/20100101 Firefox/121.0' \
--header 'Accept: */*' \
--header 'Accept-Language: en-US,en;q=0.5' \
--header 'Accept-Encoding: gzip, deflate, br' \
--header 'Referer: https://app.hyperswitch.io/' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiMmU4ZTM4ZGMtNTQ1Ny00Nzk1LWI1ZWEtZmJmOWI5YzBhMTc1IiwibWVyY2hhbnRfaWQiOiJtZXJjaGFudF8xNzAxMTc2MjA5Iiwicm9sZV9pZCI6Im9yZ19hZG1pbiIsImV4cCI6MTcwMTM1MjA0Niwib3JnX2lkIjoib3JnX2hyQWVsRUhvbzlDb3lxcjJpM0JpIn0.IX7Lgj5UuRfMfoYx5M20qNkrvhp28VFqMmhoqL9TNeE' \
--header 'api-key: hyperswitch' \
--header 'Connection: keep-alive'

@harsh-sharma-juspay
Copy link
Contributor Author

Expected Response:

{
    "metrics": [
        {
            "name": "disputes_challenged",
            "desc": ""
        },
        {
            "name": "disputes_won",
            "desc": ""
        },
        {
            "name": "disputes_lost",
            "desc": ""
        },
        {
            "name": "total_amount_disputed",
            "desc": ""
        },
        {
            "name": "total_dispute_lost_amount",
            "desc": ""
        }
    ],
    "downloadDimensions": null,
    "dimensions": [
        {
            "name": "connector",
            "desc": ""
        },
        {
            "name": "dispute_status",
            "desc": ""
        },
        {
            "name": "connector_status",
            "desc": ""
        }
    ]
}

@likhinbopanna likhinbopanna added this pull request to the merge queue Feb 19, 2024
Merged via the queue into main with commit 76ac1a7 Feb 19, 2024
10 of 12 checks passed
@likhinbopanna likhinbopanna deleted the adding_dispute_analytics_info_api branch February 19, 2024 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat(analytics): adding dispute as uri param to analytics info api
5 participants