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

495 B
Raw Blame
use common_utils::external_service::ExternalServiceCall;
use serde::Serialize;

use super::EventType;
use crate::services::kafka::KafkaMessage;

#[derive(Debug, Serialize)]
pub struct KafkaExternalServiceCall<'a> {
    #[serde(flatten)]
    pub event: &'a ExternalServiceCall,
}

impl KafkaMessage for KafkaExternalServiceCall<'_> {
    fn key(&self) -> String {
        self.event.request_id.clone()
    }

    fn event_type(&self) -> EventType {
        EventType::ExternalServiceCall
    }
}