feat(core): Add support for process tracker retrieve api in v2 (#7602)

Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
Amisha Prabhat
2025-03-27 16:52:03 +05:30
committed by GitHub
parent 56412bf188
commit 87140bfccc
33 changed files with 430 additions and 111 deletions

View File

@ -11,10 +11,11 @@ pub mod payouts;
#[cfg(feature = "recon")]
pub mod recon;
pub mod refund;
#[cfg(feature = "v2")]
pub mod revenue_recovery;
pub mod routing;
pub mod user;
pub mod user_role;
use common_utils::{
events::{ApiEventMetric, ApiEventsType},
impl_api_event_type,

View File

@ -0,0 +1,14 @@
use common_utils::events::{ApiEventMetric, ApiEventsType};
use crate::process_tracker::revenue_recovery::{RevenueRecoveryId, RevenueRecoveryResponse};
impl ApiEventMetric for RevenueRecoveryResponse {
fn get_api_event_type(&self) -> Option<ApiEventsType> {
Some(ApiEventsType::ProcessTracker)
}
}
impl ApiEventMetric for RevenueRecoveryId {
fn get_api_event_type(&self) -> Option<ApiEventsType> {
Some(ApiEventsType::ProcessTracker)
}
}

View File

@ -30,6 +30,7 @@ pub mod payments;
pub mod payouts;
pub mod pm_auth;
pub mod poll;
pub mod process_tracker;
#[cfg(feature = "recon")]
pub mod recon;
pub mod refunds;

View File

@ -0,0 +1,2 @@
#[cfg(feature = "v2")]
pub mod revenue_recovery;

View File

@ -0,0 +1,21 @@
use common_utils::id_type;
use serde::{Deserialize, Serialize};
use time::PrimitiveDateTime;
use utoipa::ToSchema;
use crate::enums;
#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
pub struct RevenueRecoveryResponse {
pub id: String,
pub name: Option<String>,
pub schedule_time_for_payment: Option<PrimitiveDateTime>,
pub schedule_time_for_psync: Option<PrimitiveDateTime>,
#[schema(value_type = ProcessTrackerStatus, example = "finish")]
pub status: enums::ProcessTrackerStatus,
pub business_status: String,
}
#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
pub struct RevenueRecoveryId {
pub revenue_recovery_id: id_type::GlobalPaymentId,
}