Skip to content

Commit 3fe24b3

Browse files
feat(refunds): add connector field in refund response (#1059)
Co-authored-by: Sarthak Soni <[email protected]>
1 parent 38aa9ea commit 3fe24b3

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

crates/api_models/src/refunds.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,9 @@ pub struct RefundResponse {
120120
/// The timestamp at which refund is updated
121121
#[serde(with = "common_utils::custom_serde::iso8601::option")]
122122
pub updated_at: Option<PrimitiveDateTime>,
123+
/// The connector used for the refund and the corresponding payment
124+
#[schema(example = "stripe")]
125+
pub connector: String,
123126
}
124127

125128
#[derive(Debug, Clone, Eq, PartialEq, Deserialize, Serialize, ToSchema)]

crates/router/src/core/refunds.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -669,6 +669,7 @@ impl ForeignFrom<storage::Refund> for api::RefundResponse {
669669
error_code: refund.refund_error_code,
670670
created_at: Some(refund.created_at),
671671
updated_at: Some(refund.updated_at),
672+
connector: refund.connector,
672673
}
673674
}
674675
}

0 commit comments

Comments
 (0)