From 3fe24b3255039d6a5dff59203ffcfd024ff0d60b Mon Sep 17 00:00:00 2001 From: Abhishek Marrivagu <68317979+Abhicodes-crypto@users.noreply.github.com> Date: Tue, 9 May 2023 20:11:42 +0530 Subject: [PATCH] feat(refunds): add connector field in refund response (#1059) Co-authored-by: Sarthak Soni <76486416+Sarthak1799@users.noreply.github.com> --- crates/api_models/src/refunds.rs | 3 +++ crates/router/src/core/refunds.rs | 1 + 2 files changed, 4 insertions(+) diff --git a/crates/api_models/src/refunds.rs b/crates/api_models/src/refunds.rs index cf36c9c1fe..d07e7c86b1 100644 --- a/crates/api_models/src/refunds.rs +++ b/crates/api_models/src/refunds.rs @@ -120,6 +120,9 @@ pub struct RefundResponse { /// The timestamp at which refund is updated #[serde(with = "common_utils::custom_serde::iso8601::option")] pub updated_at: Option, + /// The connector used for the refund and the corresponding payment + #[schema(example = "stripe")] + pub connector: String, } #[derive(Debug, Clone, Eq, PartialEq, Deserialize, Serialize, ToSchema)] diff --git a/crates/router/src/core/refunds.rs b/crates/router/src/core/refunds.rs index e72f4cc021..38b9511be9 100644 --- a/crates/router/src/core/refunds.rs +++ b/crates/router/src/core/refunds.rs @@ -669,6 +669,7 @@ impl ForeignFrom for api::RefundResponse { error_code: refund.refund_error_code, created_at: Some(refund.created_at), updated_at: Some(refund.updated_at), + connector: refund.connector, } } }