mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-29 09:07:09 +08:00
feat(router): adding generic tokenization endpoint (#7905)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
@ -32,6 +32,9 @@ pub mod utils;
|
||||
|
||||
use common_utils::{errors::CustomResult, types::keymanager::KeyManagerState};
|
||||
use database::store::PgPool;
|
||||
#[cfg(all(feature = "v2", feature = "tokenization_v2"))]
|
||||
use diesel_models::tokenization::Tokenization;
|
||||
pub mod tokenization;
|
||||
#[cfg(not(feature = "payouts"))]
|
||||
use hyperswitch_domain_models::{PayoutAttemptInterface, PayoutsInterface};
|
||||
pub use mock_db::MockDb;
|
||||
@ -502,3 +505,14 @@ impl UniqueConstraints for diesel_models::Customer {
|
||||
impl<T: DatabaseStore> PayoutAttemptInterface for RouterStore<T> {}
|
||||
#[cfg(not(feature = "payouts"))]
|
||||
impl<T: DatabaseStore> PayoutsInterface for RouterStore<T> {}
|
||||
|
||||
#[cfg(all(feature = "v2", feature = "tokenization_v2"))]
|
||||
impl UniqueConstraints for diesel_models::tokenization::Tokenization {
|
||||
fn unique_constraints(&self) -> Vec<String> {
|
||||
vec![format!("id_{}", self.id.get_string_repr())]
|
||||
}
|
||||
|
||||
fn table_name(&self) -> &str {
|
||||
"tokenization"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user