RoutingData (src/routing.rs)

hyperswitch · crates/hyperswitch_domain_models/src/routing.rs · rust · Apache-2.0
ai

Defines routing data structures and serialization logic for payment routing.

// Source: https://github.com/juspay/hyperswitch | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
use std::collections::HashMap;

use api_models::{enums as api_enums, routing};
use common_utils::id_type;

#[cfg(feature = "v1")]
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
pub struct RoutingData {
    pub routed_through: Option<String>,

    pub merchant_connector_id: Option<id_type::MerchantConnectorAccountId>,

    pub routing_info: PaymentRoutingInfo,
    pub algorithm: Option<routing::StraightThroughAlgorithm>,
}

#[cfg(feature = "v2")]
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
pub struct RoutingData {
    // TODO: change this to RoutableConn

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key