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

1.4 KB
Raw Blame
use std::sync::LazyLock;

use euclid_macros::knowledge;

#[allow(unused_imports)] // Required by the `knowledge!` macro expansion
use crate::dssa::graph::euclid_graph_prelude;
use crate::frontend::dir;

pub static ANALYSIS_GRAPH: LazyLock<hyperswitch_constraint_graph::ConstraintGraph<dir::DirValue>> =
    LazyLock::new(|| {
        knowledge! {
            // Payment Method should be `Card` for a CardType to be present
            PaymentMethod(Card) ->> CardType(any);

            // Payment Method should be `PayLater` for a PayLaterType to be present
            PaymentMethod(PayLater) ->> PayLaterType(any);

            // Payment Method should be `Wallet` for a WalletType to be present
            PaymentMethod(Wallet) ->> WalletType(any);

            // Payment Method should be `BankRedirect` for a BankRedirectType to
            // be present
            PaymentMethod(BankRedirect) ->> BankRedirectType(any);

            // Payment Method should be `BankTransfer` for a BankTransferType to
            // be present
            PaymentMethod(BankTransfer) ->> BankTransferType(any);

            // Payment Method should be `GiftCard` for a GiftCardType to
            // be present
            PaymentMethod(GiftCard) ->> GiftCardType(any);

            // Payment Method should be `RealTimePayment` for a RealTimePaymentType to
            // be present
            PaymentMethod(RealTimePayment) ->> RealTimePaymentType(any);
        }
    });