mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-29 17:19:15 +08:00
feat(refunds): Add refunds diesel model support in V2 API (#7503)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com> Co-authored-by: Hrithikesh <61539176+hrithikesh026@users.noreply.github.com>
This commit is contained in:
@ -345,6 +345,7 @@ impl UniqueConstraints for diesel_models::PaymentAttempt {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(all(any(feature = "v1", feature = "v2"), not(feature = "refunds_v2")))]
|
||||
impl UniqueConstraints for diesel_models::Refund {
|
||||
fn unique_constraints(&self) -> Vec<String> {
|
||||
vec![format!(
|
||||
@ -358,6 +359,16 @@ impl UniqueConstraints for diesel_models::Refund {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(all(feature = "v2", feature = "refunds_v2"))]
|
||||
impl UniqueConstraints for diesel_models::Refund {
|
||||
fn unique_constraints(&self) -> Vec<String> {
|
||||
vec![self.id.get_string_repr().to_owned()]
|
||||
}
|
||||
fn table_name(&self) -> &str {
|
||||
"Refund"
|
||||
}
|
||||
}
|
||||
|
||||
impl UniqueConstraints for diesel_models::ReverseLookup {
|
||||
fn unique_constraints(&self) -> Vec<String> {
|
||||
vec![format!("reverselookup_{}", self.lookup_id)]
|
||||
|
||||
Reference in New Issue
Block a user