text string | file_path string | module string | type string | tokens int64 | language string | struct_name string | type_name string | trait_name string | impl_type string | function_name string | source string | section string | keys list | macro_type string | url string | title string | chunk_index int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
pub fn get_optional_card_and_cvc(
&self,
) -> (Option<domain::CardDetail>, Option<masking::Secret<String>>) {
(self.card.clone(), self.card_cvc.clone())
} | crates/router/src/core/payment_methods/tokenize/card_executor.rs | router | function_signature | 47 | rust | null | null | null | null | get_optional_card_and_cvc | null | null | null | null | null | null | null |
pub struct ProphetpayCardTokenData {
card_token: Secret<String>,
} | crates/hyperswitch_connectors/src/connectors/prophetpay/transformers.rs | hyperswitch_connectors | struct_definition | 16 | rust | ProphetpayCardTokenData | null | null | null | null | null | null | null | null | null | null | null |
impl api::PaymentAuthorize for Bankofamerica {} | crates/hyperswitch_connectors/src/connectors/bankofamerica.rs | hyperswitch_connectors | impl_block | 11 | rust | null | Bankofamerica | api::PaymentAuthorize for | impl api::PaymentAuthorize for for Bankofamerica | null | null | null | null | null | null | null | null |
pub struct PayloadErrorResponse {
pub error_type: String,
pub error_description: String,
pub object: String,
/// Payload returns arbitrary details in JSON format
pub details: Option<serde_json::Value>,
} | crates/hyperswitch_connectors/src/connectors/payload/responses.rs | hyperswitch_connectors | struct_definition | 47 | rust | PayloadErrorResponse | null | null | null | null | null | null | null | null | null | null | null |
File: crates/analytics/src/payments/metrics/sessionized_metrics/connector_success_rate.rs
use std::collections::HashSet;
use api_models::analytics::{
payments::{PaymentDimensions, PaymentFilters, PaymentMetricsBucketIdentifier},
Granularity, TimeRange,
};
use common_utils::errors::ReportSwitchExt;
use error_s... | crates/analytics/src/payments/metrics/sessionized_metrics/connector_success_rate.rs | analytics | full_file | 992 | null | null | null | null | null | null | null | null | null | null | null | null | null |
OpenAPI Block Path: servers
[
{
"url": "https://sandbox.hyperswitch.io",
"description": "Sandbox Environment"
}
] | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 36 | .json | null | null | null | null | null | openapi_spec | servers | [] | null | null | null | null |
pub struct PostAuthenticationDetails {
pub eci: Option<String>,
pub token_details: Option<TokenDetails>,
pub dynamic_data_details: Option<DynamicData>,
pub trans_status: Option<common_enums::TransactionStatus>,
pub challenge_cancel: Option<String>,
pub challenge_code_reason: Option<String>,
} | crates/hyperswitch_domain_models/src/router_request_types/unified_authentication_service.rs | hyperswitch_domain_models | struct_definition | 66 | rust | PostAuthenticationDetails | null | null | null | null | null | null | null | null | null | null | null |
impl api::MandateSetup for Mifinity {} | crates/hyperswitch_connectors/src/connectors/mifinity.rs | hyperswitch_connectors | impl_block | 12 | rust | null | Mifinity | api::MandateSetup for | impl api::MandateSetup for for Mifinity | null | null | null | null | null | null | null | null |
pub struct ThemeUpdateInternal {
pub email_primary_color: Option<String>,
pub email_foreground_color: Option<String>,
pub email_background_color: Option<String>,
pub email_entity_name: Option<String>,
pub email_entity_logo_url: Option<String>,
} | crates/diesel_models/src/user/theme.rs | diesel_models | struct_definition | 54 | rust | ThemeUpdateInternal | null | null | null | null | null | null | null | null | null | null | null |
pub struct PaypalRedirectionStruct {
experience_context: ContextStruct,
attributes: Option<Attributes>,
} | crates/hyperswitch_connectors/src/connectors/paypal/transformers.rs | hyperswitch_connectors | struct_definition | 22 | rust | PaypalRedirectionStruct | null | null | null | null | null | null | null | null | null | null | null |
impl<'a> NetworkTokenizationBuilder<'a, PmTokenStored> {
pub fn set_payment_method(
self,
payment_method: &'a domain::PaymentMethod,
) -> NetworkTokenizationBuilder<'a, PmTokenUpdated> {
let payment_method_response = api::PaymentMethodResponse {
merchant_id: payment_method.me... | crates/router/src/core/payment_methods/tokenize/payment_method_executor.rs | router | impl_block | 299 | rust | null | NetworkTokenizationBuilder | null | impl NetworkTokenizationBuilder | null | null | null | null | null | null | null | null |
pub struct CustomerDetails {
pub name: Secret<String>,
pub email: Option<Secret<String>>,
pub phone_number: Option<Secret<String>>,
pub customer_id: String,
#[serde(rename = "type")]
pub customer_type: Option<String>,
pub billing_address: Address,
pub shipping_address: Address,
pub w... | crates/hyperswitch_connectors/src/connectors/unified_authentication_service/transformers.rs | hyperswitch_connectors | struct_definition | 100 | rust | CustomerDetails | null | null | null | null | null | null | null | null | null | null | null |
pub struct CalContractScoreEventResponse {
pub labels_with_score: Vec<ScoreDataEventResponse>,
} | crates/router/src/core/payments/routing/utils.rs | router | struct_definition | 22 | rust | CalContractScoreEventResponse | null | null | null | null | null | null | null | null | null | null | null |
File: crates/diesel_models/src/query/merchant_account.rs
Public functions: 19
#[cfg(feature = "v1")]
use common_types::consts::API_VERSION;
#[cfg(feature = "v1")]
use diesel::BoolExpressionMethods;
use diesel::{associations::HasTable, ExpressionMethods, Table};
use super::generics;
#[cfg(feature = "v1")]
use crate::... | crates/diesel_models/src/query/merchant_account.rs | diesel_models | full_file | 2,001 | null | null | null | null | null | null | null | null | null | null | null | null | null |
File: crates/router/src/core/payouts.rs
Public functions: 41
Public structs: 1
pub mod access_token;
pub mod helpers;
#[cfg(feature = "payout_retry")]
pub mod retry;
pub mod transformers;
pub mod validator;
use std::{
collections::{HashMap, HashSet},
vec::IntoIter,
};
#[cfg(feature = "olap")]
use api_models... | crates/router/src/core/payouts.rs#chunk0 | router | chunk | 8,188 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub fn filter_network_tokenization_supported_connectors(
connectors: Vec<api::ConnectorRoutingData>,
network_tokenization_supported_connectors: &HashSet<enums::Connector>,
) -> Vec<api::ConnectorRoutingData> {
connectors
.into_iter()
.filter(|data| {
network_tokenization_supporte... | crates/router/src/core/payments.rs | router | function_signature | 84 | rust | null | null | null | null | filter_network_tokenization_supported_connectors | null | null | null | null | null | null | null |
pub struct DatatransPaymentsRequest {
pub amount: Option<MinorUnit>,
pub currency: enums::Currency,
pub card: DataTransPaymentDetails,
pub refno: String,
pub auto_settle: bool,
#[serde(skip_serializing_if = "Option::is_none")]
pub redirect: Option<RedirectUrls>,
pub option: Option<DataTr... | crates/hyperswitch_connectors/src/connectors/datatrans/transformers.rs | hyperswitch_connectors | struct_definition | 83 | rust | DatatransPaymentsRequest | null | null | null | null | null | null | null | null | null | null | null |
/// Returns the payment ID of the event.
pub fn get_payment_id(&self) -> &str {
&self.payment_id
} | crates/hyperswitch_interfaces/src/events/routing_api_logs.rs | hyperswitch_interfaces | function_signature | 30 | rust | null | null | null | null | get_payment_id | null | null | null | null | null | null | null |
pub trait DynamicRoutingCache {
async fn get_cached_dynamic_routing_config_for_profile(
state: &SessionState,
key: &str,
) -> Option<Arc<Self>>;
async fn refresh_dynamic_routing_cache<T, F, Fut>(
state: &SessionState,
key: &str,
func: F,
) -> RouterResult<T>
... | crates/router/src/core/routing/helpers.rs | router | trait_definition | 136 | rust | null | null | DynamicRoutingCache | null | null | null | null | null | null | null | null | null |
impl api::PaymentAuthorize for Payu {} | crates/hyperswitch_connectors/src/connectors/payu.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Payu | api::PaymentAuthorize for | impl api::PaymentAuthorize for for Payu | null | null | null | null | null | null | null | null |
pub struct FeatureMatrixRequest {
// List of connectors for which the feature matrix is requested
#[schema(value_type = Option<Vec<Connector>>)]
pub connectors: Option<Vec<common_enums::connector_enums::Connector>>,
} | crates/api_models/src/feature_matrix.rs | api_models | struct_definition | 49 | rust | FeatureMatrixRequest | null | null | null | null | null | null | null | null | null | null | null |
impl SingleUseTokenKey {
pub fn store_key(payment_method_id: &id_type::GlobalPaymentMethodId) -> Self {
let new_token = format!("single_use_token_{}", payment_method_id.get_string_repr());
Self(new_token)
}
pub fn get_store_key(&self) -> &str {
&self.0
}
} | crates/hyperswitch_domain_models/src/payment_method_data.rs | hyperswitch_domain_models | impl_block | 75 | rust | null | SingleUseTokenKey | null | impl SingleUseTokenKey | null | null | null | null | null | null | null | null |
pub struct CustomerUpdateRequest {
pub description: Option<Description>,
pub email: Option<Email>,
pub phone: Option<masking::Secret<String, masking::WithType>>,
pub name: Option<masking::Secret<String>>,
pub address: Option<StripeAddressDetails>,
pub metadata: Option<pii::SecretSerdeValue>,
... | crates/router/src/compatibility/stripe/customers/types.rs | router | struct_definition | 254 | rust | CustomerUpdateRequest | null | null | null | null | null | null | null | null | null | null | null |
pub async fn toggle_success_based_routing() {} | crates/openapi/src/routes/routing.rs | openapi | function_signature | 9 | rust | null | null | null | null | toggle_success_based_routing | null | null | null | null | null | null | null |
pub struct BokuRsyncResponse {
refunds: RefundResponseData,
} | crates/hyperswitch_connectors/src/connectors/boku/transformers.rs | hyperswitch_connectors | struct_definition | 17 | rust | BokuRsyncResponse | null | null | null | null | null | null | null | null | null | null | null |
pub fn new() -> &'static Self {
&Self {
amount_converter: &StringMinorUnitForConnector,
}
} | crates/hyperswitch_connectors/src/connectors/juspaythreedsserver.rs | hyperswitch_connectors | function_signature | 28 | rust | null | null | null | null | new | null | null | null | null | null | null | null |
pub struct RefundErrorMessageDistributionAccumulator {
pub refund_error_message_vec: Vec<RefundErrorMessageDistributionRow>,
} | crates/analytics/src/refunds/accumulator.rs | analytics | struct_definition | 26 | rust | RefundErrorMessageDistributionAccumulator | null | null | null | null | null | null | null | null | null | null | null |
File: crates/hyperswitch_domain_models/src/vault.rs
Public functions: 2
use api_models::payment_methods;
#[cfg(feature = "v2")]
use error_stack;
use serde::{Deserialize, Serialize};
#[cfg(feature = "v2")]
use crate::errors;
use crate::payment_method_data;
#[derive(Debug, Deserialize, Serialize, Clone)]
pub enum Pay... | crates/hyperswitch_domain_models/src/vault.rs | hyperswitch_domain_models | full_file | 535 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct ClientRiskInformationRules {
name: Option<Secret<String>>,
} | crates/hyperswitch_connectors/src/connectors/wellsfargo/transformers.rs | hyperswitch_connectors | struct_definition | 16 | rust | ClientRiskInformationRules | null | null | null | null | null | null | null | null | null | null | null |
impl api::PaymentSync for Phonepe {} | crates/hyperswitch_connectors/src/connectors/phonepe.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Phonepe | api::PaymentSync for | impl api::PaymentSync for for Phonepe | null | null | null | null | null | null | null | null |
pub async fn upsert_surcharge_decision_manager_config(
state: web::Data<AppState>,
req: HttpRequest,
json_payload: web::Json<api_models::surcharge_decision_configs::SurchargeDecisionConfigReq>,
) -> impl Responder {
let flow = Flow::DecisionManagerUpsertConfig;
Box::pin(oss_api::server_wrap(
... | crates/router/src/routes/routing.rs | router | function_signature | 285 | rust | null | null | null | null | upsert_surcharge_decision_manager_config | null | null | null | null | null | null | null |
pub struct ErrorResponse {
pub status: String,
pub error_code: String,
pub error_message: String,
pub priority_logic_tag: Option<String>,
pub filter_wise_gateways: Option<serde_json::Value>,
pub error_info: UnifiedError,
pub is_dynamic_mga_enabled: bool,
} | crates/api_models/src/open_router.rs | api_models | struct_definition | 67 | rust | ErrorResponse | null | null | null | null | null | null | null | null | null | null | null |
impl ConnectorSpecifications for Plaid {
fn get_connector_about(&self) -> Option<&'static ConnectorInfo> {
Some(&PLAID_CONNECTOR_INFO)
}
fn get_supported_payment_methods(&self) -> Option<&'static SupportedPaymentMethods> {
Some(&*PLAID_SUPPORTED_PAYMENT_METHODS)
}
fn get_supported_... | crates/hyperswitch_connectors/src/connectors/plaid.rs | hyperswitch_connectors | impl_block | 108 | rust | null | Plaid | ConnectorSpecifications for | impl ConnectorSpecifications for for Plaid | null | null | null | null | null | null | null | null |
File: crates/router/src/consts.rs
pub mod opensearch;
#[cfg(feature = "olap")]
pub mod user;
pub mod user_role;
use std::collections::HashSet;
use api_models::enums::Country;
use common_utils::consts;
pub use hyperswitch_domain_models::consts::{
CONNECTOR_MANDATE_REQUEST_REFERENCE_ID_LENGTH, ROUTING_ENABLED_PAYME... | crates/router/src/consts.rs | router | full_file | 3,124 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct SiftRouterData<T> {
pub amount: StringMinorUnit, // The type of amount that a connector accepts, for example, String, i64, f64, etc.
pub router_data: T,
} | crates/hyperswitch_connectors/src/connectors/sift/transformers.rs | hyperswitch_connectors | struct_definition | 50 | rust | SiftRouterData | null | null | null | null | null | null | null | null | null | null | null |
pub struct PaymentMethodCollectLink {
pub link_id: String,
pub primary_reference: String,
pub merchant_id: common_utils::id_type::MerchantId,
#[serde(with = "common_utils::custom_serde::iso8601")]
pub created_at: PrimitiveDateTime,
#[serde(with = "common_utils::custom_serde::iso8601")]
pub l... | crates/diesel_models/src/generic_link.rs | diesel_models | struct_definition | 166 | rust | PaymentMethodCollectLink | null | null | null | null | null | null | null | null | null | null | null |
impl FromEncoded for Vec<u8> {
fn from_encoded(input: String) -> Option<Self> {
hex::decode(input).ok()
}
} | crates/external_services/src/hashicorp_vault/core.rs | external_services | impl_block | 33 | rust | null | Vec | FromEncoded for | impl FromEncoded for for Vec | null | null | null | null | null | null | null | null |
pub fn build_auth_array(&self) -> Vec<Value> {
self.search_params
.iter()
.map(|user_level| match user_level {
AuthInfo::OrgLevel { org_id } => {
let must_clauses = vec![json!({
"term": {
"organizatio... | crates/analytics/src/opensearch.rs | analytics | function_signature | 356 | rust | null | null | null | null | build_auth_array | null | null | null | null | null | null | null |
File: crates/router/src/services/authorization/permission_groups.rs
use std::{collections::HashMap, ops::Not};
use common_enums::{EntityType, ParentGroup, PermissionGroup, PermissionScope, Resource};
use strum::IntoEnumIterator;
use super::permissions::{self, ResourceExt};
pub trait PermissionGroupExt {
fn scop... | crates/router/src/services/authorization/permission_groups.rs | router | full_file | 1,780 | null | null | null | null | null | null | null | null | null | null | null | null | null |
File: crates/diesel_models/src/query/tokenization.rs
Public functions: 3
#[cfg(feature = "v2")]
use diesel::associations::HasTable;
#[cfg(feature = "v2")]
use diesel::ExpressionMethods;
#[cfg(feature = "v2")]
use crate::{
errors, query::generics, schema_v2::tokenization, tokenization as tokenization_diesel,
... | crates/diesel_models/src/query/tokenization.rs | diesel_models | full_file | 382 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl ConnectorSpecifications for Wise {
fn get_connector_about(&self) -> Option<&'static ConnectorInfo> {
Some(&WISE_CONNECTOR_INFO)
}
fn get_supported_payment_methods(&self) -> Option<&'static SupportedPaymentMethods> {
None
}
fn get_supported_webhook_flows(&self) -> Option<&'stat... | crates/hyperswitch_connectors/src/connectors/wise.rs | hyperswitch_connectors | impl_block | 90 | rust | null | Wise | ConnectorSpecifications for | impl ConnectorSpecifications for for Wise | null | null | null | null | null | null | null | null |
impl DashboardRequestPayload {
pub fn transform_card(
payment_method_type: PaymentMethodType,
card_provider: Vec<api_models::enums::CardNetwork>,
) -> payment_methods::RequestPaymentMethodTypes {
payment_methods::RequestPaymentMethodTypes {
payment_method_type,
ca... | crates/connector_configs/src/transformer.rs | connector_configs | impl_block | 1,398 | rust | null | DashboardRequestPayload | null | impl DashboardRequestPayload | null | null | null | null | null | null | null | null |
pub struct NoonActionTransaction {
amount: StringMajorUnit,
currency: enums::Currency,
transaction_reference: Option<String>,
} | crates/hyperswitch_connectors/src/connectors/noon/transformers.rs | hyperswitch_connectors | struct_definition | 28 | rust | NoonActionTransaction | null | null | null | null | null | null | null | null | null | null | null |
pub struct DsResponse(String); | crates/hyperswitch_connectors/src/connectors/redsys/transformers.rs | hyperswitch_connectors | struct_definition | 7 | rust | DsResponse | null | null | null | null | null | null | null | null | null | null | null |
impl BlocklistFingerprint {
pub async fn find_by_merchant_id_fingerprint_id(
conn: &PgPooledConn,
merchant_id: &common_utils::id_type::MerchantId,
fingerprint_id: &str,
) -> StorageResult<Self> {
generics::generic_find_one::<<Self as HasTable>::Table, _, _>(
conn,
... | crates/diesel_models/src/query/blocklist_fingerprint.rs | diesel_models | impl_block | 119 | rust | null | BlocklistFingerprint | null | impl BlocklistFingerprint | null | null | null | null | null | null | null | null |
pub struct UploadFileAssetData {
pub asset_name: Text<String>,
#[multipart(limit = "10MB")]
pub asset_data: Bytes,
} | crates/api_models/src/user/theme.rs | api_models | struct_definition | 33 | rust | UploadFileAssetData | null | null | null | null | null | null | null | null | null | null | null |
pub struct Klarna {
amount_converter: &'static (dyn AmountConvertor<Output = MinorUnit> + Sync),
} | crates/hyperswitch_connectors/src/connectors/klarna.rs | hyperswitch_connectors | struct_definition | 26 | rust | Klarna | null | null | null | null | null | null | null | null | null | null | null |
pub fn get_error_message(&self) -> String {
match self {
Self::InternalServerError => "Something went wrong".to_string(),
Self::MissingConfigError => "Missing webhook url".to_string(),
Self::ChatResponseDeserializationFailed => "Failed to parse chat response".to_string(),
... | crates/router/src/core/errors/chat.rs | router | function_signature | 66 | rust | null | null | null | null | get_error_message | null | null | null | null | null | null | null |
pub fn make_pm_graph(
builder: &mut cgraph::ConstraintGraphBuilder<dir::DirValue>,
domain_id: cgraph::DomainId,
payment_methods: &[masking::Secret<serde_json::value::Value>],
connector: String,
pm_config_mapping: &settings::ConnectorFilters,
supported_payment_methods_for_mandate: &settings::Supp... | crates/router/src/core/payment_methods/utils.rs | router | function_signature | 219 | rust | null | null | null | null | make_pm_graph | null | null | null | null | null | null | null |
pub fn api_or_client_auth<'a, T, A>(
api_auth: &'a dyn AuthenticateAndFetch<T, A>,
client_auth: &'a dyn AuthenticateAndFetch<T, A>,
headers: &HeaderMap,
) -> &'a dyn AuthenticateAndFetch<T, A>
where
{
if let Ok(val) = HeaderMapStruct::new(headers).get_auth_string_from_header() {
if val.trim().st... | crates/router/src/services/authentication.rs | router | function_signature | 122 | rust | null | null | null | null | api_or_client_auth | null | null | null | null | null | null | null |
impl api::RefundExecute for Zsl {} | crates/hyperswitch_connectors/src/connectors/zsl.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Zsl | api::RefundExecute for | impl api::RefundExecute for for Zsl | null | null | null | null | null | null | null | null |
pub struct BamboraRefundRequest {
amount: FloatMajorUnit,
} | crates/hyperswitch_connectors/src/connectors/bambora/transformers.rs | hyperswitch_connectors | struct_definition | 17 | rust | BamboraRefundRequest | null | null | null | null | null | null | null | null | null | null | null |
pub async fn refunds_retrieve() {} | crates/openapi/src/routes/refunds.rs | openapi | function_signature | 8 | rust | null | null | null | null | refunds_retrieve | null | null | null | null | null | null | null |
pub struct TokenizedCardValue1 {
pub card_number: String,
pub exp_year: String,
pub exp_month: String,
pub name_on_card: Option<String>,
pub nickname: Option<String>,
pub card_last_four: Option<String>,
pub card_token: Option<String>,
} | crates/api_models/src/payment_methods.rs | api_models | struct_definition | 63 | rust | TokenizedCardValue1 | null | null | null | null | null | null | null | null | null | null | null |
impl api::ConnectorAccessToken for Katapult {} | crates/hyperswitch_connectors/src/connectors/katapult.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Katapult | api::ConnectorAccessToken for | impl api::ConnectorAccessToken for for Katapult | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.LocalBankTransferAdditionalData
{
"type": "object",
"properties": {
"bank_code": {
"type": "string",
"description": "Partially masked bank code",
"example": "**** OA2312",
"nullable": true
}
}
} | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 74 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"LocalBankTransferAdditionalData"
] | null | null | null | null |
pub async fn retrieve_payment_method_from_auth_service(
state: &SessionState,
key_store: &domain::MerchantKeyStore,
auth_token: &payment_methods::BankAccountTokenData,
payment_intent: &PaymentIntent,
_customer: &Option<domain::Customer>,
) -> RouterResult<Option<(domain::PaymentMethodData, enums::Pa... | crates/router/src/core/pm_auth.rs | router | function_signature | 83 | rust | null | null | null | null | retrieve_payment_method_from_auth_service | null | null | null | null | null | null | null |
pub async fn update_user_theme(
state: web::Data<AppState>,
req: HttpRequest,
path: web::Path<String>,
payload: web::Json<theme_api::UpdateThemeRequest>,
) -> HttpResponse {
let flow = Flow::UpdateUserTheme;
let theme_id = path.into_inner();
let payload = payload.into_inner();
Box::pin(... | crates/router/src/routes/user/theme.rs | router | function_signature | 168 | rust | null | null | null | null | update_user_theme | null | null | null | null | null | null | null |
pub(crate) fn validate_payout_status_against_not_allowed_statuses(
payout_status: api_enums::PayoutStatus,
not_allowed_statuses: &[api_enums::PayoutStatus],
action: &'static str,
) -> Result<(), errors::ApiErrorResponse> {
fp_utils::when(not_allowed_statuses.contains(&payout_status), || {
Err(er... | crates/router/src/core/payouts/helpers.rs | router | function_signature | 114 | rust | null | null | null | null | validate_payout_status_against_not_allowed_statuses | null | null | null | null | null | null | null |
pub async fn generate_profile_dispute_report(
state: web::Data<AppState>,
req: actix_web::HttpRequest,
json_payload: web::Json<ReportRequest>,
) -> impl Responder {
let flow = AnalyticsFlow::GenerateDisputeReport;
Box::pin(api::server_wrap(
flow,
state... | crates/router/src/analytics.rs | router | function_signature | 413 | rust | null | null | null | null | generate_profile_dispute_report | null | null | null | null | null | null | null |
pub async fn create_tenant_user(
state: web::Data<AppState>,
http_req: HttpRequest,
json_payload: web::Json<user_api::CreateTenantUserRequest>,
) -> HttpResponse {
let flow = Flow::TenantUserCreate;
Box::pin(api::server_wrap(
flow,
state.clone(),
&http_req,
json_paylo... | crates/router/src/routes/user.rs | router | function_signature | 126 | rust | null | null | null | null | create_tenant_user | null | null | null | null | null | null | null |
impl super::KafkaMessage for KafkaPaymentIntentEvent<'_> {
fn key(&self) -> String {
format!(
"{}_{}",
self.merchant_id.get_string_repr(),
self.get_id().get_string_repr(),
)
}
fn event_type(&self) -> crate::events::EventType {
crate::events::Event... | crates/router/src/services/kafka/payment_intent_event.rs | router | impl_block | 80 | rust | null | KafkaPaymentIntentEvent | super::KafkaMessage for | impl super::KafkaMessage for for KafkaPaymentIntentEvent | null | null | null | null | null | null | null | null |
pub async fn update_by_user_id(
conn: &PgPooledConn,
user_id: &str,
user_update: UserUpdate,
) -> StorageResult<Self> {
generics::generic_update_with_unique_predicate_get_result::<
<Self as HasTable>::Table,
_,
_,
_,
>(
... | crates/diesel_models/src/query/user.rs | diesel_models | function_signature | 105 | rust | null | null | null | null | update_by_user_id | null | null | null | null | null | null | null |
File: crates/router/src/types/api/webhooks.rs
pub use api_models::webhooks::{
AuthenticationIdType, IncomingWebhookDetails, IncomingWebhookEvent, MerchantWebhookConfig,
ObjectReferenceId, OutgoingWebhook, OutgoingWebhookContent, WebhookFlow,
};
pub use hyperswitch_interfaces::webhooks::{IncomingWebhook, Incomi... | crates/router/src/types/api/webhooks.rs | router | full_file | 79 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub async fn update_gsm_rule() {} | crates/openapi/src/routes/gsm.rs | openapi | function_signature | 9 | rust | null | null | null | null | update_gsm_rule | null | null | null | null | null | null | null |
pub async fn payout_create_db_entries(
state: &SessionState,
merchant_context: &domain::MerchantContext,
req: &payouts::PayoutCreateRequest,
payout_id: &id_type::PayoutId,
profile_id: &id_type::ProfileId,
stored_payout_method_data: Option<&payouts::PayoutMethodData>,
locale: &str,
custom... | crates/router/src/core/payouts.rs | router | function_signature | 1,559 | rust | null | null | null | null | payout_create_db_entries | null | null | null | null | null | null | null |
/// Get the organization_id from MerchantAccount
pub fn get_org_id(&self) -> &common_utils::id_type::OrganizationId {
&self.organization_id
} | crates/hyperswitch_domain_models/src/merchant_account.rs | hyperswitch_domain_models | function_signature | 37 | rust | null | null | null | null | get_org_id | null | null | null | null | null | null | null |
pub struct TransientDecryptDataRequest {
pub identifier: Identifier,
pub data: StrongSecret<Vec<u8>>,
} | crates/common_utils/src/types/keymanager.rs | common_utils | struct_definition | 25 | rust | TransientDecryptDataRequest | null | null | null | null | null | null | null | null | null | null | null |
File: crates/api_models/src/connector_enums.rs
pub use common_enums::connector_enums::Connector;
| crates/api_models/src/connector_enums.rs | api_models | full_file | 24 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub fn get_debit_routing_savings(&self) -> Option<&MinorUnit> {
match self {
Self::ResponseUpdate {
debit_routing_savings,
..
} => debit_routing_savings.as_ref(),
Self::Update { .. }
| Self::UpdateTrackers { .. }
| Self:... | crates/hyperswitch_domain_models/src/payments/payment_attempt.rs | hyperswitch_domain_models | function_signature | 250 | rust | null | null | null | null | get_debit_routing_savings | null | null | null | null | null | null | null |
pub fn get_incoming_webhook_event(
transaction_type: GetnetTransactionType,
transaction_status: GetnetPaymentStatus,
) -> IncomingWebhookEvent {
match transaction_type {
GetnetTransactionType::Purchase => match transaction_status {
GetnetPaymentStatus::Success => IncomingWebhookEvent::Pa... | crates/hyperswitch_connectors/src/connectors/getnet/transformers.rs | hyperswitch_connectors | function_signature | 513 | rust | null | null | null | null | get_incoming_webhook_event | null | null | null | null | null | null | null |
File: crates/diesel_models/src/query/payment_intent.rs
Public functions: 9
use diesel::{associations::HasTable, BoolExpressionMethods, ExpressionMethods};
use super::generics;
#[cfg(feature = "v1")]
use crate::schema::payment_intent::dsl;
#[cfg(feature = "v2")]
use crate::schema_v2::payment_intent::dsl;
use crate::{... | crates/diesel_models/src/query/payment_intent.rs | diesel_models | full_file | 1,249 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub async fn retrieve_dynamic_routing_volume_split(
state: SessionState,
merchant_context: domain::MerchantContext,
profile_id: common_utils::id_type::ProfileId,
) -> RouterResponse<routing_types::RoutingVolumeSplitResponse> {
let db = state.store.as_ref();
let key_manager_state = &(&state).into();
... | crates/router/src/core/routing.rs | router | function_signature | 298 | rust | null | null | null | null | retrieve_dynamic_routing_volume_split | null | null | null | null | null | null | null |
pub async fn list_orgs_for_user(
state: SessionState,
user_from_token: auth::UserFromToken,
) -> UserResponse<Vec<user_api::ListOrgsForUserResponse>> {
let role_info = roles::RoleInfo::from_role_id_org_id_tenant_id(
&state,
&user_from_token.role_id,
&user_from_token.org_id,
u... | crates/router/src/core/user.rs | router | function_signature | 585 | rust | null | null | null | null | list_orgs_for_user | null | null | null | null | null | null | null |
pub struct ListProfilesForUserInOrgAndMerchantAccountResponse {
pub profile_id: id_type::ProfileId,
pub profile_name: String,
} | crates/api_models/src/user.rs | api_models | struct_definition | 32 | rust | ListProfilesForUserInOrgAndMerchantAccountResponse | null | null | null | null | null | null | null | null | null | null | null |
pub fn parse_token(input: &str) -> IResult<&str, TokenReference> {
let (input, field) = delimited(
tag("{{"),
preceded(
multispace0,
preceded(
char('$'),
terminated(
take_while1(|c: char| c.is_alphanumeric() || c == '_'),
... | crates/router/src/core/proxy/utils.rs | router | function_signature | 113 | rust | null | null | null | null | parse_token | null | null | null | null | null | null | null |
pub struct DecisionEngineGatewayWiseExtraScore {
pub gateway_name: String,
pub gateway_sigma_factor: f64,
} | crates/api_models/src/open_router.rs | api_models | struct_definition | 28 | rust | DecisionEngineGatewayWiseExtraScore | null | null | null | null | null | null | null | null | null | null | null |
pub struct WellsfargoErrorInformation {
reason: Option<String>,
message: Option<String>,
details: Option<Vec<Details>>,
} | crates/hyperswitch_connectors/src/connectors/wellsfargo/transformers.rs | hyperswitch_connectors | struct_definition | 29 | rust | WellsfargoErrorInformation | null | null | null | null | null | null | null | null | null | null | null |
pub fn get_retry_threshold(&self) -> Option<u16> {
self.feature_metadata
.as_ref()
.and_then(|metadata| metadata.revenue_recovery.as_ref())
.map(|recovery| recovery.billing_connector_retry_threshold)
} | crates/hyperswitch_domain_models/src/merchant_connector_account.rs | hyperswitch_domain_models | function_signature | 55 | rust | null | null | null | null | get_retry_threshold | null | null | null | null | null | null | null |
pub struct NordeaOAuthExchangeResponse {
pub access_token: Option<Secret<String>>,
pub expires_in: Option<i64>,
pub refresh_token: Option<Secret<String>>,
pub token_type: Option<String>,
} | crates/hyperswitch_connectors/src/connectors/nordea/responses.rs | hyperswitch_connectors | struct_definition | 47 | rust | NordeaOAuthExchangeResponse | null | null | null | null | null | null | null | null | null | null | null |
pub async fn list_by_merchant_id(
conn: &PgPooledConn,
merchant_id: &common_utils::id_type::MerchantId,
) -> StorageResult<Vec<Self>> {
generics::generic_filter::<<Self as HasTable>::Table, _, _, _>(
conn,
dsl::merchant_id.eq(merchant_id.to_owned()),
None,... | crates/diesel_models/src/query/blocklist.rs | diesel_models | function_signature | 98 | rust | null | null | null | null | list_by_merchant_id | null | null | null | null | null | null | null |
pub struct ParentGroupInfoRequest {
pub name: ParentGroup,
pub scopes: Vec<PermissionScope>,
} | crates/api_models/src/user_role/role.rs | api_models | struct_definition | 24 | rust | ParentGroupInfoRequest | null | null | null | null | null | null | null | null | null | null | null |
File: crates/hyperswitch_domain_models/src/payouts/payouts.rs
Public structs: 3
use common_enums as storage_enums;
use common_utils::{id_type, pii, types::MinorUnit};
use serde::{Deserialize, Serialize};
use storage_enums::MerchantStorageScheme;
use time::PrimitiveDateTime;
use super::payout_attempt::PayoutAttempt;
... | crates/hyperswitch_domain_models/src/payouts/payouts.rs | hyperswitch_domain_models | full_file | 2,071 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct Product {
pub item_name: String,
pub item_quantity: i64,
pub item_id: String,
} | crates/hyperswitch_domain_models/src/router_request_types/fraud_check.rs | hyperswitch_domain_models | struct_definition | 28 | rust | Product | null | null | null | null | null | null | null | null | null | null | null |
pub trait PaymentMethodsController {
#[cfg(feature = "v1")]
#[allow(clippy::too_many_arguments)]
async fn create_payment_method(
&self,
req: &api::PaymentMethodCreate,
customer_id: &id_type::CustomerId,
payment_method_id: &str,
locker_id: Option<String>,
merch... | crates/payment_methods/src/controller.rs | payment_methods | trait_definition | 1,838 | rust | null | null | PaymentMethodsController | null | null | null | null | null | null | null | null | null |
pub struct TokenizeCardRequest {
/// Card Number
#[schema(value_type = String, example = "4111111145551142")]
pub raw_card_number: CardNumber,
/// Card Expiry Month
#[schema(value_type = String, example = "10")]
pub card_expiry_month: masking::Secret<String>,
/// Card Expiry Year
#[sch... | crates/api_models/src/payment_methods.rs | api_models | struct_definition | 314 | rust | TokenizeCardRequest | null | null | null | null | null | null | null | null | null | null | null |
pub async fn create_payment_method_card_core(
state: &SessionState,
req: api::PaymentMethodCreate,
merchant_context: &domain::MerchantContext,
profile: &domain::Profile,
merchant_id: &id_type::MerchantId,
customer_id: &id_type::GlobalCustomerId,
payment_method_id: id_type::GlobalPaymentMetho... | crates/router/src/core/payment_methods.rs | router | function_signature | 713 | rust | null | null | null | null | create_payment_method_card_core | null | null | null | null | null | null | null |
pub struct V2ClientAuth(pub common_utils::types::authentication::ResourceId); | crates/router/src/services/authentication.rs | router | struct_definition | 16 | rust | V2ClientAuth | null | null | null | null | null | null | null | null | null | null | null |
pub struct PaymentMethodCard {
payment_method_source: PaymentMethodSource,
card: MonerisCard,
store_payment_method: StorePaymentMethod,
} | crates/hyperswitch_connectors/src/connectors/moneris/transformers.rs | hyperswitch_connectors | struct_definition | 33 | rust | PaymentMethodCard | null | null | null | null | null | null | null | null | null | null | null |
impl api::Payment for Paybox {} | crates/hyperswitch_connectors/src/connectors/paybox.rs | hyperswitch_connectors | impl_block | 8 | rust | null | Paybox | api::Payment for | impl api::Payment for for Paybox | null | null | null | null | null | null | null | null |
impl<'a> KafkaFraudCheckEvent<'a> {
pub fn from_storage(check: &'a FraudCheck) -> Self {
Self {
frm_id: &check.frm_id,
payment_id: &check.payment_id,
merchant_id: &check.merchant_id,
attempt_id: &check.attempt_id,
created_at: check.created_at.assum... | crates/router/src/services/kafka/fraud_check_event.rs | router | impl_block | 204 | rust | null | KafkaFraudCheckEvent | null | impl KafkaFraudCheckEvent | null | null | null | null | null | null | null | null |
File: crates/router/src/db/ephemeral_key.rs
#[cfg(feature = "v2")]
use common_utils::id_type;
use time::ext::NumericalDuration;
#[cfg(feature = "v2")]
use crate::types::storage::ephemeral_key::{ClientSecretType, ClientSecretTypeNew};
use crate::{
core::errors::{self, CustomResult},
db::MockDb,
types::stor... | crates/router/src/db/ephemeral_key.rs | router | full_file | 2,863 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub fn get_connector_transaction_id(
&self,
) -> Result<String, error_stack::Report<ApiErrorResponse>> {
match self {
Self::TransactionResponse {
resource_id: ResponseId::ConnectorTransactionId(txn_id),
..
} => Ok(txn_id.to_string()),
... | crates/hyperswitch_domain_models/src/router_response_types.rs | hyperswitch_domain_models | function_signature | 92 | rust | null | null | null | null | get_connector_transaction_id | null | null | null | null | null | null | null |
pub struct RuleMigrationQuery {
pub profile_id: common_utils::id_type::ProfileId,
pub merchant_id: common_utils::id_type::MerchantId,
pub limit: Option<u32>,
pub offset: Option<u32>,
} | crates/api_models/src/routing.rs | api_models | struct_definition | 53 | rust | RuleMigrationQuery | null | null | null | null | null | null | null | null | null | null | null |
pub async fn api_key_create(
state: web::Data<AppState>,
req: HttpRequest,
path: web::Path<common_utils::id_type::MerchantId>,
json_payload: web::Json<api_types::CreateApiKeyRequest>,
) -> impl Responder {
let flow = Flow::ApiKeyCreate;
let payload = json_payload.into_inner();
let merchant_i... | crates/router/src/routes/api_keys.rs | router | function_signature | 234 | rust | null | null | null | null | api_key_create | null | null | null | null | null | null | null |
impl api::PaymentCapture for Worldpay {} | crates/hyperswitch_connectors/src/connectors/worldpay.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Worldpay | api::PaymentCapture for | impl api::PaymentCapture for for Worldpay | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.DecisionEngineEliminationData
{
"type": "object",
"required": [
"threshold"
],
"properties": {
"threshold": {
"type": "number",
"format": "double"
}
}
} | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 63 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"DecisionEngineEliminationData"
] | null | null | null | null |
impl api::PaymentSync for Santander {} | crates/hyperswitch_connectors/src/connectors/santander.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Santander | api::PaymentSync for | impl api::PaymentSync for for Santander | null | null | null | null | null | null | null | null |
pub async fn insert_entry_into_blocklist(
state: &SessionState,
merchant_id: &common_utils::id_type::MerchantId,
to_block: api_blocklist::AddToBlocklistRequest,
) -> RouterResult<api_blocklist::AddToBlocklistResponse> {
let blocklist_entry = match &to_block {
api_blocklist::AddToBlocklistRequest... | crates/router/src/core/blocklist/utils.rs | router | function_signature | 489 | rust | null | null | null | null | insert_entry_into_blocklist | null | null | null | null | null | null | null |
impl EmailClient for SmtpServer {
type RichText = String;
fn convert_to_rich_text(
&self,
intermediate_string: IntermediateString,
) -> CustomResult<Self::RichText, EmailError> {
Ok(intermediate_string.into_inner())
}
async fn send_email(
&self,
recipient: pi... | crates/external_services/src/email/smtp.rs | external_services | impl_block | 261 | rust | null | SmtpServer | EmailClient for | impl EmailClient for for SmtpServer | null | null | null | null | null | null | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.