Skip to content

Open source, composable payments platform | PCI compliant | SaaS and Self-host options | Enables connectivity to multiple payment, payout, fraud, vault and tokenization providers | Uplifts authorization with intelligent routing and revenue recovery | Reduce payment processing costs with cost observability | Reduces payment ops with reconciliation

refactor(payment_methods): added clone derivation for PaymentMethodId (#1568)

Sarthak Soni6739b59bc8c9
diff --git a/crates/api_models/src/customers.rs b/crates/api_models/src/customers.rs
index 05e2a1307d..1c28617d74 100644
--- a/crates/api_models/src/customers.rs
+++ b/crates/api_models/src/customers.rs
@@ -93,7 +93,7 @@ pub struct CustomerResponse {
pub metadata: Option<pii::SecretSerdeValue>,
}
-#[derive(Default, Debug, Deserialize, Serialize)]
+#[derive(Default, Clone, Debug, Deserialize, Serialize)]
pub struct CustomerId {
pub customer_id: String,
}
diff --git a/crates/api_models/src/payment_methods.rs b/crates/api_models/src/payment_methods.rs
index 4dcaad09fb..f4e9ffacf8 100644
--- a/crates/api_models/src/payment_methods.rs
+++ b/crates/api_models/src/payment_methods.rs
@@ -293,7 +293,7 @@ pub struct RequestPaymentMethodTypes {
}
//List Payment Method
-#[derive(Debug, serde::Serialize, Default, ToSchema)]
+#[derive(Debug, Clone, serde::Serialize, Default, ToSchema)]
#[serde(deny_unknown_fields)]
pub struct PaymentMethodListRequest {
/// This is a 15 minute expiry token which shall be used from the client to authenticate and perform sessions from the SDK
@@ -543,7 +543,7 @@ pub struct CustomerPaymentMethod {
#[serde(default, with = "common_utils::custom_serde::iso8601::option")]
pub created: Option<time::PrimitiveDateTime>,
}
-#[derive(Debug, serde::Serialize, serde::Deserialize)]
+#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
pub struct PaymentMethodId {
pub payment_method_id: String,
}