feat(analytics): Add RoutingApproach filter in payment analytics (#8408)

Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
Sarthak Soni
2025-06-23 22:53:42 +05:30
committed by GitHub
parent 786fe699c2
commit a3cc44c6e1
54 changed files with 406 additions and 65 deletions

View File

@ -235,6 +235,7 @@ impl PaymentAttemptInterface for MockDb {
processor_merchant_id: payment_attempt.processor_merchant_id,
created_by: payment_attempt.created_by,
setup_future_usage_applied: payment_attempt.setup_future_usage_applied,
routing_approach: payment_attempt.routing_approach,
};
payment_attempts.push(payment_attempt.clone());
Ok(payment_attempt)

View File

@ -685,6 +685,7 @@ impl<T: DatabaseStore> PaymentAttemptInterface for KVRouterStore<T> {
processor_merchant_id: payment_attempt.processor_merchant_id.clone(),
created_by: payment_attempt.created_by.clone(),
setup_future_usage_applied: payment_attempt.setup_future_usage_applied,
routing_approach: payment_attempt.routing_approach,
};
let field = format!("pa_{}", created_attempt.attempt_id);
@ -1709,6 +1710,7 @@ impl DataModelExt for PaymentAttempt {
issuer_error_code: self.issuer_error_code,
issuer_error_message: self.issuer_error_message,
setup_future_usage_applied: self.setup_future_usage_applied,
routing_approach: self.routing_approach,
// Below fields are deprecated. Please add any new fields above this line.
connector_transaction_data: None,
processor_merchant_id: Some(self.processor_merchant_id),
@ -1803,6 +1805,7 @@ impl DataModelExt for PaymentAttempt {
.created_by
.and_then(|created_by| created_by.parse::<CreatedBy>().ok()),
setup_future_usage_applied: storage_model.setup_future_usage_applied,
routing_approach: storage_model.routing_approach,
}
}
}
@ -1892,6 +1895,7 @@ impl DataModelExt for PaymentAttemptNew {
processor_merchant_id: Some(self.processor_merchant_id),
created_by: self.created_by.map(|created_by| created_by.to_string()),
setup_future_usage_applied: self.setup_future_usage_applied,
routing_approach: self.routing_approach,
}
}
@ -1974,6 +1978,7 @@ impl DataModelExt for PaymentAttemptNew {
.created_by
.and_then(|created_by| created_by.parse::<CreatedBy>().ok()),
setup_future_usage_applied: storage_model.setup_future_usage_applied,
routing_approach: storage_model.routing_approach,
}
}
}