fix(analytics): added response to the connector outgoing event (#3129)

Co-authored-by: harsh-sharma-juspay <125131007+harsh-sharma-juspay@users.noreply.github.com>
Co-authored-by: Sampras lopes <lsampras@pm.me>
This commit is contained in:
Sagar naik
2024-01-05 18:58:55 +05:30
committed by GitHub
parent 00008c16c1
commit d152c3a1ca
8 changed files with 145 additions and 149 deletions

View File

@ -116,7 +116,6 @@ impl_misc_api_event_type!(
AttachEvidenceRequest,
DisputeId,
PaymentLinkFormData,
PaymentsRedirectResponseData,
ConfigUpdate
);
@ -131,3 +130,15 @@ impl_misc_api_event_type!(
DummyConnectorRefundResponse,
DummyConnectorRefundRequest
);
impl ApiEventMetric for PaymentsRedirectResponseData {
fn get_api_event_type(&self) -> Option<ApiEventsType> {
Some(ApiEventsType::PaymentRedirectionResponse {
connector: self.connector.clone(),
payment_id: match &self.resource_id {
api_models::payments::PaymentIdType::PaymentIntentId(id) => Some(id.clone()),
_ => None,
},
})
}
}