mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-29 00:49:42 +08:00
feat(router): add api to migrate card from basilisk to rust (#2853)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
@ -562,3 +562,9 @@ pub enum RetryAction {
|
||||
/// Denotes that the payment is requeued
|
||||
Requeue,
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy)]
|
||||
pub enum LockerChoice {
|
||||
Basilisk,
|
||||
Tartarus,
|
||||
}
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
pub mod customer;
|
||||
pub mod gsm;
|
||||
mod locker_migration;
|
||||
pub mod payment;
|
||||
#[cfg(feature = "payouts")]
|
||||
pub mod payouts;
|
||||
|
||||
9
crates/api_models/src/events/locker_migration.rs
Normal file
9
crates/api_models/src/events/locker_migration.rs
Normal file
@ -0,0 +1,9 @@
|
||||
use common_utils::events::ApiEventMetric;
|
||||
|
||||
use crate::locker_migration::MigrateCardResponse;
|
||||
|
||||
impl ApiEventMetric for MigrateCardResponse {
|
||||
fn get_api_event_type(&self) -> Option<common_utils::events::ApiEventsType> {
|
||||
Some(common_utils::events::ApiEventsType::RustLocker)
|
||||
}
|
||||
}
|
||||
@ -13,6 +13,7 @@ pub mod errors;
|
||||
pub mod events;
|
||||
pub mod files;
|
||||
pub mod gsm;
|
||||
pub mod locker_migration;
|
||||
pub mod mandates;
|
||||
pub mod organization;
|
||||
pub mod payment_methods;
|
||||
|
||||
8
crates/api_models/src/locker_migration.rs
Normal file
8
crates/api_models/src/locker_migration.rs
Normal file
@ -0,0 +1,8 @@
|
||||
#[derive(Debug, Clone, serde::Serialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct MigrateCardResponse {
|
||||
pub status_message: String,
|
||||
pub status_code: String,
|
||||
pub customers_moved: usize,
|
||||
pub cards_moved: usize,
|
||||
}
|
||||
Reference in New Issue
Block a user