diff --git a/crates/api_models/src/refunds.rs b/crates/api_models/src/refunds.rs index f2d49c417ef..92e07487a40 100644 --- a/crates/api_models/src/refunds.rs +++ b/crates/api_models/src/refunds.rs @@ -74,7 +74,9 @@ pub struct RefundUpdateRequest { pub metadata: Option, } -#[derive(Default, Debug, Clone, ToSchema, Deserialize)] +#[derive( + Default, Debug, Clone, Copy, ToSchema, Deserialize, Serialize, Eq, PartialEq, strum::Display, +)] #[serde(rename_all = "snake_case")] pub enum RefundType { #[default] diff --git a/crates/router/src/core/refunds.rs b/crates/router/src/core/refunds.rs index 82d6ce22c60..0efe54f38c0 100644 --- a/crates/router/src/core/refunds.rs +++ b/crates/router/src/core/refunds.rs @@ -477,7 +477,7 @@ pub async fn validate_and_create_refund( let (refund_id, all_refunds, currency, refund_create_req, refund); // Only for initial dev and testing - let refund_type = req.refund_type.clone().unwrap_or_default(); + let refund_type = req.refund_type.unwrap_or_default(); // If Refund Id not passed in request Generate one.