feat(refunds): add connector field in refund response (#1059)

Co-authored-by: Sarthak Soni <76486416+Sarthak1799@users.noreply.github.com>
This commit is contained in:
Abhishek Marrivagu
2023-05-09 20:11:42 +05:30
committed by GitHub
parent 38aa9eab3f
commit 3fe24b3255
2 changed files with 4 additions and 0 deletions

View File

@ -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<PrimitiveDateTime>,
/// The connector used for the refund and the corresponding payment
#[schema(example = "stripe")]
pub connector: String,
}
#[derive(Debug, Clone, Eq, PartialEq, Deserialize, Serialize, ToSchema)]

View File

@ -669,6 +669,7 @@ impl ForeignFrom<storage::Refund> for api::RefundResponse {
error_code: refund.refund_error_code,
created_at: Some(refund.created_at),
updated_at: Some(refund.updated_at),
connector: refund.connector,
}
}
}