mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-29 00:49:42 +08:00
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:
@ -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,
|
||||
|
||||
14
crates/api_models/src/events/revenue_recovery.rs
Normal file
14
crates/api_models/src/events/revenue_recovery.rs
Normal 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)
|
||||
}
|
||||
}
|
||||
@ -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;
|
||||
|
||||
2
crates/api_models/src/process_tracker.rs
Normal file
2
crates/api_models/src/process_tracker.rs
Normal file
@ -0,0 +1,2 @@
|
||||
#[cfg(feature = "v2")]
|
||||
pub mod revenue_recovery;
|
||||
21
crates/api_models/src/process_tracker/revenue_recovery.rs
Normal file
21
crates/api_models/src/process_tracker/revenue_recovery.rs
Normal 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,
|
||||
}
|
||||
Reference in New Issue
Block a user