repo stringlengths 6 65 | file_url stringlengths 81 311 | file_path stringlengths 6 227 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 15:31:58 2026-01-04 20:25:31 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/subscriptions/src/types/storage.rs | crates/subscriptions/src/types/storage.rs | pub mod invoice_sync;
| rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/subscriptions/src/types/storage/invoice_sync.rs | crates/subscriptions/src/types/storage/invoice_sync.rs | use api_models::enums as api_enums;
use common_utils::id_type;
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
pub struct InvoiceSyncTrackingData {
pub subscription_id: id_type::SubscriptionId,
pub invoice_id: id_type::InvoiceId,
pub merchant_id: id_type::MerchantId,
pub profile_id: id_typ... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/subscriptions/src/core/errors.rs | crates/subscriptions/src/core/errors.rs | pub use common_utils::errors::{CustomResult, ParsingError, ValidationError};
pub use hyperswitch_domain_models::{
api,
errors::api_error_response::{self, *},
};
pub type SubscriptionResult<T> = CustomResult<T, ApiErrorResponse>;
| rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/subscriptions/src/core/subscription_handler.rs | crates/subscriptions/src/core/subscription_handler.rs | use std::str::FromStr;
use api_models::{
enums as api_enums,
subscription::{self as subscription_types, SubscriptionResponse},
};
use common_enums::connector_enums;
use common_utils::{consts, ext_traits::OptionExt};
use error_stack::ResultExt;
use hyperswitch_domain_models::{
customer, merchant_connector_a... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/subscriptions/src/core/payments_api_client.rs | crates/subscriptions/src/core/payments_api_client.rs | use api_models::subscription as subscription_types;
use common_utils::{ext_traits::BytesExt, request as services};
use error_stack::ResultExt;
use hyperswitch_interfaces::api_client as api;
use crate::{core::errors, helpers, state::SubscriptionState as SessionState};
pub struct PaymentsApiClient;
#[derive(Debug, ser... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/subscriptions/src/core/invoice_handler.rs | crates/subscriptions/src/core/invoice_handler.rs | use api_models::{
enums as api_enums,
mandates::RecurringDetails,
subscription::{self as subscription_types},
};
use common_enums::connector_enums;
use common_utils::{pii, types::MinorUnit};
use error_stack::ResultExt;
use hyperswitch_domain_models::router_response_types::subscriptions as subscription_respo... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/subscriptions/src/core/billing_processor_handler.rs | crates/subscriptions/src/core/billing_processor_handler.rs | use std::str::FromStr;
use api_models::subscription as subscription_types;
use common_enums::{connector_enums, CallConnectorAction};
use common_utils::{ext_traits::ValueExt, pii};
use error_stack::ResultExt;
use hyperswitch_domain_models::{
errors::api_error_response as errors,
router_data_v2::flow_common_type... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/common_types/src/consts.rs | crates/common_types/src/consts.rs | //! Constants that are used in the domain level.
/// API version
#[cfg(feature = "v1")]
pub const API_VERSION: common_enums::ApiVersion = common_enums::ApiVersion::V1;
/// API version
#[cfg(feature = "v2")]
pub const API_VERSION: common_enums::ApiVersion = common_enums::ApiVersion::V2;
/// Maximum Dispute Polling In... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/common_types/src/callback_mapper.rs | crates/common_types/src/callback_mapper.rs | use common_utils::id_type;
use diesel::{AsExpression, FromSqlRow};
#[derive(
Clone, Debug, Eq, PartialEq, serde::Deserialize, serde::Serialize, AsExpression, FromSqlRow,
)]
#[diesel(sql_type = diesel::sql_types::Jsonb)]
/// Represents the data associated with a callback mapper.
pub enum CallbackMapperData {
//... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/common_types/src/lib.rs | crates/common_types/src/lib.rs | //! Types shared across the request/response types and database types
#![warn(missing_docs, missing_debug_implementations)]
pub mod consts;
pub mod customers;
pub mod domain;
pub mod payment_methods;
pub mod payments;
/// types that are wrappers around primitive types
pub mod primitive_wrappers;
pub mod refunds;
/// ... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/common_types/src/refunds.rs | crates/common_types/src/refunds.rs | //! Refund related types
use common_utils::impl_to_sql_from_sql_json;
use diesel::{sql_types::Jsonb, AsExpression, FromSqlRow};
use serde::{Deserialize, Serialize};
use smithy::SmithyModel;
use utoipa::ToSchema;
use crate::domain::{AdyenSplitData, XenditSplitSubMerchantData};
#[derive(
Serialize,
Deserialize... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/common_types/src/primitive_wrappers.rs | crates/common_types/src/primitive_wrappers.rs | pub use bool_wrappers::*;
pub use safe_string::*;
pub use u16_wrappers::*;
pub use u32_wrappers::*;
mod bool_wrappers {
use std::ops::Deref;
use serde::{Deserialize, Serialize};
/// Bool that represents if Extended Authorization is Applied or not
#[derive(
Clone, Copy, Debug, Eq, PartialEq, Ser... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/common_types/src/customers.rs | crates/common_types/src/customers.rs | //! Customer related types
/// HashMap containing MerchantConnectorAccountId and corresponding customer id
#[cfg(feature = "v2")]
#[derive(Clone, Debug, Default, serde::Deserialize, serde::Serialize, diesel::AsExpression)]
#[diesel(sql_type = diesel::sql_types::Jsonb)]
#[serde(transparent)]
pub struct ConnectorCustome... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/common_types/src/payment_methods.rs | crates/common_types/src/payment_methods.rs | //! Common types to be used in payment methods
use diesel::{
backend::Backend,
deserialize,
deserialize::FromSql,
serialize::ToSql,
sql_types::{Json, Jsonb},
AsExpression, Queryable,
};
use serde::{Deserialize, Serialize};
use utoipa::ToSchema;
/// Details of all the payment methods enabled fo... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/common_types/src/three_ds_decision_rule_engine.rs | crates/common_types/src/three_ds_decision_rule_engine.rs | use common_utils::impl_to_sql_from_sql_json;
use diesel::{sql_types::Jsonb, AsExpression, FromSqlRow};
use euclid::frontend::dir::{DirKeyKind, EuclidDirFilter};
use serde::{Deserialize, Serialize};
use utoipa::ToSchema;
/// Enum representing the possible outcomes of the 3DS Decision Rule Engine.
#[derive(
Serializ... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/common_types/src/domain.rs | crates/common_types/src/domain.rs | //! Common types
use std::collections::HashMap;
use common_enums::enums;
use common_utils::{impl_to_sql_from_sql_json, types::MinorUnit};
use diesel::{sql_types::Jsonb, AsExpression, FromSqlRow};
#[cfg(feature = "v2")]
use masking::Secret;
use serde::{Deserialize, Serialize};
use smithy::SmithyModel;
use utoipa::ToSc... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/common_types/src/payments.rs | crates/common_types/src/payments.rs | //! Payment related types
use std::collections::HashMap;
use common_enums::enums;
use common_utils::{
date_time, errors, events, ext_traits::OptionExt, impl_to_sql_from_sql_json, pii,
types::MinorUnit,
};
use diesel::{
sql_types::{Jsonb, Text},
AsExpression, FromSqlRow,
};
use error_stack::{Report, Re... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | true |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/payment_link/build.rs | crates/payment_link/build.rs | use std::{collections::HashMap, fs, str::FromStr};
use router_env::env::Env;
use serde::Deserialize;
fn main() {
// Manually deserialize ENVIRONMENT variable to Env enum
let environment = std::env::var("ENVIRONMENT")
.ok()
.and_then(|env_str| Env::from_str(&env_str).ok())
.unwrap_or_el... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/payment_link/src/meta_tags.rs | crates/payment_link/src/meta_tags.rs | use api_models::payments::PaymentLinkDetails;
pub fn get_meta_tags_html(payment_details: &PaymentLinkDetails) -> String {
format!(
r#"<meta property="og:title" content="Payment request from {0}"/>
<meta property="og:description" content="{1}"/>"#,
payment_details.merchant_name.clone(),
... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/payment_link/src/lib.rs | crates/payment_link/src/lib.rs | pub mod css_generator;
pub mod js_generator;
pub mod meta_tags;
pub mod template_renderer;
pub mod types;
#[cfg(feature = "wasm")]
pub mod wasm;
pub use css_generator::get_css_script;
pub use js_generator::get_js_script;
pub use meta_tags::get_meta_tags_html;
pub use template_renderer::{
build_payment_link_html, ... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/payment_link/src/js_generator.rs | crates/payment_link/src/js_generator.rs | use error_stack::Result;
use serde_json::Value;
#[derive(Debug, thiserror::Error)]
pub enum PaymentLinkError {
#[error("Failed to serialize payment link data")]
SerializationFailed,
}
/// Convert snake_case to camelCase
fn camel_case_key(key: &str) -> String {
let mut out = String::new();
let mut uppe... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/payment_link/src/template_renderer.rs | crates/payment_link/src/template_renderer.rs | use error_stack::{Result, ResultExt};
use tera::{Context, Tera};
use crate::types::{PaymentLinkFormData, PaymentLinkStatusData};
#[derive(Debug, thiserror::Error)]
pub enum PaymentLinkError {
#[error("Failed to render template")]
TemplateRenderError,
#[error("Failed to build template")]
TemplateBuildE... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/payment_link/src/types.rs | crates/payment_link/src/types.rs | //! Payment link specific types
use common_utils::{
events::{ApiEventMetric, ApiEventsType},
impl_api_event_type,
};
#[derive(Debug, Eq, PartialEq, Clone, serde::Serialize, serde::Deserialize)]
pub struct PaymentLinkFormData {
pub js_script: String,
pub css_script: String,
pub sdk_url: url::Url,
... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/payment_link/src/wasm.rs | crates/payment_link/src/wasm.rs | use api_models::{admin::PaymentLinkConfig, payments::PaymentLinkData};
use crate::{
build_payment_link_html, get_css_script, get_js_script, get_meta_tags_html, PaymentLinkFormData,
};
const SDK_URL: &str = env!("SDK_URL");
/// Implementation function for generating payment link preview
/// Called by the wasm_bin... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/payment_link/src/css_generator.rs | crates/payment_link/src/css_generator.rs | use std::collections::HashMap;
use api_models::admin::PaymentLinkConfig;
use error_stack::{Result, ResultExt};
#[derive(Debug, thiserror::Error)]
pub enum PaymentLinkError {
#[error("Invalid CSS selector: {0}")]
InvalidCssSelector(String),
}
pub fn get_css_script(payment_link_config: &PaymentLinkConfig) -> R... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/euclid/src/lib.rs | crates/euclid/src/lib.rs | #![allow(clippy::result_large_err)]
pub mod backend;
pub mod dssa;
pub mod enums;
pub mod frontend;
pub mod types;
| rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/euclid/src/backend.rs | crates/euclid/src/backend.rs | pub mod inputs;
pub mod interpreter;
#[cfg(feature = "valued_jit")]
pub mod vir_interpreter;
pub use inputs::BackendInput;
pub use interpreter::InterpreterBackend;
#[cfg(feature = "valued_jit")]
pub use vir_interpreter::VirInterpreterBackend;
use crate::frontend::ast;
#[derive(Debug, Clone, serde::Serialize)]
pub st... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/euclid/src/enums.rs | crates/euclid/src/enums.rs | use common_enums::connector_enums::Connector;
pub use common_enums::{
AuthenticationType, CaptureMethod, CardNetwork, Country, CountryAlpha2, Currency,
FutureUsage as SetupFutureUsage, PaymentMethod, PaymentMethodType,
};
use strum::VariantNames;
use utoipa::ToSchema;
pub trait CollectVariants {
fn variant... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/euclid/src/types.rs | crates/euclid/src/types.rs | pub mod transformers;
use common_utils::types::MinorUnit;
use euclid_macros::EnumNums;
use serde::{Deserialize, Serialize};
use strum::VariantNames;
use crate::{
dssa::types::EuclidAnalysable,
enums,
frontend::{
ast,
dir::{
enums::{
CustomerDeviceDisplaySize, Cu... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/euclid/src/dssa.rs | crates/euclid/src/dssa.rs | //! Domain Specific Static Analyzer
pub mod analyzer;
pub mod graph;
pub mod state_machine;
pub mod truth;
pub mod types;
pub mod utils;
| rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/euclid/src/frontend.rs | crates/euclid/src/frontend.rs | pub mod ast;
pub mod dir;
pub mod vir;
| rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/euclid/src/dssa/analyzer.rs | crates/euclid/src/dssa/analyzer.rs | //! Static Analysis for the Euclid Rule DSL
//!
//! Exposes certain functions that can be used to perform static analysis over programs
//! in the Euclid Rule DSL. These include standard control flow analyses like testing
//! conflicting assertions, to Domain Specific Analyses making use of the
//! [`Knowledge Graph Fr... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/euclid/src/dssa/types.rs | crates/euclid/src/dssa/types.rs | use std::{collections::HashMap, fmt};
use serde::Serialize;
use crate::{
dssa::{self, graph},
frontend::{ast, dir},
types::{DataType, EuclidValue, Metadata},
};
pub trait EuclidAnalysable: Sized {
fn get_dir_value_for_analysis(&self, rule_name: String) -> Vec<(dir::DirValue, Metadata)>;
}
#[derive(D... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/euclid/src/dssa/utils.rs | crates/euclid/src/dssa/utils.rs | pub struct Unpacker;
| rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/euclid/src/dssa/truth.rs | crates/euclid/src/dssa/truth.rs | 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... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/euclid/src/dssa/graph.rs | crates/euclid/src/dssa/graph.rs | use std::{fmt::Debug, sync::Weak};
use hyperswitch_constraint_graph as cgraph;
use rustc_hash::{FxHashMap, FxHashSet};
use crate::{
dssa::types,
frontend::dir,
types::{DataType, Metadata},
};
pub mod euclid_graph_prelude {
pub use hyperswitch_constraint_graph as cgraph;
pub use rustc_hash::{FxHas... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | true |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/euclid/src/dssa/state_machine.rs | crates/euclid/src/dssa/state_machine.rs | use super::types::EuclidAnalysable;
use crate::{dssa::types, frontend::dir, types::Metadata};
#[derive(Debug, Clone, serde::Serialize, thiserror::Error)]
#[serde(tag = "type", content = "info", rename_all = "snake_case")]
pub enum StateMachineError {
#[error("Index out of bounds: {0}")]
IndexOutOfBounds(&'stat... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/euclid/src/backend/inputs.rs | crates/euclid/src/backend/inputs.rs | use rustc_hash::FxHashMap;
use serde::{Deserialize, Serialize};
use crate::{
enums,
frontend::dir::enums::{
CustomerDeviceDisplaySize, CustomerDevicePlatform, CustomerDeviceType, TransactionInitiator,
},
};
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct MandateData {
pub mandate_ac... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/euclid/src/backend/interpreter.rs | crates/euclid/src/backend/interpreter.rs | pub mod types;
use common_utils::types::MinorUnit;
use crate::{
backend::{self, inputs, EuclidBackend},
frontend::ast,
};
pub struct InterpreterBackend<O> {
program: ast::Program<O>,
}
impl<O> InterpreterBackend<O>
where
O: Clone,
{
fn eval_number_comparison_array(
num: MinorUnit,
... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/euclid/src/backend/vir_interpreter.rs | crates/euclid/src/backend/vir_interpreter.rs | pub mod types;
use std::fmt::Debug;
use serde::{Deserialize, Serialize};
use crate::{
backend::{self, inputs, EuclidBackend},
frontend::{
ast,
dir::{self, EuclidDirFilter},
vir,
},
};
#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct VirInterpreterBackend<O> {
progra... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/euclid/src/backend/vir_interpreter/types.rs | crates/euclid/src/backend/vir_interpreter/types.rs | use rustc_hash::{FxHashMap, FxHashSet};
use crate::{
backend::inputs::BackendInput,
dssa,
types::{self, EuclidKey, EuclidValue, MetadataValue, NumValueRefinement, StrValue},
};
#[derive(Debug, Clone, serde::Serialize, thiserror::Error)]
pub enum VirInterpreterError {
#[error("Error when lowering the p... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/euclid/src/backend/interpreter/types.rs | crates/euclid/src/backend/interpreter/types.rs | use std::{collections::HashMap, fmt, ops::Deref, string::ToString};
use serde::Serialize;
use crate::{backend::inputs, frontend::ast::ValueType, types::EuclidKey};
#[derive(Debug, Clone, Serialize, thiserror::Error)]
#[serde(tag = "type", content = "data", rename_all = "snake_case")]
pub enum InterpreterErrorType {
... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/euclid/src/types/transformers.rs | crates/euclid/src/types/transformers.rs | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false | |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/euclid/src/frontend/ast.rs | crates/euclid/src/frontend/ast.rs | pub mod lowering;
#[cfg(feature = "ast_parser")]
pub mod parser;
use common_utils::types::MinorUnit;
use serde::{Deserialize, Serialize};
use utoipa::ToSchema;
use crate::{
enums::RoutableConnectors,
types::{DataType, Metadata},
};
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Hash)]
pub stru... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/euclid/src/frontend/vir.rs | crates/euclid/src/frontend/vir.rs | //! Valued Intermediate Representation
use serde::{Deserialize, Serialize};
use crate::types::{EuclidValue, Metadata};
#[derive(Debug, Clone, Serialize, Deserialize)]
pub enum ValuedComparisonLogic {
NegativeConjunction,
PositiveDisjunction,
}
#[derive(Clone, Debug, Serialize, Deserialize)]
pub struct Valued... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/euclid/src/frontend/dir.rs | crates/euclid/src/frontend/dir.rs | //! Domain Intermediate Representation
pub mod enums;
pub mod lowering;
pub mod transformers;
use strum::IntoEnumIterator;
// use common_utils::types::MinorUnit;
use crate::{enums as euclid_enums, frontend::ast, types};
#[macro_export]
macro_rules! dirval {
(Connector = $name:ident) => {
$crate::frontend... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | true |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/euclid/src/frontend/ast/parser.rs | crates/euclid/src/frontend/ast/parser.rs | use common_utils::types::MinorUnit;
use nom::{
branch, bytes::complete, character::complete as pchar, combinator, error, multi, sequence,
};
use crate::{frontend::ast, types::DummyOutput};
pub type ParseResult<T, U> = nom::IResult<T, U, error::VerboseError<T>>;
pub enum EuclidError {
InvalidPercentage(String)... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/euclid/src/frontend/ast/lowering.rs | crates/euclid/src/frontend/ast/lowering.rs | //! Analysis for the Lowering logic in ast
//!
//!Certain functions that can be used to perform the complete lowering of ast to dir.
//!This includes lowering of enums, numbers, strings as well as Comparison logics.
use std::str::FromStr;
use crate::{
dssa::types::{AnalysisError, AnalysisErrorType},
enums::Co... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/euclid/src/frontend/dir/enums.rs | crates/euclid/src/frontend/dir/enums.rs | use strum::VariantNames;
use utoipa::ToSchema;
use crate::enums::collect_variants;
pub use crate::enums::{
AuthenticationType, CaptureMethod, CardNetwork, Country, Country as BusinessCountry,
Country as BillingCountry, Country as IssuerCountry, Country as AcquirerCountry, CountryAlpha2,
Currency as Payment... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/euclid/src/frontend/dir/lowering.rs | crates/euclid/src/frontend/dir/lowering.rs | //! Analysis of the lowering logic for the DIR
//!
//! Consists of certain functions that supports the lowering logic from DIR to VIR.
//! These includes the lowering of the DIR program and vector of rules , and the lowering of ifstatements
//! ,and comparisonsLogic and also the lowering of the enums of value variants ... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/euclid/src/frontend/dir/transformers.rs | crates/euclid/src/frontend/dir/transformers.rs | use crate::{dirval, dssa::types::AnalysisErrorType, enums as global_enums, frontend::dir};
pub trait IntoDirValue {
fn into_dir_value(self) -> Result<dir::DirValue, AnalysisErrorType>;
}
impl IntoDirValue for (global_enums::PaymentMethodType, global_enums::PaymentMethod) {
fn into_dir_value(self) -> Result<dir... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/euclid/benches/backends.rs | crates/euclid/benches/backends.rs | #![allow(unused, clippy::expect_used)]
use common_utils::types::MinorUnit;
use criterion::{black_box, criterion_group, criterion_main, Criterion};
use euclid::{
backend::{inputs, EuclidBackend, InterpreterBackend, VirInterpreterBackend},
enums,
frontend::ast::{self, parser},
types::DummyOutput,
};
fn ... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/hsdev/src/main.rs | crates/hsdev/src/main.rs | #![allow(clippy::print_stdout, clippy::print_stderr)]
use clap::{Parser, ValueHint};
use diesel::{pg::PgConnection, Connection};
use diesel_migrations::{FileBasedMigrations, HarnessWithOutput, MigrationHarness};
use toml::Value;
mod input_file;
#[derive(Parser, Debug)]
#[command(author, version, about, long_about = ... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/hsdev/src/input_file.rs | crates/hsdev/src/input_file.rs | use std::string::String;
use serde::Deserialize;
use toml::Value;
#[derive(Deserialize)]
pub struct InputData {
username: String,
password: String,
dbname: String,
host: String,
port: u16,
}
impl InputData {
pub fn read(db_table: &Value) -> Result<Self, toml::de::Error> {
db_table.clo... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/hyperswitch_domain_models/src/errors.rs | crates/hyperswitch_domain_models/src/errors.rs | pub mod api_error_response;
| rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/hyperswitch_domain_models/src/consts.rs | crates/hyperswitch_domain_models/src/consts.rs | //! Constants that are used in the domain models.
use std::{collections::HashSet, sync::LazyLock};
pub static ROUTING_ENABLED_PAYMENT_METHODS: LazyLock<HashSet<common_enums::PaymentMethod>> =
LazyLock::new(|| {
let mut set = HashSet::new();
set.insert(common_enums::PaymentMethod::BankTransfer);
... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/hyperswitch_domain_models/src/mandates.rs | crates/hyperswitch_domain_models/src/mandates.rs | use std::collections::HashMap;
use api_models::payments::{
MandateAmountData as ApiMandateAmountData, MandateData as ApiMandateData, MandateType,
};
use common_enums::Currency;
use common_types::payments as common_payments_types;
use common_utils::{
date_time,
errors::{CustomResult, ParsingError},
pii,... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/hyperswitch_domain_models/src/vault.rs | crates/hyperswitch_domain_models/src/vault.rs | use api_models::payment_methods;
use serde::{Deserialize, Serialize};
#[cfg(feature = "v2")]
use crate::errors;
use crate::payment_method_data;
#[derive(Debug, Deserialize, Serialize, Clone)]
pub enum PaymentMethodVaultingData {
Card(payment_methods::CardDetail),
NetworkToken(payment_method_data::NetworkToken... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/hyperswitch_domain_models/src/payment_address.rs | crates/hyperswitch_domain_models/src/payment_address.rs | use crate::address::Address;
#[derive(Clone, Default, Debug, serde::Serialize)]
pub struct PaymentAddress {
shipping: Option<Address>,
billing: Option<Address>,
unified_payment_method_billing: Option<Address>,
payment_method_billing: Option<Address>,
}
impl PaymentAddress {
pub fn new(
shi... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/hyperswitch_domain_models/src/master_key.rs | crates/hyperswitch_domain_models/src/master_key.rs | pub trait MasterKeyInterface {
fn get_master_key(&self) -> &[u8];
}
| rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/hyperswitch_domain_models/src/callback_mapper.rs | crates/hyperswitch_domain_models/src/callback_mapper.rs | use common_enums::enums as common_enums;
use common_types::callback_mapper::CallbackMapperData;
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct CallbackMapper {
pub id: String,
pub callback_mapper_id_type: common_enums::CallbackMapperIdType,
pub data: CallbackMapperData,
pub created_at: time::Primiti... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/hyperswitch_domain_models/src/lib.rs | crates/hyperswitch_domain_models/src/lib.rs | pub mod address;
pub mod api;
pub mod authentication;
pub mod behaviour;
pub mod bulk_tokenization;
pub mod business_profile;
pub mod callback_mapper;
pub mod card_testing_guard_data;
pub mod cards_info;
pub mod chat;
pub mod configs;
pub mod connector_endpoints;
pub mod consts;
pub mod customer;
pub mod disputes;
pub ... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/hyperswitch_domain_models/src/connector_endpoints.rs | crates/hyperswitch_domain_models/src/connector_endpoints.rs | //! Configs interface
use common_enums::{connector_enums, ApplicationError};
use common_utils::errors::CustomResult;
use masking::Secret;
use serde::Deserialize;
use crate::errors::api_error_response;
// struct Connectors
#[allow(missing_docs, missing_debug_implementations)]
#[derive(Debug, Deserialize, Clone, Default... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/hyperswitch_domain_models/src/router_response_types.rs | crates/hyperswitch_domain_models/src/router_response_types.rs | pub mod disputes;
pub mod fraud_check;
pub mod revenue_recovery;
pub mod subscriptions;
use std::collections::HashMap;
use api_models::payments::AddressDetails;
use common_utils::{pii, request::Method, types::MinorUnit};
pub use disputes::{
AcceptDisputeResponse, DefendDisputeResponse, DisputeSyncResponse, FetchDi... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/hyperswitch_domain_models/src/address.rs | crates/hyperswitch_domain_models/src/address.rs | use masking::{PeekInterface, Secret};
#[derive(Default, Clone, Debug, Eq, PartialEq, serde::Deserialize, serde::Serialize)]
pub struct Address {
pub address: Option<AddressDetails>,
pub phone: Option<PhoneDetails>,
pub email: Option<common_utils::pii::Email>,
}
impl masking::SerializableSecret for Address... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/hyperswitch_domain_models/src/refunds.rs | crates/hyperswitch_domain_models/src/refunds.rs | #[cfg(feature = "v2")]
use crate::business_profile::Profile;
#[cfg(feature = "v1")]
use crate::errors;
#[cfg(feature = "v1")]
pub struct RefundListConstraints {
pub payment_id: Option<common_utils::id_type::PaymentId>,
pub refund_id: Option<String>,
pub profile_id: Option<Vec<common_utils::id_type::Profile... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/hyperswitch_domain_models/src/behaviour.rs | crates/hyperswitch_domain_models/src/behaviour.rs | use common_utils::{
errors::{CustomResult, ValidationError},
types::keymanager::{Identifier, KeyManagerState},
};
use masking::Secret;
/// Trait for converting domain types to storage models
#[async_trait::async_trait]
pub trait Conversion {
type DstType;
type NewDstType;
async fn convert(self) -> ... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/hyperswitch_domain_models/src/routing.rs | crates/hyperswitch_domain_models/src/routing.rs | 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::MerchantConnect... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/hyperswitch_domain_models/src/ext_traits.rs | crates/hyperswitch_domain_models/src/ext_traits.rs | use common_utils::{
errors::{self, CustomResult},
ext_traits::ValueExt,
fp_utils::when,
};
use error_stack::ResultExt;
use crate::errors::api_error_response;
pub type DomainResult<T> = CustomResult<T, api_error_response::ApiErrorResponse>;
pub trait OptionExt<T> {
fn check_value_present(&self, field_n... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/hyperswitch_domain_models/src/disputes.rs | crates/hyperswitch_domain_models/src/disputes.rs | use crate::errors;
pub struct DisputeListConstraints {
pub dispute_id: Option<String>,
pub payment_id: Option<common_utils::id_type::PaymentId>,
pub limit: Option<u32>,
pub offset: Option<u32>,
pub profile_id: Option<Vec<common_utils::id_type::ProfileId>>,
pub dispute_status: Option<Vec<common_... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/hyperswitch_domain_models/src/router_data_v2.rs | crates/hyperswitch_domain_models/src/router_data_v2.rs | pub mod flow_common_types;
use std::{marker::PhantomData, ops::Deref};
use common_utils::id_type;
#[cfg(feature = "frm")]
pub use flow_common_types::FrmFlowData;
#[cfg(feature = "payouts")]
pub use flow_common_types::PayoutFlowData;
pub use flow_common_types::{
AccessTokenFlowData, AuthenticationTokenFlowData, Di... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/hyperswitch_domain_models/src/router_flow_types.rs | crates/hyperswitch_domain_models/src/router_flow_types.rs | pub mod access_token_auth;
pub mod authentication;
pub mod dispute;
pub mod files;
pub mod fraud_check;
pub mod mandate_revoke;
pub mod payments;
pub mod payouts;
pub mod refunds;
pub mod revenue_recovery;
pub mod subscriptions;
pub mod unified_authentication_service;
pub mod vault;
pub mod webhooks;
pub use access_tok... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/hyperswitch_domain_models/src/revenue_recovery.rs | crates/hyperswitch_domain_models/src/revenue_recovery.rs | use api_models::{payments as api_payments, webhooks};
use common_enums::enums as common_enums;
use common_types::primitive_wrappers;
use common_utils::{id_type, pii, types as util_types};
use time::PrimitiveDateTime;
use crate::{
payments,
router_response_types::revenue_recovery::{
BillingConnectorInvo... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/hyperswitch_domain_models/src/platform.rs | crates/hyperswitch_domain_models/src/platform.rs | pub use crate::{merchant_account::MerchantAccount, merchant_key_store::MerchantKeyStore};
/// Provider = The business owner or the governing entity in the hierarchy.
/// In a platform-connected setup this is represented by the platform merchant.
/// For a standard merchant, both provider and processor are represented ... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/hyperswitch_domain_models/src/cards_info.rs | crates/hyperswitch_domain_models/src/cards_info.rs | use common_utils::errors;
use diesel_models::cards_info;
#[async_trait::async_trait]
pub trait CardsInfoInterface {
type Error;
async fn get_card_info(
&self,
_card_iin: &str,
) -> errors::CustomResult<Option<cards_info::CardInfo>, Self::Error>;
async fn add_card_info(
&self,
... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/hyperswitch_domain_models/src/merchant_account.rs | crates/hyperswitch_domain_models/src/merchant_account.rs | use common_utils::{
crypto::{OptionalEncryptableName, OptionalEncryptableValue},
date_time,
encryption::Encryption,
errors::{CustomResult, ValidationError},
ext_traits::ValueExt,
pii, type_name,
types::keymanager::{self},
};
use diesel_models::{
enums::MerchantStorageScheme, merchant_acc... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | true |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/hyperswitch_domain_models/src/subscription.rs | crates/hyperswitch_domain_models/src/subscription.rs | use common_utils::{
errors::{CustomResult, ValidationError},
events::ApiEventMetric,
generate_id_with_default_len,
pii::SecretSerdeValue,
types::keymanager::{self, KeyManagerState},
};
use error_stack::ResultExt;
use masking::{ExposeInterface, PeekInterface, Secret};
use time::PrimitiveDateTime;
us... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/hyperswitch_domain_models/src/card_testing_guard_data.rs | crates/hyperswitch_domain_models/src/card_testing_guard_data.rs | use serde::{self, Deserialize, Serialize};
#[derive(Clone, Serialize, Deserialize, Debug)]
pub struct CardTestingGuardData {
pub is_card_ip_blocking_enabled: bool,
pub card_ip_blocking_cache_key: String,
pub is_guest_user_card_blocking_enabled: bool,
pub guest_user_card_blocking_cache_key: String,
... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/hyperswitch_domain_models/src/payment_method_data.rs | crates/hyperswitch_domain_models/src/payment_method_data.rs | #[cfg(feature = "v2")]
use std::str::FromStr;
use api_models::{
mandates,
payment_methods::{self},
payments::{
additional_info as payment_additional_types, AdditionalNetworkTokenInfo, ExtendedCardInfo,
},
};
use common_enums::{enums as api_enums, GooglePayCardFundingSource};
use common_utils::{... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | true |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/hyperswitch_domain_models/src/invoice.rs | crates/hyperswitch_domain_models/src/invoice.rs | use common_utils::{
errors::{CustomResult, ValidationError},
id_type::GenerateId,
pii::SecretSerdeValue,
types::{
keymanager::{Identifier, KeyManagerState},
MinorUnit,
},
};
use masking::{PeekInterface, Secret};
use utoipa::ToSchema;
use crate::merchant_key_store::MerchantKeyStore;
... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/hyperswitch_domain_models/src/relay.rs | crates/hyperswitch_domain_models/src/relay.rs | use common_enums::enums;
use common_utils::{
self,
errors::{CustomResult, ValidationError},
id_type::{self, GenerateId},
pii,
types::{keymanager, MinorUnit},
};
use diesel_models::relay::RelayUpdateInternal;
use error_stack::ResultExt;
use masking::{ExposeInterface, Secret};
use serde::{self, Deseri... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/hyperswitch_domain_models/src/api.rs | crates/hyperswitch_domain_models/src/api.rs | use std::{collections::HashSet, fmt::Display};
use common_utils::{
events::{ApiEventMetric, ApiEventsType},
impl_api_event_type,
};
use super::payment_method_data::PaymentMethodData;
#[derive(Debug, PartialEq)]
pub enum ApplicationResponse<R> {
Json(R),
StatusOk,
TextPlain(String),
JsonForRed... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/hyperswitch_domain_models/src/types.rs | crates/hyperswitch_domain_models/src/types.rs | pub use diesel_models::types::OrderDetailsWithAmount;
use crate::{
router_data::{AccessToken, AccessTokenAuthenticationResponse, RouterData},
router_data_v2::{self, RouterDataV2},
router_flow_types::{
mandate_revoke::MandateRevoke,
revenue_recovery::InvoiceRecordBack,
subscriptions:... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/hyperswitch_domain_models/src/merchant_connector_account.rs | crates/hyperswitch_domain_models/src/merchant_connector_account.rs | #[cfg(feature = "v2")]
use std::collections::HashMap;
use common_utils::{
crypto::Encryptable,
date_time,
encryption::Encryption,
errors::{CustomResult, ValidationError},
ext_traits::{StringExt, ValueExt},
id_type, pii, type_name,
types::keymanager::{Identifier, KeyManagerState, ToEncryptab... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | true |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/hyperswitch_domain_models/src/bulk_tokenization.rs | crates/hyperswitch_domain_models/src/bulk_tokenization.rs | use api_models::{payment_methods as payment_methods_api, payments as payments_api};
use cards::CardNumber;
use common_enums as enums;
use common_utils::{
errors,
ext_traits::OptionExt,
id_type, pii,
transformers::{ForeignFrom, ForeignTryFrom},
};
use error_stack::report;
use crate::{
address::{Addr... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/hyperswitch_domain_models/src/payouts.rs | crates/hyperswitch_domain_models/src/payouts.rs | pub mod payout_attempt;
#[allow(clippy::module_inception)]
pub mod payouts;
use common_enums as storage_enums;
use common_utils::{consts, id_type};
use time::PrimitiveDateTime;
pub enum PayoutFetchConstraints {
Single { payout_id: id_type::PayoutId },
List(Box<PayoutListParams>),
}
pub struct PayoutListParam... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/hyperswitch_domain_models/src/chat.rs | crates/hyperswitch_domain_models/src/chat.rs | use common_utils::id_type;
use masking::Secret;
#[derive(Debug, serde::Deserialize, serde::Serialize, Clone)]
pub struct GetDataMessage {
pub message: Secret<String>,
}
#[derive(Debug, serde::Deserialize, serde::Serialize, Clone)]
pub struct HyperswitchAiDataRequest {
pub merchant_id: id_type::MerchantId,
... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/hyperswitch_domain_models/src/gsm.rs | crates/hyperswitch_domain_models/src/gsm.rs | use common_utils::{errors::ValidationError, ext_traits::StringExt};
use serde::{self, Deserialize, Serialize};
#[derive(Debug, Clone, Deserialize, Serialize, PartialEq, Eq)]
pub struct GatewayStatusMap {
pub connector: String,
pub flow: String,
pub sub_flow: String,
pub code: String,
pub message: S... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/hyperswitch_domain_models/src/payment_methods.rs | crates/hyperswitch_domain_models/src/payment_methods.rs | #[cfg(feature = "v2")]
use std::collections::HashMap;
#[cfg(feature = "v2")]
use api_models::payment_methods::PaymentMethodsData;
use api_models::{customers, payment_methods, payments};
// specific imports because of using the macro
use common_enums::enums::MerchantStorageScheme;
#[cfg(feature = "v1")]
use common_util... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | true |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/hyperswitch_domain_models/src/transformers.rs | crates/hyperswitch_domain_models/src/transformers.rs | pub trait ForeignFrom<F> {
fn foreign_from(from: F) -> Self;
}
pub trait ForeignTryFrom<F>: Sized {
type Error;
fn foreign_try_from(from: F) -> Result<Self, Self::Error>;
}
| rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/hyperswitch_domain_models/src/authentication.rs | crates/hyperswitch_domain_models/src/authentication.rs | use std::str::FromStr;
use async_trait::async_trait;
use common_enums::MerchantCategoryCode;
use common_utils::{
crypto::Encryptable,
encryption::Encryption,
errors::{CustomResult, ValidationError},
pii,
types::keymanager::{Identifier, KeyManagerState, ToEncryptable},
};
use error_stack::ResultExt;... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/hyperswitch_domain_models/src/business_profile.rs | crates/hyperswitch_domain_models/src/business_profile.rs | use std::borrow::Cow;
use common_enums::enums as api_enums;
use common_types::{domain::AcquirerConfig, primitive_wrappers};
use common_utils::{
crypto::{OptionalEncryptableName, OptionalEncryptableValue},
date_time,
encryption::Encryption,
errors::{CustomResult, ValidationError},
ext_traits::{Optio... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | true |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/hyperswitch_domain_models/src/customer.rs | crates/hyperswitch_domain_models/src/customer.rs | use common_enums::enums::MerchantStorageScheme;
#[cfg(feature = "v2")]
use common_enums::DeleteStatus;
use common_utils::{
crypto::{self, Encryptable},
date_time,
encryption::Encryption,
errors::{CustomResult, ValidationError},
ext_traits::ValueExt,
id_type, pii,
types::{
keymanager:... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/hyperswitch_domain_models/src/router_request_types.rs | crates/hyperswitch_domain_models/src/router_request_types.rs | pub mod authentication;
pub mod fraud_check;
pub mod revenue_recovery;
pub mod subscriptions;
pub mod unified_authentication_service;
use api_models::payments::{AdditionalPaymentData, AddressDetails, RequestSurchargeDetails};
use common_types::payments as common_payments_types;
use common_utils::{
consts, errors,
... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | true |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/hyperswitch_domain_models/src/configs.rs | crates/hyperswitch_domain_models/src/configs.rs | use common_utils::errors::CustomResult;
use diesel_models::configs as storage;
#[async_trait::async_trait]
pub trait ConfigInterface {
type Error;
async fn insert_config(
&self,
config: storage::ConfigNew,
) -> CustomResult<storage::Config, Self::Error>;
async fn find_config_by_key(&se... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/hyperswitch_domain_models/src/router_data.rs | crates/hyperswitch_domain_models/src/router_data.rs | use std::{collections::HashMap, marker::PhantomData};
use cards::NetworkToken;
use common_types::{payments as common_payment_types, primitive_wrappers};
use common_utils::{
errors::IntegrityCheckError,
ext_traits::{OptionExt, ValueExt},
id_type::{self},
types::MinorUnit,
};
use error_stack::ResultExt;
... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | true |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/hyperswitch_domain_models/src/merchant_key_store.rs | crates/hyperswitch_domain_models/src/merchant_key_store.rs | use common_utils::{
crypto::Encryptable,
custom_serde, date_time,
errors::{CustomResult, ValidationError},
type_name,
types::keymanager::{self, KeyManagerState},
};
use error_stack::ResultExt;
use masking::{PeekInterface, Secret};
use time::PrimitiveDateTime;
use crate::type_encryption::{crypto_ope... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/hyperswitch_domain_models/src/payments.rs | crates/hyperswitch_domain_models/src/payments.rs | #[cfg(feature = "v2")]
use std::marker::PhantomData;
#[cfg(feature = "v2")]
use api_models::payments::{ConnectorMetadata, SessionToken, VaultSessionDetails};
use common_types::primitive_wrappers;
#[cfg(feature = "v1")]
use common_types::{
payments::BillingDescriptor,
primitive_wrappers::{
AlwaysRequest... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | true |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/hyperswitch_domain_models/src/type_encryption.rs | crates/hyperswitch_domain_models/src/type_encryption.rs | use async_trait::async_trait;
use common_utils::{
crypto,
encryption::Encryption,
errors::{CryptoError, CustomResult},
ext_traits::AsyncExt,
metrics::utils::record_operation_time,
types::keymanager::{Identifier, KeyManagerState},
};
use encrypt::TypeEncryption;
use masking::Secret;
use router_en... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | true |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/hyperswitch_domain_models/src/tokenization.rs | crates/hyperswitch_domain_models/src/tokenization.rs | use common_utils::{
self, date_time,
errors::{CustomResult, ValidationError},
types::keymanager,
};
use masking::Secret;
use serde::{Deserialize, Serialize};
use time::PrimitiveDateTime;
#[cfg(all(feature = "v2", feature = "tokenization_v2"))]
#[derive(Clone, Debug, Serialize, Deserialize)]
pub struct Toke... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.