src/platform.rs

hyperswitch · crates/api_models/src/platform.rs · rust · Apache-2.0
payments

Enum representing who initiated a platform operation, with conversion from merchant account type.

// 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 common_enums::MerchantAccountType;
use utoipa::ToSchema;

/// Represents the initiator context in platform-connected setups
/// Used in payment/refund/dispute responses to indicate who initiated the operation
/// None indicates a standard merchant flow / JWT flow / Admin flow or insufficient information
#[derive(
    Clone,
    Copy,
    Debug,
    Eq,
    PartialEq,
    serde::Deserialize,
    serde::Serialize,
    strum::Display,
    strum::EnumString,
    ToSchema,
)]
#[strum(serialize_all = "snake_case")]
#[serde(rename_all = "snake_case")]
pub enum Initiator {
    /// Platform

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

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

Get a free API key