-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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): adding metric api for dispute analytics #3810
Conversation
Curl:
|
|
fn collect(self) -> Self::MetricOutput { | ||
if self.total <= 0 { | ||
Some((None, None, None, None)) | ||
} else { | ||
Some(( | ||
u64::try_from(self.challenged_count).ok(), | ||
u64::try_from(self.won_count).ok(), | ||
u64::try_from(self.lost_count).ok(), | ||
u64::try_from(self.total).ok(), | ||
)) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this rate or count?
should it be challenged_count/total
instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it have total count as well so if rate have to be display FE can convert count to rate percentage
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rest looks good
Co-authored-by: Sampras Lopes <lsampras@pm.me>
5b46e20
Co-authored-by: Sampras Lopes <lsampras@pm.me>
…stman-runner * 'main' of github.com:juspay/hyperswitch: chore(version): 2024.02.29.0 chore(postman): update Postman collection files feat(analytics): add force retrieve call for force retrieve calls (#3565) refactor(connector): [Mollie] Mask PII data (#3856) refactor(connector): [Gocardless] Mask PII data (#3844) feat(analytics): adding metric api for dispute analytics (#3810) feat(payment_methods): Add default payment method column in customers table and last used column in payment_methods table (#3790) fix(tests/postman/adyen): enable sepa payment method type for payout flows (#3861) feat(payouts): Implement Smart Retries for Payout (#3580) refactor(payment_link): add Miscellaneous charges in cart (#3645)
Type of Change
Description
adding metric api for dispute analytics
Http Method:
POST
URL Path
/analytics/v1/metric/dispute
Additional Changes
Motivation and Context
How did you test it?
Hit the URL given below and should get sample response mentioned in the comment
Checklist
cargo +nightly fmt --all
cargo clippy