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

@ -148,6 +148,9 @@ Never share your secret api keys. Keep them guarded and secure.
//Routes for refunds
routes::refunds::refunds_create,
// Routes for Revenue Recovery flow under Process Tracker
routes::revenue_recovery::revenue_recovery_pt_retrieve_api
),
components(schemas(
common_utils::types::MinorUnit,
@ -708,6 +711,8 @@ Never share your secret api keys. Keep them guarded and secure.
api_models::payment_methods::PaymentMethodSessionConfirmRequest,
api_models::payment_methods::PaymentMethodSessionResponse,
api_models::payment_methods::AuthenticationDetails,
api_models::process_tracker::revenue_recovery::RevenueRecoveryResponse,
api_models::enums::ProcessTrackerStatus,
routes::payments::ForceSync,
)),
modifiers(&SecurityAddon)

View File

@ -17,5 +17,6 @@ pub mod poll;
pub mod profile;
pub mod refunds;
pub mod relay;
pub mod revenue_recovery;
pub mod routing;
pub mod webhook_events;

View File

@ -0,0 +1,22 @@
#[cfg(feature = "v2")]
/// Revenue Recovery - Retrieve
///
/// Retrieve the Revenue Recovery Payment Info
#[utoipa::path(
get,
path = "/v2/process_tracker/revenue_recovery_workflow/{revenue_recovery_id}",
params(
("recovery_recovery_id" = String, Path, description = "The payment intent id"),
),
responses(
(status = 200, description = "Revenue Recovery Info Retrieved Successfully", body = RevenueRecoveryResponse),
(status = 500, description = "Internal server error"),
(status = 404, description = "Resource missing"),
(status = 422, description = "Unprocessable request"),
(status = 403, description = "Forbidden"),
),
tag = "Revenue Recovery",
operation_id = "Retrieve Revenue Recovery Info",
security(("jwt_key" = []))
)]
pub async fn revenue_recovery_pt_retrieve_api() {}