mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-30 01:27:31 +08:00
feat(router): add an api to migrate the apple pay certificates from connector metadata to connector_wallets_details column in merchant connector account (#4790)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com> Co-authored-by: Sanchith Hegde <22217505+SanchithHegde@users.noreply.github.com>
This commit is contained in:
12
crates/api_models/src/apple_pay_certificates_migration.rs
Normal file
12
crates/api_models/src/apple_pay_certificates_migration.rs
Normal file
@ -0,0 +1,12 @@
|
||||
#[derive(Debug, Clone, serde::Serialize)]
|
||||
pub struct ApplePayCertificatesMigrationResponse {
|
||||
pub migration_successful: Vec<String>,
|
||||
pub migration_failed: Vec<String>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, PartialEq, Eq)]
|
||||
pub struct ApplePayCertificatesMigrationRequest {
|
||||
pub merchant_ids: Vec<String>,
|
||||
}
|
||||
|
||||
impl common_utils::events::ApiEventMetric for ApplePayCertificatesMigrationRequest {}
|
||||
@ -1,3 +1,4 @@
|
||||
pub mod apple_pay_certificates_migration;
|
||||
pub mod connector_onboarding;
|
||||
pub mod customer;
|
||||
pub mod dispute;
|
||||
|
||||
@ -0,0 +1,9 @@
|
||||
use common_utils::events::ApiEventMetric;
|
||||
|
||||
use crate::apple_pay_certificates_migration::ApplePayCertificatesMigrationResponse;
|
||||
|
||||
impl ApiEventMetric for ApplePayCertificatesMigrationResponse {
|
||||
fn get_api_event_type(&self) -> Option<common_utils::events::ApiEventsType> {
|
||||
Some(common_utils::events::ApiEventsType::ApplePayCertificatesMigration)
|
||||
}
|
||||
}
|
||||
@ -2,6 +2,7 @@
|
||||
pub mod admin;
|
||||
pub mod analytics;
|
||||
pub mod api_keys;
|
||||
pub mod apple_pay_certificates_migration;
|
||||
pub mod blocklist;
|
||||
pub mod cards_info;
|
||||
pub mod conditional_configs;
|
||||
|
||||
@ -4208,6 +4208,23 @@ pub struct SessionTokenInfo {
|
||||
pub initiative_context: String,
|
||||
#[schema(value_type = Option<CountryAlpha2>)]
|
||||
pub merchant_business_country: Option<api_enums::CountryAlpha2>,
|
||||
#[serde(flatten)]
|
||||
pub payment_processing_details_at: Option<PaymentProcessingDetailsAt>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, ToSchema)]
|
||||
#[serde(tag = "payment_processing_details_at")]
|
||||
pub enum PaymentProcessingDetailsAt {
|
||||
Hyperswitch(PaymentProcessingDetails),
|
||||
Connector,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, PartialEq, Eq, ToSchema)]
|
||||
pub struct PaymentProcessingDetails {
|
||||
#[schema(value_type = String)]
|
||||
pub payment_processing_certificate: Secret<String>,
|
||||
#[schema(value_type = String)]
|
||||
pub payment_processing_certificate_key: Secret<String>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, ToSchema)]
|
||||
|
||||
Reference in New Issue
Block a user